generated-configure.sh revision 992:04a1b6dee68d
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk8.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk8'
590PACKAGE_STRING='OpenJDK jdk8'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643MSVCR_DLL
644LIBCXX
645LLVM_LIBS
646LLVM_LDFLAGS
647LLVM_CFLAGS
648LLVM_CONFIG
649LIBFFI_LIBS
650LIBFFI_CFLAGS
651STATIC_CXX_SETTING
652LIBDL
653LIBM
654LIBZIP_CAN_USE_MMAP
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LIBGIF
660USE_EXTERNAL_LIBJPEG
661ALSA_LIBS
662ALSA_CFLAGS
663FREETYPE_BUNDLE_LIB_PATH
664FREETYPE_LIBS
665FREETYPE_CFLAGS
666CUPS_CFLAGS
667OPENWIN_HOME
668X_EXTRA_LIBS
669X_LIBS
670X_PRE_LIBS
671X_CFLAGS
672XMKMF
673FIXPATH
674ZIP_DEBUGINFO_FILES
675ENABLE_DEBUG_SYMBOLS
676COMPILER_SUPPORTS_TARGET_BITS_FLAG
677ZERO_ARCHFLAG
678LDFLAGS_CXX_JDK
679LDFLAGS_JDKEXE_SUFFIX
680LDFLAGS_JDKLIB_SUFFIX
681LDFLAGS_JDKEXE
682LDFLAGS_JDKLIB
683CXXFLAGS_JDKEXE
684CXXFLAGS_JDKLIB
685CFLAGS_JDKEXE
686CFLAGS_JDKLIB
687MACOSX_VERSION_MIN
688LEGACY_EXTRA_LDFLAGS
689LEGACY_EXTRA_CXXFLAGS
690LEGACY_EXTRA_CFLAGS
691CXX_O_FLAG_NONE
692CXX_O_FLAG_NORM
693CXX_O_FLAG_HI
694CXX_O_FLAG_HIGHEST
695C_O_FLAG_NONE
696C_O_FLAG_NORM
697C_O_FLAG_HI
698C_O_FLAG_HIGHEST
699CXXFLAGS_DEBUG_SYMBOLS
700CFLAGS_DEBUG_SYMBOLS
701CXX_FLAG_DEPS
702C_FLAG_DEPS
703SET_SHARED_LIBRARY_MAPFILE
704SET_SHARED_LIBRARY_NAME
705SET_SHARED_LIBRARY_ORIGIN
706SET_EXECUTABLE_ORIGIN
707SHARED_LIBRARY_FLAGS
708CXX_FLAG_REORDER
709C_FLAG_REORDER
710RC_FLAGS
711AR_OUT_OPTION
712LD_OUT_OPTION
713EXE_OUT_OPTION
714CC_OUT_OPTION
715POST_MCS_CMD
716POST_STRIP_CMD
717ARFLAGS
718COMPILER_TARGET_BITS_FLAG
719JT_HOME
720JTREGEXE
721USING_BROKEN_SUSE_LD
722PACKAGE_PATH
723LDEXECXX
724LDEXE
725USE_CLANG
726HOTSPOT_LD
727HOTSPOT_CXX
728HOTSPOT_RC
729HOTSPOT_MT
730BUILD_LD
731BUILD_CXX
732BUILD_CC
733ac_ct_OBJDUMP
734OBJDUMP
735ac_ct_OBJCOPY
736OBJCOPY
737ac_ct_NM
738ac_ct_STRIP
739MCS
740GNM
741NM
742STRIP
743DUMPBIN
744RC
745MT
746LIPO
747ac_ct_OBJC
748OBJCFLAGS
749OBJC
750ac_ct_AR
751AR
752AS
753LDCXX
754LD
755CXXCPP
756CPP
757ac_ct_CXX
758CXXFLAGS
759CXX
760ac_ct_PROPER_COMPILER_CXX
761PROPER_COMPILER_CXX
762TOOLS_DIR_CXX
763POTENTIAL_CXX
764OBJEXT
765EXEEXT
766ac_ct_CC
767CPPFLAGS
768LDFLAGS
769CFLAGS
770CC
771ac_ct_PROPER_COMPILER_CC
772PROPER_COMPILER_CC
773TOOLS_DIR_CC
774POTENTIAL_CC
775VS_PATH
776VS_LIB
777VS_INCLUDE
778CYGWIN_LINK
779EXE_SUFFIX
780OBJ_SUFFIX
781STATIC_LIBRARY
782SHARED_LIBRARY
783STATIC_LIBRARY_SUFFIX
784SHARED_LIBRARY_SUFFIX
785LIBRARY_PREFIX
786TOOLCHAIN_TYPE
787BUILD_HOTSPOT
788HOTSPOT_DIST
789BUILD_OUTPUT
790OVERRIDE_SRC_ROOT
791ADD_SRC_ROOT
792JDK_TOPDIR
793NASHORN_TOPDIR
794HOTSPOT_TOPDIR
795JAXWS_TOPDIR
796JAXP_TOPDIR
797CORBA_TOPDIR
798LANGTOOLS_TOPDIR
799BOOT_JDK_JVMARGS
800JAVAC_FLAGS
801BOOT_JDK_SOURCETARGET
802JARSIGNER
803NATIVE2ASCII
804JAR
805JAVAH
806JAVAC
807JAVA
808BOOT_JDK
809BOOT_TOOLSJAR
810BOOT_RTJAR
811JAVA_CHECK
812JAVAC_CHECK
813COOKED_BUILD_NUMBER
814JDK_VERSION
815COPYRIGHT_YEAR
816MACOSX_BUNDLE_ID_BASE
817MACOSX_BUNDLE_NAME_BASE
818COMPANY_NAME
819JDK_RC_PLATFORM_NAME
820PRODUCT_SUFFIX
821PRODUCT_NAME
822LAUNCHER_NAME
823MILESTONE
824JDK_BUILD_NUMBER
825JDK_UPDATE_VERSION
826JDK_MICRO_VERSION
827JDK_MINOR_VERSION
828JDK_MAJOR_VERSION
829USER_RELEASE_SUFFIX
830COMPRESS_JARS
831RMICONNECTOR_IIOP
832UNLIMITED_CRYPTO
833CACERTS_FILE
834TEST_IN_BUILD
835BUILD_HEADLESS
836SUPPORT_HEADFUL
837SUPPORT_HEADLESS
838BDEPS_FTP
839BDEPS_UNZIP
840OS_VERSION_MICRO
841OS_VERSION_MINOR
842OS_VERSION_MAJOR
843PKG_CONFIG
844CODESIGN
845XATTR
846DSYMUTIL
847IS_GNU_TIME
848TIME
849STAT
850HG
851READELF
852OTOOL
853LDD
854ZIP
855UNZIP
856FIND_DELETE
857MAKE
858CHECK_TOOLSDIR_MAKE
859CHECK_TOOLSDIR_GMAKE
860CHECK_MAKE
861CHECK_GMAKE
862PKGHANDLER
863OUTPUT_ROOT
864CONF_NAME
865SPEC
866BUILD_VARIANT_RELEASE
867DEBUG_CLASSFILES
868FASTDEBUG
869VARIANT
870DEBUG_LEVEL
871MACOSX_UNIVERSAL
872INCLUDE_SA
873JVM_VARIANT_CORE
874JVM_VARIANT_ZEROSHARK
875JVM_VARIANT_ZERO
876JVM_VARIANT_KERNEL
877JVM_VARIANT_MINIMAL1
878JVM_VARIANT_CLIENT
879JVM_VARIANT_SERVER
880JVM_VARIANTS
881JVM_INTERPRETER
882JDK_VARIANT
883SET_OPENJDK
884BUILD_LOG_WRAPPER
885BUILD_LOG_PREVIOUS
886BUILD_LOG
887SYS_ROOT
888TOPDIR
889PATH_SEP
890ZERO_ARCHDEF
891DEFINE_CROSS_COMPILE_ARCH
892LP64
893OPENJDK_TARGET_OS_EXPORT_DIR
894OPENJDK_TARGET_OS_API_DIR
895OPENJDK_TARGET_CPU_JLI_CFLAGS
896OPENJDK_TARGET_CPU_OSARCH
897OPENJDK_TARGET_CPU_ISADIR
898OPENJDK_TARGET_CPU_LIBDIR
899OPENJDK_TARGET_CPU_LEGACY_LIB
900OPENJDK_TARGET_CPU_LEGACY
901REQUIRED_OS_VERSION
902REQUIRED_OS_NAME
903COMPILE_TYPE
904OPENJDK_TARGET_CPU_ENDIAN
905OPENJDK_TARGET_CPU_BITS
906OPENJDK_TARGET_CPU_ARCH
907OPENJDK_TARGET_CPU
908OPENJDK_TARGET_OS_API
909OPENJDK_TARGET_OS
910OPENJDK_BUILD_CPU_ENDIAN
911OPENJDK_BUILD_CPU_BITS
912OPENJDK_BUILD_CPU_ARCH
913OPENJDK_BUILD_CPU
914OPENJDK_BUILD_OS_API
915OPENJDK_BUILD_OS
916OPENJDK_BUILD_AUTOCONF_NAME
917OPENJDK_TARGET_AUTOCONF_NAME
918target_os
919target_vendor
920target_cpu
921target
922host_os
923host_vendor
924host_cpu
925host
926build_os
927build_vendor
928build_cpu
929build
930SETFILE
931DF
932READLINK
933CYGPATH
934SED
935FGREP
936EGREP
937GREP
938AWK
939XARGS
940WHICH
941WC
942UNIQ
943UNAME
944TR
945TOUCH
946TEE
947TAR
948TAIL
949SORT
950SH
951RM
952PRINTF
953NAWK
954MV
955MKTEMP
956MKDIR
957LS
958LN
959HEAD
960FIND
961FILE
962EXPR
963ECHO
964DIRNAME
965DIFF
966DATE
967CUT
968CPIO
969CP
970COMM
971CMP
972CHMOD
973CAT
974BASH
975BASENAME
976DATE_WHEN_CONFIGURED
977CONFIGURE_COMMAND_LINE
978target_alias
979host_alias
980build_alias
981LIBS
982ECHO_T
983ECHO_N
984ECHO_C
985DEFS
986mandir
987localedir
988libdir
989psdir
990pdfdir
991dvidir
992htmldir
993infodir
994docdir
995oldincludedir
996includedir
997localstatedir
998sharedstatedir
999sysconfdir
1000datadir
1001datarootdir
1002libexecdir
1003sbindir
1004bindir
1005program_transform_name
1006prefix
1007exec_prefix
1008PACKAGE_URL
1009PACKAGE_BUGREPORT
1010PACKAGE_STRING
1011PACKAGE_VERSION
1012PACKAGE_TARNAME
1013PACKAGE_NAME
1014PATH_SEPARATOR
1015SHELL'
1016ac_subst_files=''
1017ac_user_opts='
1018enable_option_checking
1019with_target_bits
1020with_sys_root
1021with_tools_dir
1022with_devkit
1023enable_openjdk_only
1024with_custom_make_dir
1025with_jdk_variant
1026with_jvm_interpreter
1027with_jvm_variants
1028enable_debug
1029with_debug_level
1030with_conf_name
1031with_builddeps_conf
1032with_builddeps_server
1033with_builddeps_dir
1034with_builddeps_group
1035enable_headful
1036enable_hotspot_test_in_build
1037with_cacerts_file
1038enable_unlimited_crypto
1039enable_rmiconnector_iiop
1040with_milestone
1041with_update_version
1042with_user_release_suffix
1043with_build_number
1044with_boot_jdk
1045with_boot_jdk_jvmargs
1046with_add_source_root
1047with_override_source_root
1048with_adds_and_overrides
1049with_override_langtools
1050with_override_corba
1051with_override_jaxp
1052with_override_jaxws
1053with_override_hotspot
1054with_override_nashorn
1055with_override_jdk
1056with_import_hotspot
1057with_toolchain_type
1058with_jtreg
1059with_extra_cflags
1060with_extra_cxxflags
1061with_extra_ldflags
1062enable_debug_symbols
1063enable_zip_debug_info
1064enable_macosx_runtime_support
1065with_x
1066with_cups
1067with_cups_include
1068with_freetype
1069with_freetype_include
1070with_freetype_lib
1071enable_freetype_bundling
1072with_alsa
1073with_alsa_include
1074with_alsa_lib
1075with_giflib
1076with_libpng
1077with_zlib
1078with_stdc__lib
1079with_msvcr_dll
1080with_dxsdk
1081with_dxsdk_lib
1082with_dxsdk_include
1083with_num_cores
1084with_memory_size
1085with_jobs
1086with_sjavac_server_java
1087enable_sjavac
1088enable_precompiled_headers
1089enable_ccache
1090with_ccache_dir
1091'
1092      ac_precious_vars='build_alias
1093host_alias
1094target_alias
1095BASENAME
1096BASH
1097CAT
1098CHMOD
1099CMP
1100COMM
1101CP
1102CPIO
1103CUT
1104DATE
1105DIFF
1106DIRNAME
1107ECHO
1108EXPR
1109FILE
1110FIND
1111HEAD
1112LN
1113LS
1114MKDIR
1115MKTEMP
1116MV
1117NAWK
1118PRINTF
1119RM
1120SH
1121SORT
1122TAIL
1123TAR
1124TEE
1125TOUCH
1126TR
1127UNAME
1128UNIQ
1129WC
1130WHICH
1131XARGS
1132AWK
1133GREP
1134EGREP
1135FGREP
1136SED
1137CYGPATH
1138READLINK
1139DF
1140SETFILE
1141UNZIP
1142ZIP
1143LDD
1144OTOOL
1145READELF
1146HG
1147STAT
1148TIME
1149DSYMUTIL
1150XATTR
1151CODESIGN
1152PKG_CONFIG
1153JAVA
1154JAVAC
1155JAVAH
1156JAR
1157NATIVE2ASCII
1158JARSIGNER
1159CC
1160CFLAGS
1161LDFLAGS
1162LIBS
1163CPPFLAGS
1164CXX
1165CXXFLAGS
1166CCC
1167CPP
1168CXXCPP
1169AS
1170AR
1171OBJC
1172OBJCFLAGS
1173LIPO
1174STRIP
1175NM
1176GNM
1177MCS
1178OBJCOPY
1179OBJDUMP
1180BUILD_CC
1181BUILD_CXX
1182BUILD_LD
1183JTREGEXE
1184XMKMF
1185FREETYPE_CFLAGS
1186FREETYPE_LIBS
1187ALSA_CFLAGS
1188ALSA_LIBS
1189PNG_CFLAGS
1190PNG_LIBS
1191LIBFFI_CFLAGS
1192LIBFFI_LIBS
1193CCACHE'
1194
1195
1196# Initialize some variables set by options.
1197ac_init_help=
1198ac_init_version=false
1199ac_unrecognized_opts=
1200ac_unrecognized_sep=
1201# The variables have the same names as the options, with
1202# dashes changed to underlines.
1203cache_file=/dev/null
1204exec_prefix=NONE
1205no_create=
1206no_recursion=
1207prefix=NONE
1208program_prefix=NONE
1209program_suffix=NONE
1210program_transform_name=s,x,x,
1211silent=
1212site=
1213srcdir=
1214verbose=
1215x_includes=NONE
1216x_libraries=NONE
1217
1218# Installation directory options.
1219# These are left unexpanded so users can "make install exec_prefix=/foo"
1220# and all the variables that are supposed to be based on exec_prefix
1221# by default will actually change.
1222# Use braces instead of parens because sh, perl, etc. also accept them.
1223# (The list follows the same order as the GNU Coding Standards.)
1224bindir='${exec_prefix}/bin'
1225sbindir='${exec_prefix}/sbin'
1226libexecdir='${exec_prefix}/libexec'
1227datarootdir='${prefix}/share'
1228datadir='${datarootdir}'
1229sysconfdir='${prefix}/etc'
1230sharedstatedir='${prefix}/com'
1231localstatedir='${prefix}/var'
1232includedir='${prefix}/include'
1233oldincludedir='/usr/include'
1234docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1235infodir='${datarootdir}/info'
1236htmldir='${docdir}'
1237dvidir='${docdir}'
1238pdfdir='${docdir}'
1239psdir='${docdir}'
1240libdir='${exec_prefix}/lib'
1241localedir='${datarootdir}/locale'
1242mandir='${datarootdir}/man'
1243
1244ac_prev=
1245ac_dashdash=
1246for ac_option
1247do
1248  # If the previous option needs an argument, assign it.
1249  if test -n "$ac_prev"; then
1250    eval $ac_prev=\$ac_option
1251    ac_prev=
1252    continue
1253  fi
1254
1255  case $ac_option in
1256  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1257  *=)   ac_optarg= ;;
1258  *)    ac_optarg=yes ;;
1259  esac
1260
1261  # Accept the important Cygnus configure options, so we can diagnose typos.
1262
1263  case $ac_dashdash$ac_option in
1264  --)
1265    ac_dashdash=yes ;;
1266
1267  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1268    ac_prev=bindir ;;
1269  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1270    bindir=$ac_optarg ;;
1271
1272  -build | --build | --buil | --bui | --bu)
1273    ac_prev=build_alias ;;
1274  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1275    build_alias=$ac_optarg ;;
1276
1277  -cache-file | --cache-file | --cache-fil | --cache-fi \
1278  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1279    ac_prev=cache_file ;;
1280  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1281  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1282    cache_file=$ac_optarg ;;
1283
1284  --config-cache | -C)
1285    cache_file=config.cache ;;
1286
1287  -datadir | --datadir | --datadi | --datad)
1288    ac_prev=datadir ;;
1289  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1290    datadir=$ac_optarg ;;
1291
1292  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1293  | --dataroo | --dataro | --datar)
1294    ac_prev=datarootdir ;;
1295  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1296  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1297    datarootdir=$ac_optarg ;;
1298
1299  -disable-* | --disable-*)
1300    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1301    # Reject names that are not valid shell variable names.
1302    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1303      as_fn_error $? "invalid feature name: $ac_useropt"
1304    ac_useropt_orig=$ac_useropt
1305    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1306    case $ac_user_opts in
1307      *"
1308"enable_$ac_useropt"
1309"*) ;;
1310      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1311	 ac_unrecognized_sep=', ';;
1312    esac
1313    eval enable_$ac_useropt=no ;;
1314
1315  -docdir | --docdir | --docdi | --doc | --do)
1316    ac_prev=docdir ;;
1317  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1318    docdir=$ac_optarg ;;
1319
1320  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1321    ac_prev=dvidir ;;
1322  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1323    dvidir=$ac_optarg ;;
1324
1325  -enable-* | --enable-*)
1326    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1327    # Reject names that are not valid shell variable names.
1328    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1329      as_fn_error $? "invalid feature name: $ac_useropt"
1330    ac_useropt_orig=$ac_useropt
1331    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1332    case $ac_user_opts in
1333      *"
1334"enable_$ac_useropt"
1335"*) ;;
1336      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1337	 ac_unrecognized_sep=', ';;
1338    esac
1339    eval enable_$ac_useropt=\$ac_optarg ;;
1340
1341  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1342  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1343  | --exec | --exe | --ex)
1344    ac_prev=exec_prefix ;;
1345  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1346  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1347  | --exec=* | --exe=* | --ex=*)
1348    exec_prefix=$ac_optarg ;;
1349
1350  -gas | --gas | --ga | --g)
1351    # Obsolete; use --with-gas.
1352    with_gas=yes ;;
1353
1354  -help | --help | --hel | --he | -h)
1355    ac_init_help=long ;;
1356  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1357    ac_init_help=recursive ;;
1358  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1359    ac_init_help=short ;;
1360
1361  -host | --host | --hos | --ho)
1362    ac_prev=host_alias ;;
1363  -host=* | --host=* | --hos=* | --ho=*)
1364    host_alias=$ac_optarg ;;
1365
1366  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1367    ac_prev=htmldir ;;
1368  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1369  | --ht=*)
1370    htmldir=$ac_optarg ;;
1371
1372  -includedir | --includedir | --includedi | --included | --include \
1373  | --includ | --inclu | --incl | --inc)
1374    ac_prev=includedir ;;
1375  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1376  | --includ=* | --inclu=* | --incl=* | --inc=*)
1377    includedir=$ac_optarg ;;
1378
1379  -infodir | --infodir | --infodi | --infod | --info | --inf)
1380    ac_prev=infodir ;;
1381  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1382    infodir=$ac_optarg ;;
1383
1384  -libdir | --libdir | --libdi | --libd)
1385    ac_prev=libdir ;;
1386  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1387    libdir=$ac_optarg ;;
1388
1389  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1390  | --libexe | --libex | --libe)
1391    ac_prev=libexecdir ;;
1392  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1393  | --libexe=* | --libex=* | --libe=*)
1394    libexecdir=$ac_optarg ;;
1395
1396  -localedir | --localedir | --localedi | --localed | --locale)
1397    ac_prev=localedir ;;
1398  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1399    localedir=$ac_optarg ;;
1400
1401  -localstatedir | --localstatedir | --localstatedi | --localstated \
1402  | --localstate | --localstat | --localsta | --localst | --locals)
1403    ac_prev=localstatedir ;;
1404  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1405  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1406    localstatedir=$ac_optarg ;;
1407
1408  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1409    ac_prev=mandir ;;
1410  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1411    mandir=$ac_optarg ;;
1412
1413  -nfp | --nfp | --nf)
1414    # Obsolete; use --without-fp.
1415    with_fp=no ;;
1416
1417  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1418  | --no-cr | --no-c | -n)
1419    no_create=yes ;;
1420
1421  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1422  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1423    no_recursion=yes ;;
1424
1425  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1426  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1427  | --oldin | --oldi | --old | --ol | --o)
1428    ac_prev=oldincludedir ;;
1429  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1430  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1431  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1432    oldincludedir=$ac_optarg ;;
1433
1434  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1435    ac_prev=prefix ;;
1436  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1437    prefix=$ac_optarg ;;
1438
1439  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1440  | --program-pre | --program-pr | --program-p)
1441    ac_prev=program_prefix ;;
1442  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1443  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1444    program_prefix=$ac_optarg ;;
1445
1446  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1447  | --program-suf | --program-su | --program-s)
1448    ac_prev=program_suffix ;;
1449  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1450  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1451    program_suffix=$ac_optarg ;;
1452
1453  -program-transform-name | --program-transform-name \
1454  | --program-transform-nam | --program-transform-na \
1455  | --program-transform-n | --program-transform- \
1456  | --program-transform | --program-transfor \
1457  | --program-transfo | --program-transf \
1458  | --program-trans | --program-tran \
1459  | --progr-tra | --program-tr | --program-t)
1460    ac_prev=program_transform_name ;;
1461  -program-transform-name=* | --program-transform-name=* \
1462  | --program-transform-nam=* | --program-transform-na=* \
1463  | --program-transform-n=* | --program-transform-=* \
1464  | --program-transform=* | --program-transfor=* \
1465  | --program-transfo=* | --program-transf=* \
1466  | --program-trans=* | --program-tran=* \
1467  | --progr-tra=* | --program-tr=* | --program-t=*)
1468    program_transform_name=$ac_optarg ;;
1469
1470  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1471    ac_prev=pdfdir ;;
1472  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1473    pdfdir=$ac_optarg ;;
1474
1475  -psdir | --psdir | --psdi | --psd | --ps)
1476    ac_prev=psdir ;;
1477  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1478    psdir=$ac_optarg ;;
1479
1480  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1481  | -silent | --silent | --silen | --sile | --sil)
1482    silent=yes ;;
1483
1484  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1485    ac_prev=sbindir ;;
1486  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1487  | --sbi=* | --sb=*)
1488    sbindir=$ac_optarg ;;
1489
1490  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1491  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1492  | --sharedst | --shareds | --shared | --share | --shar \
1493  | --sha | --sh)
1494    ac_prev=sharedstatedir ;;
1495  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1496  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1497  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1498  | --sha=* | --sh=*)
1499    sharedstatedir=$ac_optarg ;;
1500
1501  -site | --site | --sit)
1502    ac_prev=site ;;
1503  -site=* | --site=* | --sit=*)
1504    site=$ac_optarg ;;
1505
1506  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1507    ac_prev=srcdir ;;
1508  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1509    srcdir=$ac_optarg ;;
1510
1511  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1512  | --syscon | --sysco | --sysc | --sys | --sy)
1513    ac_prev=sysconfdir ;;
1514  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1515  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1516    sysconfdir=$ac_optarg ;;
1517
1518  -target | --target | --targe | --targ | --tar | --ta | --t)
1519    ac_prev=target_alias ;;
1520  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1521    target_alias=$ac_optarg ;;
1522
1523  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1524    verbose=yes ;;
1525
1526  -version | --version | --versio | --versi | --vers | -V)
1527    ac_init_version=: ;;
1528
1529  -with-* | --with-*)
1530    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1531    # Reject names that are not valid shell variable names.
1532    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1533      as_fn_error $? "invalid package name: $ac_useropt"
1534    ac_useropt_orig=$ac_useropt
1535    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1536    case $ac_user_opts in
1537      *"
1538"with_$ac_useropt"
1539"*) ;;
1540      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1541	 ac_unrecognized_sep=', ';;
1542    esac
1543    eval with_$ac_useropt=\$ac_optarg ;;
1544
1545  -without-* | --without-*)
1546    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1547    # Reject names that are not valid shell variable names.
1548    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1549      as_fn_error $? "invalid package name: $ac_useropt"
1550    ac_useropt_orig=$ac_useropt
1551    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1552    case $ac_user_opts in
1553      *"
1554"with_$ac_useropt"
1555"*) ;;
1556      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1557	 ac_unrecognized_sep=', ';;
1558    esac
1559    eval with_$ac_useropt=no ;;
1560
1561  --x)
1562    # Obsolete; use --with-x.
1563    with_x=yes ;;
1564
1565  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1566  | --x-incl | --x-inc | --x-in | --x-i)
1567    ac_prev=x_includes ;;
1568  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1569  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1570    x_includes=$ac_optarg ;;
1571
1572  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1573  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1574    ac_prev=x_libraries ;;
1575  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1576  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1577    x_libraries=$ac_optarg ;;
1578
1579  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1580Try \`$0 --help' for more information"
1581    ;;
1582
1583  *=*)
1584    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1585    # Reject names that are not valid shell variable names.
1586    case $ac_envvar in #(
1587      '' | [0-9]* | *[!_$as_cr_alnum]* )
1588      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1589    esac
1590    eval $ac_envvar=\$ac_optarg
1591    export $ac_envvar ;;
1592
1593  *)
1594    # FIXME: should be removed in autoconf 3.0.
1595    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1596    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1597      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1598    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1599    ;;
1600
1601  esac
1602done
1603
1604if test -n "$ac_prev"; then
1605  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1606  as_fn_error $? "missing argument to $ac_option"
1607fi
1608
1609if test -n "$ac_unrecognized_opts"; then
1610  case $enable_option_checking in
1611    no) ;;
1612    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1613    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1614  esac
1615fi
1616
1617# Check all directory arguments for consistency.
1618for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1619		datadir sysconfdir sharedstatedir localstatedir includedir \
1620		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1621		libdir localedir mandir
1622do
1623  eval ac_val=\$$ac_var
1624  # Remove trailing slashes.
1625  case $ac_val in
1626    */ )
1627      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1628      eval $ac_var=\$ac_val;;
1629  esac
1630  # Be sure to have absolute directory names.
1631  case $ac_val in
1632    [\\/$]* | ?:[\\/]* )  continue;;
1633    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1634  esac
1635  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1636done
1637
1638# There might be people who depend on the old broken behavior: `$host'
1639# used to hold the argument of --host etc.
1640# FIXME: To remove some day.
1641build=$build_alias
1642host=$host_alias
1643target=$target_alias
1644
1645# FIXME: To remove some day.
1646if test "x$host_alias" != x; then
1647  if test "x$build_alias" = x; then
1648    cross_compiling=maybe
1649  elif test "x$build_alias" != "x$host_alias"; then
1650    cross_compiling=yes
1651  fi
1652fi
1653
1654ac_tool_prefix=
1655test -n "$host_alias" && ac_tool_prefix=$host_alias-
1656
1657test "$silent" = yes && exec 6>/dev/null
1658
1659
1660ac_pwd=`pwd` && test -n "$ac_pwd" &&
1661ac_ls_di=`ls -di .` &&
1662ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1663  as_fn_error $? "working directory cannot be determined"
1664test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1665  as_fn_error $? "pwd does not report name of working directory"
1666
1667
1668# Find the source files, if location was not specified.
1669if test -z "$srcdir"; then
1670  ac_srcdir_defaulted=yes
1671  # Try the directory containing this script, then the parent directory.
1672  ac_confdir=`$as_dirname -- "$as_myself" ||
1673$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1674	 X"$as_myself" : 'X\(//\)[^/]' \| \
1675	 X"$as_myself" : 'X\(//\)$' \| \
1676	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1677$as_echo X"$as_myself" |
1678    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1679	    s//\1/
1680	    q
1681	  }
1682	  /^X\(\/\/\)[^/].*/{
1683	    s//\1/
1684	    q
1685	  }
1686	  /^X\(\/\/\)$/{
1687	    s//\1/
1688	    q
1689	  }
1690	  /^X\(\/\).*/{
1691	    s//\1/
1692	    q
1693	  }
1694	  s/.*/./; q'`
1695  srcdir=$ac_confdir
1696  if test ! -r "$srcdir/$ac_unique_file"; then
1697    srcdir=..
1698  fi
1699else
1700  ac_srcdir_defaulted=no
1701fi
1702if test ! -r "$srcdir/$ac_unique_file"; then
1703  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1704  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1705fi
1706ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1707ac_abs_confdir=`(
1708	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1709	pwd)`
1710# When building in place, set srcdir=.
1711if test "$ac_abs_confdir" = "$ac_pwd"; then
1712  srcdir=.
1713fi
1714# Remove unnecessary trailing slashes from srcdir.
1715# Double slashes in file names in object file debugging info
1716# mess up M-x gdb in Emacs.
1717case $srcdir in
1718*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1719esac
1720for ac_var in $ac_precious_vars; do
1721  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1722  eval ac_env_${ac_var}_value=\$${ac_var}
1723  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1724  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1725done
1726
1727#
1728# Report the --help message.
1729#
1730if test "$ac_init_help" = "long"; then
1731  # Omit some internal or obsolete options to make the list less imposing.
1732  # This message is too long to be a string in the A/UX 3.1 sh.
1733  cat <<_ACEOF
1734\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1735
1736Usage: $0 [OPTION]... [VAR=VALUE]...
1737
1738To assign environment variables (e.g., CC, CFLAGS...), specify them as
1739VAR=VALUE.  See below for descriptions of some of the useful variables.
1740
1741Defaults for the options are specified in brackets.
1742
1743Configuration:
1744  -h, --help              display this help and exit
1745      --help=short        display options specific to this package
1746      --help=recursive    display the short help of all the included packages
1747  -V, --version           display version information and exit
1748  -q, --quiet, --silent   do not print \`checking ...' messages
1749      --cache-file=FILE   cache test results in FILE [disabled]
1750  -C, --config-cache      alias for \`--cache-file=config.cache'
1751  -n, --no-create         do not create output files
1752      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1753
1754Installation directories:
1755  --prefix=PREFIX         install architecture-independent files in PREFIX
1756                          [$ac_default_prefix]
1757  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1758                          [PREFIX]
1759
1760By default, \`make install' will install all the files in
1761\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1762an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1763for instance \`--prefix=\$HOME'.
1764
1765For better control, use the options below.
1766
1767Fine tuning of the installation directories:
1768  --bindir=DIR            user executables [EPREFIX/bin]
1769  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1770  --libexecdir=DIR        program executables [EPREFIX/libexec]
1771  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1772  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1773  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1774  --libdir=DIR            object code libraries [EPREFIX/lib]
1775  --includedir=DIR        C header files [PREFIX/include]
1776  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1777  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1778  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1779  --infodir=DIR           info documentation [DATAROOTDIR/info]
1780  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1781  --mandir=DIR            man documentation [DATAROOTDIR/man]
1782  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1783  --htmldir=DIR           html documentation [DOCDIR]
1784  --dvidir=DIR            dvi documentation [DOCDIR]
1785  --pdfdir=DIR            pdf documentation [DOCDIR]
1786  --psdir=DIR             ps documentation [DOCDIR]
1787_ACEOF
1788
1789  cat <<\_ACEOF
1790
1791X features:
1792  --x-includes=DIR    X include files are in DIR
1793  --x-libraries=DIR   X library files are in DIR
1794
1795System types:
1796  --build=BUILD     configure for building on BUILD [guessed]
1797  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1798  --target=TARGET   configure for building compilers for TARGET [HOST]
1799_ACEOF
1800fi
1801
1802if test -n "$ac_init_help"; then
1803  case $ac_init_help in
1804     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1805   esac
1806  cat <<\_ACEOF
1807
1808Optional Features:
1809  --disable-option-checking  ignore unrecognized --enable/--with options
1810  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1811  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1812  --enable-openjdk-only   suppress building custom source even if present
1813                          [disabled]
1814  --enable-debug          set the debug level to fastdebug (shorthand for
1815                          --with-debug-level=fastdebug) [disabled]
1816  --disable-headful       disable building headful support (graphical UI
1817                          support) [enabled]
1818  --enable-hotspot-test-in-build
1819                          run the Queens test after Hotspot build [disabled]
1820  --enable-unlimited-crypto
1821                          Enable unlimited crypto policy [disabled]
1822  --enable-rmiconnector-iiop
1823                          enable the JMX RMIConnector iiop transport
1824                          [disabled]
1825  --disable-debug-symbols disable generation of debug symbols [enabled]
1826  --disable-zip-debug-info
1827                          disable zipping of debug-info files [enabled]
1828  --enable-macosx-runtime-support
1829                          Deprecated. Option is kept for backwards
1830                          compatibility and is ignored
1831  --disable-freetype-bundling
1832                          disable bundling of the freetype library with the
1833                          build result [enabled on Windows or when using
1834                          --with-freetype, disabled otherwise]
1835  --enable-sjavac         use sjavac to do fast incremental compiles
1836                          [disabled]
1837  --disable-precompiled-headers
1838                          disable using precompiled headers when compiling C++
1839                          [enabled]
1840  --enable-ccache         enable using ccache to speed up recompilations
1841                          [disabled]
1842
1843Optional Packages:
1844  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1845  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1846  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1847                          support it), e.g. --with-target-bits=32 [guessed]
1848  --with-sys-root         pass this sys-root to the compilers and tools (for
1849                          cross-compiling)
1850  --with-tools-dir        search this directory for compilers and tools (for
1851                          cross-compiling)
1852  --with-devkit           use this directory as base for tools-dir and
1853                          sys-root (for cross-compiling)
1854  --with-custom-make-dir  Deprecated. Option is kept for backwards
1855                          compatibility and is ignored
1856  --with-jdk-variant      JDK variant to build (normal) [normal]
1857  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1858  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1859                          client, minimal1, kernel, zero, zeroshark, core)
1860                          [server]
1861  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1862                          [release]
1863  --with-conf-name        use this as the name of the configuration [generated
1864                          from important configuration options]
1865  --with-builddeps-conf   use this configuration file for the builddeps
1866  --with-builddeps-server download and use build dependencies from this server
1867                          url
1868  --with-builddeps-dir    store downloaded build dependencies here
1869                          [/localhome/builddeps]
1870  --with-builddeps-group  chgrp the downloaded build dependencies to this
1871                          group
1872  --with-cacerts-file     specify alternative cacerts file
1873  --with-milestone        Set milestone value for build [internal]
1874  --with-update-version   Set update version value for build [b00]
1875  --with-user-release-suffix
1876                          Add a custom string to the version string if build
1877                          number is not set.[username_builddateb00]
1878  --with-build-number     Set build number value for build [b00]
1879  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1880  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1881                          invocations of the Boot JDK, overriding the default
1882                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1883                          -enableassertions"
1884  --with-add-source-root  for each and every source directory, look in this
1885                          additional source root for the same directory; if it
1886                          exists and have files in it, include it in the build
1887  --with-override-source-root
1888                          for each and every source directory, look in this
1889                          override source root for the same directory; if it
1890                          exists, use that directory instead and ignore the
1891                          directory in the original source root
1892  --with-adds-and-overrides
1893                          use the subdirs 'adds' and 'overrides' in the
1894                          specified directory as add-source-root and
1895                          override-source-root
1896  --with-override-langtools
1897                          use this langtools dir for the build
1898  --with-override-corba   use this corba dir for the build
1899  --with-override-jaxp    use this jaxp dir for the build
1900  --with-override-jaxws   use this jaxws dir for the build
1901  --with-override-hotspot use this hotspot dir for the build
1902  --with-override-nashorn use this nashorn dir for the build
1903  --with-override-jdk     use this jdk dir for the build
1904  --with-import-hotspot   import hotspot binaries from this jdk image or
1905                          hotspot build dist dir instead of building from
1906                          source
1907  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1908                          to show possible values [platform dependent]
1909  --with-jtreg            Regression Test Harness [probed]
1910  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1911  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1912  --with-extra-ldflags    extra flags to be used when linking jdk
1913  --with-x                use the X Window System
1914  --with-cups             specify prefix directory for the cups package
1915                          (expecting the headers under PATH/include)
1916  --with-cups-include     specify directory for the cups include files
1917  --with-freetype         specify prefix directory for the freetype package
1918                          (expecting the libraries under PATH/lib and the
1919                          headers under PATH/include)
1920  --with-freetype-include specify directory for the freetype include files
1921  --with-freetype-lib     specify directory for the freetype library
1922  --with-alsa             specify prefix directory for the alsa package
1923                          (expecting the libraries under PATH/lib and the
1924                          headers under PATH/include)
1925  --with-alsa-include     specify directory for the alsa include files
1926  --with-alsa-lib         specify directory for the alsa library
1927  --with-giflib           use giflib from build system or OpenJDK source
1928                          (system, bundled) [bundled]
1929  --with-libpng           use libpng from build system or OpenJDK source
1930                          (system, bundled) [bundled]
1931  --with-zlib             use zlib from build system or OpenJDK source
1932                          (system, bundled) [bundled]
1933  --with-stdc++lib=<static>,<dynamic>,<default>
1934                          force linking of the C++ runtime on Linux to either
1935                          static or dynamic, default is static with dynamic as
1936                          fallback
1937  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1938                          only) [probed]
1939  --with-dxsdk            Deprecated. Option is kept for backwards
1940                          compatibility and is ignored
1941  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1942                          compatibility and is ignored
1943  --with-dxsdk-include    Deprecated. Option is kept for backwards
1944                          compatibility and is ignored
1945  --with-num-cores        number of cores in the build system, e.g.
1946                          --with-num-cores=8 [probed]
1947  --with-memory-size      memory (in MB) available in the build system, e.g.
1948                          --with-memory-size=1024 [probed]
1949  --with-jobs             number of parallel jobs to let make run [calculated
1950                          based on cores and memory]
1951  --with-sjavac-server-java
1952                          use this java binary for running the sjavac
1953                          background server [Boot JDK java]
1954  --with-ccache-dir       where to store ccache files [~/.ccache]
1955
1956Some influential environment variables:
1957  BASENAME    Override default value for BASENAME
1958  BASH        Override default value for BASH
1959  CAT         Override default value for CAT
1960  CHMOD       Override default value for CHMOD
1961  CMP         Override default value for CMP
1962  COMM        Override default value for COMM
1963  CP          Override default value for CP
1964  CPIO        Override default value for CPIO
1965  CUT         Override default value for CUT
1966  DATE        Override default value for DATE
1967  DIFF        Override default value for DIFF
1968  DIRNAME     Override default value for DIRNAME
1969  ECHO        Override default value for ECHO
1970  EXPR        Override default value for EXPR
1971  FILE        Override default value for FILE
1972  FIND        Override default value for FIND
1973  HEAD        Override default value for HEAD
1974  LN          Override default value for LN
1975  LS          Override default value for LS
1976  MKDIR       Override default value for MKDIR
1977  MKTEMP      Override default value for MKTEMP
1978  MV          Override default value for MV
1979  NAWK        Override default value for NAWK
1980  PRINTF      Override default value for PRINTF
1981  RM          Override default value for RM
1982  SH          Override default value for SH
1983  SORT        Override default value for SORT
1984  TAIL        Override default value for TAIL
1985  TAR         Override default value for TAR
1986  TEE         Override default value for TEE
1987  TOUCH       Override default value for TOUCH
1988  TR          Override default value for TR
1989  UNAME       Override default value for UNAME
1990  UNIQ        Override default value for UNIQ
1991  WC          Override default value for WC
1992  WHICH       Override default value for WHICH
1993  XARGS       Override default value for XARGS
1994  AWK         Override default value for AWK
1995  GREP        Override default value for GREP
1996  EGREP       Override default value for EGREP
1997  FGREP       Override default value for FGREP
1998  SED         Override default value for SED
1999  CYGPATH     Override default value for CYGPATH
2000  READLINK    Override default value for READLINK
2001  DF          Override default value for DF
2002  SETFILE     Override default value for SETFILE
2003  UNZIP       Override default value for UNZIP
2004  ZIP         Override default value for ZIP
2005  LDD         Override default value for LDD
2006  OTOOL       Override default value for OTOOL
2007  READELF     Override default value for READELF
2008  HG          Override default value for HG
2009  STAT        Override default value for STAT
2010  TIME        Override default value for TIME
2011  DSYMUTIL    Override default value for DSYMUTIL
2012  XATTR       Override default value for XATTR
2013  CODESIGN    Override default value for CODESIGN
2014  PKG_CONFIG  path to pkg-config utility
2015  JAVA        Override default value for JAVA
2016  JAVAC       Override default value for JAVAC
2017  JAVAH       Override default value for JAVAH
2018  JAR         Override default value for JAR
2019  NATIVE2ASCII
2020              Override default value for NATIVE2ASCII
2021  JARSIGNER   Override default value for JARSIGNER
2022  CC          C compiler command
2023  CFLAGS      C compiler flags
2024  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2025              nonstandard directory <lib dir>
2026  LIBS        libraries to pass to the linker, e.g. -l<library>
2027  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2028              you have headers in a nonstandard directory <include dir>
2029  CXX         C++ compiler command
2030  CXXFLAGS    C++ compiler flags
2031  CPP         C preprocessor
2032  CXXCPP      C++ preprocessor
2033  AS          Override default value for AS
2034  AR          Override default value for AR
2035  OBJC        Objective C compiler command
2036  OBJCFLAGS   Objective C compiler flags
2037  LIPO        Override default value for LIPO
2038  STRIP       Override default value for STRIP
2039  NM          Override default value for NM
2040  GNM         Override default value for GNM
2041  MCS         Override default value for MCS
2042  OBJCOPY     Override default value for OBJCOPY
2043  OBJDUMP     Override default value for OBJDUMP
2044  BUILD_CC    Override default value for BUILD_CC
2045  BUILD_CXX   Override default value for BUILD_CXX
2046  BUILD_LD    Override default value for BUILD_LD
2047  JTREGEXE    Override default value for JTREGEXE
2048  XMKMF       Path to xmkmf, Makefile generator for X Window System
2049  FREETYPE_CFLAGS
2050              C compiler flags for FREETYPE, overriding pkg-config
2051  FREETYPE_LIBS
2052              linker flags for FREETYPE, overriding pkg-config
2053  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2054  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2055  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2056  PNG_LIBS    linker flags for PNG, overriding pkg-config
2057  LIBFFI_CFLAGS
2058              C compiler flags for LIBFFI, overriding pkg-config
2059  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2060  CCACHE      Override default value for CCACHE
2061
2062Use these variables to override the choices made by `configure' or to help
2063it to find libraries and programs with nonstandard names/locations.
2064
2065Report bugs to <build-dev@openjdk.java.net>.
2066OpenJDK home page: <http://openjdk.java.net>.
2067_ACEOF
2068ac_status=$?
2069fi
2070
2071if test "$ac_init_help" = "recursive"; then
2072  # If there are subdirs, report their specific --help.
2073  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2074    test -d "$ac_dir" ||
2075      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2076      continue
2077    ac_builddir=.
2078
2079case "$ac_dir" in
2080.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2081*)
2082  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2083  # A ".." for each directory in $ac_dir_suffix.
2084  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2085  case $ac_top_builddir_sub in
2086  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2087  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2088  esac ;;
2089esac
2090ac_abs_top_builddir=$ac_pwd
2091ac_abs_builddir=$ac_pwd$ac_dir_suffix
2092# for backward compatibility:
2093ac_top_builddir=$ac_top_build_prefix
2094
2095case $srcdir in
2096  .)  # We are building in place.
2097    ac_srcdir=.
2098    ac_top_srcdir=$ac_top_builddir_sub
2099    ac_abs_top_srcdir=$ac_pwd ;;
2100  [\\/]* | ?:[\\/]* )  # Absolute name.
2101    ac_srcdir=$srcdir$ac_dir_suffix;
2102    ac_top_srcdir=$srcdir
2103    ac_abs_top_srcdir=$srcdir ;;
2104  *) # Relative name.
2105    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2106    ac_top_srcdir=$ac_top_build_prefix$srcdir
2107    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2108esac
2109ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2110
2111    cd "$ac_dir" || { ac_status=$?; continue; }
2112    # Check for guested configure.
2113    if test -f "$ac_srcdir/configure.gnu"; then
2114      echo &&
2115      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2116    elif test -f "$ac_srcdir/configure"; then
2117      echo &&
2118      $SHELL "$ac_srcdir/configure" --help=recursive
2119    else
2120      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2121    fi || ac_status=$?
2122    cd "$ac_pwd" || { ac_status=$?; break; }
2123  done
2124fi
2125
2126test -n "$ac_init_help" && exit $ac_status
2127if $ac_init_version; then
2128  cat <<\_ACEOF
2129OpenJDK configure jdk8
2130generated by GNU Autoconf 2.69
2131
2132Copyright (C) 2012 Free Software Foundation, Inc.
2133This configure script is free software; the Free Software Foundation
2134gives unlimited permission to copy, distribute and modify it.
2135_ACEOF
2136  exit
2137fi
2138
2139## ------------------------ ##
2140## Autoconf initialization. ##
2141## ------------------------ ##
2142
2143# ac_fn_c_try_compile LINENO
2144# --------------------------
2145# Try to compile conftest.$ac_ext, and return whether this succeeded.
2146ac_fn_c_try_compile ()
2147{
2148  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2149  rm -f conftest.$ac_objext
2150  if { { ac_try="$ac_compile"
2151case "(($ac_try" in
2152  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2153  *) ac_try_echo=$ac_try;;
2154esac
2155eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2156$as_echo "$ac_try_echo"; } >&5
2157  (eval "$ac_compile") 2>conftest.err
2158  ac_status=$?
2159  if test -s conftest.err; then
2160    grep -v '^ *+' conftest.err >conftest.er1
2161    cat conftest.er1 >&5
2162    mv -f conftest.er1 conftest.err
2163  fi
2164  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2165  test $ac_status = 0; } && {
2166	 test -z "$ac_c_werror_flag" ||
2167	 test ! -s conftest.err
2168       } && test -s conftest.$ac_objext; then :
2169  ac_retval=0
2170else
2171  $as_echo "$as_me: failed program was:" >&5
2172sed 's/^/| /' conftest.$ac_ext >&5
2173
2174	ac_retval=1
2175fi
2176  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2177  as_fn_set_status $ac_retval
2178
2179} # ac_fn_c_try_compile
2180
2181# ac_fn_cxx_try_compile LINENO
2182# ----------------------------
2183# Try to compile conftest.$ac_ext, and return whether this succeeded.
2184ac_fn_cxx_try_compile ()
2185{
2186  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2187  rm -f conftest.$ac_objext
2188  if { { ac_try="$ac_compile"
2189case "(($ac_try" in
2190  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2191  *) ac_try_echo=$ac_try;;
2192esac
2193eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2194$as_echo "$ac_try_echo"; } >&5
2195  (eval "$ac_compile") 2>conftest.err
2196  ac_status=$?
2197  if test -s conftest.err; then
2198    grep -v '^ *+' conftest.err >conftest.er1
2199    cat conftest.er1 >&5
2200    mv -f conftest.er1 conftest.err
2201  fi
2202  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2203  test $ac_status = 0; } && {
2204	 test -z "$ac_cxx_werror_flag" ||
2205	 test ! -s conftest.err
2206       } && test -s conftest.$ac_objext; then :
2207  ac_retval=0
2208else
2209  $as_echo "$as_me: failed program was:" >&5
2210sed 's/^/| /' conftest.$ac_ext >&5
2211
2212	ac_retval=1
2213fi
2214  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2215  as_fn_set_status $ac_retval
2216
2217} # ac_fn_cxx_try_compile
2218
2219# ac_fn_c_try_cpp LINENO
2220# ----------------------
2221# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2222ac_fn_c_try_cpp ()
2223{
2224  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2225  if { { ac_try="$ac_cpp conftest.$ac_ext"
2226case "(($ac_try" in
2227  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2228  *) ac_try_echo=$ac_try;;
2229esac
2230eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2231$as_echo "$ac_try_echo"; } >&5
2232  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2233  ac_status=$?
2234  if test -s conftest.err; then
2235    grep -v '^ *+' conftest.err >conftest.er1
2236    cat conftest.er1 >&5
2237    mv -f conftest.er1 conftest.err
2238  fi
2239  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2240  test $ac_status = 0; } > conftest.i && {
2241	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2242	 test ! -s conftest.err
2243       }; then :
2244  ac_retval=0
2245else
2246  $as_echo "$as_me: failed program was:" >&5
2247sed 's/^/| /' conftest.$ac_ext >&5
2248
2249    ac_retval=1
2250fi
2251  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2252  as_fn_set_status $ac_retval
2253
2254} # ac_fn_c_try_cpp
2255
2256# ac_fn_cxx_try_cpp LINENO
2257# ------------------------
2258# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2259ac_fn_cxx_try_cpp ()
2260{
2261  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2262  if { { ac_try="$ac_cpp conftest.$ac_ext"
2263case "(($ac_try" in
2264  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2265  *) ac_try_echo=$ac_try;;
2266esac
2267eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2268$as_echo "$ac_try_echo"; } >&5
2269  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2270  ac_status=$?
2271  if test -s conftest.err; then
2272    grep -v '^ *+' conftest.err >conftest.er1
2273    cat conftest.er1 >&5
2274    mv -f conftest.er1 conftest.err
2275  fi
2276  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2277  test $ac_status = 0; } > conftest.i && {
2278	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2279	 test ! -s conftest.err
2280       }; then :
2281  ac_retval=0
2282else
2283  $as_echo "$as_me: failed program was:" >&5
2284sed 's/^/| /' conftest.$ac_ext >&5
2285
2286    ac_retval=1
2287fi
2288  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2289  as_fn_set_status $ac_retval
2290
2291} # ac_fn_cxx_try_cpp
2292
2293# ac_fn_objc_try_compile LINENO
2294# -----------------------------
2295# Try to compile conftest.$ac_ext, and return whether this succeeded.
2296ac_fn_objc_try_compile ()
2297{
2298  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2299  rm -f conftest.$ac_objext
2300  if { { ac_try="$ac_compile"
2301case "(($ac_try" in
2302  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2303  *) ac_try_echo=$ac_try;;
2304esac
2305eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2306$as_echo "$ac_try_echo"; } >&5
2307  (eval "$ac_compile") 2>conftest.err
2308  ac_status=$?
2309  if test -s conftest.err; then
2310    grep -v '^ *+' conftest.err >conftest.er1
2311    cat conftest.er1 >&5
2312    mv -f conftest.er1 conftest.err
2313  fi
2314  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2315  test $ac_status = 0; } && {
2316	 test -z "$ac_objc_werror_flag" ||
2317	 test ! -s conftest.err
2318       } && test -s conftest.$ac_objext; then :
2319  ac_retval=0
2320else
2321  $as_echo "$as_me: failed program was:" >&5
2322sed 's/^/| /' conftest.$ac_ext >&5
2323
2324	ac_retval=1
2325fi
2326  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2327  as_fn_set_status $ac_retval
2328
2329} # ac_fn_objc_try_compile
2330
2331# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2332# ---------------------------------------------------------
2333# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2334# the include files in INCLUDES and setting the cache variable VAR
2335# accordingly.
2336ac_fn_cxx_check_header_mongrel ()
2337{
2338  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2339  if eval \${$3+:} false; then :
2340  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2341$as_echo_n "checking for $2... " >&6; }
2342if eval \${$3+:} false; then :
2343  $as_echo_n "(cached) " >&6
2344fi
2345eval ac_res=\$$3
2346	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2347$as_echo "$ac_res" >&6; }
2348else
2349  # Is the header compilable?
2350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2351$as_echo_n "checking $2 usability... " >&6; }
2352cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2353/* end confdefs.h.  */
2354$4
2355#include <$2>
2356_ACEOF
2357if ac_fn_cxx_try_compile "$LINENO"; then :
2358  ac_header_compiler=yes
2359else
2360  ac_header_compiler=no
2361fi
2362rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2364$as_echo "$ac_header_compiler" >&6; }
2365
2366# Is the header present?
2367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2368$as_echo_n "checking $2 presence... " >&6; }
2369cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2370/* end confdefs.h.  */
2371#include <$2>
2372_ACEOF
2373if ac_fn_cxx_try_cpp "$LINENO"; then :
2374  ac_header_preproc=yes
2375else
2376  ac_header_preproc=no
2377fi
2378rm -f conftest.err conftest.i conftest.$ac_ext
2379{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2380$as_echo "$ac_header_preproc" >&6; }
2381
2382# So?  What about this header?
2383case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2384  yes:no: )
2385    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2386$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2388$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2389    ;;
2390  no:yes:* )
2391    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2392$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2394$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2395    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2396$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2397    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2398$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2399    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2400$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2401( $as_echo "## ----------------------------------------- ##
2402## Report this to build-dev@openjdk.java.net ##
2403## ----------------------------------------- ##"
2404     ) | sed "s/^/$as_me: WARNING:     /" >&2
2405    ;;
2406esac
2407  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2408$as_echo_n "checking for $2... " >&6; }
2409if eval \${$3+:} false; then :
2410  $as_echo_n "(cached) " >&6
2411else
2412  eval "$3=\$ac_header_compiler"
2413fi
2414eval ac_res=\$$3
2415	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2416$as_echo "$ac_res" >&6; }
2417fi
2418  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2419
2420} # ac_fn_cxx_check_header_mongrel
2421
2422# ac_fn_cxx_try_run LINENO
2423# ------------------------
2424# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2425# that executables *can* be run.
2426ac_fn_cxx_try_run ()
2427{
2428  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2429  if { { ac_try="$ac_link"
2430case "(($ac_try" in
2431  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2432  *) ac_try_echo=$ac_try;;
2433esac
2434eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2435$as_echo "$ac_try_echo"; } >&5
2436  (eval "$ac_link") 2>&5
2437  ac_status=$?
2438  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2439  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2440  { { case "(($ac_try" in
2441  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2442  *) ac_try_echo=$ac_try;;
2443esac
2444eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2445$as_echo "$ac_try_echo"; } >&5
2446  (eval "$ac_try") 2>&5
2447  ac_status=$?
2448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449  test $ac_status = 0; }; }; then :
2450  ac_retval=0
2451else
2452  $as_echo "$as_me: program exited with status $ac_status" >&5
2453       $as_echo "$as_me: failed program was:" >&5
2454sed 's/^/| /' conftest.$ac_ext >&5
2455
2456       ac_retval=$ac_status
2457fi
2458  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2459  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2460  as_fn_set_status $ac_retval
2461
2462} # ac_fn_cxx_try_run
2463
2464# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2465# ---------------------------------------------------------
2466# Tests whether HEADER exists and can be compiled using the include files in
2467# INCLUDES, setting the cache variable VAR accordingly.
2468ac_fn_cxx_check_header_compile ()
2469{
2470  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2472$as_echo_n "checking for $2... " >&6; }
2473if eval \${$3+:} false; then :
2474  $as_echo_n "(cached) " >&6
2475else
2476  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2477/* end confdefs.h.  */
2478$4
2479#include <$2>
2480_ACEOF
2481if ac_fn_cxx_try_compile "$LINENO"; then :
2482  eval "$3=yes"
2483else
2484  eval "$3=no"
2485fi
2486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2487fi
2488eval ac_res=\$$3
2489	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2490$as_echo "$ac_res" >&6; }
2491  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2492
2493} # ac_fn_cxx_check_header_compile
2494
2495# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2496# ----------------------------------------------
2497# Tries to find the compile-time value of EXPR in a program that includes
2498# INCLUDES, setting VAR accordingly. Returns whether the value could be
2499# computed
2500ac_fn_cxx_compute_int ()
2501{
2502  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2503  if test "$cross_compiling" = yes; then
2504    # Depending upon the size, compute the lo and hi bounds.
2505cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2506/* end confdefs.h.  */
2507$4
2508int
2509main ()
2510{
2511static int test_array [1 - 2 * !(($2) >= 0)];
2512test_array [0] = 0;
2513return test_array [0];
2514
2515  ;
2516  return 0;
2517}
2518_ACEOF
2519if ac_fn_cxx_try_compile "$LINENO"; then :
2520  ac_lo=0 ac_mid=0
2521  while :; do
2522    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2523/* end confdefs.h.  */
2524$4
2525int
2526main ()
2527{
2528static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2529test_array [0] = 0;
2530return test_array [0];
2531
2532  ;
2533  return 0;
2534}
2535_ACEOF
2536if ac_fn_cxx_try_compile "$LINENO"; then :
2537  ac_hi=$ac_mid; break
2538else
2539  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2540			if test $ac_lo -le $ac_mid; then
2541			  ac_lo= ac_hi=
2542			  break
2543			fi
2544			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2545fi
2546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2547  done
2548else
2549  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2550/* end confdefs.h.  */
2551$4
2552int
2553main ()
2554{
2555static int test_array [1 - 2 * !(($2) < 0)];
2556test_array [0] = 0;
2557return test_array [0];
2558
2559  ;
2560  return 0;
2561}
2562_ACEOF
2563if ac_fn_cxx_try_compile "$LINENO"; then :
2564  ac_hi=-1 ac_mid=-1
2565  while :; do
2566    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2567/* end confdefs.h.  */
2568$4
2569int
2570main ()
2571{
2572static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2573test_array [0] = 0;
2574return test_array [0];
2575
2576  ;
2577  return 0;
2578}
2579_ACEOF
2580if ac_fn_cxx_try_compile "$LINENO"; then :
2581  ac_lo=$ac_mid; break
2582else
2583  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2584			if test $ac_mid -le $ac_hi; then
2585			  ac_lo= ac_hi=
2586			  break
2587			fi
2588			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2589fi
2590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2591  done
2592else
2593  ac_lo= ac_hi=
2594fi
2595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2596fi
2597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2598# Binary search between lo and hi bounds.
2599while test "x$ac_lo" != "x$ac_hi"; do
2600  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2601  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2602/* end confdefs.h.  */
2603$4
2604int
2605main ()
2606{
2607static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2608test_array [0] = 0;
2609return test_array [0];
2610
2611  ;
2612  return 0;
2613}
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_hi=$ac_mid
2617else
2618  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621done
2622case $ac_lo in #((
2623?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2624'') ac_retval=1 ;;
2625esac
2626  else
2627    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629$4
2630static long int longval () { return $2; }
2631static unsigned long int ulongval () { return $2; }
2632#include <stdio.h>
2633#include <stdlib.h>
2634int
2635main ()
2636{
2637
2638  FILE *f = fopen ("conftest.val", "w");
2639  if (! f)
2640    return 1;
2641  if (($2) < 0)
2642    {
2643      long int i = longval ();
2644      if (i != ($2))
2645	return 1;
2646      fprintf (f, "%ld", i);
2647    }
2648  else
2649    {
2650      unsigned long int i = ulongval ();
2651      if (i != ($2))
2652	return 1;
2653      fprintf (f, "%lu", i);
2654    }
2655  /* Do not output a trailing newline, as this causes \r\n confusion
2656     on some platforms.  */
2657  return ferror (f) || fclose (f) != 0;
2658
2659  ;
2660  return 0;
2661}
2662_ACEOF
2663if ac_fn_cxx_try_run "$LINENO"; then :
2664  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2665else
2666  ac_retval=1
2667fi
2668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2669  conftest.$ac_objext conftest.beam conftest.$ac_ext
2670rm -f conftest.val
2671
2672  fi
2673  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2674  as_fn_set_status $ac_retval
2675
2676} # ac_fn_cxx_compute_int
2677
2678# ac_fn_cxx_try_link LINENO
2679# -------------------------
2680# Try to link conftest.$ac_ext, and return whether this succeeded.
2681ac_fn_cxx_try_link ()
2682{
2683  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2684  rm -f conftest.$ac_objext conftest$ac_exeext
2685  if { { ac_try="$ac_link"
2686case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_link") 2>conftest.err
2693  ac_status=$?
2694  if test -s conftest.err; then
2695    grep -v '^ *+' conftest.err >conftest.er1
2696    cat conftest.er1 >&5
2697    mv -f conftest.er1 conftest.err
2698  fi
2699  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2700  test $ac_status = 0; } && {
2701	 test -z "$ac_cxx_werror_flag" ||
2702	 test ! -s conftest.err
2703       } && test -s conftest$ac_exeext && {
2704	 test "$cross_compiling" = yes ||
2705	 test -x conftest$ac_exeext
2706       }; then :
2707  ac_retval=0
2708else
2709  $as_echo "$as_me: failed program was:" >&5
2710sed 's/^/| /' conftest.$ac_ext >&5
2711
2712	ac_retval=1
2713fi
2714  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2715  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2716  # interfere with the next link command; also delete a directory that is
2717  # left behind by Apple's compiler.  We do this before executing the actions.
2718  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2719  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2720  as_fn_set_status $ac_retval
2721
2722} # ac_fn_cxx_try_link
2723
2724# ac_fn_cxx_check_func LINENO FUNC VAR
2725# ------------------------------------
2726# Tests whether FUNC exists, setting the cache variable VAR accordingly
2727ac_fn_cxx_check_func ()
2728{
2729  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2730  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2731$as_echo_n "checking for $2... " >&6; }
2732if eval \${$3+:} false; then :
2733  $as_echo_n "(cached) " >&6
2734else
2735  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2736/* end confdefs.h.  */
2737/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2738   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2739#define $2 innocuous_$2
2740
2741/* System header to define __stub macros and hopefully few prototypes,
2742    which can conflict with char $2 (); below.
2743    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2744    <limits.h> exists even on freestanding compilers.  */
2745
2746#ifdef __STDC__
2747# include <limits.h>
2748#else
2749# include <assert.h>
2750#endif
2751
2752#undef $2
2753
2754/* Override any GCC internal prototype to avoid an error.
2755   Use char because int might match the return type of a GCC
2756   builtin and then its argument prototype would still apply.  */
2757#ifdef __cplusplus
2758extern "C"
2759#endif
2760char $2 ();
2761/* The GNU C library defines this for functions which it implements
2762    to always fail with ENOSYS.  Some functions are actually named
2763    something starting with __ and the normal name is an alias.  */
2764#if defined __stub_$2 || defined __stub___$2
2765choke me
2766#endif
2767
2768int
2769main ()
2770{
2771return $2 ();
2772  ;
2773  return 0;
2774}
2775_ACEOF
2776if ac_fn_cxx_try_link "$LINENO"; then :
2777  eval "$3=yes"
2778else
2779  eval "$3=no"
2780fi
2781rm -f core conftest.err conftest.$ac_objext \
2782    conftest$ac_exeext conftest.$ac_ext
2783fi
2784eval ac_res=\$$3
2785	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2786$as_echo "$ac_res" >&6; }
2787  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2788
2789} # ac_fn_cxx_check_func
2790
2791# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2792# -------------------------------------------------------
2793# Tests whether HEADER exists and can be compiled using the include files in
2794# INCLUDES, setting the cache variable VAR accordingly.
2795ac_fn_c_check_header_compile ()
2796{
2797  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2799$as_echo_n "checking for $2... " >&6; }
2800if eval \${$3+:} false; then :
2801  $as_echo_n "(cached) " >&6
2802else
2803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804/* end confdefs.h.  */
2805$4
2806#include <$2>
2807_ACEOF
2808if ac_fn_c_try_compile "$LINENO"; then :
2809  eval "$3=yes"
2810else
2811  eval "$3=no"
2812fi
2813rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2814fi
2815eval ac_res=\$$3
2816	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2817$as_echo "$ac_res" >&6; }
2818  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2819
2820} # ac_fn_c_check_header_compile
2821cat >config.log <<_ACEOF
2822This file contains any messages produced by compilers while
2823running configure, to aid debugging if configure makes a mistake.
2824
2825It was created by OpenJDK $as_me jdk8, which was
2826generated by GNU Autoconf 2.69.  Invocation command line was
2827
2828  $ $0 $@
2829
2830_ACEOF
2831exec 5>>config.log
2832{
2833cat <<_ASUNAME
2834## --------- ##
2835## Platform. ##
2836## --------- ##
2837
2838hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2839uname -m = `(uname -m) 2>/dev/null || echo unknown`
2840uname -r = `(uname -r) 2>/dev/null || echo unknown`
2841uname -s = `(uname -s) 2>/dev/null || echo unknown`
2842uname -v = `(uname -v) 2>/dev/null || echo unknown`
2843
2844/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2845/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2846
2847/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2848/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2849/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2850/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2851/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2852/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2853/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2854
2855_ASUNAME
2856
2857as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2858for as_dir in $PATH
2859do
2860  IFS=$as_save_IFS
2861  test -z "$as_dir" && as_dir=.
2862    $as_echo "PATH: $as_dir"
2863  done
2864IFS=$as_save_IFS
2865
2866} >&5
2867
2868cat >&5 <<_ACEOF
2869
2870
2871## ----------- ##
2872## Core tests. ##
2873## ----------- ##
2874
2875_ACEOF
2876
2877
2878# Keep a trace of the command line.
2879# Strip out --no-create and --no-recursion so they do not pile up.
2880# Strip out --silent because we don't want to record it for future runs.
2881# Also quote any args containing shell meta-characters.
2882# Make two passes to allow for proper duplicate-argument suppression.
2883ac_configure_args=
2884ac_configure_args0=
2885ac_configure_args1=
2886ac_must_keep_next=false
2887for ac_pass in 1 2
2888do
2889  for ac_arg
2890  do
2891    case $ac_arg in
2892    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2893    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2894    | -silent | --silent | --silen | --sile | --sil)
2895      continue ;;
2896    *\'*)
2897      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2898    esac
2899    case $ac_pass in
2900    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2901    2)
2902      as_fn_append ac_configure_args1 " '$ac_arg'"
2903      if test $ac_must_keep_next = true; then
2904	ac_must_keep_next=false # Got value, back to normal.
2905      else
2906	case $ac_arg in
2907	  *=* | --config-cache | -C | -disable-* | --disable-* \
2908	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2909	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2910	  | -with-* | --with-* | -without-* | --without-* | --x)
2911	    case "$ac_configure_args0 " in
2912	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2913	    esac
2914	    ;;
2915	  -* ) ac_must_keep_next=true ;;
2916	esac
2917      fi
2918      as_fn_append ac_configure_args " '$ac_arg'"
2919      ;;
2920    esac
2921  done
2922done
2923{ ac_configure_args0=; unset ac_configure_args0;}
2924{ ac_configure_args1=; unset ac_configure_args1;}
2925
2926# When interrupted or exit'd, cleanup temporary files, and complete
2927# config.log.  We remove comments because anyway the quotes in there
2928# would cause problems or look ugly.
2929# WARNING: Use '\'' to represent an apostrophe within the trap.
2930# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2931trap 'exit_status=$?
2932  # Save into config.log some information that might help in debugging.
2933  {
2934    echo
2935
2936    $as_echo "## ---------------- ##
2937## Cache variables. ##
2938## ---------------- ##"
2939    echo
2940    # The following way of writing the cache mishandles newlines in values,
2941(
2942  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2943    eval ac_val=\$$ac_var
2944    case $ac_val in #(
2945    *${as_nl}*)
2946      case $ac_var in #(
2947      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2948$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2949      esac
2950      case $ac_var in #(
2951      _ | IFS | as_nl) ;; #(
2952      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2953      *) { eval $ac_var=; unset $ac_var;} ;;
2954      esac ;;
2955    esac
2956  done
2957  (set) 2>&1 |
2958    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2959    *${as_nl}ac_space=\ *)
2960      sed -n \
2961	"s/'\''/'\''\\\\'\'''\''/g;
2962	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2963      ;; #(
2964    *)
2965      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2966      ;;
2967    esac |
2968    sort
2969)
2970    echo
2971
2972    $as_echo "## ----------------- ##
2973## Output variables. ##
2974## ----------------- ##"
2975    echo
2976    for ac_var in $ac_subst_vars
2977    do
2978      eval ac_val=\$$ac_var
2979      case $ac_val in
2980      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2981      esac
2982      $as_echo "$ac_var='\''$ac_val'\''"
2983    done | sort
2984    echo
2985
2986    if test -n "$ac_subst_files"; then
2987      $as_echo "## ------------------- ##
2988## File substitutions. ##
2989## ------------------- ##"
2990      echo
2991      for ac_var in $ac_subst_files
2992      do
2993	eval ac_val=\$$ac_var
2994	case $ac_val in
2995	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2996	esac
2997	$as_echo "$ac_var='\''$ac_val'\''"
2998      done | sort
2999      echo
3000    fi
3001
3002    if test -s confdefs.h; then
3003      $as_echo "## ----------- ##
3004## confdefs.h. ##
3005## ----------- ##"
3006      echo
3007      cat confdefs.h
3008      echo
3009    fi
3010    test "$ac_signal" != 0 &&
3011      $as_echo "$as_me: caught signal $ac_signal"
3012    $as_echo "$as_me: exit $exit_status"
3013  } >&5
3014  rm -f core *.core core.conftest.* &&
3015    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3016    exit $exit_status
3017' 0
3018for ac_signal in 1 2 13 15; do
3019  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3020done
3021ac_signal=0
3022
3023# confdefs.h avoids OS command line length limits that DEFS can exceed.
3024rm -f -r conftest* confdefs.h
3025
3026$as_echo "/* confdefs.h */" > confdefs.h
3027
3028# Predefined preprocessor variables.
3029
3030cat >>confdefs.h <<_ACEOF
3031#define PACKAGE_NAME "$PACKAGE_NAME"
3032_ACEOF
3033
3034cat >>confdefs.h <<_ACEOF
3035#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3036_ACEOF
3037
3038cat >>confdefs.h <<_ACEOF
3039#define PACKAGE_VERSION "$PACKAGE_VERSION"
3040_ACEOF
3041
3042cat >>confdefs.h <<_ACEOF
3043#define PACKAGE_STRING "$PACKAGE_STRING"
3044_ACEOF
3045
3046cat >>confdefs.h <<_ACEOF
3047#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3048_ACEOF
3049
3050cat >>confdefs.h <<_ACEOF
3051#define PACKAGE_URL "$PACKAGE_URL"
3052_ACEOF
3053
3054
3055# Let the site file select an alternate cache file if it wants to.
3056# Prefer an explicitly selected file to automatically selected ones.
3057ac_site_file1=NONE
3058ac_site_file2=NONE
3059if test -n "$CONFIG_SITE"; then
3060  # We do not want a PATH search for config.site.
3061  case $CONFIG_SITE in #((
3062    -*)  ac_site_file1=./$CONFIG_SITE;;
3063    */*) ac_site_file1=$CONFIG_SITE;;
3064    *)   ac_site_file1=./$CONFIG_SITE;;
3065  esac
3066elif test "x$prefix" != xNONE; then
3067  ac_site_file1=$prefix/share/config.site
3068  ac_site_file2=$prefix/etc/config.site
3069else
3070  ac_site_file1=$ac_default_prefix/share/config.site
3071  ac_site_file2=$ac_default_prefix/etc/config.site
3072fi
3073for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3074do
3075  test "x$ac_site_file" = xNONE && continue
3076  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3077    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3078$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3079    sed 's/^/| /' "$ac_site_file" >&5
3080    . "$ac_site_file" \
3081      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3082$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3083as_fn_error $? "failed to load site script $ac_site_file
3084See \`config.log' for more details" "$LINENO" 5; }
3085  fi
3086done
3087
3088if test -r "$cache_file"; then
3089  # Some versions of bash will fail to source /dev/null (special files
3090  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3091  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3092    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3093$as_echo "$as_me: loading cache $cache_file" >&6;}
3094    case $cache_file in
3095      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3096      *)                      . "./$cache_file";;
3097    esac
3098  fi
3099else
3100  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3101$as_echo "$as_me: creating cache $cache_file" >&6;}
3102  >$cache_file
3103fi
3104
3105# Check that the precious variables saved in the cache have kept the same
3106# value.
3107ac_cache_corrupted=false
3108for ac_var in $ac_precious_vars; do
3109  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3110  eval ac_new_set=\$ac_env_${ac_var}_set
3111  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3112  eval ac_new_val=\$ac_env_${ac_var}_value
3113  case $ac_old_set,$ac_new_set in
3114    set,)
3115      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3116$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3117      ac_cache_corrupted=: ;;
3118    ,set)
3119      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3120$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3121      ac_cache_corrupted=: ;;
3122    ,);;
3123    *)
3124      if test "x$ac_old_val" != "x$ac_new_val"; then
3125	# differences in whitespace do not lead to failure.
3126	ac_old_val_w=`echo x $ac_old_val`
3127	ac_new_val_w=`echo x $ac_new_val`
3128	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3129	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3130$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3131	  ac_cache_corrupted=:
3132	else
3133	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3134$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3135	  eval $ac_var=\$ac_old_val
3136	fi
3137	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3138$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3139	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3140$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3141      fi;;
3142  esac
3143  # Pass precious variables to config.status.
3144  if test "$ac_new_set" = set; then
3145    case $ac_new_val in
3146    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3147    *) ac_arg=$ac_var=$ac_new_val ;;
3148    esac
3149    case " $ac_configure_args " in
3150      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3151      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3152    esac
3153  fi
3154done
3155if $ac_cache_corrupted; then
3156  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3157$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3158  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3159$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3160  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3161fi
3162## -------------------- ##
3163## Main body of script. ##
3164## -------------------- ##
3165
3166ac_ext=c
3167ac_cpp='$CPP $CPPFLAGS'
3168ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3169ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3170ac_compiler_gnu=$ac_cv_c_compiler_gnu
3171
3172
3173
3174ac_aux_dir=
3175for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3176  if test -f "$ac_dir/install-sh"; then
3177    ac_aux_dir=$ac_dir
3178    ac_install_sh="$ac_aux_dir/install-sh -c"
3179    break
3180  elif test -f "$ac_dir/install.sh"; then
3181    ac_aux_dir=$ac_dir
3182    ac_install_sh="$ac_aux_dir/install.sh -c"
3183    break
3184  elif test -f "$ac_dir/shtool"; then
3185    ac_aux_dir=$ac_dir
3186    ac_install_sh="$ac_aux_dir/shtool install -c"
3187    break
3188  fi
3189done
3190if test -z "$ac_aux_dir"; then
3191  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3192fi
3193
3194# These three variables are undocumented and unsupported,
3195# and are intended to be withdrawn in a future Autoconf release.
3196# They can cause serious problems if a builder's source tree is in a directory
3197# whose full name contains unusual characters.
3198ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3199ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3200ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3201
3202
3203# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3204
3205#
3206# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3207# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3208#
3209# This code is free software; you can redistribute it and/or modify it
3210# under the terms of the GNU General Public License version 2 only, as
3211# published by the Free Software Foundation.  Oracle designates this
3212# particular file as subject to the "Classpath" exception as provided
3213# by Oracle in the LICENSE file that accompanied this code.
3214#
3215# This code is distributed in the hope that it will be useful, but WITHOUT
3216# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3217# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3218# version 2 for more details (a copy is included in the LICENSE file that
3219# accompanied this code).
3220#
3221# You should have received a copy of the GNU General Public License version
3222# 2 along with this work; if not, write to the Free Software Foundation,
3223# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3224#
3225# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3226# or visit www.oracle.com if you need additional information or have any
3227# questions.
3228#
3229
3230#
3231# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3232#
3233# This program is free software; you can redistribute it and/or modify
3234# it under the terms of the GNU General Public License as published by
3235# the Free Software Foundation; either version 2 of the License, or
3236# (at your option) any later version.
3237#
3238# This program is distributed in the hope that it will be useful, but
3239# WITHOUT ANY WARRANTY; without even the implied warranty of
3240# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3241# General Public License for more details.
3242#
3243# You should have received a copy of the GNU General Public License
3244# along with this program; if not, write to the Free Software
3245# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3246#
3247# As a special exception to the GNU General Public License, if you
3248# distribute this file as part of a program that contains a
3249# configuration script generated by Autoconf, you may include it under
3250# the same distribution terms that you use for the rest of that program.
3251
3252# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3253# ----------------------------------
3254# PKG_PROG_PKG_CONFIG
3255
3256# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3257#
3258# Check to see whether a particular set of modules exists.  Similar
3259# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3260#
3261#
3262# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3263# this or PKG_CHECK_MODULES is called, or make sure to call
3264# PKG_CHECK_EXISTS manually
3265# --------------------------------------------------------------
3266
3267
3268
3269# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3270# ---------------------------------------------
3271# _PKG_CONFIG
3272
3273# _PKG_SHORT_ERRORS_SUPPORTED
3274# -----------------------------
3275# _PKG_SHORT_ERRORS_SUPPORTED
3276
3277
3278# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3279# [ACTION-IF-NOT-FOUND])
3280#
3281#
3282# Note that if there is a possibility the first call to
3283# PKG_CHECK_MODULES might not happen, you should be sure to include an
3284# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3285#
3286#
3287# --------------------------------------------------------------
3288# PKG_CHECK_MODULES
3289
3290
3291# Include these first...
3292#
3293# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3294# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3295#
3296# This code is free software; you can redistribute it and/or modify it
3297# under the terms of the GNU General Public License version 2 only, as
3298# published by the Free Software Foundation.  Oracle designates this
3299# particular file as subject to the "Classpath" exception as provided
3300# by Oracle in the LICENSE file that accompanied this code.
3301#
3302# This code is distributed in the hope that it will be useful, but WITHOUT
3303# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3304# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3305# version 2 for more details (a copy is included in the LICENSE file that
3306# accompanied this code).
3307#
3308# You should have received a copy of the GNU General Public License version
3309# 2 along with this work; if not, write to the Free Software Foundation,
3310# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3311#
3312# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3313# or visit www.oracle.com if you need additional information or have any
3314# questions.
3315#
3316
3317# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3318# If so, then append $1 to $2 \
3319# Also set JVM_ARG_OK to true/false depending on outcome.
3320
3321
3322# Appends a string to a path variable, only adding the : when needed.
3323
3324
3325# This will make sure the given variable points to a full and proper
3326# path. This means:
3327# 1) There will be no spaces in the path. On posix platforms,
3328#    spaces in the path will result in an error. On Windows,
3329#    the path will be rewritten using short-style to be space-free.
3330# 2) The path will be absolute, and it will be in unix-style (on
3331#     cygwin).
3332# $1: The name of the variable to fix
3333
3334
3335# This will make sure the given variable points to a executable
3336# with a full and proper path. This means:
3337# 1) There will be no spaces in the path. On posix platforms,
3338#    spaces in the path will result in an error. On Windows,
3339#    the path will be rewritten using short-style to be space-free.
3340# 2) The path will be absolute, and it will be in unix-style (on
3341#     cygwin).
3342# Any arguments given to the executable is preserved.
3343# If the input variable does not have a directory specification, then
3344# it need to be in the PATH.
3345# $1: The name of the variable to fix
3346
3347
3348
3349
3350# Register a --with argument but mark it as deprecated
3351# $1: The name of the with argument to deprecate, not including --with-
3352
3353
3354# Register a --enable argument but mark it as deprecated
3355# $1: The name of the with argument to deprecate, not including --enable-
3356# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3357
3358
3359
3360
3361# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3362# $1: variable to check
3363
3364
3365# Check that there are no unprocessed overridden variables left.
3366# If so, they are an incorrect argument and we will exit with an error.
3367
3368
3369# Setup a tool for the given variable. If correctly specified by the user,
3370# use that value, otherwise search for the tool using the supplied code snippet.
3371# $1: variable to set
3372# $2: code snippet to call to look for the tool
3373
3374
3375# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3376# $1: variable to set
3377# $2: executable name (or list of names) to look for
3378
3379
3380# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3381# $1: variable to set
3382# $2: executable name (or list of names) to look for
3383
3384
3385# Like BASIC_PATH_PROGS but fails if no tool was found.
3386# $1: variable to set
3387# $2: executable name (or list of names) to look for
3388
3389
3390# Like BASIC_SETUP_TOOL but fails if no tool was found.
3391# $1: variable to set
3392# $2: autoconf macro to call to look for the special tool
3393
3394
3395# Setup the most fundamental tools that relies on not much else to set up,
3396# but is used by much of the early bootstrap code.
3397
3398
3399# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3400
3401
3402
3403
3404
3405
3406
3407#%%% Simple tools %%%
3408
3409# Check if we have found a usable version of make
3410# $1: the path to a potential make binary (or empty)
3411# $2: the description on how we found this
3412
3413
3414# Goes looking for a usable version of GNU make.
3415
3416
3417
3418
3419
3420
3421# Check if build directory is on local disk. If not possible to determine,
3422# we prefer to claim it's local.
3423# Argument 1: directory to test
3424# Argument 2: what to do if it is on local disk
3425# Argument 3: what to do otherwise (remote disk or failure)
3426
3427
3428# Check that source files have basic read permissions set. This might
3429# not be the case in cygwin in certain conditions.
3430
3431
3432
3433
3434#
3435# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3436# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3437#
3438# This code is free software; you can redistribute it and/or modify it
3439# under the terms of the GNU General Public License version 2 only, as
3440# published by the Free Software Foundation.  Oracle designates this
3441# particular file as subject to the "Classpath" exception as provided
3442# by Oracle in the LICENSE file that accompanied this code.
3443#
3444# This code is distributed in the hope that it will be useful, but WITHOUT
3445# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3446# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3447# version 2 for more details (a copy is included in the LICENSE file that
3448# accompanied this code).
3449#
3450# You should have received a copy of the GNU General Public License version
3451# 2 along with this work; if not, write to the Free Software Foundation,
3452# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3453#
3454# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3455# or visit www.oracle.com if you need additional information or have any
3456# questions.
3457#
3458
3459
3460
3461
3462
3463# Helper function which possibly converts a path using DOS-style short mode.
3464# If so, the updated path is stored in $new_path.
3465# $1: The path to check
3466
3467
3468# Helper function which possibly converts a path using DOS-style short mode.
3469# If so, the updated path is stored in $new_path.
3470# $1: The path to check
3471
3472
3473# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3474# and could probably be heavily simplified. However, all changes in this
3475# area tend to need lot of testing in different scenarios, and in lack of
3476# proper unit testing, cleaning this up has not been deemed worth the effort
3477# at the moment.
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3488
3489
3490
3491
3492#
3493# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3494# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3495#
3496# This code is free software; you can redistribute it and/or modify it
3497# under the terms of the GNU General Public License version 2 only, as
3498# published by the Free Software Foundation.  Oracle designates this
3499# particular file as subject to the "Classpath" exception as provided
3500# by Oracle in the LICENSE file that accompanied this code.
3501#
3502# This code is distributed in the hope that it will be useful, but WITHOUT
3503# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3504# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3505# version 2 for more details (a copy is included in the LICENSE file that
3506# accompanied this code).
3507#
3508# You should have received a copy of the GNU General Public License version
3509# 2 along with this work; if not, write to the Free Software Foundation,
3510# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3511#
3512# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3513# or visit www.oracle.com if you need additional information or have any
3514# questions.
3515#
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527# ... then the rest
3528#
3529# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3530# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3531#
3532# This code is free software; you can redistribute it and/or modify it
3533# under the terms of the GNU General Public License version 2 only, as
3534# published by the Free Software Foundation.  Oracle designates this
3535# particular file as subject to the "Classpath" exception as provided
3536# by Oracle in the LICENSE file that accompanied this code.
3537#
3538# This code is distributed in the hope that it will be useful, but WITHOUT
3539# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3540# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3541# version 2 for more details (a copy is included in the LICENSE file that
3542# accompanied this code).
3543#
3544# You should have received a copy of the GNU General Public License version
3545# 2 along with this work; if not, write to the Free Software Foundation,
3546# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3547#
3548# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3549# or visit www.oracle.com if you need additional information or have any
3550# questions.
3551#
3552
3553########################################################################
3554# This file handles detection of the Boot JDK. The Boot JDK detection
3555# process has been developed as a response to solve a complex real-world
3556# problem. Initially, it was simple, but it has grown as platform after
3557# platform, idiosyncracy after idiosyncracy has been supported.
3558#
3559# The basic idea is this:
3560# 1) You need an acceptable *) JDK to use as a Boot JDK
3561# 2) There are several ways to locate a JDK, that are mostly platform
3562#    dependent **)
3563# 3) You can have multiple JDKs installed
3564# 4) If possible, configure should try to dig out an acceptable JDK
3565#    automatically, without having to resort to command-line options
3566#
3567# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3568#     javac) and not a JRE, etc.
3569#
3570# **) On Windows we typically use a well-known path.
3571#     On MacOSX we typically use the tool java_home.
3572#     On Linux we typically find javac in the $PATH, and then follow a
3573#     chain of symlinks that often ends up in a real JDK.
3574#
3575# This leads to the code where we check in different ways to locate a
3576# JDK, and if one is found, check if it is acceptable. If not, we print
3577# our reasons for rejecting it (useful when debugging non-working
3578# configure situations) and continue checking the next one.
3579########################################################################
3580
3581# Execute the check given as argument, and verify the result
3582# If the Boot JDK was previously found, do nothing
3583# $1 A command line (typically autoconf macro) to execute
3584
3585
3586# Test: Is bootjdk explicitely set by command line arguments?
3587
3588
3589# Test: Is bootjdk available from builddeps?
3590
3591
3592# Test: Is $JAVA_HOME set?
3593
3594
3595# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3596
3597
3598# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3599# $1: Argument to the java_home binary (optional)
3600
3601
3602# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3603
3604
3605# Look for a jdk in the given path. If there are multiple, try to select the newest.
3606# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3607# $1 = Path to directory containing jdk installations.
3608# $2 = String to append to the found JDK directory to get the proper JDK home
3609
3610
3611# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3612# environmental variable as base for where to look.
3613# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3614
3615
3616# Test: Is there a JDK installed in default, well-known locations?
3617
3618
3619# Check that a command-line tool in the Boot JDK is correct
3620# $1 = name of variable to assign
3621# $2 = name of binary
3622
3623
3624###############################################################################
3625#
3626# We need a Boot JDK to bootstrap the build.
3627#
3628
3629
3630
3631
3632
3633#
3634# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3635# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3636#
3637# This code is free software; you can redistribute it and/or modify it
3638# under the terms of the GNU General Public License version 2 only, as
3639# published by the Free Software Foundation.  Oracle designates this
3640# particular file as subject to the "Classpath" exception as provided
3641# by Oracle in the LICENSE file that accompanied this code.
3642#
3643# This code is distributed in the hope that it will be useful, but WITHOUT
3644# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3645# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3646# version 2 for more details (a copy is included in the LICENSE file that
3647# accompanied this code).
3648#
3649# You should have received a copy of the GNU General Public License version
3650# 2 along with this work; if not, write to the Free Software Foundation,
3651# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3652#
3653# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3654# or visit www.oracle.com if you need additional information or have any
3655# questions.
3656#
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677#
3678# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3679# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3680#
3681# This code is free software; you can redistribute it and/or modify it
3682# under the terms of the GNU General Public License version 2 only, as
3683# published by the Free Software Foundation.  Oracle designates this
3684# particular file as subject to the "Classpath" exception as provided
3685# by Oracle in the LICENSE file that accompanied this code.
3686#
3687# This code is distributed in the hope that it will be useful, but WITHOUT
3688# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3689# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3690# version 2 for more details (a copy is included in the LICENSE file that
3691# accompanied this code).
3692#
3693# You should have received a copy of the GNU General Public License version
3694# 2 along with this work; if not, write to the Free Software Foundation,
3695# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3696#
3697# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3698# or visit www.oracle.com if you need additional information or have any
3699# questions.
3700#
3701
3702
3703
3704
3705
3706# Documentation on common flags used for solstudio in HIGHEST.
3707#
3708# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3709#          done with care, there are some assumptions below that need to
3710#          be understood about the use of pointers, and IEEE behavior.
3711#
3712# -fns: Use non-standard floating point mode (not IEEE 754)
3713# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3714# -fsingle: Use single precision floating point with 'float'
3715# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3716#   (Source with excessing pointer casting and data access with mixed
3717#    pointer types are not recommended)
3718# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3719#   (If you expect perfect errno behavior, do not use this)
3720# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3721# -xrestrict: Pointer parameters to functions do not overlap
3722#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3723#    If you pass in multiple pointers to the same data, do not use this)
3724# -xlibmil: Inline some library routines
3725#   (If you expect perfect errno behavior, do not use this)
3726# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3727#   (If you expect perfect errno behavior, do not use this)
3728#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3729
3730    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3731    # Bug?
3732    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3733    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3734    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3735    #fi
3736
3737
3738
3739
3740
3741
3742# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3743#                                   [RUN-IF-FALSE])
3744# ------------------------------------------------------------
3745# Check that the c and c++ compilers support an argument
3746
3747
3748
3749
3750#
3751# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3752# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3753#
3754# This code is free software; you can redistribute it and/or modify it
3755# under the terms of the GNU General Public License version 2 only, as
3756# published by the Free Software Foundation.  Oracle designates this
3757# particular file as subject to the "Classpath" exception as provided
3758# by Oracle in the LICENSE file that accompanied this code.
3759#
3760# This code is distributed in the hope that it will be useful, but WITHOUT
3761# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3762# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3763# version 2 for more details (a copy is included in the LICENSE file that
3764# accompanied this code).
3765#
3766# You should have received a copy of the GNU General Public License version
3767# 2 along with this work; if not, write to the Free Software Foundation,
3768# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3769#
3770# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3771# or visit www.oracle.com if you need additional information or have any
3772# questions.
3773#
3774
3775
3776
3777
3778
3779cygwin_help() {
3780  case $1 in
3781    unzip)
3782      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3783      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3784      ;;
3785    zip)
3786      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3787      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3788      ;;
3789    make)
3790      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3791      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3792      ;;
3793    freetype)
3794      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3795        HELP_MSG="To install freetype, run:
3796wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3797chmod +x /tmp/freetype-setup.exe
3798/tmp/freetype-setup.exe
3799Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3800After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3801      else
3802        HELP_MSG="You need to build a 64-bit version of freetype.
3803This is not readily available.
3804You can find source code and build instructions on
3805http://www.freetype.org/
3806If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3807      fi
3808      ;;
3809  esac
3810}
3811
3812msys_help() {
3813  PKGHANDLER_COMMAND=""
3814}
3815
3816apt_help() {
3817  case $1 in
3818    devkit)
3819      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3820    openjdk)
3821      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3822    alsa)
3823      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3824    cups)
3825      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3826    freetype)
3827      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3828    pulse)
3829      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3830    x11)
3831      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3832    ccache)
3833      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3834  esac
3835}
3836
3837yum_help() {
3838  case $1 in
3839    devkit)
3840      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3841    openjdk)
3842      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3843    alsa)
3844      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3845    cups)
3846      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3847    freetype)
3848      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3849    pulse)
3850      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3851    x11)
3852      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3853    ccache)
3854      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3855  esac
3856}
3857
3858port_help() {
3859  PKGHANDLER_COMMAND=""
3860}
3861
3862pkgutil_help() {
3863  PKGHANDLER_COMMAND=""
3864}
3865
3866pkgadd_help() {
3867  PKGHANDLER_COMMAND=""
3868}
3869
3870# This function will check if we're called from the "configure" wrapper while
3871# printing --help. If so, we will print out additional information that can
3872# only be extracted within the autoconf script, and then exit. This must be
3873# called at the very beginning in configure.ac.
3874
3875
3876
3877
3878#
3879# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3880# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3881#
3882# This code is free software; you can redistribute it and/or modify it
3883# under the terms of the GNU General Public License version 2 only, as
3884# published by the Free Software Foundation.  Oracle designates this
3885# particular file as subject to the "Classpath" exception as provided
3886# by Oracle in the LICENSE file that accompanied this code.
3887#
3888# This code is distributed in the hope that it will be useful, but WITHOUT
3889# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3890# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3891# version 2 for more details (a copy is included in the LICENSE file that
3892# accompanied this code).
3893#
3894# You should have received a copy of the GNU General Public License version
3895# 2 along with this work; if not, write to the Free Software Foundation,
3896# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3897#
3898# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3899# or visit www.oracle.com if you need additional information or have any
3900# questions.
3901#
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912###############################################################################
3913#
3914# Should we build only OpenJDK even if closed sources are present?
3915#
3916
3917
3918
3919
3920###############################################################################
3921#
3922# Setup version numbers
3923#
3924
3925
3926
3927
3928
3929
3930#
3931# Copyright (c) 2011, 2014, 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
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973#
3974# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3975# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3976#
3977# This code is free software; you can redistribute it and/or modify it
3978# under the terms of the GNU General Public License version 2 only, as
3979# published by the Free Software Foundation.  Oracle designates this
3980# particular file as subject to the "Classpath" exception as provided
3981# by Oracle in the LICENSE file that accompanied this code.
3982#
3983# This code is distributed in the hope that it will be useful, but WITHOUT
3984# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3985# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3986# version 2 for more details (a copy is included in the LICENSE file that
3987# accompanied this code).
3988#
3989# You should have received a copy of the GNU General Public License version
3990# 2 along with this work; if not, write to the Free Software Foundation,
3991# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3992#
3993# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3994# or visit www.oracle.com if you need additional information or have any
3995# questions.
3996#
3997
3998# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3999# Converts autoconf style CPU name to OpenJDK style, into
4000# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4001
4002
4003# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4004# Converts autoconf style OS name to OpenJDK style, into
4005# VAR_OS and VAR_OS_API.
4006
4007
4008# Expects $host_os $host_cpu $build_os and $build_cpu
4009# and $with_target_bits to have been setup!
4010#
4011# Translate the standard triplet(quadruplet) definition
4012# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4013# OPENJDK_BUILD_OS, etc.
4014
4015
4016# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4017# accordingly. Must be done after setting up build and target system, but before
4018# doing anything else with these values.
4019
4020
4021# Setup the legacy variables, for controlling the old makefiles.
4022#
4023
4024
4025
4026
4027#%%% Build and target systems %%%
4028
4029
4030
4031
4032# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4033# Add -mX to various FLAGS variables.
4034
4035
4036
4037
4038
4039
4040#
4041# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4042# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4043#
4044# This code is free software; you can redistribute it and/or modify it
4045# under the terms of the GNU General Public License version 2 only, as
4046# published by the Free Software Foundation.  Oracle designates this
4047# particular file as subject to the "Classpath" exception as provided
4048# by Oracle in the LICENSE file that accompanied this code.
4049#
4050# This code is distributed in the hope that it will be useful, but WITHOUT
4051# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4052# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4053# version 2 for more details (a copy is included in the LICENSE file that
4054# accompanied this code).
4055#
4056# You should have received a copy of the GNU General Public License version
4057# 2 along with this work; if not, write to the Free Software Foundation,
4058# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4059#
4060# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4061# or visit www.oracle.com if you need additional information or have any
4062# questions.
4063#
4064
4065
4066
4067
4068
4069
4070
4071
4072#
4073# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4074# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4075#
4076# This code is free software; you can redistribute it and/or modify it
4077# under the terms of the GNU General Public License version 2 only, as
4078# published by the Free Software Foundation.  Oracle designates this
4079# particular file as subject to the "Classpath" exception as provided
4080# by Oracle in the LICENSE file that accompanied this code.
4081#
4082# This code is distributed in the hope that it will be useful, but WITHOUT
4083# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4084# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4085# version 2 for more details (a copy is included in the LICENSE file that
4086# accompanied this code).
4087#
4088# You should have received a copy of the GNU General Public License version
4089# 2 along with this work; if not, write to the Free Software Foundation,
4090# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4091#
4092# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4093# or visit www.oracle.com if you need additional information or have any
4094# questions.
4095#
4096
4097########################################################################
4098# This file is responsible for detecting, verifying and setting up the
4099# toolchain, i.e. the compiler, linker and related utilities. It will setup
4100# proper paths to the binaries, but it will not setup any flags.
4101#
4102# The binaries used is determined by the toolchain type, which is the family of
4103# compilers and related tools that are used.
4104########################################################################
4105
4106
4107# All valid toolchains, regardless of platform (used by help.m4)
4108VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4109
4110# These toolchains are valid on different platforms
4111VALID_TOOLCHAINS_linux="gcc clang"
4112VALID_TOOLCHAINS_solaris="solstudio"
4113VALID_TOOLCHAINS_macosx="gcc clang"
4114VALID_TOOLCHAINS_aix="xlc"
4115VALID_TOOLCHAINS_windows="microsoft"
4116
4117# Toolchain descriptions
4118TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4119TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4120TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4121TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4122TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4123
4124# Setup a number of variables describing how native output files are
4125# named on this platform/toolchain.
4126
4127
4128# Determine which toolchain type to use, and make sure it is valid for this
4129# platform. Setup various information about the selected toolchain.
4130
4131
4132# Before we start detecting the toolchain executables, we might need some
4133# special setup, e.g. additional paths etc.
4134
4135
4136# Restore path, etc
4137
4138
4139# Check if a compiler is of the toolchain type we expect, and save the version
4140# information from it. If the compiler does not match the expected type,
4141# this function will abort using AC_MSG_ERROR. If it matches, the version will
4142# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4143# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4144#
4145# $1 = compiler to test (CC or CXX)
4146# $2 = human readable name of compiler (C or C++)
4147
4148
4149# Try to locate the given C or C++ compiler in the path, or otherwise.
4150#
4151# $1 = compiler to test (CC or CXX)
4152# $2 = human readable name of compiler (C or C++)
4153# $3 = list of compiler names to search for
4154
4155
4156# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4157# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4158# archiver (AR). Verify that the compilers are correct according to the
4159# toolchain type.
4160
4161
4162# Setup additional tools that is considered a part of the toolchain, but not the
4163# core part. Many of these are highly platform-specific and do not exist,
4164# and/or are not needed on all platforms.
4165
4166
4167# Setup the build tools (i.e, the compiler and linker used to build programs
4168# that should be run on the build platform, not the target platform, as a build
4169# helper). Since the non-cross-compile case uses the normal, target compilers
4170# for this, we can only do this after these have been setup.
4171
4172
4173# Setup legacy variables that are still needed as alternative ways to refer to
4174# parts of the toolchain.
4175
4176
4177# Do some additional checks on the detected tools.
4178
4179
4180# Setup the JTReg Regression Test Harness.
4181
4182
4183#
4184# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4185# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4186#
4187# This code is free software; you can redistribute it and/or modify it
4188# under the terms of the GNU General Public License version 2 only, as
4189# published by the Free Software Foundation.  Oracle designates this
4190# particular file as subject to the "Classpath" exception as provided
4191# by Oracle in the LICENSE file that accompanied this code.
4192#
4193# This code is distributed in the hope that it will be useful, but WITHOUT
4194# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4195# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4196# version 2 for more details (a copy is included in the LICENSE file that
4197# accompanied this code).
4198#
4199# You should have received a copy of the GNU General Public License version
4200# 2 along with this work; if not, write to the Free Software Foundation,
4201# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4202#
4203# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4204# or visit www.oracle.com if you need additional information or have any
4205# questions.
4206#
4207
4208
4209
4210
4211
4212
4213
4214# Check if the VS env variables were setup prior to running configure.
4215# If not, then find vcvarsall.bat and run it automatically, and integrate
4216# the set env variables into the spec file.
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227# This line needs to be here, verbatim, after all includes and the dummy hook
4228# definitions. It is replaced with custom functionality when building
4229# custom sources.
4230#CUSTOM_AUTOCONF_INCLUDE
4231
4232# Do not change or remove the following line, it is needed for consistency checks:
4233DATE_WHEN_GENERATED=1393490405
4234
4235###############################################################################
4236#
4237# Initialization / Boot-strapping
4238#
4239# The bootstrapping process needs to solve the "chicken or the egg" problem,
4240# thus it jumps back and forth, each time gaining something needed later on.
4241#
4242###############################################################################
4243
4244# If we are requested to print additional help, do that and then exit.
4245# This must be the very first call.
4246
4247  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4248    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4249    $PRINTF "Which are valid to use depends on the build platform.\n"
4250    for toolchain in $VALID_TOOLCHAINS_all; do
4251      # Use indirect variable referencing
4252      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4253      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4254      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4255    done
4256
4257    # And now exit directly
4258    exit 0
4259  fi
4260
4261
4262# Basic initialization that must happen first of all in the normal process.
4263
4264  # Save the original command line. This is passed to us by the wrapper configure script.
4265
4266  DATE_WHEN_CONFIGURED=`LANG=C date`
4267
4268  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4269$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4270  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4271$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4272
4273
4274  # Start with tools that do not need have cross compilation support
4275  # and can be expected to be found in the default PATH. These tools are
4276  # used by configure. Nor are these tools expected to be found in the
4277  # devkit from the builddeps server either, since they are
4278  # needed to download the devkit.
4279
4280  # First are all the simple required tools.
4281
4282
4283
4284  # Publish this variable in the help.
4285
4286
4287  if test "x$BASENAME" = x; then
4288    # The variable is not set by user, try to locate tool using the code snippet
4289    for ac_prog in basename
4290do
4291  # Extract the first word of "$ac_prog", so it can be a program name with args.
4292set dummy $ac_prog; ac_word=$2
4293{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4294$as_echo_n "checking for $ac_word... " >&6; }
4295if ${ac_cv_path_BASENAME+:} false; then :
4296  $as_echo_n "(cached) " >&6
4297else
4298  case $BASENAME in
4299  [\\/]* | ?:[\\/]*)
4300  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4301  ;;
4302  *)
4303  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4304for as_dir in $PATH
4305do
4306  IFS=$as_save_IFS
4307  test -z "$as_dir" && as_dir=.
4308    for ac_exec_ext in '' $ac_executable_extensions; do
4309  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4310    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4311    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4312    break 2
4313  fi
4314done
4315  done
4316IFS=$as_save_IFS
4317
4318  ;;
4319esac
4320fi
4321BASENAME=$ac_cv_path_BASENAME
4322if test -n "$BASENAME"; then
4323  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4324$as_echo "$BASENAME" >&6; }
4325else
4326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4327$as_echo "no" >&6; }
4328fi
4329
4330
4331  test -n "$BASENAME" && break
4332done
4333
4334  else
4335    # The variable is set, but is it from the command line or the environment?
4336
4337    # Try to remove the string !BASENAME! from our list.
4338    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4339    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4340      # If it failed, the variable was not from the command line. Ignore it,
4341      # but warn the user (except for BASH, which is always set by the calling BASH).
4342      if test "xBASENAME" != xBASH; then
4343        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4344$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4345      fi
4346      # Try to locate tool using the code snippet
4347      for ac_prog in basename
4348do
4349  # Extract the first word of "$ac_prog", so it can be a program name with args.
4350set dummy $ac_prog; ac_word=$2
4351{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4352$as_echo_n "checking for $ac_word... " >&6; }
4353if ${ac_cv_path_BASENAME+:} false; then :
4354  $as_echo_n "(cached) " >&6
4355else
4356  case $BASENAME in
4357  [\\/]* | ?:[\\/]*)
4358  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4359  ;;
4360  *)
4361  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4362for as_dir in $PATH
4363do
4364  IFS=$as_save_IFS
4365  test -z "$as_dir" && as_dir=.
4366    for ac_exec_ext in '' $ac_executable_extensions; do
4367  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4368    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4369    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4370    break 2
4371  fi
4372done
4373  done
4374IFS=$as_save_IFS
4375
4376  ;;
4377esac
4378fi
4379BASENAME=$ac_cv_path_BASENAME
4380if test -n "$BASENAME"; then
4381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4382$as_echo "$BASENAME" >&6; }
4383else
4384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4385$as_echo "no" >&6; }
4386fi
4387
4388
4389  test -n "$BASENAME" && break
4390done
4391
4392    else
4393      # If it succeeded, then it was overridden by the user. We will use it
4394      # for the tool.
4395
4396      # First remove it from the list of overridden variables, so we can test
4397      # for unknown variables in the end.
4398      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4399
4400      # Check if the provided tool contains a complete path.
4401      tool_specified="$BASENAME"
4402      tool_basename="${tool_specified##*/}"
4403      if test "x$tool_basename" = "x$tool_specified"; then
4404        # A command without a complete path is provided, search $PATH.
4405        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4406$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4407        # Extract the first word of "$tool_basename", so it can be a program name with args.
4408set dummy $tool_basename; ac_word=$2
4409{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4410$as_echo_n "checking for $ac_word... " >&6; }
4411if ${ac_cv_path_BASENAME+:} false; then :
4412  $as_echo_n "(cached) " >&6
4413else
4414  case $BASENAME in
4415  [\\/]* | ?:[\\/]*)
4416  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4417  ;;
4418  *)
4419  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4420for as_dir in $PATH
4421do
4422  IFS=$as_save_IFS
4423  test -z "$as_dir" && as_dir=.
4424    for ac_exec_ext in '' $ac_executable_extensions; do
4425  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4426    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4427    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4428    break 2
4429  fi
4430done
4431  done
4432IFS=$as_save_IFS
4433
4434  ;;
4435esac
4436fi
4437BASENAME=$ac_cv_path_BASENAME
4438if test -n "$BASENAME"; then
4439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4440$as_echo "$BASENAME" >&6; }
4441else
4442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4443$as_echo "no" >&6; }
4444fi
4445
4446
4447        if test "x$BASENAME" = x; then
4448          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4449        fi
4450      else
4451        # Otherwise we believe it is a complete path. Use it as it is.
4452        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4453$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4455$as_echo_n "checking for BASENAME... " >&6; }
4456        if test ! -x "$tool_specified"; then
4457          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4458$as_echo "not found" >&6; }
4459          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4460        fi
4461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4462$as_echo "$tool_specified" >&6; }
4463      fi
4464    fi
4465  fi
4466
4467
4468
4469  if test "x$BASENAME" = x; then
4470    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4471  fi
4472
4473
4474
4475
4476
4477  # Publish this variable in the help.
4478
4479
4480  if test "x$BASH" = x; then
4481    # The variable is not set by user, try to locate tool using the code snippet
4482    for ac_prog in bash
4483do
4484  # Extract the first word of "$ac_prog", so it can be a program name with args.
4485set dummy $ac_prog; ac_word=$2
4486{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4487$as_echo_n "checking for $ac_word... " >&6; }
4488if ${ac_cv_path_BASH+:} false; then :
4489  $as_echo_n "(cached) " >&6
4490else
4491  case $BASH in
4492  [\\/]* | ?:[\\/]*)
4493  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4494  ;;
4495  *)
4496  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4497for as_dir in $PATH
4498do
4499  IFS=$as_save_IFS
4500  test -z "$as_dir" && as_dir=.
4501    for ac_exec_ext in '' $ac_executable_extensions; do
4502  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4503    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4504    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4505    break 2
4506  fi
4507done
4508  done
4509IFS=$as_save_IFS
4510
4511  ;;
4512esac
4513fi
4514BASH=$ac_cv_path_BASH
4515if test -n "$BASH"; then
4516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4517$as_echo "$BASH" >&6; }
4518else
4519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4520$as_echo "no" >&6; }
4521fi
4522
4523
4524  test -n "$BASH" && break
4525done
4526
4527  else
4528    # The variable is set, but is it from the command line or the environment?
4529
4530    # Try to remove the string !BASH! from our list.
4531    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4532    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4533      # If it failed, the variable was not from the command line. Ignore it,
4534      # but warn the user (except for BASH, which is always set by the calling BASH).
4535      if test "xBASH" != xBASH; then
4536        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4537$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4538      fi
4539      # Try to locate tool using the code snippet
4540      for ac_prog in bash
4541do
4542  # Extract the first word of "$ac_prog", so it can be a program name with args.
4543set dummy $ac_prog; ac_word=$2
4544{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4545$as_echo_n "checking for $ac_word... " >&6; }
4546if ${ac_cv_path_BASH+:} false; then :
4547  $as_echo_n "(cached) " >&6
4548else
4549  case $BASH in
4550  [\\/]* | ?:[\\/]*)
4551  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4552  ;;
4553  *)
4554  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4555for as_dir in $PATH
4556do
4557  IFS=$as_save_IFS
4558  test -z "$as_dir" && as_dir=.
4559    for ac_exec_ext in '' $ac_executable_extensions; do
4560  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4561    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4562    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4563    break 2
4564  fi
4565done
4566  done
4567IFS=$as_save_IFS
4568
4569  ;;
4570esac
4571fi
4572BASH=$ac_cv_path_BASH
4573if test -n "$BASH"; then
4574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4575$as_echo "$BASH" >&6; }
4576else
4577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4578$as_echo "no" >&6; }
4579fi
4580
4581
4582  test -n "$BASH" && break
4583done
4584
4585    else
4586      # If it succeeded, then it was overridden by the user. We will use it
4587      # for the tool.
4588
4589      # First remove it from the list of overridden variables, so we can test
4590      # for unknown variables in the end.
4591      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4592
4593      # Check if the provided tool contains a complete path.
4594      tool_specified="$BASH"
4595      tool_basename="${tool_specified##*/}"
4596      if test "x$tool_basename" = "x$tool_specified"; then
4597        # A command without a complete path is provided, search $PATH.
4598        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4599$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4600        # Extract the first word of "$tool_basename", so it can be a program name with args.
4601set dummy $tool_basename; ac_word=$2
4602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4603$as_echo_n "checking for $ac_word... " >&6; }
4604if ${ac_cv_path_BASH+:} false; then :
4605  $as_echo_n "(cached) " >&6
4606else
4607  case $BASH in
4608  [\\/]* | ?:[\\/]*)
4609  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4610  ;;
4611  *)
4612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4613for as_dir in $PATH
4614do
4615  IFS=$as_save_IFS
4616  test -z "$as_dir" && as_dir=.
4617    for ac_exec_ext in '' $ac_executable_extensions; do
4618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4619    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4621    break 2
4622  fi
4623done
4624  done
4625IFS=$as_save_IFS
4626
4627  ;;
4628esac
4629fi
4630BASH=$ac_cv_path_BASH
4631if test -n "$BASH"; then
4632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4633$as_echo "$BASH" >&6; }
4634else
4635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4636$as_echo "no" >&6; }
4637fi
4638
4639
4640        if test "x$BASH" = x; then
4641          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4642        fi
4643      else
4644        # Otherwise we believe it is a complete path. Use it as it is.
4645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4646$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4648$as_echo_n "checking for BASH... " >&6; }
4649        if test ! -x "$tool_specified"; then
4650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4651$as_echo "not found" >&6; }
4652          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4653        fi
4654        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4655$as_echo "$tool_specified" >&6; }
4656      fi
4657    fi
4658  fi
4659
4660
4661
4662  if test "x$BASH" = x; then
4663    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4664  fi
4665
4666
4667
4668
4669
4670  # Publish this variable in the help.
4671
4672
4673  if test "x$CAT" = x; then
4674    # The variable is not set by user, try to locate tool using the code snippet
4675    for ac_prog in cat
4676do
4677  # Extract the first word of "$ac_prog", so it can be a program name with args.
4678set dummy $ac_prog; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_CAT+:} false; then :
4682  $as_echo_n "(cached) " >&6
4683else
4684  case $CAT in
4685  [\\/]* | ?:[\\/]*)
4686  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4687  ;;
4688  *)
4689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in $PATH
4691do
4692  IFS=$as_save_IFS
4693  test -z "$as_dir" && as_dir=.
4694    for ac_exec_ext in '' $ac_executable_extensions; do
4695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4696    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698    break 2
4699  fi
4700done
4701  done
4702IFS=$as_save_IFS
4703
4704  ;;
4705esac
4706fi
4707CAT=$ac_cv_path_CAT
4708if test -n "$CAT"; then
4709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4710$as_echo "$CAT" >&6; }
4711else
4712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717  test -n "$CAT" && break
4718done
4719
4720  else
4721    # The variable is set, but is it from the command line or the environment?
4722
4723    # Try to remove the string !CAT! from our list.
4724    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4725    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4726      # If it failed, the variable was not from the command line. Ignore it,
4727      # but warn the user (except for BASH, which is always set by the calling BASH).
4728      if test "xCAT" != xBASH; then
4729        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4730$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4731      fi
4732      # Try to locate tool using the code snippet
4733      for ac_prog in cat
4734do
4735  # Extract the first word of "$ac_prog", so it can be a program name with args.
4736set dummy $ac_prog; ac_word=$2
4737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738$as_echo_n "checking for $ac_word... " >&6; }
4739if ${ac_cv_path_CAT+:} false; then :
4740  $as_echo_n "(cached) " >&6
4741else
4742  case $CAT in
4743  [\\/]* | ?:[\\/]*)
4744  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4745  ;;
4746  *)
4747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748for as_dir in $PATH
4749do
4750  IFS=$as_save_IFS
4751  test -z "$as_dir" && as_dir=.
4752    for ac_exec_ext in '' $ac_executable_extensions; do
4753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4754    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756    break 2
4757  fi
4758done
4759  done
4760IFS=$as_save_IFS
4761
4762  ;;
4763esac
4764fi
4765CAT=$ac_cv_path_CAT
4766if test -n "$CAT"; then
4767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4768$as_echo "$CAT" >&6; }
4769else
4770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771$as_echo "no" >&6; }
4772fi
4773
4774
4775  test -n "$CAT" && break
4776done
4777
4778    else
4779      # If it succeeded, then it was overridden by the user. We will use it
4780      # for the tool.
4781
4782      # First remove it from the list of overridden variables, so we can test
4783      # for unknown variables in the end.
4784      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4785
4786      # Check if the provided tool contains a complete path.
4787      tool_specified="$CAT"
4788      tool_basename="${tool_specified##*/}"
4789      if test "x$tool_basename" = "x$tool_specified"; then
4790        # A command without a complete path is provided, search $PATH.
4791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4792$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4793        # Extract the first word of "$tool_basename", so it can be a program name with args.
4794set dummy $tool_basename; ac_word=$2
4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4796$as_echo_n "checking for $ac_word... " >&6; }
4797if ${ac_cv_path_CAT+:} false; then :
4798  $as_echo_n "(cached) " >&6
4799else
4800  case $CAT in
4801  [\\/]* | ?:[\\/]*)
4802  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4803  ;;
4804  *)
4805  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4806for as_dir in $PATH
4807do
4808  IFS=$as_save_IFS
4809  test -z "$as_dir" && as_dir=.
4810    for ac_exec_ext in '' $ac_executable_extensions; do
4811  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4812    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4813    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4814    break 2
4815  fi
4816done
4817  done
4818IFS=$as_save_IFS
4819
4820  ;;
4821esac
4822fi
4823CAT=$ac_cv_path_CAT
4824if test -n "$CAT"; then
4825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4826$as_echo "$CAT" >&6; }
4827else
4828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4829$as_echo "no" >&6; }
4830fi
4831
4832
4833        if test "x$CAT" = x; then
4834          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4835        fi
4836      else
4837        # Otherwise we believe it is a complete path. Use it as it is.
4838        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4839$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4840        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4841$as_echo_n "checking for CAT... " >&6; }
4842        if test ! -x "$tool_specified"; then
4843          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4844$as_echo "not found" >&6; }
4845          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4846        fi
4847        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4848$as_echo "$tool_specified" >&6; }
4849      fi
4850    fi
4851  fi
4852
4853
4854
4855  if test "x$CAT" = x; then
4856    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4857  fi
4858
4859
4860
4861
4862
4863  # Publish this variable in the help.
4864
4865
4866  if test "x$CHMOD" = x; then
4867    # The variable is not set by user, try to locate tool using the code snippet
4868    for ac_prog in chmod
4869do
4870  # Extract the first word of "$ac_prog", so it can be a program name with args.
4871set dummy $ac_prog; ac_word=$2
4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4873$as_echo_n "checking for $ac_word... " >&6; }
4874if ${ac_cv_path_CHMOD+:} false; then :
4875  $as_echo_n "(cached) " >&6
4876else
4877  case $CHMOD in
4878  [\\/]* | ?:[\\/]*)
4879  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4880  ;;
4881  *)
4882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4883for as_dir in $PATH
4884do
4885  IFS=$as_save_IFS
4886  test -z "$as_dir" && as_dir=.
4887    for ac_exec_ext in '' $ac_executable_extensions; do
4888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4889    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4891    break 2
4892  fi
4893done
4894  done
4895IFS=$as_save_IFS
4896
4897  ;;
4898esac
4899fi
4900CHMOD=$ac_cv_path_CHMOD
4901if test -n "$CHMOD"; then
4902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4903$as_echo "$CHMOD" >&6; }
4904else
4905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4906$as_echo "no" >&6; }
4907fi
4908
4909
4910  test -n "$CHMOD" && break
4911done
4912
4913  else
4914    # The variable is set, but is it from the command line or the environment?
4915
4916    # Try to remove the string !CHMOD! from our list.
4917    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4918    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4919      # If it failed, the variable was not from the command line. Ignore it,
4920      # but warn the user (except for BASH, which is always set by the calling BASH).
4921      if test "xCHMOD" != xBASH; then
4922        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4923$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4924      fi
4925      # Try to locate tool using the code snippet
4926      for ac_prog in chmod
4927do
4928  # Extract the first word of "$ac_prog", so it can be a program name with args.
4929set dummy $ac_prog; ac_word=$2
4930{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4931$as_echo_n "checking for $ac_word... " >&6; }
4932if ${ac_cv_path_CHMOD+:} false; then :
4933  $as_echo_n "(cached) " >&6
4934else
4935  case $CHMOD in
4936  [\\/]* | ?:[\\/]*)
4937  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4938  ;;
4939  *)
4940  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4941for as_dir in $PATH
4942do
4943  IFS=$as_save_IFS
4944  test -z "$as_dir" && as_dir=.
4945    for ac_exec_ext in '' $ac_executable_extensions; do
4946  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4947    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4948    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4949    break 2
4950  fi
4951done
4952  done
4953IFS=$as_save_IFS
4954
4955  ;;
4956esac
4957fi
4958CHMOD=$ac_cv_path_CHMOD
4959if test -n "$CHMOD"; then
4960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4961$as_echo "$CHMOD" >&6; }
4962else
4963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4964$as_echo "no" >&6; }
4965fi
4966
4967
4968  test -n "$CHMOD" && break
4969done
4970
4971    else
4972      # If it succeeded, then it was overridden by the user. We will use it
4973      # for the tool.
4974
4975      # First remove it from the list of overridden variables, so we can test
4976      # for unknown variables in the end.
4977      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4978
4979      # Check if the provided tool contains a complete path.
4980      tool_specified="$CHMOD"
4981      tool_basename="${tool_specified##*/}"
4982      if test "x$tool_basename" = "x$tool_specified"; then
4983        # A command without a complete path is provided, search $PATH.
4984        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4985$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4986        # Extract the first word of "$tool_basename", so it can be a program name with args.
4987set dummy $tool_basename; ac_word=$2
4988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4989$as_echo_n "checking for $ac_word... " >&6; }
4990if ${ac_cv_path_CHMOD+:} false; then :
4991  $as_echo_n "(cached) " >&6
4992else
4993  case $CHMOD in
4994  [\\/]* | ?:[\\/]*)
4995  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4996  ;;
4997  *)
4998  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4999for as_dir in $PATH
5000do
5001  IFS=$as_save_IFS
5002  test -z "$as_dir" && as_dir=.
5003    for ac_exec_ext in '' $ac_executable_extensions; do
5004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5005    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5007    break 2
5008  fi
5009done
5010  done
5011IFS=$as_save_IFS
5012
5013  ;;
5014esac
5015fi
5016CHMOD=$ac_cv_path_CHMOD
5017if test -n "$CHMOD"; then
5018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5019$as_echo "$CHMOD" >&6; }
5020else
5021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5022$as_echo "no" >&6; }
5023fi
5024
5025
5026        if test "x$CHMOD" = x; then
5027          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5028        fi
5029      else
5030        # Otherwise we believe it is a complete path. Use it as it is.
5031        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5032$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5033        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5034$as_echo_n "checking for CHMOD... " >&6; }
5035        if test ! -x "$tool_specified"; then
5036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5037$as_echo "not found" >&6; }
5038          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5039        fi
5040        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5041$as_echo "$tool_specified" >&6; }
5042      fi
5043    fi
5044  fi
5045
5046
5047
5048  if test "x$CHMOD" = x; then
5049    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5050  fi
5051
5052
5053
5054
5055
5056  # Publish this variable in the help.
5057
5058
5059  if test "x$CMP" = x; then
5060    # The variable is not set by user, try to locate tool using the code snippet
5061    for ac_prog in cmp
5062do
5063  # Extract the first word of "$ac_prog", so it can be a program name with args.
5064set dummy $ac_prog; ac_word=$2
5065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5066$as_echo_n "checking for $ac_word... " >&6; }
5067if ${ac_cv_path_CMP+:} false; then :
5068  $as_echo_n "(cached) " >&6
5069else
5070  case $CMP in
5071  [\\/]* | ?:[\\/]*)
5072  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5073  ;;
5074  *)
5075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5076for as_dir in $PATH
5077do
5078  IFS=$as_save_IFS
5079  test -z "$as_dir" && as_dir=.
5080    for ac_exec_ext in '' $ac_executable_extensions; do
5081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5082    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5084    break 2
5085  fi
5086done
5087  done
5088IFS=$as_save_IFS
5089
5090  ;;
5091esac
5092fi
5093CMP=$ac_cv_path_CMP
5094if test -n "$CMP"; then
5095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5096$as_echo "$CMP" >&6; }
5097else
5098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5099$as_echo "no" >&6; }
5100fi
5101
5102
5103  test -n "$CMP" && break
5104done
5105
5106  else
5107    # The variable is set, but is it from the command line or the environment?
5108
5109    # Try to remove the string !CMP! from our list.
5110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5112      # If it failed, the variable was not from the command line. Ignore it,
5113      # but warn the user (except for BASH, which is always set by the calling BASH).
5114      if test "xCMP" != xBASH; then
5115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5116$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5117      fi
5118      # Try to locate tool using the code snippet
5119      for ac_prog in cmp
5120do
5121  # Extract the first word of "$ac_prog", so it can be a program name with args.
5122set dummy $ac_prog; ac_word=$2
5123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5124$as_echo_n "checking for $ac_word... " >&6; }
5125if ${ac_cv_path_CMP+:} false; then :
5126  $as_echo_n "(cached) " >&6
5127else
5128  case $CMP in
5129  [\\/]* | ?:[\\/]*)
5130  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5131  ;;
5132  *)
5133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5134for as_dir in $PATH
5135do
5136  IFS=$as_save_IFS
5137  test -z "$as_dir" && as_dir=.
5138    for ac_exec_ext in '' $ac_executable_extensions; do
5139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5140    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5142    break 2
5143  fi
5144done
5145  done
5146IFS=$as_save_IFS
5147
5148  ;;
5149esac
5150fi
5151CMP=$ac_cv_path_CMP
5152if test -n "$CMP"; then
5153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5154$as_echo "$CMP" >&6; }
5155else
5156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5157$as_echo "no" >&6; }
5158fi
5159
5160
5161  test -n "$CMP" && break
5162done
5163
5164    else
5165      # If it succeeded, then it was overridden by the user. We will use it
5166      # for the tool.
5167
5168      # First remove it from the list of overridden variables, so we can test
5169      # for unknown variables in the end.
5170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5171
5172      # Check if the provided tool contains a complete path.
5173      tool_specified="$CMP"
5174      tool_basename="${tool_specified##*/}"
5175      if test "x$tool_basename" = "x$tool_specified"; then
5176        # A command without a complete path is provided, search $PATH.
5177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5178$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5179        # Extract the first word of "$tool_basename", so it can be a program name with args.
5180set dummy $tool_basename; ac_word=$2
5181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5182$as_echo_n "checking for $ac_word... " >&6; }
5183if ${ac_cv_path_CMP+:} false; then :
5184  $as_echo_n "(cached) " >&6
5185else
5186  case $CMP in
5187  [\\/]* | ?:[\\/]*)
5188  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5189  ;;
5190  *)
5191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5192for as_dir in $PATH
5193do
5194  IFS=$as_save_IFS
5195  test -z "$as_dir" && as_dir=.
5196    for ac_exec_ext in '' $ac_executable_extensions; do
5197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5198    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5200    break 2
5201  fi
5202done
5203  done
5204IFS=$as_save_IFS
5205
5206  ;;
5207esac
5208fi
5209CMP=$ac_cv_path_CMP
5210if test -n "$CMP"; then
5211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5212$as_echo "$CMP" >&6; }
5213else
5214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5215$as_echo "no" >&6; }
5216fi
5217
5218
5219        if test "x$CMP" = x; then
5220          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5221        fi
5222      else
5223        # Otherwise we believe it is a complete path. Use it as it is.
5224        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5225$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5226        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5227$as_echo_n "checking for CMP... " >&6; }
5228        if test ! -x "$tool_specified"; then
5229          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5230$as_echo "not found" >&6; }
5231          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5232        fi
5233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5234$as_echo "$tool_specified" >&6; }
5235      fi
5236    fi
5237  fi
5238
5239
5240
5241  if test "x$CMP" = x; then
5242    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5243  fi
5244
5245
5246
5247
5248
5249  # Publish this variable in the help.
5250
5251
5252  if test "x$COMM" = x; then
5253    # The variable is not set by user, try to locate tool using the code snippet
5254    for ac_prog in comm
5255do
5256  # Extract the first word of "$ac_prog", so it can be a program name with args.
5257set dummy $ac_prog; ac_word=$2
5258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5259$as_echo_n "checking for $ac_word... " >&6; }
5260if ${ac_cv_path_COMM+:} false; then :
5261  $as_echo_n "(cached) " >&6
5262else
5263  case $COMM in
5264  [\\/]* | ?:[\\/]*)
5265  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5266  ;;
5267  *)
5268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5269for as_dir in $PATH
5270do
5271  IFS=$as_save_IFS
5272  test -z "$as_dir" && as_dir=.
5273    for ac_exec_ext in '' $ac_executable_extensions; do
5274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5275    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5277    break 2
5278  fi
5279done
5280  done
5281IFS=$as_save_IFS
5282
5283  ;;
5284esac
5285fi
5286COMM=$ac_cv_path_COMM
5287if test -n "$COMM"; then
5288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5289$as_echo "$COMM" >&6; }
5290else
5291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5292$as_echo "no" >&6; }
5293fi
5294
5295
5296  test -n "$COMM" && break
5297done
5298
5299  else
5300    # The variable is set, but is it from the command line or the environment?
5301
5302    # Try to remove the string !COMM! from our list.
5303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5305      # If it failed, the variable was not from the command line. Ignore it,
5306      # but warn the user (except for BASH, which is always set by the calling BASH).
5307      if test "xCOMM" != xBASH; then
5308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5309$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5310      fi
5311      # Try to locate tool using the code snippet
5312      for ac_prog in comm
5313do
5314  # Extract the first word of "$ac_prog", so it can be a program name with args.
5315set dummy $ac_prog; ac_word=$2
5316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5317$as_echo_n "checking for $ac_word... " >&6; }
5318if ${ac_cv_path_COMM+:} false; then :
5319  $as_echo_n "(cached) " >&6
5320else
5321  case $COMM in
5322  [\\/]* | ?:[\\/]*)
5323  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5324  ;;
5325  *)
5326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5327for as_dir in $PATH
5328do
5329  IFS=$as_save_IFS
5330  test -z "$as_dir" && as_dir=.
5331    for ac_exec_ext in '' $ac_executable_extensions; do
5332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5333    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5335    break 2
5336  fi
5337done
5338  done
5339IFS=$as_save_IFS
5340
5341  ;;
5342esac
5343fi
5344COMM=$ac_cv_path_COMM
5345if test -n "$COMM"; then
5346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5347$as_echo "$COMM" >&6; }
5348else
5349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5350$as_echo "no" >&6; }
5351fi
5352
5353
5354  test -n "$COMM" && break
5355done
5356
5357    else
5358      # If it succeeded, then it was overridden by the user. We will use it
5359      # for the tool.
5360
5361      # First remove it from the list of overridden variables, so we can test
5362      # for unknown variables in the end.
5363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5364
5365      # Check if the provided tool contains a complete path.
5366      tool_specified="$COMM"
5367      tool_basename="${tool_specified##*/}"
5368      if test "x$tool_basename" = "x$tool_specified"; then
5369        # A command without a complete path is provided, search $PATH.
5370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5371$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5372        # Extract the first word of "$tool_basename", so it can be a program name with args.
5373set dummy $tool_basename; ac_word=$2
5374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5375$as_echo_n "checking for $ac_word... " >&6; }
5376if ${ac_cv_path_COMM+:} false; then :
5377  $as_echo_n "(cached) " >&6
5378else
5379  case $COMM in
5380  [\\/]* | ?:[\\/]*)
5381  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5382  ;;
5383  *)
5384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5385for as_dir in $PATH
5386do
5387  IFS=$as_save_IFS
5388  test -z "$as_dir" && as_dir=.
5389    for ac_exec_ext in '' $ac_executable_extensions; do
5390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5391    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5393    break 2
5394  fi
5395done
5396  done
5397IFS=$as_save_IFS
5398
5399  ;;
5400esac
5401fi
5402COMM=$ac_cv_path_COMM
5403if test -n "$COMM"; then
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5405$as_echo "$COMM" >&6; }
5406else
5407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5408$as_echo "no" >&6; }
5409fi
5410
5411
5412        if test "x$COMM" = x; then
5413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5414        fi
5415      else
5416        # Otherwise we believe it is a complete path. Use it as it is.
5417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5418$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5420$as_echo_n "checking for COMM... " >&6; }
5421        if test ! -x "$tool_specified"; then
5422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5423$as_echo "not found" >&6; }
5424          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5425        fi
5426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5427$as_echo "$tool_specified" >&6; }
5428      fi
5429    fi
5430  fi
5431
5432
5433
5434  if test "x$COMM" = x; then
5435    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5436  fi
5437
5438
5439
5440
5441
5442  # Publish this variable in the help.
5443
5444
5445  if test "x$CP" = x; then
5446    # The variable is not set by user, try to locate tool using the code snippet
5447    for ac_prog in cp
5448do
5449  # Extract the first word of "$ac_prog", so it can be a program name with args.
5450set dummy $ac_prog; ac_word=$2
5451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5452$as_echo_n "checking for $ac_word... " >&6; }
5453if ${ac_cv_path_CP+:} false; then :
5454  $as_echo_n "(cached) " >&6
5455else
5456  case $CP in
5457  [\\/]* | ?:[\\/]*)
5458  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5459  ;;
5460  *)
5461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5462for as_dir in $PATH
5463do
5464  IFS=$as_save_IFS
5465  test -z "$as_dir" && as_dir=.
5466    for ac_exec_ext in '' $ac_executable_extensions; do
5467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5468    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5470    break 2
5471  fi
5472done
5473  done
5474IFS=$as_save_IFS
5475
5476  ;;
5477esac
5478fi
5479CP=$ac_cv_path_CP
5480if test -n "$CP"; then
5481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5482$as_echo "$CP" >&6; }
5483else
5484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5485$as_echo "no" >&6; }
5486fi
5487
5488
5489  test -n "$CP" && break
5490done
5491
5492  else
5493    # The variable is set, but is it from the command line or the environment?
5494
5495    # Try to remove the string !CP! from our list.
5496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5498      # If it failed, the variable was not from the command line. Ignore it,
5499      # but warn the user (except for BASH, which is always set by the calling BASH).
5500      if test "xCP" != xBASH; then
5501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5502$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5503      fi
5504      # Try to locate tool using the code snippet
5505      for ac_prog in cp
5506do
5507  # Extract the first word of "$ac_prog", so it can be a program name with args.
5508set dummy $ac_prog; ac_word=$2
5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5510$as_echo_n "checking for $ac_word... " >&6; }
5511if ${ac_cv_path_CP+:} false; then :
5512  $as_echo_n "(cached) " >&6
5513else
5514  case $CP in
5515  [\\/]* | ?:[\\/]*)
5516  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5517  ;;
5518  *)
5519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5520for as_dir in $PATH
5521do
5522  IFS=$as_save_IFS
5523  test -z "$as_dir" && as_dir=.
5524    for ac_exec_ext in '' $ac_executable_extensions; do
5525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5526    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5528    break 2
5529  fi
5530done
5531  done
5532IFS=$as_save_IFS
5533
5534  ;;
5535esac
5536fi
5537CP=$ac_cv_path_CP
5538if test -n "$CP"; then
5539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5540$as_echo "$CP" >&6; }
5541else
5542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5543$as_echo "no" >&6; }
5544fi
5545
5546
5547  test -n "$CP" && break
5548done
5549
5550    else
5551      # If it succeeded, then it was overridden by the user. We will use it
5552      # for the tool.
5553
5554      # First remove it from the list of overridden variables, so we can test
5555      # for unknown variables in the end.
5556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5557
5558      # Check if the provided tool contains a complete path.
5559      tool_specified="$CP"
5560      tool_basename="${tool_specified##*/}"
5561      if test "x$tool_basename" = "x$tool_specified"; then
5562        # A command without a complete path is provided, search $PATH.
5563        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5564$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5565        # Extract the first word of "$tool_basename", so it can be a program name with args.
5566set dummy $tool_basename; ac_word=$2
5567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5568$as_echo_n "checking for $ac_word... " >&6; }
5569if ${ac_cv_path_CP+:} false; then :
5570  $as_echo_n "(cached) " >&6
5571else
5572  case $CP in
5573  [\\/]* | ?:[\\/]*)
5574  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5575  ;;
5576  *)
5577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5578for as_dir in $PATH
5579do
5580  IFS=$as_save_IFS
5581  test -z "$as_dir" && as_dir=.
5582    for ac_exec_ext in '' $ac_executable_extensions; do
5583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5584    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5586    break 2
5587  fi
5588done
5589  done
5590IFS=$as_save_IFS
5591
5592  ;;
5593esac
5594fi
5595CP=$ac_cv_path_CP
5596if test -n "$CP"; then
5597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5598$as_echo "$CP" >&6; }
5599else
5600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5601$as_echo "no" >&6; }
5602fi
5603
5604
5605        if test "x$CP" = x; then
5606          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5607        fi
5608      else
5609        # Otherwise we believe it is a complete path. Use it as it is.
5610        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5611$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5613$as_echo_n "checking for CP... " >&6; }
5614        if test ! -x "$tool_specified"; then
5615          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5616$as_echo "not found" >&6; }
5617          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5618        fi
5619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5620$as_echo "$tool_specified" >&6; }
5621      fi
5622    fi
5623  fi
5624
5625
5626
5627  if test "x$CP" = x; then
5628    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5629  fi
5630
5631
5632
5633
5634
5635  # Publish this variable in the help.
5636
5637
5638  if test "x$CPIO" = x; then
5639    # The variable is not set by user, try to locate tool using the code snippet
5640    for ac_prog in cpio
5641do
5642  # Extract the first word of "$ac_prog", so it can be a program name with args.
5643set dummy $ac_prog; ac_word=$2
5644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5645$as_echo_n "checking for $ac_word... " >&6; }
5646if ${ac_cv_path_CPIO+:} false; then :
5647  $as_echo_n "(cached) " >&6
5648else
5649  case $CPIO in
5650  [\\/]* | ?:[\\/]*)
5651  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5652  ;;
5653  *)
5654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5655for as_dir in $PATH
5656do
5657  IFS=$as_save_IFS
5658  test -z "$as_dir" && as_dir=.
5659    for ac_exec_ext in '' $ac_executable_extensions; do
5660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5661    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5663    break 2
5664  fi
5665done
5666  done
5667IFS=$as_save_IFS
5668
5669  ;;
5670esac
5671fi
5672CPIO=$ac_cv_path_CPIO
5673if test -n "$CPIO"; then
5674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5675$as_echo "$CPIO" >&6; }
5676else
5677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5678$as_echo "no" >&6; }
5679fi
5680
5681
5682  test -n "$CPIO" && break
5683done
5684
5685  else
5686    # The variable is set, but is it from the command line or the environment?
5687
5688    # Try to remove the string !CPIO! from our list.
5689    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5690    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5691      # If it failed, the variable was not from the command line. Ignore it,
5692      # but warn the user (except for BASH, which is always set by the calling BASH).
5693      if test "xCPIO" != xBASH; then
5694        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5695$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5696      fi
5697      # Try to locate tool using the code snippet
5698      for ac_prog in cpio
5699do
5700  # Extract the first word of "$ac_prog", so it can be a program name with args.
5701set dummy $ac_prog; ac_word=$2
5702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5703$as_echo_n "checking for $ac_word... " >&6; }
5704if ${ac_cv_path_CPIO+:} false; then :
5705  $as_echo_n "(cached) " >&6
5706else
5707  case $CPIO in
5708  [\\/]* | ?:[\\/]*)
5709  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5710  ;;
5711  *)
5712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5713for as_dir in $PATH
5714do
5715  IFS=$as_save_IFS
5716  test -z "$as_dir" && as_dir=.
5717    for ac_exec_ext in '' $ac_executable_extensions; do
5718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5719    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5721    break 2
5722  fi
5723done
5724  done
5725IFS=$as_save_IFS
5726
5727  ;;
5728esac
5729fi
5730CPIO=$ac_cv_path_CPIO
5731if test -n "$CPIO"; then
5732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5733$as_echo "$CPIO" >&6; }
5734else
5735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5736$as_echo "no" >&6; }
5737fi
5738
5739
5740  test -n "$CPIO" && break
5741done
5742
5743    else
5744      # If it succeeded, then it was overridden by the user. We will use it
5745      # for the tool.
5746
5747      # First remove it from the list of overridden variables, so we can test
5748      # for unknown variables in the end.
5749      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5750
5751      # Check if the provided tool contains a complete path.
5752      tool_specified="$CPIO"
5753      tool_basename="${tool_specified##*/}"
5754      if test "x$tool_basename" = "x$tool_specified"; then
5755        # A command without a complete path is provided, search $PATH.
5756        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5757$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5758        # Extract the first word of "$tool_basename", so it can be a program name with args.
5759set dummy $tool_basename; ac_word=$2
5760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5761$as_echo_n "checking for $ac_word... " >&6; }
5762if ${ac_cv_path_CPIO+:} false; then :
5763  $as_echo_n "(cached) " >&6
5764else
5765  case $CPIO in
5766  [\\/]* | ?:[\\/]*)
5767  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5768  ;;
5769  *)
5770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5771for as_dir in $PATH
5772do
5773  IFS=$as_save_IFS
5774  test -z "$as_dir" && as_dir=.
5775    for ac_exec_ext in '' $ac_executable_extensions; do
5776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5777    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5779    break 2
5780  fi
5781done
5782  done
5783IFS=$as_save_IFS
5784
5785  ;;
5786esac
5787fi
5788CPIO=$ac_cv_path_CPIO
5789if test -n "$CPIO"; then
5790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5791$as_echo "$CPIO" >&6; }
5792else
5793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5794$as_echo "no" >&6; }
5795fi
5796
5797
5798        if test "x$CPIO" = x; then
5799          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5800        fi
5801      else
5802        # Otherwise we believe it is a complete path. Use it as it is.
5803        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5804$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5805        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5806$as_echo_n "checking for CPIO... " >&6; }
5807        if test ! -x "$tool_specified"; then
5808          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5809$as_echo "not found" >&6; }
5810          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5811        fi
5812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5813$as_echo "$tool_specified" >&6; }
5814      fi
5815    fi
5816  fi
5817
5818
5819
5820  if test "x$CPIO" = x; then
5821    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5822  fi
5823
5824
5825
5826
5827
5828  # Publish this variable in the help.
5829
5830
5831  if test "x$CUT" = x; then
5832    # The variable is not set by user, try to locate tool using the code snippet
5833    for ac_prog in cut
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CUT+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CUT in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CUT=$ac_cv_path_CUT
5866if test -n "$CUT"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5868$as_echo "$CUT" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CUT" && break
5876done
5877
5878  else
5879    # The variable is set, but is it from the command line or the environment?
5880
5881    # Try to remove the string !CUT! from our list.
5882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5884      # If it failed, the variable was not from the command line. Ignore it,
5885      # but warn the user (except for BASH, which is always set by the calling BASH).
5886      if test "xCUT" != xBASH; then
5887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5888$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5889      fi
5890      # Try to locate tool using the code snippet
5891      for ac_prog in cut
5892do
5893  # Extract the first word of "$ac_prog", so it can be a program name with args.
5894set dummy $ac_prog; ac_word=$2
5895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5896$as_echo_n "checking for $ac_word... " >&6; }
5897if ${ac_cv_path_CUT+:} false; then :
5898  $as_echo_n "(cached) " >&6
5899else
5900  case $CUT in
5901  [\\/]* | ?:[\\/]*)
5902  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5903  ;;
5904  *)
5905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5906for as_dir in $PATH
5907do
5908  IFS=$as_save_IFS
5909  test -z "$as_dir" && as_dir=.
5910    for ac_exec_ext in '' $ac_executable_extensions; do
5911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5912    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5914    break 2
5915  fi
5916done
5917  done
5918IFS=$as_save_IFS
5919
5920  ;;
5921esac
5922fi
5923CUT=$ac_cv_path_CUT
5924if test -n "$CUT"; then
5925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5926$as_echo "$CUT" >&6; }
5927else
5928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5929$as_echo "no" >&6; }
5930fi
5931
5932
5933  test -n "$CUT" && break
5934done
5935
5936    else
5937      # If it succeeded, then it was overridden by the user. We will use it
5938      # for the tool.
5939
5940      # First remove it from the list of overridden variables, so we can test
5941      # for unknown variables in the end.
5942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5943
5944      # Check if the provided tool contains a complete path.
5945      tool_specified="$CUT"
5946      tool_basename="${tool_specified##*/}"
5947      if test "x$tool_basename" = "x$tool_specified"; then
5948        # A command without a complete path is provided, search $PATH.
5949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5950$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5951        # Extract the first word of "$tool_basename", so it can be a program name with args.
5952set dummy $tool_basename; ac_word=$2
5953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5954$as_echo_n "checking for $ac_word... " >&6; }
5955if ${ac_cv_path_CUT+:} false; then :
5956  $as_echo_n "(cached) " >&6
5957else
5958  case $CUT in
5959  [\\/]* | ?:[\\/]*)
5960  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5961  ;;
5962  *)
5963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5964for as_dir in $PATH
5965do
5966  IFS=$as_save_IFS
5967  test -z "$as_dir" && as_dir=.
5968    for ac_exec_ext in '' $ac_executable_extensions; do
5969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5970    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5972    break 2
5973  fi
5974done
5975  done
5976IFS=$as_save_IFS
5977
5978  ;;
5979esac
5980fi
5981CUT=$ac_cv_path_CUT
5982if test -n "$CUT"; then
5983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5984$as_echo "$CUT" >&6; }
5985else
5986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5987$as_echo "no" >&6; }
5988fi
5989
5990
5991        if test "x$CUT" = x; then
5992          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5993        fi
5994      else
5995        # Otherwise we believe it is a complete path. Use it as it is.
5996        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5997$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5998        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5999$as_echo_n "checking for CUT... " >&6; }
6000        if test ! -x "$tool_specified"; then
6001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6002$as_echo "not found" >&6; }
6003          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6004        fi
6005        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6006$as_echo "$tool_specified" >&6; }
6007      fi
6008    fi
6009  fi
6010
6011
6012
6013  if test "x$CUT" = x; then
6014    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6015  fi
6016
6017
6018
6019
6020
6021  # Publish this variable in the help.
6022
6023
6024  if test "x$DATE" = x; then
6025    # The variable is not set by user, try to locate tool using the code snippet
6026    for ac_prog in date
6027do
6028  # Extract the first word of "$ac_prog", so it can be a program name with args.
6029set dummy $ac_prog; ac_word=$2
6030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6031$as_echo_n "checking for $ac_word... " >&6; }
6032if ${ac_cv_path_DATE+:} false; then :
6033  $as_echo_n "(cached) " >&6
6034else
6035  case $DATE in
6036  [\\/]* | ?:[\\/]*)
6037  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6038  ;;
6039  *)
6040  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6041for as_dir in $PATH
6042do
6043  IFS=$as_save_IFS
6044  test -z "$as_dir" && as_dir=.
6045    for ac_exec_ext in '' $ac_executable_extensions; do
6046  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6047    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6048    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6049    break 2
6050  fi
6051done
6052  done
6053IFS=$as_save_IFS
6054
6055  ;;
6056esac
6057fi
6058DATE=$ac_cv_path_DATE
6059if test -n "$DATE"; then
6060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6061$as_echo "$DATE" >&6; }
6062else
6063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6064$as_echo "no" >&6; }
6065fi
6066
6067
6068  test -n "$DATE" && break
6069done
6070
6071  else
6072    # The variable is set, but is it from the command line or the environment?
6073
6074    # Try to remove the string !DATE! from our list.
6075    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6076    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6077      # If it failed, the variable was not from the command line. Ignore it,
6078      # but warn the user (except for BASH, which is always set by the calling BASH).
6079      if test "xDATE" != xBASH; then
6080        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6081$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6082      fi
6083      # Try to locate tool using the code snippet
6084      for ac_prog in date
6085do
6086  # Extract the first word of "$ac_prog", so it can be a program name with args.
6087set dummy $ac_prog; ac_word=$2
6088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6089$as_echo_n "checking for $ac_word... " >&6; }
6090if ${ac_cv_path_DATE+:} false; then :
6091  $as_echo_n "(cached) " >&6
6092else
6093  case $DATE in
6094  [\\/]* | ?:[\\/]*)
6095  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6096  ;;
6097  *)
6098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6099for as_dir in $PATH
6100do
6101  IFS=$as_save_IFS
6102  test -z "$as_dir" && as_dir=.
6103    for ac_exec_ext in '' $ac_executable_extensions; do
6104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6105    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6107    break 2
6108  fi
6109done
6110  done
6111IFS=$as_save_IFS
6112
6113  ;;
6114esac
6115fi
6116DATE=$ac_cv_path_DATE
6117if test -n "$DATE"; then
6118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6119$as_echo "$DATE" >&6; }
6120else
6121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6122$as_echo "no" >&6; }
6123fi
6124
6125
6126  test -n "$DATE" && break
6127done
6128
6129    else
6130      # If it succeeded, then it was overridden by the user. We will use it
6131      # for the tool.
6132
6133      # First remove it from the list of overridden variables, so we can test
6134      # for unknown variables in the end.
6135      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6136
6137      # Check if the provided tool contains a complete path.
6138      tool_specified="$DATE"
6139      tool_basename="${tool_specified##*/}"
6140      if test "x$tool_basename" = "x$tool_specified"; then
6141        # A command without a complete path is provided, search $PATH.
6142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6143$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6144        # Extract the first word of "$tool_basename", so it can be a program name with args.
6145set dummy $tool_basename; ac_word=$2
6146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6147$as_echo_n "checking for $ac_word... " >&6; }
6148if ${ac_cv_path_DATE+:} false; then :
6149  $as_echo_n "(cached) " >&6
6150else
6151  case $DATE in
6152  [\\/]* | ?:[\\/]*)
6153  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6154  ;;
6155  *)
6156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6157for as_dir in $PATH
6158do
6159  IFS=$as_save_IFS
6160  test -z "$as_dir" && as_dir=.
6161    for ac_exec_ext in '' $ac_executable_extensions; do
6162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6163    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6165    break 2
6166  fi
6167done
6168  done
6169IFS=$as_save_IFS
6170
6171  ;;
6172esac
6173fi
6174DATE=$ac_cv_path_DATE
6175if test -n "$DATE"; then
6176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6177$as_echo "$DATE" >&6; }
6178else
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6180$as_echo "no" >&6; }
6181fi
6182
6183
6184        if test "x$DATE" = x; then
6185          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6186        fi
6187      else
6188        # Otherwise we believe it is a complete path. Use it as it is.
6189        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6190$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6192$as_echo_n "checking for DATE... " >&6; }
6193        if test ! -x "$tool_specified"; then
6194          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6195$as_echo "not found" >&6; }
6196          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6197        fi
6198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6199$as_echo "$tool_specified" >&6; }
6200      fi
6201    fi
6202  fi
6203
6204
6205
6206  if test "x$DATE" = x; then
6207    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6208  fi
6209
6210
6211
6212
6213
6214  # Publish this variable in the help.
6215
6216
6217  if test "x$DIFF" = x; then
6218    # The variable is not set by user, try to locate tool using the code snippet
6219    for ac_prog in gdiff diff
6220do
6221  # Extract the first word of "$ac_prog", so it can be a program name with args.
6222set dummy $ac_prog; ac_word=$2
6223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6224$as_echo_n "checking for $ac_word... " >&6; }
6225if ${ac_cv_path_DIFF+:} false; then :
6226  $as_echo_n "(cached) " >&6
6227else
6228  case $DIFF in
6229  [\\/]* | ?:[\\/]*)
6230  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6231  ;;
6232  *)
6233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6234for as_dir in $PATH
6235do
6236  IFS=$as_save_IFS
6237  test -z "$as_dir" && as_dir=.
6238    for ac_exec_ext in '' $ac_executable_extensions; do
6239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6240    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6242    break 2
6243  fi
6244done
6245  done
6246IFS=$as_save_IFS
6247
6248  ;;
6249esac
6250fi
6251DIFF=$ac_cv_path_DIFF
6252if test -n "$DIFF"; then
6253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6254$as_echo "$DIFF" >&6; }
6255else
6256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6257$as_echo "no" >&6; }
6258fi
6259
6260
6261  test -n "$DIFF" && break
6262done
6263
6264  else
6265    # The variable is set, but is it from the command line or the environment?
6266
6267    # Try to remove the string !DIFF! from our list.
6268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6270      # If it failed, the variable was not from the command line. Ignore it,
6271      # but warn the user (except for BASH, which is always set by the calling BASH).
6272      if test "xDIFF" != xBASH; then
6273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6274$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6275      fi
6276      # Try to locate tool using the code snippet
6277      for ac_prog in gdiff diff
6278do
6279  # Extract the first word of "$ac_prog", so it can be a program name with args.
6280set dummy $ac_prog; ac_word=$2
6281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6282$as_echo_n "checking for $ac_word... " >&6; }
6283if ${ac_cv_path_DIFF+:} false; then :
6284  $as_echo_n "(cached) " >&6
6285else
6286  case $DIFF in
6287  [\\/]* | ?:[\\/]*)
6288  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6289  ;;
6290  *)
6291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6292for as_dir in $PATH
6293do
6294  IFS=$as_save_IFS
6295  test -z "$as_dir" && as_dir=.
6296    for ac_exec_ext in '' $ac_executable_extensions; do
6297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6298    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6300    break 2
6301  fi
6302done
6303  done
6304IFS=$as_save_IFS
6305
6306  ;;
6307esac
6308fi
6309DIFF=$ac_cv_path_DIFF
6310if test -n "$DIFF"; then
6311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6312$as_echo "$DIFF" >&6; }
6313else
6314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6315$as_echo "no" >&6; }
6316fi
6317
6318
6319  test -n "$DIFF" && break
6320done
6321
6322    else
6323      # If it succeeded, then it was overridden by the user. We will use it
6324      # for the tool.
6325
6326      # First remove it from the list of overridden variables, so we can test
6327      # for unknown variables in the end.
6328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6329
6330      # Check if the provided tool contains a complete path.
6331      tool_specified="$DIFF"
6332      tool_basename="${tool_specified##*/}"
6333      if test "x$tool_basename" = "x$tool_specified"; then
6334        # A command without a complete path is provided, search $PATH.
6335        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6336$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6337        # Extract the first word of "$tool_basename", so it can be a program name with args.
6338set dummy $tool_basename; ac_word=$2
6339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6340$as_echo_n "checking for $ac_word... " >&6; }
6341if ${ac_cv_path_DIFF+:} false; then :
6342  $as_echo_n "(cached) " >&6
6343else
6344  case $DIFF in
6345  [\\/]* | ?:[\\/]*)
6346  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6347  ;;
6348  *)
6349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6350for as_dir in $PATH
6351do
6352  IFS=$as_save_IFS
6353  test -z "$as_dir" && as_dir=.
6354    for ac_exec_ext in '' $ac_executable_extensions; do
6355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6356    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6358    break 2
6359  fi
6360done
6361  done
6362IFS=$as_save_IFS
6363
6364  ;;
6365esac
6366fi
6367DIFF=$ac_cv_path_DIFF
6368if test -n "$DIFF"; then
6369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6370$as_echo "$DIFF" >&6; }
6371else
6372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6373$as_echo "no" >&6; }
6374fi
6375
6376
6377        if test "x$DIFF" = x; then
6378          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6379        fi
6380      else
6381        # Otherwise we believe it is a complete path. Use it as it is.
6382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6383$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6385$as_echo_n "checking for DIFF... " >&6; }
6386        if test ! -x "$tool_specified"; then
6387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6388$as_echo "not found" >&6; }
6389          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6390        fi
6391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6392$as_echo "$tool_specified" >&6; }
6393      fi
6394    fi
6395  fi
6396
6397
6398
6399  if test "x$DIFF" = x; then
6400    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6401  fi
6402
6403
6404
6405
6406
6407  # Publish this variable in the help.
6408
6409
6410  if test "x$DIRNAME" = x; then
6411    # The variable is not set by user, try to locate tool using the code snippet
6412    for ac_prog in dirname
6413do
6414  # Extract the first word of "$ac_prog", so it can be a program name with args.
6415set dummy $ac_prog; ac_word=$2
6416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6417$as_echo_n "checking for $ac_word... " >&6; }
6418if ${ac_cv_path_DIRNAME+:} false; then :
6419  $as_echo_n "(cached) " >&6
6420else
6421  case $DIRNAME in
6422  [\\/]* | ?:[\\/]*)
6423  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6424  ;;
6425  *)
6426  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6427for as_dir in $PATH
6428do
6429  IFS=$as_save_IFS
6430  test -z "$as_dir" && as_dir=.
6431    for ac_exec_ext in '' $ac_executable_extensions; do
6432  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6433    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6434    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6435    break 2
6436  fi
6437done
6438  done
6439IFS=$as_save_IFS
6440
6441  ;;
6442esac
6443fi
6444DIRNAME=$ac_cv_path_DIRNAME
6445if test -n "$DIRNAME"; then
6446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6447$as_echo "$DIRNAME" >&6; }
6448else
6449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6450$as_echo "no" >&6; }
6451fi
6452
6453
6454  test -n "$DIRNAME" && break
6455done
6456
6457  else
6458    # The variable is set, but is it from the command line or the environment?
6459
6460    # Try to remove the string !DIRNAME! from our list.
6461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6463      # If it failed, the variable was not from the command line. Ignore it,
6464      # but warn the user (except for BASH, which is always set by the calling BASH).
6465      if test "xDIRNAME" != xBASH; then
6466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6467$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6468      fi
6469      # Try to locate tool using the code snippet
6470      for ac_prog in dirname
6471do
6472  # Extract the first word of "$ac_prog", so it can be a program name with args.
6473set dummy $ac_prog; ac_word=$2
6474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6475$as_echo_n "checking for $ac_word... " >&6; }
6476if ${ac_cv_path_DIRNAME+:} false; then :
6477  $as_echo_n "(cached) " >&6
6478else
6479  case $DIRNAME in
6480  [\\/]* | ?:[\\/]*)
6481  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6482  ;;
6483  *)
6484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6485for as_dir in $PATH
6486do
6487  IFS=$as_save_IFS
6488  test -z "$as_dir" && as_dir=.
6489    for ac_exec_ext in '' $ac_executable_extensions; do
6490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6491    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6493    break 2
6494  fi
6495done
6496  done
6497IFS=$as_save_IFS
6498
6499  ;;
6500esac
6501fi
6502DIRNAME=$ac_cv_path_DIRNAME
6503if test -n "$DIRNAME"; then
6504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6505$as_echo "$DIRNAME" >&6; }
6506else
6507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6508$as_echo "no" >&6; }
6509fi
6510
6511
6512  test -n "$DIRNAME" && break
6513done
6514
6515    else
6516      # If it succeeded, then it was overridden by the user. We will use it
6517      # for the tool.
6518
6519      # First remove it from the list of overridden variables, so we can test
6520      # for unknown variables in the end.
6521      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6522
6523      # Check if the provided tool contains a complete path.
6524      tool_specified="$DIRNAME"
6525      tool_basename="${tool_specified##*/}"
6526      if test "x$tool_basename" = "x$tool_specified"; then
6527        # A command without a complete path is provided, search $PATH.
6528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6529$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6530        # Extract the first word of "$tool_basename", so it can be a program name with args.
6531set dummy $tool_basename; ac_word=$2
6532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533$as_echo_n "checking for $ac_word... " >&6; }
6534if ${ac_cv_path_DIRNAME+:} false; then :
6535  $as_echo_n "(cached) " >&6
6536else
6537  case $DIRNAME in
6538  [\\/]* | ?:[\\/]*)
6539  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6540  ;;
6541  *)
6542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6543for as_dir in $PATH
6544do
6545  IFS=$as_save_IFS
6546  test -z "$as_dir" && as_dir=.
6547    for ac_exec_ext in '' $ac_executable_extensions; do
6548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6549    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6551    break 2
6552  fi
6553done
6554  done
6555IFS=$as_save_IFS
6556
6557  ;;
6558esac
6559fi
6560DIRNAME=$ac_cv_path_DIRNAME
6561if test -n "$DIRNAME"; then
6562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6563$as_echo "$DIRNAME" >&6; }
6564else
6565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6566$as_echo "no" >&6; }
6567fi
6568
6569
6570        if test "x$DIRNAME" = x; then
6571          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6572        fi
6573      else
6574        # Otherwise we believe it is a complete path. Use it as it is.
6575        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6576$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6577        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6578$as_echo_n "checking for DIRNAME... " >&6; }
6579        if test ! -x "$tool_specified"; then
6580          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6581$as_echo "not found" >&6; }
6582          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6583        fi
6584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6585$as_echo "$tool_specified" >&6; }
6586      fi
6587    fi
6588  fi
6589
6590
6591
6592  if test "x$DIRNAME" = x; then
6593    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6594  fi
6595
6596
6597
6598
6599
6600  # Publish this variable in the help.
6601
6602
6603  if test "x$ECHO" = x; then
6604    # The variable is not set by user, try to locate tool using the code snippet
6605    for ac_prog in echo
6606do
6607  # Extract the first word of "$ac_prog", so it can be a program name with args.
6608set dummy $ac_prog; ac_word=$2
6609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6610$as_echo_n "checking for $ac_word... " >&6; }
6611if ${ac_cv_path_ECHO+:} false; then :
6612  $as_echo_n "(cached) " >&6
6613else
6614  case $ECHO in
6615  [\\/]* | ?:[\\/]*)
6616  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6617  ;;
6618  *)
6619  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6620for as_dir in $PATH
6621do
6622  IFS=$as_save_IFS
6623  test -z "$as_dir" && as_dir=.
6624    for ac_exec_ext in '' $ac_executable_extensions; do
6625  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6626    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6627    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6628    break 2
6629  fi
6630done
6631  done
6632IFS=$as_save_IFS
6633
6634  ;;
6635esac
6636fi
6637ECHO=$ac_cv_path_ECHO
6638if test -n "$ECHO"; then
6639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6640$as_echo "$ECHO" >&6; }
6641else
6642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6643$as_echo "no" >&6; }
6644fi
6645
6646
6647  test -n "$ECHO" && break
6648done
6649
6650  else
6651    # The variable is set, but is it from the command line or the environment?
6652
6653    # Try to remove the string !ECHO! from our list.
6654    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6655    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6656      # If it failed, the variable was not from the command line. Ignore it,
6657      # but warn the user (except for BASH, which is always set by the calling BASH).
6658      if test "xECHO" != xBASH; then
6659        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6660$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6661      fi
6662      # Try to locate tool using the code snippet
6663      for ac_prog in echo
6664do
6665  # Extract the first word of "$ac_prog", so it can be a program name with args.
6666set dummy $ac_prog; ac_word=$2
6667{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6668$as_echo_n "checking for $ac_word... " >&6; }
6669if ${ac_cv_path_ECHO+:} false; then :
6670  $as_echo_n "(cached) " >&6
6671else
6672  case $ECHO in
6673  [\\/]* | ?:[\\/]*)
6674  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6675  ;;
6676  *)
6677  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6678for as_dir in $PATH
6679do
6680  IFS=$as_save_IFS
6681  test -z "$as_dir" && as_dir=.
6682    for ac_exec_ext in '' $ac_executable_extensions; do
6683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6684    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6685    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6686    break 2
6687  fi
6688done
6689  done
6690IFS=$as_save_IFS
6691
6692  ;;
6693esac
6694fi
6695ECHO=$ac_cv_path_ECHO
6696if test -n "$ECHO"; then
6697  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6698$as_echo "$ECHO" >&6; }
6699else
6700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6701$as_echo "no" >&6; }
6702fi
6703
6704
6705  test -n "$ECHO" && break
6706done
6707
6708    else
6709      # If it succeeded, then it was overridden by the user. We will use it
6710      # for the tool.
6711
6712      # First remove it from the list of overridden variables, so we can test
6713      # for unknown variables in the end.
6714      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6715
6716      # Check if the provided tool contains a complete path.
6717      tool_specified="$ECHO"
6718      tool_basename="${tool_specified##*/}"
6719      if test "x$tool_basename" = "x$tool_specified"; then
6720        # A command without a complete path is provided, search $PATH.
6721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6722$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6723        # Extract the first word of "$tool_basename", so it can be a program name with args.
6724set dummy $tool_basename; ac_word=$2
6725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6726$as_echo_n "checking for $ac_word... " >&6; }
6727if ${ac_cv_path_ECHO+:} false; then :
6728  $as_echo_n "(cached) " >&6
6729else
6730  case $ECHO in
6731  [\\/]* | ?:[\\/]*)
6732  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6733  ;;
6734  *)
6735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6736for as_dir in $PATH
6737do
6738  IFS=$as_save_IFS
6739  test -z "$as_dir" && as_dir=.
6740    for ac_exec_ext in '' $ac_executable_extensions; do
6741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6742    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6744    break 2
6745  fi
6746done
6747  done
6748IFS=$as_save_IFS
6749
6750  ;;
6751esac
6752fi
6753ECHO=$ac_cv_path_ECHO
6754if test -n "$ECHO"; then
6755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6756$as_echo "$ECHO" >&6; }
6757else
6758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6759$as_echo "no" >&6; }
6760fi
6761
6762
6763        if test "x$ECHO" = x; then
6764          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6765        fi
6766      else
6767        # Otherwise we believe it is a complete path. Use it as it is.
6768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6769$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6770        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6771$as_echo_n "checking for ECHO... " >&6; }
6772        if test ! -x "$tool_specified"; then
6773          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6774$as_echo "not found" >&6; }
6775          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6776        fi
6777        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6778$as_echo "$tool_specified" >&6; }
6779      fi
6780    fi
6781  fi
6782
6783
6784
6785  if test "x$ECHO" = x; then
6786    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6787  fi
6788
6789
6790
6791
6792
6793  # Publish this variable in the help.
6794
6795
6796  if test "x$EXPR" = x; then
6797    # The variable is not set by user, try to locate tool using the code snippet
6798    for ac_prog in expr
6799do
6800  # Extract the first word of "$ac_prog", so it can be a program name with args.
6801set dummy $ac_prog; ac_word=$2
6802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6803$as_echo_n "checking for $ac_word... " >&6; }
6804if ${ac_cv_path_EXPR+:} false; then :
6805  $as_echo_n "(cached) " >&6
6806else
6807  case $EXPR in
6808  [\\/]* | ?:[\\/]*)
6809  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6810  ;;
6811  *)
6812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6813for as_dir in $PATH
6814do
6815  IFS=$as_save_IFS
6816  test -z "$as_dir" && as_dir=.
6817    for ac_exec_ext in '' $ac_executable_extensions; do
6818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6819    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6821    break 2
6822  fi
6823done
6824  done
6825IFS=$as_save_IFS
6826
6827  ;;
6828esac
6829fi
6830EXPR=$ac_cv_path_EXPR
6831if test -n "$EXPR"; then
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6833$as_echo "$EXPR" >&6; }
6834else
6835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6836$as_echo "no" >&6; }
6837fi
6838
6839
6840  test -n "$EXPR" && break
6841done
6842
6843  else
6844    # The variable is set, but is it from the command line or the environment?
6845
6846    # Try to remove the string !EXPR! from our list.
6847    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6848    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6849      # If it failed, the variable was not from the command line. Ignore it,
6850      # but warn the user (except for BASH, which is always set by the calling BASH).
6851      if test "xEXPR" != xBASH; then
6852        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6853$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6854      fi
6855      # Try to locate tool using the code snippet
6856      for ac_prog in expr
6857do
6858  # Extract the first word of "$ac_prog", so it can be a program name with args.
6859set dummy $ac_prog; ac_word=$2
6860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6861$as_echo_n "checking for $ac_word... " >&6; }
6862if ${ac_cv_path_EXPR+:} false; then :
6863  $as_echo_n "(cached) " >&6
6864else
6865  case $EXPR in
6866  [\\/]* | ?:[\\/]*)
6867  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6868  ;;
6869  *)
6870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6871for as_dir in $PATH
6872do
6873  IFS=$as_save_IFS
6874  test -z "$as_dir" && as_dir=.
6875    for ac_exec_ext in '' $ac_executable_extensions; do
6876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6877    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6879    break 2
6880  fi
6881done
6882  done
6883IFS=$as_save_IFS
6884
6885  ;;
6886esac
6887fi
6888EXPR=$ac_cv_path_EXPR
6889if test -n "$EXPR"; then
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6891$as_echo "$EXPR" >&6; }
6892else
6893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6894$as_echo "no" >&6; }
6895fi
6896
6897
6898  test -n "$EXPR" && break
6899done
6900
6901    else
6902      # If it succeeded, then it was overridden by the user. We will use it
6903      # for the tool.
6904
6905      # First remove it from the list of overridden variables, so we can test
6906      # for unknown variables in the end.
6907      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6908
6909      # Check if the provided tool contains a complete path.
6910      tool_specified="$EXPR"
6911      tool_basename="${tool_specified##*/}"
6912      if test "x$tool_basename" = "x$tool_specified"; then
6913        # A command without a complete path is provided, search $PATH.
6914        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6915$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6916        # Extract the first word of "$tool_basename", so it can be a program name with args.
6917set dummy $tool_basename; ac_word=$2
6918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6919$as_echo_n "checking for $ac_word... " >&6; }
6920if ${ac_cv_path_EXPR+:} false; then :
6921  $as_echo_n "(cached) " >&6
6922else
6923  case $EXPR in
6924  [\\/]* | ?:[\\/]*)
6925  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6926  ;;
6927  *)
6928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6929for as_dir in $PATH
6930do
6931  IFS=$as_save_IFS
6932  test -z "$as_dir" && as_dir=.
6933    for ac_exec_ext in '' $ac_executable_extensions; do
6934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6935    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6937    break 2
6938  fi
6939done
6940  done
6941IFS=$as_save_IFS
6942
6943  ;;
6944esac
6945fi
6946EXPR=$ac_cv_path_EXPR
6947if test -n "$EXPR"; then
6948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6949$as_echo "$EXPR" >&6; }
6950else
6951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6952$as_echo "no" >&6; }
6953fi
6954
6955
6956        if test "x$EXPR" = x; then
6957          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6958        fi
6959      else
6960        # Otherwise we believe it is a complete path. Use it as it is.
6961        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6962$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6963        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6964$as_echo_n "checking for EXPR... " >&6; }
6965        if test ! -x "$tool_specified"; then
6966          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6967$as_echo "not found" >&6; }
6968          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6969        fi
6970        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6971$as_echo "$tool_specified" >&6; }
6972      fi
6973    fi
6974  fi
6975
6976
6977
6978  if test "x$EXPR" = x; then
6979    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6980  fi
6981
6982
6983
6984
6985
6986  # Publish this variable in the help.
6987
6988
6989  if test "x$FILE" = x; then
6990    # The variable is not set by user, try to locate tool using the code snippet
6991    for ac_prog in file
6992do
6993  # Extract the first word of "$ac_prog", so it can be a program name with args.
6994set dummy $ac_prog; ac_word=$2
6995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6996$as_echo_n "checking for $ac_word... " >&6; }
6997if ${ac_cv_path_FILE+:} false; then :
6998  $as_echo_n "(cached) " >&6
6999else
7000  case $FILE in
7001  [\\/]* | ?:[\\/]*)
7002  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7003  ;;
7004  *)
7005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7006for as_dir in $PATH
7007do
7008  IFS=$as_save_IFS
7009  test -z "$as_dir" && as_dir=.
7010    for ac_exec_ext in '' $ac_executable_extensions; do
7011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7012    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7014    break 2
7015  fi
7016done
7017  done
7018IFS=$as_save_IFS
7019
7020  ;;
7021esac
7022fi
7023FILE=$ac_cv_path_FILE
7024if test -n "$FILE"; then
7025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7026$as_echo "$FILE" >&6; }
7027else
7028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7029$as_echo "no" >&6; }
7030fi
7031
7032
7033  test -n "$FILE" && break
7034done
7035
7036  else
7037    # The variable is set, but is it from the command line or the environment?
7038
7039    # Try to remove the string !FILE! from our list.
7040    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7041    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7042      # If it failed, the variable was not from the command line. Ignore it,
7043      # but warn the user (except for BASH, which is always set by the calling BASH).
7044      if test "xFILE" != xBASH; then
7045        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7046$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7047      fi
7048      # Try to locate tool using the code snippet
7049      for ac_prog in file
7050do
7051  # Extract the first word of "$ac_prog", so it can be a program name with args.
7052set dummy $ac_prog; ac_word=$2
7053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7054$as_echo_n "checking for $ac_word... " >&6; }
7055if ${ac_cv_path_FILE+:} false; then :
7056  $as_echo_n "(cached) " >&6
7057else
7058  case $FILE in
7059  [\\/]* | ?:[\\/]*)
7060  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7061  ;;
7062  *)
7063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7064for as_dir in $PATH
7065do
7066  IFS=$as_save_IFS
7067  test -z "$as_dir" && as_dir=.
7068    for ac_exec_ext in '' $ac_executable_extensions; do
7069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7070    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7072    break 2
7073  fi
7074done
7075  done
7076IFS=$as_save_IFS
7077
7078  ;;
7079esac
7080fi
7081FILE=$ac_cv_path_FILE
7082if test -n "$FILE"; then
7083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7084$as_echo "$FILE" >&6; }
7085else
7086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7087$as_echo "no" >&6; }
7088fi
7089
7090
7091  test -n "$FILE" && break
7092done
7093
7094    else
7095      # If it succeeded, then it was overridden by the user. We will use it
7096      # for the tool.
7097
7098      # First remove it from the list of overridden variables, so we can test
7099      # for unknown variables in the end.
7100      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7101
7102      # Check if the provided tool contains a complete path.
7103      tool_specified="$FILE"
7104      tool_basename="${tool_specified##*/}"
7105      if test "x$tool_basename" = "x$tool_specified"; then
7106        # A command without a complete path is provided, search $PATH.
7107        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7108$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7109        # Extract the first word of "$tool_basename", so it can be a program name with args.
7110set dummy $tool_basename; ac_word=$2
7111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7112$as_echo_n "checking for $ac_word... " >&6; }
7113if ${ac_cv_path_FILE+:} false; then :
7114  $as_echo_n "(cached) " >&6
7115else
7116  case $FILE in
7117  [\\/]* | ?:[\\/]*)
7118  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7119  ;;
7120  *)
7121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7122for as_dir in $PATH
7123do
7124  IFS=$as_save_IFS
7125  test -z "$as_dir" && as_dir=.
7126    for ac_exec_ext in '' $ac_executable_extensions; do
7127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7128    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7130    break 2
7131  fi
7132done
7133  done
7134IFS=$as_save_IFS
7135
7136  ;;
7137esac
7138fi
7139FILE=$ac_cv_path_FILE
7140if test -n "$FILE"; then
7141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7142$as_echo "$FILE" >&6; }
7143else
7144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7145$as_echo "no" >&6; }
7146fi
7147
7148
7149        if test "x$FILE" = x; then
7150          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7151        fi
7152      else
7153        # Otherwise we believe it is a complete path. Use it as it is.
7154        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7155$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7157$as_echo_n "checking for FILE... " >&6; }
7158        if test ! -x "$tool_specified"; then
7159          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7160$as_echo "not found" >&6; }
7161          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7162        fi
7163        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7164$as_echo "$tool_specified" >&6; }
7165      fi
7166    fi
7167  fi
7168
7169
7170
7171  if test "x$FILE" = x; then
7172    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7173  fi
7174
7175
7176
7177
7178
7179  # Publish this variable in the help.
7180
7181
7182  if test "x$FIND" = x; then
7183    # The variable is not set by user, try to locate tool using the code snippet
7184    for ac_prog in find
7185do
7186  # Extract the first word of "$ac_prog", so it can be a program name with args.
7187set dummy $ac_prog; ac_word=$2
7188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7189$as_echo_n "checking for $ac_word... " >&6; }
7190if ${ac_cv_path_FIND+:} false; then :
7191  $as_echo_n "(cached) " >&6
7192else
7193  case $FIND in
7194  [\\/]* | ?:[\\/]*)
7195  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7196  ;;
7197  *)
7198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7199for as_dir in $PATH
7200do
7201  IFS=$as_save_IFS
7202  test -z "$as_dir" && as_dir=.
7203    for ac_exec_ext in '' $ac_executable_extensions; do
7204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7205    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7207    break 2
7208  fi
7209done
7210  done
7211IFS=$as_save_IFS
7212
7213  ;;
7214esac
7215fi
7216FIND=$ac_cv_path_FIND
7217if test -n "$FIND"; then
7218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7219$as_echo "$FIND" >&6; }
7220else
7221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7222$as_echo "no" >&6; }
7223fi
7224
7225
7226  test -n "$FIND" && break
7227done
7228
7229  else
7230    # The variable is set, but is it from the command line or the environment?
7231
7232    # Try to remove the string !FIND! from our list.
7233    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7234    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7235      # If it failed, the variable was not from the command line. Ignore it,
7236      # but warn the user (except for BASH, which is always set by the calling BASH).
7237      if test "xFIND" != xBASH; then
7238        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7239$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7240      fi
7241      # Try to locate tool using the code snippet
7242      for ac_prog in find
7243do
7244  # Extract the first word of "$ac_prog", so it can be a program name with args.
7245set dummy $ac_prog; ac_word=$2
7246{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7247$as_echo_n "checking for $ac_word... " >&6; }
7248if ${ac_cv_path_FIND+:} false; then :
7249  $as_echo_n "(cached) " >&6
7250else
7251  case $FIND in
7252  [\\/]* | ?:[\\/]*)
7253  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7254  ;;
7255  *)
7256  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7257for as_dir in $PATH
7258do
7259  IFS=$as_save_IFS
7260  test -z "$as_dir" && as_dir=.
7261    for ac_exec_ext in '' $ac_executable_extensions; do
7262  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7263    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7264    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7265    break 2
7266  fi
7267done
7268  done
7269IFS=$as_save_IFS
7270
7271  ;;
7272esac
7273fi
7274FIND=$ac_cv_path_FIND
7275if test -n "$FIND"; then
7276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7277$as_echo "$FIND" >&6; }
7278else
7279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7280$as_echo "no" >&6; }
7281fi
7282
7283
7284  test -n "$FIND" && break
7285done
7286
7287    else
7288      # If it succeeded, then it was overridden by the user. We will use it
7289      # for the tool.
7290
7291      # First remove it from the list of overridden variables, so we can test
7292      # for unknown variables in the end.
7293      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7294
7295      # Check if the provided tool contains a complete path.
7296      tool_specified="$FIND"
7297      tool_basename="${tool_specified##*/}"
7298      if test "x$tool_basename" = "x$tool_specified"; then
7299        # A command without a complete path is provided, search $PATH.
7300        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7301$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7302        # Extract the first word of "$tool_basename", so it can be a program name with args.
7303set dummy $tool_basename; ac_word=$2
7304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7305$as_echo_n "checking for $ac_word... " >&6; }
7306if ${ac_cv_path_FIND+:} false; then :
7307  $as_echo_n "(cached) " >&6
7308else
7309  case $FIND in
7310  [\\/]* | ?:[\\/]*)
7311  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7312  ;;
7313  *)
7314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7315for as_dir in $PATH
7316do
7317  IFS=$as_save_IFS
7318  test -z "$as_dir" && as_dir=.
7319    for ac_exec_ext in '' $ac_executable_extensions; do
7320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7321    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7323    break 2
7324  fi
7325done
7326  done
7327IFS=$as_save_IFS
7328
7329  ;;
7330esac
7331fi
7332FIND=$ac_cv_path_FIND
7333if test -n "$FIND"; then
7334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7335$as_echo "$FIND" >&6; }
7336else
7337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7338$as_echo "no" >&6; }
7339fi
7340
7341
7342        if test "x$FIND" = x; then
7343          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7344        fi
7345      else
7346        # Otherwise we believe it is a complete path. Use it as it is.
7347        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7348$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7349        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7350$as_echo_n "checking for FIND... " >&6; }
7351        if test ! -x "$tool_specified"; then
7352          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7353$as_echo "not found" >&6; }
7354          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7355        fi
7356        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7357$as_echo "$tool_specified" >&6; }
7358      fi
7359    fi
7360  fi
7361
7362
7363
7364  if test "x$FIND" = x; then
7365    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7366  fi
7367
7368
7369
7370
7371
7372  # Publish this variable in the help.
7373
7374
7375  if test "x$HEAD" = x; then
7376    # The variable is not set by user, try to locate tool using the code snippet
7377    for ac_prog in head
7378do
7379  # Extract the first word of "$ac_prog", so it can be a program name with args.
7380set dummy $ac_prog; ac_word=$2
7381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7382$as_echo_n "checking for $ac_word... " >&6; }
7383if ${ac_cv_path_HEAD+:} false; then :
7384  $as_echo_n "(cached) " >&6
7385else
7386  case $HEAD in
7387  [\\/]* | ?:[\\/]*)
7388  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7389  ;;
7390  *)
7391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7392for as_dir in $PATH
7393do
7394  IFS=$as_save_IFS
7395  test -z "$as_dir" && as_dir=.
7396    for ac_exec_ext in '' $ac_executable_extensions; do
7397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7398    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7400    break 2
7401  fi
7402done
7403  done
7404IFS=$as_save_IFS
7405
7406  ;;
7407esac
7408fi
7409HEAD=$ac_cv_path_HEAD
7410if test -n "$HEAD"; then
7411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7412$as_echo "$HEAD" >&6; }
7413else
7414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7415$as_echo "no" >&6; }
7416fi
7417
7418
7419  test -n "$HEAD" && break
7420done
7421
7422  else
7423    # The variable is set, but is it from the command line or the environment?
7424
7425    # Try to remove the string !HEAD! from our list.
7426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7428      # If it failed, the variable was not from the command line. Ignore it,
7429      # but warn the user (except for BASH, which is always set by the calling BASH).
7430      if test "xHEAD" != xBASH; then
7431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7432$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7433      fi
7434      # Try to locate tool using the code snippet
7435      for ac_prog in head
7436do
7437  # Extract the first word of "$ac_prog", so it can be a program name with args.
7438set dummy $ac_prog; ac_word=$2
7439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7440$as_echo_n "checking for $ac_word... " >&6; }
7441if ${ac_cv_path_HEAD+:} false; then :
7442  $as_echo_n "(cached) " >&6
7443else
7444  case $HEAD in
7445  [\\/]* | ?:[\\/]*)
7446  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7447  ;;
7448  *)
7449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7450for as_dir in $PATH
7451do
7452  IFS=$as_save_IFS
7453  test -z "$as_dir" && as_dir=.
7454    for ac_exec_ext in '' $ac_executable_extensions; do
7455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7456    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7458    break 2
7459  fi
7460done
7461  done
7462IFS=$as_save_IFS
7463
7464  ;;
7465esac
7466fi
7467HEAD=$ac_cv_path_HEAD
7468if test -n "$HEAD"; then
7469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7470$as_echo "$HEAD" >&6; }
7471else
7472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7473$as_echo "no" >&6; }
7474fi
7475
7476
7477  test -n "$HEAD" && break
7478done
7479
7480    else
7481      # If it succeeded, then it was overridden by the user. We will use it
7482      # for the tool.
7483
7484      # First remove it from the list of overridden variables, so we can test
7485      # for unknown variables in the end.
7486      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7487
7488      # Check if the provided tool contains a complete path.
7489      tool_specified="$HEAD"
7490      tool_basename="${tool_specified##*/}"
7491      if test "x$tool_basename" = "x$tool_specified"; then
7492        # A command without a complete path is provided, search $PATH.
7493        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7494$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7495        # Extract the first word of "$tool_basename", so it can be a program name with args.
7496set dummy $tool_basename; ac_word=$2
7497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7498$as_echo_n "checking for $ac_word... " >&6; }
7499if ${ac_cv_path_HEAD+:} false; then :
7500  $as_echo_n "(cached) " >&6
7501else
7502  case $HEAD in
7503  [\\/]* | ?:[\\/]*)
7504  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7505  ;;
7506  *)
7507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7508for as_dir in $PATH
7509do
7510  IFS=$as_save_IFS
7511  test -z "$as_dir" && as_dir=.
7512    for ac_exec_ext in '' $ac_executable_extensions; do
7513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7514    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7516    break 2
7517  fi
7518done
7519  done
7520IFS=$as_save_IFS
7521
7522  ;;
7523esac
7524fi
7525HEAD=$ac_cv_path_HEAD
7526if test -n "$HEAD"; then
7527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7528$as_echo "$HEAD" >&6; }
7529else
7530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7531$as_echo "no" >&6; }
7532fi
7533
7534
7535        if test "x$HEAD" = x; then
7536          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7537        fi
7538      else
7539        # Otherwise we believe it is a complete path. Use it as it is.
7540        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7541$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7543$as_echo_n "checking for HEAD... " >&6; }
7544        if test ! -x "$tool_specified"; then
7545          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7546$as_echo "not found" >&6; }
7547          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7548        fi
7549        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7550$as_echo "$tool_specified" >&6; }
7551      fi
7552    fi
7553  fi
7554
7555
7556
7557  if test "x$HEAD" = x; then
7558    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7559  fi
7560
7561
7562
7563
7564
7565  # Publish this variable in the help.
7566
7567
7568  if test "x$LN" = x; then
7569    # The variable is not set by user, try to locate tool using the code snippet
7570    for ac_prog in ln
7571do
7572  # Extract the first word of "$ac_prog", so it can be a program name with args.
7573set dummy $ac_prog; ac_word=$2
7574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7575$as_echo_n "checking for $ac_word... " >&6; }
7576if ${ac_cv_path_LN+:} false; then :
7577  $as_echo_n "(cached) " >&6
7578else
7579  case $LN in
7580  [\\/]* | ?:[\\/]*)
7581  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7582  ;;
7583  *)
7584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7585for as_dir in $PATH
7586do
7587  IFS=$as_save_IFS
7588  test -z "$as_dir" && as_dir=.
7589    for ac_exec_ext in '' $ac_executable_extensions; do
7590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7591    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7593    break 2
7594  fi
7595done
7596  done
7597IFS=$as_save_IFS
7598
7599  ;;
7600esac
7601fi
7602LN=$ac_cv_path_LN
7603if test -n "$LN"; then
7604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7605$as_echo "$LN" >&6; }
7606else
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7608$as_echo "no" >&6; }
7609fi
7610
7611
7612  test -n "$LN" && break
7613done
7614
7615  else
7616    # The variable is set, but is it from the command line or the environment?
7617
7618    # Try to remove the string !LN! from our list.
7619    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7620    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7621      # If it failed, the variable was not from the command line. Ignore it,
7622      # but warn the user (except for BASH, which is always set by the calling BASH).
7623      if test "xLN" != xBASH; then
7624        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7625$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7626      fi
7627      # Try to locate tool using the code snippet
7628      for ac_prog in ln
7629do
7630  # Extract the first word of "$ac_prog", so it can be a program name with args.
7631set dummy $ac_prog; ac_word=$2
7632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7633$as_echo_n "checking for $ac_word... " >&6; }
7634if ${ac_cv_path_LN+:} false; then :
7635  $as_echo_n "(cached) " >&6
7636else
7637  case $LN in
7638  [\\/]* | ?:[\\/]*)
7639  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7640  ;;
7641  *)
7642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7643for as_dir in $PATH
7644do
7645  IFS=$as_save_IFS
7646  test -z "$as_dir" && as_dir=.
7647    for ac_exec_ext in '' $ac_executable_extensions; do
7648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7649    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7651    break 2
7652  fi
7653done
7654  done
7655IFS=$as_save_IFS
7656
7657  ;;
7658esac
7659fi
7660LN=$ac_cv_path_LN
7661if test -n "$LN"; then
7662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7663$as_echo "$LN" >&6; }
7664else
7665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7666$as_echo "no" >&6; }
7667fi
7668
7669
7670  test -n "$LN" && break
7671done
7672
7673    else
7674      # If it succeeded, then it was overridden by the user. We will use it
7675      # for the tool.
7676
7677      # First remove it from the list of overridden variables, so we can test
7678      # for unknown variables in the end.
7679      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7680
7681      # Check if the provided tool contains a complete path.
7682      tool_specified="$LN"
7683      tool_basename="${tool_specified##*/}"
7684      if test "x$tool_basename" = "x$tool_specified"; then
7685        # A command without a complete path is provided, search $PATH.
7686        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7687$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7688        # Extract the first word of "$tool_basename", so it can be a program name with args.
7689set dummy $tool_basename; ac_word=$2
7690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7691$as_echo_n "checking for $ac_word... " >&6; }
7692if ${ac_cv_path_LN+:} false; then :
7693  $as_echo_n "(cached) " >&6
7694else
7695  case $LN in
7696  [\\/]* | ?:[\\/]*)
7697  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7698  ;;
7699  *)
7700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7701for as_dir in $PATH
7702do
7703  IFS=$as_save_IFS
7704  test -z "$as_dir" && as_dir=.
7705    for ac_exec_ext in '' $ac_executable_extensions; do
7706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7707    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7709    break 2
7710  fi
7711done
7712  done
7713IFS=$as_save_IFS
7714
7715  ;;
7716esac
7717fi
7718LN=$ac_cv_path_LN
7719if test -n "$LN"; then
7720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7721$as_echo "$LN" >&6; }
7722else
7723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7724$as_echo "no" >&6; }
7725fi
7726
7727
7728        if test "x$LN" = x; then
7729          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7730        fi
7731      else
7732        # Otherwise we believe it is a complete path. Use it as it is.
7733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7734$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7735        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7736$as_echo_n "checking for LN... " >&6; }
7737        if test ! -x "$tool_specified"; then
7738          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7739$as_echo "not found" >&6; }
7740          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7741        fi
7742        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7743$as_echo "$tool_specified" >&6; }
7744      fi
7745    fi
7746  fi
7747
7748
7749
7750  if test "x$LN" = x; then
7751    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7752  fi
7753
7754
7755
7756
7757
7758  # Publish this variable in the help.
7759
7760
7761  if test "x$LS" = x; then
7762    # The variable is not set by user, try to locate tool using the code snippet
7763    for ac_prog in ls
7764do
7765  # Extract the first word of "$ac_prog", so it can be a program name with args.
7766set dummy $ac_prog; ac_word=$2
7767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7768$as_echo_n "checking for $ac_word... " >&6; }
7769if ${ac_cv_path_LS+:} false; then :
7770  $as_echo_n "(cached) " >&6
7771else
7772  case $LS in
7773  [\\/]* | ?:[\\/]*)
7774  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7775  ;;
7776  *)
7777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7778for as_dir in $PATH
7779do
7780  IFS=$as_save_IFS
7781  test -z "$as_dir" && as_dir=.
7782    for ac_exec_ext in '' $ac_executable_extensions; do
7783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7784    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7786    break 2
7787  fi
7788done
7789  done
7790IFS=$as_save_IFS
7791
7792  ;;
7793esac
7794fi
7795LS=$ac_cv_path_LS
7796if test -n "$LS"; then
7797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7798$as_echo "$LS" >&6; }
7799else
7800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7801$as_echo "no" >&6; }
7802fi
7803
7804
7805  test -n "$LS" && break
7806done
7807
7808  else
7809    # The variable is set, but is it from the command line or the environment?
7810
7811    # Try to remove the string !LS! from our list.
7812    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7813    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7814      # If it failed, the variable was not from the command line. Ignore it,
7815      # but warn the user (except for BASH, which is always set by the calling BASH).
7816      if test "xLS" != xBASH; then
7817        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7818$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7819      fi
7820      # Try to locate tool using the code snippet
7821      for ac_prog in ls
7822do
7823  # Extract the first word of "$ac_prog", so it can be a program name with args.
7824set dummy $ac_prog; ac_word=$2
7825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7826$as_echo_n "checking for $ac_word... " >&6; }
7827if ${ac_cv_path_LS+:} false; then :
7828  $as_echo_n "(cached) " >&6
7829else
7830  case $LS in
7831  [\\/]* | ?:[\\/]*)
7832  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7833  ;;
7834  *)
7835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7836for as_dir in $PATH
7837do
7838  IFS=$as_save_IFS
7839  test -z "$as_dir" && as_dir=.
7840    for ac_exec_ext in '' $ac_executable_extensions; do
7841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7842    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7844    break 2
7845  fi
7846done
7847  done
7848IFS=$as_save_IFS
7849
7850  ;;
7851esac
7852fi
7853LS=$ac_cv_path_LS
7854if test -n "$LS"; then
7855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7856$as_echo "$LS" >&6; }
7857else
7858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
7860fi
7861
7862
7863  test -n "$LS" && break
7864done
7865
7866    else
7867      # If it succeeded, then it was overridden by the user. We will use it
7868      # for the tool.
7869
7870      # First remove it from the list of overridden variables, so we can test
7871      # for unknown variables in the end.
7872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7873
7874      # Check if the provided tool contains a complete path.
7875      tool_specified="$LS"
7876      tool_basename="${tool_specified##*/}"
7877      if test "x$tool_basename" = "x$tool_specified"; then
7878        # A command without a complete path is provided, search $PATH.
7879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7880$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7881        # Extract the first word of "$tool_basename", so it can be a program name with args.
7882set dummy $tool_basename; ac_word=$2
7883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7884$as_echo_n "checking for $ac_word... " >&6; }
7885if ${ac_cv_path_LS+:} false; then :
7886  $as_echo_n "(cached) " >&6
7887else
7888  case $LS in
7889  [\\/]* | ?:[\\/]*)
7890  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7891  ;;
7892  *)
7893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7894for as_dir in $PATH
7895do
7896  IFS=$as_save_IFS
7897  test -z "$as_dir" && as_dir=.
7898    for ac_exec_ext in '' $ac_executable_extensions; do
7899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7900    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7902    break 2
7903  fi
7904done
7905  done
7906IFS=$as_save_IFS
7907
7908  ;;
7909esac
7910fi
7911LS=$ac_cv_path_LS
7912if test -n "$LS"; then
7913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7914$as_echo "$LS" >&6; }
7915else
7916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7917$as_echo "no" >&6; }
7918fi
7919
7920
7921        if test "x$LS" = x; then
7922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7923        fi
7924      else
7925        # Otherwise we believe it is a complete path. Use it as it is.
7926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7927$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7929$as_echo_n "checking for LS... " >&6; }
7930        if test ! -x "$tool_specified"; then
7931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7932$as_echo "not found" >&6; }
7933          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7934        fi
7935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7936$as_echo "$tool_specified" >&6; }
7937      fi
7938    fi
7939  fi
7940
7941
7942
7943  if test "x$LS" = x; then
7944    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7945  fi
7946
7947
7948
7949
7950
7951  # Publish this variable in the help.
7952
7953
7954  if test "x$MKDIR" = x; then
7955    # The variable is not set by user, try to locate tool using the code snippet
7956    for ac_prog in mkdir
7957do
7958  # Extract the first word of "$ac_prog", so it can be a program name with args.
7959set dummy $ac_prog; ac_word=$2
7960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7961$as_echo_n "checking for $ac_word... " >&6; }
7962if ${ac_cv_path_MKDIR+:} false; then :
7963  $as_echo_n "(cached) " >&6
7964else
7965  case $MKDIR in
7966  [\\/]* | ?:[\\/]*)
7967  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7968  ;;
7969  *)
7970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7971for as_dir in $PATH
7972do
7973  IFS=$as_save_IFS
7974  test -z "$as_dir" && as_dir=.
7975    for ac_exec_ext in '' $ac_executable_extensions; do
7976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7977    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7979    break 2
7980  fi
7981done
7982  done
7983IFS=$as_save_IFS
7984
7985  ;;
7986esac
7987fi
7988MKDIR=$ac_cv_path_MKDIR
7989if test -n "$MKDIR"; then
7990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7991$as_echo "$MKDIR" >&6; }
7992else
7993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7994$as_echo "no" >&6; }
7995fi
7996
7997
7998  test -n "$MKDIR" && break
7999done
8000
8001  else
8002    # The variable is set, but is it from the command line or the environment?
8003
8004    # Try to remove the string !MKDIR! from our list.
8005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8007      # If it failed, the variable was not from the command line. Ignore it,
8008      # but warn the user (except for BASH, which is always set by the calling BASH).
8009      if test "xMKDIR" != xBASH; then
8010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8011$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8012      fi
8013      # Try to locate tool using the code snippet
8014      for ac_prog in mkdir
8015do
8016  # Extract the first word of "$ac_prog", so it can be a program name with args.
8017set dummy $ac_prog; ac_word=$2
8018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8019$as_echo_n "checking for $ac_word... " >&6; }
8020if ${ac_cv_path_MKDIR+:} false; then :
8021  $as_echo_n "(cached) " >&6
8022else
8023  case $MKDIR in
8024  [\\/]* | ?:[\\/]*)
8025  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8026  ;;
8027  *)
8028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8029for as_dir in $PATH
8030do
8031  IFS=$as_save_IFS
8032  test -z "$as_dir" && as_dir=.
8033    for ac_exec_ext in '' $ac_executable_extensions; do
8034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8035    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8037    break 2
8038  fi
8039done
8040  done
8041IFS=$as_save_IFS
8042
8043  ;;
8044esac
8045fi
8046MKDIR=$ac_cv_path_MKDIR
8047if test -n "$MKDIR"; then
8048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8049$as_echo "$MKDIR" >&6; }
8050else
8051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8052$as_echo "no" >&6; }
8053fi
8054
8055
8056  test -n "$MKDIR" && break
8057done
8058
8059    else
8060      # If it succeeded, then it was overridden by the user. We will use it
8061      # for the tool.
8062
8063      # First remove it from the list of overridden variables, so we can test
8064      # for unknown variables in the end.
8065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8066
8067      # Check if the provided tool contains a complete path.
8068      tool_specified="$MKDIR"
8069      tool_basename="${tool_specified##*/}"
8070      if test "x$tool_basename" = "x$tool_specified"; then
8071        # A command without a complete path is provided, search $PATH.
8072        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8073$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8074        # Extract the first word of "$tool_basename", so it can be a program name with args.
8075set dummy $tool_basename; ac_word=$2
8076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8077$as_echo_n "checking for $ac_word... " >&6; }
8078if ${ac_cv_path_MKDIR+:} false; then :
8079  $as_echo_n "(cached) " >&6
8080else
8081  case $MKDIR in
8082  [\\/]* | ?:[\\/]*)
8083  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8084  ;;
8085  *)
8086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8087for as_dir in $PATH
8088do
8089  IFS=$as_save_IFS
8090  test -z "$as_dir" && as_dir=.
8091    for ac_exec_ext in '' $ac_executable_extensions; do
8092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8093    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8095    break 2
8096  fi
8097done
8098  done
8099IFS=$as_save_IFS
8100
8101  ;;
8102esac
8103fi
8104MKDIR=$ac_cv_path_MKDIR
8105if test -n "$MKDIR"; then
8106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8107$as_echo "$MKDIR" >&6; }
8108else
8109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8110$as_echo "no" >&6; }
8111fi
8112
8113
8114        if test "x$MKDIR" = x; then
8115          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8116        fi
8117      else
8118        # Otherwise we believe it is a complete path. Use it as it is.
8119        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8120$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8121        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8122$as_echo_n "checking for MKDIR... " >&6; }
8123        if test ! -x "$tool_specified"; then
8124          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8125$as_echo "not found" >&6; }
8126          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8127        fi
8128        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8129$as_echo "$tool_specified" >&6; }
8130      fi
8131    fi
8132  fi
8133
8134
8135
8136  if test "x$MKDIR" = x; then
8137    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8138  fi
8139
8140
8141
8142
8143
8144  # Publish this variable in the help.
8145
8146
8147  if test "x$MKTEMP" = x; then
8148    # The variable is not set by user, try to locate tool using the code snippet
8149    for ac_prog in mktemp
8150do
8151  # Extract the first word of "$ac_prog", so it can be a program name with args.
8152set dummy $ac_prog; ac_word=$2
8153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8154$as_echo_n "checking for $ac_word... " >&6; }
8155if ${ac_cv_path_MKTEMP+:} false; then :
8156  $as_echo_n "(cached) " >&6
8157else
8158  case $MKTEMP in
8159  [\\/]* | ?:[\\/]*)
8160  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8161  ;;
8162  *)
8163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8164for as_dir in $PATH
8165do
8166  IFS=$as_save_IFS
8167  test -z "$as_dir" && as_dir=.
8168    for ac_exec_ext in '' $ac_executable_extensions; do
8169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8170    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8172    break 2
8173  fi
8174done
8175  done
8176IFS=$as_save_IFS
8177
8178  ;;
8179esac
8180fi
8181MKTEMP=$ac_cv_path_MKTEMP
8182if test -n "$MKTEMP"; then
8183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8184$as_echo "$MKTEMP" >&6; }
8185else
8186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8187$as_echo "no" >&6; }
8188fi
8189
8190
8191  test -n "$MKTEMP" && break
8192done
8193
8194  else
8195    # The variable is set, but is it from the command line or the environment?
8196
8197    # Try to remove the string !MKTEMP! from our list.
8198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8200      # If it failed, the variable was not from the command line. Ignore it,
8201      # but warn the user (except for BASH, which is always set by the calling BASH).
8202      if test "xMKTEMP" != xBASH; then
8203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8204$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8205      fi
8206      # Try to locate tool using the code snippet
8207      for ac_prog in mktemp
8208do
8209  # Extract the first word of "$ac_prog", so it can be a program name with args.
8210set dummy $ac_prog; ac_word=$2
8211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8212$as_echo_n "checking for $ac_word... " >&6; }
8213if ${ac_cv_path_MKTEMP+:} false; then :
8214  $as_echo_n "(cached) " >&6
8215else
8216  case $MKTEMP in
8217  [\\/]* | ?:[\\/]*)
8218  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8219  ;;
8220  *)
8221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8222for as_dir in $PATH
8223do
8224  IFS=$as_save_IFS
8225  test -z "$as_dir" && as_dir=.
8226    for ac_exec_ext in '' $ac_executable_extensions; do
8227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8228    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8230    break 2
8231  fi
8232done
8233  done
8234IFS=$as_save_IFS
8235
8236  ;;
8237esac
8238fi
8239MKTEMP=$ac_cv_path_MKTEMP
8240if test -n "$MKTEMP"; then
8241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8242$as_echo "$MKTEMP" >&6; }
8243else
8244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8245$as_echo "no" >&6; }
8246fi
8247
8248
8249  test -n "$MKTEMP" && break
8250done
8251
8252    else
8253      # If it succeeded, then it was overridden by the user. We will use it
8254      # for the tool.
8255
8256      # First remove it from the list of overridden variables, so we can test
8257      # for unknown variables in the end.
8258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8259
8260      # Check if the provided tool contains a complete path.
8261      tool_specified="$MKTEMP"
8262      tool_basename="${tool_specified##*/}"
8263      if test "x$tool_basename" = "x$tool_specified"; then
8264        # A command without a complete path is provided, search $PATH.
8265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8266$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8267        # Extract the first word of "$tool_basename", so it can be a program name with args.
8268set dummy $tool_basename; ac_word=$2
8269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8270$as_echo_n "checking for $ac_word... " >&6; }
8271if ${ac_cv_path_MKTEMP+:} false; then :
8272  $as_echo_n "(cached) " >&6
8273else
8274  case $MKTEMP in
8275  [\\/]* | ?:[\\/]*)
8276  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8277  ;;
8278  *)
8279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8280for as_dir in $PATH
8281do
8282  IFS=$as_save_IFS
8283  test -z "$as_dir" && as_dir=.
8284    for ac_exec_ext in '' $ac_executable_extensions; do
8285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8286    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8288    break 2
8289  fi
8290done
8291  done
8292IFS=$as_save_IFS
8293
8294  ;;
8295esac
8296fi
8297MKTEMP=$ac_cv_path_MKTEMP
8298if test -n "$MKTEMP"; then
8299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8300$as_echo "$MKTEMP" >&6; }
8301else
8302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8303$as_echo "no" >&6; }
8304fi
8305
8306
8307        if test "x$MKTEMP" = x; then
8308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8309        fi
8310      else
8311        # Otherwise we believe it is a complete path. Use it as it is.
8312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8313$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8315$as_echo_n "checking for MKTEMP... " >&6; }
8316        if test ! -x "$tool_specified"; then
8317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8318$as_echo "not found" >&6; }
8319          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8320        fi
8321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8322$as_echo "$tool_specified" >&6; }
8323      fi
8324    fi
8325  fi
8326
8327
8328
8329  if test "x$MKTEMP" = x; then
8330    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8331  fi
8332
8333
8334
8335
8336
8337  # Publish this variable in the help.
8338
8339
8340  if test "x$MV" = x; then
8341    # The variable is not set by user, try to locate tool using the code snippet
8342    for ac_prog in mv
8343do
8344  # Extract the first word of "$ac_prog", so it can be a program name with args.
8345set dummy $ac_prog; ac_word=$2
8346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8347$as_echo_n "checking for $ac_word... " >&6; }
8348if ${ac_cv_path_MV+:} false; then :
8349  $as_echo_n "(cached) " >&6
8350else
8351  case $MV in
8352  [\\/]* | ?:[\\/]*)
8353  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8354  ;;
8355  *)
8356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8357for as_dir in $PATH
8358do
8359  IFS=$as_save_IFS
8360  test -z "$as_dir" && as_dir=.
8361    for ac_exec_ext in '' $ac_executable_extensions; do
8362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8363    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8365    break 2
8366  fi
8367done
8368  done
8369IFS=$as_save_IFS
8370
8371  ;;
8372esac
8373fi
8374MV=$ac_cv_path_MV
8375if test -n "$MV"; then
8376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8377$as_echo "$MV" >&6; }
8378else
8379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8380$as_echo "no" >&6; }
8381fi
8382
8383
8384  test -n "$MV" && break
8385done
8386
8387  else
8388    # The variable is set, but is it from the command line or the environment?
8389
8390    # Try to remove the string !MV! from our list.
8391    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8392    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8393      # If it failed, the variable was not from the command line. Ignore it,
8394      # but warn the user (except for BASH, which is always set by the calling BASH).
8395      if test "xMV" != xBASH; then
8396        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8397$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8398      fi
8399      # Try to locate tool using the code snippet
8400      for ac_prog in mv
8401do
8402  # Extract the first word of "$ac_prog", so it can be a program name with args.
8403set dummy $ac_prog; ac_word=$2
8404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8405$as_echo_n "checking for $ac_word... " >&6; }
8406if ${ac_cv_path_MV+:} false; then :
8407  $as_echo_n "(cached) " >&6
8408else
8409  case $MV in
8410  [\\/]* | ?:[\\/]*)
8411  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8412  ;;
8413  *)
8414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8415for as_dir in $PATH
8416do
8417  IFS=$as_save_IFS
8418  test -z "$as_dir" && as_dir=.
8419    for ac_exec_ext in '' $ac_executable_extensions; do
8420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8421    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8423    break 2
8424  fi
8425done
8426  done
8427IFS=$as_save_IFS
8428
8429  ;;
8430esac
8431fi
8432MV=$ac_cv_path_MV
8433if test -n "$MV"; then
8434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8435$as_echo "$MV" >&6; }
8436else
8437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8438$as_echo "no" >&6; }
8439fi
8440
8441
8442  test -n "$MV" && break
8443done
8444
8445    else
8446      # If it succeeded, then it was overridden by the user. We will use it
8447      # for the tool.
8448
8449      # First remove it from the list of overridden variables, so we can test
8450      # for unknown variables in the end.
8451      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8452
8453      # Check if the provided tool contains a complete path.
8454      tool_specified="$MV"
8455      tool_basename="${tool_specified##*/}"
8456      if test "x$tool_basename" = "x$tool_specified"; then
8457        # A command without a complete path is provided, search $PATH.
8458        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8459$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8460        # Extract the first word of "$tool_basename", so it can be a program name with args.
8461set dummy $tool_basename; ac_word=$2
8462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8463$as_echo_n "checking for $ac_word... " >&6; }
8464if ${ac_cv_path_MV+:} false; then :
8465  $as_echo_n "(cached) " >&6
8466else
8467  case $MV in
8468  [\\/]* | ?:[\\/]*)
8469  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8470  ;;
8471  *)
8472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8473for as_dir in $PATH
8474do
8475  IFS=$as_save_IFS
8476  test -z "$as_dir" && as_dir=.
8477    for ac_exec_ext in '' $ac_executable_extensions; do
8478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8479    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8481    break 2
8482  fi
8483done
8484  done
8485IFS=$as_save_IFS
8486
8487  ;;
8488esac
8489fi
8490MV=$ac_cv_path_MV
8491if test -n "$MV"; then
8492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8493$as_echo "$MV" >&6; }
8494else
8495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8496$as_echo "no" >&6; }
8497fi
8498
8499
8500        if test "x$MV" = x; then
8501          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8502        fi
8503      else
8504        # Otherwise we believe it is a complete path. Use it as it is.
8505        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8506$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8507        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8508$as_echo_n "checking for MV... " >&6; }
8509        if test ! -x "$tool_specified"; then
8510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8511$as_echo "not found" >&6; }
8512          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8513        fi
8514        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8515$as_echo "$tool_specified" >&6; }
8516      fi
8517    fi
8518  fi
8519
8520
8521
8522  if test "x$MV" = x; then
8523    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8524  fi
8525
8526
8527
8528
8529
8530  # Publish this variable in the help.
8531
8532
8533  if test "x$NAWK" = x; then
8534    # The variable is not set by user, try to locate tool using the code snippet
8535    for ac_prog in nawk gawk awk
8536do
8537  # Extract the first word of "$ac_prog", so it can be a program name with args.
8538set dummy $ac_prog; ac_word=$2
8539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8540$as_echo_n "checking for $ac_word... " >&6; }
8541if ${ac_cv_path_NAWK+:} false; then :
8542  $as_echo_n "(cached) " >&6
8543else
8544  case $NAWK in
8545  [\\/]* | ?:[\\/]*)
8546  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8547  ;;
8548  *)
8549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8550for as_dir in $PATH
8551do
8552  IFS=$as_save_IFS
8553  test -z "$as_dir" && as_dir=.
8554    for ac_exec_ext in '' $ac_executable_extensions; do
8555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8556    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8558    break 2
8559  fi
8560done
8561  done
8562IFS=$as_save_IFS
8563
8564  ;;
8565esac
8566fi
8567NAWK=$ac_cv_path_NAWK
8568if test -n "$NAWK"; then
8569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8570$as_echo "$NAWK" >&6; }
8571else
8572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8573$as_echo "no" >&6; }
8574fi
8575
8576
8577  test -n "$NAWK" && break
8578done
8579
8580  else
8581    # The variable is set, but is it from the command line or the environment?
8582
8583    # Try to remove the string !NAWK! from our list.
8584    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8585    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8586      # If it failed, the variable was not from the command line. Ignore it,
8587      # but warn the user (except for BASH, which is always set by the calling BASH).
8588      if test "xNAWK" != xBASH; then
8589        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8590$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8591      fi
8592      # Try to locate tool using the code snippet
8593      for ac_prog in nawk gawk awk
8594do
8595  # Extract the first word of "$ac_prog", so it can be a program name with args.
8596set dummy $ac_prog; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_NAWK+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $NAWK in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625NAWK=$ac_cv_path_NAWK
8626if test -n "$NAWK"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8628$as_echo "$NAWK" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635  test -n "$NAWK" && break
8636done
8637
8638    else
8639      # If it succeeded, then it was overridden by the user. We will use it
8640      # for the tool.
8641
8642      # First remove it from the list of overridden variables, so we can test
8643      # for unknown variables in the end.
8644      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8645
8646      # Check if the provided tool contains a complete path.
8647      tool_specified="$NAWK"
8648      tool_basename="${tool_specified##*/}"
8649      if test "x$tool_basename" = "x$tool_specified"; then
8650        # A command without a complete path is provided, search $PATH.
8651        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8652$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8653        # Extract the first word of "$tool_basename", so it can be a program name with args.
8654set dummy $tool_basename; ac_word=$2
8655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8656$as_echo_n "checking for $ac_word... " >&6; }
8657if ${ac_cv_path_NAWK+:} false; then :
8658  $as_echo_n "(cached) " >&6
8659else
8660  case $NAWK in
8661  [\\/]* | ?:[\\/]*)
8662  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8663  ;;
8664  *)
8665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8666for as_dir in $PATH
8667do
8668  IFS=$as_save_IFS
8669  test -z "$as_dir" && as_dir=.
8670    for ac_exec_ext in '' $ac_executable_extensions; do
8671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8672    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8674    break 2
8675  fi
8676done
8677  done
8678IFS=$as_save_IFS
8679
8680  ;;
8681esac
8682fi
8683NAWK=$ac_cv_path_NAWK
8684if test -n "$NAWK"; then
8685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8686$as_echo "$NAWK" >&6; }
8687else
8688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8689$as_echo "no" >&6; }
8690fi
8691
8692
8693        if test "x$NAWK" = x; then
8694          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8695        fi
8696      else
8697        # Otherwise we believe it is a complete path. Use it as it is.
8698        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8699$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8700        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8701$as_echo_n "checking for NAWK... " >&6; }
8702        if test ! -x "$tool_specified"; then
8703          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8704$as_echo "not found" >&6; }
8705          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8706        fi
8707        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8708$as_echo "$tool_specified" >&6; }
8709      fi
8710    fi
8711  fi
8712
8713
8714
8715  if test "x$NAWK" = x; then
8716    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8717  fi
8718
8719
8720
8721
8722
8723  # Publish this variable in the help.
8724
8725
8726  if test "x$PRINTF" = x; then
8727    # The variable is not set by user, try to locate tool using the code snippet
8728    for ac_prog in printf
8729do
8730  # Extract the first word of "$ac_prog", so it can be a program name with args.
8731set dummy $ac_prog; ac_word=$2
8732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8733$as_echo_n "checking for $ac_word... " >&6; }
8734if ${ac_cv_path_PRINTF+:} false; then :
8735  $as_echo_n "(cached) " >&6
8736else
8737  case $PRINTF in
8738  [\\/]* | ?:[\\/]*)
8739  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8740  ;;
8741  *)
8742  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8743for as_dir in $PATH
8744do
8745  IFS=$as_save_IFS
8746  test -z "$as_dir" && as_dir=.
8747    for ac_exec_ext in '' $ac_executable_extensions; do
8748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8749    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8751    break 2
8752  fi
8753done
8754  done
8755IFS=$as_save_IFS
8756
8757  ;;
8758esac
8759fi
8760PRINTF=$ac_cv_path_PRINTF
8761if test -n "$PRINTF"; then
8762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8763$as_echo "$PRINTF" >&6; }
8764else
8765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8766$as_echo "no" >&6; }
8767fi
8768
8769
8770  test -n "$PRINTF" && break
8771done
8772
8773  else
8774    # The variable is set, but is it from the command line or the environment?
8775
8776    # Try to remove the string !PRINTF! from our list.
8777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8779      # If it failed, the variable was not from the command line. Ignore it,
8780      # but warn the user (except for BASH, which is always set by the calling BASH).
8781      if test "xPRINTF" != xBASH; then
8782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8783$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8784      fi
8785      # Try to locate tool using the code snippet
8786      for ac_prog in printf
8787do
8788  # Extract the first word of "$ac_prog", so it can be a program name with args.
8789set dummy $ac_prog; ac_word=$2
8790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8791$as_echo_n "checking for $ac_word... " >&6; }
8792if ${ac_cv_path_PRINTF+:} false; then :
8793  $as_echo_n "(cached) " >&6
8794else
8795  case $PRINTF in
8796  [\\/]* | ?:[\\/]*)
8797  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8798  ;;
8799  *)
8800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8801for as_dir in $PATH
8802do
8803  IFS=$as_save_IFS
8804  test -z "$as_dir" && as_dir=.
8805    for ac_exec_ext in '' $ac_executable_extensions; do
8806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8807    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8809    break 2
8810  fi
8811done
8812  done
8813IFS=$as_save_IFS
8814
8815  ;;
8816esac
8817fi
8818PRINTF=$ac_cv_path_PRINTF
8819if test -n "$PRINTF"; then
8820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8821$as_echo "$PRINTF" >&6; }
8822else
8823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8824$as_echo "no" >&6; }
8825fi
8826
8827
8828  test -n "$PRINTF" && break
8829done
8830
8831    else
8832      # If it succeeded, then it was overridden by the user. We will use it
8833      # for the tool.
8834
8835      # First remove it from the list of overridden variables, so we can test
8836      # for unknown variables in the end.
8837      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8838
8839      # Check if the provided tool contains a complete path.
8840      tool_specified="$PRINTF"
8841      tool_basename="${tool_specified##*/}"
8842      if test "x$tool_basename" = "x$tool_specified"; then
8843        # A command without a complete path is provided, search $PATH.
8844        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8845$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8846        # Extract the first word of "$tool_basename", so it can be a program name with args.
8847set dummy $tool_basename; ac_word=$2
8848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8849$as_echo_n "checking for $ac_word... " >&6; }
8850if ${ac_cv_path_PRINTF+:} false; then :
8851  $as_echo_n "(cached) " >&6
8852else
8853  case $PRINTF in
8854  [\\/]* | ?:[\\/]*)
8855  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8856  ;;
8857  *)
8858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8859for as_dir in $PATH
8860do
8861  IFS=$as_save_IFS
8862  test -z "$as_dir" && as_dir=.
8863    for ac_exec_ext in '' $ac_executable_extensions; do
8864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8865    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8867    break 2
8868  fi
8869done
8870  done
8871IFS=$as_save_IFS
8872
8873  ;;
8874esac
8875fi
8876PRINTF=$ac_cv_path_PRINTF
8877if test -n "$PRINTF"; then
8878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8879$as_echo "$PRINTF" >&6; }
8880else
8881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8882$as_echo "no" >&6; }
8883fi
8884
8885
8886        if test "x$PRINTF" = x; then
8887          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8888        fi
8889      else
8890        # Otherwise we believe it is a complete path. Use it as it is.
8891        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8892$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8893        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8894$as_echo_n "checking for PRINTF... " >&6; }
8895        if test ! -x "$tool_specified"; then
8896          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8897$as_echo "not found" >&6; }
8898          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8899        fi
8900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8901$as_echo "$tool_specified" >&6; }
8902      fi
8903    fi
8904  fi
8905
8906
8907
8908  if test "x$PRINTF" = x; then
8909    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8910  fi
8911
8912
8913
8914
8915
8916  # Publish this variable in the help.
8917
8918
8919  if test "x$RM" = x; then
8920    # The variable is not set by user, try to locate tool using the code snippet
8921    for ac_prog in rm
8922do
8923  # Extract the first word of "$ac_prog", so it can be a program name with args.
8924set dummy $ac_prog; ac_word=$2
8925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8926$as_echo_n "checking for $ac_word... " >&6; }
8927if ${ac_cv_path_RM+:} false; then :
8928  $as_echo_n "(cached) " >&6
8929else
8930  case $RM in
8931  [\\/]* | ?:[\\/]*)
8932  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8933  ;;
8934  *)
8935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8936for as_dir in $PATH
8937do
8938  IFS=$as_save_IFS
8939  test -z "$as_dir" && as_dir=.
8940    for ac_exec_ext in '' $ac_executable_extensions; do
8941  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8942    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8943    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8944    break 2
8945  fi
8946done
8947  done
8948IFS=$as_save_IFS
8949
8950  ;;
8951esac
8952fi
8953RM=$ac_cv_path_RM
8954if test -n "$RM"; then
8955  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8956$as_echo "$RM" >&6; }
8957else
8958  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8959$as_echo "no" >&6; }
8960fi
8961
8962
8963  test -n "$RM" && break
8964done
8965
8966  else
8967    # The variable is set, but is it from the command line or the environment?
8968
8969    # Try to remove the string !RM! from our list.
8970    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8971    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8972      # If it failed, the variable was not from the command line. Ignore it,
8973      # but warn the user (except for BASH, which is always set by the calling BASH).
8974      if test "xRM" != xBASH; then
8975        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8976$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8977      fi
8978      # Try to locate tool using the code snippet
8979      for ac_prog in rm
8980do
8981  # Extract the first word of "$ac_prog", so it can be a program name with args.
8982set dummy $ac_prog; ac_word=$2
8983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8984$as_echo_n "checking for $ac_word... " >&6; }
8985if ${ac_cv_path_RM+:} false; then :
8986  $as_echo_n "(cached) " >&6
8987else
8988  case $RM in
8989  [\\/]* | ?:[\\/]*)
8990  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8991  ;;
8992  *)
8993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8994for as_dir in $PATH
8995do
8996  IFS=$as_save_IFS
8997  test -z "$as_dir" && as_dir=.
8998    for ac_exec_ext in '' $ac_executable_extensions; do
8999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9000    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9002    break 2
9003  fi
9004done
9005  done
9006IFS=$as_save_IFS
9007
9008  ;;
9009esac
9010fi
9011RM=$ac_cv_path_RM
9012if test -n "$RM"; then
9013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9014$as_echo "$RM" >&6; }
9015else
9016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9017$as_echo "no" >&6; }
9018fi
9019
9020
9021  test -n "$RM" && break
9022done
9023
9024    else
9025      # If it succeeded, then it was overridden by the user. We will use it
9026      # for the tool.
9027
9028      # First remove it from the list of overridden variables, so we can test
9029      # for unknown variables in the end.
9030      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9031
9032      # Check if the provided tool contains a complete path.
9033      tool_specified="$RM"
9034      tool_basename="${tool_specified##*/}"
9035      if test "x$tool_basename" = "x$tool_specified"; then
9036        # A command without a complete path is provided, search $PATH.
9037        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9038$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9039        # Extract the first word of "$tool_basename", so it can be a program name with args.
9040set dummy $tool_basename; ac_word=$2
9041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9042$as_echo_n "checking for $ac_word... " >&6; }
9043if ${ac_cv_path_RM+:} false; then :
9044  $as_echo_n "(cached) " >&6
9045else
9046  case $RM in
9047  [\\/]* | ?:[\\/]*)
9048  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9049  ;;
9050  *)
9051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9052for as_dir in $PATH
9053do
9054  IFS=$as_save_IFS
9055  test -z "$as_dir" && as_dir=.
9056    for ac_exec_ext in '' $ac_executable_extensions; do
9057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9058    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9060    break 2
9061  fi
9062done
9063  done
9064IFS=$as_save_IFS
9065
9066  ;;
9067esac
9068fi
9069RM=$ac_cv_path_RM
9070if test -n "$RM"; then
9071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9072$as_echo "$RM" >&6; }
9073else
9074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9075$as_echo "no" >&6; }
9076fi
9077
9078
9079        if test "x$RM" = x; then
9080          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9081        fi
9082      else
9083        # Otherwise we believe it is a complete path. Use it as it is.
9084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9085$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9086        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9087$as_echo_n "checking for RM... " >&6; }
9088        if test ! -x "$tool_specified"; then
9089          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9090$as_echo "not found" >&6; }
9091          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9092        fi
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9094$as_echo "$tool_specified" >&6; }
9095      fi
9096    fi
9097  fi
9098
9099
9100
9101  if test "x$RM" = x; then
9102    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9103  fi
9104
9105
9106
9107
9108
9109  # Publish this variable in the help.
9110
9111
9112  if test "x$SH" = x; then
9113    # The variable is not set by user, try to locate tool using the code snippet
9114    for ac_prog in sh
9115do
9116  # Extract the first word of "$ac_prog", so it can be a program name with args.
9117set dummy $ac_prog; ac_word=$2
9118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9119$as_echo_n "checking for $ac_word... " >&6; }
9120if ${ac_cv_path_SH+:} false; then :
9121  $as_echo_n "(cached) " >&6
9122else
9123  case $SH in
9124  [\\/]* | ?:[\\/]*)
9125  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9126  ;;
9127  *)
9128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9129for as_dir in $PATH
9130do
9131  IFS=$as_save_IFS
9132  test -z "$as_dir" && as_dir=.
9133    for ac_exec_ext in '' $ac_executable_extensions; do
9134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9135    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9137    break 2
9138  fi
9139done
9140  done
9141IFS=$as_save_IFS
9142
9143  ;;
9144esac
9145fi
9146SH=$ac_cv_path_SH
9147if test -n "$SH"; then
9148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9149$as_echo "$SH" >&6; }
9150else
9151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9152$as_echo "no" >&6; }
9153fi
9154
9155
9156  test -n "$SH" && break
9157done
9158
9159  else
9160    # The variable is set, but is it from the command line or the environment?
9161
9162    # Try to remove the string !SH! from our list.
9163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9165      # If it failed, the variable was not from the command line. Ignore it,
9166      # but warn the user (except for BASH, which is always set by the calling BASH).
9167      if test "xSH" != xBASH; then
9168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9169$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9170      fi
9171      # Try to locate tool using the code snippet
9172      for ac_prog in sh
9173do
9174  # Extract the first word of "$ac_prog", so it can be a program name with args.
9175set dummy $ac_prog; ac_word=$2
9176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9177$as_echo_n "checking for $ac_word... " >&6; }
9178if ${ac_cv_path_SH+:} false; then :
9179  $as_echo_n "(cached) " >&6
9180else
9181  case $SH in
9182  [\\/]* | ?:[\\/]*)
9183  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9184  ;;
9185  *)
9186  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9187for as_dir in $PATH
9188do
9189  IFS=$as_save_IFS
9190  test -z "$as_dir" && as_dir=.
9191    for ac_exec_ext in '' $ac_executable_extensions; do
9192  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9193    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9194    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9195    break 2
9196  fi
9197done
9198  done
9199IFS=$as_save_IFS
9200
9201  ;;
9202esac
9203fi
9204SH=$ac_cv_path_SH
9205if test -n "$SH"; then
9206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9207$as_echo "$SH" >&6; }
9208else
9209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9210$as_echo "no" >&6; }
9211fi
9212
9213
9214  test -n "$SH" && break
9215done
9216
9217    else
9218      # If it succeeded, then it was overridden by the user. We will use it
9219      # for the tool.
9220
9221      # First remove it from the list of overridden variables, so we can test
9222      # for unknown variables in the end.
9223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9224
9225      # Check if the provided tool contains a complete path.
9226      tool_specified="$SH"
9227      tool_basename="${tool_specified##*/}"
9228      if test "x$tool_basename" = "x$tool_specified"; then
9229        # A command without a complete path is provided, search $PATH.
9230        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9231$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9232        # Extract the first word of "$tool_basename", so it can be a program name with args.
9233set dummy $tool_basename; ac_word=$2
9234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9235$as_echo_n "checking for $ac_word... " >&6; }
9236if ${ac_cv_path_SH+:} false; then :
9237  $as_echo_n "(cached) " >&6
9238else
9239  case $SH in
9240  [\\/]* | ?:[\\/]*)
9241  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9242  ;;
9243  *)
9244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9245for as_dir in $PATH
9246do
9247  IFS=$as_save_IFS
9248  test -z "$as_dir" && as_dir=.
9249    for ac_exec_ext in '' $ac_executable_extensions; do
9250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9251    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9253    break 2
9254  fi
9255done
9256  done
9257IFS=$as_save_IFS
9258
9259  ;;
9260esac
9261fi
9262SH=$ac_cv_path_SH
9263if test -n "$SH"; then
9264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9265$as_echo "$SH" >&6; }
9266else
9267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9268$as_echo "no" >&6; }
9269fi
9270
9271
9272        if test "x$SH" = x; then
9273          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9274        fi
9275      else
9276        # Otherwise we believe it is a complete path. Use it as it is.
9277        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9278$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9279        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9280$as_echo_n "checking for SH... " >&6; }
9281        if test ! -x "$tool_specified"; then
9282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9283$as_echo "not found" >&6; }
9284          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9285        fi
9286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9287$as_echo "$tool_specified" >&6; }
9288      fi
9289    fi
9290  fi
9291
9292
9293
9294  if test "x$SH" = x; then
9295    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9296  fi
9297
9298
9299
9300
9301
9302  # Publish this variable in the help.
9303
9304
9305  if test "x$SORT" = x; then
9306    # The variable is not set by user, try to locate tool using the code snippet
9307    for ac_prog in sort
9308do
9309  # Extract the first word of "$ac_prog", so it can be a program name with args.
9310set dummy $ac_prog; ac_word=$2
9311{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9312$as_echo_n "checking for $ac_word... " >&6; }
9313if ${ac_cv_path_SORT+:} false; then :
9314  $as_echo_n "(cached) " >&6
9315else
9316  case $SORT in
9317  [\\/]* | ?:[\\/]*)
9318  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9319  ;;
9320  *)
9321  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9322for as_dir in $PATH
9323do
9324  IFS=$as_save_IFS
9325  test -z "$as_dir" && as_dir=.
9326    for ac_exec_ext in '' $ac_executable_extensions; do
9327  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9328    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9329    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9330    break 2
9331  fi
9332done
9333  done
9334IFS=$as_save_IFS
9335
9336  ;;
9337esac
9338fi
9339SORT=$ac_cv_path_SORT
9340if test -n "$SORT"; then
9341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9342$as_echo "$SORT" >&6; }
9343else
9344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9345$as_echo "no" >&6; }
9346fi
9347
9348
9349  test -n "$SORT" && break
9350done
9351
9352  else
9353    # The variable is set, but is it from the command line or the environment?
9354
9355    # Try to remove the string !SORT! from our list.
9356    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9357    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9358      # If it failed, the variable was not from the command line. Ignore it,
9359      # but warn the user (except for BASH, which is always set by the calling BASH).
9360      if test "xSORT" != xBASH; then
9361        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9362$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9363      fi
9364      # Try to locate tool using the code snippet
9365      for ac_prog in sort
9366do
9367  # Extract the first word of "$ac_prog", so it can be a program name with args.
9368set dummy $ac_prog; ac_word=$2
9369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9370$as_echo_n "checking for $ac_word... " >&6; }
9371if ${ac_cv_path_SORT+:} false; then :
9372  $as_echo_n "(cached) " >&6
9373else
9374  case $SORT in
9375  [\\/]* | ?:[\\/]*)
9376  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9377  ;;
9378  *)
9379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9380for as_dir in $PATH
9381do
9382  IFS=$as_save_IFS
9383  test -z "$as_dir" && as_dir=.
9384    for ac_exec_ext in '' $ac_executable_extensions; do
9385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9386    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9388    break 2
9389  fi
9390done
9391  done
9392IFS=$as_save_IFS
9393
9394  ;;
9395esac
9396fi
9397SORT=$ac_cv_path_SORT
9398if test -n "$SORT"; then
9399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9400$as_echo "$SORT" >&6; }
9401else
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9403$as_echo "no" >&6; }
9404fi
9405
9406
9407  test -n "$SORT" && break
9408done
9409
9410    else
9411      # If it succeeded, then it was overridden by the user. We will use it
9412      # for the tool.
9413
9414      # First remove it from the list of overridden variables, so we can test
9415      # for unknown variables in the end.
9416      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9417
9418      # Check if the provided tool contains a complete path.
9419      tool_specified="$SORT"
9420      tool_basename="${tool_specified##*/}"
9421      if test "x$tool_basename" = "x$tool_specified"; then
9422        # A command without a complete path is provided, search $PATH.
9423        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9424$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9425        # Extract the first word of "$tool_basename", so it can be a program name with args.
9426set dummy $tool_basename; ac_word=$2
9427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9428$as_echo_n "checking for $ac_word... " >&6; }
9429if ${ac_cv_path_SORT+:} false; then :
9430  $as_echo_n "(cached) " >&6
9431else
9432  case $SORT in
9433  [\\/]* | ?:[\\/]*)
9434  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9435  ;;
9436  *)
9437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9438for as_dir in $PATH
9439do
9440  IFS=$as_save_IFS
9441  test -z "$as_dir" && as_dir=.
9442    for ac_exec_ext in '' $ac_executable_extensions; do
9443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9444    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9446    break 2
9447  fi
9448done
9449  done
9450IFS=$as_save_IFS
9451
9452  ;;
9453esac
9454fi
9455SORT=$ac_cv_path_SORT
9456if test -n "$SORT"; then
9457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9458$as_echo "$SORT" >&6; }
9459else
9460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9461$as_echo "no" >&6; }
9462fi
9463
9464
9465        if test "x$SORT" = x; then
9466          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9467        fi
9468      else
9469        # Otherwise we believe it is a complete path. Use it as it is.
9470        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9471$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9472        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9473$as_echo_n "checking for SORT... " >&6; }
9474        if test ! -x "$tool_specified"; then
9475          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9476$as_echo "not found" >&6; }
9477          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9478        fi
9479        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9480$as_echo "$tool_specified" >&6; }
9481      fi
9482    fi
9483  fi
9484
9485
9486
9487  if test "x$SORT" = x; then
9488    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9489  fi
9490
9491
9492
9493
9494
9495  # Publish this variable in the help.
9496
9497
9498  if test "x$TAIL" = x; then
9499    # The variable is not set by user, try to locate tool using the code snippet
9500    for ac_prog in tail
9501do
9502  # Extract the first word of "$ac_prog", so it can be a program name with args.
9503set dummy $ac_prog; ac_word=$2
9504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9505$as_echo_n "checking for $ac_word... " >&6; }
9506if ${ac_cv_path_TAIL+:} false; then :
9507  $as_echo_n "(cached) " >&6
9508else
9509  case $TAIL in
9510  [\\/]* | ?:[\\/]*)
9511  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9512  ;;
9513  *)
9514  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9515for as_dir in $PATH
9516do
9517  IFS=$as_save_IFS
9518  test -z "$as_dir" && as_dir=.
9519    for ac_exec_ext in '' $ac_executable_extensions; do
9520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9521    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9523    break 2
9524  fi
9525done
9526  done
9527IFS=$as_save_IFS
9528
9529  ;;
9530esac
9531fi
9532TAIL=$ac_cv_path_TAIL
9533if test -n "$TAIL"; then
9534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9535$as_echo "$TAIL" >&6; }
9536else
9537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9538$as_echo "no" >&6; }
9539fi
9540
9541
9542  test -n "$TAIL" && break
9543done
9544
9545  else
9546    # The variable is set, but is it from the command line or the environment?
9547
9548    # Try to remove the string !TAIL! from our list.
9549    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9550    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9551      # If it failed, the variable was not from the command line. Ignore it,
9552      # but warn the user (except for BASH, which is always set by the calling BASH).
9553      if test "xTAIL" != xBASH; then
9554        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9555$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9556      fi
9557      # Try to locate tool using the code snippet
9558      for ac_prog in tail
9559do
9560  # Extract the first word of "$ac_prog", so it can be a program name with args.
9561set dummy $ac_prog; ac_word=$2
9562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9563$as_echo_n "checking for $ac_word... " >&6; }
9564if ${ac_cv_path_TAIL+:} false; then :
9565  $as_echo_n "(cached) " >&6
9566else
9567  case $TAIL in
9568  [\\/]* | ?:[\\/]*)
9569  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9570  ;;
9571  *)
9572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9573for as_dir in $PATH
9574do
9575  IFS=$as_save_IFS
9576  test -z "$as_dir" && as_dir=.
9577    for ac_exec_ext in '' $ac_executable_extensions; do
9578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9579    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9581    break 2
9582  fi
9583done
9584  done
9585IFS=$as_save_IFS
9586
9587  ;;
9588esac
9589fi
9590TAIL=$ac_cv_path_TAIL
9591if test -n "$TAIL"; then
9592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9593$as_echo "$TAIL" >&6; }
9594else
9595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9596$as_echo "no" >&6; }
9597fi
9598
9599
9600  test -n "$TAIL" && break
9601done
9602
9603    else
9604      # If it succeeded, then it was overridden by the user. We will use it
9605      # for the tool.
9606
9607      # First remove it from the list of overridden variables, so we can test
9608      # for unknown variables in the end.
9609      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9610
9611      # Check if the provided tool contains a complete path.
9612      tool_specified="$TAIL"
9613      tool_basename="${tool_specified##*/}"
9614      if test "x$tool_basename" = "x$tool_specified"; then
9615        # A command without a complete path is provided, search $PATH.
9616        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9617$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9618        # Extract the first word of "$tool_basename", so it can be a program name with args.
9619set dummy $tool_basename; ac_word=$2
9620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9621$as_echo_n "checking for $ac_word... " >&6; }
9622if ${ac_cv_path_TAIL+:} false; then :
9623  $as_echo_n "(cached) " >&6
9624else
9625  case $TAIL in
9626  [\\/]* | ?:[\\/]*)
9627  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9628  ;;
9629  *)
9630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9631for as_dir in $PATH
9632do
9633  IFS=$as_save_IFS
9634  test -z "$as_dir" && as_dir=.
9635    for ac_exec_ext in '' $ac_executable_extensions; do
9636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9637    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9639    break 2
9640  fi
9641done
9642  done
9643IFS=$as_save_IFS
9644
9645  ;;
9646esac
9647fi
9648TAIL=$ac_cv_path_TAIL
9649if test -n "$TAIL"; then
9650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9651$as_echo "$TAIL" >&6; }
9652else
9653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9654$as_echo "no" >&6; }
9655fi
9656
9657
9658        if test "x$TAIL" = x; then
9659          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9660        fi
9661      else
9662        # Otherwise we believe it is a complete path. Use it as it is.
9663        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9664$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9665        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9666$as_echo_n "checking for TAIL... " >&6; }
9667        if test ! -x "$tool_specified"; then
9668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9669$as_echo "not found" >&6; }
9670          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9671        fi
9672        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9673$as_echo "$tool_specified" >&6; }
9674      fi
9675    fi
9676  fi
9677
9678
9679
9680  if test "x$TAIL" = x; then
9681    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9682  fi
9683
9684
9685
9686
9687
9688  # Publish this variable in the help.
9689
9690
9691  if test "x$TAR" = x; then
9692    # The variable is not set by user, try to locate tool using the code snippet
9693    for ac_prog in tar
9694do
9695  # Extract the first word of "$ac_prog", so it can be a program name with args.
9696set dummy $ac_prog; ac_word=$2
9697{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9698$as_echo_n "checking for $ac_word... " >&6; }
9699if ${ac_cv_path_TAR+:} false; then :
9700  $as_echo_n "(cached) " >&6
9701else
9702  case $TAR in
9703  [\\/]* | ?:[\\/]*)
9704  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9705  ;;
9706  *)
9707  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9708for as_dir in $PATH
9709do
9710  IFS=$as_save_IFS
9711  test -z "$as_dir" && as_dir=.
9712    for ac_exec_ext in '' $ac_executable_extensions; do
9713  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9714    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9715    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9716    break 2
9717  fi
9718done
9719  done
9720IFS=$as_save_IFS
9721
9722  ;;
9723esac
9724fi
9725TAR=$ac_cv_path_TAR
9726if test -n "$TAR"; then
9727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9728$as_echo "$TAR" >&6; }
9729else
9730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9731$as_echo "no" >&6; }
9732fi
9733
9734
9735  test -n "$TAR" && break
9736done
9737
9738  else
9739    # The variable is set, but is it from the command line or the environment?
9740
9741    # Try to remove the string !TAR! from our list.
9742    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9743    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9744      # If it failed, the variable was not from the command line. Ignore it,
9745      # but warn the user (except for BASH, which is always set by the calling BASH).
9746      if test "xTAR" != xBASH; then
9747        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9748$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9749      fi
9750      # Try to locate tool using the code snippet
9751      for ac_prog in tar
9752do
9753  # Extract the first word of "$ac_prog", so it can be a program name with args.
9754set dummy $ac_prog; ac_word=$2
9755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9756$as_echo_n "checking for $ac_word... " >&6; }
9757if ${ac_cv_path_TAR+:} false; then :
9758  $as_echo_n "(cached) " >&6
9759else
9760  case $TAR in
9761  [\\/]* | ?:[\\/]*)
9762  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9763  ;;
9764  *)
9765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9766for as_dir in $PATH
9767do
9768  IFS=$as_save_IFS
9769  test -z "$as_dir" && as_dir=.
9770    for ac_exec_ext in '' $ac_executable_extensions; do
9771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9772    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9774    break 2
9775  fi
9776done
9777  done
9778IFS=$as_save_IFS
9779
9780  ;;
9781esac
9782fi
9783TAR=$ac_cv_path_TAR
9784if test -n "$TAR"; then
9785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9786$as_echo "$TAR" >&6; }
9787else
9788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9789$as_echo "no" >&6; }
9790fi
9791
9792
9793  test -n "$TAR" && break
9794done
9795
9796    else
9797      # If it succeeded, then it was overridden by the user. We will use it
9798      # for the tool.
9799
9800      # First remove it from the list of overridden variables, so we can test
9801      # for unknown variables in the end.
9802      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9803
9804      # Check if the provided tool contains a complete path.
9805      tool_specified="$TAR"
9806      tool_basename="${tool_specified##*/}"
9807      if test "x$tool_basename" = "x$tool_specified"; then
9808        # A command without a complete path is provided, search $PATH.
9809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9810$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9811        # Extract the first word of "$tool_basename", so it can be a program name with args.
9812set dummy $tool_basename; ac_word=$2
9813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9814$as_echo_n "checking for $ac_word... " >&6; }
9815if ${ac_cv_path_TAR+:} false; then :
9816  $as_echo_n "(cached) " >&6
9817else
9818  case $TAR in
9819  [\\/]* | ?:[\\/]*)
9820  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9821  ;;
9822  *)
9823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9824for as_dir in $PATH
9825do
9826  IFS=$as_save_IFS
9827  test -z "$as_dir" && as_dir=.
9828    for ac_exec_ext in '' $ac_executable_extensions; do
9829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9830    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9832    break 2
9833  fi
9834done
9835  done
9836IFS=$as_save_IFS
9837
9838  ;;
9839esac
9840fi
9841TAR=$ac_cv_path_TAR
9842if test -n "$TAR"; then
9843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9844$as_echo "$TAR" >&6; }
9845else
9846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9847$as_echo "no" >&6; }
9848fi
9849
9850
9851        if test "x$TAR" = x; then
9852          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9853        fi
9854      else
9855        # Otherwise we believe it is a complete path. Use it as it is.
9856        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9857$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9859$as_echo_n "checking for TAR... " >&6; }
9860        if test ! -x "$tool_specified"; then
9861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9862$as_echo "not found" >&6; }
9863          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9864        fi
9865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9866$as_echo "$tool_specified" >&6; }
9867      fi
9868    fi
9869  fi
9870
9871
9872
9873  if test "x$TAR" = x; then
9874    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9875  fi
9876
9877
9878
9879
9880
9881  # Publish this variable in the help.
9882
9883
9884  if test "x$TEE" = x; then
9885    # The variable is not set by user, try to locate tool using the code snippet
9886    for ac_prog in tee
9887do
9888  # Extract the first word of "$ac_prog", so it can be a program name with args.
9889set dummy $ac_prog; ac_word=$2
9890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9891$as_echo_n "checking for $ac_word... " >&6; }
9892if ${ac_cv_path_TEE+:} false; then :
9893  $as_echo_n "(cached) " >&6
9894else
9895  case $TEE in
9896  [\\/]* | ?:[\\/]*)
9897  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9898  ;;
9899  *)
9900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9901for as_dir in $PATH
9902do
9903  IFS=$as_save_IFS
9904  test -z "$as_dir" && as_dir=.
9905    for ac_exec_ext in '' $ac_executable_extensions; do
9906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9907    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9909    break 2
9910  fi
9911done
9912  done
9913IFS=$as_save_IFS
9914
9915  ;;
9916esac
9917fi
9918TEE=$ac_cv_path_TEE
9919if test -n "$TEE"; then
9920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9921$as_echo "$TEE" >&6; }
9922else
9923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9924$as_echo "no" >&6; }
9925fi
9926
9927
9928  test -n "$TEE" && break
9929done
9930
9931  else
9932    # The variable is set, but is it from the command line or the environment?
9933
9934    # Try to remove the string !TEE! from our list.
9935    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9936    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9937      # If it failed, the variable was not from the command line. Ignore it,
9938      # but warn the user (except for BASH, which is always set by the calling BASH).
9939      if test "xTEE" != xBASH; then
9940        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9941$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9942      fi
9943      # Try to locate tool using the code snippet
9944      for ac_prog in tee
9945do
9946  # Extract the first word of "$ac_prog", so it can be a program name with args.
9947set dummy $ac_prog; ac_word=$2
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9949$as_echo_n "checking for $ac_word... " >&6; }
9950if ${ac_cv_path_TEE+:} false; then :
9951  $as_echo_n "(cached) " >&6
9952else
9953  case $TEE in
9954  [\\/]* | ?:[\\/]*)
9955  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9956  ;;
9957  *)
9958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9959for as_dir in $PATH
9960do
9961  IFS=$as_save_IFS
9962  test -z "$as_dir" && as_dir=.
9963    for ac_exec_ext in '' $ac_executable_extensions; do
9964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9965    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9967    break 2
9968  fi
9969done
9970  done
9971IFS=$as_save_IFS
9972
9973  ;;
9974esac
9975fi
9976TEE=$ac_cv_path_TEE
9977if test -n "$TEE"; then
9978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9979$as_echo "$TEE" >&6; }
9980else
9981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9982$as_echo "no" >&6; }
9983fi
9984
9985
9986  test -n "$TEE" && break
9987done
9988
9989    else
9990      # If it succeeded, then it was overridden by the user. We will use it
9991      # for the tool.
9992
9993      # First remove it from the list of overridden variables, so we can test
9994      # for unknown variables in the end.
9995      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9996
9997      # Check if the provided tool contains a complete path.
9998      tool_specified="$TEE"
9999      tool_basename="${tool_specified##*/}"
10000      if test "x$tool_basename" = "x$tool_specified"; then
10001        # A command without a complete path is provided, search $PATH.
10002        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10003$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10004        # Extract the first word of "$tool_basename", so it can be a program name with args.
10005set dummy $tool_basename; ac_word=$2
10006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10007$as_echo_n "checking for $ac_word... " >&6; }
10008if ${ac_cv_path_TEE+:} false; then :
10009  $as_echo_n "(cached) " >&6
10010else
10011  case $TEE in
10012  [\\/]* | ?:[\\/]*)
10013  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10014  ;;
10015  *)
10016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10017for as_dir in $PATH
10018do
10019  IFS=$as_save_IFS
10020  test -z "$as_dir" && as_dir=.
10021    for ac_exec_ext in '' $ac_executable_extensions; do
10022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10023    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10025    break 2
10026  fi
10027done
10028  done
10029IFS=$as_save_IFS
10030
10031  ;;
10032esac
10033fi
10034TEE=$ac_cv_path_TEE
10035if test -n "$TEE"; then
10036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10037$as_echo "$TEE" >&6; }
10038else
10039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10040$as_echo "no" >&6; }
10041fi
10042
10043
10044        if test "x$TEE" = x; then
10045          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10046        fi
10047      else
10048        # Otherwise we believe it is a complete path. Use it as it is.
10049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10050$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10052$as_echo_n "checking for TEE... " >&6; }
10053        if test ! -x "$tool_specified"; then
10054          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10055$as_echo "not found" >&6; }
10056          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10057        fi
10058        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10059$as_echo "$tool_specified" >&6; }
10060      fi
10061    fi
10062  fi
10063
10064
10065
10066  if test "x$TEE" = x; then
10067    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10068  fi
10069
10070
10071
10072
10073
10074  # Publish this variable in the help.
10075
10076
10077  if test "x$TOUCH" = x; then
10078    # The variable is not set by user, try to locate tool using the code snippet
10079    for ac_prog in touch
10080do
10081  # Extract the first word of "$ac_prog", so it can be a program name with args.
10082set dummy $ac_prog; ac_word=$2
10083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10084$as_echo_n "checking for $ac_word... " >&6; }
10085if ${ac_cv_path_TOUCH+:} false; then :
10086  $as_echo_n "(cached) " >&6
10087else
10088  case $TOUCH in
10089  [\\/]* | ?:[\\/]*)
10090  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10091  ;;
10092  *)
10093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10094for as_dir in $PATH
10095do
10096  IFS=$as_save_IFS
10097  test -z "$as_dir" && as_dir=.
10098    for ac_exec_ext in '' $ac_executable_extensions; do
10099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10100    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10102    break 2
10103  fi
10104done
10105  done
10106IFS=$as_save_IFS
10107
10108  ;;
10109esac
10110fi
10111TOUCH=$ac_cv_path_TOUCH
10112if test -n "$TOUCH"; then
10113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10114$as_echo "$TOUCH" >&6; }
10115else
10116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10117$as_echo "no" >&6; }
10118fi
10119
10120
10121  test -n "$TOUCH" && break
10122done
10123
10124  else
10125    # The variable is set, but is it from the command line or the environment?
10126
10127    # Try to remove the string !TOUCH! from our list.
10128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10130      # If it failed, the variable was not from the command line. Ignore it,
10131      # but warn the user (except for BASH, which is always set by the calling BASH).
10132      if test "xTOUCH" != xBASH; then
10133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10134$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10135      fi
10136      # Try to locate tool using the code snippet
10137      for ac_prog in touch
10138do
10139  # Extract the first word of "$ac_prog", so it can be a program name with args.
10140set dummy $ac_prog; ac_word=$2
10141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10142$as_echo_n "checking for $ac_word... " >&6; }
10143if ${ac_cv_path_TOUCH+:} false; then :
10144  $as_echo_n "(cached) " >&6
10145else
10146  case $TOUCH in
10147  [\\/]* | ?:[\\/]*)
10148  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10149  ;;
10150  *)
10151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10152for as_dir in $PATH
10153do
10154  IFS=$as_save_IFS
10155  test -z "$as_dir" && as_dir=.
10156    for ac_exec_ext in '' $ac_executable_extensions; do
10157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10158    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10160    break 2
10161  fi
10162done
10163  done
10164IFS=$as_save_IFS
10165
10166  ;;
10167esac
10168fi
10169TOUCH=$ac_cv_path_TOUCH
10170if test -n "$TOUCH"; then
10171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10172$as_echo "$TOUCH" >&6; }
10173else
10174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10175$as_echo "no" >&6; }
10176fi
10177
10178
10179  test -n "$TOUCH" && break
10180done
10181
10182    else
10183      # If it succeeded, then it was overridden by the user. We will use it
10184      # for the tool.
10185
10186      # First remove it from the list of overridden variables, so we can test
10187      # for unknown variables in the end.
10188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10189
10190      # Check if the provided tool contains a complete path.
10191      tool_specified="$TOUCH"
10192      tool_basename="${tool_specified##*/}"
10193      if test "x$tool_basename" = "x$tool_specified"; then
10194        # A command without a complete path is provided, search $PATH.
10195        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10196$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10197        # Extract the first word of "$tool_basename", so it can be a program name with args.
10198set dummy $tool_basename; ac_word=$2
10199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10200$as_echo_n "checking for $ac_word... " >&6; }
10201if ${ac_cv_path_TOUCH+:} false; then :
10202  $as_echo_n "(cached) " >&6
10203else
10204  case $TOUCH in
10205  [\\/]* | ?:[\\/]*)
10206  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10207  ;;
10208  *)
10209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10210for as_dir in $PATH
10211do
10212  IFS=$as_save_IFS
10213  test -z "$as_dir" && as_dir=.
10214    for ac_exec_ext in '' $ac_executable_extensions; do
10215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10216    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10218    break 2
10219  fi
10220done
10221  done
10222IFS=$as_save_IFS
10223
10224  ;;
10225esac
10226fi
10227TOUCH=$ac_cv_path_TOUCH
10228if test -n "$TOUCH"; then
10229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10230$as_echo "$TOUCH" >&6; }
10231else
10232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10233$as_echo "no" >&6; }
10234fi
10235
10236
10237        if test "x$TOUCH" = x; then
10238          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10239        fi
10240      else
10241        # Otherwise we believe it is a complete path. Use it as it is.
10242        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10243$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10244        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10245$as_echo_n "checking for TOUCH... " >&6; }
10246        if test ! -x "$tool_specified"; then
10247          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10248$as_echo "not found" >&6; }
10249          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10250        fi
10251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10252$as_echo "$tool_specified" >&6; }
10253      fi
10254    fi
10255  fi
10256
10257
10258
10259  if test "x$TOUCH" = x; then
10260    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10261  fi
10262
10263
10264
10265
10266
10267  # Publish this variable in the help.
10268
10269
10270  if test "x$TR" = x; then
10271    # The variable is not set by user, try to locate tool using the code snippet
10272    for ac_prog in tr
10273do
10274  # Extract the first word of "$ac_prog", so it can be a program name with args.
10275set dummy $ac_prog; ac_word=$2
10276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10277$as_echo_n "checking for $ac_word... " >&6; }
10278if ${ac_cv_path_TR+:} false; then :
10279  $as_echo_n "(cached) " >&6
10280else
10281  case $TR in
10282  [\\/]* | ?:[\\/]*)
10283  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10284  ;;
10285  *)
10286  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10287for as_dir in $PATH
10288do
10289  IFS=$as_save_IFS
10290  test -z "$as_dir" && as_dir=.
10291    for ac_exec_ext in '' $ac_executable_extensions; do
10292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10293    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10295    break 2
10296  fi
10297done
10298  done
10299IFS=$as_save_IFS
10300
10301  ;;
10302esac
10303fi
10304TR=$ac_cv_path_TR
10305if test -n "$TR"; then
10306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10307$as_echo "$TR" >&6; }
10308else
10309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10310$as_echo "no" >&6; }
10311fi
10312
10313
10314  test -n "$TR" && break
10315done
10316
10317  else
10318    # The variable is set, but is it from the command line or the environment?
10319
10320    # Try to remove the string !TR! from our list.
10321    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10322    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10323      # If it failed, the variable was not from the command line. Ignore it,
10324      # but warn the user (except for BASH, which is always set by the calling BASH).
10325      if test "xTR" != xBASH; then
10326        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10327$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10328      fi
10329      # Try to locate tool using the code snippet
10330      for ac_prog in tr
10331do
10332  # Extract the first word of "$ac_prog", so it can be a program name with args.
10333set dummy $ac_prog; ac_word=$2
10334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10335$as_echo_n "checking for $ac_word... " >&6; }
10336if ${ac_cv_path_TR+:} false; then :
10337  $as_echo_n "(cached) " >&6
10338else
10339  case $TR in
10340  [\\/]* | ?:[\\/]*)
10341  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10342  ;;
10343  *)
10344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10345for as_dir in $PATH
10346do
10347  IFS=$as_save_IFS
10348  test -z "$as_dir" && as_dir=.
10349    for ac_exec_ext in '' $ac_executable_extensions; do
10350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10351    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10353    break 2
10354  fi
10355done
10356  done
10357IFS=$as_save_IFS
10358
10359  ;;
10360esac
10361fi
10362TR=$ac_cv_path_TR
10363if test -n "$TR"; then
10364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10365$as_echo "$TR" >&6; }
10366else
10367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10368$as_echo "no" >&6; }
10369fi
10370
10371
10372  test -n "$TR" && break
10373done
10374
10375    else
10376      # If it succeeded, then it was overridden by the user. We will use it
10377      # for the tool.
10378
10379      # First remove it from the list of overridden variables, so we can test
10380      # for unknown variables in the end.
10381      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10382
10383      # Check if the provided tool contains a complete path.
10384      tool_specified="$TR"
10385      tool_basename="${tool_specified##*/}"
10386      if test "x$tool_basename" = "x$tool_specified"; then
10387        # A command without a complete path is provided, search $PATH.
10388        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10389$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10390        # Extract the first word of "$tool_basename", so it can be a program name with args.
10391set dummy $tool_basename; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_TR+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $TR in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420TR=$ac_cv_path_TR
10421if test -n "$TR"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10423$as_echo "$TR" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430        if test "x$TR" = x; then
10431          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10432        fi
10433      else
10434        # Otherwise we believe it is a complete path. Use it as it is.
10435        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10436$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10437        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10438$as_echo_n "checking for TR... " >&6; }
10439        if test ! -x "$tool_specified"; then
10440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10441$as_echo "not found" >&6; }
10442          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10443        fi
10444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10445$as_echo "$tool_specified" >&6; }
10446      fi
10447    fi
10448  fi
10449
10450
10451
10452  if test "x$TR" = x; then
10453    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10454  fi
10455
10456
10457
10458
10459
10460  # Publish this variable in the help.
10461
10462
10463  if test "x$UNAME" = x; then
10464    # The variable is not set by user, try to locate tool using the code snippet
10465    for ac_prog in uname
10466do
10467  # Extract the first word of "$ac_prog", so it can be a program name with args.
10468set dummy $ac_prog; ac_word=$2
10469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10470$as_echo_n "checking for $ac_word... " >&6; }
10471if ${ac_cv_path_UNAME+:} false; then :
10472  $as_echo_n "(cached) " >&6
10473else
10474  case $UNAME in
10475  [\\/]* | ?:[\\/]*)
10476  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10477  ;;
10478  *)
10479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10480for as_dir in $PATH
10481do
10482  IFS=$as_save_IFS
10483  test -z "$as_dir" && as_dir=.
10484    for ac_exec_ext in '' $ac_executable_extensions; do
10485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10486    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10488    break 2
10489  fi
10490done
10491  done
10492IFS=$as_save_IFS
10493
10494  ;;
10495esac
10496fi
10497UNAME=$ac_cv_path_UNAME
10498if test -n "$UNAME"; then
10499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10500$as_echo "$UNAME" >&6; }
10501else
10502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10503$as_echo "no" >&6; }
10504fi
10505
10506
10507  test -n "$UNAME" && break
10508done
10509
10510  else
10511    # The variable is set, but is it from the command line or the environment?
10512
10513    # Try to remove the string !UNAME! from our list.
10514    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10515    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10516      # If it failed, the variable was not from the command line. Ignore it,
10517      # but warn the user (except for BASH, which is always set by the calling BASH).
10518      if test "xUNAME" != xBASH; then
10519        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10520$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10521      fi
10522      # Try to locate tool using the code snippet
10523      for ac_prog in uname
10524do
10525  # Extract the first word of "$ac_prog", so it can be a program name with args.
10526set dummy $ac_prog; ac_word=$2
10527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10528$as_echo_n "checking for $ac_word... " >&6; }
10529if ${ac_cv_path_UNAME+:} false; then :
10530  $as_echo_n "(cached) " >&6
10531else
10532  case $UNAME in
10533  [\\/]* | ?:[\\/]*)
10534  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10535  ;;
10536  *)
10537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10538for as_dir in $PATH
10539do
10540  IFS=$as_save_IFS
10541  test -z "$as_dir" && as_dir=.
10542    for ac_exec_ext in '' $ac_executable_extensions; do
10543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10544    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10546    break 2
10547  fi
10548done
10549  done
10550IFS=$as_save_IFS
10551
10552  ;;
10553esac
10554fi
10555UNAME=$ac_cv_path_UNAME
10556if test -n "$UNAME"; then
10557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10558$as_echo "$UNAME" >&6; }
10559else
10560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10561$as_echo "no" >&6; }
10562fi
10563
10564
10565  test -n "$UNAME" && break
10566done
10567
10568    else
10569      # If it succeeded, then it was overridden by the user. We will use it
10570      # for the tool.
10571
10572      # First remove it from the list of overridden variables, so we can test
10573      # for unknown variables in the end.
10574      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10575
10576      # Check if the provided tool contains a complete path.
10577      tool_specified="$UNAME"
10578      tool_basename="${tool_specified##*/}"
10579      if test "x$tool_basename" = "x$tool_specified"; then
10580        # A command without a complete path is provided, search $PATH.
10581        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10582$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10583        # Extract the first word of "$tool_basename", so it can be a program name with args.
10584set dummy $tool_basename; ac_word=$2
10585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10586$as_echo_n "checking for $ac_word... " >&6; }
10587if ${ac_cv_path_UNAME+:} false; then :
10588  $as_echo_n "(cached) " >&6
10589else
10590  case $UNAME in
10591  [\\/]* | ?:[\\/]*)
10592  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10593  ;;
10594  *)
10595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10596for as_dir in $PATH
10597do
10598  IFS=$as_save_IFS
10599  test -z "$as_dir" && as_dir=.
10600    for ac_exec_ext in '' $ac_executable_extensions; do
10601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10602    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10604    break 2
10605  fi
10606done
10607  done
10608IFS=$as_save_IFS
10609
10610  ;;
10611esac
10612fi
10613UNAME=$ac_cv_path_UNAME
10614if test -n "$UNAME"; then
10615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10616$as_echo "$UNAME" >&6; }
10617else
10618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10619$as_echo "no" >&6; }
10620fi
10621
10622
10623        if test "x$UNAME" = x; then
10624          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10625        fi
10626      else
10627        # Otherwise we believe it is a complete path. Use it as it is.
10628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10629$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10630        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10631$as_echo_n "checking for UNAME... " >&6; }
10632        if test ! -x "$tool_specified"; then
10633          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10634$as_echo "not found" >&6; }
10635          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10636        fi
10637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10638$as_echo "$tool_specified" >&6; }
10639      fi
10640    fi
10641  fi
10642
10643
10644
10645  if test "x$UNAME" = x; then
10646    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10647  fi
10648
10649
10650
10651
10652
10653  # Publish this variable in the help.
10654
10655
10656  if test "x$UNIQ" = x; then
10657    # The variable is not set by user, try to locate tool using the code snippet
10658    for ac_prog in uniq
10659do
10660  # Extract the first word of "$ac_prog", so it can be a program name with args.
10661set dummy $ac_prog; ac_word=$2
10662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10663$as_echo_n "checking for $ac_word... " >&6; }
10664if ${ac_cv_path_UNIQ+:} false; then :
10665  $as_echo_n "(cached) " >&6
10666else
10667  case $UNIQ in
10668  [\\/]* | ?:[\\/]*)
10669  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10670  ;;
10671  *)
10672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10673for as_dir in $PATH
10674do
10675  IFS=$as_save_IFS
10676  test -z "$as_dir" && as_dir=.
10677    for ac_exec_ext in '' $ac_executable_extensions; do
10678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10679    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10681    break 2
10682  fi
10683done
10684  done
10685IFS=$as_save_IFS
10686
10687  ;;
10688esac
10689fi
10690UNIQ=$ac_cv_path_UNIQ
10691if test -n "$UNIQ"; then
10692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10693$as_echo "$UNIQ" >&6; }
10694else
10695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10696$as_echo "no" >&6; }
10697fi
10698
10699
10700  test -n "$UNIQ" && break
10701done
10702
10703  else
10704    # The variable is set, but is it from the command line or the environment?
10705
10706    # Try to remove the string !UNIQ! from our list.
10707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10709      # If it failed, the variable was not from the command line. Ignore it,
10710      # but warn the user (except for BASH, which is always set by the calling BASH).
10711      if test "xUNIQ" != xBASH; then
10712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10713$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10714      fi
10715      # Try to locate tool using the code snippet
10716      for ac_prog in uniq
10717do
10718  # Extract the first word of "$ac_prog", so it can be a program name with args.
10719set dummy $ac_prog; ac_word=$2
10720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10721$as_echo_n "checking for $ac_word... " >&6; }
10722if ${ac_cv_path_UNIQ+:} false; then :
10723  $as_echo_n "(cached) " >&6
10724else
10725  case $UNIQ in
10726  [\\/]* | ?:[\\/]*)
10727  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10728  ;;
10729  *)
10730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10731for as_dir in $PATH
10732do
10733  IFS=$as_save_IFS
10734  test -z "$as_dir" && as_dir=.
10735    for ac_exec_ext in '' $ac_executable_extensions; do
10736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10737    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10739    break 2
10740  fi
10741done
10742  done
10743IFS=$as_save_IFS
10744
10745  ;;
10746esac
10747fi
10748UNIQ=$ac_cv_path_UNIQ
10749if test -n "$UNIQ"; then
10750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10751$as_echo "$UNIQ" >&6; }
10752else
10753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10754$as_echo "no" >&6; }
10755fi
10756
10757
10758  test -n "$UNIQ" && break
10759done
10760
10761    else
10762      # If it succeeded, then it was overridden by the user. We will use it
10763      # for the tool.
10764
10765      # First remove it from the list of overridden variables, so we can test
10766      # for unknown variables in the end.
10767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10768
10769      # Check if the provided tool contains a complete path.
10770      tool_specified="$UNIQ"
10771      tool_basename="${tool_specified##*/}"
10772      if test "x$tool_basename" = "x$tool_specified"; then
10773        # A command without a complete path is provided, search $PATH.
10774        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10775$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10776        # Extract the first word of "$tool_basename", so it can be a program name with args.
10777set dummy $tool_basename; ac_word=$2
10778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10779$as_echo_n "checking for $ac_word... " >&6; }
10780if ${ac_cv_path_UNIQ+:} false; then :
10781  $as_echo_n "(cached) " >&6
10782else
10783  case $UNIQ in
10784  [\\/]* | ?:[\\/]*)
10785  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10786  ;;
10787  *)
10788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10789for as_dir in $PATH
10790do
10791  IFS=$as_save_IFS
10792  test -z "$as_dir" && as_dir=.
10793    for ac_exec_ext in '' $ac_executable_extensions; do
10794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10795    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10797    break 2
10798  fi
10799done
10800  done
10801IFS=$as_save_IFS
10802
10803  ;;
10804esac
10805fi
10806UNIQ=$ac_cv_path_UNIQ
10807if test -n "$UNIQ"; then
10808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10809$as_echo "$UNIQ" >&6; }
10810else
10811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10812$as_echo "no" >&6; }
10813fi
10814
10815
10816        if test "x$UNIQ" = x; then
10817          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10818        fi
10819      else
10820        # Otherwise we believe it is a complete path. Use it as it is.
10821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10822$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10823        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10824$as_echo_n "checking for UNIQ... " >&6; }
10825        if test ! -x "$tool_specified"; then
10826          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10827$as_echo "not found" >&6; }
10828          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10829        fi
10830        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10831$as_echo "$tool_specified" >&6; }
10832      fi
10833    fi
10834  fi
10835
10836
10837
10838  if test "x$UNIQ" = x; then
10839    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10840  fi
10841
10842
10843
10844
10845
10846  # Publish this variable in the help.
10847
10848
10849  if test "x$WC" = x; then
10850    # The variable is not set by user, try to locate tool using the code snippet
10851    for ac_prog in wc
10852do
10853  # Extract the first word of "$ac_prog", so it can be a program name with args.
10854set dummy $ac_prog; ac_word=$2
10855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10856$as_echo_n "checking for $ac_word... " >&6; }
10857if ${ac_cv_path_WC+:} false; then :
10858  $as_echo_n "(cached) " >&6
10859else
10860  case $WC in
10861  [\\/]* | ?:[\\/]*)
10862  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10863  ;;
10864  *)
10865  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10866for as_dir in $PATH
10867do
10868  IFS=$as_save_IFS
10869  test -z "$as_dir" && as_dir=.
10870    for ac_exec_ext in '' $ac_executable_extensions; do
10871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10872    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10874    break 2
10875  fi
10876done
10877  done
10878IFS=$as_save_IFS
10879
10880  ;;
10881esac
10882fi
10883WC=$ac_cv_path_WC
10884if test -n "$WC"; then
10885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10886$as_echo "$WC" >&6; }
10887else
10888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10889$as_echo "no" >&6; }
10890fi
10891
10892
10893  test -n "$WC" && break
10894done
10895
10896  else
10897    # The variable is set, but is it from the command line or the environment?
10898
10899    # Try to remove the string !WC! from our list.
10900    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10901    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10902      # If it failed, the variable was not from the command line. Ignore it,
10903      # but warn the user (except for BASH, which is always set by the calling BASH).
10904      if test "xWC" != xBASH; then
10905        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10906$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10907      fi
10908      # Try to locate tool using the code snippet
10909      for ac_prog in wc
10910do
10911  # Extract the first word of "$ac_prog", so it can be a program name with args.
10912set dummy $ac_prog; ac_word=$2
10913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10914$as_echo_n "checking for $ac_word... " >&6; }
10915if ${ac_cv_path_WC+:} false; then :
10916  $as_echo_n "(cached) " >&6
10917else
10918  case $WC in
10919  [\\/]* | ?:[\\/]*)
10920  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10921  ;;
10922  *)
10923  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10924for as_dir in $PATH
10925do
10926  IFS=$as_save_IFS
10927  test -z "$as_dir" && as_dir=.
10928    for ac_exec_ext in '' $ac_executable_extensions; do
10929  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10930    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10931    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10932    break 2
10933  fi
10934done
10935  done
10936IFS=$as_save_IFS
10937
10938  ;;
10939esac
10940fi
10941WC=$ac_cv_path_WC
10942if test -n "$WC"; then
10943  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10944$as_echo "$WC" >&6; }
10945else
10946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10947$as_echo "no" >&6; }
10948fi
10949
10950
10951  test -n "$WC" && break
10952done
10953
10954    else
10955      # If it succeeded, then it was overridden by the user. We will use it
10956      # for the tool.
10957
10958      # First remove it from the list of overridden variables, so we can test
10959      # for unknown variables in the end.
10960      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10961
10962      # Check if the provided tool contains a complete path.
10963      tool_specified="$WC"
10964      tool_basename="${tool_specified##*/}"
10965      if test "x$tool_basename" = "x$tool_specified"; then
10966        # A command without a complete path is provided, search $PATH.
10967        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10968$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10969        # Extract the first word of "$tool_basename", so it can be a program name with args.
10970set dummy $tool_basename; ac_word=$2
10971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10972$as_echo_n "checking for $ac_word... " >&6; }
10973if ${ac_cv_path_WC+:} false; then :
10974  $as_echo_n "(cached) " >&6
10975else
10976  case $WC in
10977  [\\/]* | ?:[\\/]*)
10978  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10979  ;;
10980  *)
10981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10982for as_dir in $PATH
10983do
10984  IFS=$as_save_IFS
10985  test -z "$as_dir" && as_dir=.
10986    for ac_exec_ext in '' $ac_executable_extensions; do
10987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10988    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10990    break 2
10991  fi
10992done
10993  done
10994IFS=$as_save_IFS
10995
10996  ;;
10997esac
10998fi
10999WC=$ac_cv_path_WC
11000if test -n "$WC"; then
11001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11002$as_echo "$WC" >&6; }
11003else
11004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11005$as_echo "no" >&6; }
11006fi
11007
11008
11009        if test "x$WC" = x; then
11010          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11011        fi
11012      else
11013        # Otherwise we believe it is a complete path. Use it as it is.
11014        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11015$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11016        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11017$as_echo_n "checking for WC... " >&6; }
11018        if test ! -x "$tool_specified"; then
11019          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11020$as_echo "not found" >&6; }
11021          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11022        fi
11023        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11024$as_echo "$tool_specified" >&6; }
11025      fi
11026    fi
11027  fi
11028
11029
11030
11031  if test "x$WC" = x; then
11032    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11033  fi
11034
11035
11036
11037
11038
11039  # Publish this variable in the help.
11040
11041
11042  if test "x$WHICH" = x; then
11043    # The variable is not set by user, try to locate tool using the code snippet
11044    for ac_prog in which
11045do
11046  # Extract the first word of "$ac_prog", so it can be a program name with args.
11047set dummy $ac_prog; ac_word=$2
11048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11049$as_echo_n "checking for $ac_word... " >&6; }
11050if ${ac_cv_path_WHICH+:} false; then :
11051  $as_echo_n "(cached) " >&6
11052else
11053  case $WHICH in
11054  [\\/]* | ?:[\\/]*)
11055  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11056  ;;
11057  *)
11058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11059for as_dir in $PATH
11060do
11061  IFS=$as_save_IFS
11062  test -z "$as_dir" && as_dir=.
11063    for ac_exec_ext in '' $ac_executable_extensions; do
11064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11065    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11067    break 2
11068  fi
11069done
11070  done
11071IFS=$as_save_IFS
11072
11073  ;;
11074esac
11075fi
11076WHICH=$ac_cv_path_WHICH
11077if test -n "$WHICH"; then
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11079$as_echo "$WHICH" >&6; }
11080else
11081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11082$as_echo "no" >&6; }
11083fi
11084
11085
11086  test -n "$WHICH" && break
11087done
11088
11089  else
11090    # The variable is set, but is it from the command line or the environment?
11091
11092    # Try to remove the string !WHICH! from our list.
11093    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11094    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11095      # If it failed, the variable was not from the command line. Ignore it,
11096      # but warn the user (except for BASH, which is always set by the calling BASH).
11097      if test "xWHICH" != xBASH; then
11098        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11099$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11100      fi
11101      # Try to locate tool using the code snippet
11102      for ac_prog in which
11103do
11104  # Extract the first word of "$ac_prog", so it can be a program name with args.
11105set dummy $ac_prog; ac_word=$2
11106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11107$as_echo_n "checking for $ac_word... " >&6; }
11108if ${ac_cv_path_WHICH+:} false; then :
11109  $as_echo_n "(cached) " >&6
11110else
11111  case $WHICH in
11112  [\\/]* | ?:[\\/]*)
11113  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11114  ;;
11115  *)
11116  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11117for as_dir in $PATH
11118do
11119  IFS=$as_save_IFS
11120  test -z "$as_dir" && as_dir=.
11121    for ac_exec_ext in '' $ac_executable_extensions; do
11122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11123    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11125    break 2
11126  fi
11127done
11128  done
11129IFS=$as_save_IFS
11130
11131  ;;
11132esac
11133fi
11134WHICH=$ac_cv_path_WHICH
11135if test -n "$WHICH"; then
11136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11137$as_echo "$WHICH" >&6; }
11138else
11139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11140$as_echo "no" >&6; }
11141fi
11142
11143
11144  test -n "$WHICH" && break
11145done
11146
11147    else
11148      # If it succeeded, then it was overridden by the user. We will use it
11149      # for the tool.
11150
11151      # First remove it from the list of overridden variables, so we can test
11152      # for unknown variables in the end.
11153      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11154
11155      # Check if the provided tool contains a complete path.
11156      tool_specified="$WHICH"
11157      tool_basename="${tool_specified##*/}"
11158      if test "x$tool_basename" = "x$tool_specified"; then
11159        # A command without a complete path is provided, search $PATH.
11160        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11161$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11162        # Extract the first word of "$tool_basename", so it can be a program name with args.
11163set dummy $tool_basename; ac_word=$2
11164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11165$as_echo_n "checking for $ac_word... " >&6; }
11166if ${ac_cv_path_WHICH+:} false; then :
11167  $as_echo_n "(cached) " >&6
11168else
11169  case $WHICH in
11170  [\\/]* | ?:[\\/]*)
11171  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11172  ;;
11173  *)
11174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11175for as_dir in $PATH
11176do
11177  IFS=$as_save_IFS
11178  test -z "$as_dir" && as_dir=.
11179    for ac_exec_ext in '' $ac_executable_extensions; do
11180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11181    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11183    break 2
11184  fi
11185done
11186  done
11187IFS=$as_save_IFS
11188
11189  ;;
11190esac
11191fi
11192WHICH=$ac_cv_path_WHICH
11193if test -n "$WHICH"; then
11194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11195$as_echo "$WHICH" >&6; }
11196else
11197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11198$as_echo "no" >&6; }
11199fi
11200
11201
11202        if test "x$WHICH" = x; then
11203          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11204        fi
11205      else
11206        # Otherwise we believe it is a complete path. Use it as it is.
11207        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11208$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11210$as_echo_n "checking for WHICH... " >&6; }
11211        if test ! -x "$tool_specified"; then
11212          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11213$as_echo "not found" >&6; }
11214          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11215        fi
11216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11217$as_echo "$tool_specified" >&6; }
11218      fi
11219    fi
11220  fi
11221
11222
11223
11224  if test "x$WHICH" = x; then
11225    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11226  fi
11227
11228
11229
11230
11231
11232  # Publish this variable in the help.
11233
11234
11235  if test "x$XARGS" = x; then
11236    # The variable is not set by user, try to locate tool using the code snippet
11237    for ac_prog in xargs
11238do
11239  # Extract the first word of "$ac_prog", so it can be a program name with args.
11240set dummy $ac_prog; ac_word=$2
11241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11242$as_echo_n "checking for $ac_word... " >&6; }
11243if ${ac_cv_path_XARGS+:} false; then :
11244  $as_echo_n "(cached) " >&6
11245else
11246  case $XARGS in
11247  [\\/]* | ?:[\\/]*)
11248  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11249  ;;
11250  *)
11251  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11252for as_dir in $PATH
11253do
11254  IFS=$as_save_IFS
11255  test -z "$as_dir" && as_dir=.
11256    for ac_exec_ext in '' $ac_executable_extensions; do
11257  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11258    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11259    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11260    break 2
11261  fi
11262done
11263  done
11264IFS=$as_save_IFS
11265
11266  ;;
11267esac
11268fi
11269XARGS=$ac_cv_path_XARGS
11270if test -n "$XARGS"; then
11271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11272$as_echo "$XARGS" >&6; }
11273else
11274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11275$as_echo "no" >&6; }
11276fi
11277
11278
11279  test -n "$XARGS" && break
11280done
11281
11282  else
11283    # The variable is set, but is it from the command line or the environment?
11284
11285    # Try to remove the string !XARGS! from our list.
11286    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11287    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11288      # If it failed, the variable was not from the command line. Ignore it,
11289      # but warn the user (except for BASH, which is always set by the calling BASH).
11290      if test "xXARGS" != xBASH; then
11291        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11292$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11293      fi
11294      # Try to locate tool using the code snippet
11295      for ac_prog in xargs
11296do
11297  # Extract the first word of "$ac_prog", so it can be a program name with args.
11298set dummy $ac_prog; ac_word=$2
11299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11300$as_echo_n "checking for $ac_word... " >&6; }
11301if ${ac_cv_path_XARGS+:} false; then :
11302  $as_echo_n "(cached) " >&6
11303else
11304  case $XARGS in
11305  [\\/]* | ?:[\\/]*)
11306  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11307  ;;
11308  *)
11309  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11310for as_dir in $PATH
11311do
11312  IFS=$as_save_IFS
11313  test -z "$as_dir" && as_dir=.
11314    for ac_exec_ext in '' $ac_executable_extensions; do
11315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11316    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11317    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11318    break 2
11319  fi
11320done
11321  done
11322IFS=$as_save_IFS
11323
11324  ;;
11325esac
11326fi
11327XARGS=$ac_cv_path_XARGS
11328if test -n "$XARGS"; then
11329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11330$as_echo "$XARGS" >&6; }
11331else
11332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11333$as_echo "no" >&6; }
11334fi
11335
11336
11337  test -n "$XARGS" && break
11338done
11339
11340    else
11341      # If it succeeded, then it was overridden by the user. We will use it
11342      # for the tool.
11343
11344      # First remove it from the list of overridden variables, so we can test
11345      # for unknown variables in the end.
11346      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11347
11348      # Check if the provided tool contains a complete path.
11349      tool_specified="$XARGS"
11350      tool_basename="${tool_specified##*/}"
11351      if test "x$tool_basename" = "x$tool_specified"; then
11352        # A command without a complete path is provided, search $PATH.
11353        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11354$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11355        # Extract the first word of "$tool_basename", so it can be a program name with args.
11356set dummy $tool_basename; ac_word=$2
11357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11358$as_echo_n "checking for $ac_word... " >&6; }
11359if ${ac_cv_path_XARGS+:} false; then :
11360  $as_echo_n "(cached) " >&6
11361else
11362  case $XARGS in
11363  [\\/]* | ?:[\\/]*)
11364  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11365  ;;
11366  *)
11367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11368for as_dir in $PATH
11369do
11370  IFS=$as_save_IFS
11371  test -z "$as_dir" && as_dir=.
11372    for ac_exec_ext in '' $ac_executable_extensions; do
11373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11374    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11376    break 2
11377  fi
11378done
11379  done
11380IFS=$as_save_IFS
11381
11382  ;;
11383esac
11384fi
11385XARGS=$ac_cv_path_XARGS
11386if test -n "$XARGS"; then
11387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11388$as_echo "$XARGS" >&6; }
11389else
11390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11391$as_echo "no" >&6; }
11392fi
11393
11394
11395        if test "x$XARGS" = x; then
11396          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11397        fi
11398      else
11399        # Otherwise we believe it is a complete path. Use it as it is.
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11401$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11402        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11403$as_echo_n "checking for XARGS... " >&6; }
11404        if test ! -x "$tool_specified"; then
11405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11406$as_echo "not found" >&6; }
11407          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11408        fi
11409        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11410$as_echo "$tool_specified" >&6; }
11411      fi
11412    fi
11413  fi
11414
11415
11416
11417  if test "x$XARGS" = x; then
11418    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11419  fi
11420
11421
11422
11423  # Then required tools that require some special treatment.
11424
11425
11426  # Publish this variable in the help.
11427
11428
11429  if test "x$AWK" = x; then
11430    # The variable is not set by user, try to locate tool using the code snippet
11431    for ac_prog in gawk mawk nawk awk
11432do
11433  # Extract the first word of "$ac_prog", so it can be a program name with args.
11434set dummy $ac_prog; ac_word=$2
11435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436$as_echo_n "checking for $ac_word... " >&6; }
11437if ${ac_cv_prog_AWK+:} false; then :
11438  $as_echo_n "(cached) " >&6
11439else
11440  if test -n "$AWK"; then
11441  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11442else
11443as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11444for as_dir in $PATH
11445do
11446  IFS=$as_save_IFS
11447  test -z "$as_dir" && as_dir=.
11448    for ac_exec_ext in '' $ac_executable_extensions; do
11449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11450    ac_cv_prog_AWK="$ac_prog"
11451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11452    break 2
11453  fi
11454done
11455  done
11456IFS=$as_save_IFS
11457
11458fi
11459fi
11460AWK=$ac_cv_prog_AWK
11461if test -n "$AWK"; then
11462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11463$as_echo "$AWK" >&6; }
11464else
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11466$as_echo "no" >&6; }
11467fi
11468
11469
11470  test -n "$AWK" && break
11471done
11472
11473  else
11474    # The variable is set, but is it from the command line or the environment?
11475
11476    # Try to remove the string !AWK! from our list.
11477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11479      # If it failed, the variable was not from the command line. Ignore it,
11480      # but warn the user (except for BASH, which is always set by the calling BASH).
11481      if test "xAWK" != xBASH; then
11482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11483$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11484      fi
11485      # Try to locate tool using the code snippet
11486      for ac_prog in gawk mawk nawk awk
11487do
11488  # Extract the first word of "$ac_prog", so it can be a program name with args.
11489set dummy $ac_prog; ac_word=$2
11490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11491$as_echo_n "checking for $ac_word... " >&6; }
11492if ${ac_cv_prog_AWK+:} false; then :
11493  $as_echo_n "(cached) " >&6
11494else
11495  if test -n "$AWK"; then
11496  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11497else
11498as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11499for as_dir in $PATH
11500do
11501  IFS=$as_save_IFS
11502  test -z "$as_dir" && as_dir=.
11503    for ac_exec_ext in '' $ac_executable_extensions; do
11504  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11505    ac_cv_prog_AWK="$ac_prog"
11506    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11507    break 2
11508  fi
11509done
11510  done
11511IFS=$as_save_IFS
11512
11513fi
11514fi
11515AWK=$ac_cv_prog_AWK
11516if test -n "$AWK"; then
11517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11518$as_echo "$AWK" >&6; }
11519else
11520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11521$as_echo "no" >&6; }
11522fi
11523
11524
11525  test -n "$AWK" && break
11526done
11527
11528    else
11529      # If it succeeded, then it was overridden by the user. We will use it
11530      # for the tool.
11531
11532      # First remove it from the list of overridden variables, so we can test
11533      # for unknown variables in the end.
11534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11535
11536      # Check if the provided tool contains a complete path.
11537      tool_specified="$AWK"
11538      tool_basename="${tool_specified##*/}"
11539      if test "x$tool_basename" = "x$tool_specified"; then
11540        # A command without a complete path is provided, search $PATH.
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11542$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11543        # Extract the first word of "$tool_basename", so it can be a program name with args.
11544set dummy $tool_basename; ac_word=$2
11545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11546$as_echo_n "checking for $ac_word... " >&6; }
11547if ${ac_cv_path_AWK+:} false; then :
11548  $as_echo_n "(cached) " >&6
11549else
11550  case $AWK in
11551  [\\/]* | ?:[\\/]*)
11552  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11553  ;;
11554  *)
11555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11556for as_dir in $PATH
11557do
11558  IFS=$as_save_IFS
11559  test -z "$as_dir" && as_dir=.
11560    for ac_exec_ext in '' $ac_executable_extensions; do
11561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11562    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11564    break 2
11565  fi
11566done
11567  done
11568IFS=$as_save_IFS
11569
11570  ;;
11571esac
11572fi
11573AWK=$ac_cv_path_AWK
11574if test -n "$AWK"; then
11575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11576$as_echo "$AWK" >&6; }
11577else
11578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11579$as_echo "no" >&6; }
11580fi
11581
11582
11583        if test "x$AWK" = x; then
11584          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11585        fi
11586      else
11587        # Otherwise we believe it is a complete path. Use it as it is.
11588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11589$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11590        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11591$as_echo_n "checking for AWK... " >&6; }
11592        if test ! -x "$tool_specified"; then
11593          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11594$as_echo "not found" >&6; }
11595          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11596        fi
11597        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11598$as_echo "$tool_specified" >&6; }
11599      fi
11600    fi
11601  fi
11602
11603
11604  if test "x$AWK" = x; then
11605    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11606  fi
11607
11608
11609
11610
11611  # Publish this variable in the help.
11612
11613
11614  if test "x$GREP" = x; then
11615    # The variable is not set by user, try to locate tool using the code snippet
11616    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11617$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11618if ${ac_cv_path_GREP+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  if test -z "$GREP"; then
11622  ac_path_GREP_found=false
11623  # Loop through the user's path and test for each of PROGNAME-LIST
11624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11625for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11626do
11627  IFS=$as_save_IFS
11628  test -z "$as_dir" && as_dir=.
11629    for ac_prog in grep ggrep; do
11630    for ac_exec_ext in '' $ac_executable_extensions; do
11631      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11632      as_fn_executable_p "$ac_path_GREP" || continue
11633# Check for GNU ac_path_GREP and select it if it is found.
11634  # Check for GNU $ac_path_GREP
11635case `"$ac_path_GREP" --version 2>&1` in
11636*GNU*)
11637  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11638*)
11639  ac_count=0
11640  $as_echo_n 0123456789 >"conftest.in"
11641  while :
11642  do
11643    cat "conftest.in" "conftest.in" >"conftest.tmp"
11644    mv "conftest.tmp" "conftest.in"
11645    cp "conftest.in" "conftest.nl"
11646    $as_echo 'GREP' >> "conftest.nl"
11647    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11648    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11649    as_fn_arith $ac_count + 1 && ac_count=$as_val
11650    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11651      # Best one so far, save it but keep looking for a better one
11652      ac_cv_path_GREP="$ac_path_GREP"
11653      ac_path_GREP_max=$ac_count
11654    fi
11655    # 10*(2^10) chars as input seems more than enough
11656    test $ac_count -gt 10 && break
11657  done
11658  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11659esac
11660
11661      $ac_path_GREP_found && break 3
11662    done
11663  done
11664  done
11665IFS=$as_save_IFS
11666  if test -z "$ac_cv_path_GREP"; then
11667    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11668  fi
11669else
11670  ac_cv_path_GREP=$GREP
11671fi
11672
11673fi
11674{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11675$as_echo "$ac_cv_path_GREP" >&6; }
11676 GREP="$ac_cv_path_GREP"
11677
11678
11679  else
11680    # The variable is set, but is it from the command line or the environment?
11681
11682    # Try to remove the string !GREP! from our list.
11683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11685      # If it failed, the variable was not from the command line. Ignore it,
11686      # but warn the user (except for BASH, which is always set by the calling BASH).
11687      if test "xGREP" != xBASH; then
11688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11689$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11690      fi
11691      # Try to locate tool using the code snippet
11692      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11693$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11694if ${ac_cv_path_GREP+:} false; then :
11695  $as_echo_n "(cached) " >&6
11696else
11697  if test -z "$GREP"; then
11698  ac_path_GREP_found=false
11699  # Loop through the user's path and test for each of PROGNAME-LIST
11700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11701for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11702do
11703  IFS=$as_save_IFS
11704  test -z "$as_dir" && as_dir=.
11705    for ac_prog in grep ggrep; do
11706    for ac_exec_ext in '' $ac_executable_extensions; do
11707      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11708      as_fn_executable_p "$ac_path_GREP" || continue
11709# Check for GNU ac_path_GREP and select it if it is found.
11710  # Check for GNU $ac_path_GREP
11711case `"$ac_path_GREP" --version 2>&1` in
11712*GNU*)
11713  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11714*)
11715  ac_count=0
11716  $as_echo_n 0123456789 >"conftest.in"
11717  while :
11718  do
11719    cat "conftest.in" "conftest.in" >"conftest.tmp"
11720    mv "conftest.tmp" "conftest.in"
11721    cp "conftest.in" "conftest.nl"
11722    $as_echo 'GREP' >> "conftest.nl"
11723    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11724    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11725    as_fn_arith $ac_count + 1 && ac_count=$as_val
11726    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11727      # Best one so far, save it but keep looking for a better one
11728      ac_cv_path_GREP="$ac_path_GREP"
11729      ac_path_GREP_max=$ac_count
11730    fi
11731    # 10*(2^10) chars as input seems more than enough
11732    test $ac_count -gt 10 && break
11733  done
11734  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11735esac
11736
11737      $ac_path_GREP_found && break 3
11738    done
11739  done
11740  done
11741IFS=$as_save_IFS
11742  if test -z "$ac_cv_path_GREP"; then
11743    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11744  fi
11745else
11746  ac_cv_path_GREP=$GREP
11747fi
11748
11749fi
11750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11751$as_echo "$ac_cv_path_GREP" >&6; }
11752 GREP="$ac_cv_path_GREP"
11753
11754
11755    else
11756      # If it succeeded, then it was overridden by the user. We will use it
11757      # for the tool.
11758
11759      # First remove it from the list of overridden variables, so we can test
11760      # for unknown variables in the end.
11761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11762
11763      # Check if the provided tool contains a complete path.
11764      tool_specified="$GREP"
11765      tool_basename="${tool_specified##*/}"
11766      if test "x$tool_basename" = "x$tool_specified"; then
11767        # A command without a complete path is provided, search $PATH.
11768        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11769$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11770        # Extract the first word of "$tool_basename", so it can be a program name with args.
11771set dummy $tool_basename; ac_word=$2
11772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11773$as_echo_n "checking for $ac_word... " >&6; }
11774if ${ac_cv_path_GREP+:} false; then :
11775  $as_echo_n "(cached) " >&6
11776else
11777  case $GREP in
11778  [\\/]* | ?:[\\/]*)
11779  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11780  ;;
11781  *)
11782  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11783for as_dir in $PATH
11784do
11785  IFS=$as_save_IFS
11786  test -z "$as_dir" && as_dir=.
11787    for ac_exec_ext in '' $ac_executable_extensions; do
11788  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11789    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11791    break 2
11792  fi
11793done
11794  done
11795IFS=$as_save_IFS
11796
11797  ;;
11798esac
11799fi
11800GREP=$ac_cv_path_GREP
11801if test -n "$GREP"; then
11802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11803$as_echo "$GREP" >&6; }
11804else
11805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11806$as_echo "no" >&6; }
11807fi
11808
11809
11810        if test "x$GREP" = x; then
11811          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11812        fi
11813      else
11814        # Otherwise we believe it is a complete path. Use it as it is.
11815        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11816$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11817        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11818$as_echo_n "checking for GREP... " >&6; }
11819        if test ! -x "$tool_specified"; then
11820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11821$as_echo "not found" >&6; }
11822          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11823        fi
11824        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11825$as_echo "$tool_specified" >&6; }
11826      fi
11827    fi
11828  fi
11829
11830
11831  if test "x$GREP" = x; then
11832    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11833  fi
11834
11835
11836
11837
11838  # Publish this variable in the help.
11839
11840
11841  if test "x$EGREP" = x; then
11842    # The variable is not set by user, try to locate tool using the code snippet
11843    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11844$as_echo_n "checking for egrep... " >&6; }
11845if ${ac_cv_path_EGREP+:} false; then :
11846  $as_echo_n "(cached) " >&6
11847else
11848  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11849   then ac_cv_path_EGREP="$GREP -E"
11850   else
11851     if test -z "$EGREP"; then
11852  ac_path_EGREP_found=false
11853  # Loop through the user's path and test for each of PROGNAME-LIST
11854  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11855for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11856do
11857  IFS=$as_save_IFS
11858  test -z "$as_dir" && as_dir=.
11859    for ac_prog in egrep; do
11860    for ac_exec_ext in '' $ac_executable_extensions; do
11861      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11862      as_fn_executable_p "$ac_path_EGREP" || continue
11863# Check for GNU ac_path_EGREP and select it if it is found.
11864  # Check for GNU $ac_path_EGREP
11865case `"$ac_path_EGREP" --version 2>&1` in
11866*GNU*)
11867  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11868*)
11869  ac_count=0
11870  $as_echo_n 0123456789 >"conftest.in"
11871  while :
11872  do
11873    cat "conftest.in" "conftest.in" >"conftest.tmp"
11874    mv "conftest.tmp" "conftest.in"
11875    cp "conftest.in" "conftest.nl"
11876    $as_echo 'EGREP' >> "conftest.nl"
11877    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11878    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11879    as_fn_arith $ac_count + 1 && ac_count=$as_val
11880    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11881      # Best one so far, save it but keep looking for a better one
11882      ac_cv_path_EGREP="$ac_path_EGREP"
11883      ac_path_EGREP_max=$ac_count
11884    fi
11885    # 10*(2^10) chars as input seems more than enough
11886    test $ac_count -gt 10 && break
11887  done
11888  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11889esac
11890
11891      $ac_path_EGREP_found && break 3
11892    done
11893  done
11894  done
11895IFS=$as_save_IFS
11896  if test -z "$ac_cv_path_EGREP"; then
11897    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11898  fi
11899else
11900  ac_cv_path_EGREP=$EGREP
11901fi
11902
11903   fi
11904fi
11905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11906$as_echo "$ac_cv_path_EGREP" >&6; }
11907 EGREP="$ac_cv_path_EGREP"
11908
11909
11910  else
11911    # The variable is set, but is it from the command line or the environment?
11912
11913    # Try to remove the string !EGREP! from our list.
11914    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11915    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11916      # If it failed, the variable was not from the command line. Ignore it,
11917      # but warn the user (except for BASH, which is always set by the calling BASH).
11918      if test "xEGREP" != xBASH; then
11919        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11920$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11921      fi
11922      # Try to locate tool using the code snippet
11923      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11924$as_echo_n "checking for egrep... " >&6; }
11925if ${ac_cv_path_EGREP+:} false; then :
11926  $as_echo_n "(cached) " >&6
11927else
11928  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11929   then ac_cv_path_EGREP="$GREP -E"
11930   else
11931     if test -z "$EGREP"; then
11932  ac_path_EGREP_found=false
11933  # Loop through the user's path and test for each of PROGNAME-LIST
11934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11935for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11936do
11937  IFS=$as_save_IFS
11938  test -z "$as_dir" && as_dir=.
11939    for ac_prog in egrep; do
11940    for ac_exec_ext in '' $ac_executable_extensions; do
11941      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11942      as_fn_executable_p "$ac_path_EGREP" || continue
11943# Check for GNU ac_path_EGREP and select it if it is found.
11944  # Check for GNU $ac_path_EGREP
11945case `"$ac_path_EGREP" --version 2>&1` in
11946*GNU*)
11947  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11948*)
11949  ac_count=0
11950  $as_echo_n 0123456789 >"conftest.in"
11951  while :
11952  do
11953    cat "conftest.in" "conftest.in" >"conftest.tmp"
11954    mv "conftest.tmp" "conftest.in"
11955    cp "conftest.in" "conftest.nl"
11956    $as_echo 'EGREP' >> "conftest.nl"
11957    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11958    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11959    as_fn_arith $ac_count + 1 && ac_count=$as_val
11960    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11961      # Best one so far, save it but keep looking for a better one
11962      ac_cv_path_EGREP="$ac_path_EGREP"
11963      ac_path_EGREP_max=$ac_count
11964    fi
11965    # 10*(2^10) chars as input seems more than enough
11966    test $ac_count -gt 10 && break
11967  done
11968  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11969esac
11970
11971      $ac_path_EGREP_found && break 3
11972    done
11973  done
11974  done
11975IFS=$as_save_IFS
11976  if test -z "$ac_cv_path_EGREP"; then
11977    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11978  fi
11979else
11980  ac_cv_path_EGREP=$EGREP
11981fi
11982
11983   fi
11984fi
11985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11986$as_echo "$ac_cv_path_EGREP" >&6; }
11987 EGREP="$ac_cv_path_EGREP"
11988
11989
11990    else
11991      # If it succeeded, then it was overridden by the user. We will use it
11992      # for the tool.
11993
11994      # First remove it from the list of overridden variables, so we can test
11995      # for unknown variables in the end.
11996      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11997
11998      # Check if the provided tool contains a complete path.
11999      tool_specified="$EGREP"
12000      tool_basename="${tool_specified##*/}"
12001      if test "x$tool_basename" = "x$tool_specified"; then
12002        # A command without a complete path is provided, search $PATH.
12003        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12004$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12005        # Extract the first word of "$tool_basename", so it can be a program name with args.
12006set dummy $tool_basename; ac_word=$2
12007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12008$as_echo_n "checking for $ac_word... " >&6; }
12009if ${ac_cv_path_EGREP+:} false; then :
12010  $as_echo_n "(cached) " >&6
12011else
12012  case $EGREP in
12013  [\\/]* | ?:[\\/]*)
12014  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12015  ;;
12016  *)
12017  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12018for as_dir in $PATH
12019do
12020  IFS=$as_save_IFS
12021  test -z "$as_dir" && as_dir=.
12022    for ac_exec_ext in '' $ac_executable_extensions; do
12023  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12024    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12025    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12026    break 2
12027  fi
12028done
12029  done
12030IFS=$as_save_IFS
12031
12032  ;;
12033esac
12034fi
12035EGREP=$ac_cv_path_EGREP
12036if test -n "$EGREP"; then
12037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12038$as_echo "$EGREP" >&6; }
12039else
12040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12041$as_echo "no" >&6; }
12042fi
12043
12044
12045        if test "x$EGREP" = x; then
12046          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12047        fi
12048      else
12049        # Otherwise we believe it is a complete path. Use it as it is.
12050        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12051$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12053$as_echo_n "checking for EGREP... " >&6; }
12054        if test ! -x "$tool_specified"; then
12055          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12056$as_echo "not found" >&6; }
12057          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12058        fi
12059        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12060$as_echo "$tool_specified" >&6; }
12061      fi
12062    fi
12063  fi
12064
12065
12066  if test "x$EGREP" = x; then
12067    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12068  fi
12069
12070
12071
12072
12073  # Publish this variable in the help.
12074
12075
12076  if test "x$FGREP" = x; then
12077    # The variable is not set by user, try to locate tool using the code snippet
12078    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12079$as_echo_n "checking for fgrep... " >&6; }
12080if ${ac_cv_path_FGREP+:} false; then :
12081  $as_echo_n "(cached) " >&6
12082else
12083  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12084   then ac_cv_path_FGREP="$GREP -F"
12085   else
12086     if test -z "$FGREP"; then
12087  ac_path_FGREP_found=false
12088  # Loop through the user's path and test for each of PROGNAME-LIST
12089  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12090for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12091do
12092  IFS=$as_save_IFS
12093  test -z "$as_dir" && as_dir=.
12094    for ac_prog in fgrep; do
12095    for ac_exec_ext in '' $ac_executable_extensions; do
12096      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12097      as_fn_executable_p "$ac_path_FGREP" || continue
12098# Check for GNU ac_path_FGREP and select it if it is found.
12099  # Check for GNU $ac_path_FGREP
12100case `"$ac_path_FGREP" --version 2>&1` in
12101*GNU*)
12102  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12103*)
12104  ac_count=0
12105  $as_echo_n 0123456789 >"conftest.in"
12106  while :
12107  do
12108    cat "conftest.in" "conftest.in" >"conftest.tmp"
12109    mv "conftest.tmp" "conftest.in"
12110    cp "conftest.in" "conftest.nl"
12111    $as_echo 'FGREP' >> "conftest.nl"
12112    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12113    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12114    as_fn_arith $ac_count + 1 && ac_count=$as_val
12115    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12116      # Best one so far, save it but keep looking for a better one
12117      ac_cv_path_FGREP="$ac_path_FGREP"
12118      ac_path_FGREP_max=$ac_count
12119    fi
12120    # 10*(2^10) chars as input seems more than enough
12121    test $ac_count -gt 10 && break
12122  done
12123  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12124esac
12125
12126      $ac_path_FGREP_found && break 3
12127    done
12128  done
12129  done
12130IFS=$as_save_IFS
12131  if test -z "$ac_cv_path_FGREP"; then
12132    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12133  fi
12134else
12135  ac_cv_path_FGREP=$FGREP
12136fi
12137
12138   fi
12139fi
12140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12141$as_echo "$ac_cv_path_FGREP" >&6; }
12142 FGREP="$ac_cv_path_FGREP"
12143
12144
12145  else
12146    # The variable is set, but is it from the command line or the environment?
12147
12148    # Try to remove the string !FGREP! from our list.
12149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12151      # If it failed, the variable was not from the command line. Ignore it,
12152      # but warn the user (except for BASH, which is always set by the calling BASH).
12153      if test "xFGREP" != xBASH; then
12154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12155$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12156      fi
12157      # Try to locate tool using the code snippet
12158      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12159$as_echo_n "checking for fgrep... " >&6; }
12160if ${ac_cv_path_FGREP+:} false; then :
12161  $as_echo_n "(cached) " >&6
12162else
12163  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12164   then ac_cv_path_FGREP="$GREP -F"
12165   else
12166     if test -z "$FGREP"; then
12167  ac_path_FGREP_found=false
12168  # Loop through the user's path and test for each of PROGNAME-LIST
12169  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12170for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12171do
12172  IFS=$as_save_IFS
12173  test -z "$as_dir" && as_dir=.
12174    for ac_prog in fgrep; do
12175    for ac_exec_ext in '' $ac_executable_extensions; do
12176      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12177      as_fn_executable_p "$ac_path_FGREP" || continue
12178# Check for GNU ac_path_FGREP and select it if it is found.
12179  # Check for GNU $ac_path_FGREP
12180case `"$ac_path_FGREP" --version 2>&1` in
12181*GNU*)
12182  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12183*)
12184  ac_count=0
12185  $as_echo_n 0123456789 >"conftest.in"
12186  while :
12187  do
12188    cat "conftest.in" "conftest.in" >"conftest.tmp"
12189    mv "conftest.tmp" "conftest.in"
12190    cp "conftest.in" "conftest.nl"
12191    $as_echo 'FGREP' >> "conftest.nl"
12192    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12193    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12194    as_fn_arith $ac_count + 1 && ac_count=$as_val
12195    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12196      # Best one so far, save it but keep looking for a better one
12197      ac_cv_path_FGREP="$ac_path_FGREP"
12198      ac_path_FGREP_max=$ac_count
12199    fi
12200    # 10*(2^10) chars as input seems more than enough
12201    test $ac_count -gt 10 && break
12202  done
12203  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12204esac
12205
12206      $ac_path_FGREP_found && break 3
12207    done
12208  done
12209  done
12210IFS=$as_save_IFS
12211  if test -z "$ac_cv_path_FGREP"; then
12212    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12213  fi
12214else
12215  ac_cv_path_FGREP=$FGREP
12216fi
12217
12218   fi
12219fi
12220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12221$as_echo "$ac_cv_path_FGREP" >&6; }
12222 FGREP="$ac_cv_path_FGREP"
12223
12224
12225    else
12226      # If it succeeded, then it was overridden by the user. We will use it
12227      # for the tool.
12228
12229      # First remove it from the list of overridden variables, so we can test
12230      # for unknown variables in the end.
12231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12232
12233      # Check if the provided tool contains a complete path.
12234      tool_specified="$FGREP"
12235      tool_basename="${tool_specified##*/}"
12236      if test "x$tool_basename" = "x$tool_specified"; then
12237        # A command without a complete path is provided, search $PATH.
12238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12239$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12240        # Extract the first word of "$tool_basename", so it can be a program name with args.
12241set dummy $tool_basename; ac_word=$2
12242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12243$as_echo_n "checking for $ac_word... " >&6; }
12244if ${ac_cv_path_FGREP+:} false; then :
12245  $as_echo_n "(cached) " >&6
12246else
12247  case $FGREP in
12248  [\\/]* | ?:[\\/]*)
12249  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12250  ;;
12251  *)
12252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12253for as_dir in $PATH
12254do
12255  IFS=$as_save_IFS
12256  test -z "$as_dir" && as_dir=.
12257    for ac_exec_ext in '' $ac_executable_extensions; do
12258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12259    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12261    break 2
12262  fi
12263done
12264  done
12265IFS=$as_save_IFS
12266
12267  ;;
12268esac
12269fi
12270FGREP=$ac_cv_path_FGREP
12271if test -n "$FGREP"; then
12272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12273$as_echo "$FGREP" >&6; }
12274else
12275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12276$as_echo "no" >&6; }
12277fi
12278
12279
12280        if test "x$FGREP" = x; then
12281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12282        fi
12283      else
12284        # Otherwise we believe it is a complete path. Use it as it is.
12285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12286$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12288$as_echo_n "checking for FGREP... " >&6; }
12289        if test ! -x "$tool_specified"; then
12290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12291$as_echo "not found" >&6; }
12292          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12293        fi
12294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12295$as_echo "$tool_specified" >&6; }
12296      fi
12297    fi
12298  fi
12299
12300
12301  if test "x$FGREP" = x; then
12302    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12303  fi
12304
12305
12306
12307
12308  # Publish this variable in the help.
12309
12310
12311  if test "x$SED" = x; then
12312    # The variable is not set by user, try to locate tool using the code snippet
12313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12314$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12315if ${ac_cv_path_SED+:} false; then :
12316  $as_echo_n "(cached) " >&6
12317else
12318            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12319     for ac_i in 1 2 3 4 5 6 7; do
12320       ac_script="$ac_script$as_nl$ac_script"
12321     done
12322     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12323     { ac_script=; unset ac_script;}
12324     if test -z "$SED"; then
12325  ac_path_SED_found=false
12326  # Loop through the user's path and test for each of PROGNAME-LIST
12327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12328for as_dir in $PATH
12329do
12330  IFS=$as_save_IFS
12331  test -z "$as_dir" && as_dir=.
12332    for ac_prog in sed gsed; do
12333    for ac_exec_ext in '' $ac_executable_extensions; do
12334      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12335      as_fn_executable_p "$ac_path_SED" || continue
12336# Check for GNU ac_path_SED and select it if it is found.
12337  # Check for GNU $ac_path_SED
12338case `"$ac_path_SED" --version 2>&1` in
12339*GNU*)
12340  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12341*)
12342  ac_count=0
12343  $as_echo_n 0123456789 >"conftest.in"
12344  while :
12345  do
12346    cat "conftest.in" "conftest.in" >"conftest.tmp"
12347    mv "conftest.tmp" "conftest.in"
12348    cp "conftest.in" "conftest.nl"
12349    $as_echo '' >> "conftest.nl"
12350    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12351    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12352    as_fn_arith $ac_count + 1 && ac_count=$as_val
12353    if test $ac_count -gt ${ac_path_SED_max-0}; then
12354      # Best one so far, save it but keep looking for a better one
12355      ac_cv_path_SED="$ac_path_SED"
12356      ac_path_SED_max=$ac_count
12357    fi
12358    # 10*(2^10) chars as input seems more than enough
12359    test $ac_count -gt 10 && break
12360  done
12361  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12362esac
12363
12364      $ac_path_SED_found && break 3
12365    done
12366  done
12367  done
12368IFS=$as_save_IFS
12369  if test -z "$ac_cv_path_SED"; then
12370    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12371  fi
12372else
12373  ac_cv_path_SED=$SED
12374fi
12375
12376fi
12377{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12378$as_echo "$ac_cv_path_SED" >&6; }
12379 SED="$ac_cv_path_SED"
12380  rm -f conftest.sed
12381
12382  else
12383    # The variable is set, but is it from the command line or the environment?
12384
12385    # Try to remove the string !SED! from our list.
12386    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12387    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12388      # If it failed, the variable was not from the command line. Ignore it,
12389      # but warn the user (except for BASH, which is always set by the calling BASH).
12390      if test "xSED" != xBASH; then
12391        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12392$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12393      fi
12394      # Try to locate tool using the code snippet
12395      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12396$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12397if ${ac_cv_path_SED+:} false; then :
12398  $as_echo_n "(cached) " >&6
12399else
12400            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12401     for ac_i in 1 2 3 4 5 6 7; do
12402       ac_script="$ac_script$as_nl$ac_script"
12403     done
12404     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12405     { ac_script=; unset ac_script;}
12406     if test -z "$SED"; then
12407  ac_path_SED_found=false
12408  # Loop through the user's path and test for each of PROGNAME-LIST
12409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12410for as_dir in $PATH
12411do
12412  IFS=$as_save_IFS
12413  test -z "$as_dir" && as_dir=.
12414    for ac_prog in sed gsed; do
12415    for ac_exec_ext in '' $ac_executable_extensions; do
12416      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12417      as_fn_executable_p "$ac_path_SED" || continue
12418# Check for GNU ac_path_SED and select it if it is found.
12419  # Check for GNU $ac_path_SED
12420case `"$ac_path_SED" --version 2>&1` in
12421*GNU*)
12422  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12423*)
12424  ac_count=0
12425  $as_echo_n 0123456789 >"conftest.in"
12426  while :
12427  do
12428    cat "conftest.in" "conftest.in" >"conftest.tmp"
12429    mv "conftest.tmp" "conftest.in"
12430    cp "conftest.in" "conftest.nl"
12431    $as_echo '' >> "conftest.nl"
12432    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12433    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12434    as_fn_arith $ac_count + 1 && ac_count=$as_val
12435    if test $ac_count -gt ${ac_path_SED_max-0}; then
12436      # Best one so far, save it but keep looking for a better one
12437      ac_cv_path_SED="$ac_path_SED"
12438      ac_path_SED_max=$ac_count
12439    fi
12440    # 10*(2^10) chars as input seems more than enough
12441    test $ac_count -gt 10 && break
12442  done
12443  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12444esac
12445
12446      $ac_path_SED_found && break 3
12447    done
12448  done
12449  done
12450IFS=$as_save_IFS
12451  if test -z "$ac_cv_path_SED"; then
12452    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12453  fi
12454else
12455  ac_cv_path_SED=$SED
12456fi
12457
12458fi
12459{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12460$as_echo "$ac_cv_path_SED" >&6; }
12461 SED="$ac_cv_path_SED"
12462  rm -f conftest.sed
12463
12464    else
12465      # If it succeeded, then it was overridden by the user. We will use it
12466      # for the tool.
12467
12468      # First remove it from the list of overridden variables, so we can test
12469      # for unknown variables in the end.
12470      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12471
12472      # Check if the provided tool contains a complete path.
12473      tool_specified="$SED"
12474      tool_basename="${tool_specified##*/}"
12475      if test "x$tool_basename" = "x$tool_specified"; then
12476        # A command without a complete path is provided, search $PATH.
12477        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12478$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12479        # Extract the first word of "$tool_basename", so it can be a program name with args.
12480set dummy $tool_basename; ac_word=$2
12481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12482$as_echo_n "checking for $ac_word... " >&6; }
12483if ${ac_cv_path_SED+:} false; then :
12484  $as_echo_n "(cached) " >&6
12485else
12486  case $SED in
12487  [\\/]* | ?:[\\/]*)
12488  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12489  ;;
12490  *)
12491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12492for as_dir in $PATH
12493do
12494  IFS=$as_save_IFS
12495  test -z "$as_dir" && as_dir=.
12496    for ac_exec_ext in '' $ac_executable_extensions; do
12497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12498    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12500    break 2
12501  fi
12502done
12503  done
12504IFS=$as_save_IFS
12505
12506  ;;
12507esac
12508fi
12509SED=$ac_cv_path_SED
12510if test -n "$SED"; then
12511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12512$as_echo "$SED" >&6; }
12513else
12514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12515$as_echo "no" >&6; }
12516fi
12517
12518
12519        if test "x$SED" = x; then
12520          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12521        fi
12522      else
12523        # Otherwise we believe it is a complete path. Use it as it is.
12524        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12525$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12526        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12527$as_echo_n "checking for SED... " >&6; }
12528        if test ! -x "$tool_specified"; then
12529          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12530$as_echo "not found" >&6; }
12531          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12532        fi
12533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12534$as_echo "$tool_specified" >&6; }
12535      fi
12536    fi
12537  fi
12538
12539
12540  if test "x$SED" = x; then
12541    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12542  fi
12543
12544
12545
12546  # Always force rm.
12547  RM="$RM -f"
12548
12549  # pwd behaves differently on various platforms and some don't support the -L flag.
12550  # Always use the bash builtin pwd to get uniform behavior.
12551  THEPWDCMD=pwd
12552
12553  # These are not required on all platforms
12554
12555
12556  # Publish this variable in the help.
12557
12558
12559  if test "x$CYGPATH" = x; then
12560    # The variable is not set by user, try to locate tool using the code snippet
12561    for ac_prog in cygpath
12562do
12563  # Extract the first word of "$ac_prog", so it can be a program name with args.
12564set dummy $ac_prog; ac_word=$2
12565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12566$as_echo_n "checking for $ac_word... " >&6; }
12567if ${ac_cv_path_CYGPATH+:} false; then :
12568  $as_echo_n "(cached) " >&6
12569else
12570  case $CYGPATH in
12571  [\\/]* | ?:[\\/]*)
12572  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12573  ;;
12574  *)
12575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12576for as_dir in $PATH
12577do
12578  IFS=$as_save_IFS
12579  test -z "$as_dir" && as_dir=.
12580    for ac_exec_ext in '' $ac_executable_extensions; do
12581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12582    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12584    break 2
12585  fi
12586done
12587  done
12588IFS=$as_save_IFS
12589
12590  ;;
12591esac
12592fi
12593CYGPATH=$ac_cv_path_CYGPATH
12594if test -n "$CYGPATH"; then
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12596$as_echo "$CYGPATH" >&6; }
12597else
12598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12599$as_echo "no" >&6; }
12600fi
12601
12602
12603  test -n "$CYGPATH" && break
12604done
12605
12606  else
12607    # The variable is set, but is it from the command line or the environment?
12608
12609    # Try to remove the string !CYGPATH! from our list.
12610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12612      # If it failed, the variable was not from the command line. Ignore it,
12613      # but warn the user (except for BASH, which is always set by the calling BASH).
12614      if test "xCYGPATH" != xBASH; then
12615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12616$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12617      fi
12618      # Try to locate tool using the code snippet
12619      for ac_prog in cygpath
12620do
12621  # Extract the first word of "$ac_prog", so it can be a program name with args.
12622set dummy $ac_prog; ac_word=$2
12623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12624$as_echo_n "checking for $ac_word... " >&6; }
12625if ${ac_cv_path_CYGPATH+:} false; then :
12626  $as_echo_n "(cached) " >&6
12627else
12628  case $CYGPATH in
12629  [\\/]* | ?:[\\/]*)
12630  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12631  ;;
12632  *)
12633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12634for as_dir in $PATH
12635do
12636  IFS=$as_save_IFS
12637  test -z "$as_dir" && as_dir=.
12638    for ac_exec_ext in '' $ac_executable_extensions; do
12639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12640    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12642    break 2
12643  fi
12644done
12645  done
12646IFS=$as_save_IFS
12647
12648  ;;
12649esac
12650fi
12651CYGPATH=$ac_cv_path_CYGPATH
12652if test -n "$CYGPATH"; then
12653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12654$as_echo "$CYGPATH" >&6; }
12655else
12656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658fi
12659
12660
12661  test -n "$CYGPATH" && break
12662done
12663
12664    else
12665      # If it succeeded, then it was overridden by the user. We will use it
12666      # for the tool.
12667
12668      # First remove it from the list of overridden variables, so we can test
12669      # for unknown variables in the end.
12670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12671
12672      # Check if the provided tool contains a complete path.
12673      tool_specified="$CYGPATH"
12674      tool_basename="${tool_specified##*/}"
12675      if test "x$tool_basename" = "x$tool_specified"; then
12676        # A command without a complete path is provided, search $PATH.
12677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12678$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12679        # Extract the first word of "$tool_basename", so it can be a program name with args.
12680set dummy $tool_basename; ac_word=$2
12681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12682$as_echo_n "checking for $ac_word... " >&6; }
12683if ${ac_cv_path_CYGPATH+:} false; then :
12684  $as_echo_n "(cached) " >&6
12685else
12686  case $CYGPATH in
12687  [\\/]* | ?:[\\/]*)
12688  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12689  ;;
12690  *)
12691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12692for as_dir in $PATH
12693do
12694  IFS=$as_save_IFS
12695  test -z "$as_dir" && as_dir=.
12696    for ac_exec_ext in '' $ac_executable_extensions; do
12697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12698    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12700    break 2
12701  fi
12702done
12703  done
12704IFS=$as_save_IFS
12705
12706  ;;
12707esac
12708fi
12709CYGPATH=$ac_cv_path_CYGPATH
12710if test -n "$CYGPATH"; then
12711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12712$as_echo "$CYGPATH" >&6; }
12713else
12714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12715$as_echo "no" >&6; }
12716fi
12717
12718
12719        if test "x$CYGPATH" = x; then
12720          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12721        fi
12722      else
12723        # Otherwise we believe it is a complete path. Use it as it is.
12724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12725$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12727$as_echo_n "checking for CYGPATH... " >&6; }
12728        if test ! -x "$tool_specified"; then
12729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12730$as_echo "not found" >&6; }
12731          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12732        fi
12733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12734$as_echo "$tool_specified" >&6; }
12735      fi
12736    fi
12737  fi
12738
12739
12740
12741
12742  # Publish this variable in the help.
12743
12744
12745  if test "x$READLINK" = x; then
12746    # The variable is not set by user, try to locate tool using the code snippet
12747    for ac_prog in greadlink readlink
12748do
12749  # Extract the first word of "$ac_prog", so it can be a program name with args.
12750set dummy $ac_prog; ac_word=$2
12751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12752$as_echo_n "checking for $ac_word... " >&6; }
12753if ${ac_cv_path_READLINK+:} false; then :
12754  $as_echo_n "(cached) " >&6
12755else
12756  case $READLINK in
12757  [\\/]* | ?:[\\/]*)
12758  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12759  ;;
12760  *)
12761  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12762for as_dir in $PATH
12763do
12764  IFS=$as_save_IFS
12765  test -z "$as_dir" && as_dir=.
12766    for ac_exec_ext in '' $ac_executable_extensions; do
12767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12768    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12770    break 2
12771  fi
12772done
12773  done
12774IFS=$as_save_IFS
12775
12776  ;;
12777esac
12778fi
12779READLINK=$ac_cv_path_READLINK
12780if test -n "$READLINK"; then
12781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12782$as_echo "$READLINK" >&6; }
12783else
12784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12785$as_echo "no" >&6; }
12786fi
12787
12788
12789  test -n "$READLINK" && break
12790done
12791
12792  else
12793    # The variable is set, but is it from the command line or the environment?
12794
12795    # Try to remove the string !READLINK! from our list.
12796    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12797    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12798      # If it failed, the variable was not from the command line. Ignore it,
12799      # but warn the user (except for BASH, which is always set by the calling BASH).
12800      if test "xREADLINK" != xBASH; then
12801        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12802$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12803      fi
12804      # Try to locate tool using the code snippet
12805      for ac_prog in greadlink readlink
12806do
12807  # Extract the first word of "$ac_prog", so it can be a program name with args.
12808set dummy $ac_prog; ac_word=$2
12809{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12810$as_echo_n "checking for $ac_word... " >&6; }
12811if ${ac_cv_path_READLINK+:} false; then :
12812  $as_echo_n "(cached) " >&6
12813else
12814  case $READLINK in
12815  [\\/]* | ?:[\\/]*)
12816  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12817  ;;
12818  *)
12819  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12820for as_dir in $PATH
12821do
12822  IFS=$as_save_IFS
12823  test -z "$as_dir" && as_dir=.
12824    for ac_exec_ext in '' $ac_executable_extensions; do
12825  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12826    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12827    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12828    break 2
12829  fi
12830done
12831  done
12832IFS=$as_save_IFS
12833
12834  ;;
12835esac
12836fi
12837READLINK=$ac_cv_path_READLINK
12838if test -n "$READLINK"; then
12839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12840$as_echo "$READLINK" >&6; }
12841else
12842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12843$as_echo "no" >&6; }
12844fi
12845
12846
12847  test -n "$READLINK" && break
12848done
12849
12850    else
12851      # If it succeeded, then it was overridden by the user. We will use it
12852      # for the tool.
12853
12854      # First remove it from the list of overridden variables, so we can test
12855      # for unknown variables in the end.
12856      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12857
12858      # Check if the provided tool contains a complete path.
12859      tool_specified="$READLINK"
12860      tool_basename="${tool_specified##*/}"
12861      if test "x$tool_basename" = "x$tool_specified"; then
12862        # A command without a complete path is provided, search $PATH.
12863        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12864$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12865        # Extract the first word of "$tool_basename", so it can be a program name with args.
12866set dummy $tool_basename; ac_word=$2
12867{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12868$as_echo_n "checking for $ac_word... " >&6; }
12869if ${ac_cv_path_READLINK+:} false; then :
12870  $as_echo_n "(cached) " >&6
12871else
12872  case $READLINK in
12873  [\\/]* | ?:[\\/]*)
12874  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12875  ;;
12876  *)
12877  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12878for as_dir in $PATH
12879do
12880  IFS=$as_save_IFS
12881  test -z "$as_dir" && as_dir=.
12882    for ac_exec_ext in '' $ac_executable_extensions; do
12883  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12884    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12885    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12886    break 2
12887  fi
12888done
12889  done
12890IFS=$as_save_IFS
12891
12892  ;;
12893esac
12894fi
12895READLINK=$ac_cv_path_READLINK
12896if test -n "$READLINK"; then
12897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12898$as_echo "$READLINK" >&6; }
12899else
12900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12901$as_echo "no" >&6; }
12902fi
12903
12904
12905        if test "x$READLINK" = x; then
12906          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12907        fi
12908      else
12909        # Otherwise we believe it is a complete path. Use it as it is.
12910        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12911$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12913$as_echo_n "checking for READLINK... " >&6; }
12914        if test ! -x "$tool_specified"; then
12915          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12916$as_echo "not found" >&6; }
12917          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12918        fi
12919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12920$as_echo "$tool_specified" >&6; }
12921      fi
12922    fi
12923  fi
12924
12925
12926
12927
12928  # Publish this variable in the help.
12929
12930
12931  if test "x$DF" = x; then
12932    # The variable is not set by user, try to locate tool using the code snippet
12933    for ac_prog in df
12934do
12935  # Extract the first word of "$ac_prog", so it can be a program name with args.
12936set dummy $ac_prog; ac_word=$2
12937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12938$as_echo_n "checking for $ac_word... " >&6; }
12939if ${ac_cv_path_DF+:} false; then :
12940  $as_echo_n "(cached) " >&6
12941else
12942  case $DF in
12943  [\\/]* | ?:[\\/]*)
12944  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12945  ;;
12946  *)
12947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12948for as_dir in $PATH
12949do
12950  IFS=$as_save_IFS
12951  test -z "$as_dir" && as_dir=.
12952    for ac_exec_ext in '' $ac_executable_extensions; do
12953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12954    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12956    break 2
12957  fi
12958done
12959  done
12960IFS=$as_save_IFS
12961
12962  ;;
12963esac
12964fi
12965DF=$ac_cv_path_DF
12966if test -n "$DF"; then
12967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12968$as_echo "$DF" >&6; }
12969else
12970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12971$as_echo "no" >&6; }
12972fi
12973
12974
12975  test -n "$DF" && break
12976done
12977
12978  else
12979    # The variable is set, but is it from the command line or the environment?
12980
12981    # Try to remove the string !DF! from our list.
12982    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12983    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12984      # If it failed, the variable was not from the command line. Ignore it,
12985      # but warn the user (except for BASH, which is always set by the calling BASH).
12986      if test "xDF" != xBASH; then
12987        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12988$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12989      fi
12990      # Try to locate tool using the code snippet
12991      for ac_prog in df
12992do
12993  # Extract the first word of "$ac_prog", so it can be a program name with args.
12994set dummy $ac_prog; ac_word=$2
12995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12996$as_echo_n "checking for $ac_word... " >&6; }
12997if ${ac_cv_path_DF+:} false; then :
12998  $as_echo_n "(cached) " >&6
12999else
13000  case $DF in
13001  [\\/]* | ?:[\\/]*)
13002  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13003  ;;
13004  *)
13005  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13006for as_dir in $PATH
13007do
13008  IFS=$as_save_IFS
13009  test -z "$as_dir" && as_dir=.
13010    for ac_exec_ext in '' $ac_executable_extensions; do
13011  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13012    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13013    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13014    break 2
13015  fi
13016done
13017  done
13018IFS=$as_save_IFS
13019
13020  ;;
13021esac
13022fi
13023DF=$ac_cv_path_DF
13024if test -n "$DF"; then
13025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13026$as_echo "$DF" >&6; }
13027else
13028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13029$as_echo "no" >&6; }
13030fi
13031
13032
13033  test -n "$DF" && break
13034done
13035
13036    else
13037      # If it succeeded, then it was overridden by the user. We will use it
13038      # for the tool.
13039
13040      # First remove it from the list of overridden variables, so we can test
13041      # for unknown variables in the end.
13042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13043
13044      # Check if the provided tool contains a complete path.
13045      tool_specified="$DF"
13046      tool_basename="${tool_specified##*/}"
13047      if test "x$tool_basename" = "x$tool_specified"; then
13048        # A command without a complete path is provided, search $PATH.
13049        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13050$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13051        # Extract the first word of "$tool_basename", so it can be a program name with args.
13052set dummy $tool_basename; ac_word=$2
13053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13054$as_echo_n "checking for $ac_word... " >&6; }
13055if ${ac_cv_path_DF+:} false; then :
13056  $as_echo_n "(cached) " >&6
13057else
13058  case $DF in
13059  [\\/]* | ?:[\\/]*)
13060  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13061  ;;
13062  *)
13063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13064for as_dir in $PATH
13065do
13066  IFS=$as_save_IFS
13067  test -z "$as_dir" && as_dir=.
13068    for ac_exec_ext in '' $ac_executable_extensions; do
13069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13070    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13072    break 2
13073  fi
13074done
13075  done
13076IFS=$as_save_IFS
13077
13078  ;;
13079esac
13080fi
13081DF=$ac_cv_path_DF
13082if test -n "$DF"; then
13083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13084$as_echo "$DF" >&6; }
13085else
13086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13087$as_echo "no" >&6; }
13088fi
13089
13090
13091        if test "x$DF" = x; then
13092          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13093        fi
13094      else
13095        # Otherwise we believe it is a complete path. Use it as it is.
13096        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13097$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13098        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13099$as_echo_n "checking for DF... " >&6; }
13100        if test ! -x "$tool_specified"; then
13101          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13102$as_echo "not found" >&6; }
13103          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13104        fi
13105        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13106$as_echo "$tool_specified" >&6; }
13107      fi
13108    fi
13109  fi
13110
13111
13112
13113
13114  # Publish this variable in the help.
13115
13116
13117  if test "x$SETFILE" = x; then
13118    # The variable is not set by user, try to locate tool using the code snippet
13119    for ac_prog in SetFile
13120do
13121  # Extract the first word of "$ac_prog", so it can be a program name with args.
13122set dummy $ac_prog; ac_word=$2
13123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13124$as_echo_n "checking for $ac_word... " >&6; }
13125if ${ac_cv_path_SETFILE+:} false; then :
13126  $as_echo_n "(cached) " >&6
13127else
13128  case $SETFILE in
13129  [\\/]* | ?:[\\/]*)
13130  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13131  ;;
13132  *)
13133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13134for as_dir in $PATH
13135do
13136  IFS=$as_save_IFS
13137  test -z "$as_dir" && as_dir=.
13138    for ac_exec_ext in '' $ac_executable_extensions; do
13139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13140    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13142    break 2
13143  fi
13144done
13145  done
13146IFS=$as_save_IFS
13147
13148  ;;
13149esac
13150fi
13151SETFILE=$ac_cv_path_SETFILE
13152if test -n "$SETFILE"; then
13153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13154$as_echo "$SETFILE" >&6; }
13155else
13156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13157$as_echo "no" >&6; }
13158fi
13159
13160
13161  test -n "$SETFILE" && break
13162done
13163
13164  else
13165    # The variable is set, but is it from the command line or the environment?
13166
13167    # Try to remove the string !SETFILE! from our list.
13168    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13169    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13170      # If it failed, the variable was not from the command line. Ignore it,
13171      # but warn the user (except for BASH, which is always set by the calling BASH).
13172      if test "xSETFILE" != xBASH; then
13173        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13174$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13175      fi
13176      # Try to locate tool using the code snippet
13177      for ac_prog in SetFile
13178do
13179  # Extract the first word of "$ac_prog", so it can be a program name with args.
13180set dummy $ac_prog; ac_word=$2
13181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13182$as_echo_n "checking for $ac_word... " >&6; }
13183if ${ac_cv_path_SETFILE+:} false; then :
13184  $as_echo_n "(cached) " >&6
13185else
13186  case $SETFILE in
13187  [\\/]* | ?:[\\/]*)
13188  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13189  ;;
13190  *)
13191  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13192for as_dir in $PATH
13193do
13194  IFS=$as_save_IFS
13195  test -z "$as_dir" && as_dir=.
13196    for ac_exec_ext in '' $ac_executable_extensions; do
13197  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13198    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13199    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13200    break 2
13201  fi
13202done
13203  done
13204IFS=$as_save_IFS
13205
13206  ;;
13207esac
13208fi
13209SETFILE=$ac_cv_path_SETFILE
13210if test -n "$SETFILE"; then
13211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13212$as_echo "$SETFILE" >&6; }
13213else
13214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13215$as_echo "no" >&6; }
13216fi
13217
13218
13219  test -n "$SETFILE" && break
13220done
13221
13222    else
13223      # If it succeeded, then it was overridden by the user. We will use it
13224      # for the tool.
13225
13226      # First remove it from the list of overridden variables, so we can test
13227      # for unknown variables in the end.
13228      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13229
13230      # Check if the provided tool contains a complete path.
13231      tool_specified="$SETFILE"
13232      tool_basename="${tool_specified##*/}"
13233      if test "x$tool_basename" = "x$tool_specified"; then
13234        # A command without a complete path is provided, search $PATH.
13235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13236$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13237        # Extract the first word of "$tool_basename", so it can be a program name with args.
13238set dummy $tool_basename; ac_word=$2
13239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13240$as_echo_n "checking for $ac_word... " >&6; }
13241if ${ac_cv_path_SETFILE+:} false; then :
13242  $as_echo_n "(cached) " >&6
13243else
13244  case $SETFILE in
13245  [\\/]* | ?:[\\/]*)
13246  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13247  ;;
13248  *)
13249  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13250for as_dir in $PATH
13251do
13252  IFS=$as_save_IFS
13253  test -z "$as_dir" && as_dir=.
13254    for ac_exec_ext in '' $ac_executable_extensions; do
13255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13256    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13258    break 2
13259  fi
13260done
13261  done
13262IFS=$as_save_IFS
13263
13264  ;;
13265esac
13266fi
13267SETFILE=$ac_cv_path_SETFILE
13268if test -n "$SETFILE"; then
13269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13270$as_echo "$SETFILE" >&6; }
13271else
13272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13273$as_echo "no" >&6; }
13274fi
13275
13276
13277        if test "x$SETFILE" = x; then
13278          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13279        fi
13280      else
13281        # Otherwise we believe it is a complete path. Use it as it is.
13282        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13283$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13285$as_echo_n "checking for SETFILE... " >&6; }
13286        if test ! -x "$tool_specified"; then
13287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13288$as_echo "not found" >&6; }
13289          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13290        fi
13291        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13292$as_echo "$tool_specified" >&6; }
13293      fi
13294    fi
13295  fi
13296
13297
13298
13299
13300# Now we can determine OpenJDK build and target platforms. This is required to
13301# have early on.
13302# Make sure we can run config.sub.
13303$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13304  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13305
13306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13307$as_echo_n "checking build system type... " >&6; }
13308if ${ac_cv_build+:} false; then :
13309  $as_echo_n "(cached) " >&6
13310else
13311  ac_build_alias=$build_alias
13312test "x$ac_build_alias" = x &&
13313  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13314test "x$ac_build_alias" = x &&
13315  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13316ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13317  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13318
13319fi
13320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13321$as_echo "$ac_cv_build" >&6; }
13322case $ac_cv_build in
13323*-*-*) ;;
13324*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13325esac
13326build=$ac_cv_build
13327ac_save_IFS=$IFS; IFS='-'
13328set x $ac_cv_build
13329shift
13330build_cpu=$1
13331build_vendor=$2
13332shift; shift
13333# Remember, the first character of IFS is used to create $*,
13334# except with old shells:
13335build_os=$*
13336IFS=$ac_save_IFS
13337case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13338
13339
13340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13341$as_echo_n "checking host system type... " >&6; }
13342if ${ac_cv_host+:} false; then :
13343  $as_echo_n "(cached) " >&6
13344else
13345  if test "x$host_alias" = x; then
13346  ac_cv_host=$ac_cv_build
13347else
13348  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13349    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13350fi
13351
13352fi
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13354$as_echo "$ac_cv_host" >&6; }
13355case $ac_cv_host in
13356*-*-*) ;;
13357*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13358esac
13359host=$ac_cv_host
13360ac_save_IFS=$IFS; IFS='-'
13361set x $ac_cv_host
13362shift
13363host_cpu=$1
13364host_vendor=$2
13365shift; shift
13366# Remember, the first character of IFS is used to create $*,
13367# except with old shells:
13368host_os=$*
13369IFS=$ac_save_IFS
13370case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13371
13372
13373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13374$as_echo_n "checking target system type... " >&6; }
13375if ${ac_cv_target+:} false; then :
13376  $as_echo_n "(cached) " >&6
13377else
13378  if test "x$target_alias" = x; then
13379  ac_cv_target=$ac_cv_host
13380else
13381  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13382    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13383fi
13384
13385fi
13386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13387$as_echo "$ac_cv_target" >&6; }
13388case $ac_cv_target in
13389*-*-*) ;;
13390*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13391esac
13392target=$ac_cv_target
13393ac_save_IFS=$IFS; IFS='-'
13394set x $ac_cv_target
13395shift
13396target_cpu=$1
13397target_vendor=$2
13398shift; shift
13399# Remember, the first character of IFS is used to create $*,
13400# except with old shells:
13401target_os=$*
13402IFS=$ac_save_IFS
13403case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13404
13405
13406# The aliases save the names the user supplied, while $host etc.
13407# will get canonicalized.
13408test -n "$target_alias" &&
13409  test "$program_prefix$program_suffix$program_transform_name" = \
13410    NONENONEs,x,x, &&
13411  program_prefix=${target_alias}-
13412
13413  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13414  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13415  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13416  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13417  # to use the configure naming style.
13418
13419
13420
13421
13422
13423  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13424  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13425  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13426  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13427  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13428  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13429
13430
13431
13432  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13433
13434  case "$build_os" in
13435    *linux*)
13436      VAR_OS=linux
13437      VAR_OS_API=posix
13438      VAR_OS_ENV=linux
13439      ;;
13440    *solaris*)
13441      VAR_OS=solaris
13442      VAR_OS_API=posix
13443      VAR_OS_ENV=solaris
13444      ;;
13445    *darwin*)
13446      VAR_OS=macosx
13447      VAR_OS_API=posix
13448      VAR_OS_ENV=macosx
13449      ;;
13450    *bsd*)
13451      VAR_OS=bsd
13452      VAR_OS_API=posix
13453      VAR_OS_ENV=bsd
13454      ;;
13455    *cygwin*)
13456      VAR_OS=windows
13457      VAR_OS_API=winapi
13458      VAR_OS_ENV=windows.cygwin
13459      ;;
13460    *mingw*)
13461      VAR_OS=windows
13462      VAR_OS_API=winapi
13463      VAR_OS_ENV=windows.msys
13464      ;;
13465    *aix*)
13466      VAR_OS=aix
13467      VAR_OS_API=posix
13468      VAR_OS_ENV=aix
13469      ;;
13470    *)
13471      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13472      ;;
13473  esac
13474
13475
13476  # First argument is the cpu name from the trip/quad
13477  case "$build_cpu" in
13478    x86_64)
13479      VAR_CPU=x86_64
13480      VAR_CPU_ARCH=x86
13481      VAR_CPU_BITS=64
13482      VAR_CPU_ENDIAN=little
13483      ;;
13484    i?86)
13485      VAR_CPU=x86
13486      VAR_CPU_ARCH=x86
13487      VAR_CPU_BITS=32
13488      VAR_CPU_ENDIAN=little
13489      ;;
13490    arm*)
13491      VAR_CPU=arm
13492      VAR_CPU_ARCH=arm
13493      VAR_CPU_BITS=32
13494      VAR_CPU_ENDIAN=little
13495      ;;
13496    powerpc)
13497      VAR_CPU=ppc
13498      VAR_CPU_ARCH=ppc
13499      VAR_CPU_BITS=32
13500      VAR_CPU_ENDIAN=big
13501      ;;
13502    powerpc64)
13503      VAR_CPU=ppc64
13504      VAR_CPU_ARCH=ppc
13505      VAR_CPU_BITS=64
13506      VAR_CPU_ENDIAN=big
13507      ;;
13508    s390)
13509      VAR_CPU=s390
13510      VAR_CPU_ARCH=s390
13511      VAR_CPU_BITS=32
13512      VAR_CPU_ENDIAN=big
13513      ;;
13514    s390x)
13515      VAR_CPU=s390x
13516      VAR_CPU_ARCH=s390
13517      VAR_CPU_BITS=64
13518      VAR_CPU_ENDIAN=big
13519      ;;
13520    sparc)
13521      VAR_CPU=sparc
13522      VAR_CPU_ARCH=sparc
13523      VAR_CPU_BITS=32
13524      VAR_CPU_ENDIAN=big
13525      ;;
13526    sparcv9)
13527      VAR_CPU=sparcv9
13528      VAR_CPU_ARCH=sparc
13529      VAR_CPU_BITS=64
13530      VAR_CPU_ENDIAN=big
13531      ;;
13532    *)
13533      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13534      ;;
13535  esac
13536
13537  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13538  OPENJDK_BUILD_OS="$VAR_OS"
13539  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13540  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13541  OPENJDK_BUILD_CPU="$VAR_CPU"
13542  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13543  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13544  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13545
13546
13547
13548
13549
13550
13551
13552  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13553$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13555$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13556
13557  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13558
13559  case "$host_os" in
13560    *linux*)
13561      VAR_OS=linux
13562      VAR_OS_API=posix
13563      VAR_OS_ENV=linux
13564      ;;
13565    *solaris*)
13566      VAR_OS=solaris
13567      VAR_OS_API=posix
13568      VAR_OS_ENV=solaris
13569      ;;
13570    *darwin*)
13571      VAR_OS=macosx
13572      VAR_OS_API=posix
13573      VAR_OS_ENV=macosx
13574      ;;
13575    *bsd*)
13576      VAR_OS=bsd
13577      VAR_OS_API=posix
13578      VAR_OS_ENV=bsd
13579      ;;
13580    *cygwin*)
13581      VAR_OS=windows
13582      VAR_OS_API=winapi
13583      VAR_OS_ENV=windows.cygwin
13584      ;;
13585    *mingw*)
13586      VAR_OS=windows
13587      VAR_OS_API=winapi
13588      VAR_OS_ENV=windows.msys
13589      ;;
13590    *aix*)
13591      VAR_OS=aix
13592      VAR_OS_API=posix
13593      VAR_OS_ENV=aix
13594      ;;
13595    *)
13596      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13597      ;;
13598  esac
13599
13600
13601  # First argument is the cpu name from the trip/quad
13602  case "$host_cpu" in
13603    x86_64)
13604      VAR_CPU=x86_64
13605      VAR_CPU_ARCH=x86
13606      VAR_CPU_BITS=64
13607      VAR_CPU_ENDIAN=little
13608      ;;
13609    i?86)
13610      VAR_CPU=x86
13611      VAR_CPU_ARCH=x86
13612      VAR_CPU_BITS=32
13613      VAR_CPU_ENDIAN=little
13614      ;;
13615    arm*)
13616      VAR_CPU=arm
13617      VAR_CPU_ARCH=arm
13618      VAR_CPU_BITS=32
13619      VAR_CPU_ENDIAN=little
13620      ;;
13621    powerpc)
13622      VAR_CPU=ppc
13623      VAR_CPU_ARCH=ppc
13624      VAR_CPU_BITS=32
13625      VAR_CPU_ENDIAN=big
13626      ;;
13627    powerpc64)
13628      VAR_CPU=ppc64
13629      VAR_CPU_ARCH=ppc
13630      VAR_CPU_BITS=64
13631      VAR_CPU_ENDIAN=big
13632      ;;
13633    s390)
13634      VAR_CPU=s390
13635      VAR_CPU_ARCH=s390
13636      VAR_CPU_BITS=32
13637      VAR_CPU_ENDIAN=big
13638      ;;
13639    s390x)
13640      VAR_CPU=s390x
13641      VAR_CPU_ARCH=s390
13642      VAR_CPU_BITS=64
13643      VAR_CPU_ENDIAN=big
13644      ;;
13645    sparc)
13646      VAR_CPU=sparc
13647      VAR_CPU_ARCH=sparc
13648      VAR_CPU_BITS=32
13649      VAR_CPU_ENDIAN=big
13650      ;;
13651    sparcv9)
13652      VAR_CPU=sparcv9
13653      VAR_CPU_ARCH=sparc
13654      VAR_CPU_BITS=64
13655      VAR_CPU_ENDIAN=big
13656      ;;
13657    *)
13658      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13659      ;;
13660  esac
13661
13662  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13663  OPENJDK_TARGET_OS="$VAR_OS"
13664  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13665  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13666  OPENJDK_TARGET_CPU="$VAR_CPU"
13667  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13668  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13669  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13670
13671
13672
13673
13674
13675
13676
13677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13678$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13680$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13681
13682
13683
13684# Check whether --with-target-bits was given.
13685if test "${with_target_bits+set}" = set; then :
13686  withval=$with_target_bits;
13687fi
13688
13689
13690  # We have three types of compiles:
13691  # native  == normal compilation, target system == build system
13692  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13693  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13694  #
13695  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13696    # We're doing a proper cross-compilation
13697    COMPILE_TYPE="cross"
13698  else
13699    COMPILE_TYPE="native"
13700  fi
13701
13702  if test "x$with_target_bits" != x; then
13703    if test "x$COMPILE_TYPE" = "xcross"; then
13704      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13705    fi
13706
13707    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13708      # A reduced build is requested
13709      COMPILE_TYPE="reduced"
13710      OPENJDK_TARGET_CPU_BITS=32
13711      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13712        OPENJDK_TARGET_CPU=x86
13713      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13714        OPENJDK_TARGET_CPU=sparc
13715      else
13716        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13717      fi
13718    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13719      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
13720    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13721      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13722$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13723    else
13724      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13725    fi
13726  fi
13727
13728
13729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13730$as_echo_n "checking compilation type... " >&6; }
13731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13732$as_echo "$COMPILE_TYPE" >&6; }
13733
13734
13735  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13736    REQUIRED_OS_NAME=SunOS
13737    REQUIRED_OS_VERSION=5.10
13738  fi
13739  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13740    REQUIRED_OS_NAME=Linux
13741    REQUIRED_OS_VERSION=2.6
13742  fi
13743  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13744    REQUIRED_OS_NAME=Windows
13745    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13746      REQUIRED_OS_VERSION=5.2
13747    else
13748      REQUIRED_OS_VERSION=5.1
13749    fi
13750  fi
13751  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13752    REQUIRED_OS_NAME=Darwin
13753    REQUIRED_OS_VERSION=11.2
13754  fi
13755
13756
13757
13758
13759
13760  # Also store the legacy naming of the cpu.
13761  # Ie i586 and amd64 instead of x86 and x86_64
13762  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13763  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13764    OPENJDK_TARGET_CPU_LEGACY="i586"
13765  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13766    # On all platforms except MacOSX replace x86_64 with amd64.
13767    OPENJDK_TARGET_CPU_LEGACY="amd64"
13768  fi
13769
13770
13771  # And the second legacy naming of the cpu.
13772  # Ie i386 and amd64 instead of x86 and x86_64.
13773  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13774  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13775    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13776  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13777    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13778  fi
13779
13780
13781  # This is the name of the cpu (but using i386 and amd64 instead of
13782  # x86 and x86_64, respectively), preceeded by a /, to be used when
13783  # locating libraries. On macosx, it's empty, though.
13784  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13785  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13786    OPENJDK_TARGET_CPU_LIBDIR=""
13787  fi
13788
13789
13790  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13791  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13792  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13793  OPENJDK_TARGET_CPU_ISADIR=""
13794  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13795    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13796      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13797    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13798      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13799    fi
13800  fi
13801
13802
13803  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13804  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13805  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13806    # On linux only, we replace x86 with i386.
13807    OPENJDK_TARGET_CPU_OSARCH="i386"
13808  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13809    # On all platforms except macosx, we replace x86_64 with amd64.
13810    OPENJDK_TARGET_CPU_OSARCH="amd64"
13811  fi
13812
13813
13814  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13815  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13816    OPENJDK_TARGET_CPU_JLI="i386"
13817  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13818    # On all platforms except macosx, we replace x86_64 with amd64.
13819    OPENJDK_TARGET_CPU_JLI="amd64"
13820  fi
13821  # Now setup the -D flags for building libjli.
13822  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13823  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13824    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13825      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13826    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13827      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13828    fi
13829  fi
13830
13831
13832  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13833  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13834    OPENJDK_TARGET_OS_API_DIR="solaris"
13835  fi
13836  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13837    OPENJDK_TARGET_OS_API_DIR="windows"
13838  fi
13839
13840
13841  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13842      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13843  else
13844      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13845  fi
13846
13847
13848  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13849    A_LP64="LP64:="
13850    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13851    # unpack200.exe
13852    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13853      ADD_LP64="-D_LP64=1"
13854    fi
13855  fi
13856  LP64=$A_LP64
13857
13858
13859  if test "x$COMPILE_TYPE" = "xcross"; then
13860    # FIXME: ... or should this include reduced builds..?
13861    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13862  else
13863    DEFINE_CROSS_COMPILE_ARCH=""
13864  fi
13865
13866
13867  # ZERO_ARCHDEF is used to enable architecture-specific code
13868  case "${OPENJDK_TARGET_CPU}" in
13869    ppc*)    ZERO_ARCHDEF=PPC   ;;
13870    s390*)   ZERO_ARCHDEF=S390  ;;
13871    sparc*)  ZERO_ARCHDEF=SPARC ;;
13872    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13873    x86)     ZERO_ARCHDEF=IA32  ;;
13874    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13875  esac
13876
13877
13878
13879
13880# Continue setting up basic stuff. Most remaining code require fundamental tools.
13881
13882  # Save the current directory this script was started from
13883  CURDIR="$PWD"
13884
13885  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13886    PATH_SEP=";"
13887
13888  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13889  if test $SRC_ROOT_LENGTH -gt 100; then
13890    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13891  fi
13892
13893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13894    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13895$as_echo_n "checking cygwin release... " >&6; }
13896    CYGWIN_VERSION=`$UNAME -r`
13897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13898$as_echo "$CYGWIN_VERSION" >&6; }
13899    WINDOWS_ENV_VENDOR='cygwin'
13900    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13901
13902    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13903    if test "x$CYGWIN_VERSION_OK" = x; then
13904      { $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
13905$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;}
13906      as_fn_error $? "Cannot continue" "$LINENO" 5
13907    fi
13908    if test "x$CYGPATH" = x; then
13909      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13910    fi
13911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13912$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13913    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13914    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13915    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13916    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13917    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13918$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13919    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13920    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13921    if test "x$test_cygdrive_prefix" = x; then
13922      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13923    fi
13924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13925    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13926$as_echo_n "checking msys release... " >&6; }
13927    MSYS_VERSION=`$UNAME -r`
13928    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13929$as_echo "$MSYS_VERSION" >&6; }
13930
13931    WINDOWS_ENV_VENDOR='msys'
13932    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13933
13934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13935$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13936    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13937    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13938
13939  windows_path="$MSYS_ROOT_PATH"
13940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13941    unix_path=`$CYGPATH -u "$windows_path"`
13942    MSYS_ROOT_PATH="$unix_path"
13943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13945    MSYS_ROOT_PATH="$unix_path"
13946  fi
13947
13948    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13949$as_echo "$MSYS_ROOT_PATH" >&6; }
13950    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13951  else
13952    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13953  fi
13954
13955  # Test if windows or unix (cygwin/msys) find is first in path.
13956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13957$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13958  FIND_BINARY_OUTPUT=`find --version 2>&1`
13959  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13961$as_echo "unix style" >&6; }
13962  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13964$as_echo "Windows" >&6; }
13965    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13966$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13967    { $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
13968$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13969    as_fn_error $? "Cannot continue" "$LINENO" 5
13970  else
13971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13972$as_echo "unknown" >&6; }
13973    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13974$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13975  fi
13976
13977  else
13978    PATH_SEP=":"
13979  fi
13980
13981
13982  # We get the top-level directory from the supporting wrappers.
13983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13984$as_echo_n "checking for top-level directory... " >&6; }
13985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13986$as_echo "$TOPDIR" >&6; }
13987
13988
13989  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13990
13991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13992
13993  # Input might be given as Windows format, start by converting to
13994  # unix format.
13995  path="$CURDIR"
13996  new_path=`$CYGPATH -u "$path"`
13997
13998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14001  # "foo.exe" is OK but "foo" is an error.
14002  #
14003  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14004  # It is also a way to make sure we got the proper file name for the real test later on.
14005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14006  if test "x$test_shortpath" = x; then
14007    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14008$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14009    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14010  fi
14011
14012  # Call helper function which possibly converts this using DOS-style short mode.
14013  # If so, the updated path is stored in $new_path.
14014
14015  input_path="$new_path"
14016  # Check if we need to convert this using DOS-style short mode. If the path
14017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14018  # take no chances and rewrite it.
14019  # Note: m4 eats our [], so we need to use [ and ] instead.
14020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14021  if test "x$has_forbidden_chars" != x; then
14022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14026      # Going to short mode and back again did indeed matter. Since short mode is
14027      # case insensitive, let's make it lowercase to improve readability.
14028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14029      # Now convert it back to Unix-stile (cygpath)
14030      input_path=`$CYGPATH -u "$shortmode_path"`
14031      new_path="$input_path"
14032    fi
14033  fi
14034
14035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14036  if test "x$test_cygdrive_prefix" = x; then
14037    # As a simple fix, exclude /usr/bin since it's not a real path.
14038    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14040      # a path prefixed by /cygdrive for fixpath to work.
14041      new_path="$CYGWIN_ROOT_PATH$input_path"
14042    fi
14043  fi
14044
14045
14046  if test "x$path" != "x$new_path"; then
14047    CURDIR="$new_path"
14048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14049$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14050  fi
14051
14052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14053
14054  path="$CURDIR"
14055  has_colon=`$ECHO $path | $GREP ^.:`
14056  new_path="$path"
14057  if test "x$has_colon" = x; then
14058    # Not in mixed or Windows style, start by that.
14059    new_path=`cmd //c echo $path`
14060  fi
14061
14062
14063  input_path="$new_path"
14064  # Check if we need to convert this using DOS-style short mode. If the path
14065  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14066  # take no chances and rewrite it.
14067  # Note: m4 eats our [], so we need to use [ and ] instead.
14068  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14069  if test "x$has_forbidden_chars" != x; then
14070    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14071    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14072  fi
14073
14074
14075  windows_path="$new_path"
14076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14077    unix_path=`$CYGPATH -u "$windows_path"`
14078    new_path="$unix_path"
14079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14081    new_path="$unix_path"
14082  fi
14083
14084  if test "x$path" != "x$new_path"; then
14085    CURDIR="$new_path"
14086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14087$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14088  fi
14089
14090  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14091  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14092
14093  else
14094    # We're on a posix platform. Hooray! :)
14095    path="$CURDIR"
14096    has_space=`$ECHO "$path" | $GREP " "`
14097    if test "x$has_space" != x; then
14098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14099$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14100      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14101    fi
14102
14103    # Use eval to expand a potential ~
14104    eval path="$path"
14105    if test ! -f "$path" && test ! -d "$path"; then
14106      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14107    fi
14108
14109    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14110  fi
14111
14112
14113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14114
14115  # Input might be given as Windows format, start by converting to
14116  # unix format.
14117  path="$TOPDIR"
14118  new_path=`$CYGPATH -u "$path"`
14119
14120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14123  # "foo.exe" is OK but "foo" is an error.
14124  #
14125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14126  # It is also a way to make sure we got the proper file name for the real test later on.
14127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14128  if test "x$test_shortpath" = x; then
14129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14130$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14131    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14132  fi
14133
14134  # Call helper function which possibly converts this using DOS-style short mode.
14135  # If so, the updated path is stored in $new_path.
14136
14137  input_path="$new_path"
14138  # Check if we need to convert this using DOS-style short mode. If the path
14139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14140  # take no chances and rewrite it.
14141  # Note: m4 eats our [], so we need to use [ and ] instead.
14142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14143  if test "x$has_forbidden_chars" != x; then
14144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14148      # Going to short mode and back again did indeed matter. Since short mode is
14149      # case insensitive, let's make it lowercase to improve readability.
14150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14151      # Now convert it back to Unix-stile (cygpath)
14152      input_path=`$CYGPATH -u "$shortmode_path"`
14153      new_path="$input_path"
14154    fi
14155  fi
14156
14157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14158  if test "x$test_cygdrive_prefix" = x; then
14159    # As a simple fix, exclude /usr/bin since it's not a real path.
14160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14162      # a path prefixed by /cygdrive for fixpath to work.
14163      new_path="$CYGWIN_ROOT_PATH$input_path"
14164    fi
14165  fi
14166
14167
14168  if test "x$path" != "x$new_path"; then
14169    TOPDIR="$new_path"
14170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14171$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14172  fi
14173
14174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14175
14176  path="$TOPDIR"
14177  has_colon=`$ECHO $path | $GREP ^.:`
14178  new_path="$path"
14179  if test "x$has_colon" = x; then
14180    # Not in mixed or Windows style, start by that.
14181    new_path=`cmd //c echo $path`
14182  fi
14183
14184
14185  input_path="$new_path"
14186  # Check if we need to convert this using DOS-style short mode. If the path
14187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14188  # take no chances and rewrite it.
14189  # Note: m4 eats our [], so we need to use [ and ] instead.
14190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14191  if test "x$has_forbidden_chars" != x; then
14192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14194  fi
14195
14196
14197  windows_path="$new_path"
14198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14199    unix_path=`$CYGPATH -u "$windows_path"`
14200    new_path="$unix_path"
14201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14203    new_path="$unix_path"
14204  fi
14205
14206  if test "x$path" != "x$new_path"; then
14207    TOPDIR="$new_path"
14208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14209$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14210  fi
14211
14212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14214
14215  else
14216    # We're on a posix platform. Hooray! :)
14217    path="$TOPDIR"
14218    has_space=`$ECHO "$path" | $GREP " "`
14219    if test "x$has_space" != x; then
14220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14221$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14222      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14223    fi
14224
14225    # Use eval to expand a potential ~
14226    eval path="$path"
14227    if test ! -f "$path" && test ! -d "$path"; then
14228      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14229    fi
14230
14231    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14232  fi
14233
14234  # SRC_ROOT is a traditional alias for TOPDIR.
14235  SRC_ROOT=$TOPDIR
14236
14237  # Locate the directory of this script.
14238  AUTOCONF_DIR=$TOPDIR/common/autoconf
14239
14240  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14241    # Add extra search paths on solaris for utilities like ar and as etc...
14242    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14243  fi
14244
14245  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14246  # is not correct.
14247
14248# Check whether --with-sys-root was given.
14249if test "${with_sys_root+set}" = set; then :
14250  withval=$with_sys_root;
14251fi
14252
14253
14254  if test "x$with_sys_root" != x; then
14255    SYS_ROOT=$with_sys_root
14256  else
14257    SYS_ROOT=/
14258  fi
14259
14260
14261
14262# Check whether --with-tools-dir was given.
14263if test "${with_tools_dir+set}" = set; then :
14264  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14265
14266fi
14267
14268
14269
14270# Check whether --with-devkit was given.
14271if test "${with_devkit+set}" = set; then :
14272  withval=$with_devkit;
14273        if test "x$with_sys_root" != x; then
14274          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14275        fi
14276
14277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14278
14279  # Input might be given as Windows format, start by converting to
14280  # unix format.
14281  path="$with_devkit"
14282  new_path=`$CYGPATH -u "$path"`
14283
14284  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14285  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14286  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14287  # "foo.exe" is OK but "foo" is an error.
14288  #
14289  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14290  # It is also a way to make sure we got the proper file name for the real test later on.
14291  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14292  if test "x$test_shortpath" = x; then
14293    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14294$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14295    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14296  fi
14297
14298  # Call helper function which possibly converts this using DOS-style short mode.
14299  # If so, the updated path is stored in $new_path.
14300
14301  input_path="$new_path"
14302  # Check if we need to convert this using DOS-style short mode. If the path
14303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14304  # take no chances and rewrite it.
14305  # Note: m4 eats our [], so we need to use [ and ] instead.
14306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14307  if test "x$has_forbidden_chars" != x; then
14308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14309    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14310    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14311    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14312      # Going to short mode and back again did indeed matter. Since short mode is
14313      # case insensitive, let's make it lowercase to improve readability.
14314      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14315      # Now convert it back to Unix-stile (cygpath)
14316      input_path=`$CYGPATH -u "$shortmode_path"`
14317      new_path="$input_path"
14318    fi
14319  fi
14320
14321  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14322  if test "x$test_cygdrive_prefix" = x; then
14323    # As a simple fix, exclude /usr/bin since it's not a real path.
14324    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14325      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14326      # a path prefixed by /cygdrive for fixpath to work.
14327      new_path="$CYGWIN_ROOT_PATH$input_path"
14328    fi
14329  fi
14330
14331
14332  if test "x$path" != "x$new_path"; then
14333    with_devkit="$new_path"
14334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14335$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14336  fi
14337
14338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14339
14340  path="$with_devkit"
14341  has_colon=`$ECHO $path | $GREP ^.:`
14342  new_path="$path"
14343  if test "x$has_colon" = x; then
14344    # Not in mixed or Windows style, start by that.
14345    new_path=`cmd //c echo $path`
14346  fi
14347
14348
14349  input_path="$new_path"
14350  # Check if we need to convert this using DOS-style short mode. If the path
14351  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14352  # take no chances and rewrite it.
14353  # Note: m4 eats our [], so we need to use [ and ] instead.
14354  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14355  if test "x$has_forbidden_chars" != x; then
14356    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14357    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14358  fi
14359
14360
14361  windows_path="$new_path"
14362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14363    unix_path=`$CYGPATH -u "$windows_path"`
14364    new_path="$unix_path"
14365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14367    new_path="$unix_path"
14368  fi
14369
14370  if test "x$path" != "x$new_path"; then
14371    with_devkit="$new_path"
14372    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14373$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14374  fi
14375
14376  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14377  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14378
14379  else
14380    # We're on a posix platform. Hooray! :)
14381    path="$with_devkit"
14382    has_space=`$ECHO "$path" | $GREP " "`
14383    if test "x$has_space" != x; then
14384      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14385$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14386      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14387    fi
14388
14389    # Use eval to expand a potential ~
14390    eval path="$path"
14391    if test ! -f "$path" && test ! -d "$path"; then
14392      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14393    fi
14394
14395    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14396  fi
14397
14398
14399  if test "x$TOOLS_DIR" = x; then
14400    TOOLS_DIR="$with_devkit/bin"
14401  else
14402    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14403  fi
14404
14405        if test -d "$with_devkit/$host_alias/libc"; then
14406          SYS_ROOT=$with_devkit/$host_alias/libc
14407        elif test -d "$with_devkit/$host/sys-root"; then
14408          SYS_ROOT=$with_devkit/$host/sys-root
14409        fi
14410
14411fi
14412
14413
14414
14415  # Setup default logging of stdout and stderr to build.log in the output root.
14416  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14417  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14418  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14419
14420
14421
14422
14423
14424# Check if it's a pure open build or if custom sources are to be used.
14425
14426  # Check whether --enable-openjdk-only was given.
14427if test "${enable_openjdk_only+set}" = set; then :
14428  enableval=$enable_openjdk_only;
14429else
14430  enable_openjdk_only="no"
14431fi
14432
14433
14434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14435$as_echo_n "checking for presence of closed sources... " >&6; }
14436  if test -d "$SRC_ROOT/jdk/src/closed"; then
14437    CLOSED_SOURCE_PRESENT=yes
14438  else
14439    CLOSED_SOURCE_PRESENT=no
14440  fi
14441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14442$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14443
14444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14445$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14446  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14448$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14449
14450  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14451    OPENJDK=true
14452    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14453      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14454$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14455    fi
14456  else
14457    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14458      OPENJDK=true
14459    else
14460      OPENJDK=false
14461    fi
14462  fi
14463
14464  if test "x$OPENJDK" = "xtrue"; then
14465    SET_OPENJDK="OPENJDK=true"
14466  fi
14467
14468
14469
14470  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14471  # the IncludeCustomExtension macro.
14472
14473
14474# Check whether --with-custom-make-dir was given.
14475if test "${with_custom_make_dir+set}" = set; then :
14476  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
14477$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14478fi
14479
14480
14481
14482
14483# These are needed to be able to create a configuration name (and thus the output directory)
14484
14485  ###############################################################################
14486  #
14487  # Check which variant of the JDK that we want to build.
14488  # Currently we have:
14489  #    normal:   standard edition
14490  # but the custom make system may add other variants
14491  #
14492  # Effectively the JDK variant gives a name to a specific set of
14493  # modules to compile into the JDK. In the future, these modules
14494  # might even be Jigsaw modules.
14495  #
14496  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14497$as_echo_n "checking which variant of the JDK to build... " >&6; }
14498
14499# Check whether --with-jdk-variant was given.
14500if test "${with_jdk_variant+set}" = set; then :
14501  withval=$with_jdk_variant;
14502fi
14503
14504
14505  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14506    JDK_VARIANT="normal"
14507  else
14508    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14509  fi
14510
14511
14512
14513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14514$as_echo "$JDK_VARIANT" >&6; }
14515
14516
14517###############################################################################
14518#
14519# Check which interpreter of the JVM we want to build.
14520# Currently we have:
14521#    template: Template interpreter (the default)
14522#    cpp     : C++ interpreter
14523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14524$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14525
14526# Check whether --with-jvm-interpreter was given.
14527if test "${with_jvm_interpreter+set}" = set; then :
14528  withval=$with_jvm_interpreter;
14529fi
14530
14531
14532if test "x$with_jvm_interpreter" = x; then
14533     with_jvm_interpreter="template"
14534fi
14535
14536JVM_INTERPRETER="$with_jvm_interpreter"
14537
14538if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14539   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14540fi
14541
14542
14543
14544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14545$as_echo "$with_jvm_interpreter" >&6; }
14546
14547
14548
14549  ###############################################################################
14550  #
14551  # Check which variants of the JVM that we want to build.
14552  # Currently we have:
14553  #    server: normal interpreter and a tiered C1/C2 compiler
14554  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14555  #    minimal1: reduced form of client with optional VM services and features stripped out
14556  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14557  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14558  #    zero: no machine code interpreter, no compiler
14559  #    zeroshark: zero interpreter and shark/llvm compiler backend
14560#    core: interpreter only, no compiler (only works on some platforms)
14561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14562$as_echo_n "checking which variants of the JVM to build... " >&6; }
14563
14564# Check whether --with-jvm-variants was given.
14565if test "${with_jvm_variants+set}" = set; then :
14566  withval=$with_jvm_variants;
14567fi
14568
14569
14570  if test "x$with_jvm_variants" = x; then
14571    with_jvm_variants="server"
14572  fi
14573
14574  JVM_VARIANTS=",$with_jvm_variants,"
14575  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,//'`
14576
14577  if test "x$TEST_VARIANTS" != "x,"; then
14578     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14579  fi
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14581$as_echo "$with_jvm_variants" >&6; }
14582
14583  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14584  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14585  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14586  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14587  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14588  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14589  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14590
14591  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14592    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14593      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14594    fi
14595  fi
14596  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14597    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14598      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14599    fi
14600  fi
14601  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14602    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14603      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14604    fi
14605  fi
14606
14607  # Replace the commas with AND for use in the build directory name.
14608  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14609  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/'`
14610  if test "x$COUNT_VARIANTS" != "x,1"; then
14611    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14612  else
14613    BUILDING_MULTIPLE_JVM_VARIANTS=no
14614  fi
14615
14616
14617
14618
14619
14620
14621
14622
14623
14624
14625  INCLUDE_SA=true
14626  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14627    INCLUDE_SA=false
14628  fi
14629  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14630    INCLUDE_SA=false
14631  fi
14632  if test "x$VAR_CPU" = xppc64 ; then
14633    INCLUDE_SA=false
14634  fi
14635
14636
14637  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14638    MACOSX_UNIVERSAL="true"
14639  fi
14640
14641
14642
14643
14644  ###############################################################################
14645  #
14646  # Set the debug level
14647  #    release: no debug information, all optimizations, no asserts.
14648  #    fastdebug: debug information (-g), all optimizations, all asserts
14649  #    slowdebug: debug information (-g), no optimizations, all asserts
14650  #
14651  DEBUG_LEVEL="release"
14652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14653$as_echo_n "checking which debug level to use... " >&6; }
14654  # Check whether --enable-debug was given.
14655if test "${enable_debug+set}" = set; then :
14656  enableval=$enable_debug;
14657        ENABLE_DEBUG="${enableval}"
14658        DEBUG_LEVEL="fastdebug"
14659
14660else
14661  ENABLE_DEBUG="no"
14662fi
14663
14664
14665
14666# Check whether --with-debug-level was given.
14667if test "${with_debug_level+set}" = set; then :
14668  withval=$with_debug_level;
14669        DEBUG_LEVEL="${withval}"
14670        if test "x$ENABLE_DEBUG" = xyes; then
14671          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14672        fi
14673
14674fi
14675
14676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14677$as_echo "$DEBUG_LEVEL" >&6; }
14678
14679  if test "x$DEBUG_LEVEL" != xrelease && \
14680      test "x$DEBUG_LEVEL" != xfastdebug && \
14681      test "x$DEBUG_LEVEL" != xslowdebug; then
14682    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14683  fi
14684
14685
14686  ###############################################################################
14687  #
14688  # Setup legacy vars/targets and new vars to deal with different debug levels.
14689  #
14690
14691  case $DEBUG_LEVEL in
14692    release )
14693      VARIANT="OPT"
14694      FASTDEBUG="false"
14695      DEBUG_CLASSFILES="false"
14696      BUILD_VARIANT_RELEASE=""
14697      HOTSPOT_DEBUG_LEVEL="product"
14698      HOTSPOT_EXPORT="product"
14699      ;;
14700    fastdebug )
14701      VARIANT="DBG"
14702      FASTDEBUG="true"
14703      DEBUG_CLASSFILES="true"
14704      BUILD_VARIANT_RELEASE="-fastdebug"
14705      HOTSPOT_DEBUG_LEVEL="fastdebug"
14706      HOTSPOT_EXPORT="fastdebug"
14707      ;;
14708    slowdebug )
14709      VARIANT="DBG"
14710      FASTDEBUG="false"
14711      DEBUG_CLASSFILES="true"
14712      BUILD_VARIANT_RELEASE="-debug"
14713      HOTSPOT_DEBUG_LEVEL="jvmg"
14714      HOTSPOT_EXPORT="debug"
14715      ;;
14716  esac
14717
14718  #####
14719  # Generate the legacy makefile targets for hotspot.
14720  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14721  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14722  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14723  # But until then ...
14724  HOTSPOT_TARGET=""
14725
14726  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14727    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14728  fi
14729
14730  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14731    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14732  fi
14733
14734  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14735    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14736  fi
14737
14738  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14739    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14740  fi
14741
14742  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14743    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14744  fi
14745
14746  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14747    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14748  fi
14749
14750  if test "x$JVM_VARIANT_CORE" = xtrue; then
14751    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14752  fi
14753
14754  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14755
14756  # On Macosx universal binaries are produced, but they only contain
14757  # 64 bit intel. This invalidates control of which jvms are built
14758  # from configure, but only server is valid anyway. Fix this
14759  # when hotspot makefiles are rewritten.
14760  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14761    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14762  fi
14763
14764  #####
14765
14766
14767
14768
14769
14770
14771
14772
14773# With basic setup done, call the custom early hook.
14774
14775
14776# To properly create a configuration name, we need to have the OpenJDK target
14777# and options (variants and debug level) parsed.
14778
14779
14780
14781# Check whether --with-conf-name was given.
14782if test "${with_conf_name+set}" = set; then :
14783  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14784fi
14785
14786
14787  # Test from where we are running configure, in or outside of src root.
14788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14789$as_echo_n "checking where to store configuration... " >&6; }
14790  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14791      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14792      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14793    # We are running configure from the src root.
14794    # Create a default ./build/target-variant-debuglevel output root.
14795    if test "x${CONF_NAME}" = x; then
14796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14797$as_echo "in default location" >&6; }
14798      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14799    else
14800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14801$as_echo "in build directory with custom name" >&6; }
14802    fi
14803    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14804    $MKDIR -p "$OUTPUT_ROOT"
14805    if test ! -d "$OUTPUT_ROOT"; then
14806      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14807    fi
14808  else
14809    # We are running configure from outside of the src dir.
14810    # Then use the current directory as output dir!
14811    # If configuration is situated in normal build directory, just use the build
14812    # directory name as configuration name, otherwise use the complete path.
14813    if test "x${CONF_NAME}" = x; then
14814      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14815    fi
14816    OUTPUT_ROOT="$CURDIR"
14817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14818$as_echo "in current directory" >&6; }
14819
14820    # WARNING: This might be a bad thing to do. You need to be sure you want to
14821    # have a configuration in this directory. Do some sanity checks!
14822
14823    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14824      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14825      # other files
14826      files_present=`$LS $OUTPUT_ROOT`
14827      # Configure has already touched config.log and confdefs.h in the current dir when this check
14828      # is performed.
14829      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14830      | $TR -d '\n'`
14831      if test "x$filtered_files" != x; then
14832        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14833$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14834        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14835$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14836        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14837$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14838        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14839$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14840        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14841$as_echo "$as_me: seriously mess up just about everything." >&6;}
14842        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14843$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14844        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14845$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14846        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14847      fi
14848    fi
14849  fi
14850  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14851$as_echo_n "checking what configuration name to use... " >&6; }
14852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14853$as_echo "$CONF_NAME" >&6; }
14854
14855
14856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14857
14858  # Input might be given as Windows format, start by converting to
14859  # unix format.
14860  path="$OUTPUT_ROOT"
14861  new_path=`$CYGPATH -u "$path"`
14862
14863  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14864  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14865  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14866  # "foo.exe" is OK but "foo" is an error.
14867  #
14868  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14869  # It is also a way to make sure we got the proper file name for the real test later on.
14870  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14871  if test "x$test_shortpath" = x; then
14872    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14873$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14874    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14875  fi
14876
14877  # Call helper function which possibly converts this using DOS-style short mode.
14878  # If so, the updated path is stored in $new_path.
14879
14880  input_path="$new_path"
14881  # Check if we need to convert this using DOS-style short mode. If the path
14882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14883  # take no chances and rewrite it.
14884  # Note: m4 eats our [], so we need to use [ and ] instead.
14885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14886  if test "x$has_forbidden_chars" != x; then
14887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14891      # Going to short mode and back again did indeed matter. Since short mode is
14892      # case insensitive, let's make it lowercase to improve readability.
14893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14894      # Now convert it back to Unix-stile (cygpath)
14895      input_path=`$CYGPATH -u "$shortmode_path"`
14896      new_path="$input_path"
14897    fi
14898  fi
14899
14900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14901  if test "x$test_cygdrive_prefix" = x; then
14902    # As a simple fix, exclude /usr/bin since it's not a real path.
14903    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14905      # a path prefixed by /cygdrive for fixpath to work.
14906      new_path="$CYGWIN_ROOT_PATH$input_path"
14907    fi
14908  fi
14909
14910
14911  if test "x$path" != "x$new_path"; then
14912    OUTPUT_ROOT="$new_path"
14913    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14914$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14915  fi
14916
14917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14918
14919  path="$OUTPUT_ROOT"
14920  has_colon=`$ECHO $path | $GREP ^.:`
14921  new_path="$path"
14922  if test "x$has_colon" = x; then
14923    # Not in mixed or Windows style, start by that.
14924    new_path=`cmd //c echo $path`
14925  fi
14926
14927
14928  input_path="$new_path"
14929  # Check if we need to convert this using DOS-style short mode. If the path
14930  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14931  # take no chances and rewrite it.
14932  # Note: m4 eats our [], so we need to use [ and ] instead.
14933  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14934  if test "x$has_forbidden_chars" != x; then
14935    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14936    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14937  fi
14938
14939
14940  windows_path="$new_path"
14941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14942    unix_path=`$CYGPATH -u "$windows_path"`
14943    new_path="$unix_path"
14944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14946    new_path="$unix_path"
14947  fi
14948
14949  if test "x$path" != "x$new_path"; then
14950    OUTPUT_ROOT="$new_path"
14951    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14952$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14953  fi
14954
14955  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14956  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14957
14958  else
14959    # We're on a posix platform. Hooray! :)
14960    path="$OUTPUT_ROOT"
14961    has_space=`$ECHO "$path" | $GREP " "`
14962    if test "x$has_space" != x; then
14963      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14964$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14965      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14966    fi
14967
14968    # Use eval to expand a potential ~
14969    eval path="$path"
14970    if test ! -f "$path" && test ! -d "$path"; then
14971      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14972    fi
14973
14974    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14975  fi
14976
14977
14978  SPEC=$OUTPUT_ROOT/spec.gmk
14979
14980  CONF_NAME=$CONF_NAME
14981
14982  OUTPUT_ROOT=$OUTPUT_ROOT
14983
14984
14985  # Most of the probed defines are put into config.h
14986  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14987
14988  # The spec.gmk file contains all variables for the make system.
14989  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14990
14991  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14992  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14993
14994  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14995  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14996
14997  # The compare.sh is used to compare the build output to other builds.
14998  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14999
15000  # Spec.sh is currently used by compare-objects.sh
15001  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15002
15003  # The generated Makefile knows where the spec.gmk is and where the source is.
15004  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15005  # which will look for generated configurations
15006  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15007
15008
15009
15010# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15011
15012  for ac_prog in apt-get yum port pkgutil pkgadd
15013do
15014  # Extract the first word of "$ac_prog", so it can be a program name with args.
15015set dummy $ac_prog; ac_word=$2
15016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15017$as_echo_n "checking for $ac_word... " >&6; }
15018if ${ac_cv_prog_PKGHANDLER+:} false; then :
15019  $as_echo_n "(cached) " >&6
15020else
15021  if test -n "$PKGHANDLER"; then
15022  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15023else
15024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15025for as_dir in $PATH
15026do
15027  IFS=$as_save_IFS
15028  test -z "$as_dir" && as_dir=.
15029    for ac_exec_ext in '' $ac_executable_extensions; do
15030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15031    ac_cv_prog_PKGHANDLER="$ac_prog"
15032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15033    break 2
15034  fi
15035done
15036  done
15037IFS=$as_save_IFS
15038
15039fi
15040fi
15041PKGHANDLER=$ac_cv_prog_PKGHANDLER
15042if test -n "$PKGHANDLER"; then
15043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15044$as_echo "$PKGHANDLER" >&6; }
15045else
15046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15047$as_echo "no" >&6; }
15048fi
15049
15050
15051  test -n "$PKGHANDLER" && break
15052done
15053
15054
15055
15056# Setup tools that requires more complex handling, or that is not needed by the configure script.
15057
15058
15059  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15060  if test "x$MAKE" != x; then
15061    # User has supplied a make, test it.
15062    if test ! -f "$MAKE"; then
15063      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15064    fi
15065
15066  MAKE_CANDIDATE=""$MAKE""
15067  DESCRIPTION="user supplied MAKE=$MAKE"
15068  if test "x$MAKE_CANDIDATE" != x; then
15069    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15070$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15071    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15072    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15073    if test "x$IS_GNU_MAKE" = x; then
15074      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15075$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15076    else
15077      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15078      if test "x$IS_MODERN_MAKE" = x; then
15079        { $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
15080$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;}
15081      else
15082        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15083          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15084            MAKE_EXPECTED_ENV='cygwin'
15085          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15086            MAKE_EXPECTED_ENV='msys'
15087          else
15088            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15089          fi
15090          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15091          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15092        else
15093          # Not relevant for non-Windows
15094          IS_MAKE_CORRECT_ENV=true
15095        fi
15096        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15097          { $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
15098$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;}
15099        else
15100          FOUND_MAKE=$MAKE_CANDIDATE
15101
15102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15103
15104  # First separate the path from the arguments. This will split at the first
15105  # space.
15106  complete="$FOUND_MAKE"
15107  path="${complete%% *}"
15108  tmp="$complete EOL"
15109  arguments="${tmp#* }"
15110
15111  # Input might be given as Windows format, start by converting to
15112  # unix format.
15113  new_path=`$CYGPATH -u "$path"`
15114
15115  # Now try to locate executable using which
15116  new_path=`$WHICH "$new_path" 2> /dev/null`
15117  # bat and cmd files are not always considered executable in cygwin causing which
15118  # to not find them
15119  if test "x$new_path" = x \
15120      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15121      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15122    new_path=`$CYGPATH -u "$path"`
15123  fi
15124  if test "x$new_path" = x; then
15125    # Oops. Which didn't find the executable.
15126    # The splitting of arguments from the executable at a space might have been incorrect,
15127    # since paths with space are more likely in Windows. Give it another try with the whole
15128    # argument.
15129    path="$complete"
15130    arguments="EOL"
15131    new_path=`$CYGPATH -u "$path"`
15132    new_path=`$WHICH "$new_path" 2> /dev/null`
15133    # bat and cmd files are not always considered executable in cygwin causing which
15134    # to not find them
15135    if test "x$new_path" = x \
15136        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15137        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15138      new_path=`$CYGPATH -u "$path"`
15139    fi
15140    if test "x$new_path" = x; then
15141      # It's still not found. Now this is an unrecoverable error.
15142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15143$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15144      has_space=`$ECHO "$complete" | $GREP " "`
15145      if test "x$has_space" != x; then
15146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15148      fi
15149      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15150    fi
15151  fi
15152
15153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15156  # "foo.exe" is OK but "foo" is an error.
15157  #
15158  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15159  # It is also a way to make sure we got the proper file name for the real test later on.
15160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15161  if test "x$test_shortpath" = x; then
15162    # Short path failed, file does not exist as specified.
15163    # Try adding .exe or .cmd
15164    if test -f "${new_path}.exe"; then
15165      input_to_shortpath="${new_path}.exe"
15166    elif test -f "${new_path}.cmd"; then
15167      input_to_shortpath="${new_path}.cmd"
15168    else
15169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15170$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15171      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15172$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15173      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15174    fi
15175  else
15176    input_to_shortpath="$new_path"
15177  fi
15178
15179  # Call helper function which possibly converts this using DOS-style short mode.
15180  # If so, the updated path is stored in $new_path.
15181  new_path="$input_to_shortpath"
15182
15183  input_path="$input_to_shortpath"
15184  # Check if we need to convert this using DOS-style short mode. If the path
15185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15186  # take no chances and rewrite it.
15187  # Note: m4 eats our [], so we need to use [ and ] instead.
15188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15189  if test "x$has_forbidden_chars" != x; then
15190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15194      # Going to short mode and back again did indeed matter. Since short mode is
15195      # case insensitive, let's make it lowercase to improve readability.
15196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15197      # Now convert it back to Unix-stile (cygpath)
15198      input_path=`$CYGPATH -u "$shortmode_path"`
15199      new_path="$input_path"
15200    fi
15201  fi
15202
15203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15204  if test "x$test_cygdrive_prefix" = x; then
15205    # As a simple fix, exclude /usr/bin since it's not a real path.
15206    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15208      # a path prefixed by /cygdrive for fixpath to work.
15209      new_path="$CYGWIN_ROOT_PATH$input_path"
15210    fi
15211  fi
15212
15213  # remove trailing .exe if any
15214  new_path="${new_path/%.exe/}"
15215
15216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15217
15218  # First separate the path from the arguments. This will split at the first
15219  # space.
15220  complete="$FOUND_MAKE"
15221  path="${complete%% *}"
15222  tmp="$complete EOL"
15223  arguments="${tmp#* }"
15224
15225  # Input might be given as Windows format, start by converting to
15226  # unix format.
15227  new_path="$path"
15228
15229  windows_path="$new_path"
15230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15231    unix_path=`$CYGPATH -u "$windows_path"`
15232    new_path="$unix_path"
15233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15235    new_path="$unix_path"
15236  fi
15237
15238
15239  # Now try to locate executable using which
15240  new_path=`$WHICH "$new_path" 2> /dev/null`
15241
15242  if test "x$new_path" = x; then
15243    # Oops. Which didn't find the executable.
15244    # The splitting of arguments from the executable at a space might have been incorrect,
15245    # since paths with space are more likely in Windows. Give it another try with the whole
15246    # argument.
15247    path="$complete"
15248    arguments="EOL"
15249    new_path="$path"
15250
15251  windows_path="$new_path"
15252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15253    unix_path=`$CYGPATH -u "$windows_path"`
15254    new_path="$unix_path"
15255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15257    new_path="$unix_path"
15258  fi
15259
15260
15261    new_path=`$WHICH "$new_path" 2> /dev/null`
15262
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  # Now new_path has a complete unix path to the binary
15277  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15278    # Keep paths in /bin as-is, but remove trailing .exe if any
15279    new_path="${new_path/%.exe/}"
15280    # Do not save /bin paths to all_fixpath_prefixes!
15281  else
15282    # Not in mixed or Windows style, start by that.
15283    new_path=`cmd //c echo $new_path`
15284
15285  input_path="$new_path"
15286  # Check if we need to convert this using DOS-style short mode. If the path
15287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15288  # take no chances and rewrite it.
15289  # Note: m4 eats our [], so we need to use [ and ] instead.
15290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15291  if test "x$has_forbidden_chars" != x; then
15292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15294  fi
15295
15296    # Output is in $new_path
15297
15298  windows_path="$new_path"
15299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15300    unix_path=`$CYGPATH -u "$windows_path"`
15301    new_path="$unix_path"
15302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15304    new_path="$unix_path"
15305  fi
15306
15307    # remove trailing .exe if any
15308    new_path="${new_path/%.exe/}"
15309
15310    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15311    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15312  fi
15313
15314  else
15315    # We're on a posix platform. Hooray! :)
15316    # First separate the path from the arguments. This will split at the first
15317    # space.
15318    complete="$FOUND_MAKE"
15319    path="${complete%% *}"
15320    tmp="$complete EOL"
15321    arguments="${tmp#* }"
15322
15323    # Cannot rely on the command "which" here since it doesn't always work.
15324    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15325    if test -z "$is_absolute_path"; then
15326      # Path to executable is not absolute. Find it.
15327      IFS_save="$IFS"
15328      IFS=:
15329      for p in $PATH; do
15330        if test -f "$p/$path" && test -x "$p/$path"; then
15331          new_path="$p/$path"
15332          break
15333        fi
15334      done
15335      IFS="$IFS_save"
15336    else
15337      # This is an absolute path, we can use it without further modifications.
15338      new_path="$path"
15339    fi
15340
15341    if test "x$new_path" = x; then
15342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15343$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15344      has_space=`$ECHO "$complete" | $GREP " "`
15345      if test "x$has_space" != x; then
15346        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15347$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15348      fi
15349      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15350    fi
15351  fi
15352
15353  # Now join together the path and the arguments once again
15354  if test "x$arguments" != xEOL; then
15355    new_complete="$new_path ${arguments% *}"
15356  else
15357    new_complete="$new_path"
15358  fi
15359
15360  if test "x$complete" != "x$new_complete"; then
15361    FOUND_MAKE="$new_complete"
15362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15363$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15364  fi
15365
15366        fi
15367      fi
15368    fi
15369  fi
15370
15371    if test "x$FOUND_MAKE" = x; then
15372      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15373    fi
15374  else
15375    # Try our hardest to locate a correct version of GNU make
15376    for ac_prog in gmake
15377do
15378  # Extract the first word of "$ac_prog", so it can be a program name with args.
15379set dummy $ac_prog; ac_word=$2
15380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15381$as_echo_n "checking for $ac_word... " >&6; }
15382if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15383  $as_echo_n "(cached) " >&6
15384else
15385  case $CHECK_GMAKE in
15386  [\\/]* | ?:[\\/]*)
15387  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15388  ;;
15389  *)
15390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15391for as_dir in $PATH
15392do
15393  IFS=$as_save_IFS
15394  test -z "$as_dir" && as_dir=.
15395    for ac_exec_ext in '' $ac_executable_extensions; do
15396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15397    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15399    break 2
15400  fi
15401done
15402  done
15403IFS=$as_save_IFS
15404
15405  ;;
15406esac
15407fi
15408CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15409if test -n "$CHECK_GMAKE"; then
15410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15411$as_echo "$CHECK_GMAKE" >&6; }
15412else
15413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15414$as_echo "no" >&6; }
15415fi
15416
15417
15418  test -n "$CHECK_GMAKE" && break
15419done
15420
15421
15422  MAKE_CANDIDATE=""$CHECK_GMAKE""
15423  DESCRIPTION="gmake in PATH"
15424  if test "x$MAKE_CANDIDATE" != x; then
15425    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15426$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15427    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15428    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15429    if test "x$IS_GNU_MAKE" = x; then
15430      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15431$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15432    else
15433      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15434      if test "x$IS_MODERN_MAKE" = x; then
15435        { $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
15436$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;}
15437      else
15438        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15439          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15440            MAKE_EXPECTED_ENV='cygwin'
15441          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15442            MAKE_EXPECTED_ENV='msys'
15443          else
15444            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15445          fi
15446          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15447          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15448        else
15449          # Not relevant for non-Windows
15450          IS_MAKE_CORRECT_ENV=true
15451        fi
15452        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15453          { $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
15454$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;}
15455        else
15456          FOUND_MAKE=$MAKE_CANDIDATE
15457
15458  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15459
15460  # First separate the path from the arguments. This will split at the first
15461  # space.
15462  complete="$FOUND_MAKE"
15463  path="${complete%% *}"
15464  tmp="$complete EOL"
15465  arguments="${tmp#* }"
15466
15467  # Input might be given as Windows format, start by converting to
15468  # unix format.
15469  new_path=`$CYGPATH -u "$path"`
15470
15471  # Now try to locate executable using which
15472  new_path=`$WHICH "$new_path" 2> /dev/null`
15473  # bat and cmd files are not always considered executable in cygwin causing which
15474  # to not find them
15475  if test "x$new_path" = x \
15476      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15477      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15478    new_path=`$CYGPATH -u "$path"`
15479  fi
15480  if test "x$new_path" = x; then
15481    # Oops. Which didn't find the executable.
15482    # The splitting of arguments from the executable at a space might have been incorrect,
15483    # since paths with space are more likely in Windows. Give it another try with the whole
15484    # argument.
15485    path="$complete"
15486    arguments="EOL"
15487    new_path=`$CYGPATH -u "$path"`
15488    new_path=`$WHICH "$new_path" 2> /dev/null`
15489    # bat and cmd files are not always considered executable in cygwin causing which
15490    # to not find them
15491    if test "x$new_path" = x \
15492        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15493        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15494      new_path=`$CYGPATH -u "$path"`
15495    fi
15496    if test "x$new_path" = x; then
15497      # It's still not found. Now this is an unrecoverable error.
15498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15499$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15500      has_space=`$ECHO "$complete" | $GREP " "`
15501      if test "x$has_space" != x; then
15502        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15503$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15504      fi
15505      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15506    fi
15507  fi
15508
15509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15512  # "foo.exe" is OK but "foo" is an error.
15513  #
15514  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15515  # It is also a way to make sure we got the proper file name for the real test later on.
15516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15517  if test "x$test_shortpath" = x; then
15518    # Short path failed, file does not exist as specified.
15519    # Try adding .exe or .cmd
15520    if test -f "${new_path}.exe"; then
15521      input_to_shortpath="${new_path}.exe"
15522    elif test -f "${new_path}.cmd"; then
15523      input_to_shortpath="${new_path}.cmd"
15524    else
15525      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15526$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15527      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15528$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15529      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15530    fi
15531  else
15532    input_to_shortpath="$new_path"
15533  fi
15534
15535  # Call helper function which possibly converts this using DOS-style short mode.
15536  # If so, the updated path is stored in $new_path.
15537  new_path="$input_to_shortpath"
15538
15539  input_path="$input_to_shortpath"
15540  # Check if we need to convert this using DOS-style short mode. If the path
15541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15542  # take no chances and rewrite it.
15543  # Note: m4 eats our [], so we need to use [ and ] instead.
15544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15545  if test "x$has_forbidden_chars" != x; then
15546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15547    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15548    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15549    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15550      # Going to short mode and back again did indeed matter. Since short mode is
15551      # case insensitive, let's make it lowercase to improve readability.
15552      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15553      # Now convert it back to Unix-stile (cygpath)
15554      input_path=`$CYGPATH -u "$shortmode_path"`
15555      new_path="$input_path"
15556    fi
15557  fi
15558
15559  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15560  if test "x$test_cygdrive_prefix" = x; then
15561    # As a simple fix, exclude /usr/bin since it's not a real path.
15562    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15563      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15564      # a path prefixed by /cygdrive for fixpath to work.
15565      new_path="$CYGWIN_ROOT_PATH$input_path"
15566    fi
15567  fi
15568
15569  # remove trailing .exe if any
15570  new_path="${new_path/%.exe/}"
15571
15572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15573
15574  # First separate the path from the arguments. This will split at the first
15575  # space.
15576  complete="$FOUND_MAKE"
15577  path="${complete%% *}"
15578  tmp="$complete EOL"
15579  arguments="${tmp#* }"
15580
15581  # Input might be given as Windows format, start by converting to
15582  # unix format.
15583  new_path="$path"
15584
15585  windows_path="$new_path"
15586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15587    unix_path=`$CYGPATH -u "$windows_path"`
15588    new_path="$unix_path"
15589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15591    new_path="$unix_path"
15592  fi
15593
15594
15595  # Now try to locate executable using which
15596  new_path=`$WHICH "$new_path" 2> /dev/null`
15597
15598  if test "x$new_path" = x; then
15599    # Oops. Which didn't find the executable.
15600    # The splitting of arguments from the executable at a space might have been incorrect,
15601    # since paths with space are more likely in Windows. Give it another try with the whole
15602    # argument.
15603    path="$complete"
15604    arguments="EOL"
15605    new_path="$path"
15606
15607  windows_path="$new_path"
15608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15609    unix_path=`$CYGPATH -u "$windows_path"`
15610    new_path="$unix_path"
15611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15613    new_path="$unix_path"
15614  fi
15615
15616
15617    new_path=`$WHICH "$new_path" 2> /dev/null`
15618
15619    if test "x$new_path" = x; then
15620      # It's still not found. Now this is an unrecoverable error.
15621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15622$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15623      has_space=`$ECHO "$complete" | $GREP " "`
15624      if test "x$has_space" != x; then
15625        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15626$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15627      fi
15628      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15629    fi
15630  fi
15631
15632  # Now new_path has a complete unix path to the binary
15633  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15634    # Keep paths in /bin as-is, but remove trailing .exe if any
15635    new_path="${new_path/%.exe/}"
15636    # Do not save /bin paths to all_fixpath_prefixes!
15637  else
15638    # Not in mixed or Windows style, start by that.
15639    new_path=`cmd //c echo $new_path`
15640
15641  input_path="$new_path"
15642  # Check if we need to convert this using DOS-style short mode. If the path
15643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15644  # take no chances and rewrite it.
15645  # Note: m4 eats our [], so we need to use [ and ] instead.
15646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15647  if test "x$has_forbidden_chars" != x; then
15648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15649    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15650  fi
15651
15652    # Output is in $new_path
15653
15654  windows_path="$new_path"
15655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15656    unix_path=`$CYGPATH -u "$windows_path"`
15657    new_path="$unix_path"
15658  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15659    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15660    new_path="$unix_path"
15661  fi
15662
15663    # remove trailing .exe if any
15664    new_path="${new_path/%.exe/}"
15665
15666    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15667    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15668  fi
15669
15670  else
15671    # We're on a posix platform. Hooray! :)
15672    # First separate the path from the arguments. This will split at the first
15673    # space.
15674    complete="$FOUND_MAKE"
15675    path="${complete%% *}"
15676    tmp="$complete EOL"
15677    arguments="${tmp#* }"
15678
15679    # Cannot rely on the command "which" here since it doesn't always work.
15680    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15681    if test -z "$is_absolute_path"; then
15682      # Path to executable is not absolute. Find it.
15683      IFS_save="$IFS"
15684      IFS=:
15685      for p in $PATH; do
15686        if test -f "$p/$path" && test -x "$p/$path"; then
15687          new_path="$p/$path"
15688          break
15689        fi
15690      done
15691      IFS="$IFS_save"
15692    else
15693      # This is an absolute path, we can use it without further modifications.
15694      new_path="$path"
15695    fi
15696
15697    if test "x$new_path" = x; then
15698      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15699$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15700      has_space=`$ECHO "$complete" | $GREP " "`
15701      if test "x$has_space" != x; then
15702        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15703$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15704      fi
15705      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15706    fi
15707  fi
15708
15709  # Now join together the path and the arguments once again
15710  if test "x$arguments" != xEOL; then
15711    new_complete="$new_path ${arguments% *}"
15712  else
15713    new_complete="$new_path"
15714  fi
15715
15716  if test "x$complete" != "x$new_complete"; then
15717    FOUND_MAKE="$new_complete"
15718    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15719$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15720  fi
15721
15722        fi
15723      fi
15724    fi
15725  fi
15726
15727
15728    if test "x$FOUND_MAKE" = x; then
15729      for ac_prog in make
15730do
15731  # Extract the first word of "$ac_prog", so it can be a program name with args.
15732set dummy $ac_prog; ac_word=$2
15733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15734$as_echo_n "checking for $ac_word... " >&6; }
15735if ${ac_cv_path_CHECK_MAKE+:} false; then :
15736  $as_echo_n "(cached) " >&6
15737else
15738  case $CHECK_MAKE in
15739  [\\/]* | ?:[\\/]*)
15740  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15741  ;;
15742  *)
15743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15744for as_dir in $PATH
15745do
15746  IFS=$as_save_IFS
15747  test -z "$as_dir" && as_dir=.
15748    for ac_exec_ext in '' $ac_executable_extensions; do
15749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15750    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15752    break 2
15753  fi
15754done
15755  done
15756IFS=$as_save_IFS
15757
15758  ;;
15759esac
15760fi
15761CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15762if test -n "$CHECK_MAKE"; then
15763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15764$as_echo "$CHECK_MAKE" >&6; }
15765else
15766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15767$as_echo "no" >&6; }
15768fi
15769
15770
15771  test -n "$CHECK_MAKE" && break
15772done
15773
15774
15775  MAKE_CANDIDATE=""$CHECK_MAKE""
15776  DESCRIPTION="make in PATH"
15777  if test "x$MAKE_CANDIDATE" != x; then
15778    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15779$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15780    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15781    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15782    if test "x$IS_GNU_MAKE" = x; then
15783      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15784$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15785    else
15786      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15787      if test "x$IS_MODERN_MAKE" = x; then
15788        { $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
15789$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;}
15790      else
15791        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15792          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15793            MAKE_EXPECTED_ENV='cygwin'
15794          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15795            MAKE_EXPECTED_ENV='msys'
15796          else
15797            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15798          fi
15799          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15800          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15801        else
15802          # Not relevant for non-Windows
15803          IS_MAKE_CORRECT_ENV=true
15804        fi
15805        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15806          { $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
15807$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;}
15808        else
15809          FOUND_MAKE=$MAKE_CANDIDATE
15810
15811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15812
15813  # First separate the path from the arguments. This will split at the first
15814  # space.
15815  complete="$FOUND_MAKE"
15816  path="${complete%% *}"
15817  tmp="$complete EOL"
15818  arguments="${tmp#* }"
15819
15820  # Input might be given as Windows format, start by converting to
15821  # unix format.
15822  new_path=`$CYGPATH -u "$path"`
15823
15824  # Now try to locate executable using which
15825  new_path=`$WHICH "$new_path" 2> /dev/null`
15826  # bat and cmd files are not always considered executable in cygwin causing which
15827  # to not find them
15828  if test "x$new_path" = x \
15829      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15830      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15831    new_path=`$CYGPATH -u "$path"`
15832  fi
15833  if test "x$new_path" = x; then
15834    # Oops. Which didn't find the executable.
15835    # The splitting of arguments from the executable at a space might have been incorrect,
15836    # since paths with space are more likely in Windows. Give it another try with the whole
15837    # argument.
15838    path="$complete"
15839    arguments="EOL"
15840    new_path=`$CYGPATH -u "$path"`
15841    new_path=`$WHICH "$new_path" 2> /dev/null`
15842    # bat and cmd files are not always considered executable in cygwin causing which
15843    # to not find them
15844    if test "x$new_path" = x \
15845        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15846        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15847      new_path=`$CYGPATH -u "$path"`
15848    fi
15849    if test "x$new_path" = x; then
15850      # It's still not found. Now this is an unrecoverable error.
15851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15852$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15853      has_space=`$ECHO "$complete" | $GREP " "`
15854      if test "x$has_space" != x; then
15855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15857      fi
15858      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15859    fi
15860  fi
15861
15862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15865  # "foo.exe" is OK but "foo" is an error.
15866  #
15867  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15868  # It is also a way to make sure we got the proper file name for the real test later on.
15869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15870  if test "x$test_shortpath" = x; then
15871    # Short path failed, file does not exist as specified.
15872    # Try adding .exe or .cmd
15873    if test -f "${new_path}.exe"; then
15874      input_to_shortpath="${new_path}.exe"
15875    elif test -f "${new_path}.cmd"; then
15876      input_to_shortpath="${new_path}.cmd"
15877    else
15878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15879$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15880      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15881$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15882      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15883    fi
15884  else
15885    input_to_shortpath="$new_path"
15886  fi
15887
15888  # Call helper function which possibly converts this using DOS-style short mode.
15889  # If so, the updated path is stored in $new_path.
15890  new_path="$input_to_shortpath"
15891
15892  input_path="$input_to_shortpath"
15893  # Check if we need to convert this using DOS-style short mode. If the path
15894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15895  # take no chances and rewrite it.
15896  # Note: m4 eats our [], so we need to use [ and ] instead.
15897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15898  if test "x$has_forbidden_chars" != x; then
15899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15900    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15901    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15902    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15903      # Going to short mode and back again did indeed matter. Since short mode is
15904      # case insensitive, let's make it lowercase to improve readability.
15905      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15906      # Now convert it back to Unix-stile (cygpath)
15907      input_path=`$CYGPATH -u "$shortmode_path"`
15908      new_path="$input_path"
15909    fi
15910  fi
15911
15912  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15913  if test "x$test_cygdrive_prefix" = x; then
15914    # As a simple fix, exclude /usr/bin since it's not a real path.
15915    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15916      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15917      # a path prefixed by /cygdrive for fixpath to work.
15918      new_path="$CYGWIN_ROOT_PATH$input_path"
15919    fi
15920  fi
15921
15922  # remove trailing .exe if any
15923  new_path="${new_path/%.exe/}"
15924
15925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15926
15927  # First separate the path from the arguments. This will split at the first
15928  # space.
15929  complete="$FOUND_MAKE"
15930  path="${complete%% *}"
15931  tmp="$complete EOL"
15932  arguments="${tmp#* }"
15933
15934  # Input might be given as Windows format, start by converting to
15935  # unix format.
15936  new_path="$path"
15937
15938  windows_path="$new_path"
15939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15940    unix_path=`$CYGPATH -u "$windows_path"`
15941    new_path="$unix_path"
15942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15944    new_path="$unix_path"
15945  fi
15946
15947
15948  # Now try to locate executable using which
15949  new_path=`$WHICH "$new_path" 2> /dev/null`
15950
15951  if test "x$new_path" = x; then
15952    # Oops. Which didn't find the executable.
15953    # The splitting of arguments from the executable at a space might have been incorrect,
15954    # since paths with space are more likely in Windows. Give it another try with the whole
15955    # argument.
15956    path="$complete"
15957    arguments="EOL"
15958    new_path="$path"
15959
15960  windows_path="$new_path"
15961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15962    unix_path=`$CYGPATH -u "$windows_path"`
15963    new_path="$unix_path"
15964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15966    new_path="$unix_path"
15967  fi
15968
15969
15970    new_path=`$WHICH "$new_path" 2> /dev/null`
15971
15972    if test "x$new_path" = x; then
15973      # It's still not found. Now this is an unrecoverable error.
15974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15975$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15976      has_space=`$ECHO "$complete" | $GREP " "`
15977      if test "x$has_space" != x; then
15978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15980      fi
15981      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15982    fi
15983  fi
15984
15985  # Now new_path has a complete unix path to the binary
15986  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15987    # Keep paths in /bin as-is, but remove trailing .exe if any
15988    new_path="${new_path/%.exe/}"
15989    # Do not save /bin paths to all_fixpath_prefixes!
15990  else
15991    # Not in mixed or Windows style, start by that.
15992    new_path=`cmd //c echo $new_path`
15993
15994  input_path="$new_path"
15995  # Check if we need to convert this using DOS-style short mode. If the path
15996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15997  # take no chances and rewrite it.
15998  # Note: m4 eats our [], so we need to use [ and ] instead.
15999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16000  if test "x$has_forbidden_chars" != x; then
16001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16002    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16003  fi
16004
16005    # Output is in $new_path
16006
16007  windows_path="$new_path"
16008  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16009    unix_path=`$CYGPATH -u "$windows_path"`
16010    new_path="$unix_path"
16011  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16012    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16013    new_path="$unix_path"
16014  fi
16015
16016    # remove trailing .exe if any
16017    new_path="${new_path/%.exe/}"
16018
16019    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16020    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16021  fi
16022
16023  else
16024    # We're on a posix platform. Hooray! :)
16025    # First separate the path from the arguments. This will split at the first
16026    # space.
16027    complete="$FOUND_MAKE"
16028    path="${complete%% *}"
16029    tmp="$complete EOL"
16030    arguments="${tmp#* }"
16031
16032    # Cannot rely on the command "which" here since it doesn't always work.
16033    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16034    if test -z "$is_absolute_path"; then
16035      # Path to executable is not absolute. Find it.
16036      IFS_save="$IFS"
16037      IFS=:
16038      for p in $PATH; do
16039        if test -f "$p/$path" && test -x "$p/$path"; then
16040          new_path="$p/$path"
16041          break
16042        fi
16043      done
16044      IFS="$IFS_save"
16045    else
16046      # This is an absolute path, we can use it without further modifications.
16047      new_path="$path"
16048    fi
16049
16050    if test "x$new_path" = x; then
16051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16052$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16053      has_space=`$ECHO "$complete" | $GREP " "`
16054      if test "x$has_space" != x; then
16055        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16056$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16057      fi
16058      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16059    fi
16060  fi
16061
16062  # Now join together the path and the arguments once again
16063  if test "x$arguments" != xEOL; then
16064    new_complete="$new_path ${arguments% *}"
16065  else
16066    new_complete="$new_path"
16067  fi
16068
16069  if test "x$complete" != "x$new_complete"; then
16070    FOUND_MAKE="$new_complete"
16071    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16072$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16073  fi
16074
16075        fi
16076      fi
16077    fi
16078  fi
16079
16080    fi
16081
16082    if test "x$FOUND_MAKE" = x; then
16083      if test "x$TOOLS_DIR" != x; then
16084        # We have a tools-dir, check that as well before giving up.
16085        OLD_PATH=$PATH
16086        PATH=$TOOLS_DIR:$PATH
16087        for ac_prog in gmake
16088do
16089  # Extract the first word of "$ac_prog", so it can be a program name with args.
16090set dummy $ac_prog; ac_word=$2
16091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16092$as_echo_n "checking for $ac_word... " >&6; }
16093if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16094  $as_echo_n "(cached) " >&6
16095else
16096  case $CHECK_TOOLSDIR_GMAKE in
16097  [\\/]* | ?:[\\/]*)
16098  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16099  ;;
16100  *)
16101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16102for as_dir in $PATH
16103do
16104  IFS=$as_save_IFS
16105  test -z "$as_dir" && as_dir=.
16106    for ac_exec_ext in '' $ac_executable_extensions; do
16107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16108    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16110    break 2
16111  fi
16112done
16113  done
16114IFS=$as_save_IFS
16115
16116  ;;
16117esac
16118fi
16119CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16120if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16122$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16123else
16124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16125$as_echo "no" >&6; }
16126fi
16127
16128
16129  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16130done
16131
16132
16133  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16134  DESCRIPTION="gmake in tools-dir"
16135  if test "x$MAKE_CANDIDATE" != x; then
16136    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16137$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16138    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16139    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16140    if test "x$IS_GNU_MAKE" = x; then
16141      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16142$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16143    else
16144      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16145      if test "x$IS_MODERN_MAKE" = x; then
16146        { $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
16147$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;}
16148      else
16149        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16150          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16151            MAKE_EXPECTED_ENV='cygwin'
16152          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16153            MAKE_EXPECTED_ENV='msys'
16154          else
16155            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16156          fi
16157          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16158          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16159        else
16160          # Not relevant for non-Windows
16161          IS_MAKE_CORRECT_ENV=true
16162        fi
16163        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16164          { $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
16165$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;}
16166        else
16167          FOUND_MAKE=$MAKE_CANDIDATE
16168
16169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16170
16171  # First separate the path from the arguments. This will split at the first
16172  # space.
16173  complete="$FOUND_MAKE"
16174  path="${complete%% *}"
16175  tmp="$complete EOL"
16176  arguments="${tmp#* }"
16177
16178  # Input might be given as Windows format, start by converting to
16179  # unix format.
16180  new_path=`$CYGPATH -u "$path"`
16181
16182  # Now try to locate executable using which
16183  new_path=`$WHICH "$new_path" 2> /dev/null`
16184  # bat and cmd files are not always considered executable in cygwin causing which
16185  # to not find them
16186  if test "x$new_path" = x \
16187      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16188      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16189    new_path=`$CYGPATH -u "$path"`
16190  fi
16191  if test "x$new_path" = x; then
16192    # Oops. Which didn't find the executable.
16193    # The splitting of arguments from the executable at a space might have been incorrect,
16194    # since paths with space are more likely in Windows. Give it another try with the whole
16195    # argument.
16196    path="$complete"
16197    arguments="EOL"
16198    new_path=`$CYGPATH -u "$path"`
16199    new_path=`$WHICH "$new_path" 2> /dev/null`
16200    # bat and cmd files are not always considered executable in cygwin causing which
16201    # to not find them
16202    if test "x$new_path" = x \
16203        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16204        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16205      new_path=`$CYGPATH -u "$path"`
16206    fi
16207    if test "x$new_path" = x; then
16208      # It's still not found. Now this is an unrecoverable error.
16209      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16210$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16211      has_space=`$ECHO "$complete" | $GREP " "`
16212      if test "x$has_space" != x; then
16213        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16214$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16215      fi
16216      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16217    fi
16218  fi
16219
16220  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16221  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16222  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16223  # "foo.exe" is OK but "foo" is an error.
16224  #
16225  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16226  # It is also a way to make sure we got the proper file name for the real test later on.
16227  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16228  if test "x$test_shortpath" = x; then
16229    # Short path failed, file does not exist as specified.
16230    # Try adding .exe or .cmd
16231    if test -f "${new_path}.exe"; then
16232      input_to_shortpath="${new_path}.exe"
16233    elif test -f "${new_path}.cmd"; then
16234      input_to_shortpath="${new_path}.cmd"
16235    else
16236      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16237$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16238      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16239$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16240      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16241    fi
16242  else
16243    input_to_shortpath="$new_path"
16244  fi
16245
16246  # Call helper function which possibly converts this using DOS-style short mode.
16247  # If so, the updated path is stored in $new_path.
16248  new_path="$input_to_shortpath"
16249
16250  input_path="$input_to_shortpath"
16251  # Check if we need to convert this using DOS-style short mode. If the path
16252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16253  # take no chances and rewrite it.
16254  # Note: m4 eats our [], so we need to use [ and ] instead.
16255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16256  if test "x$has_forbidden_chars" != x; then
16257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16258    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16259    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16260    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16261      # Going to short mode and back again did indeed matter. Since short mode is
16262      # case insensitive, let's make it lowercase to improve readability.
16263      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16264      # Now convert it back to Unix-stile (cygpath)
16265      input_path=`$CYGPATH -u "$shortmode_path"`
16266      new_path="$input_path"
16267    fi
16268  fi
16269
16270  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16271  if test "x$test_cygdrive_prefix" = x; then
16272    # As a simple fix, exclude /usr/bin since it's not a real path.
16273    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16274      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16275      # a path prefixed by /cygdrive for fixpath to work.
16276      new_path="$CYGWIN_ROOT_PATH$input_path"
16277    fi
16278  fi
16279
16280  # remove trailing .exe if any
16281  new_path="${new_path/%.exe/}"
16282
16283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16284
16285  # First separate the path from the arguments. This will split at the first
16286  # space.
16287  complete="$FOUND_MAKE"
16288  path="${complete%% *}"
16289  tmp="$complete EOL"
16290  arguments="${tmp#* }"
16291
16292  # Input might be given as Windows format, start by converting to
16293  # unix format.
16294  new_path="$path"
16295
16296  windows_path="$new_path"
16297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16298    unix_path=`$CYGPATH -u "$windows_path"`
16299    new_path="$unix_path"
16300  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16301    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16302    new_path="$unix_path"
16303  fi
16304
16305
16306  # Now try to locate executable using which
16307  new_path=`$WHICH "$new_path" 2> /dev/null`
16308
16309  if test "x$new_path" = x; then
16310    # Oops. Which didn't find the executable.
16311    # The splitting of arguments from the executable at a space might have been incorrect,
16312    # since paths with space are more likely in Windows. Give it another try with the whole
16313    # argument.
16314    path="$complete"
16315    arguments="EOL"
16316    new_path="$path"
16317
16318  windows_path="$new_path"
16319  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16320    unix_path=`$CYGPATH -u "$windows_path"`
16321    new_path="$unix_path"
16322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16323    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16324    new_path="$unix_path"
16325  fi
16326
16327
16328    new_path=`$WHICH "$new_path" 2> /dev/null`
16329
16330    if test "x$new_path" = x; then
16331      # It's still not found. Now this is an unrecoverable error.
16332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16333$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16334      has_space=`$ECHO "$complete" | $GREP " "`
16335      if test "x$has_space" != x; then
16336        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16337$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16338      fi
16339      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16340    fi
16341  fi
16342
16343  # Now new_path has a complete unix path to the binary
16344  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16345    # Keep paths in /bin as-is, but remove trailing .exe if any
16346    new_path="${new_path/%.exe/}"
16347    # Do not save /bin paths to all_fixpath_prefixes!
16348  else
16349    # Not in mixed or Windows style, start by that.
16350    new_path=`cmd //c echo $new_path`
16351
16352  input_path="$new_path"
16353  # Check if we need to convert this using DOS-style short mode. If the path
16354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16355  # take no chances and rewrite it.
16356  # Note: m4 eats our [], so we need to use [ and ] instead.
16357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16358  if test "x$has_forbidden_chars" != x; then
16359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16360    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16361  fi
16362
16363    # Output is in $new_path
16364
16365  windows_path="$new_path"
16366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16367    unix_path=`$CYGPATH -u "$windows_path"`
16368    new_path="$unix_path"
16369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16371    new_path="$unix_path"
16372  fi
16373
16374    # remove trailing .exe if any
16375    new_path="${new_path/%.exe/}"
16376
16377    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16378    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16379  fi
16380
16381  else
16382    # We're on a posix platform. Hooray! :)
16383    # First separate the path from the arguments. This will split at the first
16384    # space.
16385    complete="$FOUND_MAKE"
16386    path="${complete%% *}"
16387    tmp="$complete EOL"
16388    arguments="${tmp#* }"
16389
16390    # Cannot rely on the command "which" here since it doesn't always work.
16391    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16392    if test -z "$is_absolute_path"; then
16393      # Path to executable is not absolute. Find it.
16394      IFS_save="$IFS"
16395      IFS=:
16396      for p in $PATH; do
16397        if test -f "$p/$path" && test -x "$p/$path"; then
16398          new_path="$p/$path"
16399          break
16400        fi
16401      done
16402      IFS="$IFS_save"
16403    else
16404      # This is an absolute path, we can use it without further modifications.
16405      new_path="$path"
16406    fi
16407
16408    if test "x$new_path" = x; then
16409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16410$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16411      has_space=`$ECHO "$complete" | $GREP " "`
16412      if test "x$has_space" != x; then
16413        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16414$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16415      fi
16416      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16417    fi
16418  fi
16419
16420  # Now join together the path and the arguments once again
16421  if test "x$arguments" != xEOL; then
16422    new_complete="$new_path ${arguments% *}"
16423  else
16424    new_complete="$new_path"
16425  fi
16426
16427  if test "x$complete" != "x$new_complete"; then
16428    FOUND_MAKE="$new_complete"
16429    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16430$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16431  fi
16432
16433        fi
16434      fi
16435    fi
16436  fi
16437
16438        if test "x$FOUND_MAKE" = x; then
16439          for ac_prog in make
16440do
16441  # Extract the first word of "$ac_prog", so it can be a program name with args.
16442set dummy $ac_prog; ac_word=$2
16443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16444$as_echo_n "checking for $ac_word... " >&6; }
16445if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16446  $as_echo_n "(cached) " >&6
16447else
16448  case $CHECK_TOOLSDIR_MAKE in
16449  [\\/]* | ?:[\\/]*)
16450  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16451  ;;
16452  *)
16453  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16454for as_dir in $PATH
16455do
16456  IFS=$as_save_IFS
16457  test -z "$as_dir" && as_dir=.
16458    for ac_exec_ext in '' $ac_executable_extensions; do
16459  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16460    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16461    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16462    break 2
16463  fi
16464done
16465  done
16466IFS=$as_save_IFS
16467
16468  ;;
16469esac
16470fi
16471CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16472if test -n "$CHECK_TOOLSDIR_MAKE"; then
16473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16474$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16475else
16476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16477$as_echo "no" >&6; }
16478fi
16479
16480
16481  test -n "$CHECK_TOOLSDIR_MAKE" && break
16482done
16483
16484
16485  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16486  DESCRIPTION="make in tools-dir"
16487  if test "x$MAKE_CANDIDATE" != x; then
16488    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16489$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16490    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16491    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16492    if test "x$IS_GNU_MAKE" = x; then
16493      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16494$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16495    else
16496      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16497      if test "x$IS_MODERN_MAKE" = x; then
16498        { $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
16499$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;}
16500      else
16501        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16502          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16503            MAKE_EXPECTED_ENV='cygwin'
16504          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16505            MAKE_EXPECTED_ENV='msys'
16506          else
16507            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16508          fi
16509          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16510          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16511        else
16512          # Not relevant for non-Windows
16513          IS_MAKE_CORRECT_ENV=true
16514        fi
16515        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16516          { $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
16517$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;}
16518        else
16519          FOUND_MAKE=$MAKE_CANDIDATE
16520
16521  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16522
16523  # First separate the path from the arguments. This will split at the first
16524  # space.
16525  complete="$FOUND_MAKE"
16526  path="${complete%% *}"
16527  tmp="$complete EOL"
16528  arguments="${tmp#* }"
16529
16530  # Input might be given as Windows format, start by converting to
16531  # unix format.
16532  new_path=`$CYGPATH -u "$path"`
16533
16534  # Now try to locate executable using which
16535  new_path=`$WHICH "$new_path" 2> /dev/null`
16536  # bat and cmd files are not always considered executable in cygwin causing which
16537  # to not find them
16538  if test "x$new_path" = x \
16539      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16540      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16541    new_path=`$CYGPATH -u "$path"`
16542  fi
16543  if test "x$new_path" = x; then
16544    # Oops. Which didn't find the executable.
16545    # The splitting of arguments from the executable at a space might have been incorrect,
16546    # since paths with space are more likely in Windows. Give it another try with the whole
16547    # argument.
16548    path="$complete"
16549    arguments="EOL"
16550    new_path=`$CYGPATH -u "$path"`
16551    new_path=`$WHICH "$new_path" 2> /dev/null`
16552    # bat and cmd files are not always considered executable in cygwin causing which
16553    # to not find them
16554    if test "x$new_path" = x \
16555        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16556        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16557      new_path=`$CYGPATH -u "$path"`
16558    fi
16559    if test "x$new_path" = x; then
16560      # It's still not found. Now this is an unrecoverable error.
16561      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16562$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16563      has_space=`$ECHO "$complete" | $GREP " "`
16564      if test "x$has_space" != x; then
16565        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16566$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16567      fi
16568      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16569    fi
16570  fi
16571
16572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16575  # "foo.exe" is OK but "foo" is an error.
16576  #
16577  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16578  # It is also a way to make sure we got the proper file name for the real test later on.
16579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16580  if test "x$test_shortpath" = x; then
16581    # Short path failed, file does not exist as specified.
16582    # Try adding .exe or .cmd
16583    if test -f "${new_path}.exe"; then
16584      input_to_shortpath="${new_path}.exe"
16585    elif test -f "${new_path}.cmd"; then
16586      input_to_shortpath="${new_path}.cmd"
16587    else
16588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16589$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16590      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16591$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16592      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16593    fi
16594  else
16595    input_to_shortpath="$new_path"
16596  fi
16597
16598  # Call helper function which possibly converts this using DOS-style short mode.
16599  # If so, the updated path is stored in $new_path.
16600  new_path="$input_to_shortpath"
16601
16602  input_path="$input_to_shortpath"
16603  # Check if we need to convert this using DOS-style short mode. If the path
16604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16605  # take no chances and rewrite it.
16606  # Note: m4 eats our [], so we need to use [ and ] instead.
16607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16608  if test "x$has_forbidden_chars" != x; then
16609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16613      # Going to short mode and back again did indeed matter. Since short mode is
16614      # case insensitive, let's make it lowercase to improve readability.
16615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16616      # Now convert it back to Unix-stile (cygpath)
16617      input_path=`$CYGPATH -u "$shortmode_path"`
16618      new_path="$input_path"
16619    fi
16620  fi
16621
16622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16623  if test "x$test_cygdrive_prefix" = x; then
16624    # As a simple fix, exclude /usr/bin since it's not a real path.
16625    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16627      # a path prefixed by /cygdrive for fixpath to work.
16628      new_path="$CYGWIN_ROOT_PATH$input_path"
16629    fi
16630  fi
16631
16632  # remove trailing .exe if any
16633  new_path="${new_path/%.exe/}"
16634
16635  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16636
16637  # First separate the path from the arguments. This will split at the first
16638  # space.
16639  complete="$FOUND_MAKE"
16640  path="${complete%% *}"
16641  tmp="$complete EOL"
16642  arguments="${tmp#* }"
16643
16644  # Input might be given as Windows format, start by converting to
16645  # unix format.
16646  new_path="$path"
16647
16648  windows_path="$new_path"
16649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16650    unix_path=`$CYGPATH -u "$windows_path"`
16651    new_path="$unix_path"
16652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16654    new_path="$unix_path"
16655  fi
16656
16657
16658  # Now try to locate executable using which
16659  new_path=`$WHICH "$new_path" 2> /dev/null`
16660
16661  if test "x$new_path" = x; then
16662    # Oops. Which didn't find the executable.
16663    # The splitting of arguments from the executable at a space might have been incorrect,
16664    # since paths with space are more likely in Windows. Give it another try with the whole
16665    # argument.
16666    path="$complete"
16667    arguments="EOL"
16668    new_path="$path"
16669
16670  windows_path="$new_path"
16671  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16672    unix_path=`$CYGPATH -u "$windows_path"`
16673    new_path="$unix_path"
16674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16675    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16676    new_path="$unix_path"
16677  fi
16678
16679
16680    new_path=`$WHICH "$new_path" 2> /dev/null`
16681
16682    if test "x$new_path" = x; then
16683      # It's still not found. Now this is an unrecoverable error.
16684      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16685$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16686      has_space=`$ECHO "$complete" | $GREP " "`
16687      if test "x$has_space" != x; then
16688        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16689$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16690      fi
16691      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16692    fi
16693  fi
16694
16695  # Now new_path has a complete unix path to the binary
16696  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16697    # Keep paths in /bin as-is, but remove trailing .exe if any
16698    new_path="${new_path/%.exe/}"
16699    # Do not save /bin paths to all_fixpath_prefixes!
16700  else
16701    # Not in mixed or Windows style, start by that.
16702    new_path=`cmd //c echo $new_path`
16703
16704  input_path="$new_path"
16705  # Check if we need to convert this using DOS-style short mode. If the path
16706  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16707  # take no chances and rewrite it.
16708  # Note: m4 eats our [], so we need to use [ and ] instead.
16709  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16710  if test "x$has_forbidden_chars" != x; then
16711    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16712    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16713  fi
16714
16715    # Output is in $new_path
16716
16717  windows_path="$new_path"
16718  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16719    unix_path=`$CYGPATH -u "$windows_path"`
16720    new_path="$unix_path"
16721  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16722    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16723    new_path="$unix_path"
16724  fi
16725
16726    # remove trailing .exe if any
16727    new_path="${new_path/%.exe/}"
16728
16729    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16730    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16731  fi
16732
16733  else
16734    # We're on a posix platform. Hooray! :)
16735    # First separate the path from the arguments. This will split at the first
16736    # space.
16737    complete="$FOUND_MAKE"
16738    path="${complete%% *}"
16739    tmp="$complete EOL"
16740    arguments="${tmp#* }"
16741
16742    # Cannot rely on the command "which" here since it doesn't always work.
16743    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16744    if test -z "$is_absolute_path"; then
16745      # Path to executable is not absolute. Find it.
16746      IFS_save="$IFS"
16747      IFS=:
16748      for p in $PATH; do
16749        if test -f "$p/$path" && test -x "$p/$path"; then
16750          new_path="$p/$path"
16751          break
16752        fi
16753      done
16754      IFS="$IFS_save"
16755    else
16756      # This is an absolute path, we can use it without further modifications.
16757      new_path="$path"
16758    fi
16759
16760    if test "x$new_path" = x; then
16761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16762$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16763      has_space=`$ECHO "$complete" | $GREP " "`
16764      if test "x$has_space" != x; then
16765        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16766$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16767      fi
16768      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16769    fi
16770  fi
16771
16772  # Now join together the path and the arguments once again
16773  if test "x$arguments" != xEOL; then
16774    new_complete="$new_path ${arguments% *}"
16775  else
16776    new_complete="$new_path"
16777  fi
16778
16779  if test "x$complete" != "x$new_complete"; then
16780    FOUND_MAKE="$new_complete"
16781    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16782$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16783  fi
16784
16785        fi
16786      fi
16787    fi
16788  fi
16789
16790        fi
16791        PATH=$OLD_PATH
16792      fi
16793    fi
16794
16795    if test "x$FOUND_MAKE" = x; then
16796      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
16797    fi
16798  fi
16799
16800  MAKE=$FOUND_MAKE
16801
16802  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16803$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16804
16805
16806
16807  # Test if find supports -delete
16808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16809$as_echo_n "checking if find supports -delete... " >&6; }
16810  FIND_DELETE="-delete"
16811
16812  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16813
16814  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16815
16816  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16817  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16818    # No, it does not.
16819    rm $DELETEDIR/TestIfFindSupportsDelete
16820    FIND_DELETE="-exec rm \{\} \+"
16821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16822$as_echo "no" >&6; }
16823  else
16824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16825$as_echo "yes" >&6; }
16826  fi
16827  rmdir $DELETEDIR
16828
16829
16830
16831  # These tools might not be installed by default,
16832  # need hint on how to install them.
16833
16834
16835
16836  # Publish this variable in the help.
16837
16838
16839  if test "x$UNZIP" = x; then
16840    # The variable is not set by user, try to locate tool using the code snippet
16841    for ac_prog in unzip
16842do
16843  # Extract the first word of "$ac_prog", so it can be a program name with args.
16844set dummy $ac_prog; ac_word=$2
16845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16846$as_echo_n "checking for $ac_word... " >&6; }
16847if ${ac_cv_path_UNZIP+:} false; then :
16848  $as_echo_n "(cached) " >&6
16849else
16850  case $UNZIP in
16851  [\\/]* | ?:[\\/]*)
16852  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16853  ;;
16854  *)
16855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16856for as_dir in $PATH
16857do
16858  IFS=$as_save_IFS
16859  test -z "$as_dir" && as_dir=.
16860    for ac_exec_ext in '' $ac_executable_extensions; do
16861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16862    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16864    break 2
16865  fi
16866done
16867  done
16868IFS=$as_save_IFS
16869
16870  ;;
16871esac
16872fi
16873UNZIP=$ac_cv_path_UNZIP
16874if test -n "$UNZIP"; then
16875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16876$as_echo "$UNZIP" >&6; }
16877else
16878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16879$as_echo "no" >&6; }
16880fi
16881
16882
16883  test -n "$UNZIP" && break
16884done
16885
16886  else
16887    # The variable is set, but is it from the command line or the environment?
16888
16889    # Try to remove the string !UNZIP! from our list.
16890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16892      # If it failed, the variable was not from the command line. Ignore it,
16893      # but warn the user (except for BASH, which is always set by the calling BASH).
16894      if test "xUNZIP" != xBASH; then
16895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16896$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16897      fi
16898      # Try to locate tool using the code snippet
16899      for ac_prog in unzip
16900do
16901  # Extract the first word of "$ac_prog", so it can be a program name with args.
16902set dummy $ac_prog; ac_word=$2
16903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16904$as_echo_n "checking for $ac_word... " >&6; }
16905if ${ac_cv_path_UNZIP+:} false; then :
16906  $as_echo_n "(cached) " >&6
16907else
16908  case $UNZIP in
16909  [\\/]* | ?:[\\/]*)
16910  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16911  ;;
16912  *)
16913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16914for as_dir in $PATH
16915do
16916  IFS=$as_save_IFS
16917  test -z "$as_dir" && as_dir=.
16918    for ac_exec_ext in '' $ac_executable_extensions; do
16919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16920    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16922    break 2
16923  fi
16924done
16925  done
16926IFS=$as_save_IFS
16927
16928  ;;
16929esac
16930fi
16931UNZIP=$ac_cv_path_UNZIP
16932if test -n "$UNZIP"; then
16933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16934$as_echo "$UNZIP" >&6; }
16935else
16936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16937$as_echo "no" >&6; }
16938fi
16939
16940
16941  test -n "$UNZIP" && break
16942done
16943
16944    else
16945      # If it succeeded, then it was overridden by the user. We will use it
16946      # for the tool.
16947
16948      # First remove it from the list of overridden variables, so we can test
16949      # for unknown variables in the end.
16950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16951
16952      # Check if the provided tool contains a complete path.
16953      tool_specified="$UNZIP"
16954      tool_basename="${tool_specified##*/}"
16955      if test "x$tool_basename" = "x$tool_specified"; then
16956        # A command without a complete path is provided, search $PATH.
16957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16958$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16959        # Extract the first word of "$tool_basename", so it can be a program name with args.
16960set dummy $tool_basename; ac_word=$2
16961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16962$as_echo_n "checking for $ac_word... " >&6; }
16963if ${ac_cv_path_UNZIP+:} false; then :
16964  $as_echo_n "(cached) " >&6
16965else
16966  case $UNZIP in
16967  [\\/]* | ?:[\\/]*)
16968  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16969  ;;
16970  *)
16971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16972for as_dir in $PATH
16973do
16974  IFS=$as_save_IFS
16975  test -z "$as_dir" && as_dir=.
16976    for ac_exec_ext in '' $ac_executable_extensions; do
16977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16978    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16980    break 2
16981  fi
16982done
16983  done
16984IFS=$as_save_IFS
16985
16986  ;;
16987esac
16988fi
16989UNZIP=$ac_cv_path_UNZIP
16990if test -n "$UNZIP"; then
16991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16992$as_echo "$UNZIP" >&6; }
16993else
16994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16995$as_echo "no" >&6; }
16996fi
16997
16998
16999        if test "x$UNZIP" = x; then
17000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17001        fi
17002      else
17003        # Otherwise we believe it is a complete path. Use it as it is.
17004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17005$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17007$as_echo_n "checking for UNZIP... " >&6; }
17008        if test ! -x "$tool_specified"; then
17009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17010$as_echo "not found" >&6; }
17011          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17012        fi
17013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17014$as_echo "$tool_specified" >&6; }
17015      fi
17016    fi
17017  fi
17018
17019
17020
17021  if test "x$UNZIP" = x; then
17022    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17023  fi
17024
17025
17026
17027
17028
17029  # Publish this variable in the help.
17030
17031
17032  if test "x$ZIP" = x; then
17033    # The variable is not set by user, try to locate tool using the code snippet
17034    for ac_prog in zip
17035do
17036  # Extract the first word of "$ac_prog", so it can be a program name with args.
17037set dummy $ac_prog; ac_word=$2
17038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17039$as_echo_n "checking for $ac_word... " >&6; }
17040if ${ac_cv_path_ZIP+:} false; then :
17041  $as_echo_n "(cached) " >&6
17042else
17043  case $ZIP in
17044  [\\/]* | ?:[\\/]*)
17045  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17046  ;;
17047  *)
17048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17049for as_dir in $PATH
17050do
17051  IFS=$as_save_IFS
17052  test -z "$as_dir" && as_dir=.
17053    for ac_exec_ext in '' $ac_executable_extensions; do
17054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17055    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17057    break 2
17058  fi
17059done
17060  done
17061IFS=$as_save_IFS
17062
17063  ;;
17064esac
17065fi
17066ZIP=$ac_cv_path_ZIP
17067if test -n "$ZIP"; then
17068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17069$as_echo "$ZIP" >&6; }
17070else
17071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17072$as_echo "no" >&6; }
17073fi
17074
17075
17076  test -n "$ZIP" && break
17077done
17078
17079  else
17080    # The variable is set, but is it from the command line or the environment?
17081
17082    # Try to remove the string !ZIP! from our list.
17083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17085      # If it failed, the variable was not from the command line. Ignore it,
17086      # but warn the user (except for BASH, which is always set by the calling BASH).
17087      if test "xZIP" != xBASH; then
17088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17089$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17090      fi
17091      # Try to locate tool using the code snippet
17092      for ac_prog in zip
17093do
17094  # Extract the first word of "$ac_prog", so it can be a program name with args.
17095set dummy $ac_prog; ac_word=$2
17096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17097$as_echo_n "checking for $ac_word... " >&6; }
17098if ${ac_cv_path_ZIP+:} false; then :
17099  $as_echo_n "(cached) " >&6
17100else
17101  case $ZIP in
17102  [\\/]* | ?:[\\/]*)
17103  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17104  ;;
17105  *)
17106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17107for as_dir in $PATH
17108do
17109  IFS=$as_save_IFS
17110  test -z "$as_dir" && as_dir=.
17111    for ac_exec_ext in '' $ac_executable_extensions; do
17112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17113    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17115    break 2
17116  fi
17117done
17118  done
17119IFS=$as_save_IFS
17120
17121  ;;
17122esac
17123fi
17124ZIP=$ac_cv_path_ZIP
17125if test -n "$ZIP"; then
17126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17127$as_echo "$ZIP" >&6; }
17128else
17129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17130$as_echo "no" >&6; }
17131fi
17132
17133
17134  test -n "$ZIP" && break
17135done
17136
17137    else
17138      # If it succeeded, then it was overridden by the user. We will use it
17139      # for the tool.
17140
17141      # First remove it from the list of overridden variables, so we can test
17142      # for unknown variables in the end.
17143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17144
17145      # Check if the provided tool contains a complete path.
17146      tool_specified="$ZIP"
17147      tool_basename="${tool_specified##*/}"
17148      if test "x$tool_basename" = "x$tool_specified"; then
17149        # A command without a complete path is provided, search $PATH.
17150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17151$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17152        # Extract the first word of "$tool_basename", so it can be a program name with args.
17153set dummy $tool_basename; ac_word=$2
17154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17155$as_echo_n "checking for $ac_word... " >&6; }
17156if ${ac_cv_path_ZIP+:} false; then :
17157  $as_echo_n "(cached) " >&6
17158else
17159  case $ZIP in
17160  [\\/]* | ?:[\\/]*)
17161  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17162  ;;
17163  *)
17164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17165for as_dir in $PATH
17166do
17167  IFS=$as_save_IFS
17168  test -z "$as_dir" && as_dir=.
17169    for ac_exec_ext in '' $ac_executable_extensions; do
17170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17171    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17173    break 2
17174  fi
17175done
17176  done
17177IFS=$as_save_IFS
17178
17179  ;;
17180esac
17181fi
17182ZIP=$ac_cv_path_ZIP
17183if test -n "$ZIP"; then
17184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17185$as_echo "$ZIP" >&6; }
17186else
17187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17188$as_echo "no" >&6; }
17189fi
17190
17191
17192        if test "x$ZIP" = x; then
17193          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17194        fi
17195      else
17196        # Otherwise we believe it is a complete path. Use it as it is.
17197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17198$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17200$as_echo_n "checking for ZIP... " >&6; }
17201        if test ! -x "$tool_specified"; then
17202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17203$as_echo "not found" >&6; }
17204          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17205        fi
17206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17207$as_echo "$tool_specified" >&6; }
17208      fi
17209    fi
17210  fi
17211
17212
17213
17214  if test "x$ZIP" = x; then
17215    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17216  fi
17217
17218
17219
17220  # Non-required basic tools
17221
17222
17223
17224  # Publish this variable in the help.
17225
17226
17227  if test "x$LDD" = x; then
17228    # The variable is not set by user, try to locate tool using the code snippet
17229    for ac_prog in ldd
17230do
17231  # Extract the first word of "$ac_prog", so it can be a program name with args.
17232set dummy $ac_prog; ac_word=$2
17233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17234$as_echo_n "checking for $ac_word... " >&6; }
17235if ${ac_cv_path_LDD+:} false; then :
17236  $as_echo_n "(cached) " >&6
17237else
17238  case $LDD in
17239  [\\/]* | ?:[\\/]*)
17240  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17241  ;;
17242  *)
17243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17244for as_dir in $PATH
17245do
17246  IFS=$as_save_IFS
17247  test -z "$as_dir" && as_dir=.
17248    for ac_exec_ext in '' $ac_executable_extensions; do
17249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17250    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17252    break 2
17253  fi
17254done
17255  done
17256IFS=$as_save_IFS
17257
17258  ;;
17259esac
17260fi
17261LDD=$ac_cv_path_LDD
17262if test -n "$LDD"; then
17263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17264$as_echo "$LDD" >&6; }
17265else
17266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17267$as_echo "no" >&6; }
17268fi
17269
17270
17271  test -n "$LDD" && break
17272done
17273
17274  else
17275    # The variable is set, but is it from the command line or the environment?
17276
17277    # Try to remove the string !LDD! from our list.
17278    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17279    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17280      # If it failed, the variable was not from the command line. Ignore it,
17281      # but warn the user (except for BASH, which is always set by the calling BASH).
17282      if test "xLDD" != xBASH; then
17283        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17284$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17285      fi
17286      # Try to locate tool using the code snippet
17287      for ac_prog in ldd
17288do
17289  # Extract the first word of "$ac_prog", so it can be a program name with args.
17290set dummy $ac_prog; ac_word=$2
17291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17292$as_echo_n "checking for $ac_word... " >&6; }
17293if ${ac_cv_path_LDD+:} false; then :
17294  $as_echo_n "(cached) " >&6
17295else
17296  case $LDD in
17297  [\\/]* | ?:[\\/]*)
17298  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17299  ;;
17300  *)
17301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17302for as_dir in $PATH
17303do
17304  IFS=$as_save_IFS
17305  test -z "$as_dir" && as_dir=.
17306    for ac_exec_ext in '' $ac_executable_extensions; do
17307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17308    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17310    break 2
17311  fi
17312done
17313  done
17314IFS=$as_save_IFS
17315
17316  ;;
17317esac
17318fi
17319LDD=$ac_cv_path_LDD
17320if test -n "$LDD"; then
17321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17322$as_echo "$LDD" >&6; }
17323else
17324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17325$as_echo "no" >&6; }
17326fi
17327
17328
17329  test -n "$LDD" && break
17330done
17331
17332    else
17333      # If it succeeded, then it was overridden by the user. We will use it
17334      # for the tool.
17335
17336      # First remove it from the list of overridden variables, so we can test
17337      # for unknown variables in the end.
17338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17339
17340      # Check if the provided tool contains a complete path.
17341      tool_specified="$LDD"
17342      tool_basename="${tool_specified##*/}"
17343      if test "x$tool_basename" = "x$tool_specified"; then
17344        # A command without a complete path is provided, search $PATH.
17345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17346$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17347        # Extract the first word of "$tool_basename", so it can be a program name with args.
17348set dummy $tool_basename; ac_word=$2
17349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17350$as_echo_n "checking for $ac_word... " >&6; }
17351if ${ac_cv_path_LDD+:} false; then :
17352  $as_echo_n "(cached) " >&6
17353else
17354  case $LDD in
17355  [\\/]* | ?:[\\/]*)
17356  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17357  ;;
17358  *)
17359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17360for as_dir in $PATH
17361do
17362  IFS=$as_save_IFS
17363  test -z "$as_dir" && as_dir=.
17364    for ac_exec_ext in '' $ac_executable_extensions; do
17365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17366    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17368    break 2
17369  fi
17370done
17371  done
17372IFS=$as_save_IFS
17373
17374  ;;
17375esac
17376fi
17377LDD=$ac_cv_path_LDD
17378if test -n "$LDD"; then
17379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17380$as_echo "$LDD" >&6; }
17381else
17382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17383$as_echo "no" >&6; }
17384fi
17385
17386
17387        if test "x$LDD" = x; then
17388          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17389        fi
17390      else
17391        # Otherwise we believe it is a complete path. Use it as it is.
17392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17393$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17395$as_echo_n "checking for LDD... " >&6; }
17396        if test ! -x "$tool_specified"; then
17397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17398$as_echo "not found" >&6; }
17399          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17400        fi
17401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17402$as_echo "$tool_specified" >&6; }
17403      fi
17404    fi
17405  fi
17406
17407
17408  if test "x$LDD" = "x"; then
17409    # List shared lib dependencies is used for
17410    # debug output and checking for forbidden dependencies.
17411    # We can build without it.
17412    LDD="true"
17413  fi
17414
17415
17416  # Publish this variable in the help.
17417
17418
17419  if test "x$OTOOL" = x; then
17420    # The variable is not set by user, try to locate tool using the code snippet
17421    for ac_prog in otool
17422do
17423  # Extract the first word of "$ac_prog", so it can be a program name with args.
17424set dummy $ac_prog; ac_word=$2
17425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17426$as_echo_n "checking for $ac_word... " >&6; }
17427if ${ac_cv_path_OTOOL+:} false; then :
17428  $as_echo_n "(cached) " >&6
17429else
17430  case $OTOOL in
17431  [\\/]* | ?:[\\/]*)
17432  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17433  ;;
17434  *)
17435  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17436for as_dir in $PATH
17437do
17438  IFS=$as_save_IFS
17439  test -z "$as_dir" && as_dir=.
17440    for ac_exec_ext in '' $ac_executable_extensions; do
17441  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17442    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17443    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17444    break 2
17445  fi
17446done
17447  done
17448IFS=$as_save_IFS
17449
17450  ;;
17451esac
17452fi
17453OTOOL=$ac_cv_path_OTOOL
17454if test -n "$OTOOL"; then
17455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17456$as_echo "$OTOOL" >&6; }
17457else
17458  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17459$as_echo "no" >&6; }
17460fi
17461
17462
17463  test -n "$OTOOL" && break
17464done
17465
17466  else
17467    # The variable is set, but is it from the command line or the environment?
17468
17469    # Try to remove the string !OTOOL! from our list.
17470    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17471    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17472      # If it failed, the variable was not from the command line. Ignore it,
17473      # but warn the user (except for BASH, which is always set by the calling BASH).
17474      if test "xOTOOL" != xBASH; then
17475        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17476$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17477      fi
17478      # Try to locate tool using the code snippet
17479      for ac_prog in otool
17480do
17481  # Extract the first word of "$ac_prog", so it can be a program name with args.
17482set dummy $ac_prog; ac_word=$2
17483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17484$as_echo_n "checking for $ac_word... " >&6; }
17485if ${ac_cv_path_OTOOL+:} false; then :
17486  $as_echo_n "(cached) " >&6
17487else
17488  case $OTOOL in
17489  [\\/]* | ?:[\\/]*)
17490  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17491  ;;
17492  *)
17493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17494for as_dir in $PATH
17495do
17496  IFS=$as_save_IFS
17497  test -z "$as_dir" && as_dir=.
17498    for ac_exec_ext in '' $ac_executable_extensions; do
17499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17500    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17502    break 2
17503  fi
17504done
17505  done
17506IFS=$as_save_IFS
17507
17508  ;;
17509esac
17510fi
17511OTOOL=$ac_cv_path_OTOOL
17512if test -n "$OTOOL"; then
17513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17514$as_echo "$OTOOL" >&6; }
17515else
17516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17517$as_echo "no" >&6; }
17518fi
17519
17520
17521  test -n "$OTOOL" && break
17522done
17523
17524    else
17525      # If it succeeded, then it was overridden by the user. We will use it
17526      # for the tool.
17527
17528      # First remove it from the list of overridden variables, so we can test
17529      # for unknown variables in the end.
17530      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17531
17532      # Check if the provided tool contains a complete path.
17533      tool_specified="$OTOOL"
17534      tool_basename="${tool_specified##*/}"
17535      if test "x$tool_basename" = "x$tool_specified"; then
17536        # A command without a complete path is provided, search $PATH.
17537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17538$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17539        # Extract the first word of "$tool_basename", so it can be a program name with args.
17540set dummy $tool_basename; ac_word=$2
17541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17542$as_echo_n "checking for $ac_word... " >&6; }
17543if ${ac_cv_path_OTOOL+:} false; then :
17544  $as_echo_n "(cached) " >&6
17545else
17546  case $OTOOL in
17547  [\\/]* | ?:[\\/]*)
17548  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17549  ;;
17550  *)
17551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17552for as_dir in $PATH
17553do
17554  IFS=$as_save_IFS
17555  test -z "$as_dir" && as_dir=.
17556    for ac_exec_ext in '' $ac_executable_extensions; do
17557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17558    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17560    break 2
17561  fi
17562done
17563  done
17564IFS=$as_save_IFS
17565
17566  ;;
17567esac
17568fi
17569OTOOL=$ac_cv_path_OTOOL
17570if test -n "$OTOOL"; then
17571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17572$as_echo "$OTOOL" >&6; }
17573else
17574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17575$as_echo "no" >&6; }
17576fi
17577
17578
17579        if test "x$OTOOL" = x; then
17580          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17581        fi
17582      else
17583        # Otherwise we believe it is a complete path. Use it as it is.
17584        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17585$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17586        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17587$as_echo_n "checking for OTOOL... " >&6; }
17588        if test ! -x "$tool_specified"; then
17589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17590$as_echo "not found" >&6; }
17591          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17592        fi
17593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17594$as_echo "$tool_specified" >&6; }
17595      fi
17596    fi
17597  fi
17598
17599
17600  if test "x$OTOOL" = "x"; then
17601    OTOOL="true"
17602  fi
17603
17604
17605  # Publish this variable in the help.
17606
17607
17608  if test "x$READELF" = x; then
17609    # The variable is not set by user, try to locate tool using the code snippet
17610    for ac_prog in greadelf readelf
17611do
17612  # Extract the first word of "$ac_prog", so it can be a program name with args.
17613set dummy $ac_prog; ac_word=$2
17614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17615$as_echo_n "checking for $ac_word... " >&6; }
17616if ${ac_cv_path_READELF+:} false; then :
17617  $as_echo_n "(cached) " >&6
17618else
17619  case $READELF in
17620  [\\/]* | ?:[\\/]*)
17621  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17622  ;;
17623  *)
17624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17625for as_dir in $PATH
17626do
17627  IFS=$as_save_IFS
17628  test -z "$as_dir" && as_dir=.
17629    for ac_exec_ext in '' $ac_executable_extensions; do
17630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17631    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17633    break 2
17634  fi
17635done
17636  done
17637IFS=$as_save_IFS
17638
17639  ;;
17640esac
17641fi
17642READELF=$ac_cv_path_READELF
17643if test -n "$READELF"; then
17644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17645$as_echo "$READELF" >&6; }
17646else
17647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17648$as_echo "no" >&6; }
17649fi
17650
17651
17652  test -n "$READELF" && break
17653done
17654
17655  else
17656    # The variable is set, but is it from the command line or the environment?
17657
17658    # Try to remove the string !READELF! from our list.
17659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17661      # If it failed, the variable was not from the command line. Ignore it,
17662      # but warn the user (except for BASH, which is always set by the calling BASH).
17663      if test "xREADELF" != xBASH; then
17664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17665$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17666      fi
17667      # Try to locate tool using the code snippet
17668      for ac_prog in greadelf readelf
17669do
17670  # Extract the first word of "$ac_prog", so it can be a program name with args.
17671set dummy $ac_prog; ac_word=$2
17672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17673$as_echo_n "checking for $ac_word... " >&6; }
17674if ${ac_cv_path_READELF+:} false; then :
17675  $as_echo_n "(cached) " >&6
17676else
17677  case $READELF in
17678  [\\/]* | ?:[\\/]*)
17679  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17680  ;;
17681  *)
17682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17683for as_dir in $PATH
17684do
17685  IFS=$as_save_IFS
17686  test -z "$as_dir" && as_dir=.
17687    for ac_exec_ext in '' $ac_executable_extensions; do
17688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17689    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17691    break 2
17692  fi
17693done
17694  done
17695IFS=$as_save_IFS
17696
17697  ;;
17698esac
17699fi
17700READELF=$ac_cv_path_READELF
17701if test -n "$READELF"; then
17702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17703$as_echo "$READELF" >&6; }
17704else
17705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17706$as_echo "no" >&6; }
17707fi
17708
17709
17710  test -n "$READELF" && break
17711done
17712
17713    else
17714      # If it succeeded, then it was overridden by the user. We will use it
17715      # for the tool.
17716
17717      # First remove it from the list of overridden variables, so we can test
17718      # for unknown variables in the end.
17719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17720
17721      # Check if the provided tool contains a complete path.
17722      tool_specified="$READELF"
17723      tool_basename="${tool_specified##*/}"
17724      if test "x$tool_basename" = "x$tool_specified"; then
17725        # A command without a complete path is provided, search $PATH.
17726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17727$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17728        # Extract the first word of "$tool_basename", so it can be a program name with args.
17729set dummy $tool_basename; ac_word=$2
17730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17731$as_echo_n "checking for $ac_word... " >&6; }
17732if ${ac_cv_path_READELF+:} false; then :
17733  $as_echo_n "(cached) " >&6
17734else
17735  case $READELF in
17736  [\\/]* | ?:[\\/]*)
17737  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17738  ;;
17739  *)
17740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17741for as_dir in $PATH
17742do
17743  IFS=$as_save_IFS
17744  test -z "$as_dir" && as_dir=.
17745    for ac_exec_ext in '' $ac_executable_extensions; do
17746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17747    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17749    break 2
17750  fi
17751done
17752  done
17753IFS=$as_save_IFS
17754
17755  ;;
17756esac
17757fi
17758READELF=$ac_cv_path_READELF
17759if test -n "$READELF"; then
17760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17761$as_echo "$READELF" >&6; }
17762else
17763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17764$as_echo "no" >&6; }
17765fi
17766
17767
17768        if test "x$READELF" = x; then
17769          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17770        fi
17771      else
17772        # Otherwise we believe it is a complete path. Use it as it is.
17773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17774$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17776$as_echo_n "checking for READELF... " >&6; }
17777        if test ! -x "$tool_specified"; then
17778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17779$as_echo "not found" >&6; }
17780          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17781        fi
17782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17783$as_echo "$tool_specified" >&6; }
17784      fi
17785    fi
17786  fi
17787
17788
17789
17790
17791  # Publish this variable in the help.
17792
17793
17794  if test "x$HG" = x; then
17795    # The variable is not set by user, try to locate tool using the code snippet
17796    for ac_prog in hg
17797do
17798  # Extract the first word of "$ac_prog", so it can be a program name with args.
17799set dummy $ac_prog; ac_word=$2
17800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17801$as_echo_n "checking for $ac_word... " >&6; }
17802if ${ac_cv_path_HG+:} false; then :
17803  $as_echo_n "(cached) " >&6
17804else
17805  case $HG in
17806  [\\/]* | ?:[\\/]*)
17807  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17808  ;;
17809  *)
17810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17811for as_dir in $PATH
17812do
17813  IFS=$as_save_IFS
17814  test -z "$as_dir" && as_dir=.
17815    for ac_exec_ext in '' $ac_executable_extensions; do
17816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17817    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17819    break 2
17820  fi
17821done
17822  done
17823IFS=$as_save_IFS
17824
17825  ;;
17826esac
17827fi
17828HG=$ac_cv_path_HG
17829if test -n "$HG"; then
17830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17831$as_echo "$HG" >&6; }
17832else
17833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17834$as_echo "no" >&6; }
17835fi
17836
17837
17838  test -n "$HG" && break
17839done
17840
17841  else
17842    # The variable is set, but is it from the command line or the environment?
17843
17844    # Try to remove the string !HG! from our list.
17845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17847      # If it failed, the variable was not from the command line. Ignore it,
17848      # but warn the user (except for BASH, which is always set by the calling BASH).
17849      if test "xHG" != xBASH; then
17850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17851$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17852      fi
17853      # Try to locate tool using the code snippet
17854      for ac_prog in hg
17855do
17856  # Extract the first word of "$ac_prog", so it can be a program name with args.
17857set dummy $ac_prog; ac_word=$2
17858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17859$as_echo_n "checking for $ac_word... " >&6; }
17860if ${ac_cv_path_HG+:} false; then :
17861  $as_echo_n "(cached) " >&6
17862else
17863  case $HG in
17864  [\\/]* | ?:[\\/]*)
17865  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17866  ;;
17867  *)
17868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17869for as_dir in $PATH
17870do
17871  IFS=$as_save_IFS
17872  test -z "$as_dir" && as_dir=.
17873    for ac_exec_ext in '' $ac_executable_extensions; do
17874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17875    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17877    break 2
17878  fi
17879done
17880  done
17881IFS=$as_save_IFS
17882
17883  ;;
17884esac
17885fi
17886HG=$ac_cv_path_HG
17887if test -n "$HG"; then
17888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17889$as_echo "$HG" >&6; }
17890else
17891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17892$as_echo "no" >&6; }
17893fi
17894
17895
17896  test -n "$HG" && break
17897done
17898
17899    else
17900      # If it succeeded, then it was overridden by the user. We will use it
17901      # for the tool.
17902
17903      # First remove it from the list of overridden variables, so we can test
17904      # for unknown variables in the end.
17905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17906
17907      # Check if the provided tool contains a complete path.
17908      tool_specified="$HG"
17909      tool_basename="${tool_specified##*/}"
17910      if test "x$tool_basename" = "x$tool_specified"; then
17911        # A command without a complete path is provided, search $PATH.
17912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17913$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17914        # Extract the first word of "$tool_basename", so it can be a program name with args.
17915set dummy $tool_basename; ac_word=$2
17916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17917$as_echo_n "checking for $ac_word... " >&6; }
17918if ${ac_cv_path_HG+:} false; then :
17919  $as_echo_n "(cached) " >&6
17920else
17921  case $HG in
17922  [\\/]* | ?:[\\/]*)
17923  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17924  ;;
17925  *)
17926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17927for as_dir in $PATH
17928do
17929  IFS=$as_save_IFS
17930  test -z "$as_dir" && as_dir=.
17931    for ac_exec_ext in '' $ac_executable_extensions; do
17932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17933    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17935    break 2
17936  fi
17937done
17938  done
17939IFS=$as_save_IFS
17940
17941  ;;
17942esac
17943fi
17944HG=$ac_cv_path_HG
17945if test -n "$HG"; then
17946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17947$as_echo "$HG" >&6; }
17948else
17949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17950$as_echo "no" >&6; }
17951fi
17952
17953
17954        if test "x$HG" = x; then
17955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17956        fi
17957      else
17958        # Otherwise we believe it is a complete path. Use it as it is.
17959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17960$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17962$as_echo_n "checking for HG... " >&6; }
17963        if test ! -x "$tool_specified"; then
17964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17965$as_echo "not found" >&6; }
17966          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17967        fi
17968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17969$as_echo "$tool_specified" >&6; }
17970      fi
17971    fi
17972  fi
17973
17974
17975
17976
17977  # Publish this variable in the help.
17978
17979
17980  if test "x$STAT" = x; then
17981    # The variable is not set by user, try to locate tool using the code snippet
17982    for ac_prog in stat
17983do
17984  # Extract the first word of "$ac_prog", so it can be a program name with args.
17985set dummy $ac_prog; ac_word=$2
17986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17987$as_echo_n "checking for $ac_word... " >&6; }
17988if ${ac_cv_path_STAT+:} false; then :
17989  $as_echo_n "(cached) " >&6
17990else
17991  case $STAT in
17992  [\\/]* | ?:[\\/]*)
17993  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17994  ;;
17995  *)
17996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17997for as_dir in $PATH
17998do
17999  IFS=$as_save_IFS
18000  test -z "$as_dir" && as_dir=.
18001    for ac_exec_ext in '' $ac_executable_extensions; do
18002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18003    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18005    break 2
18006  fi
18007done
18008  done
18009IFS=$as_save_IFS
18010
18011  ;;
18012esac
18013fi
18014STAT=$ac_cv_path_STAT
18015if test -n "$STAT"; then
18016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18017$as_echo "$STAT" >&6; }
18018else
18019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18020$as_echo "no" >&6; }
18021fi
18022
18023
18024  test -n "$STAT" && break
18025done
18026
18027  else
18028    # The variable is set, but is it from the command line or the environment?
18029
18030    # Try to remove the string !STAT! from our list.
18031    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18032    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18033      # If it failed, the variable was not from the command line. Ignore it,
18034      # but warn the user (except for BASH, which is always set by the calling BASH).
18035      if test "xSTAT" != xBASH; then
18036        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18037$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18038      fi
18039      # Try to locate tool using the code snippet
18040      for ac_prog in stat
18041do
18042  # Extract the first word of "$ac_prog", so it can be a program name with args.
18043set dummy $ac_prog; ac_word=$2
18044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18045$as_echo_n "checking for $ac_word... " >&6; }
18046if ${ac_cv_path_STAT+:} false; then :
18047  $as_echo_n "(cached) " >&6
18048else
18049  case $STAT in
18050  [\\/]* | ?:[\\/]*)
18051  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18052  ;;
18053  *)
18054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18055for as_dir in $PATH
18056do
18057  IFS=$as_save_IFS
18058  test -z "$as_dir" && as_dir=.
18059    for ac_exec_ext in '' $ac_executable_extensions; do
18060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18061    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18063    break 2
18064  fi
18065done
18066  done
18067IFS=$as_save_IFS
18068
18069  ;;
18070esac
18071fi
18072STAT=$ac_cv_path_STAT
18073if test -n "$STAT"; then
18074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18075$as_echo "$STAT" >&6; }
18076else
18077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18078$as_echo "no" >&6; }
18079fi
18080
18081
18082  test -n "$STAT" && break
18083done
18084
18085    else
18086      # If it succeeded, then it was overridden by the user. We will use it
18087      # for the tool.
18088
18089      # First remove it from the list of overridden variables, so we can test
18090      # for unknown variables in the end.
18091      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18092
18093      # Check if the provided tool contains a complete path.
18094      tool_specified="$STAT"
18095      tool_basename="${tool_specified##*/}"
18096      if test "x$tool_basename" = "x$tool_specified"; then
18097        # A command without a complete path is provided, search $PATH.
18098        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18099$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18100        # Extract the first word of "$tool_basename", so it can be a program name with args.
18101set dummy $tool_basename; ac_word=$2
18102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18103$as_echo_n "checking for $ac_word... " >&6; }
18104if ${ac_cv_path_STAT+:} false; then :
18105  $as_echo_n "(cached) " >&6
18106else
18107  case $STAT in
18108  [\\/]* | ?:[\\/]*)
18109  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18110  ;;
18111  *)
18112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18113for as_dir in $PATH
18114do
18115  IFS=$as_save_IFS
18116  test -z "$as_dir" && as_dir=.
18117    for ac_exec_ext in '' $ac_executable_extensions; do
18118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18119    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18121    break 2
18122  fi
18123done
18124  done
18125IFS=$as_save_IFS
18126
18127  ;;
18128esac
18129fi
18130STAT=$ac_cv_path_STAT
18131if test -n "$STAT"; then
18132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18133$as_echo "$STAT" >&6; }
18134else
18135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18136$as_echo "no" >&6; }
18137fi
18138
18139
18140        if test "x$STAT" = x; then
18141          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18142        fi
18143      else
18144        # Otherwise we believe it is a complete path. Use it as it is.
18145        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18146$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18148$as_echo_n "checking for STAT... " >&6; }
18149        if test ! -x "$tool_specified"; then
18150          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18151$as_echo "not found" >&6; }
18152          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18153        fi
18154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18155$as_echo "$tool_specified" >&6; }
18156      fi
18157    fi
18158  fi
18159
18160
18161
18162
18163  # Publish this variable in the help.
18164
18165
18166  if test "x$TIME" = x; then
18167    # The variable is not set by user, try to locate tool using the code snippet
18168    for ac_prog in time
18169do
18170  # Extract the first word of "$ac_prog", so it can be a program name with args.
18171set dummy $ac_prog; ac_word=$2
18172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18173$as_echo_n "checking for $ac_word... " >&6; }
18174if ${ac_cv_path_TIME+:} false; then :
18175  $as_echo_n "(cached) " >&6
18176else
18177  case $TIME in
18178  [\\/]* | ?:[\\/]*)
18179  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18180  ;;
18181  *)
18182  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18183for as_dir in $PATH
18184do
18185  IFS=$as_save_IFS
18186  test -z "$as_dir" && as_dir=.
18187    for ac_exec_ext in '' $ac_executable_extensions; do
18188  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18189    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18190    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18191    break 2
18192  fi
18193done
18194  done
18195IFS=$as_save_IFS
18196
18197  ;;
18198esac
18199fi
18200TIME=$ac_cv_path_TIME
18201if test -n "$TIME"; then
18202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18203$as_echo "$TIME" >&6; }
18204else
18205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18206$as_echo "no" >&6; }
18207fi
18208
18209
18210  test -n "$TIME" && break
18211done
18212
18213  else
18214    # The variable is set, but is it from the command line or the environment?
18215
18216    # Try to remove the string !TIME! from our list.
18217    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18218    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18219      # If it failed, the variable was not from the command line. Ignore it,
18220      # but warn the user (except for BASH, which is always set by the calling BASH).
18221      if test "xTIME" != xBASH; then
18222        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18223$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18224      fi
18225      # Try to locate tool using the code snippet
18226      for ac_prog in time
18227do
18228  # Extract the first word of "$ac_prog", so it can be a program name with args.
18229set dummy $ac_prog; ac_word=$2
18230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18231$as_echo_n "checking for $ac_word... " >&6; }
18232if ${ac_cv_path_TIME+:} false; then :
18233  $as_echo_n "(cached) " >&6
18234else
18235  case $TIME in
18236  [\\/]* | ?:[\\/]*)
18237  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18238  ;;
18239  *)
18240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18241for as_dir in $PATH
18242do
18243  IFS=$as_save_IFS
18244  test -z "$as_dir" && as_dir=.
18245    for ac_exec_ext in '' $ac_executable_extensions; do
18246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18247    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18249    break 2
18250  fi
18251done
18252  done
18253IFS=$as_save_IFS
18254
18255  ;;
18256esac
18257fi
18258TIME=$ac_cv_path_TIME
18259if test -n "$TIME"; then
18260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18261$as_echo "$TIME" >&6; }
18262else
18263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18264$as_echo "no" >&6; }
18265fi
18266
18267
18268  test -n "$TIME" && break
18269done
18270
18271    else
18272      # If it succeeded, then it was overridden by the user. We will use it
18273      # for the tool.
18274
18275      # First remove it from the list of overridden variables, so we can test
18276      # for unknown variables in the end.
18277      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18278
18279      # Check if the provided tool contains a complete path.
18280      tool_specified="$TIME"
18281      tool_basename="${tool_specified##*/}"
18282      if test "x$tool_basename" = "x$tool_specified"; then
18283        # A command without a complete path is provided, search $PATH.
18284        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18285$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18286        # Extract the first word of "$tool_basename", so it can be a program name with args.
18287set dummy $tool_basename; ac_word=$2
18288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18289$as_echo_n "checking for $ac_word... " >&6; }
18290if ${ac_cv_path_TIME+:} false; then :
18291  $as_echo_n "(cached) " >&6
18292else
18293  case $TIME in
18294  [\\/]* | ?:[\\/]*)
18295  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18296  ;;
18297  *)
18298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18299for as_dir in $PATH
18300do
18301  IFS=$as_save_IFS
18302  test -z "$as_dir" && as_dir=.
18303    for ac_exec_ext in '' $ac_executable_extensions; do
18304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18305    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18307    break 2
18308  fi
18309done
18310  done
18311IFS=$as_save_IFS
18312
18313  ;;
18314esac
18315fi
18316TIME=$ac_cv_path_TIME
18317if test -n "$TIME"; then
18318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18319$as_echo "$TIME" >&6; }
18320else
18321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18322$as_echo "no" >&6; }
18323fi
18324
18325
18326        if test "x$TIME" = x; then
18327          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18328        fi
18329      else
18330        # Otherwise we believe it is a complete path. Use it as it is.
18331        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18332$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18333        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18334$as_echo_n "checking for TIME... " >&6; }
18335        if test ! -x "$tool_specified"; then
18336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18337$as_echo "not found" >&6; }
18338          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18339        fi
18340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18341$as_echo "$tool_specified" >&6; }
18342      fi
18343    fi
18344  fi
18345
18346
18347  # Check if it's GNU time
18348  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18349  if test "x$IS_GNU_TIME" != x; then
18350    IS_GNU_TIME=yes
18351  else
18352    IS_GNU_TIME=no
18353  fi
18354
18355
18356  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18357
18358
18359
18360  # Publish this variable in the help.
18361
18362
18363  if test "x$COMM" = x; then
18364    # The variable is not set by user, try to locate tool using the code snippet
18365    for ac_prog in comm
18366do
18367  # Extract the first word of "$ac_prog", so it can be a program name with args.
18368set dummy $ac_prog; ac_word=$2
18369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18370$as_echo_n "checking for $ac_word... " >&6; }
18371if ${ac_cv_path_COMM+:} false; then :
18372  $as_echo_n "(cached) " >&6
18373else
18374  case $COMM in
18375  [\\/]* | ?:[\\/]*)
18376  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18377  ;;
18378  *)
18379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18380for as_dir in $PATH
18381do
18382  IFS=$as_save_IFS
18383  test -z "$as_dir" && as_dir=.
18384    for ac_exec_ext in '' $ac_executable_extensions; do
18385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18386    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18388    break 2
18389  fi
18390done
18391  done
18392IFS=$as_save_IFS
18393
18394  ;;
18395esac
18396fi
18397COMM=$ac_cv_path_COMM
18398if test -n "$COMM"; then
18399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18400$as_echo "$COMM" >&6; }
18401else
18402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18403$as_echo "no" >&6; }
18404fi
18405
18406
18407  test -n "$COMM" && break
18408done
18409
18410  else
18411    # The variable is set, but is it from the command line or the environment?
18412
18413    # Try to remove the string !COMM! from our list.
18414    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18415    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18416      # If it failed, the variable was not from the command line. Ignore it,
18417      # but warn the user (except for BASH, which is always set by the calling BASH).
18418      if test "xCOMM" != xBASH; then
18419        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18420$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18421      fi
18422      # Try to locate tool using the code snippet
18423      for ac_prog in comm
18424do
18425  # Extract the first word of "$ac_prog", so it can be a program name with args.
18426set dummy $ac_prog; ac_word=$2
18427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18428$as_echo_n "checking for $ac_word... " >&6; }
18429if ${ac_cv_path_COMM+:} false; then :
18430  $as_echo_n "(cached) " >&6
18431else
18432  case $COMM in
18433  [\\/]* | ?:[\\/]*)
18434  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18435  ;;
18436  *)
18437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18438for as_dir in $PATH
18439do
18440  IFS=$as_save_IFS
18441  test -z "$as_dir" && as_dir=.
18442    for ac_exec_ext in '' $ac_executable_extensions; do
18443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18444    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18446    break 2
18447  fi
18448done
18449  done
18450IFS=$as_save_IFS
18451
18452  ;;
18453esac
18454fi
18455COMM=$ac_cv_path_COMM
18456if test -n "$COMM"; then
18457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18458$as_echo "$COMM" >&6; }
18459else
18460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18461$as_echo "no" >&6; }
18462fi
18463
18464
18465  test -n "$COMM" && break
18466done
18467
18468    else
18469      # If it succeeded, then it was overridden by the user. We will use it
18470      # for the tool.
18471
18472      # First remove it from the list of overridden variables, so we can test
18473      # for unknown variables in the end.
18474      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18475
18476      # Check if the provided tool contains a complete path.
18477      tool_specified="$COMM"
18478      tool_basename="${tool_specified##*/}"
18479      if test "x$tool_basename" = "x$tool_specified"; then
18480        # A command without a complete path is provided, search $PATH.
18481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18482$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18483        # Extract the first word of "$tool_basename", so it can be a program name with args.
18484set dummy $tool_basename; ac_word=$2
18485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18486$as_echo_n "checking for $ac_word... " >&6; }
18487if ${ac_cv_path_COMM+:} false; then :
18488  $as_echo_n "(cached) " >&6
18489else
18490  case $COMM in
18491  [\\/]* | ?:[\\/]*)
18492  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18493  ;;
18494  *)
18495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18496for as_dir in $PATH
18497do
18498  IFS=$as_save_IFS
18499  test -z "$as_dir" && as_dir=.
18500    for ac_exec_ext in '' $ac_executable_extensions; do
18501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18502    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18504    break 2
18505  fi
18506done
18507  done
18508IFS=$as_save_IFS
18509
18510  ;;
18511esac
18512fi
18513COMM=$ac_cv_path_COMM
18514if test -n "$COMM"; then
18515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18516$as_echo "$COMM" >&6; }
18517else
18518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18519$as_echo "no" >&6; }
18520fi
18521
18522
18523        if test "x$COMM" = x; then
18524          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18525        fi
18526      else
18527        # Otherwise we believe it is a complete path. Use it as it is.
18528        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18529$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18531$as_echo_n "checking for COMM... " >&6; }
18532        if test ! -x "$tool_specified"; then
18533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18534$as_echo "not found" >&6; }
18535          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18536        fi
18537        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18538$as_echo "$tool_specified" >&6; }
18539      fi
18540    fi
18541  fi
18542
18543
18544
18545  if test "x$COMM" = x; then
18546    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18547  fi
18548
18549
18550  fi
18551
18552  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18553
18554
18555
18556  # Publish this variable in the help.
18557
18558
18559  if test "x$DSYMUTIL" = x; then
18560    # The variable is not set by user, try to locate tool using the code snippet
18561    for ac_prog in dsymutil
18562do
18563  # Extract the first word of "$ac_prog", so it can be a program name with args.
18564set dummy $ac_prog; ac_word=$2
18565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18566$as_echo_n "checking for $ac_word... " >&6; }
18567if ${ac_cv_path_DSYMUTIL+:} false; then :
18568  $as_echo_n "(cached) " >&6
18569else
18570  case $DSYMUTIL in
18571  [\\/]* | ?:[\\/]*)
18572  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18573  ;;
18574  *)
18575  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18576for as_dir in $PATH
18577do
18578  IFS=$as_save_IFS
18579  test -z "$as_dir" && as_dir=.
18580    for ac_exec_ext in '' $ac_executable_extensions; do
18581  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18582    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18583    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18584    break 2
18585  fi
18586done
18587  done
18588IFS=$as_save_IFS
18589
18590  ;;
18591esac
18592fi
18593DSYMUTIL=$ac_cv_path_DSYMUTIL
18594if test -n "$DSYMUTIL"; then
18595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18596$as_echo "$DSYMUTIL" >&6; }
18597else
18598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18599$as_echo "no" >&6; }
18600fi
18601
18602
18603  test -n "$DSYMUTIL" && break
18604done
18605
18606  else
18607    # The variable is set, but is it from the command line or the environment?
18608
18609    # Try to remove the string !DSYMUTIL! from our list.
18610    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18611    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18612      # If it failed, the variable was not from the command line. Ignore it,
18613      # but warn the user (except for BASH, which is always set by the calling BASH).
18614      if test "xDSYMUTIL" != xBASH; then
18615        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18616$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18617      fi
18618      # Try to locate tool using the code snippet
18619      for ac_prog in dsymutil
18620do
18621  # Extract the first word of "$ac_prog", so it can be a program name with args.
18622set dummy $ac_prog; ac_word=$2
18623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18624$as_echo_n "checking for $ac_word... " >&6; }
18625if ${ac_cv_path_DSYMUTIL+:} false; then :
18626  $as_echo_n "(cached) " >&6
18627else
18628  case $DSYMUTIL in
18629  [\\/]* | ?:[\\/]*)
18630  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18631  ;;
18632  *)
18633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18634for as_dir in $PATH
18635do
18636  IFS=$as_save_IFS
18637  test -z "$as_dir" && as_dir=.
18638    for ac_exec_ext in '' $ac_executable_extensions; do
18639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18640    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18642    break 2
18643  fi
18644done
18645  done
18646IFS=$as_save_IFS
18647
18648  ;;
18649esac
18650fi
18651DSYMUTIL=$ac_cv_path_DSYMUTIL
18652if test -n "$DSYMUTIL"; then
18653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18654$as_echo "$DSYMUTIL" >&6; }
18655else
18656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18657$as_echo "no" >&6; }
18658fi
18659
18660
18661  test -n "$DSYMUTIL" && break
18662done
18663
18664    else
18665      # If it succeeded, then it was overridden by the user. We will use it
18666      # for the tool.
18667
18668      # First remove it from the list of overridden variables, so we can test
18669      # for unknown variables in the end.
18670      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18671
18672      # Check if the provided tool contains a complete path.
18673      tool_specified="$DSYMUTIL"
18674      tool_basename="${tool_specified##*/}"
18675      if test "x$tool_basename" = "x$tool_specified"; then
18676        # A command without a complete path is provided, search $PATH.
18677        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18678$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18679        # Extract the first word of "$tool_basename", so it can be a program name with args.
18680set dummy $tool_basename; ac_word=$2
18681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18682$as_echo_n "checking for $ac_word... " >&6; }
18683if ${ac_cv_path_DSYMUTIL+:} false; then :
18684  $as_echo_n "(cached) " >&6
18685else
18686  case $DSYMUTIL in
18687  [\\/]* | ?:[\\/]*)
18688  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18689  ;;
18690  *)
18691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18692for as_dir in $PATH
18693do
18694  IFS=$as_save_IFS
18695  test -z "$as_dir" && as_dir=.
18696    for ac_exec_ext in '' $ac_executable_extensions; do
18697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18698    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18700    break 2
18701  fi
18702done
18703  done
18704IFS=$as_save_IFS
18705
18706  ;;
18707esac
18708fi
18709DSYMUTIL=$ac_cv_path_DSYMUTIL
18710if test -n "$DSYMUTIL"; then
18711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18712$as_echo "$DSYMUTIL" >&6; }
18713else
18714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18715$as_echo "no" >&6; }
18716fi
18717
18718
18719        if test "x$DSYMUTIL" = x; then
18720          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18721        fi
18722      else
18723        # Otherwise we believe it is a complete path. Use it as it is.
18724        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18725$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18727$as_echo_n "checking for DSYMUTIL... " >&6; }
18728        if test ! -x "$tool_specified"; then
18729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18730$as_echo "not found" >&6; }
18731          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18732        fi
18733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18734$as_echo "$tool_specified" >&6; }
18735      fi
18736    fi
18737  fi
18738
18739
18740
18741  if test "x$DSYMUTIL" = x; then
18742    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18743  fi
18744
18745
18746
18747
18748
18749  # Publish this variable in the help.
18750
18751
18752  if test "x$XATTR" = x; then
18753    # The variable is not set by user, try to locate tool using the code snippet
18754    for ac_prog in xattr
18755do
18756  # Extract the first word of "$ac_prog", so it can be a program name with args.
18757set dummy $ac_prog; ac_word=$2
18758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18759$as_echo_n "checking for $ac_word... " >&6; }
18760if ${ac_cv_path_XATTR+:} false; then :
18761  $as_echo_n "(cached) " >&6
18762else
18763  case $XATTR in
18764  [\\/]* | ?:[\\/]*)
18765  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18766  ;;
18767  *)
18768  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18769for as_dir in $PATH
18770do
18771  IFS=$as_save_IFS
18772  test -z "$as_dir" && as_dir=.
18773    for ac_exec_ext in '' $ac_executable_extensions; do
18774  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18775    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18776    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18777    break 2
18778  fi
18779done
18780  done
18781IFS=$as_save_IFS
18782
18783  ;;
18784esac
18785fi
18786XATTR=$ac_cv_path_XATTR
18787if test -n "$XATTR"; then
18788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18789$as_echo "$XATTR" >&6; }
18790else
18791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18792$as_echo "no" >&6; }
18793fi
18794
18795
18796  test -n "$XATTR" && break
18797done
18798
18799  else
18800    # The variable is set, but is it from the command line or the environment?
18801
18802    # Try to remove the string !XATTR! from our list.
18803    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18804    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18805      # If it failed, the variable was not from the command line. Ignore it,
18806      # but warn the user (except for BASH, which is always set by the calling BASH).
18807      if test "xXATTR" != xBASH; then
18808        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18809$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18810      fi
18811      # Try to locate tool using the code snippet
18812      for ac_prog in xattr
18813do
18814  # Extract the first word of "$ac_prog", so it can be a program name with args.
18815set dummy $ac_prog; ac_word=$2
18816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18817$as_echo_n "checking for $ac_word... " >&6; }
18818if ${ac_cv_path_XATTR+:} false; then :
18819  $as_echo_n "(cached) " >&6
18820else
18821  case $XATTR in
18822  [\\/]* | ?:[\\/]*)
18823  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18824  ;;
18825  *)
18826  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18827for as_dir in $PATH
18828do
18829  IFS=$as_save_IFS
18830  test -z "$as_dir" && as_dir=.
18831    for ac_exec_ext in '' $ac_executable_extensions; do
18832  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18833    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18834    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18835    break 2
18836  fi
18837done
18838  done
18839IFS=$as_save_IFS
18840
18841  ;;
18842esac
18843fi
18844XATTR=$ac_cv_path_XATTR
18845if test -n "$XATTR"; then
18846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18847$as_echo "$XATTR" >&6; }
18848else
18849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18850$as_echo "no" >&6; }
18851fi
18852
18853
18854  test -n "$XATTR" && break
18855done
18856
18857    else
18858      # If it succeeded, then it was overridden by the user. We will use it
18859      # for the tool.
18860
18861      # First remove it from the list of overridden variables, so we can test
18862      # for unknown variables in the end.
18863      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18864
18865      # Check if the provided tool contains a complete path.
18866      tool_specified="$XATTR"
18867      tool_basename="${tool_specified##*/}"
18868      if test "x$tool_basename" = "x$tool_specified"; then
18869        # A command without a complete path is provided, search $PATH.
18870        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18871$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18872        # Extract the first word of "$tool_basename", so it can be a program name with args.
18873set dummy $tool_basename; ac_word=$2
18874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18875$as_echo_n "checking for $ac_word... " >&6; }
18876if ${ac_cv_path_XATTR+:} false; then :
18877  $as_echo_n "(cached) " >&6
18878else
18879  case $XATTR in
18880  [\\/]* | ?:[\\/]*)
18881  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18882  ;;
18883  *)
18884  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18885for as_dir in $PATH
18886do
18887  IFS=$as_save_IFS
18888  test -z "$as_dir" && as_dir=.
18889    for ac_exec_ext in '' $ac_executable_extensions; do
18890  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18891    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18892    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18893    break 2
18894  fi
18895done
18896  done
18897IFS=$as_save_IFS
18898
18899  ;;
18900esac
18901fi
18902XATTR=$ac_cv_path_XATTR
18903if test -n "$XATTR"; then
18904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18905$as_echo "$XATTR" >&6; }
18906else
18907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18908$as_echo "no" >&6; }
18909fi
18910
18911
18912        if test "x$XATTR" = x; then
18913          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18914        fi
18915      else
18916        # Otherwise we believe it is a complete path. Use it as it is.
18917        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18918$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18919        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18920$as_echo_n "checking for XATTR... " >&6; }
18921        if test ! -x "$tool_specified"; then
18922          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18923$as_echo "not found" >&6; }
18924          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18925        fi
18926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18927$as_echo "$tool_specified" >&6; }
18928      fi
18929    fi
18930  fi
18931
18932
18933
18934  if test "x$XATTR" = x; then
18935    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18936  fi
18937
18938
18939
18940
18941  # Publish this variable in the help.
18942
18943
18944  if test "x$CODESIGN" = x; then
18945    # The variable is not set by user, try to locate tool using the code snippet
18946    for ac_prog in codesign
18947do
18948  # Extract the first word of "$ac_prog", so it can be a program name with args.
18949set dummy $ac_prog; ac_word=$2
18950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18951$as_echo_n "checking for $ac_word... " >&6; }
18952if ${ac_cv_path_CODESIGN+:} false; then :
18953  $as_echo_n "(cached) " >&6
18954else
18955  case $CODESIGN in
18956  [\\/]* | ?:[\\/]*)
18957  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18958  ;;
18959  *)
18960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18961for as_dir in $PATH
18962do
18963  IFS=$as_save_IFS
18964  test -z "$as_dir" && as_dir=.
18965    for ac_exec_ext in '' $ac_executable_extensions; do
18966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18967    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18969    break 2
18970  fi
18971done
18972  done
18973IFS=$as_save_IFS
18974
18975  ;;
18976esac
18977fi
18978CODESIGN=$ac_cv_path_CODESIGN
18979if test -n "$CODESIGN"; then
18980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18981$as_echo "$CODESIGN" >&6; }
18982else
18983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18984$as_echo "no" >&6; }
18985fi
18986
18987
18988  test -n "$CODESIGN" && break
18989done
18990
18991  else
18992    # The variable is set, but is it from the command line or the environment?
18993
18994    # Try to remove the string !CODESIGN! from our list.
18995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18997      # If it failed, the variable was not from the command line. Ignore it,
18998      # but warn the user (except for BASH, which is always set by the calling BASH).
18999      if test "xCODESIGN" != xBASH; then
19000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19001$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19002      fi
19003      # Try to locate tool using the code snippet
19004      for ac_prog in codesign
19005do
19006  # Extract the first word of "$ac_prog", so it can be a program name with args.
19007set dummy $ac_prog; ac_word=$2
19008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19009$as_echo_n "checking for $ac_word... " >&6; }
19010if ${ac_cv_path_CODESIGN+:} false; then :
19011  $as_echo_n "(cached) " >&6
19012else
19013  case $CODESIGN in
19014  [\\/]* | ?:[\\/]*)
19015  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19016  ;;
19017  *)
19018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19019for as_dir in $PATH
19020do
19021  IFS=$as_save_IFS
19022  test -z "$as_dir" && as_dir=.
19023    for ac_exec_ext in '' $ac_executable_extensions; do
19024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19025    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19027    break 2
19028  fi
19029done
19030  done
19031IFS=$as_save_IFS
19032
19033  ;;
19034esac
19035fi
19036CODESIGN=$ac_cv_path_CODESIGN
19037if test -n "$CODESIGN"; then
19038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19039$as_echo "$CODESIGN" >&6; }
19040else
19041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19042$as_echo "no" >&6; }
19043fi
19044
19045
19046  test -n "$CODESIGN" && break
19047done
19048
19049    else
19050      # If it succeeded, then it was overridden by the user. We will use it
19051      # for the tool.
19052
19053      # First remove it from the list of overridden variables, so we can test
19054      # for unknown variables in the end.
19055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19056
19057      # Check if the provided tool contains a complete path.
19058      tool_specified="$CODESIGN"
19059      tool_basename="${tool_specified##*/}"
19060      if test "x$tool_basename" = "x$tool_specified"; then
19061        # A command without a complete path is provided, search $PATH.
19062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19063$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19064        # Extract the first word of "$tool_basename", so it can be a program name with args.
19065set dummy $tool_basename; ac_word=$2
19066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19067$as_echo_n "checking for $ac_word... " >&6; }
19068if ${ac_cv_path_CODESIGN+:} false; then :
19069  $as_echo_n "(cached) " >&6
19070else
19071  case $CODESIGN in
19072  [\\/]* | ?:[\\/]*)
19073  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19074  ;;
19075  *)
19076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19077for as_dir in $PATH
19078do
19079  IFS=$as_save_IFS
19080  test -z "$as_dir" && as_dir=.
19081    for ac_exec_ext in '' $ac_executable_extensions; do
19082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19083    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19085    break 2
19086  fi
19087done
19088  done
19089IFS=$as_save_IFS
19090
19091  ;;
19092esac
19093fi
19094CODESIGN=$ac_cv_path_CODESIGN
19095if test -n "$CODESIGN"; then
19096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19097$as_echo "$CODESIGN" >&6; }
19098else
19099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19100$as_echo "no" >&6; }
19101fi
19102
19103
19104        if test "x$CODESIGN" = x; then
19105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19106        fi
19107      else
19108        # Otherwise we believe it is a complete path. Use it as it is.
19109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19110$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19112$as_echo_n "checking for CODESIGN... " >&6; }
19113        if test ! -x "$tool_specified"; then
19114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19115$as_echo "not found" >&6; }
19116          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19117        fi
19118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19119$as_echo "$tool_specified" >&6; }
19120      fi
19121    fi
19122  fi
19123
19124
19125    if test "x$CODESIGN" != "x"; then
19126      # Verify that the openjdk_codesign certificate is present
19127      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19128$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19129      rm -f codesign-testfile
19130      touch codesign-testfile
19131      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19132      rm -f codesign-testfile
19133      if test "x$CODESIGN" = x; then
19134        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19135$as_echo "no" >&6; }
19136      else
19137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19138$as_echo "yes" >&6; }
19139      fi
19140    fi
19141  fi
19142
19143
19144# Check if pkg-config is available.
19145
19146
19147if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19148	if test -n "$ac_tool_prefix"; then
19149  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19150set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19152$as_echo_n "checking for $ac_word... " >&6; }
19153if ${ac_cv_path_PKG_CONFIG+:} false; then :
19154  $as_echo_n "(cached) " >&6
19155else
19156  case $PKG_CONFIG in
19157  [\\/]* | ?:[\\/]*)
19158  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19159  ;;
19160  *)
19161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19162for as_dir in $PATH
19163do
19164  IFS=$as_save_IFS
19165  test -z "$as_dir" && as_dir=.
19166    for ac_exec_ext in '' $ac_executable_extensions; do
19167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19168    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19170    break 2
19171  fi
19172done
19173  done
19174IFS=$as_save_IFS
19175
19176  ;;
19177esac
19178fi
19179PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19180if test -n "$PKG_CONFIG"; then
19181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19182$as_echo "$PKG_CONFIG" >&6; }
19183else
19184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19185$as_echo "no" >&6; }
19186fi
19187
19188
19189fi
19190if test -z "$ac_cv_path_PKG_CONFIG"; then
19191  ac_pt_PKG_CONFIG=$PKG_CONFIG
19192  # Extract the first word of "pkg-config", so it can be a program name with args.
19193set dummy pkg-config; ac_word=$2
19194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19195$as_echo_n "checking for $ac_word... " >&6; }
19196if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19197  $as_echo_n "(cached) " >&6
19198else
19199  case $ac_pt_PKG_CONFIG in
19200  [\\/]* | ?:[\\/]*)
19201  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19202  ;;
19203  *)
19204  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19205for as_dir in $PATH
19206do
19207  IFS=$as_save_IFS
19208  test -z "$as_dir" && as_dir=.
19209    for ac_exec_ext in '' $ac_executable_extensions; do
19210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19211    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19213    break 2
19214  fi
19215done
19216  done
19217IFS=$as_save_IFS
19218
19219  ;;
19220esac
19221fi
19222ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19223if test -n "$ac_pt_PKG_CONFIG"; then
19224  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19225$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19226else
19227  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19228$as_echo "no" >&6; }
19229fi
19230
19231  if test "x$ac_pt_PKG_CONFIG" = x; then
19232    PKG_CONFIG=""
19233  else
19234    case $cross_compiling:$ac_tool_warned in
19235yes:)
19236{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19237$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19238ac_tool_warned=yes ;;
19239esac
19240    PKG_CONFIG=$ac_pt_PKG_CONFIG
19241  fi
19242else
19243  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19244fi
19245
19246fi
19247if test -n "$PKG_CONFIG"; then
19248	_pkg_min_version=0.9.0
19249	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19250$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19251	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19252		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19253$as_echo "yes" >&6; }
19254	else
19255		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19256$as_echo "no" >&6; }
19257		PKG_CONFIG=""
19258	fi
19259
19260fi
19261
19262# After basic tools have been setup, we can check build os specific details.
19263
19264  ###############################################################################
19265
19266  # Note that this is the build platform OS version!
19267
19268  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19269  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19270  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19271  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19272
19273
19274
19275
19276
19277# Setup builddeps, for automatic downloading of tools we need.
19278# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19279# boot-jdk setup, but we need to have basic tools setup first.
19280
19281
19282# Check whether --with-builddeps-conf was given.
19283if test "${with_builddeps_conf+set}" = set; then :
19284  withval=$with_builddeps_conf;
19285fi
19286
19287
19288
19289# Check whether --with-builddeps-server was given.
19290if test "${with_builddeps_server+set}" = set; then :
19291  withval=$with_builddeps_server;
19292fi
19293
19294
19295
19296# Check whether --with-builddeps-dir was given.
19297if test "${with_builddeps_dir+set}" = set; then :
19298  withval=$with_builddeps_dir;
19299else
19300  with_builddeps_dir=/localhome/builddeps
19301fi
19302
19303
19304
19305# Check whether --with-builddeps-group was given.
19306if test "${with_builddeps_group+set}" = set; then :
19307  withval=$with_builddeps_group;
19308fi
19309
19310
19311
19312
19313  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19314    if test "x$with_builddeps_conf" != x; then
19315      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19316$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19317      builddepsfile=$with_builddeps_conf
19318      if test -s $builddepsfile; then
19319        . $builddepsfile
19320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19321$as_echo "loaded!" >&6; }
19322      else
19323        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19324      fi
19325    else
19326      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19327$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19328      builddepsfile=`mktemp`
19329      touch $builddepsfile
19330      # Put all found confs into a single file.
19331      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19332      # Source the file to acquire the variables
19333      if test -s $builddepsfile; then
19334        . $builddepsfile
19335        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19336$as_echo "found at least one!" >&6; }
19337      else
19338        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19339      fi
19340    fi
19341    # Create build and target names that use _ instead of "-" and ".".
19342    # This is necessary to use them in variable names.
19343    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19344    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19345    # Extract rewrite information for build and target
19346    eval rewritten_build=\${REWRITE_${build_var}}
19347    if test "x$rewritten_build" = x; then
19348      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19349      echo Build stays the same $rewritten_build
19350    else
19351      echo Rewriting build for builddeps into $rewritten_build
19352    fi
19353    eval rewritten_target=\${REWRITE_${target_var}}
19354    if test "x$rewritten_target" = x; then
19355      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19356      echo Target stays the same $rewritten_target
19357    else
19358      echo Rewriting target for builddeps into $rewritten_target
19359    fi
19360    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19361    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19362  fi
19363  for ac_prog in 7z unzip
19364do
19365  # Extract the first word of "$ac_prog", so it can be a program name with args.
19366set dummy $ac_prog; ac_word=$2
19367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19368$as_echo_n "checking for $ac_word... " >&6; }
19369if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19370  $as_echo_n "(cached) " >&6
19371else
19372  if test -n "$BDEPS_UNZIP"; then
19373  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19374else
19375as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19376for as_dir in $PATH
19377do
19378  IFS=$as_save_IFS
19379  test -z "$as_dir" && as_dir=.
19380    for ac_exec_ext in '' $ac_executable_extensions; do
19381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19382    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19384    break 2
19385  fi
19386done
19387  done
19388IFS=$as_save_IFS
19389
19390fi
19391fi
19392BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19393if test -n "$BDEPS_UNZIP"; then
19394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19395$as_echo "$BDEPS_UNZIP" >&6; }
19396else
19397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19398$as_echo "no" >&6; }
19399fi
19400
19401
19402  test -n "$BDEPS_UNZIP" && break
19403done
19404
19405  if test "x$BDEPS_UNZIP" = x7z; then
19406    BDEPS_UNZIP="7z x"
19407  fi
19408
19409  for ac_prog in wget lftp ftp
19410do
19411  # Extract the first word of "$ac_prog", so it can be a program name with args.
19412set dummy $ac_prog; ac_word=$2
19413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19414$as_echo_n "checking for $ac_word... " >&6; }
19415if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19416  $as_echo_n "(cached) " >&6
19417else
19418  if test -n "$BDEPS_FTP"; then
19419  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19420else
19421as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19422for as_dir in $PATH
19423do
19424  IFS=$as_save_IFS
19425  test -z "$as_dir" && as_dir=.
19426    for ac_exec_ext in '' $ac_executable_extensions; do
19427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19428    ac_cv_prog_BDEPS_FTP="$ac_prog"
19429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19430    break 2
19431  fi
19432done
19433  done
19434IFS=$as_save_IFS
19435
19436fi
19437fi
19438BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19439if test -n "$BDEPS_FTP"; then
19440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19441$as_echo "$BDEPS_FTP" >&6; }
19442else
19443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19444$as_echo "no" >&6; }
19445fi
19446
19447
19448  test -n "$BDEPS_FTP" && break
19449done
19450
19451
19452
19453###############################################################################
19454#
19455# Determine OpenJDK variants, options and version numbers.
19456#
19457###############################################################################
19458
19459# We need build & target for this.
19460
19461
19462  ###############################################################################
19463  #
19464  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19465  # We always build headless support.
19466  #
19467  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19468$as_echo_n "checking headful support... " >&6; }
19469  # Check whether --enable-headful was given.
19470if test "${enable_headful+set}" = set; then :
19471  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19472else
19473  SUPPORT_HEADFUL=yes
19474fi
19475
19476
19477  SUPPORT_HEADLESS=yes
19478  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19479
19480  if test "x$SUPPORT_HEADFUL" = xyes; then
19481    # We are building both headful and headless.
19482    headful_msg="include support for both headful and headless"
19483  fi
19484
19485  if test "x$SUPPORT_HEADFUL" = xno; then
19486    # Thus we are building headless only.
19487    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19488    headful_msg="headless only"
19489  fi
19490
19491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19492$as_echo "$headful_msg" >&6; }
19493
19494
19495
19496
19497
19498  # Control wether Hotspot runs Queens test after build.
19499  # Check whether --enable-hotspot-test-in-build was given.
19500if test "${enable_hotspot_test_in_build+set}" = set; then :
19501  enableval=$enable_hotspot_test_in_build;
19502else
19503  enable_hotspot_test_in_build=no
19504fi
19505
19506  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19507    TEST_IN_BUILD=true
19508  else
19509    TEST_IN_BUILD=false
19510  fi
19511
19512
19513  ###############################################################################
19514  #
19515  # Choose cacerts source file
19516  #
19517
19518# Check whether --with-cacerts-file was given.
19519if test "${with_cacerts_file+set}" = set; then :
19520  withval=$with_cacerts_file;
19521fi
19522
19523  if test "x$with_cacerts_file" != x; then
19524    CACERTS_FILE=$with_cacerts_file
19525  else
19526    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19527  fi
19528
19529
19530  ###############################################################################
19531  #
19532  # Enable or disable unlimited crypto
19533  #
19534  # Check whether --enable-unlimited-crypto was given.
19535if test "${enable_unlimited_crypto+set}" = set; then :
19536  enableval=$enable_unlimited_crypto;
19537else
19538  enable_unlimited_crypto=no
19539fi
19540
19541  if test "x$enable_unlimited_crypto" = "xyes"; then
19542    UNLIMITED_CRYPTO=true
19543  else
19544    UNLIMITED_CRYPTO=false
19545  fi
19546
19547
19548  ###############################################################################
19549  #
19550  # Enable or disable the elliptic curve crypto implementation
19551  #
19552
19553
19554  ###############################################################################
19555  #
19556  # --enable-rmiconnector-iiop
19557  #
19558  # Check whether --enable-rmiconnector-iiop was given.
19559if test "${enable_rmiconnector_iiop+set}" = set; then :
19560  enableval=$enable_rmiconnector_iiop;
19561fi
19562
19563  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19564    RMICONNECTOR_IIOP=true
19565  else
19566    RMICONNECTOR_IIOP=false
19567  fi
19568
19569
19570  ###############################################################################
19571  #
19572  # Compress jars
19573  #
19574  COMPRESS_JARS=false
19575
19576
19577
19578
19579  # Source the version numbers
19580  . $AUTOCONF_DIR/version-numbers
19581
19582  # Get the settings from parameters
19583
19584# Check whether --with-milestone was given.
19585if test "${with_milestone+set}" = set; then :
19586  withval=$with_milestone;
19587fi
19588
19589  if test "x$with_milestone" = xyes; then
19590    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19591  elif test "x$with_milestone" != x; then
19592    MILESTONE="$with_milestone"
19593  fi
19594  if test "x$MILESTONE" = x; then
19595    MILESTONE=internal
19596  fi
19597
19598
19599# Check whether --with-update-version was given.
19600if test "${with_update_version+set}" = set; then :
19601  withval=$with_update_version;
19602fi
19603
19604  if test "x$with_update_version" = xyes; then
19605    as_fn_error $? "Update version must have a value" "$LINENO" 5
19606  elif test "x$with_update_version" != x; then
19607    JDK_UPDATE_VERSION="$with_update_version"
19608    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19609    # to a bug in expr (which reduces it to just X). To work around this, we
19610    # always add a 0 to one digit update versions.
19611    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19612      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19613    fi
19614  fi
19615
19616
19617# Check whether --with-user-release-suffix was given.
19618if test "${with_user_release_suffix+set}" = set; then :
19619  withval=$with_user_release_suffix;
19620fi
19621
19622  if test "x$with_user_release_suffix" = xyes; then
19623    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19624  elif test "x$with_user_release_suffix" != x; then
19625    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19626  fi
19627
19628
19629# Check whether --with-build-number was given.
19630if test "${with_build_number+set}" = set; then :
19631  withval=$with_build_number;
19632fi
19633
19634  if test "x$with_build_number" = xyes; then
19635    as_fn_error $? "Build number must have a value" "$LINENO" 5
19636  elif test "x$with_build_number" != x; then
19637    JDK_BUILD_NUMBER="$with_build_number"
19638  fi
19639  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19640  if test "x$JDK_BUILD_NUMBER" = x; then
19641    JDK_BUILD_NUMBER=b00
19642    if test "x$USER_RELEASE_SUFFIX" = x; then
19643      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19644      # Avoid [:alnum:] since it depends on the locale.
19645      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19646      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19647    fi
19648  fi
19649
19650  # Now set the JDK version, milestone, build number etc.
19651
19652
19653
19654
19655
19656
19657
19658
19659
19660
19661
19662
19663
19664
19665
19666  COPYRIGHT_YEAR=`date +'%Y'`
19667
19668
19669  if test "x$JDK_UPDATE_VERSION" != x; then
19670    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19671  else
19672    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19673  fi
19674
19675
19676  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19677
19678
19679
19680###############################################################################
19681#
19682# Setup BootJDK, used to bootstrap the build.
19683#
19684###############################################################################
19685
19686
19687  BOOT_JDK_FOUND=no
19688
19689# Check whether --with-boot-jdk was given.
19690if test "${with_boot_jdk+set}" = set; then :
19691  withval=$with_boot_jdk;
19692fi
19693
19694
19695  # We look for the Boot JDK through various means, going from more certain to
19696  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19697  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19698  # must check if this is indeed valid; otherwise we'll continue looking.
19699
19700  # Test: Is bootjdk explicitely set by command line arguments?
19701
19702  if test "x$BOOT_JDK_FOUND" = xno; then
19703    # Now execute the test
19704
19705  if test "x$with_boot_jdk" != x; then
19706    BOOT_JDK=$with_boot_jdk
19707    BOOT_JDK_FOUND=maybe
19708    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19709$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19710  fi
19711
19712
19713    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19714    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19715      # Do we have a bin/java?
19716      if test ! -x "$BOOT_JDK/bin/java"; then
19717        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19719        BOOT_JDK_FOUND=no
19720      else
19721        # Do we have a bin/javac?
19722        if test ! -x "$BOOT_JDK/bin/javac"; then
19723          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19725          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19726$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19727          BOOT_JDK_FOUND=no
19728        else
19729          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19730          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19731            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19733            BOOT_JDK_FOUND=no
19734          else
19735            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19736            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19737
19738            # Extra M4 quote needed to protect [] in grep expression.
19739            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19740            if test "x$FOUND_CORRECT_VERSION" = x; then
19741              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19742$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19743              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19744$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19745              BOOT_JDK_FOUND=no
19746            else
19747              # We're done! :-)
19748              BOOT_JDK_FOUND=yes
19749
19750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19751
19752  # Input might be given as Windows format, start by converting to
19753  # unix format.
19754  path="$BOOT_JDK"
19755  new_path=`$CYGPATH -u "$path"`
19756
19757  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19758  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19759  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19760  # "foo.exe" is OK but "foo" is an error.
19761  #
19762  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19763  # It is also a way to make sure we got the proper file name for the real test later on.
19764  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19765  if test "x$test_shortpath" = x; then
19766    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19767$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19768    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19769  fi
19770
19771  # Call helper function which possibly converts this using DOS-style short mode.
19772  # If so, the updated path is stored in $new_path.
19773
19774  input_path="$new_path"
19775  # Check if we need to convert this using DOS-style short mode. If the path
19776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19777  # take no chances and rewrite it.
19778  # Note: m4 eats our [], so we need to use [ and ] instead.
19779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19780  if test "x$has_forbidden_chars" != x; then
19781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19782    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19783    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19784    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19785      # Going to short mode and back again did indeed matter. Since short mode is
19786      # case insensitive, let's make it lowercase to improve readability.
19787      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19788      # Now convert it back to Unix-stile (cygpath)
19789      input_path=`$CYGPATH -u "$shortmode_path"`
19790      new_path="$input_path"
19791    fi
19792  fi
19793
19794  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19795  if test "x$test_cygdrive_prefix" = x; then
19796    # As a simple fix, exclude /usr/bin since it's not a real path.
19797    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19798      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19799      # a path prefixed by /cygdrive for fixpath to work.
19800      new_path="$CYGWIN_ROOT_PATH$input_path"
19801    fi
19802  fi
19803
19804
19805  if test "x$path" != "x$new_path"; then
19806    BOOT_JDK="$new_path"
19807    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19808$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19809  fi
19810
19811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19812
19813  path="$BOOT_JDK"
19814  has_colon=`$ECHO $path | $GREP ^.:`
19815  new_path="$path"
19816  if test "x$has_colon" = x; then
19817    # Not in mixed or Windows style, start by that.
19818    new_path=`cmd //c echo $path`
19819  fi
19820
19821
19822  input_path="$new_path"
19823  # Check if we need to convert this using DOS-style short mode. If the path
19824  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19825  # take no chances and rewrite it.
19826  # Note: m4 eats our [], so we need to use [ and ] instead.
19827  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19828  if test "x$has_forbidden_chars" != x; then
19829    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19830    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19831  fi
19832
19833
19834  windows_path="$new_path"
19835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19836    unix_path=`$CYGPATH -u "$windows_path"`
19837    new_path="$unix_path"
19838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19839    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19840    new_path="$unix_path"
19841  fi
19842
19843  if test "x$path" != "x$new_path"; then
19844    BOOT_JDK="$new_path"
19845    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19846$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19847  fi
19848
19849  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19850  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19851
19852  else
19853    # We're on a posix platform. Hooray! :)
19854    path="$BOOT_JDK"
19855    has_space=`$ECHO "$path" | $GREP " "`
19856    if test "x$has_space" != x; then
19857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19858$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19859      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19860    fi
19861
19862    # Use eval to expand a potential ~
19863    eval path="$path"
19864    if test ! -f "$path" && test ! -d "$path"; then
19865      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19866    fi
19867
19868    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19869  fi
19870
19871              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19872$as_echo_n "checking for Boot JDK... " >&6; }
19873              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19874$as_echo "$BOOT_JDK" >&6; }
19875              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19876$as_echo_n "checking Boot JDK version... " >&6; }
19877              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19878              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19879$as_echo "$BOOT_JDK_VERSION" >&6; }
19880            fi # end check jdk version
19881          fi # end check rt.jar
19882        fi # end check javac
19883      fi # end check java
19884    fi # end check boot jdk found
19885  fi
19886
19887  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19888    # Having specified an argument which is incorrect will produce an instant failure;
19889    # we should not go on looking
19890    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19891  fi
19892
19893  # Test: Is bootjdk available from builddeps?
19894
19895  if test "x$BOOT_JDK_FOUND" = xno; then
19896    # Now execute the test
19897
19898
19899
19900  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19901    # Source the builddeps file again, to make sure it uses the latest variables!
19902    . $builddepsfile
19903    # Look for a target and build machine specific resource!
19904    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19905    if test "x$resource" = x; then
19906      # Ok, lets instead look for a target specific resource
19907      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19908    fi
19909    if test "x$resource" = x; then
19910      # Ok, lets instead look for a build specific resource
19911      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19912    fi
19913    if test "x$resource" = x; then
19914      # Ok, lets instead look for a generic resource
19915      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19916      resource=${builddep_bootjdk}
19917    fi
19918    if test "x$resource" != x; then
19919      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19920$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19921      # If the resource in the builddeps.conf file is an existing directory,
19922      # for example /java/linux/cups
19923      if test -d ${resource}; then
19924        depdir=${resource}
19925      else
19926
19927  # bootjdk is for example mymodule
19928  # $resource is for example libs/general/libmymod_1_2_3.zip
19929  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19930  # $with_builddeps_dir is for example /localhome/builddeps
19931  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19932  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19933  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19934  filename=`basename $resource`
19935  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19936  filebase=${filename%%.*}
19937  extension=${filename#*.}
19938  installdir=$with_builddeps_dir/$filebase
19939  if test ! -f $installdir/$filename.unpacked; then
19940    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19941$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19942    if test ! -d $installdir; then
19943      mkdir -p $installdir
19944    fi
19945    if test ! -d $installdir; then
19946      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19947    fi
19948    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19949    touch $tmpfile
19950    if test ! -f $tmpfile; then
19951      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19952    fi
19953
19954  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19955  # $tmpfile is the local file name for the downloaded file.
19956  VALID_TOOL=no
19957  if test "x$BDEPS_FTP" = xwget; then
19958    VALID_TOOL=yes
19959    wget -O $tmpfile $with_builddeps_server/$resource
19960  fi
19961  if test "x$BDEPS_FTP" = xlftp; then
19962    VALID_TOOL=yes
19963    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19964  fi
19965  if test "x$BDEPS_FTP" = xftp; then
19966    VALID_TOOL=yes
19967    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19968    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19969    FTPUSERPWD=${FTPSERVER%%@*}
19970    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19971      FTPUSER=${userpwd%%:*}
19972      FTPPWD=${userpwd#*@}
19973      FTPSERVER=${FTPSERVER#*@}
19974    else
19975      FTPUSER=ftp
19976      FTPPWD=ftp
19977    fi
19978    # the "pass" command does not work on some
19979    # ftp clients (read ftp.exe) but if it works,
19980    # passive mode is better!
19981    ( \
19982        echo "user $FTPUSER $FTPPWD"        ; \
19983        echo "pass"                         ; \
19984        echo "bin"                          ; \
19985        echo "get $FTPPATH $tmpfile"              ; \
19986    ) | ftp -in $FTPSERVER
19987  fi
19988  if test "x$VALID_TOOL" != xyes; then
19989    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19990  fi
19991
19992    mv $tmpfile $installdir/$filename
19993    if test ! -s $installdir/$filename; then
19994      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19995    fi
19996    case "$extension" in
19997      zip)  echo "Unzipping $installdir/$filename..."
19998        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19999        ;;
20000      tar.gz) echo "Untaring $installdir/$filename..."
20001        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20002        ;;
20003      tgz) echo "Untaring $installdir/$filename..."
20004        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20005        ;;
20006      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20007        ;;
20008    esac
20009  fi
20010  if test -f $installdir/$filename.unpacked; then
20011    depdir=$installdir
20012  fi
20013
20014      fi
20015      # Source the builddeps file again, because in the previous command, the depdir
20016      # was updated to point at the current build dependency install directory.
20017      . $builddepsfile
20018      # Now extract variables from the builddeps.conf files.
20019      theroot=${builddep_bootjdk_ROOT}
20020      thecflags=${builddep_bootjdk_CFLAGS}
20021      thelibs=${builddep_bootjdk_LIBS}
20022      if test "x$depdir" = x; then
20023        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20024      fi
20025      BOOT_JDK=$depdir
20026      if test "x$theroot" != x; then
20027        BOOT_JDK="$theroot"
20028      fi
20029      if test "x$thecflags" != x; then
20030        BOOT_JDK_CFLAGS="$thecflags"
20031      fi
20032      if test "x$thelibs" != x; then
20033        BOOT_JDK_LIBS="$thelibs"
20034      fi
20035      BOOT_JDK_FOUND=maybe
20036      else BOOT_JDK_FOUND=no
20037
20038    fi
20039    else BOOT_JDK_FOUND=no
20040
20041  fi
20042
20043
20044
20045    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20046    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20047      # Do we have a bin/java?
20048      if test ! -x "$BOOT_JDK/bin/java"; then
20049        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20050$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20051        BOOT_JDK_FOUND=no
20052      else
20053        # Do we have a bin/javac?
20054        if test ! -x "$BOOT_JDK/bin/javac"; then
20055          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20057          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20058$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20059          BOOT_JDK_FOUND=no
20060        else
20061          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20062          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20063            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20065            BOOT_JDK_FOUND=no
20066          else
20067            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20068            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20069
20070            # Extra M4 quote needed to protect [] in grep expression.
20071            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20072            if test "x$FOUND_CORRECT_VERSION" = x; then
20073              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20074$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20075              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20076$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20077              BOOT_JDK_FOUND=no
20078            else
20079              # We're done! :-)
20080              BOOT_JDK_FOUND=yes
20081
20082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20083
20084  # Input might be given as Windows format, start by converting to
20085  # unix format.
20086  path="$BOOT_JDK"
20087  new_path=`$CYGPATH -u "$path"`
20088
20089  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20090  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20091  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20092  # "foo.exe" is OK but "foo" is an error.
20093  #
20094  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20095  # It is also a way to make sure we got the proper file name for the real test later on.
20096  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20097  if test "x$test_shortpath" = x; then
20098    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20099$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20100    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20101  fi
20102
20103  # Call helper function which possibly converts this using DOS-style short mode.
20104  # If so, the updated path is stored in $new_path.
20105
20106  input_path="$new_path"
20107  # Check if we need to convert this using DOS-style short mode. If the path
20108  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20109  # take no chances and rewrite it.
20110  # Note: m4 eats our [], so we need to use [ and ] instead.
20111  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20112  if test "x$has_forbidden_chars" != x; then
20113    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20114    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20115    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20116    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20117      # Going to short mode and back again did indeed matter. Since short mode is
20118      # case insensitive, let's make it lowercase to improve readability.
20119      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20120      # Now convert it back to Unix-stile (cygpath)
20121      input_path=`$CYGPATH -u "$shortmode_path"`
20122      new_path="$input_path"
20123    fi
20124  fi
20125
20126  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20127  if test "x$test_cygdrive_prefix" = x; then
20128    # As a simple fix, exclude /usr/bin since it's not a real path.
20129    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20130      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20131      # a path prefixed by /cygdrive for fixpath to work.
20132      new_path="$CYGWIN_ROOT_PATH$input_path"
20133    fi
20134  fi
20135
20136
20137  if test "x$path" != "x$new_path"; then
20138    BOOT_JDK="$new_path"
20139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20140$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20141  fi
20142
20143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20144
20145  path="$BOOT_JDK"
20146  has_colon=`$ECHO $path | $GREP ^.:`
20147  new_path="$path"
20148  if test "x$has_colon" = x; then
20149    # Not in mixed or Windows style, start by that.
20150    new_path=`cmd //c echo $path`
20151  fi
20152
20153
20154  input_path="$new_path"
20155  # Check if we need to convert this using DOS-style short mode. If the path
20156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20157  # take no chances and rewrite it.
20158  # Note: m4 eats our [], so we need to use [ and ] instead.
20159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20160  if test "x$has_forbidden_chars" != x; then
20161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20162    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20163  fi
20164
20165
20166  windows_path="$new_path"
20167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20168    unix_path=`$CYGPATH -u "$windows_path"`
20169    new_path="$unix_path"
20170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20171    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20172    new_path="$unix_path"
20173  fi
20174
20175  if test "x$path" != "x$new_path"; then
20176    BOOT_JDK="$new_path"
20177    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20178$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20179  fi
20180
20181  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20182  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20183
20184  else
20185    # We're on a posix platform. Hooray! :)
20186    path="$BOOT_JDK"
20187    has_space=`$ECHO "$path" | $GREP " "`
20188    if test "x$has_space" != x; then
20189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20191      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20192    fi
20193
20194    # Use eval to expand a potential ~
20195    eval path="$path"
20196    if test ! -f "$path" && test ! -d "$path"; then
20197      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20198    fi
20199
20200    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20201  fi
20202
20203              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20204$as_echo_n "checking for Boot JDK... " >&6; }
20205              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20206$as_echo "$BOOT_JDK" >&6; }
20207              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20208$as_echo_n "checking Boot JDK version... " >&6; }
20209              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20210              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20211$as_echo "$BOOT_JDK_VERSION" >&6; }
20212            fi # end check jdk version
20213          fi # end check rt.jar
20214        fi # end check javac
20215      fi # end check java
20216    fi # end check boot jdk found
20217  fi
20218
20219
20220  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20221
20222  if test "x$BOOT_JDK_FOUND" = xno; then
20223    # Now execute the test
20224
20225  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20226    # First check at user selected default
20227
20228  if test "x$BOOT_JDK_FOUND" = xno; then
20229    # Now execute the test
20230
20231  if test -x /usr/libexec/java_home; then
20232    BOOT_JDK=`/usr/libexec/java_home `
20233    BOOT_JDK_FOUND=maybe
20234    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20235$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20236  fi
20237
20238
20239    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20240    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20241      # Do we have a bin/java?
20242      if test ! -x "$BOOT_JDK/bin/java"; then
20243        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20245        BOOT_JDK_FOUND=no
20246      else
20247        # Do we have a bin/javac?
20248        if test ! -x "$BOOT_JDK/bin/javac"; then
20249          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20251          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20252$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20253          BOOT_JDK_FOUND=no
20254        else
20255          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20256          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20257            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20259            BOOT_JDK_FOUND=no
20260          else
20261            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20262            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20263
20264            # Extra M4 quote needed to protect [] in grep expression.
20265            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20266            if test "x$FOUND_CORRECT_VERSION" = x; then
20267              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20269              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20270$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20271              BOOT_JDK_FOUND=no
20272            else
20273              # We're done! :-)
20274              BOOT_JDK_FOUND=yes
20275
20276  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20277
20278  # Input might be given as Windows format, start by converting to
20279  # unix format.
20280  path="$BOOT_JDK"
20281  new_path=`$CYGPATH -u "$path"`
20282
20283  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20284  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20285  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20286  # "foo.exe" is OK but "foo" is an error.
20287  #
20288  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20289  # It is also a way to make sure we got the proper file name for the real test later on.
20290  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20291  if test "x$test_shortpath" = x; then
20292    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20293$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20294    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20295  fi
20296
20297  # Call helper function which possibly converts this using DOS-style short mode.
20298  # If so, the updated path is stored in $new_path.
20299
20300  input_path="$new_path"
20301  # Check if we need to convert this using DOS-style short mode. If the path
20302  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20303  # take no chances and rewrite it.
20304  # Note: m4 eats our [], so we need to use [ and ] instead.
20305  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20306  if test "x$has_forbidden_chars" != x; then
20307    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20308    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20309    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20310    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20311      # Going to short mode and back again did indeed matter. Since short mode is
20312      # case insensitive, let's make it lowercase to improve readability.
20313      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20314      # Now convert it back to Unix-stile (cygpath)
20315      input_path=`$CYGPATH -u "$shortmode_path"`
20316      new_path="$input_path"
20317    fi
20318  fi
20319
20320  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20321  if test "x$test_cygdrive_prefix" = x; then
20322    # As a simple fix, exclude /usr/bin since it's not a real path.
20323    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20324      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20325      # a path prefixed by /cygdrive for fixpath to work.
20326      new_path="$CYGWIN_ROOT_PATH$input_path"
20327    fi
20328  fi
20329
20330
20331  if test "x$path" != "x$new_path"; then
20332    BOOT_JDK="$new_path"
20333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20335  fi
20336
20337  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20338
20339  path="$BOOT_JDK"
20340  has_colon=`$ECHO $path | $GREP ^.:`
20341  new_path="$path"
20342  if test "x$has_colon" = x; then
20343    # Not in mixed or Windows style, start by that.
20344    new_path=`cmd //c echo $path`
20345  fi
20346
20347
20348  input_path="$new_path"
20349  # Check if we need to convert this using DOS-style short mode. If the path
20350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20351  # take no chances and rewrite it.
20352  # Note: m4 eats our [], so we need to use [ and ] instead.
20353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20354  if test "x$has_forbidden_chars" != x; then
20355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20357  fi
20358
20359
20360  windows_path="$new_path"
20361  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20362    unix_path=`$CYGPATH -u "$windows_path"`
20363    new_path="$unix_path"
20364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20365    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20366    new_path="$unix_path"
20367  fi
20368
20369  if test "x$path" != "x$new_path"; then
20370    BOOT_JDK="$new_path"
20371    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20372$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20373  fi
20374
20375  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20376  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20377
20378  else
20379    # We're on a posix platform. Hooray! :)
20380    path="$BOOT_JDK"
20381    has_space=`$ECHO "$path" | $GREP " "`
20382    if test "x$has_space" != x; then
20383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20385      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20386    fi
20387
20388    # Use eval to expand a potential ~
20389    eval path="$path"
20390    if test ! -f "$path" && test ! -d "$path"; then
20391      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20392    fi
20393
20394    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20395  fi
20396
20397              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20398$as_echo_n "checking for Boot JDK... " >&6; }
20399              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20400$as_echo "$BOOT_JDK" >&6; }
20401              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20402$as_echo_n "checking Boot JDK version... " >&6; }
20403              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20404              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20405$as_echo "$BOOT_JDK_VERSION" >&6; }
20406            fi # end check jdk version
20407          fi # end check rt.jar
20408        fi # end check javac
20409      fi # end check java
20410    fi # end check boot jdk found
20411  fi
20412
20413    # If that did not work out (e.g. too old), try explicit versions instead
20414
20415  if test "x$BOOT_JDK_FOUND" = xno; then
20416    # Now execute the test
20417
20418  if test -x /usr/libexec/java_home; then
20419    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20420    BOOT_JDK_FOUND=maybe
20421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20422$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20423  fi
20424
20425
20426    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20427    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20428      # Do we have a bin/java?
20429      if test ! -x "$BOOT_JDK/bin/java"; then
20430        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20431$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20432        BOOT_JDK_FOUND=no
20433      else
20434        # Do we have a bin/javac?
20435        if test ! -x "$BOOT_JDK/bin/javac"; then
20436          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20437$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20438          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20439$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20440          BOOT_JDK_FOUND=no
20441        else
20442          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20443          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20444            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20446            BOOT_JDK_FOUND=no
20447          else
20448            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20449            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20450
20451            # Extra M4 quote needed to protect [] in grep expression.
20452            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20453            if test "x$FOUND_CORRECT_VERSION" = x; then
20454              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20456              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20457$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20458              BOOT_JDK_FOUND=no
20459            else
20460              # We're done! :-)
20461              BOOT_JDK_FOUND=yes
20462
20463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20464
20465  # Input might be given as Windows format, start by converting to
20466  # unix format.
20467  path="$BOOT_JDK"
20468  new_path=`$CYGPATH -u "$path"`
20469
20470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20473  # "foo.exe" is OK but "foo" is an error.
20474  #
20475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20476  # It is also a way to make sure we got the proper file name for the real test later on.
20477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20478  if test "x$test_shortpath" = x; then
20479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20482  fi
20483
20484  # Call helper function which possibly converts this using DOS-style short mode.
20485  # If so, the updated path is stored in $new_path.
20486
20487  input_path="$new_path"
20488  # Check if we need to convert this using DOS-style short mode. If the path
20489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20490  # take no chances and rewrite it.
20491  # Note: m4 eats our [], so we need to use [ and ] instead.
20492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20493  if test "x$has_forbidden_chars" != x; then
20494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20498      # Going to short mode and back again did indeed matter. Since short mode is
20499      # case insensitive, let's make it lowercase to improve readability.
20500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20501      # Now convert it back to Unix-stile (cygpath)
20502      input_path=`$CYGPATH -u "$shortmode_path"`
20503      new_path="$input_path"
20504    fi
20505  fi
20506
20507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20508  if test "x$test_cygdrive_prefix" = x; then
20509    # As a simple fix, exclude /usr/bin since it's not a real path.
20510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20512      # a path prefixed by /cygdrive for fixpath to work.
20513      new_path="$CYGWIN_ROOT_PATH$input_path"
20514    fi
20515  fi
20516
20517
20518  if test "x$path" != "x$new_path"; then
20519    BOOT_JDK="$new_path"
20520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20522  fi
20523
20524  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20525
20526  path="$BOOT_JDK"
20527  has_colon=`$ECHO $path | $GREP ^.:`
20528  new_path="$path"
20529  if test "x$has_colon" = x; then
20530    # Not in mixed or Windows style, start by that.
20531    new_path=`cmd //c echo $path`
20532  fi
20533
20534
20535  input_path="$new_path"
20536  # Check if we need to convert this using DOS-style short mode. If the path
20537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20538  # take no chances and rewrite it.
20539  # Note: m4 eats our [], so we need to use [ and ] instead.
20540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20541  if test "x$has_forbidden_chars" != x; then
20542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20544  fi
20545
20546
20547  windows_path="$new_path"
20548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20549    unix_path=`$CYGPATH -u "$windows_path"`
20550    new_path="$unix_path"
20551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20553    new_path="$unix_path"
20554  fi
20555
20556  if test "x$path" != "x$new_path"; then
20557    BOOT_JDK="$new_path"
20558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20560  fi
20561
20562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20564
20565  else
20566    # We're on a posix platform. Hooray! :)
20567    path="$BOOT_JDK"
20568    has_space=`$ECHO "$path" | $GREP " "`
20569    if test "x$has_space" != x; then
20570      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20572      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20573    fi
20574
20575    # Use eval to expand a potential ~
20576    eval path="$path"
20577    if test ! -f "$path" && test ! -d "$path"; then
20578      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20579    fi
20580
20581    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20582  fi
20583
20584              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20585$as_echo_n "checking for Boot JDK... " >&6; }
20586              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20587$as_echo "$BOOT_JDK" >&6; }
20588              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20589$as_echo_n "checking Boot JDK version... " >&6; }
20590              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20591              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20592$as_echo "$BOOT_JDK_VERSION" >&6; }
20593            fi # end check jdk version
20594          fi # end check rt.jar
20595        fi # end check javac
20596      fi # end check java
20597    fi # end check boot jdk found
20598  fi
20599
20600
20601  if test "x$BOOT_JDK_FOUND" = xno; then
20602    # Now execute the test
20603
20604  if test -x /usr/libexec/java_home; then
20605    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20606    BOOT_JDK_FOUND=maybe
20607    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20608$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20609  fi
20610
20611
20612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20614      # Do we have a bin/java?
20615      if test ! -x "$BOOT_JDK/bin/java"; then
20616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20618        BOOT_JDK_FOUND=no
20619      else
20620        # Do we have a bin/javac?
20621        if test ! -x "$BOOT_JDK/bin/javac"; then
20622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20626          BOOT_JDK_FOUND=no
20627        else
20628          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20629          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20632            BOOT_JDK_FOUND=no
20633          else
20634            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20636
20637            # Extra M4 quote needed to protect [] in grep expression.
20638            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20639            if test "x$FOUND_CORRECT_VERSION" = x; then
20640              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20642              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20643$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20644              BOOT_JDK_FOUND=no
20645            else
20646              # We're done! :-)
20647              BOOT_JDK_FOUND=yes
20648
20649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20650
20651  # Input might be given as Windows format, start by converting to
20652  # unix format.
20653  path="$BOOT_JDK"
20654  new_path=`$CYGPATH -u "$path"`
20655
20656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20659  # "foo.exe" is OK but "foo" is an error.
20660  #
20661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20662  # It is also a way to make sure we got the proper file name for the real test later on.
20663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20664  if test "x$test_shortpath" = x; then
20665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20668  fi
20669
20670  # Call helper function which possibly converts this using DOS-style short mode.
20671  # If so, the updated path is stored in $new_path.
20672
20673  input_path="$new_path"
20674  # Check if we need to convert this using DOS-style short mode. If the path
20675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20676  # take no chances and rewrite it.
20677  # Note: m4 eats our [], so we need to use [ and ] instead.
20678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20679  if test "x$has_forbidden_chars" != x; then
20680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20684      # Going to short mode and back again did indeed matter. Since short mode is
20685      # case insensitive, let's make it lowercase to improve readability.
20686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20687      # Now convert it back to Unix-stile (cygpath)
20688      input_path=`$CYGPATH -u "$shortmode_path"`
20689      new_path="$input_path"
20690    fi
20691  fi
20692
20693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20694  if test "x$test_cygdrive_prefix" = x; then
20695    # As a simple fix, exclude /usr/bin since it's not a real path.
20696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20698      # a path prefixed by /cygdrive for fixpath to work.
20699      new_path="$CYGWIN_ROOT_PATH$input_path"
20700    fi
20701  fi
20702
20703
20704  if test "x$path" != "x$new_path"; then
20705    BOOT_JDK="$new_path"
20706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20708  fi
20709
20710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20711
20712  path="$BOOT_JDK"
20713  has_colon=`$ECHO $path | $GREP ^.:`
20714  new_path="$path"
20715  if test "x$has_colon" = x; then
20716    # Not in mixed or Windows style, start by that.
20717    new_path=`cmd //c echo $path`
20718  fi
20719
20720
20721  input_path="$new_path"
20722  # Check if we need to convert this using DOS-style short mode. If the path
20723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20724  # take no chances and rewrite it.
20725  # Note: m4 eats our [], so we need to use [ and ] instead.
20726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20727  if test "x$has_forbidden_chars" != x; then
20728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20730  fi
20731
20732
20733  windows_path="$new_path"
20734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20735    unix_path=`$CYGPATH -u "$windows_path"`
20736    new_path="$unix_path"
20737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20739    new_path="$unix_path"
20740  fi
20741
20742  if test "x$path" != "x$new_path"; then
20743    BOOT_JDK="$new_path"
20744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20746  fi
20747
20748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20750
20751  else
20752    # We're on a posix platform. Hooray! :)
20753    path="$BOOT_JDK"
20754    has_space=`$ECHO "$path" | $GREP " "`
20755    if test "x$has_space" != x; then
20756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20758      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20759    fi
20760
20761    # Use eval to expand a potential ~
20762    eval path="$path"
20763    if test ! -f "$path" && test ! -d "$path"; then
20764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20765    fi
20766
20767    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20768  fi
20769
20770              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20771$as_echo_n "checking for Boot JDK... " >&6; }
20772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20773$as_echo "$BOOT_JDK" >&6; }
20774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20775$as_echo_n "checking Boot JDK version... " >&6; }
20776              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20778$as_echo "$BOOT_JDK_VERSION" >&6; }
20779            fi # end check jdk version
20780          fi # end check rt.jar
20781        fi # end check javac
20782      fi # end check java
20783    fi # end check boot jdk found
20784  fi
20785
20786
20787  if test "x$BOOT_JDK_FOUND" = xno; then
20788    # Now execute the test
20789
20790  if test -x /usr/libexec/java_home; then
20791    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20792    BOOT_JDK_FOUND=maybe
20793    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20794$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20795  fi
20796
20797
20798    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20799    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20800      # Do we have a bin/java?
20801      if test ! -x "$BOOT_JDK/bin/java"; then
20802        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20804        BOOT_JDK_FOUND=no
20805      else
20806        # Do we have a bin/javac?
20807        if test ! -x "$BOOT_JDK/bin/javac"; then
20808          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20809$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20810          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20811$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20812          BOOT_JDK_FOUND=no
20813        else
20814          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20815          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20816            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20818            BOOT_JDK_FOUND=no
20819          else
20820            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20821            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20822
20823            # Extra M4 quote needed to protect [] in grep expression.
20824            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20825            if test "x$FOUND_CORRECT_VERSION" = x; then
20826              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20828              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20829$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20830              BOOT_JDK_FOUND=no
20831            else
20832              # We're done! :-)
20833              BOOT_JDK_FOUND=yes
20834
20835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20836
20837  # Input might be given as Windows format, start by converting to
20838  # unix format.
20839  path="$BOOT_JDK"
20840  new_path=`$CYGPATH -u "$path"`
20841
20842  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20843  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20844  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20845  # "foo.exe" is OK but "foo" is an error.
20846  #
20847  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20848  # It is also a way to make sure we got the proper file name for the real test later on.
20849  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20850  if test "x$test_shortpath" = x; then
20851    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20852$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20853    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20854  fi
20855
20856  # Call helper function which possibly converts this using DOS-style short mode.
20857  # If so, the updated path is stored in $new_path.
20858
20859  input_path="$new_path"
20860  # Check if we need to convert this using DOS-style short mode. If the path
20861  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20862  # take no chances and rewrite it.
20863  # Note: m4 eats our [], so we need to use [ and ] instead.
20864  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20865  if test "x$has_forbidden_chars" != x; then
20866    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20867    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20868    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20869    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20870      # Going to short mode and back again did indeed matter. Since short mode is
20871      # case insensitive, let's make it lowercase to improve readability.
20872      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20873      # Now convert it back to Unix-stile (cygpath)
20874      input_path=`$CYGPATH -u "$shortmode_path"`
20875      new_path="$input_path"
20876    fi
20877  fi
20878
20879  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20880  if test "x$test_cygdrive_prefix" = x; then
20881    # As a simple fix, exclude /usr/bin since it's not a real path.
20882    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20883      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20884      # a path prefixed by /cygdrive for fixpath to work.
20885      new_path="$CYGWIN_ROOT_PATH$input_path"
20886    fi
20887  fi
20888
20889
20890  if test "x$path" != "x$new_path"; then
20891    BOOT_JDK="$new_path"
20892    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20893$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20894  fi
20895
20896  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20897
20898  path="$BOOT_JDK"
20899  has_colon=`$ECHO $path | $GREP ^.:`
20900  new_path="$path"
20901  if test "x$has_colon" = x; then
20902    # Not in mixed or Windows style, start by that.
20903    new_path=`cmd //c echo $path`
20904  fi
20905
20906
20907  input_path="$new_path"
20908  # Check if we need to convert this using DOS-style short mode. If the path
20909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20910  # take no chances and rewrite it.
20911  # Note: m4 eats our [], so we need to use [ and ] instead.
20912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20913  if test "x$has_forbidden_chars" != x; then
20914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20916  fi
20917
20918
20919  windows_path="$new_path"
20920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20921    unix_path=`$CYGPATH -u "$windows_path"`
20922    new_path="$unix_path"
20923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20925    new_path="$unix_path"
20926  fi
20927
20928  if test "x$path" != "x$new_path"; then
20929    BOOT_JDK="$new_path"
20930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20932  fi
20933
20934  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20935  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20936
20937  else
20938    # We're on a posix platform. Hooray! :)
20939    path="$BOOT_JDK"
20940    has_space=`$ECHO "$path" | $GREP " "`
20941    if test "x$has_space" != x; then
20942      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20943$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20944      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20945    fi
20946
20947    # Use eval to expand a potential ~
20948    eval path="$path"
20949    if test ! -f "$path" && test ! -d "$path"; then
20950      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20951    fi
20952
20953    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20954  fi
20955
20956              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20957$as_echo_n "checking for Boot JDK... " >&6; }
20958              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20959$as_echo "$BOOT_JDK" >&6; }
20960              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20961$as_echo_n "checking Boot JDK version... " >&6; }
20962              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20963              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20964$as_echo "$BOOT_JDK_VERSION" >&6; }
20965            fi # end check jdk version
20966          fi # end check rt.jar
20967        fi # end check javac
20968      fi # end check java
20969    fi # end check boot jdk found
20970  fi
20971
20972  fi
20973
20974
20975    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20976    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20977      # Do we have a bin/java?
20978      if test ! -x "$BOOT_JDK/bin/java"; then
20979        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20980$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20981        BOOT_JDK_FOUND=no
20982      else
20983        # Do we have a bin/javac?
20984        if test ! -x "$BOOT_JDK/bin/javac"; then
20985          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20987          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20988$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20989          BOOT_JDK_FOUND=no
20990        else
20991          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20992          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20993            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20995            BOOT_JDK_FOUND=no
20996          else
20997            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20998            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20999
21000            # Extra M4 quote needed to protect [] in grep expression.
21001            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21002            if test "x$FOUND_CORRECT_VERSION" = x; then
21003              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21005              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21006$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21007              BOOT_JDK_FOUND=no
21008            else
21009              # We're done! :-)
21010              BOOT_JDK_FOUND=yes
21011
21012  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21013
21014  # Input might be given as Windows format, start by converting to
21015  # unix format.
21016  path="$BOOT_JDK"
21017  new_path=`$CYGPATH -u "$path"`
21018
21019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21022  # "foo.exe" is OK but "foo" is an error.
21023  #
21024  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21025  # It is also a way to make sure we got the proper file name for the real test later on.
21026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21027  if test "x$test_shortpath" = x; then
21028    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21029$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21030    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21031  fi
21032
21033  # Call helper function which possibly converts this using DOS-style short mode.
21034  # If so, the updated path is stored in $new_path.
21035
21036  input_path="$new_path"
21037  # Check if we need to convert this using DOS-style short mode. If the path
21038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21039  # take no chances and rewrite it.
21040  # Note: m4 eats our [], so we need to use [ and ] instead.
21041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21042  if test "x$has_forbidden_chars" != x; then
21043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21047      # Going to short mode and back again did indeed matter. Since short mode is
21048      # case insensitive, let's make it lowercase to improve readability.
21049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21050      # Now convert it back to Unix-stile (cygpath)
21051      input_path=`$CYGPATH -u "$shortmode_path"`
21052      new_path="$input_path"
21053    fi
21054  fi
21055
21056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21057  if test "x$test_cygdrive_prefix" = x; then
21058    # As a simple fix, exclude /usr/bin since it's not a real path.
21059    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21061      # a path prefixed by /cygdrive for fixpath to work.
21062      new_path="$CYGWIN_ROOT_PATH$input_path"
21063    fi
21064  fi
21065
21066
21067  if test "x$path" != "x$new_path"; then
21068    BOOT_JDK="$new_path"
21069    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21070$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21071  fi
21072
21073  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21074
21075  path="$BOOT_JDK"
21076  has_colon=`$ECHO $path | $GREP ^.:`
21077  new_path="$path"
21078  if test "x$has_colon" = x; then
21079    # Not in mixed or Windows style, start by that.
21080    new_path=`cmd //c echo $path`
21081  fi
21082
21083
21084  input_path="$new_path"
21085  # Check if we need to convert this using DOS-style short mode. If the path
21086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21087  # take no chances and rewrite it.
21088  # Note: m4 eats our [], so we need to use [ and ] instead.
21089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21090  if test "x$has_forbidden_chars" != x; then
21091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21092    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21093  fi
21094
21095
21096  windows_path="$new_path"
21097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21098    unix_path=`$CYGPATH -u "$windows_path"`
21099    new_path="$unix_path"
21100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21102    new_path="$unix_path"
21103  fi
21104
21105  if test "x$path" != "x$new_path"; then
21106    BOOT_JDK="$new_path"
21107    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21108$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21109  fi
21110
21111  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21112  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21113
21114  else
21115    # We're on a posix platform. Hooray! :)
21116    path="$BOOT_JDK"
21117    has_space=`$ECHO "$path" | $GREP " "`
21118    if test "x$has_space" != x; then
21119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21120$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21121      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21122    fi
21123
21124    # Use eval to expand a potential ~
21125    eval path="$path"
21126    if test ! -f "$path" && test ! -d "$path"; then
21127      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21128    fi
21129
21130    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21131  fi
21132
21133              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21134$as_echo_n "checking for Boot JDK... " >&6; }
21135              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21136$as_echo "$BOOT_JDK" >&6; }
21137              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21138$as_echo_n "checking Boot JDK version... " >&6; }
21139              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21140              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21141$as_echo "$BOOT_JDK_VERSION" >&6; }
21142            fi # end check jdk version
21143          fi # end check rt.jar
21144        fi # end check javac
21145      fi # end check java
21146    fi # end check boot jdk found
21147  fi
21148
21149
21150  # Test: Is $JAVA_HOME set?
21151
21152  if test "x$BOOT_JDK_FOUND" = xno; then
21153    # Now execute the test
21154
21155  if test "x$JAVA_HOME" != x; then
21156    JAVA_HOME_PROCESSED="$JAVA_HOME"
21157
21158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21159
21160  # Input might be given as Windows format, start by converting to
21161  # unix format.
21162  path="$JAVA_HOME_PROCESSED"
21163  new_path=`$CYGPATH -u "$path"`
21164
21165  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21166  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21167  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21168  # "foo.exe" is OK but "foo" is an error.
21169  #
21170  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21171  # It is also a way to make sure we got the proper file name for the real test later on.
21172  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21173  if test "x$test_shortpath" = x; then
21174    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21175$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21176    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21177  fi
21178
21179  # Call helper function which possibly converts this using DOS-style short mode.
21180  # If so, the updated path is stored in $new_path.
21181
21182  input_path="$new_path"
21183  # Check if we need to convert this using DOS-style short mode. If the path
21184  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21185  # take no chances and rewrite it.
21186  # Note: m4 eats our [], so we need to use [ and ] instead.
21187  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21188  if test "x$has_forbidden_chars" != x; then
21189    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21190    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21191    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21192    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21193      # Going to short mode and back again did indeed matter. Since short mode is
21194      # case insensitive, let's make it lowercase to improve readability.
21195      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21196      # Now convert it back to Unix-stile (cygpath)
21197      input_path=`$CYGPATH -u "$shortmode_path"`
21198      new_path="$input_path"
21199    fi
21200  fi
21201
21202  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21203  if test "x$test_cygdrive_prefix" = x; then
21204    # As a simple fix, exclude /usr/bin since it's not a real path.
21205    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21206      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21207      # a path prefixed by /cygdrive for fixpath to work.
21208      new_path="$CYGWIN_ROOT_PATH$input_path"
21209    fi
21210  fi
21211
21212
21213  if test "x$path" != "x$new_path"; then
21214    JAVA_HOME_PROCESSED="$new_path"
21215    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21216$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21217  fi
21218
21219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21220
21221  path="$JAVA_HOME_PROCESSED"
21222  has_colon=`$ECHO $path | $GREP ^.:`
21223  new_path="$path"
21224  if test "x$has_colon" = x; then
21225    # Not in mixed or Windows style, start by that.
21226    new_path=`cmd //c echo $path`
21227  fi
21228
21229
21230  input_path="$new_path"
21231  # Check if we need to convert this using DOS-style short mode. If the path
21232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21233  # take no chances and rewrite it.
21234  # Note: m4 eats our [], so we need to use [ and ] instead.
21235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21236  if test "x$has_forbidden_chars" != x; then
21237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21238    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21239  fi
21240
21241
21242  windows_path="$new_path"
21243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21244    unix_path=`$CYGPATH -u "$windows_path"`
21245    new_path="$unix_path"
21246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21248    new_path="$unix_path"
21249  fi
21250
21251  if test "x$path" != "x$new_path"; then
21252    JAVA_HOME_PROCESSED="$new_path"
21253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21254$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21255  fi
21256
21257  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21258  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21259
21260  else
21261    # We're on a posix platform. Hooray! :)
21262    path="$JAVA_HOME_PROCESSED"
21263    has_space=`$ECHO "$path" | $GREP " "`
21264    if test "x$has_space" != x; then
21265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21266$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21267      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21268    fi
21269
21270    # Use eval to expand a potential ~
21271    eval path="$path"
21272    if test ! -f "$path" && test ! -d "$path"; then
21273      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21274    fi
21275
21276    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21277  fi
21278
21279    if test ! -d "$JAVA_HOME_PROCESSED"; then
21280      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21281$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21282    else
21283      # Aha, the user has set a JAVA_HOME
21284      # let us use that as the Boot JDK.
21285      BOOT_JDK="$JAVA_HOME_PROCESSED"
21286      BOOT_JDK_FOUND=maybe
21287      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21288$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21289    fi
21290  fi
21291
21292
21293    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21294    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21295      # Do we have a bin/java?
21296      if test ! -x "$BOOT_JDK/bin/java"; then
21297        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21298$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21299        BOOT_JDK_FOUND=no
21300      else
21301        # Do we have a bin/javac?
21302        if test ! -x "$BOOT_JDK/bin/javac"; then
21303          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21304$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21305          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21306$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21307          BOOT_JDK_FOUND=no
21308        else
21309          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21310          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21311            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21313            BOOT_JDK_FOUND=no
21314          else
21315            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21316            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21317
21318            # Extra M4 quote needed to protect [] in grep expression.
21319            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21320            if test "x$FOUND_CORRECT_VERSION" = x; then
21321              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21322$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21323              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21324$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21325              BOOT_JDK_FOUND=no
21326            else
21327              # We're done! :-)
21328              BOOT_JDK_FOUND=yes
21329
21330  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21331
21332  # Input might be given as Windows format, start by converting to
21333  # unix format.
21334  path="$BOOT_JDK"
21335  new_path=`$CYGPATH -u "$path"`
21336
21337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21340  # "foo.exe" is OK but "foo" is an error.
21341  #
21342  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21343  # It is also a way to make sure we got the proper file name for the real test later on.
21344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21345  if test "x$test_shortpath" = x; then
21346    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21347$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21348    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21349  fi
21350
21351  # Call helper function which possibly converts this using DOS-style short mode.
21352  # If so, the updated path is stored in $new_path.
21353
21354  input_path="$new_path"
21355  # Check if we need to convert this using DOS-style short mode. If the path
21356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21357  # take no chances and rewrite it.
21358  # Note: m4 eats our [], so we need to use [ and ] instead.
21359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21360  if test "x$has_forbidden_chars" != x; then
21361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21362    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21363    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21364    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21365      # Going to short mode and back again did indeed matter. Since short mode is
21366      # case insensitive, let's make it lowercase to improve readability.
21367      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21368      # Now convert it back to Unix-stile (cygpath)
21369      input_path=`$CYGPATH -u "$shortmode_path"`
21370      new_path="$input_path"
21371    fi
21372  fi
21373
21374  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21375  if test "x$test_cygdrive_prefix" = x; then
21376    # As a simple fix, exclude /usr/bin since it's not a real path.
21377    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21378      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21379      # a path prefixed by /cygdrive for fixpath to work.
21380      new_path="$CYGWIN_ROOT_PATH$input_path"
21381    fi
21382  fi
21383
21384
21385  if test "x$path" != "x$new_path"; then
21386    BOOT_JDK="$new_path"
21387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21388$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21389  fi
21390
21391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21392
21393  path="$BOOT_JDK"
21394  has_colon=`$ECHO $path | $GREP ^.:`
21395  new_path="$path"
21396  if test "x$has_colon" = x; then
21397    # Not in mixed or Windows style, start by that.
21398    new_path=`cmd //c echo $path`
21399  fi
21400
21401
21402  input_path="$new_path"
21403  # Check if we need to convert this using DOS-style short mode. If the path
21404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21405  # take no chances and rewrite it.
21406  # Note: m4 eats our [], so we need to use [ and ] instead.
21407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21408  if test "x$has_forbidden_chars" != x; then
21409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21410    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21411  fi
21412
21413
21414  windows_path="$new_path"
21415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21416    unix_path=`$CYGPATH -u "$windows_path"`
21417    new_path="$unix_path"
21418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21420    new_path="$unix_path"
21421  fi
21422
21423  if test "x$path" != "x$new_path"; then
21424    BOOT_JDK="$new_path"
21425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21426$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21427  fi
21428
21429  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21430  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21431
21432  else
21433    # We're on a posix platform. Hooray! :)
21434    path="$BOOT_JDK"
21435    has_space=`$ECHO "$path" | $GREP " "`
21436    if test "x$has_space" != x; then
21437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21438$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21439      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21440    fi
21441
21442    # Use eval to expand a potential ~
21443    eval path="$path"
21444    if test ! -f "$path" && test ! -d "$path"; then
21445      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21446    fi
21447
21448    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21449  fi
21450
21451              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21452$as_echo_n "checking for Boot JDK... " >&6; }
21453              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21454$as_echo "$BOOT_JDK" >&6; }
21455              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21456$as_echo_n "checking Boot JDK version... " >&6; }
21457              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21458              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21459$as_echo "$BOOT_JDK_VERSION" >&6; }
21460            fi # end check jdk version
21461          fi # end check rt.jar
21462        fi # end check javac
21463      fi # end check java
21464    fi # end check boot jdk found
21465  fi
21466
21467
21468  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21469
21470  if test "x$BOOT_JDK_FOUND" = xno; then
21471    # Now execute the test
21472
21473  # Extract the first word of "javac", so it can be a program name with args.
21474set dummy javac; ac_word=$2
21475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21476$as_echo_n "checking for $ac_word... " >&6; }
21477if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21478  $as_echo_n "(cached) " >&6
21479else
21480  case $JAVAC_CHECK in
21481  [\\/]* | ?:[\\/]*)
21482  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21483  ;;
21484  *)
21485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21486for as_dir in $PATH
21487do
21488  IFS=$as_save_IFS
21489  test -z "$as_dir" && as_dir=.
21490    for ac_exec_ext in '' $ac_executable_extensions; do
21491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21492    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21494    break 2
21495  fi
21496done
21497  done
21498IFS=$as_save_IFS
21499
21500  ;;
21501esac
21502fi
21503JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21504if test -n "$JAVAC_CHECK"; then
21505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21506$as_echo "$JAVAC_CHECK" >&6; }
21507else
21508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21509$as_echo "no" >&6; }
21510fi
21511
21512
21513  # Extract the first word of "java", so it can be a program name with args.
21514set dummy java; ac_word=$2
21515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21516$as_echo_n "checking for $ac_word... " >&6; }
21517if ${ac_cv_path_JAVA_CHECK+:} false; then :
21518  $as_echo_n "(cached) " >&6
21519else
21520  case $JAVA_CHECK in
21521  [\\/]* | ?:[\\/]*)
21522  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21523  ;;
21524  *)
21525  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21526for as_dir in $PATH
21527do
21528  IFS=$as_save_IFS
21529  test -z "$as_dir" && as_dir=.
21530    for ac_exec_ext in '' $ac_executable_extensions; do
21531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21532    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21534    break 2
21535  fi
21536done
21537  done
21538IFS=$as_save_IFS
21539
21540  ;;
21541esac
21542fi
21543JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21544if test -n "$JAVA_CHECK"; then
21545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21546$as_echo "$JAVA_CHECK" >&6; }
21547else
21548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21549$as_echo "no" >&6; }
21550fi
21551
21552
21553  BINARY="$JAVAC_CHECK"
21554  if test "x$JAVAC_CHECK" = x; then
21555    BINARY="$JAVA_CHECK"
21556  fi
21557  if test "x$BINARY" != x; then
21558    # So there is a java(c) binary, it might be part of a JDK.
21559    # Lets find the JDK/JRE directory by following symbolic links.
21560    # Linux/GNU systems often have links from /usr/bin/java to
21561    # /etc/alternatives/java to the real JDK binary.
21562
21563  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21564    # Follow a chain of symbolic links. Use readlink
21565    # where it exists, else fall back to horribly
21566    # complicated shell code.
21567    if test "x$READLINK_TESTED" != yes; then
21568      # On MacOSX there is a readlink tool with a different
21569      # purpose than the GNU readlink tool. Check the found readlink.
21570      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21571      if test "x$ISGNU" = x; then
21572        # A readlink that we do not know how to use.
21573        # Are there other non-GNU readlinks out there?
21574        READLINK_TESTED=yes
21575        READLINK=
21576      fi
21577    fi
21578
21579    if test "x$READLINK" != x; then
21580      BINARY=`$READLINK -f $BINARY`
21581    else
21582      # Save the current directory for restoring afterwards
21583      STARTDIR=$PWD
21584      COUNTER=0
21585      sym_link_dir=`$DIRNAME $BINARY`
21586      sym_link_file=`$BASENAME $BINARY`
21587      cd $sym_link_dir
21588      # Use -P flag to resolve symlinks in directories.
21589      cd `$THEPWDCMD -P`
21590      sym_link_dir=`$THEPWDCMD -P`
21591      # Resolve file symlinks
21592      while test $COUNTER -lt 20; do
21593        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21594        if test "x$ISLINK" == x; then
21595          # This is not a symbolic link! We are done!
21596          break
21597        fi
21598        # Again resolve directory symlinks since the target of the just found
21599        # link could be in a different directory
21600        cd `$DIRNAME $ISLINK`
21601        sym_link_dir=`$THEPWDCMD -P`
21602        sym_link_file=`$BASENAME $ISLINK`
21603        let COUNTER=COUNTER+1
21604      done
21605      cd $STARTDIR
21606      BINARY=$sym_link_dir/$sym_link_file
21607    fi
21608  fi
21609
21610    BOOT_JDK=`dirname "$BINARY"`
21611    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21612    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21613      # Looks like we found ourselves an JDK
21614      BOOT_JDK_FOUND=maybe
21615      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21616$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21617    fi
21618  fi
21619
21620
21621    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21622    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21623      # Do we have a bin/java?
21624      if test ! -x "$BOOT_JDK/bin/java"; then
21625        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21626$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21627        BOOT_JDK_FOUND=no
21628      else
21629        # Do we have a bin/javac?
21630        if test ! -x "$BOOT_JDK/bin/javac"; then
21631          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21632$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21633          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21634$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21635          BOOT_JDK_FOUND=no
21636        else
21637          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21638          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21641            BOOT_JDK_FOUND=no
21642          else
21643            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21644            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21645
21646            # Extra M4 quote needed to protect [] in grep expression.
21647            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21648            if test "x$FOUND_CORRECT_VERSION" = x; then
21649              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21650$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21651              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21652$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21653              BOOT_JDK_FOUND=no
21654            else
21655              # We're done! :-)
21656              BOOT_JDK_FOUND=yes
21657
21658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21659
21660  # Input might be given as Windows format, start by converting to
21661  # unix format.
21662  path="$BOOT_JDK"
21663  new_path=`$CYGPATH -u "$path"`
21664
21665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21668  # "foo.exe" is OK but "foo" is an error.
21669  #
21670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21671  # It is also a way to make sure we got the proper file name for the real test later on.
21672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21673  if test "x$test_shortpath" = x; then
21674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21676    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21677  fi
21678
21679  # Call helper function which possibly converts this using DOS-style short mode.
21680  # If so, the updated path is stored in $new_path.
21681
21682  input_path="$new_path"
21683  # Check if we need to convert this using DOS-style short mode. If the path
21684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21685  # take no chances and rewrite it.
21686  # Note: m4 eats our [], so we need to use [ and ] instead.
21687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21688  if test "x$has_forbidden_chars" != x; then
21689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21693      # Going to short mode and back again did indeed matter. Since short mode is
21694      # case insensitive, let's make it lowercase to improve readability.
21695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21696      # Now convert it back to Unix-stile (cygpath)
21697      input_path=`$CYGPATH -u "$shortmode_path"`
21698      new_path="$input_path"
21699    fi
21700  fi
21701
21702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21703  if test "x$test_cygdrive_prefix" = x; then
21704    # As a simple fix, exclude /usr/bin since it's not a real path.
21705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21707      # a path prefixed by /cygdrive for fixpath to work.
21708      new_path="$CYGWIN_ROOT_PATH$input_path"
21709    fi
21710  fi
21711
21712
21713  if test "x$path" != "x$new_path"; then
21714    BOOT_JDK="$new_path"
21715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21717  fi
21718
21719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21720
21721  path="$BOOT_JDK"
21722  has_colon=`$ECHO $path | $GREP ^.:`
21723  new_path="$path"
21724  if test "x$has_colon" = x; then
21725    # Not in mixed or Windows style, start by that.
21726    new_path=`cmd //c echo $path`
21727  fi
21728
21729
21730  input_path="$new_path"
21731  # Check if we need to convert this using DOS-style short mode. If the path
21732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21733  # take no chances and rewrite it.
21734  # Note: m4 eats our [], so we need to use [ and ] instead.
21735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21736  if test "x$has_forbidden_chars" != x; then
21737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21739  fi
21740
21741
21742  windows_path="$new_path"
21743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21744    unix_path=`$CYGPATH -u "$windows_path"`
21745    new_path="$unix_path"
21746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21748    new_path="$unix_path"
21749  fi
21750
21751  if test "x$path" != "x$new_path"; then
21752    BOOT_JDK="$new_path"
21753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21755  fi
21756
21757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21759
21760  else
21761    # We're on a posix platform. Hooray! :)
21762    path="$BOOT_JDK"
21763    has_space=`$ECHO "$path" | $GREP " "`
21764    if test "x$has_space" != x; then
21765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21768    fi
21769
21770    # Use eval to expand a potential ~
21771    eval path="$path"
21772    if test ! -f "$path" && test ! -d "$path"; then
21773      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21774    fi
21775
21776    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21777  fi
21778
21779              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21780$as_echo_n "checking for Boot JDK... " >&6; }
21781              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21782$as_echo "$BOOT_JDK" >&6; }
21783              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21784$as_echo_n "checking Boot JDK version... " >&6; }
21785              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21786              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21787$as_echo "$BOOT_JDK_VERSION" >&6; }
21788            fi # end check jdk version
21789          fi # end check rt.jar
21790        fi # end check javac
21791      fi # end check java
21792    fi # end check boot jdk found
21793  fi
21794
21795
21796  # Test: Is there a JDK installed in default, well-known locations?
21797
21798  if test "x$BOOT_JDK_FOUND" = xno; then
21799    # Now execute the test
21800
21801  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21802
21803  if test "x$BOOT_JDK_FOUND" = xno; then
21804    # Now execute the test
21805
21806  if test "x$ProgramW6432" != x; then
21807    VIRTUAL_DIR="$ProgramW6432/Java"
21808
21809  windows_path="$VIRTUAL_DIR"
21810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21811    unix_path=`$CYGPATH -u "$windows_path"`
21812    VIRTUAL_DIR="$unix_path"
21813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21815    VIRTUAL_DIR="$unix_path"
21816  fi
21817
21818
21819  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21820  BOOT_JDK_SUFFIX=""
21821  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21822  if test "x$ALL_JDKS_FOUND" != x; then
21823    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21824
21825  if test "x$BOOT_JDK_FOUND" = xno; then
21826    # Now execute the test
21827
21828        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21829        if test -d "$BOOT_JDK"; then
21830          BOOT_JDK_FOUND=maybe
21831          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21832$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21833        fi
21834
21835
21836    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21837    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21838      # Do we have a bin/java?
21839      if test ! -x "$BOOT_JDK/bin/java"; then
21840        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21841$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21842        BOOT_JDK_FOUND=no
21843      else
21844        # Do we have a bin/javac?
21845        if test ! -x "$BOOT_JDK/bin/javac"; then
21846          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21848          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21849$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21850          BOOT_JDK_FOUND=no
21851        else
21852          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21853          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21854            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21856            BOOT_JDK_FOUND=no
21857          else
21858            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21859            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21860
21861            # Extra M4 quote needed to protect [] in grep expression.
21862            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21863            if test "x$FOUND_CORRECT_VERSION" = x; then
21864              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21866              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21867$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21868              BOOT_JDK_FOUND=no
21869            else
21870              # We're done! :-)
21871              BOOT_JDK_FOUND=yes
21872
21873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21874
21875  # Input might be given as Windows format, start by converting to
21876  # unix format.
21877  path="$BOOT_JDK"
21878  new_path=`$CYGPATH -u "$path"`
21879
21880  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21881  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21882  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21883  # "foo.exe" is OK but "foo" is an error.
21884  #
21885  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21886  # It is also a way to make sure we got the proper file name for the real test later on.
21887  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21888  if test "x$test_shortpath" = x; then
21889    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21890$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21891    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21892  fi
21893
21894  # Call helper function which possibly converts this using DOS-style short mode.
21895  # If so, the updated path is stored in $new_path.
21896
21897  input_path="$new_path"
21898  # Check if we need to convert this using DOS-style short mode. If the path
21899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21900  # take no chances and rewrite it.
21901  # Note: m4 eats our [], so we need to use [ and ] instead.
21902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21903  if test "x$has_forbidden_chars" != x; then
21904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21908      # Going to short mode and back again did indeed matter. Since short mode is
21909      # case insensitive, let's make it lowercase to improve readability.
21910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21911      # Now convert it back to Unix-stile (cygpath)
21912      input_path=`$CYGPATH -u "$shortmode_path"`
21913      new_path="$input_path"
21914    fi
21915  fi
21916
21917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21918  if test "x$test_cygdrive_prefix" = x; then
21919    # As a simple fix, exclude /usr/bin since it's not a real path.
21920    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21922      # a path prefixed by /cygdrive for fixpath to work.
21923      new_path="$CYGWIN_ROOT_PATH$input_path"
21924    fi
21925  fi
21926
21927
21928  if test "x$path" != "x$new_path"; then
21929    BOOT_JDK="$new_path"
21930    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21931$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21932  fi
21933
21934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21935
21936  path="$BOOT_JDK"
21937  has_colon=`$ECHO $path | $GREP ^.:`
21938  new_path="$path"
21939  if test "x$has_colon" = x; then
21940    # Not in mixed or Windows style, start by that.
21941    new_path=`cmd //c echo $path`
21942  fi
21943
21944
21945  input_path="$new_path"
21946  # Check if we need to convert this using DOS-style short mode. If the path
21947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21948  # take no chances and rewrite it.
21949  # Note: m4 eats our [], so we need to use [ and ] instead.
21950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21951  if test "x$has_forbidden_chars" != x; then
21952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21953    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21954  fi
21955
21956
21957  windows_path="$new_path"
21958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21959    unix_path=`$CYGPATH -u "$windows_path"`
21960    new_path="$unix_path"
21961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21963    new_path="$unix_path"
21964  fi
21965
21966  if test "x$path" != "x$new_path"; then
21967    BOOT_JDK="$new_path"
21968    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21969$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21970  fi
21971
21972  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21973  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21974
21975  else
21976    # We're on a posix platform. Hooray! :)
21977    path="$BOOT_JDK"
21978    has_space=`$ECHO "$path" | $GREP " "`
21979    if test "x$has_space" != x; then
21980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21982      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21983    fi
21984
21985    # Use eval to expand a potential ~
21986    eval path="$path"
21987    if test ! -f "$path" && test ! -d "$path"; then
21988      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21989    fi
21990
21991    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21992  fi
21993
21994              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21995$as_echo_n "checking for Boot JDK... " >&6; }
21996              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21997$as_echo "$BOOT_JDK" >&6; }
21998              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21999$as_echo_n "checking Boot JDK version... " >&6; }
22000              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22001              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22002$as_echo "$BOOT_JDK_VERSION" >&6; }
22003            fi # end check jdk version
22004          fi # end check rt.jar
22005        fi # end check javac
22006      fi # end check java
22007    fi # end check boot jdk found
22008  fi
22009
22010    done
22011  fi
22012
22013  fi
22014
22015
22016    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22017    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22018      # Do we have a bin/java?
22019      if test ! -x "$BOOT_JDK/bin/java"; then
22020        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22021$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22022        BOOT_JDK_FOUND=no
22023      else
22024        # Do we have a bin/javac?
22025        if test ! -x "$BOOT_JDK/bin/javac"; then
22026          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22027$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22028          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22029$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22030          BOOT_JDK_FOUND=no
22031        else
22032          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22033          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22034            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22036            BOOT_JDK_FOUND=no
22037          else
22038            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22039            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22040
22041            # Extra M4 quote needed to protect [] in grep expression.
22042            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22043            if test "x$FOUND_CORRECT_VERSION" = x; then
22044              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22045$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22046              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22047$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22048              BOOT_JDK_FOUND=no
22049            else
22050              # We're done! :-)
22051              BOOT_JDK_FOUND=yes
22052
22053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22054
22055  # Input might be given as Windows format, start by converting to
22056  # unix format.
22057  path="$BOOT_JDK"
22058  new_path=`$CYGPATH -u "$path"`
22059
22060  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22061  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22062  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22063  # "foo.exe" is OK but "foo" is an error.
22064  #
22065  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22066  # It is also a way to make sure we got the proper file name for the real test later on.
22067  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22068  if test "x$test_shortpath" = x; then
22069    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22070$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22071    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22072  fi
22073
22074  # Call helper function which possibly converts this using DOS-style short mode.
22075  # If so, the updated path is stored in $new_path.
22076
22077  input_path="$new_path"
22078  # Check if we need to convert this using DOS-style short mode. If the path
22079  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22080  # take no chances and rewrite it.
22081  # Note: m4 eats our [], so we need to use [ and ] instead.
22082  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22083  if test "x$has_forbidden_chars" != x; then
22084    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22085    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22086    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22087    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22088      # Going to short mode and back again did indeed matter. Since short mode is
22089      # case insensitive, let's make it lowercase to improve readability.
22090      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22091      # Now convert it back to Unix-stile (cygpath)
22092      input_path=`$CYGPATH -u "$shortmode_path"`
22093      new_path="$input_path"
22094    fi
22095  fi
22096
22097  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22098  if test "x$test_cygdrive_prefix" = x; then
22099    # As a simple fix, exclude /usr/bin since it's not a real path.
22100    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22101      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22102      # a path prefixed by /cygdrive for fixpath to work.
22103      new_path="$CYGWIN_ROOT_PATH$input_path"
22104    fi
22105  fi
22106
22107
22108  if test "x$path" != "x$new_path"; then
22109    BOOT_JDK="$new_path"
22110    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22111$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22112  fi
22113
22114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22115
22116  path="$BOOT_JDK"
22117  has_colon=`$ECHO $path | $GREP ^.:`
22118  new_path="$path"
22119  if test "x$has_colon" = x; then
22120    # Not in mixed or Windows style, start by that.
22121    new_path=`cmd //c echo $path`
22122  fi
22123
22124
22125  input_path="$new_path"
22126  # Check if we need to convert this using DOS-style short mode. If the path
22127  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22128  # take no chances and rewrite it.
22129  # Note: m4 eats our [], so we need to use [ and ] instead.
22130  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22131  if test "x$has_forbidden_chars" != x; then
22132    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22133    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22134  fi
22135
22136
22137  windows_path="$new_path"
22138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22139    unix_path=`$CYGPATH -u "$windows_path"`
22140    new_path="$unix_path"
22141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22143    new_path="$unix_path"
22144  fi
22145
22146  if test "x$path" != "x$new_path"; then
22147    BOOT_JDK="$new_path"
22148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22149$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22150  fi
22151
22152  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22153  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22154
22155  else
22156    # We're on a posix platform. Hooray! :)
22157    path="$BOOT_JDK"
22158    has_space=`$ECHO "$path" | $GREP " "`
22159    if test "x$has_space" != x; then
22160      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22161$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22162      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22163    fi
22164
22165    # Use eval to expand a potential ~
22166    eval path="$path"
22167    if test ! -f "$path" && test ! -d "$path"; then
22168      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22169    fi
22170
22171    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22172  fi
22173
22174              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22175$as_echo_n "checking for Boot JDK... " >&6; }
22176              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22177$as_echo "$BOOT_JDK" >&6; }
22178              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22179$as_echo_n "checking Boot JDK version... " >&6; }
22180              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22181              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22182$as_echo "$BOOT_JDK_VERSION" >&6; }
22183            fi # end check jdk version
22184          fi # end check rt.jar
22185        fi # end check javac
22186      fi # end check java
22187    fi # end check boot jdk found
22188  fi
22189
22190
22191  if test "x$BOOT_JDK_FOUND" = xno; then
22192    # Now execute the test
22193
22194  if test "x$PROGRAMW6432" != x; then
22195    VIRTUAL_DIR="$PROGRAMW6432/Java"
22196
22197  windows_path="$VIRTUAL_DIR"
22198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22199    unix_path=`$CYGPATH -u "$windows_path"`
22200    VIRTUAL_DIR="$unix_path"
22201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22203    VIRTUAL_DIR="$unix_path"
22204  fi
22205
22206
22207  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22208  BOOT_JDK_SUFFIX=""
22209  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22210  if test "x$ALL_JDKS_FOUND" != x; then
22211    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22212
22213  if test "x$BOOT_JDK_FOUND" = xno; then
22214    # Now execute the test
22215
22216        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22217        if test -d "$BOOT_JDK"; then
22218          BOOT_JDK_FOUND=maybe
22219          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22220$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22221        fi
22222
22223
22224    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22225    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22226      # Do we have a bin/java?
22227      if test ! -x "$BOOT_JDK/bin/java"; then
22228        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22230        BOOT_JDK_FOUND=no
22231      else
22232        # Do we have a bin/javac?
22233        if test ! -x "$BOOT_JDK/bin/javac"; then
22234          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22235$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22236          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22237$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22238          BOOT_JDK_FOUND=no
22239        else
22240          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22241          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22242            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22244            BOOT_JDK_FOUND=no
22245          else
22246            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22247            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22248
22249            # Extra M4 quote needed to protect [] in grep expression.
22250            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22251            if test "x$FOUND_CORRECT_VERSION" = x; then
22252              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22253$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22254              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22255$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22256              BOOT_JDK_FOUND=no
22257            else
22258              # We're done! :-)
22259              BOOT_JDK_FOUND=yes
22260
22261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22262
22263  # Input might be given as Windows format, start by converting to
22264  # unix format.
22265  path="$BOOT_JDK"
22266  new_path=`$CYGPATH -u "$path"`
22267
22268  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22269  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22270  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22271  # "foo.exe" is OK but "foo" is an error.
22272  #
22273  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22274  # It is also a way to make sure we got the proper file name for the real test later on.
22275  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22276  if test "x$test_shortpath" = x; then
22277    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22278$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22279    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22280  fi
22281
22282  # Call helper function which possibly converts this using DOS-style short mode.
22283  # If so, the updated path is stored in $new_path.
22284
22285  input_path="$new_path"
22286  # Check if we need to convert this using DOS-style short mode. If the path
22287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22288  # take no chances and rewrite it.
22289  # Note: m4 eats our [], so we need to use [ and ] instead.
22290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22291  if test "x$has_forbidden_chars" != x; then
22292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22293    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22294    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22295    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22296      # Going to short mode and back again did indeed matter. Since short mode is
22297      # case insensitive, let's make it lowercase to improve readability.
22298      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22299      # Now convert it back to Unix-stile (cygpath)
22300      input_path=`$CYGPATH -u "$shortmode_path"`
22301      new_path="$input_path"
22302    fi
22303  fi
22304
22305  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22306  if test "x$test_cygdrive_prefix" = x; then
22307    # As a simple fix, exclude /usr/bin since it's not a real path.
22308    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22309      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22310      # a path prefixed by /cygdrive for fixpath to work.
22311      new_path="$CYGWIN_ROOT_PATH$input_path"
22312    fi
22313  fi
22314
22315
22316  if test "x$path" != "x$new_path"; then
22317    BOOT_JDK="$new_path"
22318    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22319$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22320  fi
22321
22322  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22323
22324  path="$BOOT_JDK"
22325  has_colon=`$ECHO $path | $GREP ^.:`
22326  new_path="$path"
22327  if test "x$has_colon" = x; then
22328    # Not in mixed or Windows style, start by that.
22329    new_path=`cmd //c echo $path`
22330  fi
22331
22332
22333  input_path="$new_path"
22334  # Check if we need to convert this using DOS-style short mode. If the path
22335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22336  # take no chances and rewrite it.
22337  # Note: m4 eats our [], so we need to use [ and ] instead.
22338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22339  if test "x$has_forbidden_chars" != x; then
22340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22342  fi
22343
22344
22345  windows_path="$new_path"
22346  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22347    unix_path=`$CYGPATH -u "$windows_path"`
22348    new_path="$unix_path"
22349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22350    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22351    new_path="$unix_path"
22352  fi
22353
22354  if test "x$path" != "x$new_path"; then
22355    BOOT_JDK="$new_path"
22356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22357$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22358  fi
22359
22360  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22361  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22362
22363  else
22364    # We're on a posix platform. Hooray! :)
22365    path="$BOOT_JDK"
22366    has_space=`$ECHO "$path" | $GREP " "`
22367    if test "x$has_space" != x; then
22368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22369$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22370      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22371    fi
22372
22373    # Use eval to expand a potential ~
22374    eval path="$path"
22375    if test ! -f "$path" && test ! -d "$path"; then
22376      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22377    fi
22378
22379    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22380  fi
22381
22382              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22383$as_echo_n "checking for Boot JDK... " >&6; }
22384              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22385$as_echo "$BOOT_JDK" >&6; }
22386              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22387$as_echo_n "checking Boot JDK version... " >&6; }
22388              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22389              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22390$as_echo "$BOOT_JDK_VERSION" >&6; }
22391            fi # end check jdk version
22392          fi # end check rt.jar
22393        fi # end check javac
22394      fi # end check java
22395    fi # end check boot jdk found
22396  fi
22397
22398    done
22399  fi
22400
22401  fi
22402
22403
22404    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22405    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22406      # Do we have a bin/java?
22407      if test ! -x "$BOOT_JDK/bin/java"; then
22408        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22409$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22410        BOOT_JDK_FOUND=no
22411      else
22412        # Do we have a bin/javac?
22413        if test ! -x "$BOOT_JDK/bin/javac"; then
22414          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22416          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22417$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22418          BOOT_JDK_FOUND=no
22419        else
22420          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22421          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22422            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22424            BOOT_JDK_FOUND=no
22425          else
22426            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22427            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22428
22429            # Extra M4 quote needed to protect [] in grep expression.
22430            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22431            if test "x$FOUND_CORRECT_VERSION" = x; then
22432              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22433$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22434              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22435$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22436              BOOT_JDK_FOUND=no
22437            else
22438              # We're done! :-)
22439              BOOT_JDK_FOUND=yes
22440
22441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22442
22443  # Input might be given as Windows format, start by converting to
22444  # unix format.
22445  path="$BOOT_JDK"
22446  new_path=`$CYGPATH -u "$path"`
22447
22448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22451  # "foo.exe" is OK but "foo" is an error.
22452  #
22453  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22454  # It is also a way to make sure we got the proper file name for the real test later on.
22455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22456  if test "x$test_shortpath" = x; then
22457    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22458$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22459    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22460  fi
22461
22462  # Call helper function which possibly converts this using DOS-style short mode.
22463  # If so, the updated path is stored in $new_path.
22464
22465  input_path="$new_path"
22466  # Check if we need to convert this using DOS-style short mode. If the path
22467  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22468  # take no chances and rewrite it.
22469  # Note: m4 eats our [], so we need to use [ and ] instead.
22470  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22471  if test "x$has_forbidden_chars" != x; then
22472    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22473    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22474    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22475    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22476      # Going to short mode and back again did indeed matter. Since short mode is
22477      # case insensitive, let's make it lowercase to improve readability.
22478      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22479      # Now convert it back to Unix-stile (cygpath)
22480      input_path=`$CYGPATH -u "$shortmode_path"`
22481      new_path="$input_path"
22482    fi
22483  fi
22484
22485  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22486  if test "x$test_cygdrive_prefix" = x; then
22487    # As a simple fix, exclude /usr/bin since it's not a real path.
22488    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22489      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22490      # a path prefixed by /cygdrive for fixpath to work.
22491      new_path="$CYGWIN_ROOT_PATH$input_path"
22492    fi
22493  fi
22494
22495
22496  if test "x$path" != "x$new_path"; then
22497    BOOT_JDK="$new_path"
22498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22499$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22500  fi
22501
22502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22503
22504  path="$BOOT_JDK"
22505  has_colon=`$ECHO $path | $GREP ^.:`
22506  new_path="$path"
22507  if test "x$has_colon" = x; then
22508    # Not in mixed or Windows style, start by that.
22509    new_path=`cmd //c echo $path`
22510  fi
22511
22512
22513  input_path="$new_path"
22514  # Check if we need to convert this using DOS-style short mode. If the path
22515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22516  # take no chances and rewrite it.
22517  # Note: m4 eats our [], so we need to use [ and ] instead.
22518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22519  if test "x$has_forbidden_chars" != x; then
22520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22521    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22522  fi
22523
22524
22525  windows_path="$new_path"
22526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22527    unix_path=`$CYGPATH -u "$windows_path"`
22528    new_path="$unix_path"
22529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22531    new_path="$unix_path"
22532  fi
22533
22534  if test "x$path" != "x$new_path"; then
22535    BOOT_JDK="$new_path"
22536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22537$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22538  fi
22539
22540  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22541  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22542
22543  else
22544    # We're on a posix platform. Hooray! :)
22545    path="$BOOT_JDK"
22546    has_space=`$ECHO "$path" | $GREP " "`
22547    if test "x$has_space" != x; then
22548      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22549$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22550      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22551    fi
22552
22553    # Use eval to expand a potential ~
22554    eval path="$path"
22555    if test ! -f "$path" && test ! -d "$path"; then
22556      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22557    fi
22558
22559    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22560  fi
22561
22562              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22563$as_echo_n "checking for Boot JDK... " >&6; }
22564              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22565$as_echo "$BOOT_JDK" >&6; }
22566              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22567$as_echo_n "checking Boot JDK version... " >&6; }
22568              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22569              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22570$as_echo "$BOOT_JDK_VERSION" >&6; }
22571            fi # end check jdk version
22572          fi # end check rt.jar
22573        fi # end check javac
22574      fi # end check java
22575    fi # end check boot jdk found
22576  fi
22577
22578
22579  if test "x$BOOT_JDK_FOUND" = xno; then
22580    # Now execute the test
22581
22582  if test "x$PROGRAMFILES" != x; then
22583    VIRTUAL_DIR="$PROGRAMFILES/Java"
22584
22585  windows_path="$VIRTUAL_DIR"
22586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22587    unix_path=`$CYGPATH -u "$windows_path"`
22588    VIRTUAL_DIR="$unix_path"
22589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22591    VIRTUAL_DIR="$unix_path"
22592  fi
22593
22594
22595  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22596  BOOT_JDK_SUFFIX=""
22597  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22598  if test "x$ALL_JDKS_FOUND" != x; then
22599    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22600
22601  if test "x$BOOT_JDK_FOUND" = xno; then
22602    # Now execute the test
22603
22604        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22605        if test -d "$BOOT_JDK"; then
22606          BOOT_JDK_FOUND=maybe
22607          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22608$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22609        fi
22610
22611
22612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22614      # Do we have a bin/java?
22615      if test ! -x "$BOOT_JDK/bin/java"; then
22616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22618        BOOT_JDK_FOUND=no
22619      else
22620        # Do we have a bin/javac?
22621        if test ! -x "$BOOT_JDK/bin/javac"; then
22622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22626          BOOT_JDK_FOUND=no
22627        else
22628          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22629          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22630            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22632            BOOT_JDK_FOUND=no
22633          else
22634            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22635            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22636
22637            # Extra M4 quote needed to protect [] in grep expression.
22638            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22639            if test "x$FOUND_CORRECT_VERSION" = x; then
22640              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22641$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22642              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22643$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22644              BOOT_JDK_FOUND=no
22645            else
22646              # We're done! :-)
22647              BOOT_JDK_FOUND=yes
22648
22649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22650
22651  # Input might be given as Windows format, start by converting to
22652  # unix format.
22653  path="$BOOT_JDK"
22654  new_path=`$CYGPATH -u "$path"`
22655
22656  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22657  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22658  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22659  # "foo.exe" is OK but "foo" is an error.
22660  #
22661  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22662  # It is also a way to make sure we got the proper file name for the real test later on.
22663  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22664  if test "x$test_shortpath" = x; then
22665    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22667    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22668  fi
22669
22670  # Call helper function which possibly converts this using DOS-style short mode.
22671  # If so, the updated path is stored in $new_path.
22672
22673  input_path="$new_path"
22674  # Check if we need to convert this using DOS-style short mode. If the path
22675  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22676  # take no chances and rewrite it.
22677  # Note: m4 eats our [], so we need to use [ and ] instead.
22678  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22679  if test "x$has_forbidden_chars" != x; then
22680    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22681    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22682    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22683    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22684      # Going to short mode and back again did indeed matter. Since short mode is
22685      # case insensitive, let's make it lowercase to improve readability.
22686      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22687      # Now convert it back to Unix-stile (cygpath)
22688      input_path=`$CYGPATH -u "$shortmode_path"`
22689      new_path="$input_path"
22690    fi
22691  fi
22692
22693  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22694  if test "x$test_cygdrive_prefix" = x; then
22695    # As a simple fix, exclude /usr/bin since it's not a real path.
22696    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22697      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22698      # a path prefixed by /cygdrive for fixpath to work.
22699      new_path="$CYGWIN_ROOT_PATH$input_path"
22700    fi
22701  fi
22702
22703
22704  if test "x$path" != "x$new_path"; then
22705    BOOT_JDK="$new_path"
22706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22707$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22708  fi
22709
22710  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22711
22712  path="$BOOT_JDK"
22713  has_colon=`$ECHO $path | $GREP ^.:`
22714  new_path="$path"
22715  if test "x$has_colon" = x; then
22716    # Not in mixed or Windows style, start by that.
22717    new_path=`cmd //c echo $path`
22718  fi
22719
22720
22721  input_path="$new_path"
22722  # Check if we need to convert this using DOS-style short mode. If the path
22723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22724  # take no chances and rewrite it.
22725  # Note: m4 eats our [], so we need to use [ and ] instead.
22726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22727  if test "x$has_forbidden_chars" != x; then
22728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22729    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22730  fi
22731
22732
22733  windows_path="$new_path"
22734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22735    unix_path=`$CYGPATH -u "$windows_path"`
22736    new_path="$unix_path"
22737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22739    new_path="$unix_path"
22740  fi
22741
22742  if test "x$path" != "x$new_path"; then
22743    BOOT_JDK="$new_path"
22744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22746  fi
22747
22748  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22749  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22750
22751  else
22752    # We're on a posix platform. Hooray! :)
22753    path="$BOOT_JDK"
22754    has_space=`$ECHO "$path" | $GREP " "`
22755    if test "x$has_space" != x; then
22756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22758      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22759    fi
22760
22761    # Use eval to expand a potential ~
22762    eval path="$path"
22763    if test ! -f "$path" && test ! -d "$path"; then
22764      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22765    fi
22766
22767    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22768  fi
22769
22770              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22771$as_echo_n "checking for Boot JDK... " >&6; }
22772              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22773$as_echo "$BOOT_JDK" >&6; }
22774              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22775$as_echo_n "checking Boot JDK version... " >&6; }
22776              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22777              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22778$as_echo "$BOOT_JDK_VERSION" >&6; }
22779            fi # end check jdk version
22780          fi # end check rt.jar
22781        fi # end check javac
22782      fi # end check java
22783    fi # end check boot jdk found
22784  fi
22785
22786    done
22787  fi
22788
22789  fi
22790
22791
22792    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22793    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22794      # Do we have a bin/java?
22795      if test ! -x "$BOOT_JDK/bin/java"; then
22796        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22798        BOOT_JDK_FOUND=no
22799      else
22800        # Do we have a bin/javac?
22801        if test ! -x "$BOOT_JDK/bin/javac"; then
22802          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22803$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22804          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22805$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22806          BOOT_JDK_FOUND=no
22807        else
22808          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22809          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22810            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22812            BOOT_JDK_FOUND=no
22813          else
22814            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22815            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22816
22817            # Extra M4 quote needed to protect [] in grep expression.
22818            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22819            if test "x$FOUND_CORRECT_VERSION" = x; then
22820              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22822              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22823$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22824              BOOT_JDK_FOUND=no
22825            else
22826              # We're done! :-)
22827              BOOT_JDK_FOUND=yes
22828
22829  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22830
22831  # Input might be given as Windows format, start by converting to
22832  # unix format.
22833  path="$BOOT_JDK"
22834  new_path=`$CYGPATH -u "$path"`
22835
22836  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22837  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22838  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22839  # "foo.exe" is OK but "foo" is an error.
22840  #
22841  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22842  # It is also a way to make sure we got the proper file name for the real test later on.
22843  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22844  if test "x$test_shortpath" = x; then
22845    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22847    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22848  fi
22849
22850  # Call helper function which possibly converts this using DOS-style short mode.
22851  # If so, the updated path is stored in $new_path.
22852
22853  input_path="$new_path"
22854  # Check if we need to convert this using DOS-style short mode. If the path
22855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22856  # take no chances and rewrite it.
22857  # Note: m4 eats our [], so we need to use [ and ] instead.
22858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22859  if test "x$has_forbidden_chars" != x; then
22860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22864      # Going to short mode and back again did indeed matter. Since short mode is
22865      # case insensitive, let's make it lowercase to improve readability.
22866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22867      # Now convert it back to Unix-stile (cygpath)
22868      input_path=`$CYGPATH -u "$shortmode_path"`
22869      new_path="$input_path"
22870    fi
22871  fi
22872
22873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22874  if test "x$test_cygdrive_prefix" = x; then
22875    # As a simple fix, exclude /usr/bin since it's not a real path.
22876    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22878      # a path prefixed by /cygdrive for fixpath to work.
22879      new_path="$CYGWIN_ROOT_PATH$input_path"
22880    fi
22881  fi
22882
22883
22884  if test "x$path" != "x$new_path"; then
22885    BOOT_JDK="$new_path"
22886    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22887$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22888  fi
22889
22890  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22891
22892  path="$BOOT_JDK"
22893  has_colon=`$ECHO $path | $GREP ^.:`
22894  new_path="$path"
22895  if test "x$has_colon" = x; then
22896    # Not in mixed or Windows style, start by that.
22897    new_path=`cmd //c echo $path`
22898  fi
22899
22900
22901  input_path="$new_path"
22902  # Check if we need to convert this using DOS-style short mode. If the path
22903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22904  # take no chances and rewrite it.
22905  # Note: m4 eats our [], so we need to use [ and ] instead.
22906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22907  if test "x$has_forbidden_chars" != x; then
22908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22909    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22910  fi
22911
22912
22913  windows_path="$new_path"
22914  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22915    unix_path=`$CYGPATH -u "$windows_path"`
22916    new_path="$unix_path"
22917  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22918    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22919    new_path="$unix_path"
22920  fi
22921
22922  if test "x$path" != "x$new_path"; then
22923    BOOT_JDK="$new_path"
22924    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22925$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22926  fi
22927
22928  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22929  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22930
22931  else
22932    # We're on a posix platform. Hooray! :)
22933    path="$BOOT_JDK"
22934    has_space=`$ECHO "$path" | $GREP " "`
22935    if test "x$has_space" != x; then
22936      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22937$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22938      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22939    fi
22940
22941    # Use eval to expand a potential ~
22942    eval path="$path"
22943    if test ! -f "$path" && test ! -d "$path"; then
22944      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22945    fi
22946
22947    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22948  fi
22949
22950              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22951$as_echo_n "checking for Boot JDK... " >&6; }
22952              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22953$as_echo "$BOOT_JDK" >&6; }
22954              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22955$as_echo_n "checking Boot JDK version... " >&6; }
22956              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22957              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22958$as_echo "$BOOT_JDK_VERSION" >&6; }
22959            fi # end check jdk version
22960          fi # end check rt.jar
22961        fi # end check javac
22962      fi # end check java
22963    fi # end check boot jdk found
22964  fi
22965
22966
22967  if test "x$BOOT_JDK_FOUND" = xno; then
22968    # Now execute the test
22969
22970  if test "x$ProgramFiles" != x; then
22971    VIRTUAL_DIR="$ProgramFiles/Java"
22972
22973  windows_path="$VIRTUAL_DIR"
22974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22975    unix_path=`$CYGPATH -u "$windows_path"`
22976    VIRTUAL_DIR="$unix_path"
22977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22979    VIRTUAL_DIR="$unix_path"
22980  fi
22981
22982
22983  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22984  BOOT_JDK_SUFFIX=""
22985  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22986  if test "x$ALL_JDKS_FOUND" != x; then
22987    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22988
22989  if test "x$BOOT_JDK_FOUND" = xno; then
22990    # Now execute the test
22991
22992        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22993        if test -d "$BOOT_JDK"; then
22994          BOOT_JDK_FOUND=maybe
22995          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22996$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22997        fi
22998
22999
23000    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23001    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23002      # Do we have a bin/java?
23003      if test ! -x "$BOOT_JDK/bin/java"; then
23004        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23005$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23006        BOOT_JDK_FOUND=no
23007      else
23008        # Do we have a bin/javac?
23009        if test ! -x "$BOOT_JDK/bin/javac"; then
23010          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23012          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23013$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23014          BOOT_JDK_FOUND=no
23015        else
23016          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23017          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23018            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23020            BOOT_JDK_FOUND=no
23021          else
23022            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23023            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23024
23025            # Extra M4 quote needed to protect [] in grep expression.
23026            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23027            if test "x$FOUND_CORRECT_VERSION" = x; then
23028              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23030              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23031$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23032              BOOT_JDK_FOUND=no
23033            else
23034              # We're done! :-)
23035              BOOT_JDK_FOUND=yes
23036
23037  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23038
23039  # Input might be given as Windows format, start by converting to
23040  # unix format.
23041  path="$BOOT_JDK"
23042  new_path=`$CYGPATH -u "$path"`
23043
23044  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23045  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23046  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23047  # "foo.exe" is OK but "foo" is an error.
23048  #
23049  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23050  # It is also a way to make sure we got the proper file name for the real test later on.
23051  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23052  if test "x$test_shortpath" = x; then
23053    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23054$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23055    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23056  fi
23057
23058  # Call helper function which possibly converts this using DOS-style short mode.
23059  # If so, the updated path is stored in $new_path.
23060
23061  input_path="$new_path"
23062  # Check if we need to convert this using DOS-style short mode. If the path
23063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23064  # take no chances and rewrite it.
23065  # Note: m4 eats our [], so we need to use [ and ] instead.
23066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23067  if test "x$has_forbidden_chars" != x; then
23068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23069    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23070    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23071    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23072      # Going to short mode and back again did indeed matter. Since short mode is
23073      # case insensitive, let's make it lowercase to improve readability.
23074      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23075      # Now convert it back to Unix-stile (cygpath)
23076      input_path=`$CYGPATH -u "$shortmode_path"`
23077      new_path="$input_path"
23078    fi
23079  fi
23080
23081  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23082  if test "x$test_cygdrive_prefix" = x; then
23083    # As a simple fix, exclude /usr/bin since it's not a real path.
23084    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23085      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23086      # a path prefixed by /cygdrive for fixpath to work.
23087      new_path="$CYGWIN_ROOT_PATH$input_path"
23088    fi
23089  fi
23090
23091
23092  if test "x$path" != "x$new_path"; then
23093    BOOT_JDK="$new_path"
23094    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23095$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23096  fi
23097
23098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23099
23100  path="$BOOT_JDK"
23101  has_colon=`$ECHO $path | $GREP ^.:`
23102  new_path="$path"
23103  if test "x$has_colon" = x; then
23104    # Not in mixed or Windows style, start by that.
23105    new_path=`cmd //c echo $path`
23106  fi
23107
23108
23109  input_path="$new_path"
23110  # Check if we need to convert this using DOS-style short mode. If the path
23111  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23112  # take no chances and rewrite it.
23113  # Note: m4 eats our [], so we need to use [ and ] instead.
23114  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23115  if test "x$has_forbidden_chars" != x; then
23116    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23117    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23118  fi
23119
23120
23121  windows_path="$new_path"
23122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23123    unix_path=`$CYGPATH -u "$windows_path"`
23124    new_path="$unix_path"
23125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23127    new_path="$unix_path"
23128  fi
23129
23130  if test "x$path" != "x$new_path"; then
23131    BOOT_JDK="$new_path"
23132    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23133$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23134  fi
23135
23136  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23137  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23138
23139  else
23140    # We're on a posix platform. Hooray! :)
23141    path="$BOOT_JDK"
23142    has_space=`$ECHO "$path" | $GREP " "`
23143    if test "x$has_space" != x; then
23144      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23145$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23146      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23147    fi
23148
23149    # Use eval to expand a potential ~
23150    eval path="$path"
23151    if test ! -f "$path" && test ! -d "$path"; then
23152      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23153    fi
23154
23155    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23156  fi
23157
23158              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23159$as_echo_n "checking for Boot JDK... " >&6; }
23160              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23161$as_echo "$BOOT_JDK" >&6; }
23162              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23163$as_echo_n "checking Boot JDK version... " >&6; }
23164              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23165              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23166$as_echo "$BOOT_JDK_VERSION" >&6; }
23167            fi # end check jdk version
23168          fi # end check rt.jar
23169        fi # end check javac
23170      fi # end check java
23171    fi # end check boot jdk found
23172  fi
23173
23174    done
23175  fi
23176
23177  fi
23178
23179
23180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23182      # Do we have a bin/java?
23183      if test ! -x "$BOOT_JDK/bin/java"; then
23184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23186        BOOT_JDK_FOUND=no
23187      else
23188        # Do we have a bin/javac?
23189        if test ! -x "$BOOT_JDK/bin/javac"; then
23190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23194          BOOT_JDK_FOUND=no
23195        else
23196          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23197          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23200            BOOT_JDK_FOUND=no
23201          else
23202            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23204
23205            # Extra M4 quote needed to protect [] in grep expression.
23206            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23207            if test "x$FOUND_CORRECT_VERSION" = x; then
23208              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23210              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23211$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23212              BOOT_JDK_FOUND=no
23213            else
23214              # We're done! :-)
23215              BOOT_JDK_FOUND=yes
23216
23217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23218
23219  # Input might be given as Windows format, start by converting to
23220  # unix format.
23221  path="$BOOT_JDK"
23222  new_path=`$CYGPATH -u "$path"`
23223
23224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23227  # "foo.exe" is OK but "foo" is an error.
23228  #
23229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23230  # It is also a way to make sure we got the proper file name for the real test later on.
23231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23232  if test "x$test_shortpath" = x; then
23233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23235    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23236  fi
23237
23238  # Call helper function which possibly converts this using DOS-style short mode.
23239  # If so, the updated path is stored in $new_path.
23240
23241  input_path="$new_path"
23242  # Check if we need to convert this using DOS-style short mode. If the path
23243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23244  # take no chances and rewrite it.
23245  # Note: m4 eats our [], so we need to use [ and ] instead.
23246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23247  if test "x$has_forbidden_chars" != x; then
23248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23252      # Going to short mode and back again did indeed matter. Since short mode is
23253      # case insensitive, let's make it lowercase to improve readability.
23254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23255      # Now convert it back to Unix-stile (cygpath)
23256      input_path=`$CYGPATH -u "$shortmode_path"`
23257      new_path="$input_path"
23258    fi
23259  fi
23260
23261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23262  if test "x$test_cygdrive_prefix" = x; then
23263    # As a simple fix, exclude /usr/bin since it's not a real path.
23264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23266      # a path prefixed by /cygdrive for fixpath to work.
23267      new_path="$CYGWIN_ROOT_PATH$input_path"
23268    fi
23269  fi
23270
23271
23272  if test "x$path" != "x$new_path"; then
23273    BOOT_JDK="$new_path"
23274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23276  fi
23277
23278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23279
23280  path="$BOOT_JDK"
23281  has_colon=`$ECHO $path | $GREP ^.:`
23282  new_path="$path"
23283  if test "x$has_colon" = x; then
23284    # Not in mixed or Windows style, start by that.
23285    new_path=`cmd //c echo $path`
23286  fi
23287
23288
23289  input_path="$new_path"
23290  # Check if we need to convert this using DOS-style short mode. If the path
23291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23292  # take no chances and rewrite it.
23293  # Note: m4 eats our [], so we need to use [ and ] instead.
23294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23295  if test "x$has_forbidden_chars" != x; then
23296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23298  fi
23299
23300
23301  windows_path="$new_path"
23302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23303    unix_path=`$CYGPATH -u "$windows_path"`
23304    new_path="$unix_path"
23305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23307    new_path="$unix_path"
23308  fi
23309
23310  if test "x$path" != "x$new_path"; then
23311    BOOT_JDK="$new_path"
23312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23314  fi
23315
23316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23318
23319  else
23320    # We're on a posix platform. Hooray! :)
23321    path="$BOOT_JDK"
23322    has_space=`$ECHO "$path" | $GREP " "`
23323    if test "x$has_space" != x; then
23324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23327    fi
23328
23329    # Use eval to expand a potential ~
23330    eval path="$path"
23331    if test ! -f "$path" && test ! -d "$path"; then
23332      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23333    fi
23334
23335    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23336  fi
23337
23338              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23339$as_echo_n "checking for Boot JDK... " >&6; }
23340              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23341$as_echo "$BOOT_JDK" >&6; }
23342              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23343$as_echo_n "checking Boot JDK version... " >&6; }
23344              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23345              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23346$as_echo "$BOOT_JDK_VERSION" >&6; }
23347            fi # end check jdk version
23348          fi # end check rt.jar
23349        fi # end check javac
23350      fi # end check java
23351    fi # end check boot jdk found
23352  fi
23353
23354
23355  if test "x$BOOT_JDK_FOUND" = xno; then
23356    # Now execute the test
23357
23358  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23359  BOOT_JDK_SUFFIX=""
23360  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23361  if test "x$ALL_JDKS_FOUND" != x; then
23362    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23363
23364  if test "x$BOOT_JDK_FOUND" = xno; then
23365    # Now execute the test
23366
23367        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23368        if test -d "$BOOT_JDK"; then
23369          BOOT_JDK_FOUND=maybe
23370          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23371$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23372        fi
23373
23374
23375    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23376    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23377      # Do we have a bin/java?
23378      if test ! -x "$BOOT_JDK/bin/java"; then
23379        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23380$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23381        BOOT_JDK_FOUND=no
23382      else
23383        # Do we have a bin/javac?
23384        if test ! -x "$BOOT_JDK/bin/javac"; then
23385          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23386$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23387          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23388$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23389          BOOT_JDK_FOUND=no
23390        else
23391          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23392          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23393            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23395            BOOT_JDK_FOUND=no
23396          else
23397            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23398            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23399
23400            # Extra M4 quote needed to protect [] in grep expression.
23401            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23402            if test "x$FOUND_CORRECT_VERSION" = x; then
23403              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23404$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23405              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23406$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23407              BOOT_JDK_FOUND=no
23408            else
23409              # We're done! :-)
23410              BOOT_JDK_FOUND=yes
23411
23412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23413
23414  # Input might be given as Windows format, start by converting to
23415  # unix format.
23416  path="$BOOT_JDK"
23417  new_path=`$CYGPATH -u "$path"`
23418
23419  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23420  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23421  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23422  # "foo.exe" is OK but "foo" is an error.
23423  #
23424  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23425  # It is also a way to make sure we got the proper file name for the real test later on.
23426  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23427  if test "x$test_shortpath" = x; then
23428    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23429$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23430    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23431  fi
23432
23433  # Call helper function which possibly converts this using DOS-style short mode.
23434  # If so, the updated path is stored in $new_path.
23435
23436  input_path="$new_path"
23437  # Check if we need to convert this using DOS-style short mode. If the path
23438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23439  # take no chances and rewrite it.
23440  # Note: m4 eats our [], so we need to use [ and ] instead.
23441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23442  if test "x$has_forbidden_chars" != x; then
23443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23447      # Going to short mode and back again did indeed matter. Since short mode is
23448      # case insensitive, let's make it lowercase to improve readability.
23449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23450      # Now convert it back to Unix-stile (cygpath)
23451      input_path=`$CYGPATH -u "$shortmode_path"`
23452      new_path="$input_path"
23453    fi
23454  fi
23455
23456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23457  if test "x$test_cygdrive_prefix" = x; then
23458    # As a simple fix, exclude /usr/bin since it's not a real path.
23459    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23461      # a path prefixed by /cygdrive for fixpath to work.
23462      new_path="$CYGWIN_ROOT_PATH$input_path"
23463    fi
23464  fi
23465
23466
23467  if test "x$path" != "x$new_path"; then
23468    BOOT_JDK="$new_path"
23469    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23470$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23471  fi
23472
23473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23474
23475  path="$BOOT_JDK"
23476  has_colon=`$ECHO $path | $GREP ^.:`
23477  new_path="$path"
23478  if test "x$has_colon" = x; then
23479    # Not in mixed or Windows style, start by that.
23480    new_path=`cmd //c echo $path`
23481  fi
23482
23483
23484  input_path="$new_path"
23485  # Check if we need to convert this using DOS-style short mode. If the path
23486  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23487  # take no chances and rewrite it.
23488  # Note: m4 eats our [], so we need to use [ and ] instead.
23489  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23490  if test "x$has_forbidden_chars" != x; then
23491    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23492    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23493  fi
23494
23495
23496  windows_path="$new_path"
23497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23498    unix_path=`$CYGPATH -u "$windows_path"`
23499    new_path="$unix_path"
23500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23502    new_path="$unix_path"
23503  fi
23504
23505  if test "x$path" != "x$new_path"; then
23506    BOOT_JDK="$new_path"
23507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23508$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23509  fi
23510
23511  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23512  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23513
23514  else
23515    # We're on a posix platform. Hooray! :)
23516    path="$BOOT_JDK"
23517    has_space=`$ECHO "$path" | $GREP " "`
23518    if test "x$has_space" != x; then
23519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23521      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23522    fi
23523
23524    # Use eval to expand a potential ~
23525    eval path="$path"
23526    if test ! -f "$path" && test ! -d "$path"; then
23527      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23528    fi
23529
23530    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23531  fi
23532
23533              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23534$as_echo_n "checking for Boot JDK... " >&6; }
23535              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23536$as_echo "$BOOT_JDK" >&6; }
23537              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23538$as_echo_n "checking Boot JDK version... " >&6; }
23539              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23540              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23541$as_echo "$BOOT_JDK_VERSION" >&6; }
23542            fi # end check jdk version
23543          fi # end check rt.jar
23544        fi # end check javac
23545      fi # end check java
23546    fi # end check boot jdk found
23547  fi
23548
23549    done
23550  fi
23551
23552
23553    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23554    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23555      # Do we have a bin/java?
23556      if test ! -x "$BOOT_JDK/bin/java"; then
23557        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23558$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23559        BOOT_JDK_FOUND=no
23560      else
23561        # Do we have a bin/javac?
23562        if test ! -x "$BOOT_JDK/bin/javac"; then
23563          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23564$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23565          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23566$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23567          BOOT_JDK_FOUND=no
23568        else
23569          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23570          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23571            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23573            BOOT_JDK_FOUND=no
23574          else
23575            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23576            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23577
23578            # Extra M4 quote needed to protect [] in grep expression.
23579            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23580            if test "x$FOUND_CORRECT_VERSION" = x; then
23581              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23582$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23583              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23584$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23585              BOOT_JDK_FOUND=no
23586            else
23587              # We're done! :-)
23588              BOOT_JDK_FOUND=yes
23589
23590  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23591
23592  # Input might be given as Windows format, start by converting to
23593  # unix format.
23594  path="$BOOT_JDK"
23595  new_path=`$CYGPATH -u "$path"`
23596
23597  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23598  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23599  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23600  # "foo.exe" is OK but "foo" is an error.
23601  #
23602  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23603  # It is also a way to make sure we got the proper file name for the real test later on.
23604  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23605  if test "x$test_shortpath" = x; then
23606    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23607$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23608    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23609  fi
23610
23611  # Call helper function which possibly converts this using DOS-style short mode.
23612  # If so, the updated path is stored in $new_path.
23613
23614  input_path="$new_path"
23615  # Check if we need to convert this using DOS-style short mode. If the path
23616  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23617  # take no chances and rewrite it.
23618  # Note: m4 eats our [], so we need to use [ and ] instead.
23619  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23620  if test "x$has_forbidden_chars" != x; then
23621    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23622    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23623    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23624    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23625      # Going to short mode and back again did indeed matter. Since short mode is
23626      # case insensitive, let's make it lowercase to improve readability.
23627      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23628      # Now convert it back to Unix-stile (cygpath)
23629      input_path=`$CYGPATH -u "$shortmode_path"`
23630      new_path="$input_path"
23631    fi
23632  fi
23633
23634  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23635  if test "x$test_cygdrive_prefix" = x; then
23636    # As a simple fix, exclude /usr/bin since it's not a real path.
23637    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23638      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23639      # a path prefixed by /cygdrive for fixpath to work.
23640      new_path="$CYGWIN_ROOT_PATH$input_path"
23641    fi
23642  fi
23643
23644
23645  if test "x$path" != "x$new_path"; then
23646    BOOT_JDK="$new_path"
23647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23648$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23649  fi
23650
23651  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23652
23653  path="$BOOT_JDK"
23654  has_colon=`$ECHO $path | $GREP ^.:`
23655  new_path="$path"
23656  if test "x$has_colon" = x; then
23657    # Not in mixed or Windows style, start by that.
23658    new_path=`cmd //c echo $path`
23659  fi
23660
23661
23662  input_path="$new_path"
23663  # Check if we need to convert this using DOS-style short mode. If the path
23664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23665  # take no chances and rewrite it.
23666  # Note: m4 eats our [], so we need to use [ and ] instead.
23667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23668  if test "x$has_forbidden_chars" != x; then
23669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23670    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23671  fi
23672
23673
23674  windows_path="$new_path"
23675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23676    unix_path=`$CYGPATH -u "$windows_path"`
23677    new_path="$unix_path"
23678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23680    new_path="$unix_path"
23681  fi
23682
23683  if test "x$path" != "x$new_path"; then
23684    BOOT_JDK="$new_path"
23685    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23686$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23687  fi
23688
23689  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23690  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23691
23692  else
23693    # We're on a posix platform. Hooray! :)
23694    path="$BOOT_JDK"
23695    has_space=`$ECHO "$path" | $GREP " "`
23696    if test "x$has_space" != x; then
23697      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23699      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23700    fi
23701
23702    # Use eval to expand a potential ~
23703    eval path="$path"
23704    if test ! -f "$path" && test ! -d "$path"; then
23705      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23706    fi
23707
23708    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23709  fi
23710
23711              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23712$as_echo_n "checking for Boot JDK... " >&6; }
23713              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23714$as_echo "$BOOT_JDK" >&6; }
23715              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23716$as_echo_n "checking Boot JDK version... " >&6; }
23717              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23718              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23719$as_echo "$BOOT_JDK_VERSION" >&6; }
23720            fi # end check jdk version
23721          fi # end check rt.jar
23722        fi # end check javac
23723      fi # end check java
23724    fi # end check boot jdk found
23725  fi
23726
23727  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23728
23729  if test "x$BOOT_JDK_FOUND" = xno; then
23730    # Now execute the test
23731
23732  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23733  BOOT_JDK_SUFFIX="/Contents/Home"
23734  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23735  if test "x$ALL_JDKS_FOUND" != x; then
23736    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23737
23738  if test "x$BOOT_JDK_FOUND" = xno; then
23739    # Now execute the test
23740
23741        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23742        if test -d "$BOOT_JDK"; then
23743          BOOT_JDK_FOUND=maybe
23744          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23745$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23746        fi
23747
23748
23749    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23750    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23751      # Do we have a bin/java?
23752      if test ! -x "$BOOT_JDK/bin/java"; then
23753        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23754$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23755        BOOT_JDK_FOUND=no
23756      else
23757        # Do we have a bin/javac?
23758        if test ! -x "$BOOT_JDK/bin/javac"; then
23759          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23760$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23761          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23762$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23763          BOOT_JDK_FOUND=no
23764        else
23765          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23766          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23767            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23769            BOOT_JDK_FOUND=no
23770          else
23771            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23772            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23773
23774            # Extra M4 quote needed to protect [] in grep expression.
23775            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23776            if test "x$FOUND_CORRECT_VERSION" = x; then
23777              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23778$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23779              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23780$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23781              BOOT_JDK_FOUND=no
23782            else
23783              # We're done! :-)
23784              BOOT_JDK_FOUND=yes
23785
23786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23787
23788  # Input might be given as Windows format, start by converting to
23789  # unix format.
23790  path="$BOOT_JDK"
23791  new_path=`$CYGPATH -u "$path"`
23792
23793  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23794  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23795  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23796  # "foo.exe" is OK but "foo" is an error.
23797  #
23798  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23799  # It is also a way to make sure we got the proper file name for the real test later on.
23800  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23801  if test "x$test_shortpath" = x; then
23802    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23803$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23804    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23805  fi
23806
23807  # Call helper function which possibly converts this using DOS-style short mode.
23808  # If so, the updated path is stored in $new_path.
23809
23810  input_path="$new_path"
23811  # Check if we need to convert this using DOS-style short mode. If the path
23812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23813  # take no chances and rewrite it.
23814  # Note: m4 eats our [], so we need to use [ and ] instead.
23815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23816  if test "x$has_forbidden_chars" != x; then
23817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23818    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23819    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23820    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23821      # Going to short mode and back again did indeed matter. Since short mode is
23822      # case insensitive, let's make it lowercase to improve readability.
23823      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23824      # Now convert it back to Unix-stile (cygpath)
23825      input_path=`$CYGPATH -u "$shortmode_path"`
23826      new_path="$input_path"
23827    fi
23828  fi
23829
23830  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23831  if test "x$test_cygdrive_prefix" = x; then
23832    # As a simple fix, exclude /usr/bin since it's not a real path.
23833    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23834      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23835      # a path prefixed by /cygdrive for fixpath to work.
23836      new_path="$CYGWIN_ROOT_PATH$input_path"
23837    fi
23838  fi
23839
23840
23841  if test "x$path" != "x$new_path"; then
23842    BOOT_JDK="$new_path"
23843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23844$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23845  fi
23846
23847  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23848
23849  path="$BOOT_JDK"
23850  has_colon=`$ECHO $path | $GREP ^.:`
23851  new_path="$path"
23852  if test "x$has_colon" = x; then
23853    # Not in mixed or Windows style, start by that.
23854    new_path=`cmd //c echo $path`
23855  fi
23856
23857
23858  input_path="$new_path"
23859  # Check if we need to convert this using DOS-style short mode. If the path
23860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23861  # take no chances and rewrite it.
23862  # Note: m4 eats our [], so we need to use [ and ] instead.
23863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23864  if test "x$has_forbidden_chars" != x; then
23865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23866    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23867  fi
23868
23869
23870  windows_path="$new_path"
23871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23872    unix_path=`$CYGPATH -u "$windows_path"`
23873    new_path="$unix_path"
23874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23876    new_path="$unix_path"
23877  fi
23878
23879  if test "x$path" != "x$new_path"; then
23880    BOOT_JDK="$new_path"
23881    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23882$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23883  fi
23884
23885  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23886  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23887
23888  else
23889    # We're on a posix platform. Hooray! :)
23890    path="$BOOT_JDK"
23891    has_space=`$ECHO "$path" | $GREP " "`
23892    if test "x$has_space" != x; then
23893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23895      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23896    fi
23897
23898    # Use eval to expand a potential ~
23899    eval path="$path"
23900    if test ! -f "$path" && test ! -d "$path"; then
23901      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23902    fi
23903
23904    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23905  fi
23906
23907              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23908$as_echo_n "checking for Boot JDK... " >&6; }
23909              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23910$as_echo "$BOOT_JDK" >&6; }
23911              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23912$as_echo_n "checking Boot JDK version... " >&6; }
23913              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23914              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23915$as_echo "$BOOT_JDK_VERSION" >&6; }
23916            fi # end check jdk version
23917          fi # end check rt.jar
23918        fi # end check javac
23919      fi # end check java
23920    fi # end check boot jdk found
23921  fi
23922
23923    done
23924  fi
23925
23926
23927    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23928    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23929      # Do we have a bin/java?
23930      if test ! -x "$BOOT_JDK/bin/java"; then
23931        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23932$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23933        BOOT_JDK_FOUND=no
23934      else
23935        # Do we have a bin/javac?
23936        if test ! -x "$BOOT_JDK/bin/javac"; then
23937          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23938$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23939          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23940$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23941          BOOT_JDK_FOUND=no
23942        else
23943          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23944          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23945            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23947            BOOT_JDK_FOUND=no
23948          else
23949            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23950            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23951
23952            # Extra M4 quote needed to protect [] in grep expression.
23953            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23954            if test "x$FOUND_CORRECT_VERSION" = x; then
23955              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23956$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23957              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23958$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23959              BOOT_JDK_FOUND=no
23960            else
23961              # We're done! :-)
23962              BOOT_JDK_FOUND=yes
23963
23964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23965
23966  # Input might be given as Windows format, start by converting to
23967  # unix format.
23968  path="$BOOT_JDK"
23969  new_path=`$CYGPATH -u "$path"`
23970
23971  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23972  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23973  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23974  # "foo.exe" is OK but "foo" is an error.
23975  #
23976  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23977  # It is also a way to make sure we got the proper file name for the real test later on.
23978  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23979  if test "x$test_shortpath" = x; then
23980    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23981$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23982    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23983  fi
23984
23985  # Call helper function which possibly converts this using DOS-style short mode.
23986  # If so, the updated path is stored in $new_path.
23987
23988  input_path="$new_path"
23989  # Check if we need to convert this using DOS-style short mode. If the path
23990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23991  # take no chances and rewrite it.
23992  # Note: m4 eats our [], so we need to use [ and ] instead.
23993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23994  if test "x$has_forbidden_chars" != x; then
23995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23999      # Going to short mode and back again did indeed matter. Since short mode is
24000      # case insensitive, let's make it lowercase to improve readability.
24001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24002      # Now convert it back to Unix-stile (cygpath)
24003      input_path=`$CYGPATH -u "$shortmode_path"`
24004      new_path="$input_path"
24005    fi
24006  fi
24007
24008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24009  if test "x$test_cygdrive_prefix" = x; then
24010    # As a simple fix, exclude /usr/bin since it's not a real path.
24011    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24013      # a path prefixed by /cygdrive for fixpath to work.
24014      new_path="$CYGWIN_ROOT_PATH$input_path"
24015    fi
24016  fi
24017
24018
24019  if test "x$path" != "x$new_path"; then
24020    BOOT_JDK="$new_path"
24021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24022$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24023  fi
24024
24025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24026
24027  path="$BOOT_JDK"
24028  has_colon=`$ECHO $path | $GREP ^.:`
24029  new_path="$path"
24030  if test "x$has_colon" = x; then
24031    # Not in mixed or Windows style, start by that.
24032    new_path=`cmd //c echo $path`
24033  fi
24034
24035
24036  input_path="$new_path"
24037  # Check if we need to convert this using DOS-style short mode. If the path
24038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24039  # take no chances and rewrite it.
24040  # Note: m4 eats our [], so we need to use [ and ] instead.
24041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24042  if test "x$has_forbidden_chars" != x; then
24043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24044    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24045  fi
24046
24047
24048  windows_path="$new_path"
24049  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24050    unix_path=`$CYGPATH -u "$windows_path"`
24051    new_path="$unix_path"
24052  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24053    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24054    new_path="$unix_path"
24055  fi
24056
24057  if test "x$path" != "x$new_path"; then
24058    BOOT_JDK="$new_path"
24059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24061  fi
24062
24063  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24064  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24065
24066  else
24067    # We're on a posix platform. Hooray! :)
24068    path="$BOOT_JDK"
24069    has_space=`$ECHO "$path" | $GREP " "`
24070    if test "x$has_space" != x; then
24071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24073      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24074    fi
24075
24076    # Use eval to expand a potential ~
24077    eval path="$path"
24078    if test ! -f "$path" && test ! -d "$path"; then
24079      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24080    fi
24081
24082    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24083  fi
24084
24085              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24086$as_echo_n "checking for Boot JDK... " >&6; }
24087              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24088$as_echo "$BOOT_JDK" >&6; }
24089              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24090$as_echo_n "checking Boot JDK version... " >&6; }
24091              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24092              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24093$as_echo "$BOOT_JDK_VERSION" >&6; }
24094            fi # end check jdk version
24095          fi # end check rt.jar
24096        fi # end check javac
24097      fi # end check java
24098    fi # end check boot jdk found
24099  fi
24100
24101
24102  if test "x$BOOT_JDK_FOUND" = xno; then
24103    # Now execute the test
24104
24105  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24106  BOOT_JDK_SUFFIX="/Contents/Home"
24107  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24108  if test "x$ALL_JDKS_FOUND" != x; then
24109    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24110
24111  if test "x$BOOT_JDK_FOUND" = xno; then
24112    # Now execute the test
24113
24114        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24115        if test -d "$BOOT_JDK"; then
24116          BOOT_JDK_FOUND=maybe
24117          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24118$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24119        fi
24120
24121
24122    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24123    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24124      # Do we have a bin/java?
24125      if test ! -x "$BOOT_JDK/bin/java"; then
24126        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24127$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24128        BOOT_JDK_FOUND=no
24129      else
24130        # Do we have a bin/javac?
24131        if test ! -x "$BOOT_JDK/bin/javac"; then
24132          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24133$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24134          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24135$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24136          BOOT_JDK_FOUND=no
24137        else
24138          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24139          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24140            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24142            BOOT_JDK_FOUND=no
24143          else
24144            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24145            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24146
24147            # Extra M4 quote needed to protect [] in grep expression.
24148            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24149            if test "x$FOUND_CORRECT_VERSION" = x; then
24150              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24151$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24152              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24153$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24154              BOOT_JDK_FOUND=no
24155            else
24156              # We're done! :-)
24157              BOOT_JDK_FOUND=yes
24158
24159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24160
24161  # Input might be given as Windows format, start by converting to
24162  # unix format.
24163  path="$BOOT_JDK"
24164  new_path=`$CYGPATH -u "$path"`
24165
24166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24169  # "foo.exe" is OK but "foo" is an error.
24170  #
24171  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24172  # It is also a way to make sure we got the proper file name for the real test later on.
24173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24174  if test "x$test_shortpath" = x; then
24175    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24176$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24177    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24178  fi
24179
24180  # Call helper function which possibly converts this using DOS-style short mode.
24181  # If so, the updated path is stored in $new_path.
24182
24183  input_path="$new_path"
24184  # Check if we need to convert this using DOS-style short mode. If the path
24185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24186  # take no chances and rewrite it.
24187  # Note: m4 eats our [], so we need to use [ and ] instead.
24188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24189  if test "x$has_forbidden_chars" != x; then
24190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24194      # Going to short mode and back again did indeed matter. Since short mode is
24195      # case insensitive, let's make it lowercase to improve readability.
24196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24197      # Now convert it back to Unix-stile (cygpath)
24198      input_path=`$CYGPATH -u "$shortmode_path"`
24199      new_path="$input_path"
24200    fi
24201  fi
24202
24203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24204  if test "x$test_cygdrive_prefix" = x; then
24205    # As a simple fix, exclude /usr/bin since it's not a real path.
24206    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24208      # a path prefixed by /cygdrive for fixpath to work.
24209      new_path="$CYGWIN_ROOT_PATH$input_path"
24210    fi
24211  fi
24212
24213
24214  if test "x$path" != "x$new_path"; then
24215    BOOT_JDK="$new_path"
24216    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24217$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24218  fi
24219
24220  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24221
24222  path="$BOOT_JDK"
24223  has_colon=`$ECHO $path | $GREP ^.:`
24224  new_path="$path"
24225  if test "x$has_colon" = x; then
24226    # Not in mixed or Windows style, start by that.
24227    new_path=`cmd //c echo $path`
24228  fi
24229
24230
24231  input_path="$new_path"
24232  # Check if we need to convert this using DOS-style short mode. If the path
24233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24234  # take no chances and rewrite it.
24235  # Note: m4 eats our [], so we need to use [ and ] instead.
24236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24237  if test "x$has_forbidden_chars" != x; then
24238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24239    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24240  fi
24241
24242
24243  windows_path="$new_path"
24244  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24245    unix_path=`$CYGPATH -u "$windows_path"`
24246    new_path="$unix_path"
24247  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24248    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24249    new_path="$unix_path"
24250  fi
24251
24252  if test "x$path" != "x$new_path"; then
24253    BOOT_JDK="$new_path"
24254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24255$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24256  fi
24257
24258  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24259  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24260
24261  else
24262    # We're on a posix platform. Hooray! :)
24263    path="$BOOT_JDK"
24264    has_space=`$ECHO "$path" | $GREP " "`
24265    if test "x$has_space" != x; then
24266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24267$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24268      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24269    fi
24270
24271    # Use eval to expand a potential ~
24272    eval path="$path"
24273    if test ! -f "$path" && test ! -d "$path"; then
24274      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24275    fi
24276
24277    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24278  fi
24279
24280              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24281$as_echo_n "checking for Boot JDK... " >&6; }
24282              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24283$as_echo "$BOOT_JDK" >&6; }
24284              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24285$as_echo_n "checking Boot JDK version... " >&6; }
24286              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24287              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24288$as_echo "$BOOT_JDK_VERSION" >&6; }
24289            fi # end check jdk version
24290          fi # end check rt.jar
24291        fi # end check javac
24292      fi # end check java
24293    fi # end check boot jdk found
24294  fi
24295
24296    done
24297  fi
24298
24299
24300    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24301    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24302      # Do we have a bin/java?
24303      if test ! -x "$BOOT_JDK/bin/java"; then
24304        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24305$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24306        BOOT_JDK_FOUND=no
24307      else
24308        # Do we have a bin/javac?
24309        if test ! -x "$BOOT_JDK/bin/javac"; then
24310          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24311$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24312          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24313$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24314          BOOT_JDK_FOUND=no
24315        else
24316          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24317          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24318            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24320            BOOT_JDK_FOUND=no
24321          else
24322            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24323            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24324
24325            # Extra M4 quote needed to protect [] in grep expression.
24326            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24327            if test "x$FOUND_CORRECT_VERSION" = x; then
24328              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24330              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24331$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24332              BOOT_JDK_FOUND=no
24333            else
24334              # We're done! :-)
24335              BOOT_JDK_FOUND=yes
24336
24337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24338
24339  # Input might be given as Windows format, start by converting to
24340  # unix format.
24341  path="$BOOT_JDK"
24342  new_path=`$CYGPATH -u "$path"`
24343
24344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24347  # "foo.exe" is OK but "foo" is an error.
24348  #
24349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24350  # It is also a way to make sure we got the proper file name for the real test later on.
24351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24352  if test "x$test_shortpath" = x; then
24353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24354$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24355    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24356  fi
24357
24358  # Call helper function which possibly converts this using DOS-style short mode.
24359  # If so, the updated path is stored in $new_path.
24360
24361  input_path="$new_path"
24362  # Check if we need to convert this using DOS-style short mode. If the path
24363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24364  # take no chances and rewrite it.
24365  # Note: m4 eats our [], so we need to use [ and ] instead.
24366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24367  if test "x$has_forbidden_chars" != x; then
24368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24372      # Going to short mode and back again did indeed matter. Since short mode is
24373      # case insensitive, let's make it lowercase to improve readability.
24374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24375      # Now convert it back to Unix-stile (cygpath)
24376      input_path=`$CYGPATH -u "$shortmode_path"`
24377      new_path="$input_path"
24378    fi
24379  fi
24380
24381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24382  if test "x$test_cygdrive_prefix" = x; then
24383    # As a simple fix, exclude /usr/bin since it's not a real path.
24384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24386      # a path prefixed by /cygdrive for fixpath to work.
24387      new_path="$CYGWIN_ROOT_PATH$input_path"
24388    fi
24389  fi
24390
24391
24392  if test "x$path" != "x$new_path"; then
24393    BOOT_JDK="$new_path"
24394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24395$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24396  fi
24397
24398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24399
24400  path="$BOOT_JDK"
24401  has_colon=`$ECHO $path | $GREP ^.:`
24402  new_path="$path"
24403  if test "x$has_colon" = x; then
24404    # Not in mixed or Windows style, start by that.
24405    new_path=`cmd //c echo $path`
24406  fi
24407
24408
24409  input_path="$new_path"
24410  # Check if we need to convert this using DOS-style short mode. If the path
24411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24412  # take no chances and rewrite it.
24413  # Note: m4 eats our [], so we need to use [ and ] instead.
24414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24415  if test "x$has_forbidden_chars" != x; then
24416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24418  fi
24419
24420
24421  windows_path="$new_path"
24422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24423    unix_path=`$CYGPATH -u "$windows_path"`
24424    new_path="$unix_path"
24425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24427    new_path="$unix_path"
24428  fi
24429
24430  if test "x$path" != "x$new_path"; then
24431    BOOT_JDK="$new_path"
24432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24433$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24434  fi
24435
24436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24438
24439  else
24440    # We're on a posix platform. Hooray! :)
24441    path="$BOOT_JDK"
24442    has_space=`$ECHO "$path" | $GREP " "`
24443    if test "x$has_space" != x; then
24444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24445$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24446      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24447    fi
24448
24449    # Use eval to expand a potential ~
24450    eval path="$path"
24451    if test ! -f "$path" && test ! -d "$path"; then
24452      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24453    fi
24454
24455    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24456  fi
24457
24458              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24459$as_echo_n "checking for Boot JDK... " >&6; }
24460              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24461$as_echo "$BOOT_JDK" >&6; }
24462              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24463$as_echo_n "checking Boot JDK version... " >&6; }
24464              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24465              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24466$as_echo "$BOOT_JDK_VERSION" >&6; }
24467            fi # end check jdk version
24468          fi # end check rt.jar
24469        fi # end check javac
24470      fi # end check java
24471    fi # end check boot jdk found
24472  fi
24473
24474  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24475
24476  if test "x$BOOT_JDK_FOUND" = xno; then
24477    # Now execute the test
24478
24479  BOOT_JDK_PREFIX="/usr/lib/jvm"
24480  BOOT_JDK_SUFFIX=""
24481  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24482  if test "x$ALL_JDKS_FOUND" != x; then
24483    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24484
24485  if test "x$BOOT_JDK_FOUND" = xno; then
24486    # Now execute the test
24487
24488        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24489        if test -d "$BOOT_JDK"; then
24490          BOOT_JDK_FOUND=maybe
24491          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24492$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24493        fi
24494
24495
24496    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24497    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24498      # Do we have a bin/java?
24499      if test ! -x "$BOOT_JDK/bin/java"; then
24500        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24501$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24502        BOOT_JDK_FOUND=no
24503      else
24504        # Do we have a bin/javac?
24505        if test ! -x "$BOOT_JDK/bin/javac"; then
24506          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24507$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24508          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24509$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24510          BOOT_JDK_FOUND=no
24511        else
24512          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24513          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24514            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24516            BOOT_JDK_FOUND=no
24517          else
24518            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24519            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24520
24521            # Extra M4 quote needed to protect [] in grep expression.
24522            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24523            if test "x$FOUND_CORRECT_VERSION" = x; then
24524              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24525$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24526              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24527$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24528              BOOT_JDK_FOUND=no
24529            else
24530              # We're done! :-)
24531              BOOT_JDK_FOUND=yes
24532
24533  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24534
24535  # Input might be given as Windows format, start by converting to
24536  # unix format.
24537  path="$BOOT_JDK"
24538  new_path=`$CYGPATH -u "$path"`
24539
24540  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24541  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24542  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24543  # "foo.exe" is OK but "foo" is an error.
24544  #
24545  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24546  # It is also a way to make sure we got the proper file name for the real test later on.
24547  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24548  if test "x$test_shortpath" = x; then
24549    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24551    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24552  fi
24553
24554  # Call helper function which possibly converts this using DOS-style short mode.
24555  # If so, the updated path is stored in $new_path.
24556
24557  input_path="$new_path"
24558  # Check if we need to convert this using DOS-style short mode. If the path
24559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24560  # take no chances and rewrite it.
24561  # Note: m4 eats our [], so we need to use [ and ] instead.
24562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24563  if test "x$has_forbidden_chars" != x; then
24564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24565    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24566    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24567    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24568      # Going to short mode and back again did indeed matter. Since short mode is
24569      # case insensitive, let's make it lowercase to improve readability.
24570      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24571      # Now convert it back to Unix-stile (cygpath)
24572      input_path=`$CYGPATH -u "$shortmode_path"`
24573      new_path="$input_path"
24574    fi
24575  fi
24576
24577  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24578  if test "x$test_cygdrive_prefix" = x; then
24579    # As a simple fix, exclude /usr/bin since it's not a real path.
24580    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24581      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24582      # a path prefixed by /cygdrive for fixpath to work.
24583      new_path="$CYGWIN_ROOT_PATH$input_path"
24584    fi
24585  fi
24586
24587
24588  if test "x$path" != "x$new_path"; then
24589    BOOT_JDK="$new_path"
24590    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24591$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24592  fi
24593
24594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24595
24596  path="$BOOT_JDK"
24597  has_colon=`$ECHO $path | $GREP ^.:`
24598  new_path="$path"
24599  if test "x$has_colon" = x; then
24600    # Not in mixed or Windows style, start by that.
24601    new_path=`cmd //c echo $path`
24602  fi
24603
24604
24605  input_path="$new_path"
24606  # Check if we need to convert this using DOS-style short mode. If the path
24607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24608  # take no chances and rewrite it.
24609  # Note: m4 eats our [], so we need to use [ and ] instead.
24610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24611  if test "x$has_forbidden_chars" != x; then
24612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24613    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24614  fi
24615
24616
24617  windows_path="$new_path"
24618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24619    unix_path=`$CYGPATH -u "$windows_path"`
24620    new_path="$unix_path"
24621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24623    new_path="$unix_path"
24624  fi
24625
24626  if test "x$path" != "x$new_path"; then
24627    BOOT_JDK="$new_path"
24628    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24629$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24630  fi
24631
24632  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24633  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24634
24635  else
24636    # We're on a posix platform. Hooray! :)
24637    path="$BOOT_JDK"
24638    has_space=`$ECHO "$path" | $GREP " "`
24639    if test "x$has_space" != x; then
24640      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24641$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24642      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24643    fi
24644
24645    # Use eval to expand a potential ~
24646    eval path="$path"
24647    if test ! -f "$path" && test ! -d "$path"; then
24648      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24649    fi
24650
24651    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24652  fi
24653
24654              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24655$as_echo_n "checking for Boot JDK... " >&6; }
24656              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24657$as_echo "$BOOT_JDK" >&6; }
24658              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24659$as_echo_n "checking Boot JDK version... " >&6; }
24660              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24661              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24662$as_echo "$BOOT_JDK_VERSION" >&6; }
24663            fi # end check jdk version
24664          fi # end check rt.jar
24665        fi # end check javac
24666      fi # end check java
24667    fi # end check boot jdk found
24668  fi
24669
24670    done
24671  fi
24672
24673
24674    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24675    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24676      # Do we have a bin/java?
24677      if test ! -x "$BOOT_JDK/bin/java"; then
24678        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24679$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24680        BOOT_JDK_FOUND=no
24681      else
24682        # Do we have a bin/javac?
24683        if test ! -x "$BOOT_JDK/bin/javac"; then
24684          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24685$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24686          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24687$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24688          BOOT_JDK_FOUND=no
24689        else
24690          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24691          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24692            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24694            BOOT_JDK_FOUND=no
24695          else
24696            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24697            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24698
24699            # Extra M4 quote needed to protect [] in grep expression.
24700            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24701            if test "x$FOUND_CORRECT_VERSION" = x; then
24702              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24703$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24704              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24705$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24706              BOOT_JDK_FOUND=no
24707            else
24708              # We're done! :-)
24709              BOOT_JDK_FOUND=yes
24710
24711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24712
24713  # Input might be given as Windows format, start by converting to
24714  # unix format.
24715  path="$BOOT_JDK"
24716  new_path=`$CYGPATH -u "$path"`
24717
24718  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24719  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24720  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24721  # "foo.exe" is OK but "foo" is an error.
24722  #
24723  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24724  # It is also a way to make sure we got the proper file name for the real test later on.
24725  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24726  if test "x$test_shortpath" = x; then
24727    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24729    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24730  fi
24731
24732  # Call helper function which possibly converts this using DOS-style short mode.
24733  # If so, the updated path is stored in $new_path.
24734
24735  input_path="$new_path"
24736  # Check if we need to convert this using DOS-style short mode. If the path
24737  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24738  # take no chances and rewrite it.
24739  # Note: m4 eats our [], so we need to use [ and ] instead.
24740  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24741  if test "x$has_forbidden_chars" != x; then
24742    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24743    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24744    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24745    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24746      # Going to short mode and back again did indeed matter. Since short mode is
24747      # case insensitive, let's make it lowercase to improve readability.
24748      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24749      # Now convert it back to Unix-stile (cygpath)
24750      input_path=`$CYGPATH -u "$shortmode_path"`
24751      new_path="$input_path"
24752    fi
24753  fi
24754
24755  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24756  if test "x$test_cygdrive_prefix" = x; then
24757    # As a simple fix, exclude /usr/bin since it's not a real path.
24758    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24759      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24760      # a path prefixed by /cygdrive for fixpath to work.
24761      new_path="$CYGWIN_ROOT_PATH$input_path"
24762    fi
24763  fi
24764
24765
24766  if test "x$path" != "x$new_path"; then
24767    BOOT_JDK="$new_path"
24768    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24769$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24770  fi
24771
24772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24773
24774  path="$BOOT_JDK"
24775  has_colon=`$ECHO $path | $GREP ^.:`
24776  new_path="$path"
24777  if test "x$has_colon" = x; then
24778    # Not in mixed or Windows style, start by that.
24779    new_path=`cmd //c echo $path`
24780  fi
24781
24782
24783  input_path="$new_path"
24784  # Check if we need to convert this using DOS-style short mode. If the path
24785  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24786  # take no chances and rewrite it.
24787  # Note: m4 eats our [], so we need to use [ and ] instead.
24788  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24789  if test "x$has_forbidden_chars" != x; then
24790    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24791    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24792  fi
24793
24794
24795  windows_path="$new_path"
24796  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24797    unix_path=`$CYGPATH -u "$windows_path"`
24798    new_path="$unix_path"
24799  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24800    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24801    new_path="$unix_path"
24802  fi
24803
24804  if test "x$path" != "x$new_path"; then
24805    BOOT_JDK="$new_path"
24806    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24807$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24808  fi
24809
24810  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24811  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24812
24813  else
24814    # We're on a posix platform. Hooray! :)
24815    path="$BOOT_JDK"
24816    has_space=`$ECHO "$path" | $GREP " "`
24817    if test "x$has_space" != x; then
24818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24819$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24820      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24821    fi
24822
24823    # Use eval to expand a potential ~
24824    eval path="$path"
24825    if test ! -f "$path" && test ! -d "$path"; then
24826      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24827    fi
24828
24829    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24830  fi
24831
24832              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24833$as_echo_n "checking for Boot JDK... " >&6; }
24834              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24835$as_echo "$BOOT_JDK" >&6; }
24836              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24837$as_echo_n "checking Boot JDK version... " >&6; }
24838              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24839              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24840$as_echo "$BOOT_JDK_VERSION" >&6; }
24841            fi # end check jdk version
24842          fi # end check rt.jar
24843        fi # end check javac
24844      fi # end check java
24845    fi # end check boot jdk found
24846  fi
24847
24848  fi
24849
24850
24851    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24852    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24853      # Do we have a bin/java?
24854      if test ! -x "$BOOT_JDK/bin/java"; then
24855        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24857        BOOT_JDK_FOUND=no
24858      else
24859        # Do we have a bin/javac?
24860        if test ! -x "$BOOT_JDK/bin/javac"; then
24861          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24862$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24863          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24864$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24865          BOOT_JDK_FOUND=no
24866        else
24867          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24868          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24869            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24871            BOOT_JDK_FOUND=no
24872          else
24873            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24874            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24875
24876            # Extra M4 quote needed to protect [] in grep expression.
24877            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24878            if test "x$FOUND_CORRECT_VERSION" = x; then
24879              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24880$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24881              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24882$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24883              BOOT_JDK_FOUND=no
24884            else
24885              # We're done! :-)
24886              BOOT_JDK_FOUND=yes
24887
24888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24889
24890  # Input might be given as Windows format, start by converting to
24891  # unix format.
24892  path="$BOOT_JDK"
24893  new_path=`$CYGPATH -u "$path"`
24894
24895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24898  # "foo.exe" is OK but "foo" is an error.
24899  #
24900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24901  # It is also a way to make sure we got the proper file name for the real test later on.
24902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24903  if test "x$test_shortpath" = x; then
24904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24905$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24906    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24907  fi
24908
24909  # Call helper function which possibly converts this using DOS-style short mode.
24910  # If so, the updated path is stored in $new_path.
24911
24912  input_path="$new_path"
24913  # Check if we need to convert this using DOS-style short mode. If the path
24914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24915  # take no chances and rewrite it.
24916  # Note: m4 eats our [], so we need to use [ and ] instead.
24917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24918  if test "x$has_forbidden_chars" != x; then
24919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24923      # Going to short mode and back again did indeed matter. Since short mode is
24924      # case insensitive, let's make it lowercase to improve readability.
24925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926      # Now convert it back to Unix-stile (cygpath)
24927      input_path=`$CYGPATH -u "$shortmode_path"`
24928      new_path="$input_path"
24929    fi
24930  fi
24931
24932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24933  if test "x$test_cygdrive_prefix" = x; then
24934    # As a simple fix, exclude /usr/bin since it's not a real path.
24935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24937      # a path prefixed by /cygdrive for fixpath to work.
24938      new_path="$CYGWIN_ROOT_PATH$input_path"
24939    fi
24940  fi
24941
24942
24943  if test "x$path" != "x$new_path"; then
24944    BOOT_JDK="$new_path"
24945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24947  fi
24948
24949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24950
24951  path="$BOOT_JDK"
24952  has_colon=`$ECHO $path | $GREP ^.:`
24953  new_path="$path"
24954  if test "x$has_colon" = x; then
24955    # Not in mixed or Windows style, start by that.
24956    new_path=`cmd //c echo $path`
24957  fi
24958
24959
24960  input_path="$new_path"
24961  # Check if we need to convert this using DOS-style short mode. If the path
24962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24963  # take no chances and rewrite it.
24964  # Note: m4 eats our [], so we need to use [ and ] instead.
24965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24966  if test "x$has_forbidden_chars" != x; then
24967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24969  fi
24970
24971
24972  windows_path="$new_path"
24973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24974    unix_path=`$CYGPATH -u "$windows_path"`
24975    new_path="$unix_path"
24976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24978    new_path="$unix_path"
24979  fi
24980
24981  if test "x$path" != "x$new_path"; then
24982    BOOT_JDK="$new_path"
24983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24984$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24985  fi
24986
24987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24989
24990  else
24991    # We're on a posix platform. Hooray! :)
24992    path="$BOOT_JDK"
24993    has_space=`$ECHO "$path" | $GREP " "`
24994    if test "x$has_space" != x; then
24995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24996$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24998    fi
24999
25000    # Use eval to expand a potential ~
25001    eval path="$path"
25002    if test ! -f "$path" && test ! -d "$path"; then
25003      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25004    fi
25005
25006    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25007  fi
25008
25009              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25010$as_echo_n "checking for Boot JDK... " >&6; }
25011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25012$as_echo "$BOOT_JDK" >&6; }
25013              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25014$as_echo_n "checking Boot JDK version... " >&6; }
25015              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25016              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25017$as_echo "$BOOT_JDK_VERSION" >&6; }
25018            fi # end check jdk version
25019          fi # end check rt.jar
25020        fi # end check javac
25021      fi # end check java
25022    fi # end check boot jdk found
25023  fi
25024
25025
25026  # If we haven't found anything yet, we've truly lost. Give up.
25027  if test "x$BOOT_JDK_FOUND" = xno; then
25028
25029  # Print a helpful message on how to acquire the necessary build dependency.
25030  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25031  MISSING_DEPENDENCY=openjdk
25032
25033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25034    cygwin_help $MISSING_DEPENDENCY
25035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25036    msys_help $MISSING_DEPENDENCY
25037  else
25038    PKGHANDLER_COMMAND=
25039
25040    case $PKGHANDLER in
25041      apt-get)
25042        apt_help     $MISSING_DEPENDENCY ;;
25043      yum)
25044        yum_help     $MISSING_DEPENDENCY ;;
25045      port)
25046        port_help    $MISSING_DEPENDENCY ;;
25047      pkgutil)
25048        pkgutil_help $MISSING_DEPENDENCY ;;
25049      pkgadd)
25050        pkgadd_help  $MISSING_DEPENDENCY ;;
25051    esac
25052
25053    if test "x$PKGHANDLER_COMMAND" != x; then
25054      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25055    fi
25056  fi
25057
25058    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25059$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25060    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25061$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25062    as_fn_error $? "Cannot continue" "$LINENO" 5
25063  fi
25064
25065  # Setup proper paths for what we found
25066  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25067  if test ! -f "$BOOT_RTJAR"; then
25068    # On MacOSX it is called classes.jar
25069    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25070    if test -f "$BOOT_RTJAR"; then
25071      # Remove the ..
25072      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25073    fi
25074  fi
25075  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25076  BOOT_JDK="$BOOT_JDK"
25077
25078
25079
25080
25081  # Setup tools from the Boot JDK.
25082
25083  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25084
25085  # Publish this variable in the help.
25086
25087
25088  if test "x$JAVA" = x; then
25089    # The variable is not set by user, try to locate tool using the code snippet
25090
25091      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25092$as_echo_n "checking for java in Boot JDK... " >&6; }
25093      JAVA=$BOOT_JDK/bin/java
25094      if test ! -x $JAVA; then
25095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25096$as_echo "not found" >&6; }
25097        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25098$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25099        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25100      fi
25101      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25102$as_echo "ok" >&6; }
25103
25104
25105  else
25106    # The variable is set, but is it from the command line or the environment?
25107
25108    # Try to remove the string !JAVA! from our list.
25109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25111      # If it failed, the variable was not from the command line. Ignore it,
25112      # but warn the user (except for BASH, which is always set by the calling BASH).
25113      if test "xJAVA" != xBASH; then
25114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25115$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25116      fi
25117      # Try to locate tool using the code snippet
25118
25119      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25120$as_echo_n "checking for java in Boot JDK... " >&6; }
25121      JAVA=$BOOT_JDK/bin/java
25122      if test ! -x $JAVA; then
25123        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25124$as_echo "not found" >&6; }
25125        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25126$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25127        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25128      fi
25129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25130$as_echo "ok" >&6; }
25131
25132
25133    else
25134      # If it succeeded, then it was overridden by the user. We will use it
25135      # for the tool.
25136
25137      # First remove it from the list of overridden variables, so we can test
25138      # for unknown variables in the end.
25139      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25140
25141      # Check if the provided tool contains a complete path.
25142      tool_specified="$JAVA"
25143      tool_basename="${tool_specified##*/}"
25144      if test "x$tool_basename" = "x$tool_specified"; then
25145        # A command without a complete path is provided, search $PATH.
25146        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25147$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25148        # Extract the first word of "$tool_basename", so it can be a program name with args.
25149set dummy $tool_basename; ac_word=$2
25150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25151$as_echo_n "checking for $ac_word... " >&6; }
25152if ${ac_cv_path_JAVA+:} false; then :
25153  $as_echo_n "(cached) " >&6
25154else
25155  case $JAVA in
25156  [\\/]* | ?:[\\/]*)
25157  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25158  ;;
25159  *)
25160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25161for as_dir in $PATH
25162do
25163  IFS=$as_save_IFS
25164  test -z "$as_dir" && as_dir=.
25165    for ac_exec_ext in '' $ac_executable_extensions; do
25166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25167    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25169    break 2
25170  fi
25171done
25172  done
25173IFS=$as_save_IFS
25174
25175  ;;
25176esac
25177fi
25178JAVA=$ac_cv_path_JAVA
25179if test -n "$JAVA"; then
25180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25181$as_echo "$JAVA" >&6; }
25182else
25183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25184$as_echo "no" >&6; }
25185fi
25186
25187
25188        if test "x$JAVA" = x; then
25189          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25190        fi
25191      else
25192        # Otherwise we believe it is a complete path. Use it as it is.
25193        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25194$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25196$as_echo_n "checking for JAVA... " >&6; }
25197        if test ! -x "$tool_specified"; then
25198          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25199$as_echo "not found" >&6; }
25200          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25201        fi
25202        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25203$as_echo "$tool_specified" >&6; }
25204      fi
25205    fi
25206  fi
25207
25208
25209
25210  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25211
25212  # Publish this variable in the help.
25213
25214
25215  if test "x$JAVAC" = x; then
25216    # The variable is not set by user, try to locate tool using the code snippet
25217
25218      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25219$as_echo_n "checking for javac in Boot JDK... " >&6; }
25220      JAVAC=$BOOT_JDK/bin/javac
25221      if test ! -x $JAVAC; then
25222        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25223$as_echo "not found" >&6; }
25224        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25225$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25226        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25227      fi
25228      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25229$as_echo "ok" >&6; }
25230
25231
25232  else
25233    # The variable is set, but is it from the command line or the environment?
25234
25235    # Try to remove the string !JAVAC! from our list.
25236    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25237    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25238      # If it failed, the variable was not from the command line. Ignore it,
25239      # but warn the user (except for BASH, which is always set by the calling BASH).
25240      if test "xJAVAC" != xBASH; then
25241        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25242$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25243      fi
25244      # Try to locate tool using the code snippet
25245
25246      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25247$as_echo_n "checking for javac in Boot JDK... " >&6; }
25248      JAVAC=$BOOT_JDK/bin/javac
25249      if test ! -x $JAVAC; then
25250        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25251$as_echo "not found" >&6; }
25252        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25253$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25254        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25255      fi
25256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25257$as_echo "ok" >&6; }
25258
25259
25260    else
25261      # If it succeeded, then it was overridden by the user. We will use it
25262      # for the tool.
25263
25264      # First remove it from the list of overridden variables, so we can test
25265      # for unknown variables in the end.
25266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25267
25268      # Check if the provided tool contains a complete path.
25269      tool_specified="$JAVAC"
25270      tool_basename="${tool_specified##*/}"
25271      if test "x$tool_basename" = "x$tool_specified"; then
25272        # A command without a complete path is provided, search $PATH.
25273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25274$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25275        # Extract the first word of "$tool_basename", so it can be a program name with args.
25276set dummy $tool_basename; ac_word=$2
25277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25278$as_echo_n "checking for $ac_word... " >&6; }
25279if ${ac_cv_path_JAVAC+:} false; then :
25280  $as_echo_n "(cached) " >&6
25281else
25282  case $JAVAC in
25283  [\\/]* | ?:[\\/]*)
25284  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25285  ;;
25286  *)
25287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25288for as_dir in $PATH
25289do
25290  IFS=$as_save_IFS
25291  test -z "$as_dir" && as_dir=.
25292    for ac_exec_ext in '' $ac_executable_extensions; do
25293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25294    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25296    break 2
25297  fi
25298done
25299  done
25300IFS=$as_save_IFS
25301
25302  ;;
25303esac
25304fi
25305JAVAC=$ac_cv_path_JAVAC
25306if test -n "$JAVAC"; then
25307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25308$as_echo "$JAVAC" >&6; }
25309else
25310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25311$as_echo "no" >&6; }
25312fi
25313
25314
25315        if test "x$JAVAC" = x; then
25316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25317        fi
25318      else
25319        # Otherwise we believe it is a complete path. Use it as it is.
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25321$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25323$as_echo_n "checking for JAVAC... " >&6; }
25324        if test ! -x "$tool_specified"; then
25325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25326$as_echo "not found" >&6; }
25327          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25328        fi
25329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25330$as_echo "$tool_specified" >&6; }
25331      fi
25332    fi
25333  fi
25334
25335
25336
25337  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25338
25339  # Publish this variable in the help.
25340
25341
25342  if test "x$JAVAH" = x; then
25343    # The variable is not set by user, try to locate tool using the code snippet
25344
25345      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25346$as_echo_n "checking for javah in Boot JDK... " >&6; }
25347      JAVAH=$BOOT_JDK/bin/javah
25348      if test ! -x $JAVAH; then
25349        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25350$as_echo "not found" >&6; }
25351        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25352$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25353        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25354      fi
25355      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25356$as_echo "ok" >&6; }
25357
25358
25359  else
25360    # The variable is set, but is it from the command line or the environment?
25361
25362    # Try to remove the string !JAVAH! from our list.
25363    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25364    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25365      # If it failed, the variable was not from the command line. Ignore it,
25366      # but warn the user (except for BASH, which is always set by the calling BASH).
25367      if test "xJAVAH" != xBASH; then
25368        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25369$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25370      fi
25371      # Try to locate tool using the code snippet
25372
25373      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25374$as_echo_n "checking for javah in Boot JDK... " >&6; }
25375      JAVAH=$BOOT_JDK/bin/javah
25376      if test ! -x $JAVAH; then
25377        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25378$as_echo "not found" >&6; }
25379        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25380$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25381        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25382      fi
25383      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25384$as_echo "ok" >&6; }
25385
25386
25387    else
25388      # If it succeeded, then it was overridden by the user. We will use it
25389      # for the tool.
25390
25391      # First remove it from the list of overridden variables, so we can test
25392      # for unknown variables in the end.
25393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25394
25395      # Check if the provided tool contains a complete path.
25396      tool_specified="$JAVAH"
25397      tool_basename="${tool_specified##*/}"
25398      if test "x$tool_basename" = "x$tool_specified"; then
25399        # A command without a complete path is provided, search $PATH.
25400        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25401$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25402        # Extract the first word of "$tool_basename", so it can be a program name with args.
25403set dummy $tool_basename; ac_word=$2
25404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25405$as_echo_n "checking for $ac_word... " >&6; }
25406if ${ac_cv_path_JAVAH+:} false; then :
25407  $as_echo_n "(cached) " >&6
25408else
25409  case $JAVAH in
25410  [\\/]* | ?:[\\/]*)
25411  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25412  ;;
25413  *)
25414  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25415for as_dir in $PATH
25416do
25417  IFS=$as_save_IFS
25418  test -z "$as_dir" && as_dir=.
25419    for ac_exec_ext in '' $ac_executable_extensions; do
25420  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25421    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25422    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25423    break 2
25424  fi
25425done
25426  done
25427IFS=$as_save_IFS
25428
25429  ;;
25430esac
25431fi
25432JAVAH=$ac_cv_path_JAVAH
25433if test -n "$JAVAH"; then
25434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25435$as_echo "$JAVAH" >&6; }
25436else
25437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25438$as_echo "no" >&6; }
25439fi
25440
25441
25442        if test "x$JAVAH" = x; then
25443          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25444        fi
25445      else
25446        # Otherwise we believe it is a complete path. Use it as it is.
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25448$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25449        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25450$as_echo_n "checking for JAVAH... " >&6; }
25451        if test ! -x "$tool_specified"; then
25452          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25453$as_echo "not found" >&6; }
25454          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25455        fi
25456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25457$as_echo "$tool_specified" >&6; }
25458      fi
25459    fi
25460  fi
25461
25462
25463
25464  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25465
25466  # Publish this variable in the help.
25467
25468
25469  if test "x$JAR" = x; then
25470    # The variable is not set by user, try to locate tool using the code snippet
25471
25472      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25473$as_echo_n "checking for jar in Boot JDK... " >&6; }
25474      JAR=$BOOT_JDK/bin/jar
25475      if test ! -x $JAR; then
25476        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25477$as_echo "not found" >&6; }
25478        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25479$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25480        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25481      fi
25482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25483$as_echo "ok" >&6; }
25484
25485
25486  else
25487    # The variable is set, but is it from the command line or the environment?
25488
25489    # Try to remove the string !JAR! from our list.
25490    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25491    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25492      # If it failed, the variable was not from the command line. Ignore it,
25493      # but warn the user (except for BASH, which is always set by the calling BASH).
25494      if test "xJAR" != xBASH; then
25495        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25496$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25497      fi
25498      # Try to locate tool using the code snippet
25499
25500      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25501$as_echo_n "checking for jar in Boot JDK... " >&6; }
25502      JAR=$BOOT_JDK/bin/jar
25503      if test ! -x $JAR; then
25504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25505$as_echo "not found" >&6; }
25506        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25507$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25508        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25509      fi
25510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25511$as_echo "ok" >&6; }
25512
25513
25514    else
25515      # If it succeeded, then it was overridden by the user. We will use it
25516      # for the tool.
25517
25518      # First remove it from the list of overridden variables, so we can test
25519      # for unknown variables in the end.
25520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25521
25522      # Check if the provided tool contains a complete path.
25523      tool_specified="$JAR"
25524      tool_basename="${tool_specified##*/}"
25525      if test "x$tool_basename" = "x$tool_specified"; then
25526        # A command without a complete path is provided, search $PATH.
25527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25528$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25529        # Extract the first word of "$tool_basename", so it can be a program name with args.
25530set dummy $tool_basename; ac_word=$2
25531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25532$as_echo_n "checking for $ac_word... " >&6; }
25533if ${ac_cv_path_JAR+:} false; then :
25534  $as_echo_n "(cached) " >&6
25535else
25536  case $JAR in
25537  [\\/]* | ?:[\\/]*)
25538  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25539  ;;
25540  *)
25541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25542for as_dir in $PATH
25543do
25544  IFS=$as_save_IFS
25545  test -z "$as_dir" && as_dir=.
25546    for ac_exec_ext in '' $ac_executable_extensions; do
25547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25548    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25550    break 2
25551  fi
25552done
25553  done
25554IFS=$as_save_IFS
25555
25556  ;;
25557esac
25558fi
25559JAR=$ac_cv_path_JAR
25560if test -n "$JAR"; then
25561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25562$as_echo "$JAR" >&6; }
25563else
25564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25565$as_echo "no" >&6; }
25566fi
25567
25568
25569        if test "x$JAR" = x; then
25570          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25571        fi
25572      else
25573        # Otherwise we believe it is a complete path. Use it as it is.
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25575$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25577$as_echo_n "checking for JAR... " >&6; }
25578        if test ! -x "$tool_specified"; then
25579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25580$as_echo "not found" >&6; }
25581          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25582        fi
25583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25584$as_echo "$tool_specified" >&6; }
25585      fi
25586    fi
25587  fi
25588
25589
25590
25591  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25592
25593  # Publish this variable in the help.
25594
25595
25596  if test "x$NATIVE2ASCII" = x; then
25597    # The variable is not set by user, try to locate tool using the code snippet
25598
25599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25600$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25601      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25602      if test ! -x $NATIVE2ASCII; then
25603        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25604$as_echo "not found" >&6; }
25605        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25606$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25607        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25608      fi
25609      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25610$as_echo "ok" >&6; }
25611
25612
25613  else
25614    # The variable is set, but is it from the command line or the environment?
25615
25616    # Try to remove the string !NATIVE2ASCII! from our list.
25617    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25618    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25619      # If it failed, the variable was not from the command line. Ignore it,
25620      # but warn the user (except for BASH, which is always set by the calling BASH).
25621      if test "xNATIVE2ASCII" != xBASH; then
25622        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25623$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25624      fi
25625      # Try to locate tool using the code snippet
25626
25627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25628$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25629      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25630      if test ! -x $NATIVE2ASCII; then
25631        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25632$as_echo "not found" >&6; }
25633        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25634$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25635        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25636      fi
25637      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25638$as_echo "ok" >&6; }
25639
25640
25641    else
25642      # If it succeeded, then it was overridden by the user. We will use it
25643      # for the tool.
25644
25645      # First remove it from the list of overridden variables, so we can test
25646      # for unknown variables in the end.
25647      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25648
25649      # Check if the provided tool contains a complete path.
25650      tool_specified="$NATIVE2ASCII"
25651      tool_basename="${tool_specified##*/}"
25652      if test "x$tool_basename" = "x$tool_specified"; then
25653        # A command without a complete path is provided, search $PATH.
25654        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25655$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25656        # Extract the first word of "$tool_basename", so it can be a program name with args.
25657set dummy $tool_basename; ac_word=$2
25658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25659$as_echo_n "checking for $ac_word... " >&6; }
25660if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25661  $as_echo_n "(cached) " >&6
25662else
25663  case $NATIVE2ASCII in
25664  [\\/]* | ?:[\\/]*)
25665  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25666  ;;
25667  *)
25668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25669for as_dir in $PATH
25670do
25671  IFS=$as_save_IFS
25672  test -z "$as_dir" && as_dir=.
25673    for ac_exec_ext in '' $ac_executable_extensions; do
25674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25675    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25677    break 2
25678  fi
25679done
25680  done
25681IFS=$as_save_IFS
25682
25683  ;;
25684esac
25685fi
25686NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25687if test -n "$NATIVE2ASCII"; then
25688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25689$as_echo "$NATIVE2ASCII" >&6; }
25690else
25691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25692$as_echo "no" >&6; }
25693fi
25694
25695
25696        if test "x$NATIVE2ASCII" = x; then
25697          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25698        fi
25699      else
25700        # Otherwise we believe it is a complete path. Use it as it is.
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25702$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25704$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25705        if test ! -x "$tool_specified"; then
25706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25707$as_echo "not found" >&6; }
25708          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25709        fi
25710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25711$as_echo "$tool_specified" >&6; }
25712      fi
25713    fi
25714  fi
25715
25716
25717
25718  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25719
25720  # Publish this variable in the help.
25721
25722
25723  if test "x$JARSIGNER" = x; then
25724    # The variable is not set by user, try to locate tool using the code snippet
25725
25726      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25727$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25728      JARSIGNER=$BOOT_JDK/bin/jarsigner
25729      if test ! -x $JARSIGNER; then
25730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25731$as_echo "not found" >&6; }
25732        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25733$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25734        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25735      fi
25736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25737$as_echo "ok" >&6; }
25738
25739
25740  else
25741    # The variable is set, but is it from the command line or the environment?
25742
25743    # Try to remove the string !JARSIGNER! from our list.
25744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25746      # If it failed, the variable was not from the command line. Ignore it,
25747      # but warn the user (except for BASH, which is always set by the calling BASH).
25748      if test "xJARSIGNER" != xBASH; then
25749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25750$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25751      fi
25752      # Try to locate tool using the code snippet
25753
25754      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25755$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25756      JARSIGNER=$BOOT_JDK/bin/jarsigner
25757      if test ! -x $JARSIGNER; then
25758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25759$as_echo "not found" >&6; }
25760        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25761$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25762        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25763      fi
25764      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25765$as_echo "ok" >&6; }
25766
25767
25768    else
25769      # If it succeeded, then it was overridden by the user. We will use it
25770      # for the tool.
25771
25772      # First remove it from the list of overridden variables, so we can test
25773      # for unknown variables in the end.
25774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25775
25776      # Check if the provided tool contains a complete path.
25777      tool_specified="$JARSIGNER"
25778      tool_basename="${tool_specified##*/}"
25779      if test "x$tool_basename" = "x$tool_specified"; then
25780        # A command without a complete path is provided, search $PATH.
25781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25782$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25783        # Extract the first word of "$tool_basename", so it can be a program name with args.
25784set dummy $tool_basename; ac_word=$2
25785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25786$as_echo_n "checking for $ac_word... " >&6; }
25787if ${ac_cv_path_JARSIGNER+:} false; then :
25788  $as_echo_n "(cached) " >&6
25789else
25790  case $JARSIGNER in
25791  [\\/]* | ?:[\\/]*)
25792  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25793  ;;
25794  *)
25795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25796for as_dir in $PATH
25797do
25798  IFS=$as_save_IFS
25799  test -z "$as_dir" && as_dir=.
25800    for ac_exec_ext in '' $ac_executable_extensions; do
25801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25802    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25804    break 2
25805  fi
25806done
25807  done
25808IFS=$as_save_IFS
25809
25810  ;;
25811esac
25812fi
25813JARSIGNER=$ac_cv_path_JARSIGNER
25814if test -n "$JARSIGNER"; then
25815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25816$as_echo "$JARSIGNER" >&6; }
25817else
25818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25819$as_echo "no" >&6; }
25820fi
25821
25822
25823        if test "x$JARSIGNER" = x; then
25824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25825        fi
25826      else
25827        # Otherwise we believe it is a complete path. Use it as it is.
25828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25829$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25831$as_echo_n "checking for JARSIGNER... " >&6; }
25832        if test ! -x "$tool_specified"; then
25833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25834$as_echo "not found" >&6; }
25835          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25836        fi
25837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25838$as_echo "$tool_specified" >&6; }
25839      fi
25840    fi
25841  fi
25842
25843
25844
25845  # Finally, set some other options...
25846
25847  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25848  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25849
25850
25851
25852
25853  ##############################################################################
25854  #
25855  # Specify options for anything that is run with the Boot JDK.
25856  #
25857
25858# Check whether --with-boot-jdk-jvmargs was given.
25859if test "${with_boot_jdk_jvmargs+set}" = set; then :
25860  withval=$with_boot_jdk_jvmargs;
25861fi
25862
25863
25864  if test "x$with_boot_jdk_jvmargs" = x; then
25865    # Not all JVM:s accept the same arguments on the command line.
25866    # OpenJDK specific increase in thread stack for JDK build,
25867    # well more specifically, when running javac.
25868    if test "x$BUILD_NUM_BITS" = x32; then
25869      STACK_SIZE=768
25870    else
25871      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25872      # since 64-bit pointers are pushed on the stach. Apparently, we need
25873      # to increase the stack space when javacing the JDK....
25874      STACK_SIZE=1536
25875    fi
25876
25877    # Minimum amount of heap memory.
25878
25879  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25880  $ECHO "Command: $JAVA -Xms64M -version" >&5
25881  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25882  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25883  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25884  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25885    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25886    JVM_ARG_OK=true
25887  else
25888    $ECHO "Arg failed:" >&5
25889    $ECHO "$OUTPUT" >&5
25890    JVM_ARG_OK=false
25891  fi
25892
25893    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25894      # Why does macosx need more heap? Its the huge JDK batch.
25895
25896  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25897  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25898  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25899  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25900  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25901  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25902    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25903    JVM_ARG_OK=true
25904  else
25905    $ECHO "Arg failed:" >&5
25906    $ECHO "$OUTPUT" >&5
25907    JVM_ARG_OK=false
25908  fi
25909
25910    else
25911
25912  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25913  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25914  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25915  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25916  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25917  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25918    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25919    JVM_ARG_OK=true
25920  else
25921    $ECHO "Arg failed:" >&5
25922    $ECHO "$OUTPUT" >&5
25923    JVM_ARG_OK=false
25924  fi
25925
25926    fi
25927    # When is adding -client something that speeds up the JVM?
25928    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25929
25930  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25931  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25932  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25933  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25934  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25935  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25936    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25937    JVM_ARG_OK=true
25938  else
25939    $ECHO "Arg failed:" >&5
25940    $ECHO "$OUTPUT" >&5
25941    JVM_ARG_OK=false
25942  fi
25943
25944    # Disable special log output when a debug build is used as Boot JDK...
25945
25946  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25947  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25948  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25949  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25950  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25951  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25952    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25953    JVM_ARG_OK=true
25954  else
25955    $ECHO "Arg failed:" >&5
25956    $ECHO "$OUTPUT" >&5
25957    JVM_ARG_OK=false
25958  fi
25959
25960  fi
25961
25962  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25963
25964
25965
25966###############################################################################
25967#
25968# Configure the sources to use. We can add or override individual directories.
25969#
25970###############################################################################
25971
25972
25973  # Where are the sources. Any of these can be overridden
25974  # using --with-override-corba and the likes.
25975  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25976  CORBA_TOPDIR="$SRC_ROOT/corba"
25977  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25978  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25979  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25980  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25981  JDK_TOPDIR="$SRC_ROOT/jdk"
25982
25983
25984
25985
25986
25987
25988
25989
25990
25991
25992  ###############################################################################
25993  #
25994  # Pickup additional source for a component from outside of the source root
25995  # or override source for a component.
25996  #
25997
25998# Check whether --with-add-source-root was given.
25999if test "${with_add_source_root+set}" = set; then :
26000  withval=$with_add_source_root;
26001fi
26002
26003
26004
26005# Check whether --with-override-source-root was given.
26006if test "${with_override_source_root+set}" = set; then :
26007  withval=$with_override_source_root;
26008fi
26009
26010
26011
26012# Check whether --with-adds-and-overrides was given.
26013if test "${with_adds_and_overrides+set}" = set; then :
26014  withval=$with_adds_and_overrides;
26015fi
26016
26017
26018  if test "x$with_adds_and_overrides" != x; then
26019    with_add_source_root="$with_adds_and_overrides/adds"
26020    with_override_source_root="$with_adds_and_overrides/overrides"
26021  fi
26022
26023  if test "x$with_add_source_root" != x; then
26024    if ! test -d $with_add_source_root; then
26025      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26026    fi
26027    CURDIR="$PWD"
26028    cd "$with_add_source_root"
26029    ADD_SRC_ROOT="`pwd`"
26030    cd "$CURDIR"
26031    # Verify that the addon source root does not have any root makefiles.
26032    # If it does, then it is usually an error, prevent this.
26033    if test -f $with_add_source_root/langtools/make/Makefile; then
26034      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
26035    fi
26036    if test -f $with_add_source_root/corba/make/Makefile; then
26037      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
26038    fi
26039    if test -f $with_add_source_root/jaxp/make/Makefile; then
26040      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
26041    fi
26042    if test -f $with_add_source_root/jaxws/make/Makefile; then
26043      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
26044    fi
26045    if test -f $with_add_source_root/hotspot/make/Makefile; then
26046      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
26047    fi
26048    if test -f $with_add_source_root/nashorn/make/Makefile; then
26049      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
26050    fi
26051    if test -f $with_add_source_root/jdk/make/Makefile; then
26052      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
26053    fi
26054  fi
26055
26056
26057  if test "x$with_override_source_root" != x; then
26058    if ! test -d $with_override_source_root; then
26059      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26060    fi
26061    CURDIR="$PWD"
26062    cd "$with_override_source_root"
26063    OVERRIDE_SRC_ROOT="`pwd`"
26064    cd "$CURDIR"
26065    if test -f $with_override_source_root/langtools/make/Makefile; then
26066      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
26067    fi
26068    if test -f $with_override_source_root/corba/make/Makefile; then
26069      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
26070    fi
26071    if test -f $with_override_source_root/jaxp/make/Makefile; then
26072      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
26073    fi
26074    if test -f $with_override_source_root/jaxws/make/Makefile; then
26075      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
26076    fi
26077    if test -f $with_override_source_root/hotspot/make/Makefile; then
26078      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
26079    fi
26080    if test -f $with_override_source_root/nashorn/make/Makefile; then
26081      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
26082    fi
26083    if test -f $with_override_source_root/jdk/make/Makefile; then
26084      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
26085    fi
26086  fi
26087
26088
26089  ###############################################################################
26090  #
26091  # Override a repo completely, this is used for example when you have 3 small
26092  # development sandboxes of the langtools sources and want to avoid having 3 full
26093  # OpenJDK sources checked out on disk.
26094  #
26095  # Assuming that the 3 langtools sandboxes are located here:
26096  # /home/fredrik/sandbox1/langtools
26097  # /home/fredrik/sandbox2/langtools
26098  # /home/fredrik/sandbox3/langtools
26099  #
26100  # From the source root you create build subdirs manually:
26101  #     mkdir -p build1 build2 build3
26102  # in each build directory run:
26103  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26104  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26105  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26106  #
26107
26108
26109# Check whether --with-override-langtools was given.
26110if test "${with_override_langtools+set}" = set; then :
26111  withval=$with_override_langtools;
26112fi
26113
26114
26115
26116# Check whether --with-override-corba was given.
26117if test "${with_override_corba+set}" = set; then :
26118  withval=$with_override_corba;
26119fi
26120
26121
26122
26123# Check whether --with-override-jaxp was given.
26124if test "${with_override_jaxp+set}" = set; then :
26125  withval=$with_override_jaxp;
26126fi
26127
26128
26129
26130# Check whether --with-override-jaxws was given.
26131if test "${with_override_jaxws+set}" = set; then :
26132  withval=$with_override_jaxws;
26133fi
26134
26135
26136
26137# Check whether --with-override-hotspot was given.
26138if test "${with_override_hotspot+set}" = set; then :
26139  withval=$with_override_hotspot;
26140fi
26141
26142
26143
26144# Check whether --with-override-nashorn was given.
26145if test "${with_override_nashorn+set}" = set; then :
26146  withval=$with_override_nashorn;
26147fi
26148
26149
26150
26151# Check whether --with-override-jdk was given.
26152if test "${with_override_jdk+set}" = set; then :
26153  withval=$with_override_jdk;
26154fi
26155
26156
26157  if test "x$with_override_langtools" != x; then
26158    CURDIR="$PWD"
26159    cd "$with_override_langtools"
26160    LANGTOOLS_TOPDIR="`pwd`"
26161    cd "$CURDIR"
26162    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26163      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26164    fi
26165    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26166$as_echo_n "checking if langtools should be overridden... " >&6; }
26167    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26168$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26169  fi
26170  if test "x$with_override_corba" != x; then
26171    CURDIR="$PWD"
26172    cd "$with_override_corba"
26173    CORBA_TOPDIR="`pwd`"
26174    cd "$CURDIR"
26175    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26176      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26177    fi
26178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26179$as_echo_n "checking if corba should be overridden... " >&6; }
26180    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26181$as_echo "yes with $CORBA_TOPDIR" >&6; }
26182  fi
26183  if test "x$with_override_jaxp" != x; then
26184    CURDIR="$PWD"
26185    cd "$with_override_jaxp"
26186    JAXP_TOPDIR="`pwd`"
26187    cd "$CURDIR"
26188    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26189      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26190    fi
26191    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26192$as_echo_n "checking if jaxp should be overridden... " >&6; }
26193    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26194$as_echo "yes with $JAXP_TOPDIR" >&6; }
26195  fi
26196  if test "x$with_override_jaxws" != x; then
26197    CURDIR="$PWD"
26198    cd "$with_override_jaxws"
26199    JAXWS_TOPDIR="`pwd`"
26200    cd "$CURDIR"
26201    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26202      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26203    fi
26204    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26205$as_echo_n "checking if jaxws should be overridden... " >&6; }
26206    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26207$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26208  fi
26209  if test "x$with_override_hotspot" != x; then
26210    CURDIR="$PWD"
26211    cd "$with_override_hotspot"
26212    HOTSPOT_TOPDIR="`pwd`"
26213    cd "$CURDIR"
26214    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26215      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26216    fi
26217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26218$as_echo_n "checking if hotspot should be overridden... " >&6; }
26219    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26220$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26221  fi
26222  if test "x$with_override_nashorn" != x; then
26223    CURDIR="$PWD"
26224    cd "$with_override_nashorn"
26225    NASHORN_TOPDIR="`pwd`"
26226    cd "$CURDIR"
26227    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26228      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26229    fi
26230    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26231$as_echo_n "checking if nashorn should be overridden... " >&6; }
26232    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26233$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26234  fi
26235  if test "x$with_override_jdk" != x; then
26236    CURDIR="$PWD"
26237    cd "$with_override_jdk"
26238    JDK_TOPDIR="`pwd`"
26239    cd "$CURDIR"
26240    if ! test -f $JDK_TOPDIR/make/Makefile; then
26241      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26242    fi
26243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26244$as_echo_n "checking if JDK should be overridden... " >&6; }
26245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26246$as_echo "yes with $JDK_TOPDIR" >&6; }
26247  fi
26248
26249
26250  BUILD_OUTPUT="$OUTPUT_ROOT"
26251
26252
26253  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26254  BUILD_HOTSPOT=true
26255
26256
26257
26258# Check whether --with-import-hotspot was given.
26259if test "${with_import_hotspot+set}" = set; then :
26260  withval=$with_import_hotspot;
26261fi
26262
26263  if test "x$with_import_hotspot" != x; then
26264    CURDIR="$PWD"
26265    cd "$with_import_hotspot"
26266    HOTSPOT_DIST="`pwd`"
26267    cd "$CURDIR"
26268    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26269      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26270    fi
26271    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26272$as_echo_n "checking if hotspot should be imported... " >&6; }
26273    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26274$as_echo "yes from $HOTSPOT_DIST" >&6; }
26275    BUILD_HOTSPOT=false
26276  fi
26277
26278  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26279
26280
26281###############################################################################
26282#
26283# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26284# native code.
26285#
26286###############################################################################
26287
26288# First determine the toolchain type (compiler family)
26289
26290
26291# Check whether --with-toolchain-type was given.
26292if test "${with_toolchain_type+set}" = set; then :
26293  withval=$with_toolchain_type;
26294fi
26295
26296
26297  # Use indirect variable referencing
26298  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26299  VALID_TOOLCHAINS=${!toolchain_var_name}
26300  # First toolchain type in the list is the default
26301  DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26302
26303  if test "x$with_toolchain_type" = xlist; then
26304    # List all toolchains
26305    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26306$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26307    for toolchain in $VALID_TOOLCHAINS; do
26308      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26309      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26310      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26311    done
26312
26313    exit 0
26314  elif test "x$with_toolchain_type" != x; then
26315    # User override; check that it is valid
26316    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26317      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26318$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26319      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26320$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26321      as_fn_error $? "Cannot continue." "$LINENO" 5
26322    fi
26323    TOOLCHAIN_TYPE=$with_toolchain_type
26324  else
26325    # No flag given, use default
26326    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26327  fi
26328
26329
26330  TOOLCHAIN_CC_BINARY_clang="clang"
26331  TOOLCHAIN_CC_BINARY_gcc="gcc"
26332  TOOLCHAIN_CC_BINARY_microsoft="cl"
26333  TOOLCHAIN_CC_BINARY_solstudio="cc"
26334  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26335
26336  TOOLCHAIN_CXX_BINARY_clang="clang++"
26337  TOOLCHAIN_CXX_BINARY_gcc="g++"
26338  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26339  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26340  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26341
26342  # Use indirect variable referencing
26343  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26344  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26345  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26346  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26347  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26348  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26349
26350
26351  # Define filename patterns
26352  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26353    LIBRARY_PREFIX=
26354    SHARED_LIBRARY_SUFFIX='.dll'
26355    STATIC_LIBRARY_SUFFIX='.lib'
26356    SHARED_LIBRARY='$1.dll'
26357    STATIC_LIBRARY='$1.lib'
26358    OBJ_SUFFIX='.obj'
26359    EXE_SUFFIX='.exe'
26360  else
26361    LIBRARY_PREFIX=lib
26362    SHARED_LIBRARY_SUFFIX='.so'
26363    STATIC_LIBRARY_SUFFIX='.a'
26364    SHARED_LIBRARY='lib$1.so'
26365    STATIC_LIBRARY='lib$1.a'
26366    OBJ_SUFFIX='.o'
26367    EXE_SUFFIX=''
26368    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26369      SHARED_LIBRARY='lib$1.dylib'
26370      SHARED_LIBRARY_SUFFIX='.dylib'
26371    fi
26372  fi
26373
26374
26375
26376
26377
26378
26379
26380
26381
26382
26383  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26384    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26385$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26386  else
26387    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26388$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26389  fi
26390
26391
26392# Then detect the actual binaries needed
26393
26394  # FIXME: Is this needed?
26395  ac_ext=cpp
26396ac_cpp='$CXXCPP $CPPFLAGS'
26397ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26398ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26399ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26400
26401
26402  # Store the CFLAGS etc passed to the configure script.
26403  ORG_CFLAGS="$CFLAGS"
26404  ORG_CXXFLAGS="$CXXFLAGS"
26405  ORG_OBJCFLAGS="$OBJCFLAGS"
26406
26407  # On Windows, we need to detect the visual studio installation first.
26408  # This will change the PATH, but we need to keep that new PATH even
26409  # after toolchain detection is done, since the compiler (on x86) uses
26410  # it for DLL resolution in runtime.
26411  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26412
26413  # Store path to cygwin link.exe to help excluding it when searching for
26414  # VS linker. This must be done before changing the PATH when looking for VS.
26415  # Extract the first word of "link", so it can be a program name with args.
26416set dummy link; ac_word=$2
26417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26418$as_echo_n "checking for $ac_word... " >&6; }
26419if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26420  $as_echo_n "(cached) " >&6
26421else
26422  case $CYGWIN_LINK in
26423  [\\/]* | ?:[\\/]*)
26424  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26425  ;;
26426  *)
26427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26428for as_dir in $PATH
26429do
26430  IFS=$as_save_IFS
26431  test -z "$as_dir" && as_dir=.
26432    for ac_exec_ext in '' $ac_executable_extensions; do
26433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26434    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26436    break 2
26437  fi
26438done
26439  done
26440IFS=$as_save_IFS
26441
26442  ;;
26443esac
26444fi
26445CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26446if test -n "$CYGWIN_LINK"; then
26447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26448$as_echo "$CYGWIN_LINK" >&6; }
26449else
26450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26451$as_echo "no" >&6; }
26452fi
26453
26454
26455  if test "x$CYGWIN_LINK" != x; then
26456    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26457$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26458    "$CYGWIN_LINK" --version > /dev/null
26459    if test $? -eq 0 ; then
26460      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26461$as_echo "yes" >&6; }
26462    else
26463      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26464$as_echo "no" >&6; }
26465      # This might be the VS linker. Don't exclude it later on.
26466      CYGWIN_LINK=""
26467    fi
26468  fi
26469
26470  # First-hand choice is to locate and run the vsvars bat file.
26471
26472  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26473    VCVARSFILE="vc/bin/vcvars32.bat"
26474  else
26475    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26476  fi
26477
26478  VS_ENV_CMD=""
26479  VS_ENV_ARGS=""
26480  if test "x$with_toolsdir" != x; then
26481
26482  if test "x$VS_ENV_CMD" = x; then
26483    VS100BASE="$with_toolsdir/../.."
26484    METHOD="--with-tools-dir"
26485
26486  windows_path="$VS100BASE"
26487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26488    unix_path=`$CYGPATH -u "$windows_path"`
26489    VS100BASE="$unix_path"
26490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26492    VS100BASE="$unix_path"
26493  fi
26494
26495    if test -d "$VS100BASE"; then
26496      if test -f "$VS100BASE/$VCVARSFILE"; then
26497        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26498$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26499        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26500      else
26501        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26502$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26503        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26504$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26505      fi
26506    fi
26507  fi
26508
26509  fi
26510
26511  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26512    # Having specified an argument which is incorrect will produce an instant failure;
26513    # we should not go on looking
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26515$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26516    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26517$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26518    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26519  fi
26520
26521  if test "x$VS100COMNTOOLS" != x; then
26522
26523  if test "x$VS_ENV_CMD" = x; then
26524    VS100BASE="$VS100COMNTOOLS/../.."
26525    METHOD="VS100COMNTOOLS variable"
26526
26527  windows_path="$VS100BASE"
26528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26529    unix_path=`$CYGPATH -u "$windows_path"`
26530    VS100BASE="$unix_path"
26531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26533    VS100BASE="$unix_path"
26534  fi
26535
26536    if test -d "$VS100BASE"; then
26537      if test -f "$VS100BASE/$VCVARSFILE"; then
26538        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26539$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26540        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26541      else
26542        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26543$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26544        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26545$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26546      fi
26547    fi
26548  fi
26549
26550  fi
26551  if test "x$PROGRAMFILES" != x; then
26552
26553  if test "x$VS_ENV_CMD" = x; then
26554    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26555    METHOD="well-known name"
26556
26557  windows_path="$VS100BASE"
26558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26559    unix_path=`$CYGPATH -u "$windows_path"`
26560    VS100BASE="$unix_path"
26561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26563    VS100BASE="$unix_path"
26564  fi
26565
26566    if test -d "$VS100BASE"; then
26567      if test -f "$VS100BASE/$VCVARSFILE"; then
26568        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26569$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26570        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26571      else
26572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26573$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26574        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26575$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26576      fi
26577    fi
26578  fi
26579
26580  fi
26581
26582  if test "x$VS_ENV_CMD" = x; then
26583    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26584    METHOD="well-known name"
26585
26586  windows_path="$VS100BASE"
26587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26588    unix_path=`$CYGPATH -u "$windows_path"`
26589    VS100BASE="$unix_path"
26590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26592    VS100BASE="$unix_path"
26593  fi
26594
26595    if test -d "$VS100BASE"; then
26596      if test -f "$VS100BASE/$VCVARSFILE"; then
26597        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26598$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26599        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26600      else
26601        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26602$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26603        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26604$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26605      fi
26606    fi
26607  fi
26608
26609
26610  if test "x$VS_ENV_CMD" = x; then
26611    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26612    METHOD="well-known name"
26613
26614  windows_path="$VS100BASE"
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616    unix_path=`$CYGPATH -u "$windows_path"`
26617    VS100BASE="$unix_path"
26618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26620    VS100BASE="$unix_path"
26621  fi
26622
26623    if test -d "$VS100BASE"; then
26624      if test -f "$VS100BASE/$VCVARSFILE"; then
26625        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26626$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26627        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26628      else
26629        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26630$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26631        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26632$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26633      fi
26634    fi
26635  fi
26636
26637
26638  if test "x$ProgramW6432" != x; then
26639
26640  if test "x$VS_ENV_CMD" = x; then
26641    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26642    METHOD="well-known name"
26643
26644  windows_path="$WIN_SDK_BASE"
26645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26646    unix_path=`$CYGPATH -u "$windows_path"`
26647    WIN_SDK_BASE="$unix_path"
26648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26650    WIN_SDK_BASE="$unix_path"
26651  fi
26652
26653    if test -d "$WIN_SDK_BASE"; then
26654      # There have been cases of partial or broken SDK installations. A missing
26655      # lib dir is not going to work.
26656      if test ! -d "$WIN_SDK_BASE/../lib"; then
26657        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26658$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26659        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26660$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26661      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26662        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26663$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26664        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26665        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26666          VS_ENV_ARGS="/x86"
26667        else
26668          VS_ENV_ARGS="/x64"
26669        fi
26670      else
26671        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26672$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26673        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26674$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26675      fi
26676    fi
26677  fi
26678
26679  fi
26680  if test "x$PROGRAMW6432" != x; then
26681
26682  if test "x$VS_ENV_CMD" = x; then
26683    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26684    METHOD="well-known name"
26685
26686  windows_path="$WIN_SDK_BASE"
26687  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26688    unix_path=`$CYGPATH -u "$windows_path"`
26689    WIN_SDK_BASE="$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    WIN_SDK_BASE="$unix_path"
26693  fi
26694
26695    if test -d "$WIN_SDK_BASE"; then
26696      # There have been cases of partial or broken SDK installations. A missing
26697      # lib dir is not going to work.
26698      if test ! -d "$WIN_SDK_BASE/../lib"; then
26699        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26700$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26701        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26702$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26703      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26704        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26705$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26706        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26707        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26708          VS_ENV_ARGS="/x86"
26709        else
26710          VS_ENV_ARGS="/x64"
26711        fi
26712      else
26713        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26714$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26715        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26716$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26717      fi
26718    fi
26719  fi
26720
26721  fi
26722  if test "x$PROGRAMFILES" != x; then
26723
26724  if test "x$VS_ENV_CMD" = x; then
26725    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26726    METHOD="well-known name"
26727
26728  windows_path="$WIN_SDK_BASE"
26729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26730    unix_path=`$CYGPATH -u "$windows_path"`
26731    WIN_SDK_BASE="$unix_path"
26732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26734    WIN_SDK_BASE="$unix_path"
26735  fi
26736
26737    if test -d "$WIN_SDK_BASE"; then
26738      # There have been cases of partial or broken SDK installations. A missing
26739      # lib dir is not going to work.
26740      if test ! -d "$WIN_SDK_BASE/../lib"; then
26741        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26742$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26743        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26744$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26745      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26746        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26747$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26748        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26749        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26750          VS_ENV_ARGS="/x86"
26751        else
26752          VS_ENV_ARGS="/x64"
26753        fi
26754      else
26755        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26756$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26757        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26758$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26759      fi
26760    fi
26761  fi
26762
26763  fi
26764
26765  if test "x$VS_ENV_CMD" = x; then
26766    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26767    METHOD="well-known name"
26768
26769  windows_path="$WIN_SDK_BASE"
26770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26771    unix_path=`$CYGPATH -u "$windows_path"`
26772    WIN_SDK_BASE="$unix_path"
26773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26775    WIN_SDK_BASE="$unix_path"
26776  fi
26777
26778    if test -d "$WIN_SDK_BASE"; then
26779      # There have been cases of partial or broken SDK installations. A missing
26780      # lib dir is not going to work.
26781      if test ! -d "$WIN_SDK_BASE/../lib"; then
26782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26783$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26784        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26785$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26786      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26787        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26788$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26789        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26790        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26791          VS_ENV_ARGS="/x86"
26792        else
26793          VS_ENV_ARGS="/x64"
26794        fi
26795      else
26796        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26797$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26798        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26799$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26800      fi
26801    fi
26802  fi
26803
26804
26805  if test "x$VS_ENV_CMD" = x; then
26806    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26807    METHOD="well-known name"
26808
26809  windows_path="$WIN_SDK_BASE"
26810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26811    unix_path=`$CYGPATH -u "$windows_path"`
26812    WIN_SDK_BASE="$unix_path"
26813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26815    WIN_SDK_BASE="$unix_path"
26816  fi
26817
26818    if test -d "$WIN_SDK_BASE"; then
26819      # There have been cases of partial or broken SDK installations. A missing
26820      # lib dir is not going to work.
26821      if test ! -d "$WIN_SDK_BASE/../lib"; then
26822        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26823$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26824        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26825$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26826      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26828$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26829        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26830        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26831          VS_ENV_ARGS="/x86"
26832        else
26833          VS_ENV_ARGS="/x64"
26834        fi
26835      else
26836        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26837$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26838        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26839$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26840      fi
26841    fi
26842  fi
26843
26844
26845  if test "x$VS_ENV_CMD" != x; then
26846    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26847
26848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26849
26850  # First separate the path from the arguments. This will split at the first
26851  # space.
26852  complete="$VS_ENV_CMD"
26853  path="${complete%% *}"
26854  tmp="$complete EOL"
26855  arguments="${tmp#* }"
26856
26857  # Input might be given as Windows format, start by converting to
26858  # unix format.
26859  new_path=`$CYGPATH -u "$path"`
26860
26861  # Now try to locate executable using which
26862  new_path=`$WHICH "$new_path" 2> /dev/null`
26863  # bat and cmd files are not always considered executable in cygwin causing which
26864  # to not find them
26865  if test "x$new_path" = x \
26866      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26867      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26868    new_path=`$CYGPATH -u "$path"`
26869  fi
26870  if test "x$new_path" = x; then
26871    # Oops. Which didn't find the executable.
26872    # The splitting of arguments from the executable at a space might have been incorrect,
26873    # since paths with space are more likely in Windows. Give it another try with the whole
26874    # argument.
26875    path="$complete"
26876    arguments="EOL"
26877    new_path=`$CYGPATH -u "$path"`
26878    new_path=`$WHICH "$new_path" 2> /dev/null`
26879    # bat and cmd files are not always considered executable in cygwin causing which
26880    # to not find them
26881    if test "x$new_path" = x \
26882        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26883        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26884      new_path=`$CYGPATH -u "$path"`
26885    fi
26886    if test "x$new_path" = x; then
26887      # It's still not found. Now this is an unrecoverable error.
26888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26889$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26890      has_space=`$ECHO "$complete" | $GREP " "`
26891      if test "x$has_space" != x; then
26892        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26893$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26894      fi
26895      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26896    fi
26897  fi
26898
26899  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26900  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26901  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26902  # "foo.exe" is OK but "foo" is an error.
26903  #
26904  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26905  # It is also a way to make sure we got the proper file name for the real test later on.
26906  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26907  if test "x$test_shortpath" = x; then
26908    # Short path failed, file does not exist as specified.
26909    # Try adding .exe or .cmd
26910    if test -f "${new_path}.exe"; then
26911      input_to_shortpath="${new_path}.exe"
26912    elif test -f "${new_path}.cmd"; then
26913      input_to_shortpath="${new_path}.cmd"
26914    else
26915      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26916$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26917      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26918$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26919      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26920    fi
26921  else
26922    input_to_shortpath="$new_path"
26923  fi
26924
26925  # Call helper function which possibly converts this using DOS-style short mode.
26926  # If so, the updated path is stored in $new_path.
26927  new_path="$input_to_shortpath"
26928
26929  input_path="$input_to_shortpath"
26930  # Check if we need to convert this using DOS-style short mode. If the path
26931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26932  # take no chances and rewrite it.
26933  # Note: m4 eats our [], so we need to use [ and ] instead.
26934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26935  if test "x$has_forbidden_chars" != x; then
26936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26937    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26938    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26939    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26940      # Going to short mode and back again did indeed matter. Since short mode is
26941      # case insensitive, let's make it lowercase to improve readability.
26942      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26943      # Now convert it back to Unix-stile (cygpath)
26944      input_path=`$CYGPATH -u "$shortmode_path"`
26945      new_path="$input_path"
26946    fi
26947  fi
26948
26949  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26950  if test "x$test_cygdrive_prefix" = x; then
26951    # As a simple fix, exclude /usr/bin since it's not a real path.
26952    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26953      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26954      # a path prefixed by /cygdrive for fixpath to work.
26955      new_path="$CYGWIN_ROOT_PATH$input_path"
26956    fi
26957  fi
26958
26959  # remove trailing .exe if any
26960  new_path="${new_path/%.exe/}"
26961
26962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26963
26964  # First separate the path from the arguments. This will split at the first
26965  # space.
26966  complete="$VS_ENV_CMD"
26967  path="${complete%% *}"
26968  tmp="$complete EOL"
26969  arguments="${tmp#* }"
26970
26971  # Input might be given as Windows format, start by converting to
26972  # unix format.
26973  new_path="$path"
26974
26975  windows_path="$new_path"
26976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26977    unix_path=`$CYGPATH -u "$windows_path"`
26978    new_path="$unix_path"
26979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26981    new_path="$unix_path"
26982  fi
26983
26984
26985  # Now try to locate executable using which
26986  new_path=`$WHICH "$new_path" 2> /dev/null`
26987
26988  if test "x$new_path" = x; then
26989    # Oops. Which didn't find the executable.
26990    # The splitting of arguments from the executable at a space might have been incorrect,
26991    # since paths with space are more likely in Windows. Give it another try with the whole
26992    # argument.
26993    path="$complete"
26994    arguments="EOL"
26995    new_path="$path"
26996
26997  windows_path="$new_path"
26998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26999    unix_path=`$CYGPATH -u "$windows_path"`
27000    new_path="$unix_path"
27001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27003    new_path="$unix_path"
27004  fi
27005
27006
27007    new_path=`$WHICH "$new_path" 2> /dev/null`
27008
27009    if test "x$new_path" = x; then
27010      # It's still not found. Now this is an unrecoverable error.
27011      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27012$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27013      has_space=`$ECHO "$complete" | $GREP " "`
27014      if test "x$has_space" != x; then
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27016$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27017      fi
27018      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27019    fi
27020  fi
27021
27022  # Now new_path has a complete unix path to the binary
27023  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27024    # Keep paths in /bin as-is, but remove trailing .exe if any
27025    new_path="${new_path/%.exe/}"
27026    # Do not save /bin paths to all_fixpath_prefixes!
27027  else
27028    # Not in mixed or Windows style, start by that.
27029    new_path=`cmd //c echo $new_path`
27030
27031  input_path="$new_path"
27032  # Check if we need to convert this using DOS-style short mode. If the path
27033  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27034  # take no chances and rewrite it.
27035  # Note: m4 eats our [], so we need to use [ and ] instead.
27036  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27037  if test "x$has_forbidden_chars" != x; then
27038    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27039    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27040  fi
27041
27042    # Output is in $new_path
27043
27044  windows_path="$new_path"
27045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27046    unix_path=`$CYGPATH -u "$windows_path"`
27047    new_path="$unix_path"
27048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27050    new_path="$unix_path"
27051  fi
27052
27053    # remove trailing .exe if any
27054    new_path="${new_path/%.exe/}"
27055
27056    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27057    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27058  fi
27059
27060  else
27061    # We're on a posix platform. Hooray! :)
27062    # First separate the path from the arguments. This will split at the first
27063    # space.
27064    complete="$VS_ENV_CMD"
27065    path="${complete%% *}"
27066    tmp="$complete EOL"
27067    arguments="${tmp#* }"
27068
27069    # Cannot rely on the command "which" here since it doesn't always work.
27070    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27071    if test -z "$is_absolute_path"; then
27072      # Path to executable is not absolute. Find it.
27073      IFS_save="$IFS"
27074      IFS=:
27075      for p in $PATH; do
27076        if test -f "$p/$path" && test -x "$p/$path"; then
27077          new_path="$p/$path"
27078          break
27079        fi
27080      done
27081      IFS="$IFS_save"
27082    else
27083      # This is an absolute path, we can use it without further modifications.
27084      new_path="$path"
27085    fi
27086
27087    if test "x$new_path" = x; then
27088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27089$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27090      has_space=`$ECHO "$complete" | $GREP " "`
27091      if test "x$has_space" != x; then
27092        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27093$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27094      fi
27095      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27096    fi
27097  fi
27098
27099  # Now join together the path and the arguments once again
27100  if test "x$arguments" != xEOL; then
27101    new_complete="$new_path ${arguments% *}"
27102  else
27103    new_complete="$new_path"
27104  fi
27105
27106  if test "x$complete" != "x$new_complete"; then
27107    VS_ENV_CMD="$new_complete"
27108    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27109$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27110  fi
27111
27112
27113    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27114    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27115$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27116    cd $OUTPUT_ROOT
27117    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27118    # to autoconf standards.
27119
27120    #----
27121
27122    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27123    # but calculate the difference in Cygwin environment before/after running it and then
27124    # apply the diff.
27125
27126    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27127      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27128      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27129      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27130    else
27131      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27132      _dosbash=`cmd //c echo \`which bash\``
27133    fi
27134
27135    # generate the set of exported vars before/after the vs10 setup
27136    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27137    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27138    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27139    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27140
27141    # Now execute the newly created bat file.
27142    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27143    cmd /c localdevenvtmp.bat | cat
27144
27145    # apply the diff (less some non-vs10 vars named by "!")
27146    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27147    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27148    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27149
27150    # cleanup
27151    $RM localdevenvtmp*
27152    #----
27153    cd $CURDIR
27154    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27155      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27156$as_echo "no" >&6; }
27157      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27158$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27159      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27160$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27161      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27162$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27163      as_fn_error $? "Cannot continue" "$LINENO" 5
27164    fi
27165
27166    # Now set all paths and other env variables. This will allow the rest of
27167    # the configure script to find and run the compiler in the proper way.
27168    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27169$as_echo "$as_me: Setting extracted environment variables" >&6;}
27170    . $OUTPUT_ROOT/localdevenv.sh
27171  else
27172    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27173    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27174$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27175  fi
27176
27177  # At this point, we should have corrent variables in the environment, or we can't continue.
27178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27179$as_echo_n "checking for Visual Studio variables... " >&6; }
27180
27181  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27182    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27183      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27184$as_echo "present but broken" >&6; }
27185      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27186    else
27187      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27188$as_echo "ok" >&6; }
27189      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27190      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27191      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27192      # Remove any paths containing # (typically F#) as that messes up make
27193      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27194      VS_PATH="$PATH"
27195
27196
27197
27198    fi
27199  else
27200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27201$as_echo "not found" >&6; }
27202
27203    if test "x$VS_ENV_CMD" = x; then
27204      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27205$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27206      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27207$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27208    else
27209      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27210$as_echo "$as_me: Running the extraction script failed." >&6;}
27211    fi
27212    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27213$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27214    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27215$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27216    as_fn_error $? "Cannot continue" "$LINENO" 5
27217  fi
27218
27219  fi
27220
27221  # autoconf magic only relies on PATH, so update it if tools dir is specified
27222  OLD_PATH="$PATH"
27223
27224  # For solaris we really need solaris tools, and not the GNU equivalent.
27225  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27226  # so add that to path before starting to probe.
27227  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27228  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27229    PATH="/usr/ccs/bin:$PATH"
27230  fi
27231
27232  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27233  # override all other locations.
27234  if test "x$TOOLS_DIR" != x; then
27235    PATH=$TOOLS_DIR:$PATH
27236  fi
27237
27238  # If a devkit is found on the builddeps server, then prepend its path to the
27239  # PATH variable. If there are cross compilers available in the devkit, these
27240  # will be found by AC_PROG_CC et al.
27241  DEVKIT=
27242
27243
27244  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27245    # Source the builddeps file again, to make sure it uses the latest variables!
27246    . $builddepsfile
27247    # Look for a target and build machine specific resource!
27248    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27249    if test "x$resource" = x; then
27250      # Ok, lets instead look for a target specific resource
27251      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27252    fi
27253    if test "x$resource" = x; then
27254      # Ok, lets instead look for a build specific resource
27255      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27256    fi
27257    if test "x$resource" = x; then
27258      # Ok, lets instead look for a generic resource
27259      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27260      resource=${builddep_devkit}
27261    fi
27262    if test "x$resource" != x; then
27263      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27264$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27265      # If the resource in the builddeps.conf file is an existing directory,
27266      # for example /java/linux/cups
27267      if test -d ${resource}; then
27268        depdir=${resource}
27269      else
27270
27271  # devkit is for example mymodule
27272  # $resource is for example libs/general/libmymod_1_2_3.zip
27273  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27274  # $with_builddeps_dir is for example /localhome/builddeps
27275  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27276  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27277  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27278  filename=`basename $resource`
27279  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27280  filebase=${filename%%.*}
27281  extension=${filename#*.}
27282  installdir=$with_builddeps_dir/$filebase
27283  if test ! -f $installdir/$filename.unpacked; then
27284    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27285$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27286    if test ! -d $installdir; then
27287      mkdir -p $installdir
27288    fi
27289    if test ! -d $installdir; then
27290      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27291    fi
27292    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27293    touch $tmpfile
27294    if test ! -f $tmpfile; then
27295      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27296    fi
27297
27298  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27299  # $tmpfile is the local file name for the downloaded file.
27300  VALID_TOOL=no
27301  if test "x$BDEPS_FTP" = xwget; then
27302    VALID_TOOL=yes
27303    wget -O $tmpfile $with_builddeps_server/$resource
27304  fi
27305  if test "x$BDEPS_FTP" = xlftp; then
27306    VALID_TOOL=yes
27307    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27308  fi
27309  if test "x$BDEPS_FTP" = xftp; then
27310    VALID_TOOL=yes
27311    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27312    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27313    FTPUSERPWD=${FTPSERVER%%@*}
27314    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27315      FTPUSER=${userpwd%%:*}
27316      FTPPWD=${userpwd#*@}
27317      FTPSERVER=${FTPSERVER#*@}
27318    else
27319      FTPUSER=ftp
27320      FTPPWD=ftp
27321    fi
27322    # the "pass" command does not work on some
27323    # ftp clients (read ftp.exe) but if it works,
27324    # passive mode is better!
27325    ( \
27326        echo "user $FTPUSER $FTPPWD"        ; \
27327        echo "pass"                         ; \
27328        echo "bin"                          ; \
27329        echo "get $FTPPATH $tmpfile"              ; \
27330    ) | ftp -in $FTPSERVER
27331  fi
27332  if test "x$VALID_TOOL" != xyes; then
27333    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27334  fi
27335
27336    mv $tmpfile $installdir/$filename
27337    if test ! -s $installdir/$filename; then
27338      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27339    fi
27340    case "$extension" in
27341      zip)  echo "Unzipping $installdir/$filename..."
27342        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27343        ;;
27344      tar.gz) echo "Untaring $installdir/$filename..."
27345        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27346        ;;
27347      tgz) echo "Untaring $installdir/$filename..."
27348        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27349        ;;
27350      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27351        ;;
27352    esac
27353  fi
27354  if test -f $installdir/$filename.unpacked; then
27355    depdir=$installdir
27356  fi
27357
27358      fi
27359      # Source the builddeps file again, because in the previous command, the depdir
27360      # was updated to point at the current build dependency install directory.
27361      . $builddepsfile
27362      # Now extract variables from the builddeps.conf files.
27363      theroot=${builddep_devkit_ROOT}
27364      thecflags=${builddep_devkit_CFLAGS}
27365      thelibs=${builddep_devkit_LIBS}
27366      if test "x$depdir" = x; then
27367        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27368      fi
27369      DEVKIT=$depdir
27370      if test "x$theroot" != x; then
27371        DEVKIT="$theroot"
27372      fi
27373      if test "x$thecflags" != x; then
27374        DEVKIT_CFLAGS="$thecflags"
27375      fi
27376      if test "x$thelibs" != x; then
27377        DEVKIT_LIBS="$thelibs"
27378      fi
27379
27380        # Found devkit
27381        PATH="$DEVKIT/bin:$PATH"
27382        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27383        if test "x$x_includes" = "xNONE"; then
27384          x_includes="$SYS_ROOT/usr/include/X11"
27385        fi
27386        if test "x$x_libraries" = "xNONE"; then
27387          x_libraries="$SYS_ROOT/usr/lib"
27388        fi
27389
27390
27391    fi
27392
27393  fi
27394
27395
27396
27397  #
27398  # Setup the compilers (CC and CXX)
27399  #
27400
27401  COMPILER_NAME=C
27402  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27403
27404  if test "x$CC" != x; then
27405    # User has supplied compiler name already, always let that override.
27406    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27407$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27408    if test "x`basename $CC`" = "x$CC"; then
27409      # A command without a complete path is provided, search $PATH.
27410
27411      for ac_prog in $CC
27412do
27413  # Extract the first word of "$ac_prog", so it can be a program name with args.
27414set dummy $ac_prog; ac_word=$2
27415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27416$as_echo_n "checking for $ac_word... " >&6; }
27417if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27418  $as_echo_n "(cached) " >&6
27419else
27420  case $POTENTIAL_CC in
27421  [\\/]* | ?:[\\/]*)
27422  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27423  ;;
27424  *)
27425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27426for as_dir in $PATH
27427do
27428  IFS=$as_save_IFS
27429  test -z "$as_dir" && as_dir=.
27430    for ac_exec_ext in '' $ac_executable_extensions; do
27431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27432    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27434    break 2
27435  fi
27436done
27437  done
27438IFS=$as_save_IFS
27439
27440  ;;
27441esac
27442fi
27443POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27444if test -n "$POTENTIAL_CC"; then
27445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27446$as_echo "$POTENTIAL_CC" >&6; }
27447else
27448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27449$as_echo "no" >&6; }
27450fi
27451
27452
27453  test -n "$POTENTIAL_CC" && break
27454done
27455
27456      if test "x$POTENTIAL_CC" != x; then
27457        CC=$POTENTIAL_CC
27458      else
27459        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27460      fi
27461    else
27462      # Otherwise it might already be a complete path
27463      if test ! -x "$CC"; then
27464        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27465      fi
27466    fi
27467  else
27468    # No user supplied value. Locate compiler ourselves.
27469
27470    # If we are cross compiling, assume cross compilation tools follows the
27471    # cross compilation standard where they are prefixed with the autoconf
27472    # standard name for the target. For example the binary
27473    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27474    # If we are not cross compiling, then the default compiler name will be
27475    # used.
27476
27477    CC=
27478    # If TOOLS_DIR is set, check for all compiler names in there first
27479    # before checking the rest of the PATH.
27480    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27481    # step, this should not be necessary.
27482    if test -n "$TOOLS_DIR"; then
27483      PATH_save="$PATH"
27484      PATH="$TOOLS_DIR"
27485      for ac_prog in $SEARCH_LIST
27486do
27487  # Extract the first word of "$ac_prog", so it can be a program name with args.
27488set dummy $ac_prog; ac_word=$2
27489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27490$as_echo_n "checking for $ac_word... " >&6; }
27491if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27492  $as_echo_n "(cached) " >&6
27493else
27494  case $TOOLS_DIR_CC in
27495  [\\/]* | ?:[\\/]*)
27496  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27497  ;;
27498  *)
27499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27500for as_dir in $PATH
27501do
27502  IFS=$as_save_IFS
27503  test -z "$as_dir" && as_dir=.
27504    for ac_exec_ext in '' $ac_executable_extensions; do
27505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27506    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27508    break 2
27509  fi
27510done
27511  done
27512IFS=$as_save_IFS
27513
27514  ;;
27515esac
27516fi
27517TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27518if test -n "$TOOLS_DIR_CC"; then
27519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27520$as_echo "$TOOLS_DIR_CC" >&6; }
27521else
27522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27523$as_echo "no" >&6; }
27524fi
27525
27526
27527  test -n "$TOOLS_DIR_CC" && break
27528done
27529
27530      CC=$TOOLS_DIR_CC
27531      PATH="$PATH_save"
27532    fi
27533
27534    # AC_PATH_PROGS can't be run multiple times with the same variable,
27535    # so create a new name for this run.
27536    if test "x$CC" = x; then
27537      for ac_prog in $SEARCH_LIST
27538do
27539  # Extract the first word of "$ac_prog", so it can be a program name with args.
27540set dummy $ac_prog; ac_word=$2
27541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27542$as_echo_n "checking for $ac_word... " >&6; }
27543if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27544  $as_echo_n "(cached) " >&6
27545else
27546  case $POTENTIAL_CC in
27547  [\\/]* | ?:[\\/]*)
27548  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27549  ;;
27550  *)
27551  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27552for as_dir in $PATH
27553do
27554  IFS=$as_save_IFS
27555  test -z "$as_dir" && as_dir=.
27556    for ac_exec_ext in '' $ac_executable_extensions; do
27557  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27558    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27559    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27560    break 2
27561  fi
27562done
27563  done
27564IFS=$as_save_IFS
27565
27566  ;;
27567esac
27568fi
27569POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27570if test -n "$POTENTIAL_CC"; then
27571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27572$as_echo "$POTENTIAL_CC" >&6; }
27573else
27574  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27575$as_echo "no" >&6; }
27576fi
27577
27578
27579  test -n "$POTENTIAL_CC" && break
27580done
27581
27582      CC=$POTENTIAL_CC
27583    fi
27584
27585    if test "x$CC" = x; then
27586
27587  # Print a helpful message on how to acquire the necessary build dependency.
27588  # devkit is the help tag: freetype, cups, pulse, alsa etc
27589  MISSING_DEPENDENCY=devkit
27590
27591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27592    cygwin_help $MISSING_DEPENDENCY
27593  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27594    msys_help $MISSING_DEPENDENCY
27595  else
27596    PKGHANDLER_COMMAND=
27597
27598    case $PKGHANDLER in
27599      apt-get)
27600        apt_help     $MISSING_DEPENDENCY ;;
27601      yum)
27602        yum_help     $MISSING_DEPENDENCY ;;
27603      port)
27604        port_help    $MISSING_DEPENDENCY ;;
27605      pkgutil)
27606        pkgutil_help $MISSING_DEPENDENCY ;;
27607      pkgadd)
27608        pkgadd_help  $MISSING_DEPENDENCY ;;
27609    esac
27610
27611    if test "x$PKGHANDLER_COMMAND" != x; then
27612      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27613    fi
27614  fi
27615
27616      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27617    fi
27618  fi
27619
27620  # Now we have a compiler binary in CC. Make sure it's okay.
27621
27622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27623
27624  # First separate the path from the arguments. This will split at the first
27625  # space.
27626  complete="$CC"
27627  path="${complete%% *}"
27628  tmp="$complete EOL"
27629  arguments="${tmp#* }"
27630
27631  # Input might be given as Windows format, start by converting to
27632  # unix format.
27633  new_path=`$CYGPATH -u "$path"`
27634
27635  # Now try to locate executable using which
27636  new_path=`$WHICH "$new_path" 2> /dev/null`
27637  # bat and cmd files are not always considered executable in cygwin causing which
27638  # to not find them
27639  if test "x$new_path" = x \
27640      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27641      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27642    new_path=`$CYGPATH -u "$path"`
27643  fi
27644  if test "x$new_path" = x; then
27645    # Oops. Which didn't find the executable.
27646    # The splitting of arguments from the executable at a space might have been incorrect,
27647    # since paths with space are more likely in Windows. Give it another try with the whole
27648    # argument.
27649    path="$complete"
27650    arguments="EOL"
27651    new_path=`$CYGPATH -u "$path"`
27652    new_path=`$WHICH "$new_path" 2> /dev/null`
27653    # bat and cmd files are not always considered executable in cygwin causing which
27654    # to not find them
27655    if test "x$new_path" = x \
27656        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27657        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27658      new_path=`$CYGPATH -u "$path"`
27659    fi
27660    if test "x$new_path" = x; then
27661      # It's still not found. Now this is an unrecoverable error.
27662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27663$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27664      has_space=`$ECHO "$complete" | $GREP " "`
27665      if test "x$has_space" != x; then
27666        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27667$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27668      fi
27669      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27670    fi
27671  fi
27672
27673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27676  # "foo.exe" is OK but "foo" is an error.
27677  #
27678  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27679  # It is also a way to make sure we got the proper file name for the real test later on.
27680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27681  if test "x$test_shortpath" = x; then
27682    # Short path failed, file does not exist as specified.
27683    # Try adding .exe or .cmd
27684    if test -f "${new_path}.exe"; then
27685      input_to_shortpath="${new_path}.exe"
27686    elif test -f "${new_path}.cmd"; then
27687      input_to_shortpath="${new_path}.cmd"
27688    else
27689      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27690$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27691      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27692$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27693      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27694    fi
27695  else
27696    input_to_shortpath="$new_path"
27697  fi
27698
27699  # Call helper function which possibly converts this using DOS-style short mode.
27700  # If so, the updated path is stored in $new_path.
27701  new_path="$input_to_shortpath"
27702
27703  input_path="$input_to_shortpath"
27704  # Check if we need to convert this using DOS-style short mode. If the path
27705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27706  # take no chances and rewrite it.
27707  # Note: m4 eats our [], so we need to use [ and ] instead.
27708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27709  if test "x$has_forbidden_chars" != x; then
27710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27711    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27712    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27713    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27714      # Going to short mode and back again did indeed matter. Since short mode is
27715      # case insensitive, let's make it lowercase to improve readability.
27716      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27717      # Now convert it back to Unix-stile (cygpath)
27718      input_path=`$CYGPATH -u "$shortmode_path"`
27719      new_path="$input_path"
27720    fi
27721  fi
27722
27723  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27724  if test "x$test_cygdrive_prefix" = x; then
27725    # As a simple fix, exclude /usr/bin since it's not a real path.
27726    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27727      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27728      # a path prefixed by /cygdrive for fixpath to work.
27729      new_path="$CYGWIN_ROOT_PATH$input_path"
27730    fi
27731  fi
27732
27733  # remove trailing .exe if any
27734  new_path="${new_path/%.exe/}"
27735
27736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27737
27738  # First separate the path from the arguments. This will split at the first
27739  # space.
27740  complete="$CC"
27741  path="${complete%% *}"
27742  tmp="$complete EOL"
27743  arguments="${tmp#* }"
27744
27745  # Input might be given as Windows format, start by converting to
27746  # unix format.
27747  new_path="$path"
27748
27749  windows_path="$new_path"
27750  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27751    unix_path=`$CYGPATH -u "$windows_path"`
27752    new_path="$unix_path"
27753  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27754    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27755    new_path="$unix_path"
27756  fi
27757
27758
27759  # Now try to locate executable using which
27760  new_path=`$WHICH "$new_path" 2> /dev/null`
27761
27762  if test "x$new_path" = x; then
27763    # Oops. Which didn't find the executable.
27764    # The splitting of arguments from the executable at a space might have been incorrect,
27765    # since paths with space are more likely in Windows. Give it another try with the whole
27766    # argument.
27767    path="$complete"
27768    arguments="EOL"
27769    new_path="$path"
27770
27771  windows_path="$new_path"
27772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27773    unix_path=`$CYGPATH -u "$windows_path"`
27774    new_path="$unix_path"
27775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27777    new_path="$unix_path"
27778  fi
27779
27780
27781    new_path=`$WHICH "$new_path" 2> /dev/null`
27782
27783    if test "x$new_path" = x; then
27784      # It's still not found. Now this is an unrecoverable error.
27785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27786$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27787      has_space=`$ECHO "$complete" | $GREP " "`
27788      if test "x$has_space" != x; then
27789        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27790$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27791      fi
27792      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27793    fi
27794  fi
27795
27796  # Now new_path has a complete unix path to the binary
27797  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27798    # Keep paths in /bin as-is, but remove trailing .exe if any
27799    new_path="${new_path/%.exe/}"
27800    # Do not save /bin paths to all_fixpath_prefixes!
27801  else
27802    # Not in mixed or Windows style, start by that.
27803    new_path=`cmd //c echo $new_path`
27804
27805  input_path="$new_path"
27806  # Check if we need to convert this using DOS-style short mode. If the path
27807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27808  # take no chances and rewrite it.
27809  # Note: m4 eats our [], so we need to use [ and ] instead.
27810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27811  if test "x$has_forbidden_chars" != x; then
27812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27813    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27814  fi
27815
27816    # Output is in $new_path
27817
27818  windows_path="$new_path"
27819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27820    unix_path=`$CYGPATH -u "$windows_path"`
27821    new_path="$unix_path"
27822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27824    new_path="$unix_path"
27825  fi
27826
27827    # remove trailing .exe if any
27828    new_path="${new_path/%.exe/}"
27829
27830    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27831    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27832  fi
27833
27834  else
27835    # We're on a posix platform. Hooray! :)
27836    # First separate the path from the arguments. This will split at the first
27837    # space.
27838    complete="$CC"
27839    path="${complete%% *}"
27840    tmp="$complete EOL"
27841    arguments="${tmp#* }"
27842
27843    # Cannot rely on the command "which" here since it doesn't always work.
27844    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27845    if test -z "$is_absolute_path"; then
27846      # Path to executable is not absolute. Find it.
27847      IFS_save="$IFS"
27848      IFS=:
27849      for p in $PATH; do
27850        if test -f "$p/$path" && test -x "$p/$path"; then
27851          new_path="$p/$path"
27852          break
27853        fi
27854      done
27855      IFS="$IFS_save"
27856    else
27857      # This is an absolute path, we can use it without further modifications.
27858      new_path="$path"
27859    fi
27860
27861    if test "x$new_path" = x; then
27862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27863$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27864      has_space=`$ECHO "$complete" | $GREP " "`
27865      if test "x$has_space" != x; then
27866        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27867$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27868      fi
27869      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27870    fi
27871  fi
27872
27873  # Now join together the path and the arguments once again
27874  if test "x$arguments" != xEOL; then
27875    new_complete="$new_path ${arguments% *}"
27876  else
27877    new_complete="$new_path"
27878  fi
27879
27880  if test "x$complete" != "x$new_complete"; then
27881    CC="$new_complete"
27882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27883$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27884  fi
27885
27886  TEST_COMPILER="$CC"
27887  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27888  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27889  if test "x$OPENJDK_BUILD_OS" != xaix; then
27890    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27892$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27893
27894  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27895    # Follow a chain of symbolic links. Use readlink
27896    # where it exists, else fall back to horribly
27897    # complicated shell code.
27898    if test "x$READLINK_TESTED" != yes; then
27899      # On MacOSX there is a readlink tool with a different
27900      # purpose than the GNU readlink tool. Check the found readlink.
27901      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27902      if test "x$ISGNU" = x; then
27903        # A readlink that we do not know how to use.
27904        # Are there other non-GNU readlinks out there?
27905        READLINK_TESTED=yes
27906        READLINK=
27907      fi
27908    fi
27909
27910    if test "x$READLINK" != x; then
27911      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27912    else
27913      # Save the current directory for restoring afterwards
27914      STARTDIR=$PWD
27915      COUNTER=0
27916      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27917      sym_link_file=`$BASENAME $TEST_COMPILER`
27918      cd $sym_link_dir
27919      # Use -P flag to resolve symlinks in directories.
27920      cd `$THEPWDCMD -P`
27921      sym_link_dir=`$THEPWDCMD -P`
27922      # Resolve file symlinks
27923      while test $COUNTER -lt 20; do
27924        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27925        if test "x$ISLINK" == x; then
27926          # This is not a symbolic link! We are done!
27927          break
27928        fi
27929        # Again resolve directory symlinks since the target of the just found
27930        # link could be in a different directory
27931        cd `$DIRNAME $ISLINK`
27932        sym_link_dir=`$THEPWDCMD -P`
27933        sym_link_file=`$BASENAME $ISLINK`
27934        let COUNTER=COUNTER+1
27935      done
27936      cd $STARTDIR
27937      TEST_COMPILER=$sym_link_dir/$sym_link_file
27938    fi
27939  fi
27940
27941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27942$as_echo "$TEST_COMPILER" >&6; }
27943  fi
27944  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27945$as_echo_n "checking if CC is disguised ccache... " >&6; }
27946
27947  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27948  if test "x$COMPILER_BASENAME" = "xccache"; then
27949    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27950$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27951    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27952    # We want to control ccache invocation ourselves, so ignore this cc and try
27953    # searching again.
27954
27955    # Remove the path to the fake ccache cc from the PATH
27956    RETRY_COMPILER_SAVED_PATH="$PATH"
27957    COMPILER_DIRNAME=`$DIRNAME $CC`
27958    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27959
27960    # Try again looking for our compiler
27961    if test -n "$ac_tool_prefix"; then
27962  for ac_prog in $TOOLCHAIN_CC_BINARY
27963  do
27964    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27965set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27967$as_echo_n "checking for $ac_word... " >&6; }
27968if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27969  $as_echo_n "(cached) " >&6
27970else
27971  if test -n "$PROPER_COMPILER_CC"; then
27972  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27973else
27974as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27975for as_dir in $PATH
27976do
27977  IFS=$as_save_IFS
27978  test -z "$as_dir" && as_dir=.
27979    for ac_exec_ext in '' $ac_executable_extensions; do
27980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27981    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27983    break 2
27984  fi
27985done
27986  done
27987IFS=$as_save_IFS
27988
27989fi
27990fi
27991PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27992if test -n "$PROPER_COMPILER_CC"; then
27993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27994$as_echo "$PROPER_COMPILER_CC" >&6; }
27995else
27996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27997$as_echo "no" >&6; }
27998fi
27999
28000
28001    test -n "$PROPER_COMPILER_CC" && break
28002  done
28003fi
28004if test -z "$PROPER_COMPILER_CC"; then
28005  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28006  for ac_prog in $TOOLCHAIN_CC_BINARY
28007do
28008  # Extract the first word of "$ac_prog", so it can be a program name with args.
28009set dummy $ac_prog; ac_word=$2
28010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28011$as_echo_n "checking for $ac_word... " >&6; }
28012if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28013  $as_echo_n "(cached) " >&6
28014else
28015  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28016  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28017else
28018as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28019for as_dir in $PATH
28020do
28021  IFS=$as_save_IFS
28022  test -z "$as_dir" && as_dir=.
28023    for ac_exec_ext in '' $ac_executable_extensions; do
28024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28025    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28027    break 2
28028  fi
28029done
28030  done
28031IFS=$as_save_IFS
28032
28033fi
28034fi
28035ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28036if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28038$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28039else
28040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28041$as_echo "no" >&6; }
28042fi
28043
28044
28045  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28046done
28047
28048  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28049    PROPER_COMPILER_CC=""
28050  else
28051    case $cross_compiling:$ac_tool_warned in
28052yes:)
28053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28055ac_tool_warned=yes ;;
28056esac
28057    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28058  fi
28059fi
28060
28061
28062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28063
28064  # First separate the path from the arguments. This will split at the first
28065  # space.
28066  complete="$PROPER_COMPILER_CC"
28067  path="${complete%% *}"
28068  tmp="$complete EOL"
28069  arguments="${tmp#* }"
28070
28071  # Input might be given as Windows format, start by converting to
28072  # unix format.
28073  new_path=`$CYGPATH -u "$path"`
28074
28075  # Now try to locate executable using which
28076  new_path=`$WHICH "$new_path" 2> /dev/null`
28077  # bat and cmd files are not always considered executable in cygwin causing which
28078  # to not find them
28079  if test "x$new_path" = x \
28080      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28081      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28082    new_path=`$CYGPATH -u "$path"`
28083  fi
28084  if test "x$new_path" = x; then
28085    # Oops. Which didn't find the executable.
28086    # The splitting of arguments from the executable at a space might have been incorrect,
28087    # since paths with space are more likely in Windows. Give it another try with the whole
28088    # argument.
28089    path="$complete"
28090    arguments="EOL"
28091    new_path=`$CYGPATH -u "$path"`
28092    new_path=`$WHICH "$new_path" 2> /dev/null`
28093    # bat and cmd files are not always considered executable in cygwin causing which
28094    # to not find them
28095    if test "x$new_path" = x \
28096        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28097        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28098      new_path=`$CYGPATH -u "$path"`
28099    fi
28100    if test "x$new_path" = x; then
28101      # It's still not found. Now this is an unrecoverable error.
28102      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28103$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28104      has_space=`$ECHO "$complete" | $GREP " "`
28105      if test "x$has_space" != x; then
28106        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28107$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28108      fi
28109      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28110    fi
28111  fi
28112
28113  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28114  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28115  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28116  # "foo.exe" is OK but "foo" is an error.
28117  #
28118  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28119  # It is also a way to make sure we got the proper file name for the real test later on.
28120  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28121  if test "x$test_shortpath" = x; then
28122    # Short path failed, file does not exist as specified.
28123    # Try adding .exe or .cmd
28124    if test -f "${new_path}.exe"; then
28125      input_to_shortpath="${new_path}.exe"
28126    elif test -f "${new_path}.cmd"; then
28127      input_to_shortpath="${new_path}.cmd"
28128    else
28129      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28130$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28131      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28132$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28133      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28134    fi
28135  else
28136    input_to_shortpath="$new_path"
28137  fi
28138
28139  # Call helper function which possibly converts this using DOS-style short mode.
28140  # If so, the updated path is stored in $new_path.
28141  new_path="$input_to_shortpath"
28142
28143  input_path="$input_to_shortpath"
28144  # Check if we need to convert this using DOS-style short mode. If the path
28145  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28146  # take no chances and rewrite it.
28147  # Note: m4 eats our [], so we need to use [ and ] instead.
28148  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28149  if test "x$has_forbidden_chars" != x; then
28150    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28151    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28152    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28153    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28154      # Going to short mode and back again did indeed matter. Since short mode is
28155      # case insensitive, let's make it lowercase to improve readability.
28156      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28157      # Now convert it back to Unix-stile (cygpath)
28158      input_path=`$CYGPATH -u "$shortmode_path"`
28159      new_path="$input_path"
28160    fi
28161  fi
28162
28163  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28164  if test "x$test_cygdrive_prefix" = x; then
28165    # As a simple fix, exclude /usr/bin since it's not a real path.
28166    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28167      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28168      # a path prefixed by /cygdrive for fixpath to work.
28169      new_path="$CYGWIN_ROOT_PATH$input_path"
28170    fi
28171  fi
28172
28173  # remove trailing .exe if any
28174  new_path="${new_path/%.exe/}"
28175
28176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28177
28178  # First separate the path from the arguments. This will split at the first
28179  # space.
28180  complete="$PROPER_COMPILER_CC"
28181  path="${complete%% *}"
28182  tmp="$complete EOL"
28183  arguments="${tmp#* }"
28184
28185  # Input might be given as Windows format, start by converting to
28186  # unix format.
28187  new_path="$path"
28188
28189  windows_path="$new_path"
28190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28191    unix_path=`$CYGPATH -u "$windows_path"`
28192    new_path="$unix_path"
28193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28195    new_path="$unix_path"
28196  fi
28197
28198
28199  # Now try to locate executable using which
28200  new_path=`$WHICH "$new_path" 2> /dev/null`
28201
28202  if test "x$new_path" = x; then
28203    # Oops. Which didn't find the executable.
28204    # The splitting of arguments from the executable at a space might have been incorrect,
28205    # since paths with space are more likely in Windows. Give it another try with the whole
28206    # argument.
28207    path="$complete"
28208    arguments="EOL"
28209    new_path="$path"
28210
28211  windows_path="$new_path"
28212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213    unix_path=`$CYGPATH -u "$windows_path"`
28214    new_path="$unix_path"
28215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28217    new_path="$unix_path"
28218  fi
28219
28220
28221    new_path=`$WHICH "$new_path" 2> /dev/null`
28222
28223    if test "x$new_path" = x; then
28224      # It's still not found. Now this is an unrecoverable error.
28225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28226$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28227      has_space=`$ECHO "$complete" | $GREP " "`
28228      if test "x$has_space" != x; then
28229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28231      fi
28232      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28233    fi
28234  fi
28235
28236  # Now new_path has a complete unix path to the binary
28237  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28238    # Keep paths in /bin as-is, but remove trailing .exe if any
28239    new_path="${new_path/%.exe/}"
28240    # Do not save /bin paths to all_fixpath_prefixes!
28241  else
28242    # Not in mixed or Windows style, start by that.
28243    new_path=`cmd //c echo $new_path`
28244
28245  input_path="$new_path"
28246  # Check if we need to convert this using DOS-style short mode. If the path
28247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28248  # take no chances and rewrite it.
28249  # Note: m4 eats our [], so we need to use [ and ] instead.
28250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28251  if test "x$has_forbidden_chars" != x; then
28252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28254  fi
28255
28256    # Output is in $new_path
28257
28258  windows_path="$new_path"
28259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28260    unix_path=`$CYGPATH -u "$windows_path"`
28261    new_path="$unix_path"
28262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28264    new_path="$unix_path"
28265  fi
28266
28267    # remove trailing .exe if any
28268    new_path="${new_path/%.exe/}"
28269
28270    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28271    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28272  fi
28273
28274  else
28275    # We're on a posix platform. Hooray! :)
28276    # First separate the path from the arguments. This will split at the first
28277    # space.
28278    complete="$PROPER_COMPILER_CC"
28279    path="${complete%% *}"
28280    tmp="$complete EOL"
28281    arguments="${tmp#* }"
28282
28283    # Cannot rely on the command "which" here since it doesn't always work.
28284    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28285    if test -z "$is_absolute_path"; then
28286      # Path to executable is not absolute. Find it.
28287      IFS_save="$IFS"
28288      IFS=:
28289      for p in $PATH; do
28290        if test -f "$p/$path" && test -x "$p/$path"; then
28291          new_path="$p/$path"
28292          break
28293        fi
28294      done
28295      IFS="$IFS_save"
28296    else
28297      # This is an absolute path, we can use it without further modifications.
28298      new_path="$path"
28299    fi
28300
28301    if test "x$new_path" = x; then
28302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28303$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28304      has_space=`$ECHO "$complete" | $GREP " "`
28305      if test "x$has_space" != x; then
28306        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28307$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28308      fi
28309      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28310    fi
28311  fi
28312
28313  # Now join together the path and the arguments once again
28314  if test "x$arguments" != xEOL; then
28315    new_complete="$new_path ${arguments% *}"
28316  else
28317    new_complete="$new_path"
28318  fi
28319
28320  if test "x$complete" != "x$new_complete"; then
28321    PROPER_COMPILER_CC="$new_complete"
28322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28323$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28324  fi
28325
28326    PATH="$RETRY_COMPILER_SAVED_PATH"
28327
28328    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28329$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28330
28331  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28332    # Follow a chain of symbolic links. Use readlink
28333    # where it exists, else fall back to horribly
28334    # complicated shell code.
28335    if test "x$READLINK_TESTED" != yes; then
28336      # On MacOSX there is a readlink tool with a different
28337      # purpose than the GNU readlink tool. Check the found readlink.
28338      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28339      if test "x$ISGNU" = x; then
28340        # A readlink that we do not know how to use.
28341        # Are there other non-GNU readlinks out there?
28342        READLINK_TESTED=yes
28343        READLINK=
28344      fi
28345    fi
28346
28347    if test "x$READLINK" != x; then
28348      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28349    else
28350      # Save the current directory for restoring afterwards
28351      STARTDIR=$PWD
28352      COUNTER=0
28353      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28354      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28355      cd $sym_link_dir
28356      # Use -P flag to resolve symlinks in directories.
28357      cd `$THEPWDCMD -P`
28358      sym_link_dir=`$THEPWDCMD -P`
28359      # Resolve file symlinks
28360      while test $COUNTER -lt 20; do
28361        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28362        if test "x$ISLINK" == x; then
28363          # This is not a symbolic link! We are done!
28364          break
28365        fi
28366        # Again resolve directory symlinks since the target of the just found
28367        # link could be in a different directory
28368        cd `$DIRNAME $ISLINK`
28369        sym_link_dir=`$THEPWDCMD -P`
28370        sym_link_file=`$BASENAME $ISLINK`
28371        let COUNTER=COUNTER+1
28372      done
28373      cd $STARTDIR
28374      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28375    fi
28376  fi
28377
28378    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28379$as_echo "$PROPER_COMPILER_CC" >&6; }
28380    CC="$PROPER_COMPILER_CC"
28381  else
28382    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28383$as_echo "no, keeping CC" >&6; }
28384  fi
28385
28386
28387  COMPILER=$CC
28388  COMPILER_NAME=$COMPILER_NAME
28389
28390  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28391    # cc -V output typically looks like
28392    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28393    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28394    # Check that this is likely to be the Solaris Studio cc.
28395    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28396    if test $? -ne 0; then
28397      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28398      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28399$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28400      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28401$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28402      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28403$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28404      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28405    fi
28406    # Remove usage instructions (if present), and
28407    # collapse compiler output into a single line
28408    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28409        $SED -e 's/ *[Uu]sage:.*//'`
28410    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28411        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28412  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28413    # xlc -qversion output typically looks like
28414    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28415    #     Version: 11.01.0000.0015
28416    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28417    # Check that this is likely to be the IBM XL C compiler.
28418    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28419    if test $? -ne 0; then
28420      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28421      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28422$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28423      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28424$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28425      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28426$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28427      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28428    fi
28429    # Collapse compiler output into a single line
28430    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28431    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28432        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28433  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28434    # There is no specific version flag, but all output starts with a version string.
28435    # First line typically looks something like:
28436    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28437    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28438    # Check that this is likely to be Microsoft CL.EXE.
28439    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28440    if test $? -ne 0; then
28441      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28442$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28443      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28444$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28445      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28446    fi
28447    # Collapse compiler output into a single line
28448    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28449    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28450        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28451  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28452    # gcc --version output typically looks like
28453    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28454    #     Copyright (C) 2013 Free Software Foundation, Inc.
28455    #     This is free software; see the source for copying conditions.  There is NO
28456    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28457    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28458    # Check that this is likely to be GCC.
28459    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28460    if test $? -ne 0; then
28461      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28462$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28463      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28464$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28465      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28466    fi
28467    # Remove Copyright and legalese from version string, and
28468    # collapse into a single line
28469    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28470        $SED -e 's/ *Copyright .*//'`
28471    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28472        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28473  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28474    # clang --version output typically looks like
28475    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28476    #    clang version 3.3 (tags/RELEASE_33/final)
28477    # or
28478    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28479    #    Target: x86_64-pc-linux-gnu
28480    #    Thread model: posix
28481    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28482    # Check that this is likely to be clang
28483    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28484    if test $? -ne 0; then
28485      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
28486$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28487      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28488$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28489      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28490    fi
28491    # Collapse compiler output into a single line
28492    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28493    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28494        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28495  else
28496      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28497  fi
28498  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28499  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28500  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28501  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28502
28503  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28504$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28505
28506
28507  # Now that we have resolved CC ourself, let autoconf have its go at it
28508  ac_ext=c
28509ac_cpp='$CPP $CPPFLAGS'
28510ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28511ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28512ac_compiler_gnu=$ac_cv_c_compiler_gnu
28513if test -n "$ac_tool_prefix"; then
28514  for ac_prog in $CC
28515  do
28516    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28517set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28519$as_echo_n "checking for $ac_word... " >&6; }
28520if ${ac_cv_prog_CC+:} false; then :
28521  $as_echo_n "(cached) " >&6
28522else
28523  if test -n "$CC"; then
28524  ac_cv_prog_CC="$CC" # Let the user override the test.
28525else
28526as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28527for as_dir in $PATH
28528do
28529  IFS=$as_save_IFS
28530  test -z "$as_dir" && as_dir=.
28531    for ac_exec_ext in '' $ac_executable_extensions; do
28532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28533    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28535    break 2
28536  fi
28537done
28538  done
28539IFS=$as_save_IFS
28540
28541fi
28542fi
28543CC=$ac_cv_prog_CC
28544if test -n "$CC"; then
28545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28546$as_echo "$CC" >&6; }
28547else
28548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28549$as_echo "no" >&6; }
28550fi
28551
28552
28553    test -n "$CC" && break
28554  done
28555fi
28556if test -z "$CC"; then
28557  ac_ct_CC=$CC
28558  for ac_prog in $CC
28559do
28560  # Extract the first word of "$ac_prog", so it can be a program name with args.
28561set dummy $ac_prog; ac_word=$2
28562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28563$as_echo_n "checking for $ac_word... " >&6; }
28564if ${ac_cv_prog_ac_ct_CC+:} false; then :
28565  $as_echo_n "(cached) " >&6
28566else
28567  if test -n "$ac_ct_CC"; then
28568  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28569else
28570as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28571for as_dir in $PATH
28572do
28573  IFS=$as_save_IFS
28574  test -z "$as_dir" && as_dir=.
28575    for ac_exec_ext in '' $ac_executable_extensions; do
28576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28577    ac_cv_prog_ac_ct_CC="$ac_prog"
28578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28579    break 2
28580  fi
28581done
28582  done
28583IFS=$as_save_IFS
28584
28585fi
28586fi
28587ac_ct_CC=$ac_cv_prog_ac_ct_CC
28588if test -n "$ac_ct_CC"; then
28589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28590$as_echo "$ac_ct_CC" >&6; }
28591else
28592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28593$as_echo "no" >&6; }
28594fi
28595
28596
28597  test -n "$ac_ct_CC" && break
28598done
28599
28600  if test "x$ac_ct_CC" = x; then
28601    CC=""
28602  else
28603    case $cross_compiling:$ac_tool_warned in
28604yes:)
28605{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28606$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28607ac_tool_warned=yes ;;
28608esac
28609    CC=$ac_ct_CC
28610  fi
28611fi
28612
28613
28614test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28615$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28616as_fn_error $? "no acceptable C compiler found in \$PATH
28617See \`config.log' for more details" "$LINENO" 5; }
28618
28619# Provide some information about the compiler.
28620$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28621set X $ac_compile
28622ac_compiler=$2
28623for ac_option in --version -v -V -qversion; do
28624  { { ac_try="$ac_compiler $ac_option >&5"
28625case "(($ac_try" in
28626  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28627  *) ac_try_echo=$ac_try;;
28628esac
28629eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28630$as_echo "$ac_try_echo"; } >&5
28631  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28632  ac_status=$?
28633  if test -s conftest.err; then
28634    sed '10a\
28635... rest of stderr output deleted ...
28636         10q' conftest.err >conftest.er1
28637    cat conftest.er1 >&5
28638  fi
28639  rm -f conftest.er1 conftest.err
28640  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28641  test $ac_status = 0; }
28642done
28643
28644cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28645/* end confdefs.h.  */
28646
28647int
28648main ()
28649{
28650
28651  ;
28652  return 0;
28653}
28654_ACEOF
28655ac_clean_files_save=$ac_clean_files
28656ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28657# Try to create an executable without -o first, disregard a.out.
28658# It will help us diagnose broken compilers, and finding out an intuition
28659# of exeext.
28660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28661$as_echo_n "checking whether the C compiler works... " >&6; }
28662ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28663
28664# The possible output files:
28665ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28666
28667ac_rmfiles=
28668for ac_file in $ac_files
28669do
28670  case $ac_file in
28671    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28672    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28673  esac
28674done
28675rm -f $ac_rmfiles
28676
28677if { { ac_try="$ac_link_default"
28678case "(($ac_try" in
28679  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28680  *) ac_try_echo=$ac_try;;
28681esac
28682eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28683$as_echo "$ac_try_echo"; } >&5
28684  (eval "$ac_link_default") 2>&5
28685  ac_status=$?
28686  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28687  test $ac_status = 0; }; then :
28688  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28689# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28690# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28691# so that the user can short-circuit this test for compilers unknown to
28692# Autoconf.
28693for ac_file in $ac_files ''
28694do
28695  test -f "$ac_file" || continue
28696  case $ac_file in
28697    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28698	;;
28699    [ab].out )
28700	# We found the default executable, but exeext='' is most
28701	# certainly right.
28702	break;;
28703    *.* )
28704	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28705	then :; else
28706	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28707	fi
28708	# We set ac_cv_exeext here because the later test for it is not
28709	# safe: cross compilers may not add the suffix if given an `-o'
28710	# argument, so we may need to know it at that point already.
28711	# Even if this section looks crufty: it has the advantage of
28712	# actually working.
28713	break;;
28714    * )
28715	break;;
28716  esac
28717done
28718test "$ac_cv_exeext" = no && ac_cv_exeext=
28719
28720else
28721  ac_file=''
28722fi
28723if test -z "$ac_file"; then :
28724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28725$as_echo "no" >&6; }
28726$as_echo "$as_me: failed program was:" >&5
28727sed 's/^/| /' conftest.$ac_ext >&5
28728
28729{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28730$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28731as_fn_error 77 "C compiler cannot create executables
28732See \`config.log' for more details" "$LINENO" 5; }
28733else
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28735$as_echo "yes" >&6; }
28736fi
28737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28738$as_echo_n "checking for C compiler default output file name... " >&6; }
28739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28740$as_echo "$ac_file" >&6; }
28741ac_exeext=$ac_cv_exeext
28742
28743rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28744ac_clean_files=$ac_clean_files_save
28745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28746$as_echo_n "checking for suffix of executables... " >&6; }
28747if { { ac_try="$ac_link"
28748case "(($ac_try" in
28749  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28750  *) ac_try_echo=$ac_try;;
28751esac
28752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28753$as_echo "$ac_try_echo"; } >&5
28754  (eval "$ac_link") 2>&5
28755  ac_status=$?
28756  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28757  test $ac_status = 0; }; then :
28758  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28759# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28760# work properly (i.e., refer to `conftest.exe'), while it won't with
28761# `rm'.
28762for ac_file in conftest.exe conftest conftest.*; do
28763  test -f "$ac_file" || continue
28764  case $ac_file in
28765    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28766    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28767	  break;;
28768    * ) break;;
28769  esac
28770done
28771else
28772  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28773$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28774as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28775See \`config.log' for more details" "$LINENO" 5; }
28776fi
28777rm -f conftest conftest$ac_cv_exeext
28778{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28779$as_echo "$ac_cv_exeext" >&6; }
28780
28781rm -f conftest.$ac_ext
28782EXEEXT=$ac_cv_exeext
28783ac_exeext=$EXEEXT
28784cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28785/* end confdefs.h.  */
28786#include <stdio.h>
28787int
28788main ()
28789{
28790FILE *f = fopen ("conftest.out", "w");
28791 return ferror (f) || fclose (f) != 0;
28792
28793  ;
28794  return 0;
28795}
28796_ACEOF
28797ac_clean_files="$ac_clean_files conftest.out"
28798# Check that the compiler produces executables we can run.  If not, either
28799# the compiler is broken, or we cross compile.
28800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28801$as_echo_n "checking whether we are cross compiling... " >&6; }
28802if test "$cross_compiling" != yes; then
28803  { { ac_try="$ac_link"
28804case "(($ac_try" in
28805  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28806  *) ac_try_echo=$ac_try;;
28807esac
28808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28809$as_echo "$ac_try_echo"; } >&5
28810  (eval "$ac_link") 2>&5
28811  ac_status=$?
28812  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28813  test $ac_status = 0; }
28814  if { ac_try='./conftest$ac_cv_exeext'
28815  { { case "(($ac_try" in
28816  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28817  *) ac_try_echo=$ac_try;;
28818esac
28819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28820$as_echo "$ac_try_echo"; } >&5
28821  (eval "$ac_try") 2>&5
28822  ac_status=$?
28823  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28824  test $ac_status = 0; }; }; then
28825    cross_compiling=no
28826  else
28827    if test "$cross_compiling" = maybe; then
28828	cross_compiling=yes
28829    else
28830	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28831$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28832as_fn_error $? "cannot run C compiled programs.
28833If you meant to cross compile, use \`--host'.
28834See \`config.log' for more details" "$LINENO" 5; }
28835    fi
28836  fi
28837fi
28838{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28839$as_echo "$cross_compiling" >&6; }
28840
28841rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28842ac_clean_files=$ac_clean_files_save
28843{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28844$as_echo_n "checking for suffix of object files... " >&6; }
28845if ${ac_cv_objext+:} false; then :
28846  $as_echo_n "(cached) " >&6
28847else
28848  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28849/* end confdefs.h.  */
28850
28851int
28852main ()
28853{
28854
28855  ;
28856  return 0;
28857}
28858_ACEOF
28859rm -f conftest.o conftest.obj
28860if { { ac_try="$ac_compile"
28861case "(($ac_try" in
28862  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28863  *) ac_try_echo=$ac_try;;
28864esac
28865eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28866$as_echo "$ac_try_echo"; } >&5
28867  (eval "$ac_compile") 2>&5
28868  ac_status=$?
28869  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28870  test $ac_status = 0; }; then :
28871  for ac_file in conftest.o conftest.obj conftest.*; do
28872  test -f "$ac_file" || continue;
28873  case $ac_file in
28874    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28875    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28876       break;;
28877  esac
28878done
28879else
28880  $as_echo "$as_me: failed program was:" >&5
28881sed 's/^/| /' conftest.$ac_ext >&5
28882
28883{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28884$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28885as_fn_error $? "cannot compute suffix of object files: cannot compile
28886See \`config.log' for more details" "$LINENO" 5; }
28887fi
28888rm -f conftest.$ac_cv_objext conftest.$ac_ext
28889fi
28890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28891$as_echo "$ac_cv_objext" >&6; }
28892OBJEXT=$ac_cv_objext
28893ac_objext=$OBJEXT
28894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28895$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28896if ${ac_cv_c_compiler_gnu+:} false; then :
28897  $as_echo_n "(cached) " >&6
28898else
28899  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28900/* end confdefs.h.  */
28901
28902int
28903main ()
28904{
28905#ifndef __GNUC__
28906       choke me
28907#endif
28908
28909  ;
28910  return 0;
28911}
28912_ACEOF
28913if ac_fn_c_try_compile "$LINENO"; then :
28914  ac_compiler_gnu=yes
28915else
28916  ac_compiler_gnu=no
28917fi
28918rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28919ac_cv_c_compiler_gnu=$ac_compiler_gnu
28920
28921fi
28922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28923$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28924if test $ac_compiler_gnu = yes; then
28925  GCC=yes
28926else
28927  GCC=
28928fi
28929ac_test_CFLAGS=${CFLAGS+set}
28930ac_save_CFLAGS=$CFLAGS
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28932$as_echo_n "checking whether $CC accepts -g... " >&6; }
28933if ${ac_cv_prog_cc_g+:} false; then :
28934  $as_echo_n "(cached) " >&6
28935else
28936  ac_save_c_werror_flag=$ac_c_werror_flag
28937   ac_c_werror_flag=yes
28938   ac_cv_prog_cc_g=no
28939   CFLAGS="-g"
28940   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28941/* end confdefs.h.  */
28942
28943int
28944main ()
28945{
28946
28947  ;
28948  return 0;
28949}
28950_ACEOF
28951if ac_fn_c_try_compile "$LINENO"; then :
28952  ac_cv_prog_cc_g=yes
28953else
28954  CFLAGS=""
28955      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28956/* end confdefs.h.  */
28957
28958int
28959main ()
28960{
28961
28962  ;
28963  return 0;
28964}
28965_ACEOF
28966if ac_fn_c_try_compile "$LINENO"; then :
28967
28968else
28969  ac_c_werror_flag=$ac_save_c_werror_flag
28970	 CFLAGS="-g"
28971	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28972/* end confdefs.h.  */
28973
28974int
28975main ()
28976{
28977
28978  ;
28979  return 0;
28980}
28981_ACEOF
28982if ac_fn_c_try_compile "$LINENO"; then :
28983  ac_cv_prog_cc_g=yes
28984fi
28985rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28986fi
28987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28988fi
28989rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28990   ac_c_werror_flag=$ac_save_c_werror_flag
28991fi
28992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28993$as_echo "$ac_cv_prog_cc_g" >&6; }
28994if test "$ac_test_CFLAGS" = set; then
28995  CFLAGS=$ac_save_CFLAGS
28996elif test $ac_cv_prog_cc_g = yes; then
28997  if test "$GCC" = yes; then
28998    CFLAGS="-g -O2"
28999  else
29000    CFLAGS="-g"
29001  fi
29002else
29003  if test "$GCC" = yes; then
29004    CFLAGS="-O2"
29005  else
29006    CFLAGS=
29007  fi
29008fi
29009{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29010$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29011if ${ac_cv_prog_cc_c89+:} false; then :
29012  $as_echo_n "(cached) " >&6
29013else
29014  ac_cv_prog_cc_c89=no
29015ac_save_CC=$CC
29016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29017/* end confdefs.h.  */
29018#include <stdarg.h>
29019#include <stdio.h>
29020struct stat;
29021/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29022struct buf { int x; };
29023FILE * (*rcsopen) (struct buf *, struct stat *, int);
29024static char *e (p, i)
29025     char **p;
29026     int i;
29027{
29028  return p[i];
29029}
29030static char *f (char * (*g) (char **, int), char **p, ...)
29031{
29032  char *s;
29033  va_list v;
29034  va_start (v,p);
29035  s = g (p, va_arg (v,int));
29036  va_end (v);
29037  return s;
29038}
29039
29040/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29041   function prototypes and stuff, but not '\xHH' hex character constants.
29042   These don't provoke an error unfortunately, instead are silently treated
29043   as 'x'.  The following induces an error, until -std is added to get
29044   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29045   array size at least.  It's necessary to write '\x00'==0 to get something
29046   that's true only with -std.  */
29047int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29048
29049/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29050   inside strings and character constants.  */
29051#define FOO(x) 'x'
29052int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29053
29054int test (int i, double x);
29055struct s1 {int (*f) (int a);};
29056struct s2 {int (*f) (double a);};
29057int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29058int argc;
29059char **argv;
29060int
29061main ()
29062{
29063return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29064  ;
29065  return 0;
29066}
29067_ACEOF
29068for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29069	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29070do
29071  CC="$ac_save_CC $ac_arg"
29072  if ac_fn_c_try_compile "$LINENO"; then :
29073  ac_cv_prog_cc_c89=$ac_arg
29074fi
29075rm -f core conftest.err conftest.$ac_objext
29076  test "x$ac_cv_prog_cc_c89" != "xno" && break
29077done
29078rm -f conftest.$ac_ext
29079CC=$ac_save_CC
29080
29081fi
29082# AC_CACHE_VAL
29083case "x$ac_cv_prog_cc_c89" in
29084  x)
29085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29086$as_echo "none needed" >&6; } ;;
29087  xno)
29088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29089$as_echo "unsupported" >&6; } ;;
29090  *)
29091    CC="$CC $ac_cv_prog_cc_c89"
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29093$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29094esac
29095if test "x$ac_cv_prog_cc_c89" != xno; then :
29096
29097fi
29098
29099ac_ext=cpp
29100ac_cpp='$CXXCPP $CPPFLAGS'
29101ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29102ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29103ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29104
29105
29106
29107  COMPILER_NAME=C++
29108  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29109
29110  if test "x$CXX" != x; then
29111    # User has supplied compiler name already, always let that override.
29112    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29113$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29114    if test "x`basename $CXX`" = "x$CXX"; then
29115      # A command without a complete path is provided, search $PATH.
29116
29117      for ac_prog in $CXX
29118do
29119  # Extract the first word of "$ac_prog", so it can be a program name with args.
29120set dummy $ac_prog; ac_word=$2
29121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29122$as_echo_n "checking for $ac_word... " >&6; }
29123if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29124  $as_echo_n "(cached) " >&6
29125else
29126  case $POTENTIAL_CXX in
29127  [\\/]* | ?:[\\/]*)
29128  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29129  ;;
29130  *)
29131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29132for as_dir in $PATH
29133do
29134  IFS=$as_save_IFS
29135  test -z "$as_dir" && as_dir=.
29136    for ac_exec_ext in '' $ac_executable_extensions; do
29137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29138    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29140    break 2
29141  fi
29142done
29143  done
29144IFS=$as_save_IFS
29145
29146  ;;
29147esac
29148fi
29149POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29150if test -n "$POTENTIAL_CXX"; then
29151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29152$as_echo "$POTENTIAL_CXX" >&6; }
29153else
29154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29155$as_echo "no" >&6; }
29156fi
29157
29158
29159  test -n "$POTENTIAL_CXX" && break
29160done
29161
29162      if test "x$POTENTIAL_CXX" != x; then
29163        CXX=$POTENTIAL_CXX
29164      else
29165        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29166      fi
29167    else
29168      # Otherwise it might already be a complete path
29169      if test ! -x "$CXX"; then
29170        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29171      fi
29172    fi
29173  else
29174    # No user supplied value. Locate compiler ourselves.
29175
29176    # If we are cross compiling, assume cross compilation tools follows the
29177    # cross compilation standard where they are prefixed with the autoconf
29178    # standard name for the target. For example the binary
29179    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29180    # If we are not cross compiling, then the default compiler name will be
29181    # used.
29182
29183    CXX=
29184    # If TOOLS_DIR is set, check for all compiler names in there first
29185    # before checking the rest of the PATH.
29186    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29187    # step, this should not be necessary.
29188    if test -n "$TOOLS_DIR"; then
29189      PATH_save="$PATH"
29190      PATH="$TOOLS_DIR"
29191      for ac_prog in $SEARCH_LIST
29192do
29193  # Extract the first word of "$ac_prog", so it can be a program name with args.
29194set dummy $ac_prog; ac_word=$2
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29196$as_echo_n "checking for $ac_word... " >&6; }
29197if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  case $TOOLS_DIR_CXX in
29201  [\\/]* | ?:[\\/]*)
29202  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29203  ;;
29204  *)
29205  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29206for as_dir in $PATH
29207do
29208  IFS=$as_save_IFS
29209  test -z "$as_dir" && as_dir=.
29210    for ac_exec_ext in '' $ac_executable_extensions; do
29211  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29212    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29213    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29214    break 2
29215  fi
29216done
29217  done
29218IFS=$as_save_IFS
29219
29220  ;;
29221esac
29222fi
29223TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29224if test -n "$TOOLS_DIR_CXX"; then
29225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29226$as_echo "$TOOLS_DIR_CXX" >&6; }
29227else
29228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29229$as_echo "no" >&6; }
29230fi
29231
29232
29233  test -n "$TOOLS_DIR_CXX" && break
29234done
29235
29236      CXX=$TOOLS_DIR_CXX
29237      PATH="$PATH_save"
29238    fi
29239
29240    # AC_PATH_PROGS can't be run multiple times with the same variable,
29241    # so create a new name for this run.
29242    if test "x$CXX" = x; then
29243      for ac_prog in $SEARCH_LIST
29244do
29245  # Extract the first word of "$ac_prog", so it can be a program name with args.
29246set dummy $ac_prog; ac_word=$2
29247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29248$as_echo_n "checking for $ac_word... " >&6; }
29249if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29250  $as_echo_n "(cached) " >&6
29251else
29252  case $POTENTIAL_CXX in
29253  [\\/]* | ?:[\\/]*)
29254  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29255  ;;
29256  *)
29257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29258for as_dir in $PATH
29259do
29260  IFS=$as_save_IFS
29261  test -z "$as_dir" && as_dir=.
29262    for ac_exec_ext in '' $ac_executable_extensions; do
29263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29264    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29266    break 2
29267  fi
29268done
29269  done
29270IFS=$as_save_IFS
29271
29272  ;;
29273esac
29274fi
29275POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29276if test -n "$POTENTIAL_CXX"; then
29277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29278$as_echo "$POTENTIAL_CXX" >&6; }
29279else
29280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29281$as_echo "no" >&6; }
29282fi
29283
29284
29285  test -n "$POTENTIAL_CXX" && break
29286done
29287
29288      CXX=$POTENTIAL_CXX
29289    fi
29290
29291    if test "x$CXX" = x; then
29292
29293  # Print a helpful message on how to acquire the necessary build dependency.
29294  # devkit is the help tag: freetype, cups, pulse, alsa etc
29295  MISSING_DEPENDENCY=devkit
29296
29297  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29298    cygwin_help $MISSING_DEPENDENCY
29299  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29300    msys_help $MISSING_DEPENDENCY
29301  else
29302    PKGHANDLER_COMMAND=
29303
29304    case $PKGHANDLER in
29305      apt-get)
29306        apt_help     $MISSING_DEPENDENCY ;;
29307      yum)
29308        yum_help     $MISSING_DEPENDENCY ;;
29309      port)
29310        port_help    $MISSING_DEPENDENCY ;;
29311      pkgutil)
29312        pkgutil_help $MISSING_DEPENDENCY ;;
29313      pkgadd)
29314        pkgadd_help  $MISSING_DEPENDENCY ;;
29315    esac
29316
29317    if test "x$PKGHANDLER_COMMAND" != x; then
29318      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29319    fi
29320  fi
29321
29322      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29323    fi
29324  fi
29325
29326  # Now we have a compiler binary in CXX. Make sure it's okay.
29327
29328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29329
29330  # First separate the path from the arguments. This will split at the first
29331  # space.
29332  complete="$CXX"
29333  path="${complete%% *}"
29334  tmp="$complete EOL"
29335  arguments="${tmp#* }"
29336
29337  # Input might be given as Windows format, start by converting to
29338  # unix format.
29339  new_path=`$CYGPATH -u "$path"`
29340
29341  # Now try to locate executable using which
29342  new_path=`$WHICH "$new_path" 2> /dev/null`
29343  # bat and cmd files are not always considered executable in cygwin causing which
29344  # to not find them
29345  if test "x$new_path" = x \
29346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29348    new_path=`$CYGPATH -u "$path"`
29349  fi
29350  if test "x$new_path" = x; then
29351    # Oops. Which didn't find the executable.
29352    # The splitting of arguments from the executable at a space might have been incorrect,
29353    # since paths with space are more likely in Windows. Give it another try with the whole
29354    # argument.
29355    path="$complete"
29356    arguments="EOL"
29357    new_path=`$CYGPATH -u "$path"`
29358    new_path=`$WHICH "$new_path" 2> /dev/null`
29359    # bat and cmd files are not always considered executable in cygwin causing which
29360    # to not find them
29361    if test "x$new_path" = x \
29362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29364      new_path=`$CYGPATH -u "$path"`
29365    fi
29366    if test "x$new_path" = x; then
29367      # It's still not found. Now this is an unrecoverable error.
29368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29369$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29370      has_space=`$ECHO "$complete" | $GREP " "`
29371      if test "x$has_space" != x; then
29372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29374      fi
29375      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29376    fi
29377  fi
29378
29379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29382  # "foo.exe" is OK but "foo" is an error.
29383  #
29384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29385  # It is also a way to make sure we got the proper file name for the real test later on.
29386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29387  if test "x$test_shortpath" = x; then
29388    # Short path failed, file does not exist as specified.
29389    # Try adding .exe or .cmd
29390    if test -f "${new_path}.exe"; then
29391      input_to_shortpath="${new_path}.exe"
29392    elif test -f "${new_path}.cmd"; then
29393      input_to_shortpath="${new_path}.cmd"
29394    else
29395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29396$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29399      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29400    fi
29401  else
29402    input_to_shortpath="$new_path"
29403  fi
29404
29405  # Call helper function which possibly converts this using DOS-style short mode.
29406  # If so, the updated path is stored in $new_path.
29407  new_path="$input_to_shortpath"
29408
29409  input_path="$input_to_shortpath"
29410  # Check if we need to convert this using DOS-style short mode. If the path
29411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29412  # take no chances and rewrite it.
29413  # Note: m4 eats our [], so we need to use [ and ] instead.
29414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29415  if test "x$has_forbidden_chars" != x; then
29416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29420      # Going to short mode and back again did indeed matter. Since short mode is
29421      # case insensitive, let's make it lowercase to improve readability.
29422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29423      # Now convert it back to Unix-stile (cygpath)
29424      input_path=`$CYGPATH -u "$shortmode_path"`
29425      new_path="$input_path"
29426    fi
29427  fi
29428
29429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29430  if test "x$test_cygdrive_prefix" = x; then
29431    # As a simple fix, exclude /usr/bin since it's not a real path.
29432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29434      # a path prefixed by /cygdrive for fixpath to work.
29435      new_path="$CYGWIN_ROOT_PATH$input_path"
29436    fi
29437  fi
29438
29439  # remove trailing .exe if any
29440  new_path="${new_path/%.exe/}"
29441
29442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29443
29444  # First separate the path from the arguments. This will split at the first
29445  # space.
29446  complete="$CXX"
29447  path="${complete%% *}"
29448  tmp="$complete EOL"
29449  arguments="${tmp#* }"
29450
29451  # Input might be given as Windows format, start by converting to
29452  # unix format.
29453  new_path="$path"
29454
29455  windows_path="$new_path"
29456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29457    unix_path=`$CYGPATH -u "$windows_path"`
29458    new_path="$unix_path"
29459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29461    new_path="$unix_path"
29462  fi
29463
29464
29465  # Now try to locate executable using which
29466  new_path=`$WHICH "$new_path" 2> /dev/null`
29467
29468  if test "x$new_path" = x; then
29469    # Oops. Which didn't find the executable.
29470    # The splitting of arguments from the executable at a space might have been incorrect,
29471    # since paths with space are more likely in Windows. Give it another try with the whole
29472    # argument.
29473    path="$complete"
29474    arguments="EOL"
29475    new_path="$path"
29476
29477  windows_path="$new_path"
29478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29479    unix_path=`$CYGPATH -u "$windows_path"`
29480    new_path="$unix_path"
29481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29483    new_path="$unix_path"
29484  fi
29485
29486
29487    new_path=`$WHICH "$new_path" 2> /dev/null`
29488
29489    if test "x$new_path" = x; then
29490      # It's still not found. Now this is an unrecoverable error.
29491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29492$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29493      has_space=`$ECHO "$complete" | $GREP " "`
29494      if test "x$has_space" != x; then
29495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29497      fi
29498      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29499    fi
29500  fi
29501
29502  # Now new_path has a complete unix path to the binary
29503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29504    # Keep paths in /bin as-is, but remove trailing .exe if any
29505    new_path="${new_path/%.exe/}"
29506    # Do not save /bin paths to all_fixpath_prefixes!
29507  else
29508    # Not in mixed or Windows style, start by that.
29509    new_path=`cmd //c echo $new_path`
29510
29511  input_path="$new_path"
29512  # Check if we need to convert this using DOS-style short mode. If the path
29513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29514  # take no chances and rewrite it.
29515  # Note: m4 eats our [], so we need to use [ and ] instead.
29516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29517  if test "x$has_forbidden_chars" != x; then
29518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29520  fi
29521
29522    # Output is in $new_path
29523
29524  windows_path="$new_path"
29525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29526    unix_path=`$CYGPATH -u "$windows_path"`
29527    new_path="$unix_path"
29528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29530    new_path="$unix_path"
29531  fi
29532
29533    # remove trailing .exe if any
29534    new_path="${new_path/%.exe/}"
29535
29536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29538  fi
29539
29540  else
29541    # We're on a posix platform. Hooray! :)
29542    # First separate the path from the arguments. This will split at the first
29543    # space.
29544    complete="$CXX"
29545    path="${complete%% *}"
29546    tmp="$complete EOL"
29547    arguments="${tmp#* }"
29548
29549    # Cannot rely on the command "which" here since it doesn't always work.
29550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29551    if test -z "$is_absolute_path"; then
29552      # Path to executable is not absolute. Find it.
29553      IFS_save="$IFS"
29554      IFS=:
29555      for p in $PATH; do
29556        if test -f "$p/$path" && test -x "$p/$path"; then
29557          new_path="$p/$path"
29558          break
29559        fi
29560      done
29561      IFS="$IFS_save"
29562    else
29563      # This is an absolute path, we can use it without further modifications.
29564      new_path="$path"
29565    fi
29566
29567    if test "x$new_path" = x; then
29568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29569$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29570      has_space=`$ECHO "$complete" | $GREP " "`
29571      if test "x$has_space" != x; then
29572        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29574      fi
29575      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29576    fi
29577  fi
29578
29579  # Now join together the path and the arguments once again
29580  if test "x$arguments" != xEOL; then
29581    new_complete="$new_path ${arguments% *}"
29582  else
29583    new_complete="$new_path"
29584  fi
29585
29586  if test "x$complete" != "x$new_complete"; then
29587    CXX="$new_complete"
29588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29589$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29590  fi
29591
29592  TEST_COMPILER="$CXX"
29593  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29594  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29595  if test "x$OPENJDK_BUILD_OS" != xaix; then
29596    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29597    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29598$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29599
29600  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29601    # Follow a chain of symbolic links. Use readlink
29602    # where it exists, else fall back to horribly
29603    # complicated shell code.
29604    if test "x$READLINK_TESTED" != yes; then
29605      # On MacOSX there is a readlink tool with a different
29606      # purpose than the GNU readlink tool. Check the found readlink.
29607      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29608      if test "x$ISGNU" = x; then
29609        # A readlink that we do not know how to use.
29610        # Are there other non-GNU readlinks out there?
29611        READLINK_TESTED=yes
29612        READLINK=
29613      fi
29614    fi
29615
29616    if test "x$READLINK" != x; then
29617      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29618    else
29619      # Save the current directory for restoring afterwards
29620      STARTDIR=$PWD
29621      COUNTER=0
29622      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29623      sym_link_file=`$BASENAME $TEST_COMPILER`
29624      cd $sym_link_dir
29625      # Use -P flag to resolve symlinks in directories.
29626      cd `$THEPWDCMD -P`
29627      sym_link_dir=`$THEPWDCMD -P`
29628      # Resolve file symlinks
29629      while test $COUNTER -lt 20; do
29630        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29631        if test "x$ISLINK" == x; then
29632          # This is not a symbolic link! We are done!
29633          break
29634        fi
29635        # Again resolve directory symlinks since the target of the just found
29636        # link could be in a different directory
29637        cd `$DIRNAME $ISLINK`
29638        sym_link_dir=`$THEPWDCMD -P`
29639        sym_link_file=`$BASENAME $ISLINK`
29640        let COUNTER=COUNTER+1
29641      done
29642      cd $STARTDIR
29643      TEST_COMPILER=$sym_link_dir/$sym_link_file
29644    fi
29645  fi
29646
29647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29648$as_echo "$TEST_COMPILER" >&6; }
29649  fi
29650  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29651$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29652
29653  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29654  if test "x$COMPILER_BASENAME" = "xccache"; then
29655    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29656$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29657    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29658    # We want to control ccache invocation ourselves, so ignore this cc and try
29659    # searching again.
29660
29661    # Remove the path to the fake ccache cc from the PATH
29662    RETRY_COMPILER_SAVED_PATH="$PATH"
29663    COMPILER_DIRNAME=`$DIRNAME $CXX`
29664    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29665
29666    # Try again looking for our compiler
29667    if test -n "$ac_tool_prefix"; then
29668  for ac_prog in $TOOLCHAIN_CXX_BINARY
29669  do
29670    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29671set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29673$as_echo_n "checking for $ac_word... " >&6; }
29674if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29675  $as_echo_n "(cached) " >&6
29676else
29677  if test -n "$PROPER_COMPILER_CXX"; then
29678  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29679else
29680as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29681for as_dir in $PATH
29682do
29683  IFS=$as_save_IFS
29684  test -z "$as_dir" && as_dir=.
29685    for ac_exec_ext in '' $ac_executable_extensions; do
29686  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29687    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29688    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29689    break 2
29690  fi
29691done
29692  done
29693IFS=$as_save_IFS
29694
29695fi
29696fi
29697PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29698if test -n "$PROPER_COMPILER_CXX"; then
29699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29700$as_echo "$PROPER_COMPILER_CXX" >&6; }
29701else
29702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29703$as_echo "no" >&6; }
29704fi
29705
29706
29707    test -n "$PROPER_COMPILER_CXX" && break
29708  done
29709fi
29710if test -z "$PROPER_COMPILER_CXX"; then
29711  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29712  for ac_prog in $TOOLCHAIN_CXX_BINARY
29713do
29714  # Extract the first word of "$ac_prog", so it can be a program name with args.
29715set dummy $ac_prog; ac_word=$2
29716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29717$as_echo_n "checking for $ac_word... " >&6; }
29718if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29719  $as_echo_n "(cached) " >&6
29720else
29721  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29722  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29723else
29724as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29725for as_dir in $PATH
29726do
29727  IFS=$as_save_IFS
29728  test -z "$as_dir" && as_dir=.
29729    for ac_exec_ext in '' $ac_executable_extensions; do
29730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29731    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29733    break 2
29734  fi
29735done
29736  done
29737IFS=$as_save_IFS
29738
29739fi
29740fi
29741ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29742if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29744$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29745else
29746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29747$as_echo "no" >&6; }
29748fi
29749
29750
29751  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29752done
29753
29754  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29755    PROPER_COMPILER_CXX=""
29756  else
29757    case $cross_compiling:$ac_tool_warned in
29758yes:)
29759{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29760$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29761ac_tool_warned=yes ;;
29762esac
29763    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29764  fi
29765fi
29766
29767
29768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29769
29770  # First separate the path from the arguments. This will split at the first
29771  # space.
29772  complete="$PROPER_COMPILER_CXX"
29773  path="${complete%% *}"
29774  tmp="$complete EOL"
29775  arguments="${tmp#* }"
29776
29777  # Input might be given as Windows format, start by converting to
29778  # unix format.
29779  new_path=`$CYGPATH -u "$path"`
29780
29781  # Now try to locate executable using which
29782  new_path=`$WHICH "$new_path" 2> /dev/null`
29783  # bat and cmd files are not always considered executable in cygwin causing which
29784  # to not find them
29785  if test "x$new_path" = x \
29786      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29787      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29788    new_path=`$CYGPATH -u "$path"`
29789  fi
29790  if test "x$new_path" = x; then
29791    # Oops. Which didn't find the executable.
29792    # The splitting of arguments from the executable at a space might have been incorrect,
29793    # since paths with space are more likely in Windows. Give it another try with the whole
29794    # argument.
29795    path="$complete"
29796    arguments="EOL"
29797    new_path=`$CYGPATH -u "$path"`
29798    new_path=`$WHICH "$new_path" 2> /dev/null`
29799    # bat and cmd files are not always considered executable in cygwin causing which
29800    # to not find them
29801    if test "x$new_path" = x \
29802        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29803        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29804      new_path=`$CYGPATH -u "$path"`
29805    fi
29806    if test "x$new_path" = x; then
29807      # It's still not found. Now this is an unrecoverable error.
29808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29809$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29810      has_space=`$ECHO "$complete" | $GREP " "`
29811      if test "x$has_space" != x; then
29812        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29813$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29814      fi
29815      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29816    fi
29817  fi
29818
29819  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29820  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29821  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29822  # "foo.exe" is OK but "foo" is an error.
29823  #
29824  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29825  # It is also a way to make sure we got the proper file name for the real test later on.
29826  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29827  if test "x$test_shortpath" = x; then
29828    # Short path failed, file does not exist as specified.
29829    # Try adding .exe or .cmd
29830    if test -f "${new_path}.exe"; then
29831      input_to_shortpath="${new_path}.exe"
29832    elif test -f "${new_path}.cmd"; then
29833      input_to_shortpath="${new_path}.cmd"
29834    else
29835      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29836$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29837      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29838$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29839      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29840    fi
29841  else
29842    input_to_shortpath="$new_path"
29843  fi
29844
29845  # Call helper function which possibly converts this using DOS-style short mode.
29846  # If so, the updated path is stored in $new_path.
29847  new_path="$input_to_shortpath"
29848
29849  input_path="$input_to_shortpath"
29850  # Check if we need to convert this using DOS-style short mode. If the path
29851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29852  # take no chances and rewrite it.
29853  # Note: m4 eats our [], so we need to use [ and ] instead.
29854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29855  if test "x$has_forbidden_chars" != x; then
29856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29860      # Going to short mode and back again did indeed matter. Since short mode is
29861      # case insensitive, let's make it lowercase to improve readability.
29862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29863      # Now convert it back to Unix-stile (cygpath)
29864      input_path=`$CYGPATH -u "$shortmode_path"`
29865      new_path="$input_path"
29866    fi
29867  fi
29868
29869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29870  if test "x$test_cygdrive_prefix" = x; then
29871    # As a simple fix, exclude /usr/bin since it's not a real path.
29872    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29874      # a path prefixed by /cygdrive for fixpath to work.
29875      new_path="$CYGWIN_ROOT_PATH$input_path"
29876    fi
29877  fi
29878
29879  # remove trailing .exe if any
29880  new_path="${new_path/%.exe/}"
29881
29882  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29883
29884  # First separate the path from the arguments. This will split at the first
29885  # space.
29886  complete="$PROPER_COMPILER_CXX"
29887  path="${complete%% *}"
29888  tmp="$complete EOL"
29889  arguments="${tmp#* }"
29890
29891  # Input might be given as Windows format, start by converting to
29892  # unix format.
29893  new_path="$path"
29894
29895  windows_path="$new_path"
29896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29897    unix_path=`$CYGPATH -u "$windows_path"`
29898    new_path="$unix_path"
29899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29901    new_path="$unix_path"
29902  fi
29903
29904
29905  # Now try to locate executable using which
29906  new_path=`$WHICH "$new_path" 2> /dev/null`
29907
29908  if test "x$new_path" = x; then
29909    # Oops. Which didn't find the executable.
29910    # The splitting of arguments from the executable at a space might have been incorrect,
29911    # since paths with space are more likely in Windows. Give it another try with the whole
29912    # argument.
29913    path="$complete"
29914    arguments="EOL"
29915    new_path="$path"
29916
29917  windows_path="$new_path"
29918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29919    unix_path=`$CYGPATH -u "$windows_path"`
29920    new_path="$unix_path"
29921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29923    new_path="$unix_path"
29924  fi
29925
29926
29927    new_path=`$WHICH "$new_path" 2> /dev/null`
29928
29929    if test "x$new_path" = x; then
29930      # It's still not found. Now this is an unrecoverable error.
29931      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29932$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29933      has_space=`$ECHO "$complete" | $GREP " "`
29934      if test "x$has_space" != x; then
29935        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29936$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29937      fi
29938      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29939    fi
29940  fi
29941
29942  # Now new_path has a complete unix path to the binary
29943  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29944    # Keep paths in /bin as-is, but remove trailing .exe if any
29945    new_path="${new_path/%.exe/}"
29946    # Do not save /bin paths to all_fixpath_prefixes!
29947  else
29948    # Not in mixed or Windows style, start by that.
29949    new_path=`cmd //c echo $new_path`
29950
29951  input_path="$new_path"
29952  # Check if we need to convert this using DOS-style short mode. If the path
29953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29954  # take no chances and rewrite it.
29955  # Note: m4 eats our [], so we need to use [ and ] instead.
29956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29957  if test "x$has_forbidden_chars" != x; then
29958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29960  fi
29961
29962    # Output is in $new_path
29963
29964  windows_path="$new_path"
29965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29966    unix_path=`$CYGPATH -u "$windows_path"`
29967    new_path="$unix_path"
29968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29970    new_path="$unix_path"
29971  fi
29972
29973    # remove trailing .exe if any
29974    new_path="${new_path/%.exe/}"
29975
29976    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29977    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29978  fi
29979
29980  else
29981    # We're on a posix platform. Hooray! :)
29982    # First separate the path from the arguments. This will split at the first
29983    # space.
29984    complete="$PROPER_COMPILER_CXX"
29985    path="${complete%% *}"
29986    tmp="$complete EOL"
29987    arguments="${tmp#* }"
29988
29989    # Cannot rely on the command "which" here since it doesn't always work.
29990    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29991    if test -z "$is_absolute_path"; then
29992      # Path to executable is not absolute. Find it.
29993      IFS_save="$IFS"
29994      IFS=:
29995      for p in $PATH; do
29996        if test -f "$p/$path" && test -x "$p/$path"; then
29997          new_path="$p/$path"
29998          break
29999        fi
30000      done
30001      IFS="$IFS_save"
30002    else
30003      # This is an absolute path, we can use it without further modifications.
30004      new_path="$path"
30005    fi
30006
30007    if test "x$new_path" = x; then
30008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30009$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30010      has_space=`$ECHO "$complete" | $GREP " "`
30011      if test "x$has_space" != x; then
30012        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30013$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30014      fi
30015      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30016    fi
30017  fi
30018
30019  # Now join together the path and the arguments once again
30020  if test "x$arguments" != xEOL; then
30021    new_complete="$new_path ${arguments% *}"
30022  else
30023    new_complete="$new_path"
30024  fi
30025
30026  if test "x$complete" != "x$new_complete"; then
30027    PROPER_COMPILER_CXX="$new_complete"
30028    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30029$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30030  fi
30031
30032    PATH="$RETRY_COMPILER_SAVED_PATH"
30033
30034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30035$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30036
30037  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30038    # Follow a chain of symbolic links. Use readlink
30039    # where it exists, else fall back to horribly
30040    # complicated shell code.
30041    if test "x$READLINK_TESTED" != yes; then
30042      # On MacOSX there is a readlink tool with a different
30043      # purpose than the GNU readlink tool. Check the found readlink.
30044      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30045      if test "x$ISGNU" = x; then
30046        # A readlink that we do not know how to use.
30047        # Are there other non-GNU readlinks out there?
30048        READLINK_TESTED=yes
30049        READLINK=
30050      fi
30051    fi
30052
30053    if test "x$READLINK" != x; then
30054      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30055    else
30056      # Save the current directory for restoring afterwards
30057      STARTDIR=$PWD
30058      COUNTER=0
30059      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30060      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30061      cd $sym_link_dir
30062      # Use -P flag to resolve symlinks in directories.
30063      cd `$THEPWDCMD -P`
30064      sym_link_dir=`$THEPWDCMD -P`
30065      # Resolve file symlinks
30066      while test $COUNTER -lt 20; do
30067        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30068        if test "x$ISLINK" == x; then
30069          # This is not a symbolic link! We are done!
30070          break
30071        fi
30072        # Again resolve directory symlinks since the target of the just found
30073        # link could be in a different directory
30074        cd `$DIRNAME $ISLINK`
30075        sym_link_dir=`$THEPWDCMD -P`
30076        sym_link_file=`$BASENAME $ISLINK`
30077        let COUNTER=COUNTER+1
30078      done
30079      cd $STARTDIR
30080      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30081    fi
30082  fi
30083
30084    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30085$as_echo "$PROPER_COMPILER_CXX" >&6; }
30086    CXX="$PROPER_COMPILER_CXX"
30087  else
30088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30089$as_echo "no, keeping CXX" >&6; }
30090  fi
30091
30092
30093  COMPILER=$CXX
30094  COMPILER_NAME=$COMPILER_NAME
30095
30096  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30097    # cc -V output typically looks like
30098    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30099    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30100    # Check that this is likely to be the Solaris Studio cc.
30101    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30102    if test $? -ne 0; then
30103      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30104      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30105$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30106      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30107$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30108      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30109$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30110      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30111    fi
30112    # Remove usage instructions (if present), and
30113    # collapse compiler output into a single line
30114    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30115        $SED -e 's/ *[Uu]sage:.*//'`
30116    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30117        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30118  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30119    # xlc -qversion output typically looks like
30120    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30121    #     Version: 11.01.0000.0015
30122    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30123    # Check that this is likely to be the IBM XL C compiler.
30124    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30125    if test $? -ne 0; then
30126      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30127      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30128$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30129      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30130$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30131      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30132$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30133      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30134    fi
30135    # Collapse compiler output into a single line
30136    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30137    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30138        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30139  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30140    # There is no specific version flag, but all output starts with a version string.
30141    # First line typically looks something like:
30142    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30143    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30144    # Check that this is likely to be Microsoft CL.EXE.
30145    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30146    if test $? -ne 0; then
30147      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30148$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30149      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30150$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30151      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30152    fi
30153    # Collapse compiler output into a single line
30154    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30155    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30156        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30157  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30158    # gcc --version output typically looks like
30159    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30160    #     Copyright (C) 2013 Free Software Foundation, Inc.
30161    #     This is free software; see the source for copying conditions.  There is NO
30162    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30163    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30164    # Check that this is likely to be GCC.
30165    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30166    if test $? -ne 0; then
30167      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30168$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30169      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30170$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30171      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30172    fi
30173    # Remove Copyright and legalese from version string, and
30174    # collapse into a single line
30175    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30176        $SED -e 's/ *Copyright .*//'`
30177    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30178        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30179  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30180    # clang --version output typically looks like
30181    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30182    #    clang version 3.3 (tags/RELEASE_33/final)
30183    # or
30184    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30185    #    Target: x86_64-pc-linux-gnu
30186    #    Thread model: posix
30187    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30188    # Check that this is likely to be clang
30189    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30190    if test $? -ne 0; then
30191      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
30192$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30193      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30194$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30195      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30196    fi
30197    # Collapse compiler output into a single line
30198    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30199    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30200        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30201  else
30202      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30203  fi
30204  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30205  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30206  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30207  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30208
30209  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30210$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30211
30212
30213  # Now that we have resolved CXX ourself, let autoconf have its go at it
30214  ac_ext=cpp
30215ac_cpp='$CXXCPP $CPPFLAGS'
30216ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30217ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30218ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30219if test -z "$CXX"; then
30220  if test -n "$CCC"; then
30221    CXX=$CCC
30222  else
30223    if test -n "$ac_tool_prefix"; then
30224  for ac_prog in $CXX
30225  do
30226    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30227set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30229$as_echo_n "checking for $ac_word... " >&6; }
30230if ${ac_cv_prog_CXX+:} false; then :
30231  $as_echo_n "(cached) " >&6
30232else
30233  if test -n "$CXX"; then
30234  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30235else
30236as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30237for as_dir in $PATH
30238do
30239  IFS=$as_save_IFS
30240  test -z "$as_dir" && as_dir=.
30241    for ac_exec_ext in '' $ac_executable_extensions; do
30242  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30243    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30244    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30245    break 2
30246  fi
30247done
30248  done
30249IFS=$as_save_IFS
30250
30251fi
30252fi
30253CXX=$ac_cv_prog_CXX
30254if test -n "$CXX"; then
30255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30256$as_echo "$CXX" >&6; }
30257else
30258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30259$as_echo "no" >&6; }
30260fi
30261
30262
30263    test -n "$CXX" && break
30264  done
30265fi
30266if test -z "$CXX"; then
30267  ac_ct_CXX=$CXX
30268  for ac_prog in $CXX
30269do
30270  # Extract the first word of "$ac_prog", so it can be a program name with args.
30271set dummy $ac_prog; ac_word=$2
30272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30273$as_echo_n "checking for $ac_word... " >&6; }
30274if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30275  $as_echo_n "(cached) " >&6
30276else
30277  if test -n "$ac_ct_CXX"; then
30278  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30279else
30280as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30281for as_dir in $PATH
30282do
30283  IFS=$as_save_IFS
30284  test -z "$as_dir" && as_dir=.
30285    for ac_exec_ext in '' $ac_executable_extensions; do
30286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30287    ac_cv_prog_ac_ct_CXX="$ac_prog"
30288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30289    break 2
30290  fi
30291done
30292  done
30293IFS=$as_save_IFS
30294
30295fi
30296fi
30297ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30298if test -n "$ac_ct_CXX"; then
30299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30300$as_echo "$ac_ct_CXX" >&6; }
30301else
30302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30303$as_echo "no" >&6; }
30304fi
30305
30306
30307  test -n "$ac_ct_CXX" && break
30308done
30309
30310  if test "x$ac_ct_CXX" = x; then
30311    CXX="g++"
30312  else
30313    case $cross_compiling:$ac_tool_warned in
30314yes:)
30315{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30316$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30317ac_tool_warned=yes ;;
30318esac
30319    CXX=$ac_ct_CXX
30320  fi
30321fi
30322
30323  fi
30324fi
30325# Provide some information about the compiler.
30326$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30327set X $ac_compile
30328ac_compiler=$2
30329for ac_option in --version -v -V -qversion; do
30330  { { ac_try="$ac_compiler $ac_option >&5"
30331case "(($ac_try" in
30332  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30333  *) ac_try_echo=$ac_try;;
30334esac
30335eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30336$as_echo "$ac_try_echo"; } >&5
30337  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30338  ac_status=$?
30339  if test -s conftest.err; then
30340    sed '10a\
30341... rest of stderr output deleted ...
30342         10q' conftest.err >conftest.er1
30343    cat conftest.er1 >&5
30344  fi
30345  rm -f conftest.er1 conftest.err
30346  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30347  test $ac_status = 0; }
30348done
30349
30350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30351$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30352if ${ac_cv_cxx_compiler_gnu+:} false; then :
30353  $as_echo_n "(cached) " >&6
30354else
30355  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30356/* end confdefs.h.  */
30357
30358int
30359main ()
30360{
30361#ifndef __GNUC__
30362       choke me
30363#endif
30364
30365  ;
30366  return 0;
30367}
30368_ACEOF
30369if ac_fn_cxx_try_compile "$LINENO"; then :
30370  ac_compiler_gnu=yes
30371else
30372  ac_compiler_gnu=no
30373fi
30374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30375ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30376
30377fi
30378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30379$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30380if test $ac_compiler_gnu = yes; then
30381  GXX=yes
30382else
30383  GXX=
30384fi
30385ac_test_CXXFLAGS=${CXXFLAGS+set}
30386ac_save_CXXFLAGS=$CXXFLAGS
30387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30388$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30389if ${ac_cv_prog_cxx_g+:} false; then :
30390  $as_echo_n "(cached) " >&6
30391else
30392  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30393   ac_cxx_werror_flag=yes
30394   ac_cv_prog_cxx_g=no
30395   CXXFLAGS="-g"
30396   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30397/* end confdefs.h.  */
30398
30399int
30400main ()
30401{
30402
30403  ;
30404  return 0;
30405}
30406_ACEOF
30407if ac_fn_cxx_try_compile "$LINENO"; then :
30408  ac_cv_prog_cxx_g=yes
30409else
30410  CXXFLAGS=""
30411      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30412/* end confdefs.h.  */
30413
30414int
30415main ()
30416{
30417
30418  ;
30419  return 0;
30420}
30421_ACEOF
30422if ac_fn_cxx_try_compile "$LINENO"; then :
30423
30424else
30425  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30426	 CXXFLAGS="-g"
30427	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30428/* end confdefs.h.  */
30429
30430int
30431main ()
30432{
30433
30434  ;
30435  return 0;
30436}
30437_ACEOF
30438if ac_fn_cxx_try_compile "$LINENO"; then :
30439  ac_cv_prog_cxx_g=yes
30440fi
30441rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30442fi
30443rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30444fi
30445rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30446   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30447fi
30448{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30449$as_echo "$ac_cv_prog_cxx_g" >&6; }
30450if test "$ac_test_CXXFLAGS" = set; then
30451  CXXFLAGS=$ac_save_CXXFLAGS
30452elif test $ac_cv_prog_cxx_g = yes; then
30453  if test "$GXX" = yes; then
30454    CXXFLAGS="-g -O2"
30455  else
30456    CXXFLAGS="-g"
30457  fi
30458else
30459  if test "$GXX" = yes; then
30460    CXXFLAGS="-O2"
30461  else
30462    CXXFLAGS=
30463  fi
30464fi
30465ac_ext=cpp
30466ac_cpp='$CXXCPP $CPPFLAGS'
30467ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30468ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30469ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30470
30471
30472  #
30473  # Setup the preprocessor (CPP and CXXCPP)
30474  #
30475  ac_ext=c
30476ac_cpp='$CPP $CPPFLAGS'
30477ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30478ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30479ac_compiler_gnu=$ac_cv_c_compiler_gnu
30480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30481$as_echo_n "checking how to run the C preprocessor... " >&6; }
30482# On Suns, sometimes $CPP names a directory.
30483if test -n "$CPP" && test -d "$CPP"; then
30484  CPP=
30485fi
30486if test -z "$CPP"; then
30487  if ${ac_cv_prog_CPP+:} false; then :
30488  $as_echo_n "(cached) " >&6
30489else
30490      # Double quotes because CPP needs to be expanded
30491    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30492    do
30493      ac_preproc_ok=false
30494for ac_c_preproc_warn_flag in '' yes
30495do
30496  # Use a header file that comes with gcc, so configuring glibc
30497  # with a fresh cross-compiler works.
30498  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30499  # <limits.h> exists even on freestanding compilers.
30500  # On the NeXT, cc -E runs the code through the compiler's parser,
30501  # not just through cpp. "Syntax error" is here to catch this case.
30502  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30503/* end confdefs.h.  */
30504#ifdef __STDC__
30505# include <limits.h>
30506#else
30507# include <assert.h>
30508#endif
30509		     Syntax error
30510_ACEOF
30511if ac_fn_c_try_cpp "$LINENO"; then :
30512
30513else
30514  # Broken: fails on valid input.
30515continue
30516fi
30517rm -f conftest.err conftest.i conftest.$ac_ext
30518
30519  # OK, works on sane cases.  Now check whether nonexistent headers
30520  # can be detected and how.
30521  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30522/* end confdefs.h.  */
30523#include <ac_nonexistent.h>
30524_ACEOF
30525if ac_fn_c_try_cpp "$LINENO"; then :
30526  # Broken: success on invalid input.
30527continue
30528else
30529  # Passes both tests.
30530ac_preproc_ok=:
30531break
30532fi
30533rm -f conftest.err conftest.i conftest.$ac_ext
30534
30535done
30536# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30537rm -f conftest.i conftest.err conftest.$ac_ext
30538if $ac_preproc_ok; then :
30539  break
30540fi
30541
30542    done
30543    ac_cv_prog_CPP=$CPP
30544
30545fi
30546  CPP=$ac_cv_prog_CPP
30547else
30548  ac_cv_prog_CPP=$CPP
30549fi
30550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30551$as_echo "$CPP" >&6; }
30552ac_preproc_ok=false
30553for ac_c_preproc_warn_flag in '' yes
30554do
30555  # Use a header file that comes with gcc, so configuring glibc
30556  # with a fresh cross-compiler works.
30557  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30558  # <limits.h> exists even on freestanding compilers.
30559  # On the NeXT, cc -E runs the code through the compiler's parser,
30560  # not just through cpp. "Syntax error" is here to catch this case.
30561  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30562/* end confdefs.h.  */
30563#ifdef __STDC__
30564# include <limits.h>
30565#else
30566# include <assert.h>
30567#endif
30568		     Syntax error
30569_ACEOF
30570if ac_fn_c_try_cpp "$LINENO"; then :
30571
30572else
30573  # Broken: fails on valid input.
30574continue
30575fi
30576rm -f conftest.err conftest.i conftest.$ac_ext
30577
30578  # OK, works on sane cases.  Now check whether nonexistent headers
30579  # can be detected and how.
30580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30581/* end confdefs.h.  */
30582#include <ac_nonexistent.h>
30583_ACEOF
30584if ac_fn_c_try_cpp "$LINENO"; then :
30585  # Broken: success on invalid input.
30586continue
30587else
30588  # Passes both tests.
30589ac_preproc_ok=:
30590break
30591fi
30592rm -f conftest.err conftest.i conftest.$ac_ext
30593
30594done
30595# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30596rm -f conftest.i conftest.err conftest.$ac_ext
30597if $ac_preproc_ok; then :
30598
30599else
30600  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30602as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30603See \`config.log' for more details" "$LINENO" 5; }
30604fi
30605
30606ac_ext=cpp
30607ac_cpp='$CXXCPP $CPPFLAGS'
30608ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30609ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30610ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30611
30612
30613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30614
30615  # First separate the path from the arguments. This will split at the first
30616  # space.
30617  complete="$CPP"
30618  path="${complete%% *}"
30619  tmp="$complete EOL"
30620  arguments="${tmp#* }"
30621
30622  # Input might be given as Windows format, start by converting to
30623  # unix format.
30624  new_path=`$CYGPATH -u "$path"`
30625
30626  # Now try to locate executable using which
30627  new_path=`$WHICH "$new_path" 2> /dev/null`
30628  # bat and cmd files are not always considered executable in cygwin causing which
30629  # to not find them
30630  if test "x$new_path" = x \
30631      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30632      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30633    new_path=`$CYGPATH -u "$path"`
30634  fi
30635  if test "x$new_path" = x; then
30636    # Oops. Which didn't find the executable.
30637    # The splitting of arguments from the executable at a space might have been incorrect,
30638    # since paths with space are more likely in Windows. Give it another try with the whole
30639    # argument.
30640    path="$complete"
30641    arguments="EOL"
30642    new_path=`$CYGPATH -u "$path"`
30643    new_path=`$WHICH "$new_path" 2> /dev/null`
30644    # bat and cmd files are not always considered executable in cygwin causing which
30645    # to not find them
30646    if test "x$new_path" = x \
30647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30649      new_path=`$CYGPATH -u "$path"`
30650    fi
30651    if test "x$new_path" = x; then
30652      # It's still not found. Now this is an unrecoverable error.
30653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30654$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30655      has_space=`$ECHO "$complete" | $GREP " "`
30656      if test "x$has_space" != x; then
30657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30659      fi
30660      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30661    fi
30662  fi
30663
30664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30667  # "foo.exe" is OK but "foo" is an error.
30668  #
30669  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30670  # It is also a way to make sure we got the proper file name for the real test later on.
30671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30672  if test "x$test_shortpath" = x; then
30673    # Short path failed, file does not exist as specified.
30674    # Try adding .exe or .cmd
30675    if test -f "${new_path}.exe"; then
30676      input_to_shortpath="${new_path}.exe"
30677    elif test -f "${new_path}.cmd"; then
30678      input_to_shortpath="${new_path}.cmd"
30679    else
30680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30681$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30684      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30685    fi
30686  else
30687    input_to_shortpath="$new_path"
30688  fi
30689
30690  # Call helper function which possibly converts this using DOS-style short mode.
30691  # If so, the updated path is stored in $new_path.
30692  new_path="$input_to_shortpath"
30693
30694  input_path="$input_to_shortpath"
30695  # Check if we need to convert this using DOS-style short mode. If the path
30696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30697  # take no chances and rewrite it.
30698  # Note: m4 eats our [], so we need to use [ and ] instead.
30699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30700  if test "x$has_forbidden_chars" != x; then
30701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30705      # Going to short mode and back again did indeed matter. Since short mode is
30706      # case insensitive, let's make it lowercase to improve readability.
30707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30708      # Now convert it back to Unix-stile (cygpath)
30709      input_path=`$CYGPATH -u "$shortmode_path"`
30710      new_path="$input_path"
30711    fi
30712  fi
30713
30714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30715  if test "x$test_cygdrive_prefix" = x; then
30716    # As a simple fix, exclude /usr/bin since it's not a real path.
30717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30719      # a path prefixed by /cygdrive for fixpath to work.
30720      new_path="$CYGWIN_ROOT_PATH$input_path"
30721    fi
30722  fi
30723
30724  # remove trailing .exe if any
30725  new_path="${new_path/%.exe/}"
30726
30727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30728
30729  # First separate the path from the arguments. This will split at the first
30730  # space.
30731  complete="$CPP"
30732  path="${complete%% *}"
30733  tmp="$complete EOL"
30734  arguments="${tmp#* }"
30735
30736  # Input might be given as Windows format, start by converting to
30737  # unix format.
30738  new_path="$path"
30739
30740  windows_path="$new_path"
30741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30742    unix_path=`$CYGPATH -u "$windows_path"`
30743    new_path="$unix_path"
30744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30746    new_path="$unix_path"
30747  fi
30748
30749
30750  # Now try to locate executable using which
30751  new_path=`$WHICH "$new_path" 2> /dev/null`
30752
30753  if test "x$new_path" = x; then
30754    # Oops. Which didn't find the executable.
30755    # The splitting of arguments from the executable at a space might have been incorrect,
30756    # since paths with space are more likely in Windows. Give it another try with the whole
30757    # argument.
30758    path="$complete"
30759    arguments="EOL"
30760    new_path="$path"
30761
30762  windows_path="$new_path"
30763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30764    unix_path=`$CYGPATH -u "$windows_path"`
30765    new_path="$unix_path"
30766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30768    new_path="$unix_path"
30769  fi
30770
30771
30772    new_path=`$WHICH "$new_path" 2> /dev/null`
30773
30774    if test "x$new_path" = x; then
30775      # It's still not found. Now this is an unrecoverable error.
30776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30777$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30778      has_space=`$ECHO "$complete" | $GREP " "`
30779      if test "x$has_space" != x; then
30780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30782      fi
30783      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30784    fi
30785  fi
30786
30787  # Now new_path has a complete unix path to the binary
30788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30789    # Keep paths in /bin as-is, but remove trailing .exe if any
30790    new_path="${new_path/%.exe/}"
30791    # Do not save /bin paths to all_fixpath_prefixes!
30792  else
30793    # Not in mixed or Windows style, start by that.
30794    new_path=`cmd //c echo $new_path`
30795
30796  input_path="$new_path"
30797  # Check if we need to convert this using DOS-style short mode. If the path
30798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30799  # take no chances and rewrite it.
30800  # Note: m4 eats our [], so we need to use [ and ] instead.
30801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30802  if test "x$has_forbidden_chars" != x; then
30803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30805  fi
30806
30807    # Output is in $new_path
30808
30809  windows_path="$new_path"
30810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30811    unix_path=`$CYGPATH -u "$windows_path"`
30812    new_path="$unix_path"
30813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30815    new_path="$unix_path"
30816  fi
30817
30818    # remove trailing .exe if any
30819    new_path="${new_path/%.exe/}"
30820
30821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30823  fi
30824
30825  else
30826    # We're on a posix platform. Hooray! :)
30827    # First separate the path from the arguments. This will split at the first
30828    # space.
30829    complete="$CPP"
30830    path="${complete%% *}"
30831    tmp="$complete EOL"
30832    arguments="${tmp#* }"
30833
30834    # Cannot rely on the command "which" here since it doesn't always work.
30835    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30836    if test -z "$is_absolute_path"; then
30837      # Path to executable is not absolute. Find it.
30838      IFS_save="$IFS"
30839      IFS=:
30840      for p in $PATH; do
30841        if test -f "$p/$path" && test -x "$p/$path"; then
30842          new_path="$p/$path"
30843          break
30844        fi
30845      done
30846      IFS="$IFS_save"
30847    else
30848      # This is an absolute path, we can use it without further modifications.
30849      new_path="$path"
30850    fi
30851
30852    if test "x$new_path" = x; then
30853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30854$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30855      has_space=`$ECHO "$complete" | $GREP " "`
30856      if test "x$has_space" != x; then
30857        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30859      fi
30860      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30861    fi
30862  fi
30863
30864  # Now join together the path and the arguments once again
30865  if test "x$arguments" != xEOL; then
30866    new_complete="$new_path ${arguments% *}"
30867  else
30868    new_complete="$new_path"
30869  fi
30870
30871  if test "x$complete" != "x$new_complete"; then
30872    CPP="$new_complete"
30873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30874$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30875  fi
30876
30877  ac_ext=cpp
30878ac_cpp='$CXXCPP $CPPFLAGS'
30879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30882{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30883$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30884if test -z "$CXXCPP"; then
30885  if ${ac_cv_prog_CXXCPP+:} false; then :
30886  $as_echo_n "(cached) " >&6
30887else
30888      # Double quotes because CXXCPP needs to be expanded
30889    for CXXCPP in "$CXX -E" "/lib/cpp"
30890    do
30891      ac_preproc_ok=false
30892for ac_cxx_preproc_warn_flag in '' yes
30893do
30894  # Use a header file that comes with gcc, so configuring glibc
30895  # with a fresh cross-compiler works.
30896  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30897  # <limits.h> exists even on freestanding compilers.
30898  # On the NeXT, cc -E runs the code through the compiler's parser,
30899  # not just through cpp. "Syntax error" is here to catch this case.
30900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30901/* end confdefs.h.  */
30902#ifdef __STDC__
30903# include <limits.h>
30904#else
30905# include <assert.h>
30906#endif
30907		     Syntax error
30908_ACEOF
30909if ac_fn_cxx_try_cpp "$LINENO"; then :
30910
30911else
30912  # Broken: fails on valid input.
30913continue
30914fi
30915rm -f conftest.err conftest.i conftest.$ac_ext
30916
30917  # OK, works on sane cases.  Now check whether nonexistent headers
30918  # can be detected and how.
30919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30920/* end confdefs.h.  */
30921#include <ac_nonexistent.h>
30922_ACEOF
30923if ac_fn_cxx_try_cpp "$LINENO"; then :
30924  # Broken: success on invalid input.
30925continue
30926else
30927  # Passes both tests.
30928ac_preproc_ok=:
30929break
30930fi
30931rm -f conftest.err conftest.i conftest.$ac_ext
30932
30933done
30934# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30935rm -f conftest.i conftest.err conftest.$ac_ext
30936if $ac_preproc_ok; then :
30937  break
30938fi
30939
30940    done
30941    ac_cv_prog_CXXCPP=$CXXCPP
30942
30943fi
30944  CXXCPP=$ac_cv_prog_CXXCPP
30945else
30946  ac_cv_prog_CXXCPP=$CXXCPP
30947fi
30948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30949$as_echo "$CXXCPP" >&6; }
30950ac_preproc_ok=false
30951for ac_cxx_preproc_warn_flag in '' yes
30952do
30953  # Use a header file that comes with gcc, so configuring glibc
30954  # with a fresh cross-compiler works.
30955  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30956  # <limits.h> exists even on freestanding compilers.
30957  # On the NeXT, cc -E runs the code through the compiler's parser,
30958  # not just through cpp. "Syntax error" is here to catch this case.
30959  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30960/* end confdefs.h.  */
30961#ifdef __STDC__
30962# include <limits.h>
30963#else
30964# include <assert.h>
30965#endif
30966		     Syntax error
30967_ACEOF
30968if ac_fn_cxx_try_cpp "$LINENO"; then :
30969
30970else
30971  # Broken: fails on valid input.
30972continue
30973fi
30974rm -f conftest.err conftest.i conftest.$ac_ext
30975
30976  # OK, works on sane cases.  Now check whether nonexistent headers
30977  # can be detected and how.
30978  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30979/* end confdefs.h.  */
30980#include <ac_nonexistent.h>
30981_ACEOF
30982if ac_fn_cxx_try_cpp "$LINENO"; then :
30983  # Broken: success on invalid input.
30984continue
30985else
30986  # Passes both tests.
30987ac_preproc_ok=:
30988break
30989fi
30990rm -f conftest.err conftest.i conftest.$ac_ext
30991
30992done
30993# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30994rm -f conftest.i conftest.err conftest.$ac_ext
30995if $ac_preproc_ok; then :
30996
30997else
30998  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30999$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31000as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31001See \`config.log' for more details" "$LINENO" 5; }
31002fi
31003
31004ac_ext=cpp
31005ac_cpp='$CXXCPP $CPPFLAGS'
31006ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31007ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31008ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31009
31010
31011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31012
31013  # First separate the path from the arguments. This will split at the first
31014  # space.
31015  complete="$CXXCPP"
31016  path="${complete%% *}"
31017  tmp="$complete EOL"
31018  arguments="${tmp#* }"
31019
31020  # Input might be given as Windows format, start by converting to
31021  # unix format.
31022  new_path=`$CYGPATH -u "$path"`
31023
31024  # Now try to locate executable using which
31025  new_path=`$WHICH "$new_path" 2> /dev/null`
31026  # bat and cmd files are not always considered executable in cygwin causing which
31027  # to not find them
31028  if test "x$new_path" = x \
31029      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31030      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31031    new_path=`$CYGPATH -u "$path"`
31032  fi
31033  if test "x$new_path" = x; then
31034    # Oops. Which didn't find the executable.
31035    # The splitting of arguments from the executable at a space might have been incorrect,
31036    # since paths with space are more likely in Windows. Give it another try with the whole
31037    # argument.
31038    path="$complete"
31039    arguments="EOL"
31040    new_path=`$CYGPATH -u "$path"`
31041    new_path=`$WHICH "$new_path" 2> /dev/null`
31042    # bat and cmd files are not always considered executable in cygwin causing which
31043    # to not find them
31044    if test "x$new_path" = x \
31045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31047      new_path=`$CYGPATH -u "$path"`
31048    fi
31049    if test "x$new_path" = x; then
31050      # It's still not found. Now this is an unrecoverable error.
31051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31052$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31053      has_space=`$ECHO "$complete" | $GREP " "`
31054      if test "x$has_space" != x; then
31055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31057      fi
31058      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31059    fi
31060  fi
31061
31062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31065  # "foo.exe" is OK but "foo" is an error.
31066  #
31067  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31068  # It is also a way to make sure we got the proper file name for the real test later on.
31069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31070  if test "x$test_shortpath" = x; then
31071    # Short path failed, file does not exist as specified.
31072    # Try adding .exe or .cmd
31073    if test -f "${new_path}.exe"; then
31074      input_to_shortpath="${new_path}.exe"
31075    elif test -f "${new_path}.cmd"; then
31076      input_to_shortpath="${new_path}.cmd"
31077    else
31078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31079$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31082      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31083    fi
31084  else
31085    input_to_shortpath="$new_path"
31086  fi
31087
31088  # Call helper function which possibly converts this using DOS-style short mode.
31089  # If so, the updated path is stored in $new_path.
31090  new_path="$input_to_shortpath"
31091
31092  input_path="$input_to_shortpath"
31093  # Check if we need to convert this using DOS-style short mode. If the path
31094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31095  # take no chances and rewrite it.
31096  # Note: m4 eats our [], so we need to use [ and ] instead.
31097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31098  if test "x$has_forbidden_chars" != x; then
31099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31103      # Going to short mode and back again did indeed matter. Since short mode is
31104      # case insensitive, let's make it lowercase to improve readability.
31105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31106      # Now convert it back to Unix-stile (cygpath)
31107      input_path=`$CYGPATH -u "$shortmode_path"`
31108      new_path="$input_path"
31109    fi
31110  fi
31111
31112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31113  if test "x$test_cygdrive_prefix" = x; then
31114    # As a simple fix, exclude /usr/bin since it's not a real path.
31115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31117      # a path prefixed by /cygdrive for fixpath to work.
31118      new_path="$CYGWIN_ROOT_PATH$input_path"
31119    fi
31120  fi
31121
31122  # remove trailing .exe if any
31123  new_path="${new_path/%.exe/}"
31124
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126
31127  # First separate the path from the arguments. This will split at the first
31128  # space.
31129  complete="$CXXCPP"
31130  path="${complete%% *}"
31131  tmp="$complete EOL"
31132  arguments="${tmp#* }"
31133
31134  # Input might be given as Windows format, start by converting to
31135  # unix format.
31136  new_path="$path"
31137
31138  windows_path="$new_path"
31139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31140    unix_path=`$CYGPATH -u "$windows_path"`
31141    new_path="$unix_path"
31142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31144    new_path="$unix_path"
31145  fi
31146
31147
31148  # Now try to locate executable using which
31149  new_path=`$WHICH "$new_path" 2> /dev/null`
31150
31151  if test "x$new_path" = x; then
31152    # Oops. Which didn't find the executable.
31153    # The splitting of arguments from the executable at a space might have been incorrect,
31154    # since paths with space are more likely in Windows. Give it another try with the whole
31155    # argument.
31156    path="$complete"
31157    arguments="EOL"
31158    new_path="$path"
31159
31160  windows_path="$new_path"
31161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31162    unix_path=`$CYGPATH -u "$windows_path"`
31163    new_path="$unix_path"
31164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31166    new_path="$unix_path"
31167  fi
31168
31169
31170    new_path=`$WHICH "$new_path" 2> /dev/null`
31171
31172    if test "x$new_path" = x; then
31173      # It's still not found. Now this is an unrecoverable error.
31174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31175$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31176      has_space=`$ECHO "$complete" | $GREP " "`
31177      if test "x$has_space" != x; then
31178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31180      fi
31181      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31182    fi
31183  fi
31184
31185  # Now new_path has a complete unix path to the binary
31186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31187    # Keep paths in /bin as-is, but remove trailing .exe if any
31188    new_path="${new_path/%.exe/}"
31189    # Do not save /bin paths to all_fixpath_prefixes!
31190  else
31191    # Not in mixed or Windows style, start by that.
31192    new_path=`cmd //c echo $new_path`
31193
31194  input_path="$new_path"
31195  # Check if we need to convert this using DOS-style short mode. If the path
31196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31197  # take no chances and rewrite it.
31198  # Note: m4 eats our [], so we need to use [ and ] instead.
31199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31200  if test "x$has_forbidden_chars" != x; then
31201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31203  fi
31204
31205    # Output is in $new_path
31206
31207  windows_path="$new_path"
31208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31209    unix_path=`$CYGPATH -u "$windows_path"`
31210    new_path="$unix_path"
31211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31213    new_path="$unix_path"
31214  fi
31215
31216    # remove trailing .exe if any
31217    new_path="${new_path/%.exe/}"
31218
31219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31221  fi
31222
31223  else
31224    # We're on a posix platform. Hooray! :)
31225    # First separate the path from the arguments. This will split at the first
31226    # space.
31227    complete="$CXXCPP"
31228    path="${complete%% *}"
31229    tmp="$complete EOL"
31230    arguments="${tmp#* }"
31231
31232    # Cannot rely on the command "which" here since it doesn't always work.
31233    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31234    if test -z "$is_absolute_path"; then
31235      # Path to executable is not absolute. Find it.
31236      IFS_save="$IFS"
31237      IFS=:
31238      for p in $PATH; do
31239        if test -f "$p/$path" && test -x "$p/$path"; then
31240          new_path="$p/$path"
31241          break
31242        fi
31243      done
31244      IFS="$IFS_save"
31245    else
31246      # This is an absolute path, we can use it without further modifications.
31247      new_path="$path"
31248    fi
31249
31250    if test "x$new_path" = x; then
31251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31252$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31253      has_space=`$ECHO "$complete" | $GREP " "`
31254      if test "x$has_space" != x; then
31255        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31257      fi
31258      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31259    fi
31260  fi
31261
31262  # Now join together the path and the arguments once again
31263  if test "x$arguments" != xEOL; then
31264    new_complete="$new_path ${arguments% *}"
31265  else
31266    new_complete="$new_path"
31267  fi
31268
31269  if test "x$complete" != "x$new_complete"; then
31270    CXXCPP="$new_complete"
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31272$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31273  fi
31274
31275
31276  #
31277  # Setup the linker (LD)
31278  #
31279  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31280    # In the Microsoft toolchain we have a separate LD command "link".
31281    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31282    # a cygwin program for something completely different.
31283    # Extract the first word of "link", so it can be a program name with args.
31284set dummy link; ac_word=$2
31285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31286$as_echo_n "checking for $ac_word... " >&6; }
31287if ${ac_cv_prog_LD+:} false; then :
31288  $as_echo_n "(cached) " >&6
31289else
31290  if test -n "$LD"; then
31291  ac_cv_prog_LD="$LD" # Let the user override the test.
31292else
31293  ac_prog_rejected=no
31294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31295for as_dir in $PATH
31296do
31297  IFS=$as_save_IFS
31298  test -z "$as_dir" && as_dir=.
31299    for ac_exec_ext in '' $ac_executable_extensions; do
31300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31301    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31302       ac_prog_rejected=yes
31303       continue
31304     fi
31305    ac_cv_prog_LD="link"
31306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31307    break 2
31308  fi
31309done
31310  done
31311IFS=$as_save_IFS
31312
31313if test $ac_prog_rejected = yes; then
31314  # We found a bogon in the path, so make sure we never use it.
31315  set dummy $ac_cv_prog_LD
31316  shift
31317  if test $# != 0; then
31318    # We chose a different compiler from the bogus one.
31319    # However, it has the same basename, so the bogon will be chosen
31320    # first if we set LD to just the basename; use the full file name.
31321    shift
31322    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31323  fi
31324fi
31325fi
31326fi
31327LD=$ac_cv_prog_LD
31328if test -n "$LD"; then
31329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31330$as_echo "$LD" >&6; }
31331else
31332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31333$as_echo "no" >&6; }
31334fi
31335
31336
31337
31338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31339
31340  # First separate the path from the arguments. This will split at the first
31341  # space.
31342  complete="$LD"
31343  path="${complete%% *}"
31344  tmp="$complete EOL"
31345  arguments="${tmp#* }"
31346
31347  # Input might be given as Windows format, start by converting to
31348  # unix format.
31349  new_path=`$CYGPATH -u "$path"`
31350
31351  # Now try to locate executable using which
31352  new_path=`$WHICH "$new_path" 2> /dev/null`
31353  # bat and cmd files are not always considered executable in cygwin causing which
31354  # to not find them
31355  if test "x$new_path" = x \
31356      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31357      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31358    new_path=`$CYGPATH -u "$path"`
31359  fi
31360  if test "x$new_path" = x; then
31361    # Oops. Which didn't find the executable.
31362    # The splitting of arguments from the executable at a space might have been incorrect,
31363    # since paths with space are more likely in Windows. Give it another try with the whole
31364    # argument.
31365    path="$complete"
31366    arguments="EOL"
31367    new_path=`$CYGPATH -u "$path"`
31368    new_path=`$WHICH "$new_path" 2> /dev/null`
31369    # bat and cmd files are not always considered executable in cygwin causing which
31370    # to not find them
31371    if test "x$new_path" = x \
31372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31374      new_path=`$CYGPATH -u "$path"`
31375    fi
31376    if test "x$new_path" = x; then
31377      # It's still not found. Now this is an unrecoverable error.
31378      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31379$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31380      has_space=`$ECHO "$complete" | $GREP " "`
31381      if test "x$has_space" != x; then
31382        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31383$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31384      fi
31385      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31386    fi
31387  fi
31388
31389  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31390  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31391  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31392  # "foo.exe" is OK but "foo" is an error.
31393  #
31394  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31395  # It is also a way to make sure we got the proper file name for the real test later on.
31396  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31397  if test "x$test_shortpath" = x; then
31398    # Short path failed, file does not exist as specified.
31399    # Try adding .exe or .cmd
31400    if test -f "${new_path}.exe"; then
31401      input_to_shortpath="${new_path}.exe"
31402    elif test -f "${new_path}.cmd"; then
31403      input_to_shortpath="${new_path}.cmd"
31404    else
31405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31406$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31407      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31408$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31409      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31410    fi
31411  else
31412    input_to_shortpath="$new_path"
31413  fi
31414
31415  # Call helper function which possibly converts this using DOS-style short mode.
31416  # If so, the updated path is stored in $new_path.
31417  new_path="$input_to_shortpath"
31418
31419  input_path="$input_to_shortpath"
31420  # Check if we need to convert this using DOS-style short mode. If the path
31421  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31422  # take no chances and rewrite it.
31423  # Note: m4 eats our [], so we need to use [ and ] instead.
31424  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31425  if test "x$has_forbidden_chars" != x; then
31426    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31427    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31428    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31429    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31430      # Going to short mode and back again did indeed matter. Since short mode is
31431      # case insensitive, let's make it lowercase to improve readability.
31432      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31433      # Now convert it back to Unix-stile (cygpath)
31434      input_path=`$CYGPATH -u "$shortmode_path"`
31435      new_path="$input_path"
31436    fi
31437  fi
31438
31439  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31440  if test "x$test_cygdrive_prefix" = x; then
31441    # As a simple fix, exclude /usr/bin since it's not a real path.
31442    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31443      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31444      # a path prefixed by /cygdrive for fixpath to work.
31445      new_path="$CYGWIN_ROOT_PATH$input_path"
31446    fi
31447  fi
31448
31449  # remove trailing .exe if any
31450  new_path="${new_path/%.exe/}"
31451
31452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31453
31454  # First separate the path from the arguments. This will split at the first
31455  # space.
31456  complete="$LD"
31457  path="${complete%% *}"
31458  tmp="$complete EOL"
31459  arguments="${tmp#* }"
31460
31461  # Input might be given as Windows format, start by converting to
31462  # unix format.
31463  new_path="$path"
31464
31465  windows_path="$new_path"
31466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31467    unix_path=`$CYGPATH -u "$windows_path"`
31468    new_path="$unix_path"
31469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31471    new_path="$unix_path"
31472  fi
31473
31474
31475  # Now try to locate executable using which
31476  new_path=`$WHICH "$new_path" 2> /dev/null`
31477
31478  if test "x$new_path" = x; then
31479    # Oops. Which didn't find the executable.
31480    # The splitting of arguments from the executable at a space might have been incorrect,
31481    # since paths with space are more likely in Windows. Give it another try with the whole
31482    # argument.
31483    path="$complete"
31484    arguments="EOL"
31485    new_path="$path"
31486
31487  windows_path="$new_path"
31488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31489    unix_path=`$CYGPATH -u "$windows_path"`
31490    new_path="$unix_path"
31491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31493    new_path="$unix_path"
31494  fi
31495
31496
31497    new_path=`$WHICH "$new_path" 2> /dev/null`
31498
31499    if test "x$new_path" = x; then
31500      # It's still not found. Now this is an unrecoverable error.
31501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31502$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31503      has_space=`$ECHO "$complete" | $GREP " "`
31504      if test "x$has_space" != x; then
31505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31507      fi
31508      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31509    fi
31510  fi
31511
31512  # Now new_path has a complete unix path to the binary
31513  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31514    # Keep paths in /bin as-is, but remove trailing .exe if any
31515    new_path="${new_path/%.exe/}"
31516    # Do not save /bin paths to all_fixpath_prefixes!
31517  else
31518    # Not in mixed or Windows style, start by that.
31519    new_path=`cmd //c echo $new_path`
31520
31521  input_path="$new_path"
31522  # Check if we need to convert this using DOS-style short mode. If the path
31523  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31524  # take no chances and rewrite it.
31525  # Note: m4 eats our [], so we need to use [ and ] instead.
31526  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31527  if test "x$has_forbidden_chars" != x; then
31528    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31529    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31530  fi
31531
31532    # Output is in $new_path
31533
31534  windows_path="$new_path"
31535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31536    unix_path=`$CYGPATH -u "$windows_path"`
31537    new_path="$unix_path"
31538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31540    new_path="$unix_path"
31541  fi
31542
31543    # remove trailing .exe if any
31544    new_path="${new_path/%.exe/}"
31545
31546    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31547    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31548  fi
31549
31550  else
31551    # We're on a posix platform. Hooray! :)
31552    # First separate the path from the arguments. This will split at the first
31553    # space.
31554    complete="$LD"
31555    path="${complete%% *}"
31556    tmp="$complete EOL"
31557    arguments="${tmp#* }"
31558
31559    # Cannot rely on the command "which" here since it doesn't always work.
31560    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31561    if test -z "$is_absolute_path"; then
31562      # Path to executable is not absolute. Find it.
31563      IFS_save="$IFS"
31564      IFS=:
31565      for p in $PATH; do
31566        if test -f "$p/$path" && test -x "$p/$path"; then
31567          new_path="$p/$path"
31568          break
31569        fi
31570      done
31571      IFS="$IFS_save"
31572    else
31573      # This is an absolute path, we can use it without further modifications.
31574      new_path="$path"
31575    fi
31576
31577    if test "x$new_path" = x; then
31578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31579$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31580      has_space=`$ECHO "$complete" | $GREP " "`
31581      if test "x$has_space" != x; then
31582        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31583$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31584      fi
31585      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31586    fi
31587  fi
31588
31589  # Now join together the path and the arguments once again
31590  if test "x$arguments" != xEOL; then
31591    new_complete="$new_path ${arguments% *}"
31592  else
31593    new_complete="$new_path"
31594  fi
31595
31596  if test "x$complete" != "x$new_complete"; then
31597    LD="$new_complete"
31598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31599$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31600  fi
31601
31602    # Verify that we indeed succeeded with this trick.
31603    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31604$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31605    "$LD" --version > /dev/null
31606    if test $? -eq 0 ; then
31607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31608$as_echo "no" >&6; }
31609      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31610    else
31611      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31612$as_echo "yes" >&6; }
31613    fi
31614    LDCXX="$LD"
31615  else
31616    # All other toolchains use the compiler to link.
31617    LD="$CC"
31618    LDCXX="$CXX"
31619  fi
31620
31621  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31622
31623
31624  #
31625  # Setup the assembler (AS)
31626  #
31627  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31628    # FIXME: should this really be solaris, or solstudio?
31629
31630
31631  # Publish this variable in the help.
31632
31633
31634  if test "x$AS" = x; then
31635    # The variable is not set by user, try to locate tool using the code snippet
31636    for ac_prog in as
31637do
31638  # Extract the first word of "$ac_prog", so it can be a program name with args.
31639set dummy $ac_prog; ac_word=$2
31640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31641$as_echo_n "checking for $ac_word... " >&6; }
31642if ${ac_cv_path_AS+:} false; then :
31643  $as_echo_n "(cached) " >&6
31644else
31645  case $AS in
31646  [\\/]* | ?:[\\/]*)
31647  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31648  ;;
31649  *)
31650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31651for as_dir in $PATH
31652do
31653  IFS=$as_save_IFS
31654  test -z "$as_dir" && as_dir=.
31655    for ac_exec_ext in '' $ac_executable_extensions; do
31656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31657    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31659    break 2
31660  fi
31661done
31662  done
31663IFS=$as_save_IFS
31664
31665  ;;
31666esac
31667fi
31668AS=$ac_cv_path_AS
31669if test -n "$AS"; then
31670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31671$as_echo "$AS" >&6; }
31672else
31673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31674$as_echo "no" >&6; }
31675fi
31676
31677
31678  test -n "$AS" && break
31679done
31680
31681  else
31682    # The variable is set, but is it from the command line or the environment?
31683
31684    # Try to remove the string !AS! from our list.
31685    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31686    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31687      # If it failed, the variable was not from the command line. Ignore it,
31688      # but warn the user (except for BASH, which is always set by the calling BASH).
31689      if test "xAS" != xBASH; then
31690        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31691$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31692      fi
31693      # Try to locate tool using the code snippet
31694      for ac_prog in as
31695do
31696  # Extract the first word of "$ac_prog", so it can be a program name with args.
31697set dummy $ac_prog; ac_word=$2
31698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31699$as_echo_n "checking for $ac_word... " >&6; }
31700if ${ac_cv_path_AS+:} false; then :
31701  $as_echo_n "(cached) " >&6
31702else
31703  case $AS in
31704  [\\/]* | ?:[\\/]*)
31705  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31706  ;;
31707  *)
31708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31709for as_dir in $PATH
31710do
31711  IFS=$as_save_IFS
31712  test -z "$as_dir" && as_dir=.
31713    for ac_exec_ext in '' $ac_executable_extensions; do
31714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31715    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31717    break 2
31718  fi
31719done
31720  done
31721IFS=$as_save_IFS
31722
31723  ;;
31724esac
31725fi
31726AS=$ac_cv_path_AS
31727if test -n "$AS"; then
31728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31729$as_echo "$AS" >&6; }
31730else
31731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31732$as_echo "no" >&6; }
31733fi
31734
31735
31736  test -n "$AS" && break
31737done
31738
31739    else
31740      # If it succeeded, then it was overridden by the user. We will use it
31741      # for the tool.
31742
31743      # First remove it from the list of overridden variables, so we can test
31744      # for unknown variables in the end.
31745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31746
31747      # Check if the provided tool contains a complete path.
31748      tool_specified="$AS"
31749      tool_basename="${tool_specified##*/}"
31750      if test "x$tool_basename" = "x$tool_specified"; then
31751        # A command without a complete path is provided, search $PATH.
31752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31753$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31754        # Extract the first word of "$tool_basename", so it can be a program name with args.
31755set dummy $tool_basename; ac_word=$2
31756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31757$as_echo_n "checking for $ac_word... " >&6; }
31758if ${ac_cv_path_AS+:} false; then :
31759  $as_echo_n "(cached) " >&6
31760else
31761  case $AS in
31762  [\\/]* | ?:[\\/]*)
31763  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31764  ;;
31765  *)
31766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31767for as_dir in $PATH
31768do
31769  IFS=$as_save_IFS
31770  test -z "$as_dir" && as_dir=.
31771    for ac_exec_ext in '' $ac_executable_extensions; do
31772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31773    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31775    break 2
31776  fi
31777done
31778  done
31779IFS=$as_save_IFS
31780
31781  ;;
31782esac
31783fi
31784AS=$ac_cv_path_AS
31785if test -n "$AS"; then
31786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31787$as_echo "$AS" >&6; }
31788else
31789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31790$as_echo "no" >&6; }
31791fi
31792
31793
31794        if test "x$AS" = x; then
31795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31796        fi
31797      else
31798        # Otherwise we believe it is a complete path. Use it as it is.
31799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31800$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31802$as_echo_n "checking for AS... " >&6; }
31803        if test ! -x "$tool_specified"; then
31804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31805$as_echo "not found" >&6; }
31806          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31807        fi
31808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31809$as_echo "$tool_specified" >&6; }
31810      fi
31811    fi
31812  fi
31813
31814
31815
31816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31817
31818  # First separate the path from the arguments. This will split at the first
31819  # space.
31820  complete="$AS"
31821  path="${complete%% *}"
31822  tmp="$complete EOL"
31823  arguments="${tmp#* }"
31824
31825  # Input might be given as Windows format, start by converting to
31826  # unix format.
31827  new_path=`$CYGPATH -u "$path"`
31828
31829  # Now try to locate executable using which
31830  new_path=`$WHICH "$new_path" 2> /dev/null`
31831  # bat and cmd files are not always considered executable in cygwin causing which
31832  # to not find them
31833  if test "x$new_path" = x \
31834      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31835      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31836    new_path=`$CYGPATH -u "$path"`
31837  fi
31838  if test "x$new_path" = x; then
31839    # Oops. Which didn't find the executable.
31840    # The splitting of arguments from the executable at a space might have been incorrect,
31841    # since paths with space are more likely in Windows. Give it another try with the whole
31842    # argument.
31843    path="$complete"
31844    arguments="EOL"
31845    new_path=`$CYGPATH -u "$path"`
31846    new_path=`$WHICH "$new_path" 2> /dev/null`
31847    # bat and cmd files are not always considered executable in cygwin causing which
31848    # to not find them
31849    if test "x$new_path" = x \
31850        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31851        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31852      new_path=`$CYGPATH -u "$path"`
31853    fi
31854    if test "x$new_path" = x; then
31855      # It's still not found. Now this is an unrecoverable error.
31856      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31857$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31858      has_space=`$ECHO "$complete" | $GREP " "`
31859      if test "x$has_space" != x; then
31860        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31861$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31862      fi
31863      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31864    fi
31865  fi
31866
31867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31870  # "foo.exe" is OK but "foo" is an error.
31871  #
31872  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31873  # It is also a way to make sure we got the proper file name for the real test later on.
31874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31875  if test "x$test_shortpath" = x; then
31876    # Short path failed, file does not exist as specified.
31877    # Try adding .exe or .cmd
31878    if test -f "${new_path}.exe"; then
31879      input_to_shortpath="${new_path}.exe"
31880    elif test -f "${new_path}.cmd"; then
31881      input_to_shortpath="${new_path}.cmd"
31882    else
31883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31884$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31885      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31886$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31887      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31888    fi
31889  else
31890    input_to_shortpath="$new_path"
31891  fi
31892
31893  # Call helper function which possibly converts this using DOS-style short mode.
31894  # If so, the updated path is stored in $new_path.
31895  new_path="$input_to_shortpath"
31896
31897  input_path="$input_to_shortpath"
31898  # Check if we need to convert this using DOS-style short mode. If the path
31899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31900  # take no chances and rewrite it.
31901  # Note: m4 eats our [], so we need to use [ and ] instead.
31902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31903  if test "x$has_forbidden_chars" != x; then
31904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31905    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31906    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31907    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31908      # Going to short mode and back again did indeed matter. Since short mode is
31909      # case insensitive, let's make it lowercase to improve readability.
31910      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31911      # Now convert it back to Unix-stile (cygpath)
31912      input_path=`$CYGPATH -u "$shortmode_path"`
31913      new_path="$input_path"
31914    fi
31915  fi
31916
31917  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31918  if test "x$test_cygdrive_prefix" = x; then
31919    # As a simple fix, exclude /usr/bin since it's not a real path.
31920    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31921      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31922      # a path prefixed by /cygdrive for fixpath to work.
31923      new_path="$CYGWIN_ROOT_PATH$input_path"
31924    fi
31925  fi
31926
31927  # remove trailing .exe if any
31928  new_path="${new_path/%.exe/}"
31929
31930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31931
31932  # First separate the path from the arguments. This will split at the first
31933  # space.
31934  complete="$AS"
31935  path="${complete%% *}"
31936  tmp="$complete EOL"
31937  arguments="${tmp#* }"
31938
31939  # Input might be given as Windows format, start by converting to
31940  # unix format.
31941  new_path="$path"
31942
31943  windows_path="$new_path"
31944  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31945    unix_path=`$CYGPATH -u "$windows_path"`
31946    new_path="$unix_path"
31947  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31948    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31949    new_path="$unix_path"
31950  fi
31951
31952
31953  # Now try to locate executable using which
31954  new_path=`$WHICH "$new_path" 2> /dev/null`
31955
31956  if test "x$new_path" = x; then
31957    # Oops. Which didn't find the executable.
31958    # The splitting of arguments from the executable at a space might have been incorrect,
31959    # since paths with space are more likely in Windows. Give it another try with the whole
31960    # argument.
31961    path="$complete"
31962    arguments="EOL"
31963    new_path="$path"
31964
31965  windows_path="$new_path"
31966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31967    unix_path=`$CYGPATH -u "$windows_path"`
31968    new_path="$unix_path"
31969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31971    new_path="$unix_path"
31972  fi
31973
31974
31975    new_path=`$WHICH "$new_path" 2> /dev/null`
31976
31977    if test "x$new_path" = x; then
31978      # It's still not found. Now this is an unrecoverable error.
31979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31980$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31981      has_space=`$ECHO "$complete" | $GREP " "`
31982      if test "x$has_space" != x; then
31983        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31984$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31985      fi
31986      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31987    fi
31988  fi
31989
31990  # Now new_path has a complete unix path to the binary
31991  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31992    # Keep paths in /bin as-is, but remove trailing .exe if any
31993    new_path="${new_path/%.exe/}"
31994    # Do not save /bin paths to all_fixpath_prefixes!
31995  else
31996    # Not in mixed or Windows style, start by that.
31997    new_path=`cmd //c echo $new_path`
31998
31999  input_path="$new_path"
32000  # Check if we need to convert this using DOS-style short mode. If the path
32001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32002  # take no chances and rewrite it.
32003  # Note: m4 eats our [], so we need to use [ and ] instead.
32004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32005  if test "x$has_forbidden_chars" != x; then
32006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32007    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32008  fi
32009
32010    # Output is in $new_path
32011
32012  windows_path="$new_path"
32013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32014    unix_path=`$CYGPATH -u "$windows_path"`
32015    new_path="$unix_path"
32016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32018    new_path="$unix_path"
32019  fi
32020
32021    # remove trailing .exe if any
32022    new_path="${new_path/%.exe/}"
32023
32024    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32025    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32026  fi
32027
32028  else
32029    # We're on a posix platform. Hooray! :)
32030    # First separate the path from the arguments. This will split at the first
32031    # space.
32032    complete="$AS"
32033    path="${complete%% *}"
32034    tmp="$complete EOL"
32035    arguments="${tmp#* }"
32036
32037    # Cannot rely on the command "which" here since it doesn't always work.
32038    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32039    if test -z "$is_absolute_path"; then
32040      # Path to executable is not absolute. Find it.
32041      IFS_save="$IFS"
32042      IFS=:
32043      for p in $PATH; do
32044        if test -f "$p/$path" && test -x "$p/$path"; then
32045          new_path="$p/$path"
32046          break
32047        fi
32048      done
32049      IFS="$IFS_save"
32050    else
32051      # This is an absolute path, we can use it without further modifications.
32052      new_path="$path"
32053    fi
32054
32055    if test "x$new_path" = x; then
32056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32057$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32058      has_space=`$ECHO "$complete" | $GREP " "`
32059      if test "x$has_space" != x; then
32060        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32061$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32062      fi
32063      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32064    fi
32065  fi
32066
32067  # Now join together the path and the arguments once again
32068  if test "x$arguments" != xEOL; then
32069    new_complete="$new_path ${arguments% *}"
32070  else
32071    new_complete="$new_path"
32072  fi
32073
32074  if test "x$complete" != "x$new_complete"; then
32075    AS="$new_complete"
32076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32077$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32078  fi
32079
32080  else
32081    # FIXME: is this correct for microsoft?
32082    AS="$CC -c"
32083  fi
32084
32085
32086  #
32087  # Setup the archiver (AR)
32088  #
32089  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32090    # The corresponding ar tool is lib.exe (used to create static libraries)
32091    # Extract the first word of "lib", so it can be a program name with args.
32092set dummy lib; ac_word=$2
32093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32094$as_echo_n "checking for $ac_word... " >&6; }
32095if ${ac_cv_prog_AR+:} false; then :
32096  $as_echo_n "(cached) " >&6
32097else
32098  if test -n "$AR"; then
32099  ac_cv_prog_AR="$AR" # Let the user override the test.
32100else
32101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32102for as_dir in $PATH
32103do
32104  IFS=$as_save_IFS
32105  test -z "$as_dir" && as_dir=.
32106    for ac_exec_ext in '' $ac_executable_extensions; do
32107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32108    ac_cv_prog_AR="lib"
32109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32110    break 2
32111  fi
32112done
32113  done
32114IFS=$as_save_IFS
32115
32116fi
32117fi
32118AR=$ac_cv_prog_AR
32119if test -n "$AR"; then
32120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32121$as_echo "$AR" >&6; }
32122else
32123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32124$as_echo "no" >&6; }
32125fi
32126
32127
32128  else
32129
32130
32131  # Publish this variable in the help.
32132
32133
32134  if test "x$AR" = x; then
32135    # The variable is not set by user, try to locate tool using the code snippet
32136    if test -n "$ac_tool_prefix"; then
32137  for ac_prog in ar
32138  do
32139    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32140set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32142$as_echo_n "checking for $ac_word... " >&6; }
32143if ${ac_cv_prog_AR+:} false; then :
32144  $as_echo_n "(cached) " >&6
32145else
32146  if test -n "$AR"; then
32147  ac_cv_prog_AR="$AR" # Let the user override the test.
32148else
32149as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32150for as_dir in $PATH
32151do
32152  IFS=$as_save_IFS
32153  test -z "$as_dir" && as_dir=.
32154    for ac_exec_ext in '' $ac_executable_extensions; do
32155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32156    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32158    break 2
32159  fi
32160done
32161  done
32162IFS=$as_save_IFS
32163
32164fi
32165fi
32166AR=$ac_cv_prog_AR
32167if test -n "$AR"; then
32168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32169$as_echo "$AR" >&6; }
32170else
32171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32172$as_echo "no" >&6; }
32173fi
32174
32175
32176    test -n "$AR" && break
32177  done
32178fi
32179if test -z "$AR"; then
32180  ac_ct_AR=$AR
32181  for ac_prog in ar
32182do
32183  # Extract the first word of "$ac_prog", so it can be a program name with args.
32184set dummy $ac_prog; ac_word=$2
32185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32186$as_echo_n "checking for $ac_word... " >&6; }
32187if ${ac_cv_prog_ac_ct_AR+:} false; then :
32188  $as_echo_n "(cached) " >&6
32189else
32190  if test -n "$ac_ct_AR"; then
32191  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32192else
32193as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32194for as_dir in $PATH
32195do
32196  IFS=$as_save_IFS
32197  test -z "$as_dir" && as_dir=.
32198    for ac_exec_ext in '' $ac_executable_extensions; do
32199  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32200    ac_cv_prog_ac_ct_AR="$ac_prog"
32201    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32202    break 2
32203  fi
32204done
32205  done
32206IFS=$as_save_IFS
32207
32208fi
32209fi
32210ac_ct_AR=$ac_cv_prog_ac_ct_AR
32211if test -n "$ac_ct_AR"; then
32212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32213$as_echo "$ac_ct_AR" >&6; }
32214else
32215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32216$as_echo "no" >&6; }
32217fi
32218
32219
32220  test -n "$ac_ct_AR" && break
32221done
32222
32223  if test "x$ac_ct_AR" = x; then
32224    AR=""
32225  else
32226    case $cross_compiling:$ac_tool_warned in
32227yes:)
32228{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32229$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32230ac_tool_warned=yes ;;
32231esac
32232    AR=$ac_ct_AR
32233  fi
32234fi
32235
32236  else
32237    # The variable is set, but is it from the command line or the environment?
32238
32239    # Try to remove the string !AR! from our list.
32240    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32241    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32242      # If it failed, the variable was not from the command line. Ignore it,
32243      # but warn the user (except for BASH, which is always set by the calling BASH).
32244      if test "xAR" != xBASH; then
32245        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32246$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32247      fi
32248      # Try to locate tool using the code snippet
32249      if test -n "$ac_tool_prefix"; then
32250  for ac_prog in ar
32251  do
32252    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32253set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32255$as_echo_n "checking for $ac_word... " >&6; }
32256if ${ac_cv_prog_AR+:} false; then :
32257  $as_echo_n "(cached) " >&6
32258else
32259  if test -n "$AR"; then
32260  ac_cv_prog_AR="$AR" # Let the user override the test.
32261else
32262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32263for as_dir in $PATH
32264do
32265  IFS=$as_save_IFS
32266  test -z "$as_dir" && as_dir=.
32267    for ac_exec_ext in '' $ac_executable_extensions; do
32268  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32269    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32270    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32271    break 2
32272  fi
32273done
32274  done
32275IFS=$as_save_IFS
32276
32277fi
32278fi
32279AR=$ac_cv_prog_AR
32280if test -n "$AR"; then
32281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32282$as_echo "$AR" >&6; }
32283else
32284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32285$as_echo "no" >&6; }
32286fi
32287
32288
32289    test -n "$AR" && break
32290  done
32291fi
32292if test -z "$AR"; then
32293  ac_ct_AR=$AR
32294  for ac_prog in ar
32295do
32296  # Extract the first word of "$ac_prog", so it can be a program name with args.
32297set dummy $ac_prog; ac_word=$2
32298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32299$as_echo_n "checking for $ac_word... " >&6; }
32300if ${ac_cv_prog_ac_ct_AR+:} false; then :
32301  $as_echo_n "(cached) " >&6
32302else
32303  if test -n "$ac_ct_AR"; then
32304  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32305else
32306as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32307for as_dir in $PATH
32308do
32309  IFS=$as_save_IFS
32310  test -z "$as_dir" && as_dir=.
32311    for ac_exec_ext in '' $ac_executable_extensions; do
32312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32313    ac_cv_prog_ac_ct_AR="$ac_prog"
32314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32315    break 2
32316  fi
32317done
32318  done
32319IFS=$as_save_IFS
32320
32321fi
32322fi
32323ac_ct_AR=$ac_cv_prog_ac_ct_AR
32324if test -n "$ac_ct_AR"; then
32325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32326$as_echo "$ac_ct_AR" >&6; }
32327else
32328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32329$as_echo "no" >&6; }
32330fi
32331
32332
32333  test -n "$ac_ct_AR" && break
32334done
32335
32336  if test "x$ac_ct_AR" = x; then
32337    AR=""
32338  else
32339    case $cross_compiling:$ac_tool_warned in
32340yes:)
32341{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32342$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32343ac_tool_warned=yes ;;
32344esac
32345    AR=$ac_ct_AR
32346  fi
32347fi
32348
32349    else
32350      # If it succeeded, then it was overridden by the user. We will use it
32351      # for the tool.
32352
32353      # First remove it from the list of overridden variables, so we can test
32354      # for unknown variables in the end.
32355      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32356
32357      # Check if the provided tool contains a complete path.
32358      tool_specified="$AR"
32359      tool_basename="${tool_specified##*/}"
32360      if test "x$tool_basename" = "x$tool_specified"; then
32361        # A command without a complete path is provided, search $PATH.
32362        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32363$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32364        # Extract the first word of "$tool_basename", so it can be a program name with args.
32365set dummy $tool_basename; ac_word=$2
32366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32367$as_echo_n "checking for $ac_word... " >&6; }
32368if ${ac_cv_path_AR+:} false; then :
32369  $as_echo_n "(cached) " >&6
32370else
32371  case $AR in
32372  [\\/]* | ?:[\\/]*)
32373  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32374  ;;
32375  *)
32376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32377for as_dir in $PATH
32378do
32379  IFS=$as_save_IFS
32380  test -z "$as_dir" && as_dir=.
32381    for ac_exec_ext in '' $ac_executable_extensions; do
32382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32383    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32385    break 2
32386  fi
32387done
32388  done
32389IFS=$as_save_IFS
32390
32391  ;;
32392esac
32393fi
32394AR=$ac_cv_path_AR
32395if test -n "$AR"; then
32396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32397$as_echo "$AR" >&6; }
32398else
32399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32400$as_echo "no" >&6; }
32401fi
32402
32403
32404        if test "x$AR" = x; then
32405          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32406        fi
32407      else
32408        # Otherwise we believe it is a complete path. Use it as it is.
32409        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32410$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32411        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32412$as_echo_n "checking for AR... " >&6; }
32413        if test ! -x "$tool_specified"; then
32414          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32415$as_echo "not found" >&6; }
32416          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32417        fi
32418        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32419$as_echo "$tool_specified" >&6; }
32420      fi
32421    fi
32422  fi
32423
32424
32425  fi
32426
32427  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32428
32429  # First separate the path from the arguments. This will split at the first
32430  # space.
32431  complete="$AR"
32432  path="${complete%% *}"
32433  tmp="$complete EOL"
32434  arguments="${tmp#* }"
32435
32436  # Input might be given as Windows format, start by converting to
32437  # unix format.
32438  new_path=`$CYGPATH -u "$path"`
32439
32440  # Now try to locate executable using which
32441  new_path=`$WHICH "$new_path" 2> /dev/null`
32442  # bat and cmd files are not always considered executable in cygwin causing which
32443  # to not find them
32444  if test "x$new_path" = x \
32445      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32446      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32447    new_path=`$CYGPATH -u "$path"`
32448  fi
32449  if test "x$new_path" = x; then
32450    # Oops. Which didn't find the executable.
32451    # The splitting of arguments from the executable at a space might have been incorrect,
32452    # since paths with space are more likely in Windows. Give it another try with the whole
32453    # argument.
32454    path="$complete"
32455    arguments="EOL"
32456    new_path=`$CYGPATH -u "$path"`
32457    new_path=`$WHICH "$new_path" 2> /dev/null`
32458    # bat and cmd files are not always considered executable in cygwin causing which
32459    # to not find them
32460    if test "x$new_path" = x \
32461        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32462        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32463      new_path=`$CYGPATH -u "$path"`
32464    fi
32465    if test "x$new_path" = x; then
32466      # It's still not found. Now this is an unrecoverable error.
32467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32468$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32469      has_space=`$ECHO "$complete" | $GREP " "`
32470      if test "x$has_space" != x; then
32471        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32472$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32473      fi
32474      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32475    fi
32476  fi
32477
32478  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32479  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32480  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32481  # "foo.exe" is OK but "foo" is an error.
32482  #
32483  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32484  # It is also a way to make sure we got the proper file name for the real test later on.
32485  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32486  if test "x$test_shortpath" = x; then
32487    # Short path failed, file does not exist as specified.
32488    # Try adding .exe or .cmd
32489    if test -f "${new_path}.exe"; then
32490      input_to_shortpath="${new_path}.exe"
32491    elif test -f "${new_path}.cmd"; then
32492      input_to_shortpath="${new_path}.cmd"
32493    else
32494      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32495$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32497$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32498      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32499    fi
32500  else
32501    input_to_shortpath="$new_path"
32502  fi
32503
32504  # Call helper function which possibly converts this using DOS-style short mode.
32505  # If so, the updated path is stored in $new_path.
32506  new_path="$input_to_shortpath"
32507
32508  input_path="$input_to_shortpath"
32509  # Check if we need to convert this using DOS-style short mode. If the path
32510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32511  # take no chances and rewrite it.
32512  # Note: m4 eats our [], so we need to use [ and ] instead.
32513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32514  if test "x$has_forbidden_chars" != x; then
32515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32519      # Going to short mode and back again did indeed matter. Since short mode is
32520      # case insensitive, let's make it lowercase to improve readability.
32521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32522      # Now convert it back to Unix-stile (cygpath)
32523      input_path=`$CYGPATH -u "$shortmode_path"`
32524      new_path="$input_path"
32525    fi
32526  fi
32527
32528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32529  if test "x$test_cygdrive_prefix" = x; then
32530    # As a simple fix, exclude /usr/bin since it's not a real path.
32531    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32533      # a path prefixed by /cygdrive for fixpath to work.
32534      new_path="$CYGWIN_ROOT_PATH$input_path"
32535    fi
32536  fi
32537
32538  # remove trailing .exe if any
32539  new_path="${new_path/%.exe/}"
32540
32541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32542
32543  # First separate the path from the arguments. This will split at the first
32544  # space.
32545  complete="$AR"
32546  path="${complete%% *}"
32547  tmp="$complete EOL"
32548  arguments="${tmp#* }"
32549
32550  # Input might be given as Windows format, start by converting to
32551  # unix format.
32552  new_path="$path"
32553
32554  windows_path="$new_path"
32555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32556    unix_path=`$CYGPATH -u "$windows_path"`
32557    new_path="$unix_path"
32558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32560    new_path="$unix_path"
32561  fi
32562
32563
32564  # Now try to locate executable using which
32565  new_path=`$WHICH "$new_path" 2> /dev/null`
32566
32567  if test "x$new_path" = x; then
32568    # Oops. Which didn't find the executable.
32569    # The splitting of arguments from the executable at a space might have been incorrect,
32570    # since paths with space are more likely in Windows. Give it another try with the whole
32571    # argument.
32572    path="$complete"
32573    arguments="EOL"
32574    new_path="$path"
32575
32576  windows_path="$new_path"
32577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32578    unix_path=`$CYGPATH -u "$windows_path"`
32579    new_path="$unix_path"
32580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32582    new_path="$unix_path"
32583  fi
32584
32585
32586    new_path=`$WHICH "$new_path" 2> /dev/null`
32587
32588    if test "x$new_path" = x; then
32589      # It's still not found. Now this is an unrecoverable error.
32590      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32591$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32592      has_space=`$ECHO "$complete" | $GREP " "`
32593      if test "x$has_space" != x; then
32594        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32595$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32596      fi
32597      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32598    fi
32599  fi
32600
32601  # Now new_path has a complete unix path to the binary
32602  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32603    # Keep paths in /bin as-is, but remove trailing .exe if any
32604    new_path="${new_path/%.exe/}"
32605    # Do not save /bin paths to all_fixpath_prefixes!
32606  else
32607    # Not in mixed or Windows style, start by that.
32608    new_path=`cmd //c echo $new_path`
32609
32610  input_path="$new_path"
32611  # Check if we need to convert this using DOS-style short mode. If the path
32612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32613  # take no chances and rewrite it.
32614  # Note: m4 eats our [], so we need to use [ and ] instead.
32615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32616  if test "x$has_forbidden_chars" != x; then
32617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32618    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32619  fi
32620
32621    # Output is in $new_path
32622
32623  windows_path="$new_path"
32624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32625    unix_path=`$CYGPATH -u "$windows_path"`
32626    new_path="$unix_path"
32627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32629    new_path="$unix_path"
32630  fi
32631
32632    # remove trailing .exe if any
32633    new_path="${new_path/%.exe/}"
32634
32635    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32636    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32637  fi
32638
32639  else
32640    # We're on a posix platform. Hooray! :)
32641    # First separate the path from the arguments. This will split at the first
32642    # space.
32643    complete="$AR"
32644    path="${complete%% *}"
32645    tmp="$complete EOL"
32646    arguments="${tmp#* }"
32647
32648    # Cannot rely on the command "which" here since it doesn't always work.
32649    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32650    if test -z "$is_absolute_path"; then
32651      # Path to executable is not absolute. Find it.
32652      IFS_save="$IFS"
32653      IFS=:
32654      for p in $PATH; do
32655        if test -f "$p/$path" && test -x "$p/$path"; then
32656          new_path="$p/$path"
32657          break
32658        fi
32659      done
32660      IFS="$IFS_save"
32661    else
32662      # This is an absolute path, we can use it without further modifications.
32663      new_path="$path"
32664    fi
32665
32666    if test "x$new_path" = x; then
32667      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32668$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32669      has_space=`$ECHO "$complete" | $GREP " "`
32670      if test "x$has_space" != x; then
32671        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32672$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32673      fi
32674      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32675    fi
32676  fi
32677
32678  # Now join together the path and the arguments once again
32679  if test "x$arguments" != xEOL; then
32680    new_complete="$new_path ${arguments% *}"
32681  else
32682    new_complete="$new_path"
32683  fi
32684
32685  if test "x$complete" != "x$new_complete"; then
32686    AR="$new_complete"
32687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32688$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32689  fi
32690
32691
32692
32693  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32694    ac_ext=m
32695ac_cpp='$OBJCPP $CPPFLAGS'
32696ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32697ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32698ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32699if test -n "$ac_tool_prefix"; then
32700  for ac_prog in gcc objcc objc cc CC
32701  do
32702    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32705$as_echo_n "checking for $ac_word... " >&6; }
32706if ${ac_cv_prog_OBJC+:} false; then :
32707  $as_echo_n "(cached) " >&6
32708else
32709  if test -n "$OBJC"; then
32710  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32711else
32712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32713for as_dir in $PATH
32714do
32715  IFS=$as_save_IFS
32716  test -z "$as_dir" && as_dir=.
32717    for ac_exec_ext in '' $ac_executable_extensions; do
32718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32719    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32721    break 2
32722  fi
32723done
32724  done
32725IFS=$as_save_IFS
32726
32727fi
32728fi
32729OBJC=$ac_cv_prog_OBJC
32730if test -n "$OBJC"; then
32731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32732$as_echo "$OBJC" >&6; }
32733else
32734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32735$as_echo "no" >&6; }
32736fi
32737
32738
32739    test -n "$OBJC" && break
32740  done
32741fi
32742if test -z "$OBJC"; then
32743  ac_ct_OBJC=$OBJC
32744  for ac_prog in gcc objcc objc cc CC
32745do
32746  # Extract the first word of "$ac_prog", so it can be a program name with args.
32747set dummy $ac_prog; ac_word=$2
32748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32749$as_echo_n "checking for $ac_word... " >&6; }
32750if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32751  $as_echo_n "(cached) " >&6
32752else
32753  if test -n "$ac_ct_OBJC"; then
32754  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32755else
32756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32757for as_dir in $PATH
32758do
32759  IFS=$as_save_IFS
32760  test -z "$as_dir" && as_dir=.
32761    for ac_exec_ext in '' $ac_executable_extensions; do
32762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32763    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32765    break 2
32766  fi
32767done
32768  done
32769IFS=$as_save_IFS
32770
32771fi
32772fi
32773ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32774if test -n "$ac_ct_OBJC"; then
32775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32776$as_echo "$ac_ct_OBJC" >&6; }
32777else
32778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32779$as_echo "no" >&6; }
32780fi
32781
32782
32783  test -n "$ac_ct_OBJC" && break
32784done
32785
32786  if test "x$ac_ct_OBJC" = x; then
32787    OBJC="gcc"
32788  else
32789    case $cross_compiling:$ac_tool_warned in
32790yes:)
32791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32793ac_tool_warned=yes ;;
32794esac
32795    OBJC=$ac_ct_OBJC
32796  fi
32797fi
32798
32799# Provide some information about the compiler.
32800$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32801set X $ac_compile
32802ac_compiler=$2
32803for ac_option in --version -v -V -qversion; do
32804  { { ac_try="$ac_compiler $ac_option >&5"
32805case "(($ac_try" in
32806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32807  *) ac_try_echo=$ac_try;;
32808esac
32809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32810$as_echo "$ac_try_echo"; } >&5
32811  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32812  ac_status=$?
32813  if test -s conftest.err; then
32814    sed '10a\
32815... rest of stderr output deleted ...
32816         10q' conftest.err >conftest.er1
32817    cat conftest.er1 >&5
32818  fi
32819  rm -f conftest.er1 conftest.err
32820  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32821  test $ac_status = 0; }
32822done
32823
32824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32825$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32826if ${ac_cv_objc_compiler_gnu+:} false; then :
32827  $as_echo_n "(cached) " >&6
32828else
32829  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32830/* end confdefs.h.  */
32831
32832int
32833main ()
32834{
32835#ifndef __GNUC__
32836       choke me
32837#endif
32838
32839  ;
32840  return 0;
32841}
32842_ACEOF
32843if ac_fn_objc_try_compile "$LINENO"; then :
32844  ac_compiler_gnu=yes
32845else
32846  ac_compiler_gnu=no
32847fi
32848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32849ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32850
32851fi
32852{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32853$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32854if test $ac_compiler_gnu = yes; then
32855  GOBJC=yes
32856else
32857  GOBJC=
32858fi
32859ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32860ac_save_OBJCFLAGS=$OBJCFLAGS
32861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32862$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32863if ${ac_cv_prog_objc_g+:} false; then :
32864  $as_echo_n "(cached) " >&6
32865else
32866  ac_save_objc_werror_flag=$ac_objc_werror_flag
32867   ac_objc_werror_flag=yes
32868   ac_cv_prog_objc_g=no
32869   OBJCFLAGS="-g"
32870   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32871/* end confdefs.h.  */
32872
32873int
32874main ()
32875{
32876
32877  ;
32878  return 0;
32879}
32880_ACEOF
32881if ac_fn_objc_try_compile "$LINENO"; then :
32882  ac_cv_prog_objc_g=yes
32883else
32884  OBJCFLAGS=""
32885      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32886/* end confdefs.h.  */
32887
32888int
32889main ()
32890{
32891
32892  ;
32893  return 0;
32894}
32895_ACEOF
32896if ac_fn_objc_try_compile "$LINENO"; then :
32897
32898else
32899  ac_objc_werror_flag=$ac_save_objc_werror_flag
32900	 OBJCFLAGS="-g"
32901	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32902/* end confdefs.h.  */
32903
32904int
32905main ()
32906{
32907
32908  ;
32909  return 0;
32910}
32911_ACEOF
32912if ac_fn_objc_try_compile "$LINENO"; then :
32913  ac_cv_prog_objc_g=yes
32914fi
32915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32916fi
32917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32918fi
32919rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32920   ac_objc_werror_flag=$ac_save_objc_werror_flag
32921fi
32922{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32923$as_echo "$ac_cv_prog_objc_g" >&6; }
32924if test "$ac_test_OBJCFLAGS" = set; then
32925  OBJCFLAGS=$ac_save_OBJCFLAGS
32926elif test $ac_cv_prog_objc_g = yes; then
32927  if test "$GOBJC" = yes; then
32928    OBJCFLAGS="-g -O2"
32929  else
32930    OBJCFLAGS="-g"
32931  fi
32932else
32933  if test "$GOBJC" = yes; then
32934    OBJCFLAGS="-O2"
32935  else
32936    OBJCFLAGS=
32937  fi
32938fi
32939ac_ext=cpp
32940ac_cpp='$CXXCPP $CPPFLAGS'
32941ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32942ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32943ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32944
32945
32946  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32947
32948  # First separate the path from the arguments. This will split at the first
32949  # space.
32950  complete="$OBJC"
32951  path="${complete%% *}"
32952  tmp="$complete EOL"
32953  arguments="${tmp#* }"
32954
32955  # Input might be given as Windows format, start by converting to
32956  # unix format.
32957  new_path=`$CYGPATH -u "$path"`
32958
32959  # Now try to locate executable using which
32960  new_path=`$WHICH "$new_path" 2> /dev/null`
32961  # bat and cmd files are not always considered executable in cygwin causing which
32962  # to not find them
32963  if test "x$new_path" = x \
32964      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32965      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32966    new_path=`$CYGPATH -u "$path"`
32967  fi
32968  if test "x$new_path" = x; then
32969    # Oops. Which didn't find the executable.
32970    # The splitting of arguments from the executable at a space might have been incorrect,
32971    # since paths with space are more likely in Windows. Give it another try with the whole
32972    # argument.
32973    path="$complete"
32974    arguments="EOL"
32975    new_path=`$CYGPATH -u "$path"`
32976    new_path=`$WHICH "$new_path" 2> /dev/null`
32977    # bat and cmd files are not always considered executable in cygwin causing which
32978    # to not find them
32979    if test "x$new_path" = x \
32980        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32981        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32982      new_path=`$CYGPATH -u "$path"`
32983    fi
32984    if test "x$new_path" = x; then
32985      # It's still not found. Now this is an unrecoverable error.
32986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32987$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32988      has_space=`$ECHO "$complete" | $GREP " "`
32989      if test "x$has_space" != x; then
32990        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32991$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32992      fi
32993      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32994    fi
32995  fi
32996
32997  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32998  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32999  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33000  # "foo.exe" is OK but "foo" is an error.
33001  #
33002  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33003  # It is also a way to make sure we got the proper file name for the real test later on.
33004  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33005  if test "x$test_shortpath" = x; then
33006    # Short path failed, file does not exist as specified.
33007    # Try adding .exe or .cmd
33008    if test -f "${new_path}.exe"; then
33009      input_to_shortpath="${new_path}.exe"
33010    elif test -f "${new_path}.cmd"; then
33011      input_to_shortpath="${new_path}.cmd"
33012    else
33013      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33014$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33015      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33016$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33017      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33018    fi
33019  else
33020    input_to_shortpath="$new_path"
33021  fi
33022
33023  # Call helper function which possibly converts this using DOS-style short mode.
33024  # If so, the updated path is stored in $new_path.
33025  new_path="$input_to_shortpath"
33026
33027  input_path="$input_to_shortpath"
33028  # Check if we need to convert this using DOS-style short mode. If the path
33029  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33030  # take no chances and rewrite it.
33031  # Note: m4 eats our [], so we need to use [ and ] instead.
33032  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33033  if test "x$has_forbidden_chars" != x; then
33034    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33035    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33036    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33037    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33038      # Going to short mode and back again did indeed matter. Since short mode is
33039      # case insensitive, let's make it lowercase to improve readability.
33040      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33041      # Now convert it back to Unix-stile (cygpath)
33042      input_path=`$CYGPATH -u "$shortmode_path"`
33043      new_path="$input_path"
33044    fi
33045  fi
33046
33047  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33048  if test "x$test_cygdrive_prefix" = x; then
33049    # As a simple fix, exclude /usr/bin since it's not a real path.
33050    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33051      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33052      # a path prefixed by /cygdrive for fixpath to work.
33053      new_path="$CYGWIN_ROOT_PATH$input_path"
33054    fi
33055  fi
33056
33057  # remove trailing .exe if any
33058  new_path="${new_path/%.exe/}"
33059
33060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33061
33062  # First separate the path from the arguments. This will split at the first
33063  # space.
33064  complete="$OBJC"
33065  path="${complete%% *}"
33066  tmp="$complete EOL"
33067  arguments="${tmp#* }"
33068
33069  # Input might be given as Windows format, start by converting to
33070  # unix format.
33071  new_path="$path"
33072
33073  windows_path="$new_path"
33074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33075    unix_path=`$CYGPATH -u "$windows_path"`
33076    new_path="$unix_path"
33077  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33078    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33079    new_path="$unix_path"
33080  fi
33081
33082
33083  # Now try to locate executable using which
33084  new_path=`$WHICH "$new_path" 2> /dev/null`
33085
33086  if test "x$new_path" = x; then
33087    # Oops. Which didn't find the executable.
33088    # The splitting of arguments from the executable at a space might have been incorrect,
33089    # since paths with space are more likely in Windows. Give it another try with the whole
33090    # argument.
33091    path="$complete"
33092    arguments="EOL"
33093    new_path="$path"
33094
33095  windows_path="$new_path"
33096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33097    unix_path=`$CYGPATH -u "$windows_path"`
33098    new_path="$unix_path"
33099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33101    new_path="$unix_path"
33102  fi
33103
33104
33105    new_path=`$WHICH "$new_path" 2> /dev/null`
33106
33107    if test "x$new_path" = x; then
33108      # It's still not found. Now this is an unrecoverable error.
33109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33110$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33111      has_space=`$ECHO "$complete" | $GREP " "`
33112      if test "x$has_space" != x; then
33113        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33114$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33115      fi
33116      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33117    fi
33118  fi
33119
33120  # Now new_path has a complete unix path to the binary
33121  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33122    # Keep paths in /bin as-is, but remove trailing .exe if any
33123    new_path="${new_path/%.exe/}"
33124    # Do not save /bin paths to all_fixpath_prefixes!
33125  else
33126    # Not in mixed or Windows style, start by that.
33127    new_path=`cmd //c echo $new_path`
33128
33129  input_path="$new_path"
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    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33138  fi
33139
33140    # Output is in $new_path
33141
33142  windows_path="$new_path"
33143  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33144    unix_path=`$CYGPATH -u "$windows_path"`
33145    new_path="$unix_path"
33146  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33147    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33148    new_path="$unix_path"
33149  fi
33150
33151    # remove trailing .exe if any
33152    new_path="${new_path/%.exe/}"
33153
33154    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33155    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33156  fi
33157
33158  else
33159    # We're on a posix platform. Hooray! :)
33160    # First separate the path from the arguments. This will split at the first
33161    # space.
33162    complete="$OBJC"
33163    path="${complete%% *}"
33164    tmp="$complete EOL"
33165    arguments="${tmp#* }"
33166
33167    # Cannot rely on the command "which" here since it doesn't always work.
33168    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33169    if test -z "$is_absolute_path"; then
33170      # Path to executable is not absolute. Find it.
33171      IFS_save="$IFS"
33172      IFS=:
33173      for p in $PATH; do
33174        if test -f "$p/$path" && test -x "$p/$path"; then
33175          new_path="$p/$path"
33176          break
33177        fi
33178      done
33179      IFS="$IFS_save"
33180    else
33181      # This is an absolute path, we can use it without further modifications.
33182      new_path="$path"
33183    fi
33184
33185    if test "x$new_path" = x; then
33186      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33187$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33188      has_space=`$ECHO "$complete" | $GREP " "`
33189      if test "x$has_space" != x; then
33190        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33191$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33192      fi
33193      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33194    fi
33195  fi
33196
33197  # Now join together the path and the arguments once again
33198  if test "x$arguments" != xEOL; then
33199    new_complete="$new_path ${arguments% *}"
33200  else
33201    new_complete="$new_path"
33202  fi
33203
33204  if test "x$complete" != "x$new_complete"; then
33205    OBJC="$new_complete"
33206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33207$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33208  fi
33209
33210
33211
33212  # Publish this variable in the help.
33213
33214
33215  if test "x$LIPO" = x; then
33216    # The variable is not set by user, try to locate tool using the code snippet
33217    for ac_prog in lipo
33218do
33219  # Extract the first word of "$ac_prog", so it can be a program name with args.
33220set dummy $ac_prog; ac_word=$2
33221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33222$as_echo_n "checking for $ac_word... " >&6; }
33223if ${ac_cv_path_LIPO+:} false; then :
33224  $as_echo_n "(cached) " >&6
33225else
33226  case $LIPO in
33227  [\\/]* | ?:[\\/]*)
33228  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33229  ;;
33230  *)
33231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33232for as_dir in $PATH
33233do
33234  IFS=$as_save_IFS
33235  test -z "$as_dir" && as_dir=.
33236    for ac_exec_ext in '' $ac_executable_extensions; do
33237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33238    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33240    break 2
33241  fi
33242done
33243  done
33244IFS=$as_save_IFS
33245
33246  ;;
33247esac
33248fi
33249LIPO=$ac_cv_path_LIPO
33250if test -n "$LIPO"; then
33251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33252$as_echo "$LIPO" >&6; }
33253else
33254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33255$as_echo "no" >&6; }
33256fi
33257
33258
33259  test -n "$LIPO" && break
33260done
33261
33262  else
33263    # The variable is set, but is it from the command line or the environment?
33264
33265    # Try to remove the string !LIPO! from our list.
33266    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33267    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33268      # If it failed, the variable was not from the command line. Ignore it,
33269      # but warn the user (except for BASH, which is always set by the calling BASH).
33270      if test "xLIPO" != xBASH; then
33271        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33272$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33273      fi
33274      # Try to locate tool using the code snippet
33275      for ac_prog in lipo
33276do
33277  # Extract the first word of "$ac_prog", so it can be a program name with args.
33278set dummy $ac_prog; ac_word=$2
33279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33280$as_echo_n "checking for $ac_word... " >&6; }
33281if ${ac_cv_path_LIPO+:} false; then :
33282  $as_echo_n "(cached) " >&6
33283else
33284  case $LIPO in
33285  [\\/]* | ?:[\\/]*)
33286  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33287  ;;
33288  *)
33289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33290for as_dir in $PATH
33291do
33292  IFS=$as_save_IFS
33293  test -z "$as_dir" && as_dir=.
33294    for ac_exec_ext in '' $ac_executable_extensions; do
33295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33296    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33298    break 2
33299  fi
33300done
33301  done
33302IFS=$as_save_IFS
33303
33304  ;;
33305esac
33306fi
33307LIPO=$ac_cv_path_LIPO
33308if test -n "$LIPO"; then
33309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33310$as_echo "$LIPO" >&6; }
33311else
33312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33313$as_echo "no" >&6; }
33314fi
33315
33316
33317  test -n "$LIPO" && break
33318done
33319
33320    else
33321      # If it succeeded, then it was overridden by the user. We will use it
33322      # for the tool.
33323
33324      # First remove it from the list of overridden variables, so we can test
33325      # for unknown variables in the end.
33326      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33327
33328      # Check if the provided tool contains a complete path.
33329      tool_specified="$LIPO"
33330      tool_basename="${tool_specified##*/}"
33331      if test "x$tool_basename" = "x$tool_specified"; then
33332        # A command without a complete path is provided, search $PATH.
33333        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33334$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33335        # Extract the first word of "$tool_basename", so it can be a program name with args.
33336set dummy $tool_basename; ac_word=$2
33337{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33338$as_echo_n "checking for $ac_word... " >&6; }
33339if ${ac_cv_path_LIPO+:} false; then :
33340  $as_echo_n "(cached) " >&6
33341else
33342  case $LIPO in
33343  [\\/]* | ?:[\\/]*)
33344  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33345  ;;
33346  *)
33347  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33348for as_dir in $PATH
33349do
33350  IFS=$as_save_IFS
33351  test -z "$as_dir" && as_dir=.
33352    for ac_exec_ext in '' $ac_executable_extensions; do
33353  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33354    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33355    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33356    break 2
33357  fi
33358done
33359  done
33360IFS=$as_save_IFS
33361
33362  ;;
33363esac
33364fi
33365LIPO=$ac_cv_path_LIPO
33366if test -n "$LIPO"; then
33367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33368$as_echo "$LIPO" >&6; }
33369else
33370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33371$as_echo "no" >&6; }
33372fi
33373
33374
33375        if test "x$LIPO" = x; then
33376          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33377        fi
33378      else
33379        # Otherwise we believe it is a complete path. Use it as it is.
33380        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33381$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33382        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33383$as_echo_n "checking for LIPO... " >&6; }
33384        if test ! -x "$tool_specified"; then
33385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33386$as_echo "not found" >&6; }
33387          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33388        fi
33389        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33390$as_echo "$tool_specified" >&6; }
33391      fi
33392    fi
33393  fi
33394
33395
33396
33397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33398
33399  # First separate the path from the arguments. This will split at the first
33400  # space.
33401  complete="$LIPO"
33402  path="${complete%% *}"
33403  tmp="$complete EOL"
33404  arguments="${tmp#* }"
33405
33406  # Input might be given as Windows format, start by converting to
33407  # unix format.
33408  new_path=`$CYGPATH -u "$path"`
33409
33410  # Now try to locate executable using which
33411  new_path=`$WHICH "$new_path" 2> /dev/null`
33412  # bat and cmd files are not always considered executable in cygwin causing which
33413  # to not find them
33414  if test "x$new_path" = x \
33415      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33416      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33417    new_path=`$CYGPATH -u "$path"`
33418  fi
33419  if test "x$new_path" = x; then
33420    # Oops. Which didn't find the executable.
33421    # The splitting of arguments from the executable at a space might have been incorrect,
33422    # since paths with space are more likely in Windows. Give it another try with the whole
33423    # argument.
33424    path="$complete"
33425    arguments="EOL"
33426    new_path=`$CYGPATH -u "$path"`
33427    new_path=`$WHICH "$new_path" 2> /dev/null`
33428    # bat and cmd files are not always considered executable in cygwin causing which
33429    # to not find them
33430    if test "x$new_path" = x \
33431        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33432        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33433      new_path=`$CYGPATH -u "$path"`
33434    fi
33435    if test "x$new_path" = x; then
33436      # It's still not found. Now this is an unrecoverable error.
33437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33438$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33439      has_space=`$ECHO "$complete" | $GREP " "`
33440      if test "x$has_space" != x; then
33441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33443      fi
33444      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33445    fi
33446  fi
33447
33448  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33449  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33450  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33451  # "foo.exe" is OK but "foo" is an error.
33452  #
33453  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33454  # It is also a way to make sure we got the proper file name for the real test later on.
33455  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33456  if test "x$test_shortpath" = x; then
33457    # Short path failed, file does not exist as specified.
33458    # Try adding .exe or .cmd
33459    if test -f "${new_path}.exe"; then
33460      input_to_shortpath="${new_path}.exe"
33461    elif test -f "${new_path}.cmd"; then
33462      input_to_shortpath="${new_path}.cmd"
33463    else
33464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33465$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33466      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33467$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33468      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33469    fi
33470  else
33471    input_to_shortpath="$new_path"
33472  fi
33473
33474  # Call helper function which possibly converts this using DOS-style short mode.
33475  # If so, the updated path is stored in $new_path.
33476  new_path="$input_to_shortpath"
33477
33478  input_path="$input_to_shortpath"
33479  # Check if we need to convert this using DOS-style short mode. If the path
33480  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33481  # take no chances and rewrite it.
33482  # Note: m4 eats our [], so we need to use [ and ] instead.
33483  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33484  if test "x$has_forbidden_chars" != x; then
33485    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33486    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33487    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33488    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33489      # Going to short mode and back again did indeed matter. Since short mode is
33490      # case insensitive, let's make it lowercase to improve readability.
33491      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33492      # Now convert it back to Unix-stile (cygpath)
33493      input_path=`$CYGPATH -u "$shortmode_path"`
33494      new_path="$input_path"
33495    fi
33496  fi
33497
33498  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33499  if test "x$test_cygdrive_prefix" = x; then
33500    # As a simple fix, exclude /usr/bin since it's not a real path.
33501    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33502      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33503      # a path prefixed by /cygdrive for fixpath to work.
33504      new_path="$CYGWIN_ROOT_PATH$input_path"
33505    fi
33506  fi
33507
33508  # remove trailing .exe if any
33509  new_path="${new_path/%.exe/}"
33510
33511  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33512
33513  # First separate the path from the arguments. This will split at the first
33514  # space.
33515  complete="$LIPO"
33516  path="${complete%% *}"
33517  tmp="$complete EOL"
33518  arguments="${tmp#* }"
33519
33520  # Input might be given as Windows format, start by converting to
33521  # unix format.
33522  new_path="$path"
33523
33524  windows_path="$new_path"
33525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33526    unix_path=`$CYGPATH -u "$windows_path"`
33527    new_path="$unix_path"
33528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33530    new_path="$unix_path"
33531  fi
33532
33533
33534  # Now try to locate executable using which
33535  new_path=`$WHICH "$new_path" 2> /dev/null`
33536
33537  if test "x$new_path" = x; then
33538    # Oops. Which didn't find the executable.
33539    # The splitting of arguments from the executable at a space might have been incorrect,
33540    # since paths with space are more likely in Windows. Give it another try with the whole
33541    # argument.
33542    path="$complete"
33543    arguments="EOL"
33544    new_path="$path"
33545
33546  windows_path="$new_path"
33547  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33548    unix_path=`$CYGPATH -u "$windows_path"`
33549    new_path="$unix_path"
33550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33551    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33552    new_path="$unix_path"
33553  fi
33554
33555
33556    new_path=`$WHICH "$new_path" 2> /dev/null`
33557
33558    if test "x$new_path" = x; then
33559      # It's still not found. Now this is an unrecoverable error.
33560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33561$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33562      has_space=`$ECHO "$complete" | $GREP " "`
33563      if test "x$has_space" != x; then
33564        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33565$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33566      fi
33567      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33568    fi
33569  fi
33570
33571  # Now new_path has a complete unix path to the binary
33572  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33573    # Keep paths in /bin as-is, but remove trailing .exe if any
33574    new_path="${new_path/%.exe/}"
33575    # Do not save /bin paths to all_fixpath_prefixes!
33576  else
33577    # Not in mixed or Windows style, start by that.
33578    new_path=`cmd //c echo $new_path`
33579
33580  input_path="$new_path"
33581  # Check if we need to convert this using DOS-style short mode. If the path
33582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33583  # take no chances and rewrite it.
33584  # Note: m4 eats our [], so we need to use [ and ] instead.
33585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33586  if test "x$has_forbidden_chars" != x; then
33587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33588    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33589  fi
33590
33591    # Output is in $new_path
33592
33593  windows_path="$new_path"
33594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33595    unix_path=`$CYGPATH -u "$windows_path"`
33596    new_path="$unix_path"
33597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33599    new_path="$unix_path"
33600  fi
33601
33602    # remove trailing .exe if any
33603    new_path="${new_path/%.exe/}"
33604
33605    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33606    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33607  fi
33608
33609  else
33610    # We're on a posix platform. Hooray! :)
33611    # First separate the path from the arguments. This will split at the first
33612    # space.
33613    complete="$LIPO"
33614    path="${complete%% *}"
33615    tmp="$complete EOL"
33616    arguments="${tmp#* }"
33617
33618    # Cannot rely on the command "which" here since it doesn't always work.
33619    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33620    if test -z "$is_absolute_path"; then
33621      # Path to executable is not absolute. Find it.
33622      IFS_save="$IFS"
33623      IFS=:
33624      for p in $PATH; do
33625        if test -f "$p/$path" && test -x "$p/$path"; then
33626          new_path="$p/$path"
33627          break
33628        fi
33629      done
33630      IFS="$IFS_save"
33631    else
33632      # This is an absolute path, we can use it without further modifications.
33633      new_path="$path"
33634    fi
33635
33636    if test "x$new_path" = x; then
33637      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33638$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33639      has_space=`$ECHO "$complete" | $GREP " "`
33640      if test "x$has_space" != x; then
33641        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33642$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33643      fi
33644      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33645    fi
33646  fi
33647
33648  # Now join together the path and the arguments once again
33649  if test "x$arguments" != xEOL; then
33650    new_complete="$new_path ${arguments% *}"
33651  else
33652    new_complete="$new_path"
33653  fi
33654
33655  if test "x$complete" != "x$new_complete"; then
33656    LIPO="$new_complete"
33657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33658$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33659  fi
33660
33661  else
33662    OBJC=
33663  fi
33664
33665  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33666    # Extract the first word of "mt", so it can be a program name with args.
33667set dummy mt; ac_word=$2
33668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33669$as_echo_n "checking for $ac_word... " >&6; }
33670if ${ac_cv_prog_MT+:} false; then :
33671  $as_echo_n "(cached) " >&6
33672else
33673  if test -n "$MT"; then
33674  ac_cv_prog_MT="$MT" # Let the user override the test.
33675else
33676  ac_prog_rejected=no
33677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33678for as_dir in $PATH
33679do
33680  IFS=$as_save_IFS
33681  test -z "$as_dir" && as_dir=.
33682    for ac_exec_ext in '' $ac_executable_extensions; do
33683  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33684    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33685       ac_prog_rejected=yes
33686       continue
33687     fi
33688    ac_cv_prog_MT="mt"
33689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33690    break 2
33691  fi
33692done
33693  done
33694IFS=$as_save_IFS
33695
33696if test $ac_prog_rejected = yes; then
33697  # We found a bogon in the path, so make sure we never use it.
33698  set dummy $ac_cv_prog_MT
33699  shift
33700  if test $# != 0; then
33701    # We chose a different compiler from the bogus one.
33702    # However, it has the same basename, so the bogon will be chosen
33703    # first if we set MT to just the basename; use the full file name.
33704    shift
33705    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33706  fi
33707fi
33708fi
33709fi
33710MT=$ac_cv_prog_MT
33711if test -n "$MT"; then
33712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33713$as_echo "$MT" >&6; }
33714else
33715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33716$as_echo "no" >&6; }
33717fi
33718
33719
33720
33721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33722
33723  # First separate the path from the arguments. This will split at the first
33724  # space.
33725  complete="$MT"
33726  path="${complete%% *}"
33727  tmp="$complete EOL"
33728  arguments="${tmp#* }"
33729
33730  # Input might be given as Windows format, start by converting to
33731  # unix format.
33732  new_path=`$CYGPATH -u "$path"`
33733
33734  # Now try to locate executable using which
33735  new_path=`$WHICH "$new_path" 2> /dev/null`
33736  # bat and cmd files are not always considered executable in cygwin causing which
33737  # to not find them
33738  if test "x$new_path" = x \
33739      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33740      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33741    new_path=`$CYGPATH -u "$path"`
33742  fi
33743  if test "x$new_path" = x; then
33744    # Oops. Which didn't find the executable.
33745    # The splitting of arguments from the executable at a space might have been incorrect,
33746    # since paths with space are more likely in Windows. Give it another try with the whole
33747    # argument.
33748    path="$complete"
33749    arguments="EOL"
33750    new_path=`$CYGPATH -u "$path"`
33751    new_path=`$WHICH "$new_path" 2> /dev/null`
33752    # bat and cmd files are not always considered executable in cygwin causing which
33753    # to not find them
33754    if test "x$new_path" = x \
33755        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33756        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33757      new_path=`$CYGPATH -u "$path"`
33758    fi
33759    if test "x$new_path" = x; then
33760      # It's still not found. Now this is an unrecoverable error.
33761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33762$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33763      has_space=`$ECHO "$complete" | $GREP " "`
33764      if test "x$has_space" != x; then
33765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33767      fi
33768      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33769    fi
33770  fi
33771
33772  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33773  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33774  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33775  # "foo.exe" is OK but "foo" is an error.
33776  #
33777  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33778  # It is also a way to make sure we got the proper file name for the real test later on.
33779  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33780  if test "x$test_shortpath" = x; then
33781    # Short path failed, file does not exist as specified.
33782    # Try adding .exe or .cmd
33783    if test -f "${new_path}.exe"; then
33784      input_to_shortpath="${new_path}.exe"
33785    elif test -f "${new_path}.cmd"; then
33786      input_to_shortpath="${new_path}.cmd"
33787    else
33788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33789$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33790      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33791$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33792      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33793    fi
33794  else
33795    input_to_shortpath="$new_path"
33796  fi
33797
33798  # Call helper function which possibly converts this using DOS-style short mode.
33799  # If so, the updated path is stored in $new_path.
33800  new_path="$input_to_shortpath"
33801
33802  input_path="$input_to_shortpath"
33803  # Check if we need to convert this using DOS-style short mode. If the path
33804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33805  # take no chances and rewrite it.
33806  # Note: m4 eats our [], so we need to use [ and ] instead.
33807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33808  if test "x$has_forbidden_chars" != x; then
33809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33810    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33811    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33812    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33813      # Going to short mode and back again did indeed matter. Since short mode is
33814      # case insensitive, let's make it lowercase to improve readability.
33815      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33816      # Now convert it back to Unix-stile (cygpath)
33817      input_path=`$CYGPATH -u "$shortmode_path"`
33818      new_path="$input_path"
33819    fi
33820  fi
33821
33822  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33823  if test "x$test_cygdrive_prefix" = x; then
33824    # As a simple fix, exclude /usr/bin since it's not a real path.
33825    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33826      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33827      # a path prefixed by /cygdrive for fixpath to work.
33828      new_path="$CYGWIN_ROOT_PATH$input_path"
33829    fi
33830  fi
33831
33832  # remove trailing .exe if any
33833  new_path="${new_path/%.exe/}"
33834
33835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33836
33837  # First separate the path from the arguments. This will split at the first
33838  # space.
33839  complete="$MT"
33840  path="${complete%% *}"
33841  tmp="$complete EOL"
33842  arguments="${tmp#* }"
33843
33844  # Input might be given as Windows format, start by converting to
33845  # unix format.
33846  new_path="$path"
33847
33848  windows_path="$new_path"
33849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33850    unix_path=`$CYGPATH -u "$windows_path"`
33851    new_path="$unix_path"
33852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33854    new_path="$unix_path"
33855  fi
33856
33857
33858  # Now try to locate executable using which
33859  new_path=`$WHICH "$new_path" 2> /dev/null`
33860
33861  if test "x$new_path" = x; then
33862    # Oops. Which didn't find the executable.
33863    # The splitting of arguments from the executable at a space might have been incorrect,
33864    # since paths with space are more likely in Windows. Give it another try with the whole
33865    # argument.
33866    path="$complete"
33867    arguments="EOL"
33868    new_path="$path"
33869
33870  windows_path="$new_path"
33871  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33872    unix_path=`$CYGPATH -u "$windows_path"`
33873    new_path="$unix_path"
33874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33875    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33876    new_path="$unix_path"
33877  fi
33878
33879
33880    new_path=`$WHICH "$new_path" 2> /dev/null`
33881
33882    if test "x$new_path" = x; then
33883      # It's still not found. Now this is an unrecoverable error.
33884      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33885$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33886      has_space=`$ECHO "$complete" | $GREP " "`
33887      if test "x$has_space" != x; then
33888        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33889$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33890      fi
33891      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33892    fi
33893  fi
33894
33895  # Now new_path has a complete unix path to the binary
33896  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33897    # Keep paths in /bin as-is, but remove trailing .exe if any
33898    new_path="${new_path/%.exe/}"
33899    # Do not save /bin paths to all_fixpath_prefixes!
33900  else
33901    # Not in mixed or Windows style, start by that.
33902    new_path=`cmd //c echo $new_path`
33903
33904  input_path="$new_path"
33905  # Check if we need to convert this using DOS-style short mode. If the path
33906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33907  # take no chances and rewrite it.
33908  # Note: m4 eats our [], so we need to use [ and ] instead.
33909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33910  if test "x$has_forbidden_chars" != x; then
33911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33912    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33913  fi
33914
33915    # Output is in $new_path
33916
33917  windows_path="$new_path"
33918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33919    unix_path=`$CYGPATH -u "$windows_path"`
33920    new_path="$unix_path"
33921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33923    new_path="$unix_path"
33924  fi
33925
33926    # remove trailing .exe if any
33927    new_path="${new_path/%.exe/}"
33928
33929    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33930    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33931  fi
33932
33933  else
33934    # We're on a posix platform. Hooray! :)
33935    # First separate the path from the arguments. This will split at the first
33936    # space.
33937    complete="$MT"
33938    path="${complete%% *}"
33939    tmp="$complete EOL"
33940    arguments="${tmp#* }"
33941
33942    # Cannot rely on the command "which" here since it doesn't always work.
33943    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33944    if test -z "$is_absolute_path"; then
33945      # Path to executable is not absolute. Find it.
33946      IFS_save="$IFS"
33947      IFS=:
33948      for p in $PATH; do
33949        if test -f "$p/$path" && test -x "$p/$path"; then
33950          new_path="$p/$path"
33951          break
33952        fi
33953      done
33954      IFS="$IFS_save"
33955    else
33956      # This is an absolute path, we can use it without further modifications.
33957      new_path="$path"
33958    fi
33959
33960    if test "x$new_path" = x; then
33961      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33962$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33963      has_space=`$ECHO "$complete" | $GREP " "`
33964      if test "x$has_space" != x; then
33965        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33966$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33967      fi
33968      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33969    fi
33970  fi
33971
33972  # Now join together the path and the arguments once again
33973  if test "x$arguments" != xEOL; then
33974    new_complete="$new_path ${arguments% *}"
33975  else
33976    new_complete="$new_path"
33977  fi
33978
33979  if test "x$complete" != "x$new_complete"; then
33980    MT="$new_complete"
33981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33982$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33983  fi
33984
33985    # Setup the resource compiler (RC)
33986    # Extract the first word of "rc", so it can be a program name with args.
33987set dummy rc; ac_word=$2
33988{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33989$as_echo_n "checking for $ac_word... " >&6; }
33990if ${ac_cv_prog_RC+:} false; then :
33991  $as_echo_n "(cached) " >&6
33992else
33993  if test -n "$RC"; then
33994  ac_cv_prog_RC="$RC" # Let the user override the test.
33995else
33996  ac_prog_rejected=no
33997as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33998for as_dir in $PATH
33999do
34000  IFS=$as_save_IFS
34001  test -z "$as_dir" && as_dir=.
34002    for ac_exec_ext in '' $ac_executable_extensions; do
34003  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34004    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34005       ac_prog_rejected=yes
34006       continue
34007     fi
34008    ac_cv_prog_RC="rc"
34009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34010    break 2
34011  fi
34012done
34013  done
34014IFS=$as_save_IFS
34015
34016if test $ac_prog_rejected = yes; then
34017  # We found a bogon in the path, so make sure we never use it.
34018  set dummy $ac_cv_prog_RC
34019  shift
34020  if test $# != 0; then
34021    # We chose a different compiler from the bogus one.
34022    # However, it has the same basename, so the bogon will be chosen
34023    # first if we set RC to just the basename; use the full file name.
34024    shift
34025    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34026  fi
34027fi
34028fi
34029fi
34030RC=$ac_cv_prog_RC
34031if test -n "$RC"; then
34032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34033$as_echo "$RC" >&6; }
34034else
34035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34036$as_echo "no" >&6; }
34037fi
34038
34039
34040
34041  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34042
34043  # First separate the path from the arguments. This will split at the first
34044  # space.
34045  complete="$RC"
34046  path="${complete%% *}"
34047  tmp="$complete EOL"
34048  arguments="${tmp#* }"
34049
34050  # Input might be given as Windows format, start by converting to
34051  # unix format.
34052  new_path=`$CYGPATH -u "$path"`
34053
34054  # Now try to locate executable using which
34055  new_path=`$WHICH "$new_path" 2> /dev/null`
34056  # bat and cmd files are not always considered executable in cygwin causing which
34057  # to not find them
34058  if test "x$new_path" = x \
34059      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34060      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34061    new_path=`$CYGPATH -u "$path"`
34062  fi
34063  if test "x$new_path" = x; then
34064    # Oops. Which didn't find the executable.
34065    # The splitting of arguments from the executable at a space might have been incorrect,
34066    # since paths with space are more likely in Windows. Give it another try with the whole
34067    # argument.
34068    path="$complete"
34069    arguments="EOL"
34070    new_path=`$CYGPATH -u "$path"`
34071    new_path=`$WHICH "$new_path" 2> /dev/null`
34072    # bat and cmd files are not always considered executable in cygwin causing which
34073    # to not find them
34074    if test "x$new_path" = x \
34075        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34076        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34077      new_path=`$CYGPATH -u "$path"`
34078    fi
34079    if test "x$new_path" = x; then
34080      # It's still not found. Now this is an unrecoverable error.
34081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34082$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34083      has_space=`$ECHO "$complete" | $GREP " "`
34084      if test "x$has_space" != x; then
34085        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34086$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34087      fi
34088      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34089    fi
34090  fi
34091
34092  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34093  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34094  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34095  # "foo.exe" is OK but "foo" is an error.
34096  #
34097  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34098  # It is also a way to make sure we got the proper file name for the real test later on.
34099  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34100  if test "x$test_shortpath" = x; then
34101    # Short path failed, file does not exist as specified.
34102    # Try adding .exe or .cmd
34103    if test -f "${new_path}.exe"; then
34104      input_to_shortpath="${new_path}.exe"
34105    elif test -f "${new_path}.cmd"; then
34106      input_to_shortpath="${new_path}.cmd"
34107    else
34108      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34109$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34110      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34111$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34112      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34113    fi
34114  else
34115    input_to_shortpath="$new_path"
34116  fi
34117
34118  # Call helper function which possibly converts this using DOS-style short mode.
34119  # If so, the updated path is stored in $new_path.
34120  new_path="$input_to_shortpath"
34121
34122  input_path="$input_to_shortpath"
34123  # Check if we need to convert this using DOS-style short mode. If the path
34124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34125  # take no chances and rewrite it.
34126  # Note: m4 eats our [], so we need to use [ and ] instead.
34127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34128  if test "x$has_forbidden_chars" != x; then
34129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34133      # Going to short mode and back again did indeed matter. Since short mode is
34134      # case insensitive, let's make it lowercase to improve readability.
34135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34136      # Now convert it back to Unix-stile (cygpath)
34137      input_path=`$CYGPATH -u "$shortmode_path"`
34138      new_path="$input_path"
34139    fi
34140  fi
34141
34142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34143  if test "x$test_cygdrive_prefix" = x; then
34144    # As a simple fix, exclude /usr/bin since it's not a real path.
34145    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34147      # a path prefixed by /cygdrive for fixpath to work.
34148      new_path="$CYGWIN_ROOT_PATH$input_path"
34149    fi
34150  fi
34151
34152  # remove trailing .exe if any
34153  new_path="${new_path/%.exe/}"
34154
34155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34156
34157  # First separate the path from the arguments. This will split at the first
34158  # space.
34159  complete="$RC"
34160  path="${complete%% *}"
34161  tmp="$complete EOL"
34162  arguments="${tmp#* }"
34163
34164  # Input might be given as Windows format, start by converting to
34165  # unix format.
34166  new_path="$path"
34167
34168  windows_path="$new_path"
34169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34170    unix_path=`$CYGPATH -u "$windows_path"`
34171    new_path="$unix_path"
34172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34174    new_path="$unix_path"
34175  fi
34176
34177
34178  # Now try to locate executable using which
34179  new_path=`$WHICH "$new_path" 2> /dev/null`
34180
34181  if test "x$new_path" = x; then
34182    # Oops. Which didn't find the executable.
34183    # The splitting of arguments from the executable at a space might have been incorrect,
34184    # since paths with space are more likely in Windows. Give it another try with the whole
34185    # argument.
34186    path="$complete"
34187    arguments="EOL"
34188    new_path="$path"
34189
34190  windows_path="$new_path"
34191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192    unix_path=`$CYGPATH -u "$windows_path"`
34193    new_path="$unix_path"
34194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196    new_path="$unix_path"
34197  fi
34198
34199
34200    new_path=`$WHICH "$new_path" 2> /dev/null`
34201
34202    if test "x$new_path" = x; then
34203      # It's still not found. Now this is an unrecoverable error.
34204      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34205$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34206      has_space=`$ECHO "$complete" | $GREP " "`
34207      if test "x$has_space" != x; then
34208        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34209$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34210      fi
34211      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34212    fi
34213  fi
34214
34215  # Now new_path has a complete unix path to the binary
34216  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34217    # Keep paths in /bin as-is, but remove trailing .exe if any
34218    new_path="${new_path/%.exe/}"
34219    # Do not save /bin paths to all_fixpath_prefixes!
34220  else
34221    # Not in mixed or Windows style, start by that.
34222    new_path=`cmd //c echo $new_path`
34223
34224  input_path="$new_path"
34225  # Check if we need to convert this using DOS-style short mode. If the path
34226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34227  # take no chances and rewrite it.
34228  # Note: m4 eats our [], so we need to use [ and ] instead.
34229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34230  if test "x$has_forbidden_chars" != x; then
34231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34232    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34233  fi
34234
34235    # Output is in $new_path
34236
34237  windows_path="$new_path"
34238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34239    unix_path=`$CYGPATH -u "$windows_path"`
34240    new_path="$unix_path"
34241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34242    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34243    new_path="$unix_path"
34244  fi
34245
34246    # remove trailing .exe if any
34247    new_path="${new_path/%.exe/}"
34248
34249    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34250    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34251  fi
34252
34253  else
34254    # We're on a posix platform. Hooray! :)
34255    # First separate the path from the arguments. This will split at the first
34256    # space.
34257    complete="$RC"
34258    path="${complete%% *}"
34259    tmp="$complete EOL"
34260    arguments="${tmp#* }"
34261
34262    # Cannot rely on the command "which" here since it doesn't always work.
34263    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34264    if test -z "$is_absolute_path"; then
34265      # Path to executable is not absolute. Find it.
34266      IFS_save="$IFS"
34267      IFS=:
34268      for p in $PATH; do
34269        if test -f "$p/$path" && test -x "$p/$path"; then
34270          new_path="$p/$path"
34271          break
34272        fi
34273      done
34274      IFS="$IFS_save"
34275    else
34276      # This is an absolute path, we can use it without further modifications.
34277      new_path="$path"
34278    fi
34279
34280    if test "x$new_path" = x; then
34281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34282$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34283      has_space=`$ECHO "$complete" | $GREP " "`
34284      if test "x$has_space" != x; then
34285        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34286$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34287      fi
34288      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34289    fi
34290  fi
34291
34292  # Now join together the path and the arguments once again
34293  if test "x$arguments" != xEOL; then
34294    new_complete="$new_path ${arguments% *}"
34295  else
34296    new_complete="$new_path"
34297  fi
34298
34299  if test "x$complete" != "x$new_complete"; then
34300    RC="$new_complete"
34301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34302$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34303  fi
34304
34305    # Extract the first word of "dumpbin", so it can be a program name with args.
34306set dummy dumpbin; ac_word=$2
34307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34308$as_echo_n "checking for $ac_word... " >&6; }
34309if ${ac_cv_prog_DUMPBIN+:} false; then :
34310  $as_echo_n "(cached) " >&6
34311else
34312  if test -n "$DUMPBIN"; then
34313  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34314else
34315as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34316for as_dir in $PATH
34317do
34318  IFS=$as_save_IFS
34319  test -z "$as_dir" && as_dir=.
34320    for ac_exec_ext in '' $ac_executable_extensions; do
34321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34322    ac_cv_prog_DUMPBIN="dumpbin"
34323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34324    break 2
34325  fi
34326done
34327  done
34328IFS=$as_save_IFS
34329
34330fi
34331fi
34332DUMPBIN=$ac_cv_prog_DUMPBIN
34333if test -n "$DUMPBIN"; then
34334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34335$as_echo "$DUMPBIN" >&6; }
34336else
34337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34338$as_echo "no" >&6; }
34339fi
34340
34341
34342
34343  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34344
34345  # First separate the path from the arguments. This will split at the first
34346  # space.
34347  complete="$DUMPBIN"
34348  path="${complete%% *}"
34349  tmp="$complete EOL"
34350  arguments="${tmp#* }"
34351
34352  # Input might be given as Windows format, start by converting to
34353  # unix format.
34354  new_path=`$CYGPATH -u "$path"`
34355
34356  # Now try to locate executable using which
34357  new_path=`$WHICH "$new_path" 2> /dev/null`
34358  # bat and cmd files are not always considered executable in cygwin causing which
34359  # to not find them
34360  if test "x$new_path" = x \
34361      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34362      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34363    new_path=`$CYGPATH -u "$path"`
34364  fi
34365  if test "x$new_path" = x; then
34366    # Oops. Which didn't find the executable.
34367    # The splitting of arguments from the executable at a space might have been incorrect,
34368    # since paths with space are more likely in Windows. Give it another try with the whole
34369    # argument.
34370    path="$complete"
34371    arguments="EOL"
34372    new_path=`$CYGPATH -u "$path"`
34373    new_path=`$WHICH "$new_path" 2> /dev/null`
34374    # bat and cmd files are not always considered executable in cygwin causing which
34375    # to not find them
34376    if test "x$new_path" = x \
34377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34379      new_path=`$CYGPATH -u "$path"`
34380    fi
34381    if test "x$new_path" = x; then
34382      # It's still not found. Now this is an unrecoverable error.
34383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34384$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34385      has_space=`$ECHO "$complete" | $GREP " "`
34386      if test "x$has_space" != x; then
34387        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34388$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34389      fi
34390      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34391    fi
34392  fi
34393
34394  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34395  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34396  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34397  # "foo.exe" is OK but "foo" is an error.
34398  #
34399  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34400  # It is also a way to make sure we got the proper file name for the real test later on.
34401  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34402  if test "x$test_shortpath" = x; then
34403    # Short path failed, file does not exist as specified.
34404    # Try adding .exe or .cmd
34405    if test -f "${new_path}.exe"; then
34406      input_to_shortpath="${new_path}.exe"
34407    elif test -f "${new_path}.cmd"; then
34408      input_to_shortpath="${new_path}.cmd"
34409    else
34410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34411$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34412      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34413$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34414      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34415    fi
34416  else
34417    input_to_shortpath="$new_path"
34418  fi
34419
34420  # Call helper function which possibly converts this using DOS-style short mode.
34421  # If so, the updated path is stored in $new_path.
34422  new_path="$input_to_shortpath"
34423
34424  input_path="$input_to_shortpath"
34425  # Check if we need to convert this using DOS-style short mode. If the path
34426  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34427  # take no chances and rewrite it.
34428  # Note: m4 eats our [], so we need to use [ and ] instead.
34429  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34430  if test "x$has_forbidden_chars" != x; then
34431    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34432    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34433    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34434    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34435      # Going to short mode and back again did indeed matter. Since short mode is
34436      # case insensitive, let's make it lowercase to improve readability.
34437      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34438      # Now convert it back to Unix-stile (cygpath)
34439      input_path=`$CYGPATH -u "$shortmode_path"`
34440      new_path="$input_path"
34441    fi
34442  fi
34443
34444  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34445  if test "x$test_cygdrive_prefix" = x; then
34446    # As a simple fix, exclude /usr/bin since it's not a real path.
34447    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34448      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34449      # a path prefixed by /cygdrive for fixpath to work.
34450      new_path="$CYGWIN_ROOT_PATH$input_path"
34451    fi
34452  fi
34453
34454  # remove trailing .exe if any
34455  new_path="${new_path/%.exe/}"
34456
34457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34458
34459  # First separate the path from the arguments. This will split at the first
34460  # space.
34461  complete="$DUMPBIN"
34462  path="${complete%% *}"
34463  tmp="$complete EOL"
34464  arguments="${tmp#* }"
34465
34466  # Input might be given as Windows format, start by converting to
34467  # unix format.
34468  new_path="$path"
34469
34470  windows_path="$new_path"
34471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34472    unix_path=`$CYGPATH -u "$windows_path"`
34473    new_path="$unix_path"
34474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34476    new_path="$unix_path"
34477  fi
34478
34479
34480  # Now try to locate executable using which
34481  new_path=`$WHICH "$new_path" 2> /dev/null`
34482
34483  if test "x$new_path" = x; then
34484    # Oops. Which didn't find the executable.
34485    # The splitting of arguments from the executable at a space might have been incorrect,
34486    # since paths with space are more likely in Windows. Give it another try with the whole
34487    # argument.
34488    path="$complete"
34489    arguments="EOL"
34490    new_path="$path"
34491
34492  windows_path="$new_path"
34493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34494    unix_path=`$CYGPATH -u "$windows_path"`
34495    new_path="$unix_path"
34496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34498    new_path="$unix_path"
34499  fi
34500
34501
34502    new_path=`$WHICH "$new_path" 2> /dev/null`
34503
34504    if test "x$new_path" = x; then
34505      # It's still not found. Now this is an unrecoverable error.
34506      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34507$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34508      has_space=`$ECHO "$complete" | $GREP " "`
34509      if test "x$has_space" != x; then
34510        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34511$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34512      fi
34513      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34514    fi
34515  fi
34516
34517  # Now new_path has a complete unix path to the binary
34518  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34519    # Keep paths in /bin as-is, but remove trailing .exe if any
34520    new_path="${new_path/%.exe/}"
34521    # Do not save /bin paths to all_fixpath_prefixes!
34522  else
34523    # Not in mixed or Windows style, start by that.
34524    new_path=`cmd //c echo $new_path`
34525
34526  input_path="$new_path"
34527  # Check if we need to convert this using DOS-style short mode. If the path
34528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34529  # take no chances and rewrite it.
34530  # Note: m4 eats our [], so we need to use [ and ] instead.
34531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34532  if test "x$has_forbidden_chars" != x; then
34533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34534    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34535  fi
34536
34537    # Output is in $new_path
34538
34539  windows_path="$new_path"
34540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34541    unix_path=`$CYGPATH -u "$windows_path"`
34542    new_path="$unix_path"
34543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34545    new_path="$unix_path"
34546  fi
34547
34548    # remove trailing .exe if any
34549    new_path="${new_path/%.exe/}"
34550
34551    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34552    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34553  fi
34554
34555  else
34556    # We're on a posix platform. Hooray! :)
34557    # First separate the path from the arguments. This will split at the first
34558    # space.
34559    complete="$DUMPBIN"
34560    path="${complete%% *}"
34561    tmp="$complete EOL"
34562    arguments="${tmp#* }"
34563
34564    # Cannot rely on the command "which" here since it doesn't always work.
34565    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34566    if test -z "$is_absolute_path"; then
34567      # Path to executable is not absolute. Find it.
34568      IFS_save="$IFS"
34569      IFS=:
34570      for p in $PATH; do
34571        if test -f "$p/$path" && test -x "$p/$path"; then
34572          new_path="$p/$path"
34573          break
34574        fi
34575      done
34576      IFS="$IFS_save"
34577    else
34578      # This is an absolute path, we can use it without further modifications.
34579      new_path="$path"
34580    fi
34581
34582    if test "x$new_path" = x; then
34583      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34584$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34585      has_space=`$ECHO "$complete" | $GREP " "`
34586      if test "x$has_space" != x; then
34587        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34588$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34589      fi
34590      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34591    fi
34592  fi
34593
34594  # Now join together the path and the arguments once again
34595  if test "x$arguments" != xEOL; then
34596    new_complete="$new_path ${arguments% *}"
34597  else
34598    new_complete="$new_path"
34599  fi
34600
34601  if test "x$complete" != "x$new_complete"; then
34602    DUMPBIN="$new_complete"
34603    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34604$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34605  fi
34606
34607  fi
34608
34609  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34610
34611
34612  # Publish this variable in the help.
34613
34614
34615  if test "x$STRIP" = x; then
34616    # The variable is not set by user, try to locate tool using the code snippet
34617    for ac_prog in strip
34618do
34619  # Extract the first word of "$ac_prog", so it can be a program name with args.
34620set dummy $ac_prog; ac_word=$2
34621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34622$as_echo_n "checking for $ac_word... " >&6; }
34623if ${ac_cv_path_STRIP+:} false; then :
34624  $as_echo_n "(cached) " >&6
34625else
34626  case $STRIP in
34627  [\\/]* | ?:[\\/]*)
34628  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34629  ;;
34630  *)
34631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34632for as_dir in $PATH
34633do
34634  IFS=$as_save_IFS
34635  test -z "$as_dir" && as_dir=.
34636    for ac_exec_ext in '' $ac_executable_extensions; do
34637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34638    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34640    break 2
34641  fi
34642done
34643  done
34644IFS=$as_save_IFS
34645
34646  ;;
34647esac
34648fi
34649STRIP=$ac_cv_path_STRIP
34650if test -n "$STRIP"; then
34651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34652$as_echo "$STRIP" >&6; }
34653else
34654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34655$as_echo "no" >&6; }
34656fi
34657
34658
34659  test -n "$STRIP" && break
34660done
34661
34662  else
34663    # The variable is set, but is it from the command line or the environment?
34664
34665    # Try to remove the string !STRIP! from our list.
34666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34668      # If it failed, the variable was not from the command line. Ignore it,
34669      # but warn the user (except for BASH, which is always set by the calling BASH).
34670      if test "xSTRIP" != xBASH; then
34671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34672$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34673      fi
34674      # Try to locate tool using the code snippet
34675      for ac_prog in strip
34676do
34677  # Extract the first word of "$ac_prog", so it can be a program name with args.
34678set dummy $ac_prog; ac_word=$2
34679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34680$as_echo_n "checking for $ac_word... " >&6; }
34681if ${ac_cv_path_STRIP+:} false; then :
34682  $as_echo_n "(cached) " >&6
34683else
34684  case $STRIP in
34685  [\\/]* | ?:[\\/]*)
34686  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34687  ;;
34688  *)
34689  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34690for as_dir in $PATH
34691do
34692  IFS=$as_save_IFS
34693  test -z "$as_dir" && as_dir=.
34694    for ac_exec_ext in '' $ac_executable_extensions; do
34695  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34696    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34697    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34698    break 2
34699  fi
34700done
34701  done
34702IFS=$as_save_IFS
34703
34704  ;;
34705esac
34706fi
34707STRIP=$ac_cv_path_STRIP
34708if test -n "$STRIP"; then
34709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34710$as_echo "$STRIP" >&6; }
34711else
34712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34713$as_echo "no" >&6; }
34714fi
34715
34716
34717  test -n "$STRIP" && break
34718done
34719
34720    else
34721      # If it succeeded, then it was overridden by the user. We will use it
34722      # for the tool.
34723
34724      # First remove it from the list of overridden variables, so we can test
34725      # for unknown variables in the end.
34726      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34727
34728      # Check if the provided tool contains a complete path.
34729      tool_specified="$STRIP"
34730      tool_basename="${tool_specified##*/}"
34731      if test "x$tool_basename" = "x$tool_specified"; then
34732        # A command without a complete path is provided, search $PATH.
34733        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34734$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34735        # Extract the first word of "$tool_basename", so it can be a program name with args.
34736set dummy $tool_basename; ac_word=$2
34737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34738$as_echo_n "checking for $ac_word... " >&6; }
34739if ${ac_cv_path_STRIP+:} false; then :
34740  $as_echo_n "(cached) " >&6
34741else
34742  case $STRIP in
34743  [\\/]* | ?:[\\/]*)
34744  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34745  ;;
34746  *)
34747  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34748for as_dir in $PATH
34749do
34750  IFS=$as_save_IFS
34751  test -z "$as_dir" && as_dir=.
34752    for ac_exec_ext in '' $ac_executable_extensions; do
34753  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34754    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34755    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34756    break 2
34757  fi
34758done
34759  done
34760IFS=$as_save_IFS
34761
34762  ;;
34763esac
34764fi
34765STRIP=$ac_cv_path_STRIP
34766if test -n "$STRIP"; then
34767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34768$as_echo "$STRIP" >&6; }
34769else
34770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34771$as_echo "no" >&6; }
34772fi
34773
34774
34775        if test "x$STRIP" = x; then
34776          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34777        fi
34778      else
34779        # Otherwise we believe it is a complete path. Use it as it is.
34780        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34781$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34783$as_echo_n "checking for STRIP... " >&6; }
34784        if test ! -x "$tool_specified"; then
34785          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34786$as_echo "not found" >&6; }
34787          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34788        fi
34789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34790$as_echo "$tool_specified" >&6; }
34791      fi
34792    fi
34793  fi
34794
34795
34796
34797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34798
34799  # First separate the path from the arguments. This will split at the first
34800  # space.
34801  complete="$STRIP"
34802  path="${complete%% *}"
34803  tmp="$complete EOL"
34804  arguments="${tmp#* }"
34805
34806  # Input might be given as Windows format, start by converting to
34807  # unix format.
34808  new_path=`$CYGPATH -u "$path"`
34809
34810  # Now try to locate executable using which
34811  new_path=`$WHICH "$new_path" 2> /dev/null`
34812  # bat and cmd files are not always considered executable in cygwin causing which
34813  # to not find them
34814  if test "x$new_path" = x \
34815      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34816      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34817    new_path=`$CYGPATH -u "$path"`
34818  fi
34819  if test "x$new_path" = x; then
34820    # Oops. Which didn't find the executable.
34821    # The splitting of arguments from the executable at a space might have been incorrect,
34822    # since paths with space are more likely in Windows. Give it another try with the whole
34823    # argument.
34824    path="$complete"
34825    arguments="EOL"
34826    new_path=`$CYGPATH -u "$path"`
34827    new_path=`$WHICH "$new_path" 2> /dev/null`
34828    # bat and cmd files are not always considered executable in cygwin causing which
34829    # to not find them
34830    if test "x$new_path" = x \
34831        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34832        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34833      new_path=`$CYGPATH -u "$path"`
34834    fi
34835    if test "x$new_path" = x; then
34836      # It's still not found. Now this is an unrecoverable error.
34837      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34838$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34839      has_space=`$ECHO "$complete" | $GREP " "`
34840      if test "x$has_space" != x; then
34841        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34842$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34843      fi
34844      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34845    fi
34846  fi
34847
34848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34851  # "foo.exe" is OK but "foo" is an error.
34852  #
34853  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34854  # It is also a way to make sure we got the proper file name for the real test later on.
34855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34856  if test "x$test_shortpath" = x; then
34857    # Short path failed, file does not exist as specified.
34858    # Try adding .exe or .cmd
34859    if test -f "${new_path}.exe"; then
34860      input_to_shortpath="${new_path}.exe"
34861    elif test -f "${new_path}.cmd"; then
34862      input_to_shortpath="${new_path}.cmd"
34863    else
34864      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34865$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34866      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34867$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34868      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34869    fi
34870  else
34871    input_to_shortpath="$new_path"
34872  fi
34873
34874  # Call helper function which possibly converts this using DOS-style short mode.
34875  # If so, the updated path is stored in $new_path.
34876  new_path="$input_to_shortpath"
34877
34878  input_path="$input_to_shortpath"
34879  # Check if we need to convert this using DOS-style short mode. If the path
34880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34881  # take no chances and rewrite it.
34882  # Note: m4 eats our [], so we need to use [ and ] instead.
34883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34884  if test "x$has_forbidden_chars" != x; then
34885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34886    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34887    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34888    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34889      # Going to short mode and back again did indeed matter. Since short mode is
34890      # case insensitive, let's make it lowercase to improve readability.
34891      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34892      # Now convert it back to Unix-stile (cygpath)
34893      input_path=`$CYGPATH -u "$shortmode_path"`
34894      new_path="$input_path"
34895    fi
34896  fi
34897
34898  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34899  if test "x$test_cygdrive_prefix" = x; then
34900    # As a simple fix, exclude /usr/bin since it's not a real path.
34901    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34902      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34903      # a path prefixed by /cygdrive for fixpath to work.
34904      new_path="$CYGWIN_ROOT_PATH$input_path"
34905    fi
34906  fi
34907
34908  # remove trailing .exe if any
34909  new_path="${new_path/%.exe/}"
34910
34911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34912
34913  # First separate the path from the arguments. This will split at the first
34914  # space.
34915  complete="$STRIP"
34916  path="${complete%% *}"
34917  tmp="$complete EOL"
34918  arguments="${tmp#* }"
34919
34920  # Input might be given as Windows format, start by converting to
34921  # unix format.
34922  new_path="$path"
34923
34924  windows_path="$new_path"
34925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34926    unix_path=`$CYGPATH -u "$windows_path"`
34927    new_path="$unix_path"
34928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34929    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34930    new_path="$unix_path"
34931  fi
34932
34933
34934  # Now try to locate executable using which
34935  new_path=`$WHICH "$new_path" 2> /dev/null`
34936
34937  if test "x$new_path" = x; then
34938    # Oops. Which didn't find the executable.
34939    # The splitting of arguments from the executable at a space might have been incorrect,
34940    # since paths with space are more likely in Windows. Give it another try with the whole
34941    # argument.
34942    path="$complete"
34943    arguments="EOL"
34944    new_path="$path"
34945
34946  windows_path="$new_path"
34947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34948    unix_path=`$CYGPATH -u "$windows_path"`
34949    new_path="$unix_path"
34950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34952    new_path="$unix_path"
34953  fi
34954
34955
34956    new_path=`$WHICH "$new_path" 2> /dev/null`
34957
34958    if test "x$new_path" = x; then
34959      # It's still not found. Now this is an unrecoverable error.
34960      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34961$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34962      has_space=`$ECHO "$complete" | $GREP " "`
34963      if test "x$has_space" != x; then
34964        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34965$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34966      fi
34967      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34968    fi
34969  fi
34970
34971  # Now new_path has a complete unix path to the binary
34972  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34973    # Keep paths in /bin as-is, but remove trailing .exe if any
34974    new_path="${new_path/%.exe/}"
34975    # Do not save /bin paths to all_fixpath_prefixes!
34976  else
34977    # Not in mixed or Windows style, start by that.
34978    new_path=`cmd //c echo $new_path`
34979
34980  input_path="$new_path"
34981  # Check if we need to convert this using DOS-style short mode. If the path
34982  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34983  # take no chances and rewrite it.
34984  # Note: m4 eats our [], so we need to use [ and ] instead.
34985  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34986  if test "x$has_forbidden_chars" != x; then
34987    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34988    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34989  fi
34990
34991    # Output is in $new_path
34992
34993  windows_path="$new_path"
34994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34995    unix_path=`$CYGPATH -u "$windows_path"`
34996    new_path="$unix_path"
34997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34999    new_path="$unix_path"
35000  fi
35001
35002    # remove trailing .exe if any
35003    new_path="${new_path/%.exe/}"
35004
35005    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35006    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35007  fi
35008
35009  else
35010    # We're on a posix platform. Hooray! :)
35011    # First separate the path from the arguments. This will split at the first
35012    # space.
35013    complete="$STRIP"
35014    path="${complete%% *}"
35015    tmp="$complete EOL"
35016    arguments="${tmp#* }"
35017
35018    # Cannot rely on the command "which" here since it doesn't always work.
35019    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35020    if test -z "$is_absolute_path"; then
35021      # Path to executable is not absolute. Find it.
35022      IFS_save="$IFS"
35023      IFS=:
35024      for p in $PATH; do
35025        if test -f "$p/$path" && test -x "$p/$path"; then
35026          new_path="$p/$path"
35027          break
35028        fi
35029      done
35030      IFS="$IFS_save"
35031    else
35032      # This is an absolute path, we can use it without further modifications.
35033      new_path="$path"
35034    fi
35035
35036    if test "x$new_path" = x; then
35037      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35038$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35039      has_space=`$ECHO "$complete" | $GREP " "`
35040      if test "x$has_space" != x; then
35041        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35042$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35043      fi
35044      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35045    fi
35046  fi
35047
35048  # Now join together the path and the arguments once again
35049  if test "x$arguments" != xEOL; then
35050    new_complete="$new_path ${arguments% *}"
35051  else
35052    new_complete="$new_path"
35053  fi
35054
35055  if test "x$complete" != "x$new_complete"; then
35056    STRIP="$new_complete"
35057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35058$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35059  fi
35060
35061
35062
35063  # Publish this variable in the help.
35064
35065
35066  if test "x$NM" = x; then
35067    # The variable is not set by user, try to locate tool using the code snippet
35068    for ac_prog in nm
35069do
35070  # Extract the first word of "$ac_prog", so it can be a program name with args.
35071set dummy $ac_prog; ac_word=$2
35072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35073$as_echo_n "checking for $ac_word... " >&6; }
35074if ${ac_cv_path_NM+:} false; then :
35075  $as_echo_n "(cached) " >&6
35076else
35077  case $NM in
35078  [\\/]* | ?:[\\/]*)
35079  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35080  ;;
35081  *)
35082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35083for as_dir in $PATH
35084do
35085  IFS=$as_save_IFS
35086  test -z "$as_dir" && as_dir=.
35087    for ac_exec_ext in '' $ac_executable_extensions; do
35088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35089    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35091    break 2
35092  fi
35093done
35094  done
35095IFS=$as_save_IFS
35096
35097  ;;
35098esac
35099fi
35100NM=$ac_cv_path_NM
35101if test -n "$NM"; then
35102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35103$as_echo "$NM" >&6; }
35104else
35105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35106$as_echo "no" >&6; }
35107fi
35108
35109
35110  test -n "$NM" && break
35111done
35112
35113  else
35114    # The variable is set, but is it from the command line or the environment?
35115
35116    # Try to remove the string !NM! from our list.
35117    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35118    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35119      # If it failed, the variable was not from the command line. Ignore it,
35120      # but warn the user (except for BASH, which is always set by the calling BASH).
35121      if test "xNM" != xBASH; then
35122        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35123$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35124      fi
35125      # Try to locate tool using the code snippet
35126      for ac_prog in nm
35127do
35128  # Extract the first word of "$ac_prog", so it can be a program name with args.
35129set dummy $ac_prog; ac_word=$2
35130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35131$as_echo_n "checking for $ac_word... " >&6; }
35132if ${ac_cv_path_NM+:} false; then :
35133  $as_echo_n "(cached) " >&6
35134else
35135  case $NM in
35136  [\\/]* | ?:[\\/]*)
35137  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35138  ;;
35139  *)
35140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35141for as_dir in $PATH
35142do
35143  IFS=$as_save_IFS
35144  test -z "$as_dir" && as_dir=.
35145    for ac_exec_ext in '' $ac_executable_extensions; do
35146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35147    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35149    break 2
35150  fi
35151done
35152  done
35153IFS=$as_save_IFS
35154
35155  ;;
35156esac
35157fi
35158NM=$ac_cv_path_NM
35159if test -n "$NM"; then
35160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35161$as_echo "$NM" >&6; }
35162else
35163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35164$as_echo "no" >&6; }
35165fi
35166
35167
35168  test -n "$NM" && break
35169done
35170
35171    else
35172      # If it succeeded, then it was overridden by the user. We will use it
35173      # for the tool.
35174
35175      # First remove it from the list of overridden variables, so we can test
35176      # for unknown variables in the end.
35177      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35178
35179      # Check if the provided tool contains a complete path.
35180      tool_specified="$NM"
35181      tool_basename="${tool_specified##*/}"
35182      if test "x$tool_basename" = "x$tool_specified"; then
35183        # A command without a complete path is provided, search $PATH.
35184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35185$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35186        # Extract the first word of "$tool_basename", so it can be a program name with args.
35187set dummy $tool_basename; ac_word=$2
35188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35189$as_echo_n "checking for $ac_word... " >&6; }
35190if ${ac_cv_path_NM+:} false; then :
35191  $as_echo_n "(cached) " >&6
35192else
35193  case $NM in
35194  [\\/]* | ?:[\\/]*)
35195  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35196  ;;
35197  *)
35198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35199for as_dir in $PATH
35200do
35201  IFS=$as_save_IFS
35202  test -z "$as_dir" && as_dir=.
35203    for ac_exec_ext in '' $ac_executable_extensions; do
35204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35205    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35207    break 2
35208  fi
35209done
35210  done
35211IFS=$as_save_IFS
35212
35213  ;;
35214esac
35215fi
35216NM=$ac_cv_path_NM
35217if test -n "$NM"; then
35218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35219$as_echo "$NM" >&6; }
35220else
35221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35222$as_echo "no" >&6; }
35223fi
35224
35225
35226        if test "x$NM" = x; then
35227          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35228        fi
35229      else
35230        # Otherwise we believe it is a complete path. Use it as it is.
35231        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35232$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35233        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35234$as_echo_n "checking for NM... " >&6; }
35235        if test ! -x "$tool_specified"; then
35236          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35237$as_echo "not found" >&6; }
35238          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35239        fi
35240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35241$as_echo "$tool_specified" >&6; }
35242      fi
35243    fi
35244  fi
35245
35246
35247
35248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35249
35250  # First separate the path from the arguments. This will split at the first
35251  # space.
35252  complete="$NM"
35253  path="${complete%% *}"
35254  tmp="$complete EOL"
35255  arguments="${tmp#* }"
35256
35257  # Input might be given as Windows format, start by converting to
35258  # unix format.
35259  new_path=`$CYGPATH -u "$path"`
35260
35261  # Now try to locate executable using which
35262  new_path=`$WHICH "$new_path" 2> /dev/null`
35263  # bat and cmd files are not always considered executable in cygwin causing which
35264  # to not find them
35265  if test "x$new_path" = x \
35266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35268    new_path=`$CYGPATH -u "$path"`
35269  fi
35270  if test "x$new_path" = x; then
35271    # Oops. Which didn't find the executable.
35272    # The splitting of arguments from the executable at a space might have been incorrect,
35273    # since paths with space are more likely in Windows. Give it another try with the whole
35274    # argument.
35275    path="$complete"
35276    arguments="EOL"
35277    new_path=`$CYGPATH -u "$path"`
35278    new_path=`$WHICH "$new_path" 2> /dev/null`
35279    # bat and cmd files are not always considered executable in cygwin causing which
35280    # to not find them
35281    if test "x$new_path" = x \
35282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35284      new_path=`$CYGPATH -u "$path"`
35285    fi
35286    if test "x$new_path" = x; then
35287      # It's still not found. Now this is an unrecoverable error.
35288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35289$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35290      has_space=`$ECHO "$complete" | $GREP " "`
35291      if test "x$has_space" != x; then
35292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35294      fi
35295      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35296    fi
35297  fi
35298
35299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35302  # "foo.exe" is OK but "foo" is an error.
35303  #
35304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35305  # It is also a way to make sure we got the proper file name for the real test later on.
35306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35307  if test "x$test_shortpath" = x; then
35308    # Short path failed, file does not exist as specified.
35309    # Try adding .exe or .cmd
35310    if test -f "${new_path}.exe"; then
35311      input_to_shortpath="${new_path}.exe"
35312    elif test -f "${new_path}.cmd"; then
35313      input_to_shortpath="${new_path}.cmd"
35314    else
35315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35316$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35319      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35320    fi
35321  else
35322    input_to_shortpath="$new_path"
35323  fi
35324
35325  # Call helper function which possibly converts this using DOS-style short mode.
35326  # If so, the updated path is stored in $new_path.
35327  new_path="$input_to_shortpath"
35328
35329  input_path="$input_to_shortpath"
35330  # Check if we need to convert this using DOS-style short mode. If the path
35331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35332  # take no chances and rewrite it.
35333  # Note: m4 eats our [], so we need to use [ and ] instead.
35334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35335  if test "x$has_forbidden_chars" != x; then
35336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35340      # Going to short mode and back again did indeed matter. Since short mode is
35341      # case insensitive, let's make it lowercase to improve readability.
35342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35343      # Now convert it back to Unix-stile (cygpath)
35344      input_path=`$CYGPATH -u "$shortmode_path"`
35345      new_path="$input_path"
35346    fi
35347  fi
35348
35349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35350  if test "x$test_cygdrive_prefix" = x; then
35351    # As a simple fix, exclude /usr/bin since it's not a real path.
35352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35354      # a path prefixed by /cygdrive for fixpath to work.
35355      new_path="$CYGWIN_ROOT_PATH$input_path"
35356    fi
35357  fi
35358
35359  # remove trailing .exe if any
35360  new_path="${new_path/%.exe/}"
35361
35362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35363
35364  # First separate the path from the arguments. This will split at the first
35365  # space.
35366  complete="$NM"
35367  path="${complete%% *}"
35368  tmp="$complete EOL"
35369  arguments="${tmp#* }"
35370
35371  # Input might be given as Windows format, start by converting to
35372  # unix format.
35373  new_path="$path"
35374
35375  windows_path="$new_path"
35376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35377    unix_path=`$CYGPATH -u "$windows_path"`
35378    new_path="$unix_path"
35379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35381    new_path="$unix_path"
35382  fi
35383
35384
35385  # Now try to locate executable using which
35386  new_path=`$WHICH "$new_path" 2> /dev/null`
35387
35388  if test "x$new_path" = x; then
35389    # Oops. Which didn't find the executable.
35390    # The splitting of arguments from the executable at a space might have been incorrect,
35391    # since paths with space are more likely in Windows. Give it another try with the whole
35392    # argument.
35393    path="$complete"
35394    arguments="EOL"
35395    new_path="$path"
35396
35397  windows_path="$new_path"
35398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35399    unix_path=`$CYGPATH -u "$windows_path"`
35400    new_path="$unix_path"
35401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35403    new_path="$unix_path"
35404  fi
35405
35406
35407    new_path=`$WHICH "$new_path" 2> /dev/null`
35408
35409    if test "x$new_path" = x; then
35410      # It's still not found. Now this is an unrecoverable error.
35411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35412$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35413      has_space=`$ECHO "$complete" | $GREP " "`
35414      if test "x$has_space" != x; then
35415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35417      fi
35418      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35419    fi
35420  fi
35421
35422  # Now new_path has a complete unix path to the binary
35423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35424    # Keep paths in /bin as-is, but remove trailing .exe if any
35425    new_path="${new_path/%.exe/}"
35426    # Do not save /bin paths to all_fixpath_prefixes!
35427  else
35428    # Not in mixed or Windows style, start by that.
35429    new_path=`cmd //c echo $new_path`
35430
35431  input_path="$new_path"
35432  # Check if we need to convert this using DOS-style short mode. If the path
35433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35434  # take no chances and rewrite it.
35435  # Note: m4 eats our [], so we need to use [ and ] instead.
35436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35437  if test "x$has_forbidden_chars" != x; then
35438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35440  fi
35441
35442    # Output is in $new_path
35443
35444  windows_path="$new_path"
35445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35446    unix_path=`$CYGPATH -u "$windows_path"`
35447    new_path="$unix_path"
35448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35450    new_path="$unix_path"
35451  fi
35452
35453    # remove trailing .exe if any
35454    new_path="${new_path/%.exe/}"
35455
35456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35458  fi
35459
35460  else
35461    # We're on a posix platform. Hooray! :)
35462    # First separate the path from the arguments. This will split at the first
35463    # space.
35464    complete="$NM"
35465    path="${complete%% *}"
35466    tmp="$complete EOL"
35467    arguments="${tmp#* }"
35468
35469    # Cannot rely on the command "which" here since it doesn't always work.
35470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35471    if test -z "$is_absolute_path"; then
35472      # Path to executable is not absolute. Find it.
35473      IFS_save="$IFS"
35474      IFS=:
35475      for p in $PATH; do
35476        if test -f "$p/$path" && test -x "$p/$path"; then
35477          new_path="$p/$path"
35478          break
35479        fi
35480      done
35481      IFS="$IFS_save"
35482    else
35483      # This is an absolute path, we can use it without further modifications.
35484      new_path="$path"
35485    fi
35486
35487    if test "x$new_path" = x; then
35488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35489$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35490      has_space=`$ECHO "$complete" | $GREP " "`
35491      if test "x$has_space" != x; then
35492        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35494      fi
35495      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35496    fi
35497  fi
35498
35499  # Now join together the path and the arguments once again
35500  if test "x$arguments" != xEOL; then
35501    new_complete="$new_path ${arguments% *}"
35502  else
35503    new_complete="$new_path"
35504  fi
35505
35506  if test "x$complete" != "x$new_complete"; then
35507    NM="$new_complete"
35508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35509$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35510  fi
35511
35512
35513
35514  # Publish this variable in the help.
35515
35516
35517  if test "x$GNM" = x; then
35518    # The variable is not set by user, try to locate tool using the code snippet
35519    for ac_prog in gnm
35520do
35521  # Extract the first word of "$ac_prog", so it can be a program name with args.
35522set dummy $ac_prog; ac_word=$2
35523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35524$as_echo_n "checking for $ac_word... " >&6; }
35525if ${ac_cv_path_GNM+:} false; then :
35526  $as_echo_n "(cached) " >&6
35527else
35528  case $GNM in
35529  [\\/]* | ?:[\\/]*)
35530  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35531  ;;
35532  *)
35533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35534for as_dir in $PATH
35535do
35536  IFS=$as_save_IFS
35537  test -z "$as_dir" && as_dir=.
35538    for ac_exec_ext in '' $ac_executable_extensions; do
35539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35540    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35542    break 2
35543  fi
35544done
35545  done
35546IFS=$as_save_IFS
35547
35548  ;;
35549esac
35550fi
35551GNM=$ac_cv_path_GNM
35552if test -n "$GNM"; then
35553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35554$as_echo "$GNM" >&6; }
35555else
35556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35557$as_echo "no" >&6; }
35558fi
35559
35560
35561  test -n "$GNM" && break
35562done
35563
35564  else
35565    # The variable is set, but is it from the command line or the environment?
35566
35567    # Try to remove the string !GNM! from our list.
35568    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35569    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35570      # If it failed, the variable was not from the command line. Ignore it,
35571      # but warn the user (except for BASH, which is always set by the calling BASH).
35572      if test "xGNM" != xBASH; then
35573        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35574$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35575      fi
35576      # Try to locate tool using the code snippet
35577      for ac_prog in gnm
35578do
35579  # Extract the first word of "$ac_prog", so it can be a program name with args.
35580set dummy $ac_prog; ac_word=$2
35581{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35582$as_echo_n "checking for $ac_word... " >&6; }
35583if ${ac_cv_path_GNM+:} false; then :
35584  $as_echo_n "(cached) " >&6
35585else
35586  case $GNM in
35587  [\\/]* | ?:[\\/]*)
35588  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35589  ;;
35590  *)
35591  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35592for as_dir in $PATH
35593do
35594  IFS=$as_save_IFS
35595  test -z "$as_dir" && as_dir=.
35596    for ac_exec_ext in '' $ac_executable_extensions; do
35597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35598    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35600    break 2
35601  fi
35602done
35603  done
35604IFS=$as_save_IFS
35605
35606  ;;
35607esac
35608fi
35609GNM=$ac_cv_path_GNM
35610if test -n "$GNM"; then
35611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35612$as_echo "$GNM" >&6; }
35613else
35614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35615$as_echo "no" >&6; }
35616fi
35617
35618
35619  test -n "$GNM" && break
35620done
35621
35622    else
35623      # If it succeeded, then it was overridden by the user. We will use it
35624      # for the tool.
35625
35626      # First remove it from the list of overridden variables, so we can test
35627      # for unknown variables in the end.
35628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35629
35630      # Check if the provided tool contains a complete path.
35631      tool_specified="$GNM"
35632      tool_basename="${tool_specified##*/}"
35633      if test "x$tool_basename" = "x$tool_specified"; then
35634        # A command without a complete path is provided, search $PATH.
35635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35636$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35637        # Extract the first word of "$tool_basename", so it can be a program name with args.
35638set dummy $tool_basename; ac_word=$2
35639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35640$as_echo_n "checking for $ac_word... " >&6; }
35641if ${ac_cv_path_GNM+:} false; then :
35642  $as_echo_n "(cached) " >&6
35643else
35644  case $GNM in
35645  [\\/]* | ?:[\\/]*)
35646  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35647  ;;
35648  *)
35649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35650for as_dir in $PATH
35651do
35652  IFS=$as_save_IFS
35653  test -z "$as_dir" && as_dir=.
35654    for ac_exec_ext in '' $ac_executable_extensions; do
35655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35656    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35658    break 2
35659  fi
35660done
35661  done
35662IFS=$as_save_IFS
35663
35664  ;;
35665esac
35666fi
35667GNM=$ac_cv_path_GNM
35668if test -n "$GNM"; then
35669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35670$as_echo "$GNM" >&6; }
35671else
35672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35673$as_echo "no" >&6; }
35674fi
35675
35676
35677        if test "x$GNM" = x; then
35678          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35679        fi
35680      else
35681        # Otherwise we believe it is a complete path. Use it as it is.
35682        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35683$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35684        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35685$as_echo_n "checking for GNM... " >&6; }
35686        if test ! -x "$tool_specified"; then
35687          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35688$as_echo "not found" >&6; }
35689          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35690        fi
35691        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35692$as_echo "$tool_specified" >&6; }
35693      fi
35694    fi
35695  fi
35696
35697
35698
35699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35700
35701  # First separate the path from the arguments. This will split at the first
35702  # space.
35703  complete="$GNM"
35704  path="${complete%% *}"
35705  tmp="$complete EOL"
35706  arguments="${tmp#* }"
35707
35708  # Input might be given as Windows format, start by converting to
35709  # unix format.
35710  new_path=`$CYGPATH -u "$path"`
35711
35712  # Now try to locate executable using which
35713  new_path=`$WHICH "$new_path" 2> /dev/null`
35714  # bat and cmd files are not always considered executable in cygwin causing which
35715  # to not find them
35716  if test "x$new_path" = x \
35717      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35718      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35719    new_path=`$CYGPATH -u "$path"`
35720  fi
35721  if test "x$new_path" = x; then
35722    # Oops. Which didn't find the executable.
35723    # The splitting of arguments from the executable at a space might have been incorrect,
35724    # since paths with space are more likely in Windows. Give it another try with the whole
35725    # argument.
35726    path="$complete"
35727    arguments="EOL"
35728    new_path=`$CYGPATH -u "$path"`
35729    new_path=`$WHICH "$new_path" 2> /dev/null`
35730    # bat and cmd files are not always considered executable in cygwin causing which
35731    # to not find them
35732    if test "x$new_path" = x \
35733        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35734        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35735      new_path=`$CYGPATH -u "$path"`
35736    fi
35737    if test "x$new_path" = x; then
35738      # It's still not found. Now this is an unrecoverable error.
35739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35740$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35741      has_space=`$ECHO "$complete" | $GREP " "`
35742      if test "x$has_space" != x; then
35743        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35744$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35745      fi
35746      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35747    fi
35748  fi
35749
35750  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35751  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35752  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35753  # "foo.exe" is OK but "foo" is an error.
35754  #
35755  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35756  # It is also a way to make sure we got the proper file name for the real test later on.
35757  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35758  if test "x$test_shortpath" = x; then
35759    # Short path failed, file does not exist as specified.
35760    # Try adding .exe or .cmd
35761    if test -f "${new_path}.exe"; then
35762      input_to_shortpath="${new_path}.exe"
35763    elif test -f "${new_path}.cmd"; then
35764      input_to_shortpath="${new_path}.cmd"
35765    else
35766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35767$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35768      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35769$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35770      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35771    fi
35772  else
35773    input_to_shortpath="$new_path"
35774  fi
35775
35776  # Call helper function which possibly converts this using DOS-style short mode.
35777  # If so, the updated path is stored in $new_path.
35778  new_path="$input_to_shortpath"
35779
35780  input_path="$input_to_shortpath"
35781  # Check if we need to convert this using DOS-style short mode. If the path
35782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35783  # take no chances and rewrite it.
35784  # Note: m4 eats our [], so we need to use [ and ] instead.
35785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35786  if test "x$has_forbidden_chars" != x; then
35787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35791      # Going to short mode and back again did indeed matter. Since short mode is
35792      # case insensitive, let's make it lowercase to improve readability.
35793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35794      # Now convert it back to Unix-stile (cygpath)
35795      input_path=`$CYGPATH -u "$shortmode_path"`
35796      new_path="$input_path"
35797    fi
35798  fi
35799
35800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35801  if test "x$test_cygdrive_prefix" = x; then
35802    # As a simple fix, exclude /usr/bin since it's not a real path.
35803    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35805      # a path prefixed by /cygdrive for fixpath to work.
35806      new_path="$CYGWIN_ROOT_PATH$input_path"
35807    fi
35808  fi
35809
35810  # remove trailing .exe if any
35811  new_path="${new_path/%.exe/}"
35812
35813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35814
35815  # First separate the path from the arguments. This will split at the first
35816  # space.
35817  complete="$GNM"
35818  path="${complete%% *}"
35819  tmp="$complete EOL"
35820  arguments="${tmp#* }"
35821
35822  # Input might be given as Windows format, start by converting to
35823  # unix format.
35824  new_path="$path"
35825
35826  windows_path="$new_path"
35827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35828    unix_path=`$CYGPATH -u "$windows_path"`
35829    new_path="$unix_path"
35830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35832    new_path="$unix_path"
35833  fi
35834
35835
35836  # Now try to locate executable using which
35837  new_path=`$WHICH "$new_path" 2> /dev/null`
35838
35839  if test "x$new_path" = x; then
35840    # Oops. Which didn't find the executable.
35841    # The splitting of arguments from the executable at a space might have been incorrect,
35842    # since paths with space are more likely in Windows. Give it another try with the whole
35843    # argument.
35844    path="$complete"
35845    arguments="EOL"
35846    new_path="$path"
35847
35848  windows_path="$new_path"
35849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35850    unix_path=`$CYGPATH -u "$windows_path"`
35851    new_path="$unix_path"
35852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35854    new_path="$unix_path"
35855  fi
35856
35857
35858    new_path=`$WHICH "$new_path" 2> /dev/null`
35859
35860    if test "x$new_path" = x; then
35861      # It's still not found. Now this is an unrecoverable error.
35862      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35863$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35864      has_space=`$ECHO "$complete" | $GREP " "`
35865      if test "x$has_space" != x; then
35866        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35867$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35868      fi
35869      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35870    fi
35871  fi
35872
35873  # Now new_path has a complete unix path to the binary
35874  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35875    # Keep paths in /bin as-is, but remove trailing .exe if any
35876    new_path="${new_path/%.exe/}"
35877    # Do not save /bin paths to all_fixpath_prefixes!
35878  else
35879    # Not in mixed or Windows style, start by that.
35880    new_path=`cmd //c echo $new_path`
35881
35882  input_path="$new_path"
35883  # Check if we need to convert this using DOS-style short mode. If the path
35884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35885  # take no chances and rewrite it.
35886  # Note: m4 eats our [], so we need to use [ and ] instead.
35887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35888  if test "x$has_forbidden_chars" != x; then
35889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35890    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35891  fi
35892
35893    # Output is in $new_path
35894
35895  windows_path="$new_path"
35896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35897    unix_path=`$CYGPATH -u "$windows_path"`
35898    new_path="$unix_path"
35899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35901    new_path="$unix_path"
35902  fi
35903
35904    # remove trailing .exe if any
35905    new_path="${new_path/%.exe/}"
35906
35907    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35908    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35909  fi
35910
35911  else
35912    # We're on a posix platform. Hooray! :)
35913    # First separate the path from the arguments. This will split at the first
35914    # space.
35915    complete="$GNM"
35916    path="${complete%% *}"
35917    tmp="$complete EOL"
35918    arguments="${tmp#* }"
35919
35920    # Cannot rely on the command "which" here since it doesn't always work.
35921    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35922    if test -z "$is_absolute_path"; then
35923      # Path to executable is not absolute. Find it.
35924      IFS_save="$IFS"
35925      IFS=:
35926      for p in $PATH; do
35927        if test -f "$p/$path" && test -x "$p/$path"; then
35928          new_path="$p/$path"
35929          break
35930        fi
35931      done
35932      IFS="$IFS_save"
35933    else
35934      # This is an absolute path, we can use it without further modifications.
35935      new_path="$path"
35936    fi
35937
35938    if test "x$new_path" = x; then
35939      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35940$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35941      has_space=`$ECHO "$complete" | $GREP " "`
35942      if test "x$has_space" != x; then
35943        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35944$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35945      fi
35946      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35947    fi
35948  fi
35949
35950  # Now join together the path and the arguments once again
35951  if test "x$arguments" != xEOL; then
35952    new_complete="$new_path ${arguments% *}"
35953  else
35954    new_complete="$new_path"
35955  fi
35956
35957  if test "x$complete" != "x$new_complete"; then
35958    GNM="$new_complete"
35959    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35960$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35961  fi
35962
35963
35964
35965
35966  # Publish this variable in the help.
35967
35968
35969  if test "x$MCS" = x; then
35970    # The variable is not set by user, try to locate tool using the code snippet
35971    for ac_prog in mcs
35972do
35973  # Extract the first word of "$ac_prog", so it can be a program name with args.
35974set dummy $ac_prog; ac_word=$2
35975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35976$as_echo_n "checking for $ac_word... " >&6; }
35977if ${ac_cv_path_MCS+:} false; then :
35978  $as_echo_n "(cached) " >&6
35979else
35980  case $MCS in
35981  [\\/]* | ?:[\\/]*)
35982  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35983  ;;
35984  *)
35985  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35986for as_dir in $PATH
35987do
35988  IFS=$as_save_IFS
35989  test -z "$as_dir" && as_dir=.
35990    for ac_exec_ext in '' $ac_executable_extensions; do
35991  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35992    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35993    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35994    break 2
35995  fi
35996done
35997  done
35998IFS=$as_save_IFS
35999
36000  ;;
36001esac
36002fi
36003MCS=$ac_cv_path_MCS
36004if test -n "$MCS"; then
36005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36006$as_echo "$MCS" >&6; }
36007else
36008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36009$as_echo "no" >&6; }
36010fi
36011
36012
36013  test -n "$MCS" && break
36014done
36015
36016  else
36017    # The variable is set, but is it from the command line or the environment?
36018
36019    # Try to remove the string !MCS! from our list.
36020    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36021    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36022      # If it failed, the variable was not from the command line. Ignore it,
36023      # but warn the user (except for BASH, which is always set by the calling BASH).
36024      if test "xMCS" != xBASH; then
36025        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36026$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36027      fi
36028      # Try to locate tool using the code snippet
36029      for ac_prog in mcs
36030do
36031  # Extract the first word of "$ac_prog", so it can be a program name with args.
36032set dummy $ac_prog; ac_word=$2
36033{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36034$as_echo_n "checking for $ac_word... " >&6; }
36035if ${ac_cv_path_MCS+:} false; then :
36036  $as_echo_n "(cached) " >&6
36037else
36038  case $MCS in
36039  [\\/]* | ?:[\\/]*)
36040  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36041  ;;
36042  *)
36043  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36044for as_dir in $PATH
36045do
36046  IFS=$as_save_IFS
36047  test -z "$as_dir" && as_dir=.
36048    for ac_exec_ext in '' $ac_executable_extensions; do
36049  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36050    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36051    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36052    break 2
36053  fi
36054done
36055  done
36056IFS=$as_save_IFS
36057
36058  ;;
36059esac
36060fi
36061MCS=$ac_cv_path_MCS
36062if test -n "$MCS"; then
36063  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36064$as_echo "$MCS" >&6; }
36065else
36066  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36067$as_echo "no" >&6; }
36068fi
36069
36070
36071  test -n "$MCS" && break
36072done
36073
36074    else
36075      # If it succeeded, then it was overridden by the user. We will use it
36076      # for the tool.
36077
36078      # First remove it from the list of overridden variables, so we can test
36079      # for unknown variables in the end.
36080      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36081
36082      # Check if the provided tool contains a complete path.
36083      tool_specified="$MCS"
36084      tool_basename="${tool_specified##*/}"
36085      if test "x$tool_basename" = "x$tool_specified"; then
36086        # A command without a complete path is provided, search $PATH.
36087        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36088$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36089        # Extract the first word of "$tool_basename", so it can be a program name with args.
36090set dummy $tool_basename; ac_word=$2
36091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36092$as_echo_n "checking for $ac_word... " >&6; }
36093if ${ac_cv_path_MCS+:} false; then :
36094  $as_echo_n "(cached) " >&6
36095else
36096  case $MCS in
36097  [\\/]* | ?:[\\/]*)
36098  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36099  ;;
36100  *)
36101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36102for as_dir in $PATH
36103do
36104  IFS=$as_save_IFS
36105  test -z "$as_dir" && as_dir=.
36106    for ac_exec_ext in '' $ac_executable_extensions; do
36107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36108    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36110    break 2
36111  fi
36112done
36113  done
36114IFS=$as_save_IFS
36115
36116  ;;
36117esac
36118fi
36119MCS=$ac_cv_path_MCS
36120if test -n "$MCS"; then
36121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36122$as_echo "$MCS" >&6; }
36123else
36124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36125$as_echo "no" >&6; }
36126fi
36127
36128
36129        if test "x$MCS" = x; then
36130          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36131        fi
36132      else
36133        # Otherwise we believe it is a complete path. Use it as it is.
36134        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36135$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36137$as_echo_n "checking for MCS... " >&6; }
36138        if test ! -x "$tool_specified"; then
36139          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36140$as_echo "not found" >&6; }
36141          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36142        fi
36143        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36144$as_echo "$tool_specified" >&6; }
36145      fi
36146    fi
36147  fi
36148
36149
36150
36151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36152
36153  # First separate the path from the arguments. This will split at the first
36154  # space.
36155  complete="$MCS"
36156  path="${complete%% *}"
36157  tmp="$complete EOL"
36158  arguments="${tmp#* }"
36159
36160  # Input might be given as Windows format, start by converting to
36161  # unix format.
36162  new_path=`$CYGPATH -u "$path"`
36163
36164  # Now try to locate executable using which
36165  new_path=`$WHICH "$new_path" 2> /dev/null`
36166  # bat and cmd files are not always considered executable in cygwin causing which
36167  # to not find them
36168  if test "x$new_path" = x \
36169      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36170      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36171    new_path=`$CYGPATH -u "$path"`
36172  fi
36173  if test "x$new_path" = x; then
36174    # Oops. Which didn't find the executable.
36175    # The splitting of arguments from the executable at a space might have been incorrect,
36176    # since paths with space are more likely in Windows. Give it another try with the whole
36177    # argument.
36178    path="$complete"
36179    arguments="EOL"
36180    new_path=`$CYGPATH -u "$path"`
36181    new_path=`$WHICH "$new_path" 2> /dev/null`
36182    # bat and cmd files are not always considered executable in cygwin causing which
36183    # to not find them
36184    if test "x$new_path" = x \
36185        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36186        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36187      new_path=`$CYGPATH -u "$path"`
36188    fi
36189    if test "x$new_path" = x; then
36190      # It's still not found. Now this is an unrecoverable error.
36191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36192$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36193      has_space=`$ECHO "$complete" | $GREP " "`
36194      if test "x$has_space" != x; then
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36196$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36197      fi
36198      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36199    fi
36200  fi
36201
36202  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36203  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36204  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36205  # "foo.exe" is OK but "foo" is an error.
36206  #
36207  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36208  # It is also a way to make sure we got the proper file name for the real test later on.
36209  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36210  if test "x$test_shortpath" = x; then
36211    # Short path failed, file does not exist as specified.
36212    # Try adding .exe or .cmd
36213    if test -f "${new_path}.exe"; then
36214      input_to_shortpath="${new_path}.exe"
36215    elif test -f "${new_path}.cmd"; then
36216      input_to_shortpath="${new_path}.cmd"
36217    else
36218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36219$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36220      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36221$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36222      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36223    fi
36224  else
36225    input_to_shortpath="$new_path"
36226  fi
36227
36228  # Call helper function which possibly converts this using DOS-style short mode.
36229  # If so, the updated path is stored in $new_path.
36230  new_path="$input_to_shortpath"
36231
36232  input_path="$input_to_shortpath"
36233  # Check if we need to convert this using DOS-style short mode. If the path
36234  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36235  # take no chances and rewrite it.
36236  # Note: m4 eats our [], so we need to use [ and ] instead.
36237  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36238  if test "x$has_forbidden_chars" != x; then
36239    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36240    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36241    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36242    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36243      # Going to short mode and back again did indeed matter. Since short mode is
36244      # case insensitive, let's make it lowercase to improve readability.
36245      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36246      # Now convert it back to Unix-stile (cygpath)
36247      input_path=`$CYGPATH -u "$shortmode_path"`
36248      new_path="$input_path"
36249    fi
36250  fi
36251
36252  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36253  if test "x$test_cygdrive_prefix" = x; then
36254    # As a simple fix, exclude /usr/bin since it's not a real path.
36255    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36256      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36257      # a path prefixed by /cygdrive for fixpath to work.
36258      new_path="$CYGWIN_ROOT_PATH$input_path"
36259    fi
36260  fi
36261
36262  # remove trailing .exe if any
36263  new_path="${new_path/%.exe/}"
36264
36265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36266
36267  # First separate the path from the arguments. This will split at the first
36268  # space.
36269  complete="$MCS"
36270  path="${complete%% *}"
36271  tmp="$complete EOL"
36272  arguments="${tmp#* }"
36273
36274  # Input might be given as Windows format, start by converting to
36275  # unix format.
36276  new_path="$path"
36277
36278  windows_path="$new_path"
36279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36280    unix_path=`$CYGPATH -u "$windows_path"`
36281    new_path="$unix_path"
36282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36284    new_path="$unix_path"
36285  fi
36286
36287
36288  # Now try to locate executable using which
36289  new_path=`$WHICH "$new_path" 2> /dev/null`
36290
36291  if test "x$new_path" = x; then
36292    # Oops. Which didn't find the executable.
36293    # The splitting of arguments from the executable at a space might have been incorrect,
36294    # since paths with space are more likely in Windows. Give it another try with the whole
36295    # argument.
36296    path="$complete"
36297    arguments="EOL"
36298    new_path="$path"
36299
36300  windows_path="$new_path"
36301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36302    unix_path=`$CYGPATH -u "$windows_path"`
36303    new_path="$unix_path"
36304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36306    new_path="$unix_path"
36307  fi
36308
36309
36310    new_path=`$WHICH "$new_path" 2> /dev/null`
36311
36312    if test "x$new_path" = x; then
36313      # It's still not found. Now this is an unrecoverable error.
36314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36315$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36316      has_space=`$ECHO "$complete" | $GREP " "`
36317      if test "x$has_space" != x; then
36318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36320      fi
36321      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36322    fi
36323  fi
36324
36325  # Now new_path has a complete unix path to the binary
36326  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36327    # Keep paths in /bin as-is, but remove trailing .exe if any
36328    new_path="${new_path/%.exe/}"
36329    # Do not save /bin paths to all_fixpath_prefixes!
36330  else
36331    # Not in mixed or Windows style, start by that.
36332    new_path=`cmd //c echo $new_path`
36333
36334  input_path="$new_path"
36335  # Check if we need to convert this using DOS-style short mode. If the path
36336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36337  # take no chances and rewrite it.
36338  # Note: m4 eats our [], so we need to use [ and ] instead.
36339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36340  if test "x$has_forbidden_chars" != x; then
36341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36343  fi
36344
36345    # Output is in $new_path
36346
36347  windows_path="$new_path"
36348  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36349    unix_path=`$CYGPATH -u "$windows_path"`
36350    new_path="$unix_path"
36351  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36352    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36353    new_path="$unix_path"
36354  fi
36355
36356    # remove trailing .exe if any
36357    new_path="${new_path/%.exe/}"
36358
36359    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36360    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36361  fi
36362
36363  else
36364    # We're on a posix platform. Hooray! :)
36365    # First separate the path from the arguments. This will split at the first
36366    # space.
36367    complete="$MCS"
36368    path="${complete%% *}"
36369    tmp="$complete EOL"
36370    arguments="${tmp#* }"
36371
36372    # Cannot rely on the command "which" here since it doesn't always work.
36373    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36374    if test -z "$is_absolute_path"; then
36375      # Path to executable is not absolute. Find it.
36376      IFS_save="$IFS"
36377      IFS=:
36378      for p in $PATH; do
36379        if test -f "$p/$path" && test -x "$p/$path"; then
36380          new_path="$p/$path"
36381          break
36382        fi
36383      done
36384      IFS="$IFS_save"
36385    else
36386      # This is an absolute path, we can use it without further modifications.
36387      new_path="$path"
36388    fi
36389
36390    if test "x$new_path" = x; then
36391      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36392$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36393      has_space=`$ECHO "$complete" | $GREP " "`
36394      if test "x$has_space" != x; then
36395        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36396$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36397      fi
36398      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36399    fi
36400  fi
36401
36402  # Now join together the path and the arguments once again
36403  if test "x$arguments" != xEOL; then
36404    new_complete="$new_path ${arguments% *}"
36405  else
36406    new_complete="$new_path"
36407  fi
36408
36409  if test "x$complete" != "x$new_complete"; then
36410    MCS="$new_complete"
36411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36412$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36413  fi
36414
36415  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36416    # FIXME: we should unify this with the solaris case above.
36417
36418
36419  # Publish this variable in the help.
36420
36421
36422  if test "x$STRIP" = x; then
36423    # The variable is not set by user, try to locate tool using the code snippet
36424    if test -n "$ac_tool_prefix"; then
36425  for ac_prog in strip
36426  do
36427    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36428set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36430$as_echo_n "checking for $ac_word... " >&6; }
36431if ${ac_cv_prog_STRIP+:} false; then :
36432  $as_echo_n "(cached) " >&6
36433else
36434  if test -n "$STRIP"; then
36435  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36436else
36437as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36438for as_dir in $PATH
36439do
36440  IFS=$as_save_IFS
36441  test -z "$as_dir" && as_dir=.
36442    for ac_exec_ext in '' $ac_executable_extensions; do
36443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36444    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36446    break 2
36447  fi
36448done
36449  done
36450IFS=$as_save_IFS
36451
36452fi
36453fi
36454STRIP=$ac_cv_prog_STRIP
36455if test -n "$STRIP"; then
36456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36457$as_echo "$STRIP" >&6; }
36458else
36459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36460$as_echo "no" >&6; }
36461fi
36462
36463
36464    test -n "$STRIP" && break
36465  done
36466fi
36467if test -z "$STRIP"; then
36468  ac_ct_STRIP=$STRIP
36469  for ac_prog in strip
36470do
36471  # Extract the first word of "$ac_prog", so it can be a program name with args.
36472set dummy $ac_prog; ac_word=$2
36473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36474$as_echo_n "checking for $ac_word... " >&6; }
36475if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36476  $as_echo_n "(cached) " >&6
36477else
36478  if test -n "$ac_ct_STRIP"; then
36479  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36480else
36481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36482for as_dir in $PATH
36483do
36484  IFS=$as_save_IFS
36485  test -z "$as_dir" && as_dir=.
36486    for ac_exec_ext in '' $ac_executable_extensions; do
36487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36488    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36490    break 2
36491  fi
36492done
36493  done
36494IFS=$as_save_IFS
36495
36496fi
36497fi
36498ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36499if test -n "$ac_ct_STRIP"; then
36500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36501$as_echo "$ac_ct_STRIP" >&6; }
36502else
36503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36504$as_echo "no" >&6; }
36505fi
36506
36507
36508  test -n "$ac_ct_STRIP" && break
36509done
36510
36511  if test "x$ac_ct_STRIP" = x; then
36512    STRIP=""
36513  else
36514    case $cross_compiling:$ac_tool_warned in
36515yes:)
36516{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36517$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36518ac_tool_warned=yes ;;
36519esac
36520    STRIP=$ac_ct_STRIP
36521  fi
36522fi
36523
36524  else
36525    # The variable is set, but is it from the command line or the environment?
36526
36527    # Try to remove the string !STRIP! from our list.
36528    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36529    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36530      # If it failed, the variable was not from the command line. Ignore it,
36531      # but warn the user (except for BASH, which is always set by the calling BASH).
36532      if test "xSTRIP" != xBASH; then
36533        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36534$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36535      fi
36536      # Try to locate tool using the code snippet
36537      if test -n "$ac_tool_prefix"; then
36538  for ac_prog in strip
36539  do
36540    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36541set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36543$as_echo_n "checking for $ac_word... " >&6; }
36544if ${ac_cv_prog_STRIP+:} false; then :
36545  $as_echo_n "(cached) " >&6
36546else
36547  if test -n "$STRIP"; then
36548  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36549else
36550as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36551for as_dir in $PATH
36552do
36553  IFS=$as_save_IFS
36554  test -z "$as_dir" && as_dir=.
36555    for ac_exec_ext in '' $ac_executable_extensions; do
36556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36557    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36559    break 2
36560  fi
36561done
36562  done
36563IFS=$as_save_IFS
36564
36565fi
36566fi
36567STRIP=$ac_cv_prog_STRIP
36568if test -n "$STRIP"; then
36569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36570$as_echo "$STRIP" >&6; }
36571else
36572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36573$as_echo "no" >&6; }
36574fi
36575
36576
36577    test -n "$STRIP" && break
36578  done
36579fi
36580if test -z "$STRIP"; then
36581  ac_ct_STRIP=$STRIP
36582  for ac_prog in strip
36583do
36584  # Extract the first word of "$ac_prog", so it can be a program name with args.
36585set dummy $ac_prog; ac_word=$2
36586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36587$as_echo_n "checking for $ac_word... " >&6; }
36588if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36589  $as_echo_n "(cached) " >&6
36590else
36591  if test -n "$ac_ct_STRIP"; then
36592  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36593else
36594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36595for as_dir in $PATH
36596do
36597  IFS=$as_save_IFS
36598  test -z "$as_dir" && as_dir=.
36599    for ac_exec_ext in '' $ac_executable_extensions; do
36600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36601    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36603    break 2
36604  fi
36605done
36606  done
36607IFS=$as_save_IFS
36608
36609fi
36610fi
36611ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36612if test -n "$ac_ct_STRIP"; then
36613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36614$as_echo "$ac_ct_STRIP" >&6; }
36615else
36616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36617$as_echo "no" >&6; }
36618fi
36619
36620
36621  test -n "$ac_ct_STRIP" && break
36622done
36623
36624  if test "x$ac_ct_STRIP" = x; then
36625    STRIP=""
36626  else
36627    case $cross_compiling:$ac_tool_warned in
36628yes:)
36629{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36630$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36631ac_tool_warned=yes ;;
36632esac
36633    STRIP=$ac_ct_STRIP
36634  fi
36635fi
36636
36637    else
36638      # If it succeeded, then it was overridden by the user. We will use it
36639      # for the tool.
36640
36641      # First remove it from the list of overridden variables, so we can test
36642      # for unknown variables in the end.
36643      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36644
36645      # Check if the provided tool contains a complete path.
36646      tool_specified="$STRIP"
36647      tool_basename="${tool_specified##*/}"
36648      if test "x$tool_basename" = "x$tool_specified"; then
36649        # A command without a complete path is provided, search $PATH.
36650        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36651$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36652        # Extract the first word of "$tool_basename", so it can be a program name with args.
36653set dummy $tool_basename; ac_word=$2
36654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36655$as_echo_n "checking for $ac_word... " >&6; }
36656if ${ac_cv_path_STRIP+:} false; then :
36657  $as_echo_n "(cached) " >&6
36658else
36659  case $STRIP in
36660  [\\/]* | ?:[\\/]*)
36661  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36662  ;;
36663  *)
36664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36665for as_dir in $PATH
36666do
36667  IFS=$as_save_IFS
36668  test -z "$as_dir" && as_dir=.
36669    for ac_exec_ext in '' $ac_executable_extensions; do
36670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36671    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36673    break 2
36674  fi
36675done
36676  done
36677IFS=$as_save_IFS
36678
36679  ;;
36680esac
36681fi
36682STRIP=$ac_cv_path_STRIP
36683if test -n "$STRIP"; then
36684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36685$as_echo "$STRIP" >&6; }
36686else
36687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36688$as_echo "no" >&6; }
36689fi
36690
36691
36692        if test "x$STRIP" = x; then
36693          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36694        fi
36695      else
36696        # Otherwise we believe it is a complete path. Use it as it is.
36697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36698$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36699        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36700$as_echo_n "checking for STRIP... " >&6; }
36701        if test ! -x "$tool_specified"; then
36702          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36703$as_echo "not found" >&6; }
36704          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36705        fi
36706        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36707$as_echo "$tool_specified" >&6; }
36708      fi
36709    fi
36710  fi
36711
36712
36713
36714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36715
36716  # First separate the path from the arguments. This will split at the first
36717  # space.
36718  complete="$STRIP"
36719  path="${complete%% *}"
36720  tmp="$complete EOL"
36721  arguments="${tmp#* }"
36722
36723  # Input might be given as Windows format, start by converting to
36724  # unix format.
36725  new_path=`$CYGPATH -u "$path"`
36726
36727  # Now try to locate executable using which
36728  new_path=`$WHICH "$new_path" 2> /dev/null`
36729  # bat and cmd files are not always considered executable in cygwin causing which
36730  # to not find them
36731  if test "x$new_path" = x \
36732      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36733      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36734    new_path=`$CYGPATH -u "$path"`
36735  fi
36736  if test "x$new_path" = x; then
36737    # Oops. Which didn't find the executable.
36738    # The splitting of arguments from the executable at a space might have been incorrect,
36739    # since paths with space are more likely in Windows. Give it another try with the whole
36740    # argument.
36741    path="$complete"
36742    arguments="EOL"
36743    new_path=`$CYGPATH -u "$path"`
36744    new_path=`$WHICH "$new_path" 2> /dev/null`
36745    # bat and cmd files are not always considered executable in cygwin causing which
36746    # to not find them
36747    if test "x$new_path" = x \
36748        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36749        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36750      new_path=`$CYGPATH -u "$path"`
36751    fi
36752    if test "x$new_path" = x; then
36753      # It's still not found. Now this is an unrecoverable error.
36754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36755$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36756      has_space=`$ECHO "$complete" | $GREP " "`
36757      if test "x$has_space" != x; then
36758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36760      fi
36761      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36762    fi
36763  fi
36764
36765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36768  # "foo.exe" is OK but "foo" is an error.
36769  #
36770  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36771  # It is also a way to make sure we got the proper file name for the real test later on.
36772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36773  if test "x$test_shortpath" = x; then
36774    # Short path failed, file does not exist as specified.
36775    # Try adding .exe or .cmd
36776    if test -f "${new_path}.exe"; then
36777      input_to_shortpath="${new_path}.exe"
36778    elif test -f "${new_path}.cmd"; then
36779      input_to_shortpath="${new_path}.cmd"
36780    else
36781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36782$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36783      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36784$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36785      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36786    fi
36787  else
36788    input_to_shortpath="$new_path"
36789  fi
36790
36791  # Call helper function which possibly converts this using DOS-style short mode.
36792  # If so, the updated path is stored in $new_path.
36793  new_path="$input_to_shortpath"
36794
36795  input_path="$input_to_shortpath"
36796  # Check if we need to convert this using DOS-style short mode. If the path
36797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36798  # take no chances and rewrite it.
36799  # Note: m4 eats our [], so we need to use [ and ] instead.
36800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36801  if test "x$has_forbidden_chars" != x; then
36802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36806      # Going to short mode and back again did indeed matter. Since short mode is
36807      # case insensitive, let's make it lowercase to improve readability.
36808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36809      # Now convert it back to Unix-stile (cygpath)
36810      input_path=`$CYGPATH -u "$shortmode_path"`
36811      new_path="$input_path"
36812    fi
36813  fi
36814
36815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36816  if test "x$test_cygdrive_prefix" = x; then
36817    # As a simple fix, exclude /usr/bin since it's not a real path.
36818    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36820      # a path prefixed by /cygdrive for fixpath to work.
36821      new_path="$CYGWIN_ROOT_PATH$input_path"
36822    fi
36823  fi
36824
36825  # remove trailing .exe if any
36826  new_path="${new_path/%.exe/}"
36827
36828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36829
36830  # First separate the path from the arguments. This will split at the first
36831  # space.
36832  complete="$STRIP"
36833  path="${complete%% *}"
36834  tmp="$complete EOL"
36835  arguments="${tmp#* }"
36836
36837  # Input might be given as Windows format, start by converting to
36838  # unix format.
36839  new_path="$path"
36840
36841  windows_path="$new_path"
36842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36843    unix_path=`$CYGPATH -u "$windows_path"`
36844    new_path="$unix_path"
36845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36847    new_path="$unix_path"
36848  fi
36849
36850
36851  # Now try to locate executable using which
36852  new_path=`$WHICH "$new_path" 2> /dev/null`
36853
36854  if test "x$new_path" = x; then
36855    # Oops. Which didn't find the executable.
36856    # The splitting of arguments from the executable at a space might have been incorrect,
36857    # since paths with space are more likely in Windows. Give it another try with the whole
36858    # argument.
36859    path="$complete"
36860    arguments="EOL"
36861    new_path="$path"
36862
36863  windows_path="$new_path"
36864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36865    unix_path=`$CYGPATH -u "$windows_path"`
36866    new_path="$unix_path"
36867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36869    new_path="$unix_path"
36870  fi
36871
36872
36873    new_path=`$WHICH "$new_path" 2> /dev/null`
36874
36875    if test "x$new_path" = x; then
36876      # It's still not found. Now this is an unrecoverable error.
36877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36878$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36879      has_space=`$ECHO "$complete" | $GREP " "`
36880      if test "x$has_space" != x; then
36881        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36882$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36883      fi
36884      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36885    fi
36886  fi
36887
36888  # Now new_path has a complete unix path to the binary
36889  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36890    # Keep paths in /bin as-is, but remove trailing .exe if any
36891    new_path="${new_path/%.exe/}"
36892    # Do not save /bin paths to all_fixpath_prefixes!
36893  else
36894    # Not in mixed or Windows style, start by that.
36895    new_path=`cmd //c echo $new_path`
36896
36897  input_path="$new_path"
36898  # Check if we need to convert this using DOS-style short mode. If the path
36899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36900  # take no chances and rewrite it.
36901  # Note: m4 eats our [], so we need to use [ and ] instead.
36902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36903  if test "x$has_forbidden_chars" != x; then
36904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36906  fi
36907
36908    # Output is in $new_path
36909
36910  windows_path="$new_path"
36911  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36912    unix_path=`$CYGPATH -u "$windows_path"`
36913    new_path="$unix_path"
36914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36915    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36916    new_path="$unix_path"
36917  fi
36918
36919    # remove trailing .exe if any
36920    new_path="${new_path/%.exe/}"
36921
36922    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36923    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36924  fi
36925
36926  else
36927    # We're on a posix platform. Hooray! :)
36928    # First separate the path from the arguments. This will split at the first
36929    # space.
36930    complete="$STRIP"
36931    path="${complete%% *}"
36932    tmp="$complete EOL"
36933    arguments="${tmp#* }"
36934
36935    # Cannot rely on the command "which" here since it doesn't always work.
36936    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36937    if test -z "$is_absolute_path"; then
36938      # Path to executable is not absolute. Find it.
36939      IFS_save="$IFS"
36940      IFS=:
36941      for p in $PATH; do
36942        if test -f "$p/$path" && test -x "$p/$path"; then
36943          new_path="$p/$path"
36944          break
36945        fi
36946      done
36947      IFS="$IFS_save"
36948    else
36949      # This is an absolute path, we can use it without further modifications.
36950      new_path="$path"
36951    fi
36952
36953    if test "x$new_path" = x; then
36954      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36955$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36956      has_space=`$ECHO "$complete" | $GREP " "`
36957      if test "x$has_space" != x; then
36958        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36959$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36960      fi
36961      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36962    fi
36963  fi
36964
36965  # Now join together the path and the arguments once again
36966  if test "x$arguments" != xEOL; then
36967    new_complete="$new_path ${arguments% *}"
36968  else
36969    new_complete="$new_path"
36970  fi
36971
36972  if test "x$complete" != "x$new_complete"; then
36973    STRIP="$new_complete"
36974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36975$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36976  fi
36977
36978
36979
36980  # Publish this variable in the help.
36981
36982
36983  if test "x$NM" = x; then
36984    # The variable is not set by user, try to locate tool using the code snippet
36985    if test -n "$ac_tool_prefix"; then
36986  for ac_prog in nm
36987  do
36988    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36989set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36991$as_echo_n "checking for $ac_word... " >&6; }
36992if ${ac_cv_prog_NM+:} false; then :
36993  $as_echo_n "(cached) " >&6
36994else
36995  if test -n "$NM"; then
36996  ac_cv_prog_NM="$NM" # Let the user override the test.
36997else
36998as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36999for as_dir in $PATH
37000do
37001  IFS=$as_save_IFS
37002  test -z "$as_dir" && as_dir=.
37003    for ac_exec_ext in '' $ac_executable_extensions; do
37004  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37005    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37006    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37007    break 2
37008  fi
37009done
37010  done
37011IFS=$as_save_IFS
37012
37013fi
37014fi
37015NM=$ac_cv_prog_NM
37016if test -n "$NM"; then
37017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37018$as_echo "$NM" >&6; }
37019else
37020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37021$as_echo "no" >&6; }
37022fi
37023
37024
37025    test -n "$NM" && break
37026  done
37027fi
37028if test -z "$NM"; then
37029  ac_ct_NM=$NM
37030  for ac_prog in nm
37031do
37032  # Extract the first word of "$ac_prog", so it can be a program name with args.
37033set dummy $ac_prog; ac_word=$2
37034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37035$as_echo_n "checking for $ac_word... " >&6; }
37036if ${ac_cv_prog_ac_ct_NM+:} false; then :
37037  $as_echo_n "(cached) " >&6
37038else
37039  if test -n "$ac_ct_NM"; then
37040  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37041else
37042as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37043for as_dir in $PATH
37044do
37045  IFS=$as_save_IFS
37046  test -z "$as_dir" && as_dir=.
37047    for ac_exec_ext in '' $ac_executable_extensions; do
37048  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37049    ac_cv_prog_ac_ct_NM="$ac_prog"
37050    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37051    break 2
37052  fi
37053done
37054  done
37055IFS=$as_save_IFS
37056
37057fi
37058fi
37059ac_ct_NM=$ac_cv_prog_ac_ct_NM
37060if test -n "$ac_ct_NM"; then
37061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37062$as_echo "$ac_ct_NM" >&6; }
37063else
37064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37065$as_echo "no" >&6; }
37066fi
37067
37068
37069  test -n "$ac_ct_NM" && break
37070done
37071
37072  if test "x$ac_ct_NM" = x; then
37073    NM=""
37074  else
37075    case $cross_compiling:$ac_tool_warned in
37076yes:)
37077{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37078$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37079ac_tool_warned=yes ;;
37080esac
37081    NM=$ac_ct_NM
37082  fi
37083fi
37084
37085  else
37086    # The variable is set, but is it from the command line or the environment?
37087
37088    # Try to remove the string !NM! from our list.
37089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37091      # If it failed, the variable was not from the command line. Ignore it,
37092      # but warn the user (except for BASH, which is always set by the calling BASH).
37093      if test "xNM" != xBASH; then
37094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37095$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37096      fi
37097      # Try to locate tool using the code snippet
37098      if test -n "$ac_tool_prefix"; then
37099  for ac_prog in nm
37100  do
37101    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37102set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37104$as_echo_n "checking for $ac_word... " >&6; }
37105if ${ac_cv_prog_NM+:} false; then :
37106  $as_echo_n "(cached) " >&6
37107else
37108  if test -n "$NM"; then
37109  ac_cv_prog_NM="$NM" # Let the user override the test.
37110else
37111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37112for as_dir in $PATH
37113do
37114  IFS=$as_save_IFS
37115  test -z "$as_dir" && as_dir=.
37116    for ac_exec_ext in '' $ac_executable_extensions; do
37117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37118    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37120    break 2
37121  fi
37122done
37123  done
37124IFS=$as_save_IFS
37125
37126fi
37127fi
37128NM=$ac_cv_prog_NM
37129if test -n "$NM"; then
37130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37131$as_echo "$NM" >&6; }
37132else
37133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37134$as_echo "no" >&6; }
37135fi
37136
37137
37138    test -n "$NM" && break
37139  done
37140fi
37141if test -z "$NM"; then
37142  ac_ct_NM=$NM
37143  for ac_prog in nm
37144do
37145  # Extract the first word of "$ac_prog", so it can be a program name with args.
37146set dummy $ac_prog; ac_word=$2
37147{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37148$as_echo_n "checking for $ac_word... " >&6; }
37149if ${ac_cv_prog_ac_ct_NM+:} false; then :
37150  $as_echo_n "(cached) " >&6
37151else
37152  if test -n "$ac_ct_NM"; then
37153  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37154else
37155as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37156for as_dir in $PATH
37157do
37158  IFS=$as_save_IFS
37159  test -z "$as_dir" && as_dir=.
37160    for ac_exec_ext in '' $ac_executable_extensions; do
37161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37162    ac_cv_prog_ac_ct_NM="$ac_prog"
37163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37164    break 2
37165  fi
37166done
37167  done
37168IFS=$as_save_IFS
37169
37170fi
37171fi
37172ac_ct_NM=$ac_cv_prog_ac_ct_NM
37173if test -n "$ac_ct_NM"; then
37174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37175$as_echo "$ac_ct_NM" >&6; }
37176else
37177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37178$as_echo "no" >&6; }
37179fi
37180
37181
37182  test -n "$ac_ct_NM" && break
37183done
37184
37185  if test "x$ac_ct_NM" = x; then
37186    NM=""
37187  else
37188    case $cross_compiling:$ac_tool_warned in
37189yes:)
37190{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37191$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37192ac_tool_warned=yes ;;
37193esac
37194    NM=$ac_ct_NM
37195  fi
37196fi
37197
37198    else
37199      # If it succeeded, then it was overridden by the user. We will use it
37200      # for the tool.
37201
37202      # First remove it from the list of overridden variables, so we can test
37203      # for unknown variables in the end.
37204      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37205
37206      # Check if the provided tool contains a complete path.
37207      tool_specified="$NM"
37208      tool_basename="${tool_specified##*/}"
37209      if test "x$tool_basename" = "x$tool_specified"; then
37210        # A command without a complete path is provided, search $PATH.
37211        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37212$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37213        # Extract the first word of "$tool_basename", so it can be a program name with args.
37214set dummy $tool_basename; ac_word=$2
37215{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37216$as_echo_n "checking for $ac_word... " >&6; }
37217if ${ac_cv_path_NM+:} false; then :
37218  $as_echo_n "(cached) " >&6
37219else
37220  case $NM in
37221  [\\/]* | ?:[\\/]*)
37222  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37223  ;;
37224  *)
37225  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37226for as_dir in $PATH
37227do
37228  IFS=$as_save_IFS
37229  test -z "$as_dir" && as_dir=.
37230    for ac_exec_ext in '' $ac_executable_extensions; do
37231  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37232    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37233    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37234    break 2
37235  fi
37236done
37237  done
37238IFS=$as_save_IFS
37239
37240  ;;
37241esac
37242fi
37243NM=$ac_cv_path_NM
37244if test -n "$NM"; then
37245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37246$as_echo "$NM" >&6; }
37247else
37248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37249$as_echo "no" >&6; }
37250fi
37251
37252
37253        if test "x$NM" = x; then
37254          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37255        fi
37256      else
37257        # Otherwise we believe it is a complete path. Use it as it is.
37258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37259$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37261$as_echo_n "checking for NM... " >&6; }
37262        if test ! -x "$tool_specified"; then
37263          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37264$as_echo "not found" >&6; }
37265          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37266        fi
37267        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37268$as_echo "$tool_specified" >&6; }
37269      fi
37270    fi
37271  fi
37272
37273
37274
37275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37276
37277  # First separate the path from the arguments. This will split at the first
37278  # space.
37279  complete="$NM"
37280  path="${complete%% *}"
37281  tmp="$complete EOL"
37282  arguments="${tmp#* }"
37283
37284  # Input might be given as Windows format, start by converting to
37285  # unix format.
37286  new_path=`$CYGPATH -u "$path"`
37287
37288  # Now try to locate executable using which
37289  new_path=`$WHICH "$new_path" 2> /dev/null`
37290  # bat and cmd files are not always considered executable in cygwin causing which
37291  # to not find them
37292  if test "x$new_path" = x \
37293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37295    new_path=`$CYGPATH -u "$path"`
37296  fi
37297  if test "x$new_path" = x; then
37298    # Oops. Which didn't find the executable.
37299    # The splitting of arguments from the executable at a space might have been incorrect,
37300    # since paths with space are more likely in Windows. Give it another try with the whole
37301    # argument.
37302    path="$complete"
37303    arguments="EOL"
37304    new_path=`$CYGPATH -u "$path"`
37305    new_path=`$WHICH "$new_path" 2> /dev/null`
37306    # bat and cmd files are not always considered executable in cygwin causing which
37307    # to not find them
37308    if test "x$new_path" = x \
37309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37311      new_path=`$CYGPATH -u "$path"`
37312    fi
37313    if test "x$new_path" = x; then
37314      # It's still not found. Now this is an unrecoverable error.
37315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37316$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37317      has_space=`$ECHO "$complete" | $GREP " "`
37318      if test "x$has_space" != x; then
37319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37321      fi
37322      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37323    fi
37324  fi
37325
37326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37329  # "foo.exe" is OK but "foo" is an error.
37330  #
37331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37332  # It is also a way to make sure we got the proper file name for the real test later on.
37333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37334  if test "x$test_shortpath" = x; then
37335    # Short path failed, file does not exist as specified.
37336    # Try adding .exe or .cmd
37337    if test -f "${new_path}.exe"; then
37338      input_to_shortpath="${new_path}.exe"
37339    elif test -f "${new_path}.cmd"; then
37340      input_to_shortpath="${new_path}.cmd"
37341    else
37342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37343$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37346      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37347    fi
37348  else
37349    input_to_shortpath="$new_path"
37350  fi
37351
37352  # Call helper function which possibly converts this using DOS-style short mode.
37353  # If so, the updated path is stored in $new_path.
37354  new_path="$input_to_shortpath"
37355
37356  input_path="$input_to_shortpath"
37357  # Check if we need to convert this using DOS-style short mode. If the path
37358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37359  # take no chances and rewrite it.
37360  # Note: m4 eats our [], so we need to use [ and ] instead.
37361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37362  if test "x$has_forbidden_chars" != x; then
37363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37367      # Going to short mode and back again did indeed matter. Since short mode is
37368      # case insensitive, let's make it lowercase to improve readability.
37369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37370      # Now convert it back to Unix-stile (cygpath)
37371      input_path=`$CYGPATH -u "$shortmode_path"`
37372      new_path="$input_path"
37373    fi
37374  fi
37375
37376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37377  if test "x$test_cygdrive_prefix" = x; then
37378    # As a simple fix, exclude /usr/bin since it's not a real path.
37379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37381      # a path prefixed by /cygdrive for fixpath to work.
37382      new_path="$CYGWIN_ROOT_PATH$input_path"
37383    fi
37384  fi
37385
37386  # remove trailing .exe if any
37387  new_path="${new_path/%.exe/}"
37388
37389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37390
37391  # First separate the path from the arguments. This will split at the first
37392  # space.
37393  complete="$NM"
37394  path="${complete%% *}"
37395  tmp="$complete EOL"
37396  arguments="${tmp#* }"
37397
37398  # Input might be given as Windows format, start by converting to
37399  # unix format.
37400  new_path="$path"
37401
37402  windows_path="$new_path"
37403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37404    unix_path=`$CYGPATH -u "$windows_path"`
37405    new_path="$unix_path"
37406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37408    new_path="$unix_path"
37409  fi
37410
37411
37412  # Now try to locate executable using which
37413  new_path=`$WHICH "$new_path" 2> /dev/null`
37414
37415  if test "x$new_path" = x; then
37416    # Oops. Which didn't find the executable.
37417    # The splitting of arguments from the executable at a space might have been incorrect,
37418    # since paths with space are more likely in Windows. Give it another try with the whole
37419    # argument.
37420    path="$complete"
37421    arguments="EOL"
37422    new_path="$path"
37423
37424  windows_path="$new_path"
37425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37426    unix_path=`$CYGPATH -u "$windows_path"`
37427    new_path="$unix_path"
37428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37430    new_path="$unix_path"
37431  fi
37432
37433
37434    new_path=`$WHICH "$new_path" 2> /dev/null`
37435
37436    if test "x$new_path" = x; then
37437      # It's still not found. Now this is an unrecoverable error.
37438      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37439$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37440      has_space=`$ECHO "$complete" | $GREP " "`
37441      if test "x$has_space" != x; then
37442        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37443$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37444      fi
37445      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37446    fi
37447  fi
37448
37449  # Now new_path has a complete unix path to the binary
37450  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37451    # Keep paths in /bin as-is, but remove trailing .exe if any
37452    new_path="${new_path/%.exe/}"
37453    # Do not save /bin paths to all_fixpath_prefixes!
37454  else
37455    # Not in mixed or Windows style, start by that.
37456    new_path=`cmd //c echo $new_path`
37457
37458  input_path="$new_path"
37459  # Check if we need to convert this using DOS-style short mode. If the path
37460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37461  # take no chances and rewrite it.
37462  # Note: m4 eats our [], so we need to use [ and ] instead.
37463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37464  if test "x$has_forbidden_chars" != x; then
37465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37466    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37467  fi
37468
37469    # Output is in $new_path
37470
37471  windows_path="$new_path"
37472  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37473    unix_path=`$CYGPATH -u "$windows_path"`
37474    new_path="$unix_path"
37475  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37476    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37477    new_path="$unix_path"
37478  fi
37479
37480    # remove trailing .exe if any
37481    new_path="${new_path/%.exe/}"
37482
37483    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37484    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37485  fi
37486
37487  else
37488    # We're on a posix platform. Hooray! :)
37489    # First separate the path from the arguments. This will split at the first
37490    # space.
37491    complete="$NM"
37492    path="${complete%% *}"
37493    tmp="$complete EOL"
37494    arguments="${tmp#* }"
37495
37496    # Cannot rely on the command "which" here since it doesn't always work.
37497    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37498    if test -z "$is_absolute_path"; then
37499      # Path to executable is not absolute. Find it.
37500      IFS_save="$IFS"
37501      IFS=:
37502      for p in $PATH; do
37503        if test -f "$p/$path" && test -x "$p/$path"; then
37504          new_path="$p/$path"
37505          break
37506        fi
37507      done
37508      IFS="$IFS_save"
37509    else
37510      # This is an absolute path, we can use it without further modifications.
37511      new_path="$path"
37512    fi
37513
37514    if test "x$new_path" = x; then
37515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37516$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37517      has_space=`$ECHO "$complete" | $GREP " "`
37518      if test "x$has_space" != x; then
37519        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37520$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37521      fi
37522      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37523    fi
37524  fi
37525
37526  # Now join together the path and the arguments once again
37527  if test "x$arguments" != xEOL; then
37528    new_complete="$new_path ${arguments% *}"
37529  else
37530    new_complete="$new_path"
37531  fi
37532
37533  if test "x$complete" != "x$new_complete"; then
37534    NM="$new_complete"
37535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37536$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37537  fi
37538
37539    GNM="$NM"
37540
37541  fi
37542
37543  # objcopy is used for moving debug symbols to separate files when
37544  # full debug symbols are enabled.
37545  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37546
37547
37548  # Publish this variable in the help.
37549
37550
37551  if test "x$OBJCOPY" = x; then
37552    # The variable is not set by user, try to locate tool using the code snippet
37553    if test -n "$ac_tool_prefix"; then
37554  for ac_prog in gobjcopy objcopy
37555  do
37556    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37557set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37559$as_echo_n "checking for $ac_word... " >&6; }
37560if ${ac_cv_prog_OBJCOPY+:} false; then :
37561  $as_echo_n "(cached) " >&6
37562else
37563  if test -n "$OBJCOPY"; then
37564  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37565else
37566as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37567for as_dir in $PATH
37568do
37569  IFS=$as_save_IFS
37570  test -z "$as_dir" && as_dir=.
37571    for ac_exec_ext in '' $ac_executable_extensions; do
37572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37573    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37575    break 2
37576  fi
37577done
37578  done
37579IFS=$as_save_IFS
37580
37581fi
37582fi
37583OBJCOPY=$ac_cv_prog_OBJCOPY
37584if test -n "$OBJCOPY"; then
37585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37586$as_echo "$OBJCOPY" >&6; }
37587else
37588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37589$as_echo "no" >&6; }
37590fi
37591
37592
37593    test -n "$OBJCOPY" && break
37594  done
37595fi
37596if test -z "$OBJCOPY"; then
37597  ac_ct_OBJCOPY=$OBJCOPY
37598  for ac_prog in gobjcopy objcopy
37599do
37600  # Extract the first word of "$ac_prog", so it can be a program name with args.
37601set dummy $ac_prog; ac_word=$2
37602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37603$as_echo_n "checking for $ac_word... " >&6; }
37604if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37605  $as_echo_n "(cached) " >&6
37606else
37607  if test -n "$ac_ct_OBJCOPY"; then
37608  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37609else
37610as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37611for as_dir in $PATH
37612do
37613  IFS=$as_save_IFS
37614  test -z "$as_dir" && as_dir=.
37615    for ac_exec_ext in '' $ac_executable_extensions; do
37616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37617    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37619    break 2
37620  fi
37621done
37622  done
37623IFS=$as_save_IFS
37624
37625fi
37626fi
37627ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37628if test -n "$ac_ct_OBJCOPY"; then
37629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37630$as_echo "$ac_ct_OBJCOPY" >&6; }
37631else
37632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37633$as_echo "no" >&6; }
37634fi
37635
37636
37637  test -n "$ac_ct_OBJCOPY" && break
37638done
37639
37640  if test "x$ac_ct_OBJCOPY" = x; then
37641    OBJCOPY=""
37642  else
37643    case $cross_compiling:$ac_tool_warned in
37644yes:)
37645{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37646$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37647ac_tool_warned=yes ;;
37648esac
37649    OBJCOPY=$ac_ct_OBJCOPY
37650  fi
37651fi
37652
37653  else
37654    # The variable is set, but is it from the command line or the environment?
37655
37656    # Try to remove the string !OBJCOPY! from our list.
37657    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37658    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37659      # If it failed, the variable was not from the command line. Ignore it,
37660      # but warn the user (except for BASH, which is always set by the calling BASH).
37661      if test "xOBJCOPY" != xBASH; then
37662        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37663$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37664      fi
37665      # Try to locate tool using the code snippet
37666      if test -n "$ac_tool_prefix"; then
37667  for ac_prog in gobjcopy objcopy
37668  do
37669    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37670set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37672$as_echo_n "checking for $ac_word... " >&6; }
37673if ${ac_cv_prog_OBJCOPY+:} false; then :
37674  $as_echo_n "(cached) " >&6
37675else
37676  if test -n "$OBJCOPY"; then
37677  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37678else
37679as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37680for as_dir in $PATH
37681do
37682  IFS=$as_save_IFS
37683  test -z "$as_dir" && as_dir=.
37684    for ac_exec_ext in '' $ac_executable_extensions; do
37685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37686    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37688    break 2
37689  fi
37690done
37691  done
37692IFS=$as_save_IFS
37693
37694fi
37695fi
37696OBJCOPY=$ac_cv_prog_OBJCOPY
37697if test -n "$OBJCOPY"; then
37698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37699$as_echo "$OBJCOPY" >&6; }
37700else
37701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37702$as_echo "no" >&6; }
37703fi
37704
37705
37706    test -n "$OBJCOPY" && break
37707  done
37708fi
37709if test -z "$OBJCOPY"; then
37710  ac_ct_OBJCOPY=$OBJCOPY
37711  for ac_prog in gobjcopy objcopy
37712do
37713  # Extract the first word of "$ac_prog", so it can be a program name with args.
37714set dummy $ac_prog; ac_word=$2
37715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37716$as_echo_n "checking for $ac_word... " >&6; }
37717if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37718  $as_echo_n "(cached) " >&6
37719else
37720  if test -n "$ac_ct_OBJCOPY"; then
37721  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37722else
37723as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37724for as_dir in $PATH
37725do
37726  IFS=$as_save_IFS
37727  test -z "$as_dir" && as_dir=.
37728    for ac_exec_ext in '' $ac_executable_extensions; do
37729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37730    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37732    break 2
37733  fi
37734done
37735  done
37736IFS=$as_save_IFS
37737
37738fi
37739fi
37740ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37741if test -n "$ac_ct_OBJCOPY"; then
37742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37743$as_echo "$ac_ct_OBJCOPY" >&6; }
37744else
37745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37746$as_echo "no" >&6; }
37747fi
37748
37749
37750  test -n "$ac_ct_OBJCOPY" && break
37751done
37752
37753  if test "x$ac_ct_OBJCOPY" = x; then
37754    OBJCOPY=""
37755  else
37756    case $cross_compiling:$ac_tool_warned in
37757yes:)
37758{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37759$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37760ac_tool_warned=yes ;;
37761esac
37762    OBJCOPY=$ac_ct_OBJCOPY
37763  fi
37764fi
37765
37766    else
37767      # If it succeeded, then it was overridden by the user. We will use it
37768      # for the tool.
37769
37770      # First remove it from the list of overridden variables, so we can test
37771      # for unknown variables in the end.
37772      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37773
37774      # Check if the provided tool contains a complete path.
37775      tool_specified="$OBJCOPY"
37776      tool_basename="${tool_specified##*/}"
37777      if test "x$tool_basename" = "x$tool_specified"; then
37778        # A command without a complete path is provided, search $PATH.
37779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37780$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37781        # Extract the first word of "$tool_basename", so it can be a program name with args.
37782set dummy $tool_basename; ac_word=$2
37783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37784$as_echo_n "checking for $ac_word... " >&6; }
37785if ${ac_cv_path_OBJCOPY+:} false; then :
37786  $as_echo_n "(cached) " >&6
37787else
37788  case $OBJCOPY in
37789  [\\/]* | ?:[\\/]*)
37790  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37791  ;;
37792  *)
37793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37794for as_dir in $PATH
37795do
37796  IFS=$as_save_IFS
37797  test -z "$as_dir" && as_dir=.
37798    for ac_exec_ext in '' $ac_executable_extensions; do
37799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37800    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37802    break 2
37803  fi
37804done
37805  done
37806IFS=$as_save_IFS
37807
37808  ;;
37809esac
37810fi
37811OBJCOPY=$ac_cv_path_OBJCOPY
37812if test -n "$OBJCOPY"; then
37813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37814$as_echo "$OBJCOPY" >&6; }
37815else
37816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37817$as_echo "no" >&6; }
37818fi
37819
37820
37821        if test "x$OBJCOPY" = x; then
37822          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37823        fi
37824      else
37825        # Otherwise we believe it is a complete path. Use it as it is.
37826        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37827$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37828        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37829$as_echo_n "checking for OBJCOPY... " >&6; }
37830        if test ! -x "$tool_specified"; then
37831          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37832$as_echo "not found" >&6; }
37833          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37834        fi
37835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37836$as_echo "$tool_specified" >&6; }
37837      fi
37838    fi
37839  fi
37840
37841
37842    # Only call fixup if objcopy was found.
37843    if test -n "$OBJCOPY"; then
37844
37845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37846
37847  # First separate the path from the arguments. This will split at the first
37848  # space.
37849  complete="$OBJCOPY"
37850  path="${complete%% *}"
37851  tmp="$complete EOL"
37852  arguments="${tmp#* }"
37853
37854  # Input might be given as Windows format, start by converting to
37855  # unix format.
37856  new_path=`$CYGPATH -u "$path"`
37857
37858  # Now try to locate executable using which
37859  new_path=`$WHICH "$new_path" 2> /dev/null`
37860  # bat and cmd files are not always considered executable in cygwin causing which
37861  # to not find them
37862  if test "x$new_path" = x \
37863      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37864      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37865    new_path=`$CYGPATH -u "$path"`
37866  fi
37867  if test "x$new_path" = x; then
37868    # Oops. Which didn't find the executable.
37869    # The splitting of arguments from the executable at a space might have been incorrect,
37870    # since paths with space are more likely in Windows. Give it another try with the whole
37871    # argument.
37872    path="$complete"
37873    arguments="EOL"
37874    new_path=`$CYGPATH -u "$path"`
37875    new_path=`$WHICH "$new_path" 2> /dev/null`
37876    # bat and cmd files are not always considered executable in cygwin causing which
37877    # to not find them
37878    if test "x$new_path" = x \
37879        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37880        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37881      new_path=`$CYGPATH -u "$path"`
37882    fi
37883    if test "x$new_path" = x; then
37884      # It's still not found. Now this is an unrecoverable error.
37885      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37886$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37887      has_space=`$ECHO "$complete" | $GREP " "`
37888      if test "x$has_space" != x; then
37889        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37890$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37891      fi
37892      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37893    fi
37894  fi
37895
37896  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37897  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37898  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37899  # "foo.exe" is OK but "foo" is an error.
37900  #
37901  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37902  # It is also a way to make sure we got the proper file name for the real test later on.
37903  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37904  if test "x$test_shortpath" = x; then
37905    # Short path failed, file does not exist as specified.
37906    # Try adding .exe or .cmd
37907    if test -f "${new_path}.exe"; then
37908      input_to_shortpath="${new_path}.exe"
37909    elif test -f "${new_path}.cmd"; then
37910      input_to_shortpath="${new_path}.cmd"
37911    else
37912      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37913$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37914      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37915$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37916      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37917    fi
37918  else
37919    input_to_shortpath="$new_path"
37920  fi
37921
37922  # Call helper function which possibly converts this using DOS-style short mode.
37923  # If so, the updated path is stored in $new_path.
37924  new_path="$input_to_shortpath"
37925
37926  input_path="$input_to_shortpath"
37927  # Check if we need to convert this using DOS-style short mode. If the path
37928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37929  # take no chances and rewrite it.
37930  # Note: m4 eats our [], so we need to use [ and ] instead.
37931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37932  if test "x$has_forbidden_chars" != x; then
37933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37934    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37935    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37936    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37937      # Going to short mode and back again did indeed matter. Since short mode is
37938      # case insensitive, let's make it lowercase to improve readability.
37939      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37940      # Now convert it back to Unix-stile (cygpath)
37941      input_path=`$CYGPATH -u "$shortmode_path"`
37942      new_path="$input_path"
37943    fi
37944  fi
37945
37946  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37947  if test "x$test_cygdrive_prefix" = x; then
37948    # As a simple fix, exclude /usr/bin since it's not a real path.
37949    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37950      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37951      # a path prefixed by /cygdrive for fixpath to work.
37952      new_path="$CYGWIN_ROOT_PATH$input_path"
37953    fi
37954  fi
37955
37956  # remove trailing .exe if any
37957  new_path="${new_path/%.exe/}"
37958
37959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37960
37961  # First separate the path from the arguments. This will split at the first
37962  # space.
37963  complete="$OBJCOPY"
37964  path="${complete%% *}"
37965  tmp="$complete EOL"
37966  arguments="${tmp#* }"
37967
37968  # Input might be given as Windows format, start by converting to
37969  # unix format.
37970  new_path="$path"
37971
37972  windows_path="$new_path"
37973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37974    unix_path=`$CYGPATH -u "$windows_path"`
37975    new_path="$unix_path"
37976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37978    new_path="$unix_path"
37979  fi
37980
37981
37982  # Now try to locate executable using which
37983  new_path=`$WHICH "$new_path" 2> /dev/null`
37984
37985  if test "x$new_path" = x; then
37986    # Oops. Which didn't find the executable.
37987    # The splitting of arguments from the executable at a space might have been incorrect,
37988    # since paths with space are more likely in Windows. Give it another try with the whole
37989    # argument.
37990    path="$complete"
37991    arguments="EOL"
37992    new_path="$path"
37993
37994  windows_path="$new_path"
37995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37996    unix_path=`$CYGPATH -u "$windows_path"`
37997    new_path="$unix_path"
37998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37999    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38000    new_path="$unix_path"
38001  fi
38002
38003
38004    new_path=`$WHICH "$new_path" 2> /dev/null`
38005
38006    if test "x$new_path" = x; then
38007      # It's still not found. Now this is an unrecoverable error.
38008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38009$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38010      has_space=`$ECHO "$complete" | $GREP " "`
38011      if test "x$has_space" != x; then
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38014      fi
38015      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38016    fi
38017  fi
38018
38019  # Now new_path has a complete unix path to the binary
38020  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38021    # Keep paths in /bin as-is, but remove trailing .exe if any
38022    new_path="${new_path/%.exe/}"
38023    # Do not save /bin paths to all_fixpath_prefixes!
38024  else
38025    # Not in mixed or Windows style, start by that.
38026    new_path=`cmd //c echo $new_path`
38027
38028  input_path="$new_path"
38029  # Check if we need to convert this using DOS-style short mode. If the path
38030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38031  # take no chances and rewrite it.
38032  # Note: m4 eats our [], so we need to use [ and ] instead.
38033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38034  if test "x$has_forbidden_chars" != x; then
38035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38036    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38037  fi
38038
38039    # Output is in $new_path
38040
38041  windows_path="$new_path"
38042  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38043    unix_path=`$CYGPATH -u "$windows_path"`
38044    new_path="$unix_path"
38045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38046    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38047    new_path="$unix_path"
38048  fi
38049
38050    # remove trailing .exe if any
38051    new_path="${new_path/%.exe/}"
38052
38053    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38054    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38055  fi
38056
38057  else
38058    # We're on a posix platform. Hooray! :)
38059    # First separate the path from the arguments. This will split at the first
38060    # space.
38061    complete="$OBJCOPY"
38062    path="${complete%% *}"
38063    tmp="$complete EOL"
38064    arguments="${tmp#* }"
38065
38066    # Cannot rely on the command "which" here since it doesn't always work.
38067    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38068    if test -z "$is_absolute_path"; then
38069      # Path to executable is not absolute. Find it.
38070      IFS_save="$IFS"
38071      IFS=:
38072      for p in $PATH; do
38073        if test -f "$p/$path" && test -x "$p/$path"; then
38074          new_path="$p/$path"
38075          break
38076        fi
38077      done
38078      IFS="$IFS_save"
38079    else
38080      # This is an absolute path, we can use it without further modifications.
38081      new_path="$path"
38082    fi
38083
38084    if test "x$new_path" = x; then
38085      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38086$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38087      has_space=`$ECHO "$complete" | $GREP " "`
38088      if test "x$has_space" != x; then
38089        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38090$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38091      fi
38092      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38093    fi
38094  fi
38095
38096  # Now join together the path and the arguments once again
38097  if test "x$arguments" != xEOL; then
38098    new_complete="$new_path ${arguments% *}"
38099  else
38100    new_complete="$new_path"
38101  fi
38102
38103  if test "x$complete" != "x$new_complete"; then
38104    OBJCOPY="$new_complete"
38105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38106$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38107  fi
38108
38109    fi
38110  fi
38111
38112
38113
38114  # Publish this variable in the help.
38115
38116
38117  if test "x$OBJDUMP" = x; then
38118    # The variable is not set by user, try to locate tool using the code snippet
38119    if test -n "$ac_tool_prefix"; then
38120  for ac_prog in gobjdump objdump
38121  do
38122    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38123set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38125$as_echo_n "checking for $ac_word... " >&6; }
38126if ${ac_cv_prog_OBJDUMP+:} false; then :
38127  $as_echo_n "(cached) " >&6
38128else
38129  if test -n "$OBJDUMP"; then
38130  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38131else
38132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38133for as_dir in $PATH
38134do
38135  IFS=$as_save_IFS
38136  test -z "$as_dir" && as_dir=.
38137    for ac_exec_ext in '' $ac_executable_extensions; do
38138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38139    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38141    break 2
38142  fi
38143done
38144  done
38145IFS=$as_save_IFS
38146
38147fi
38148fi
38149OBJDUMP=$ac_cv_prog_OBJDUMP
38150if test -n "$OBJDUMP"; then
38151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38152$as_echo "$OBJDUMP" >&6; }
38153else
38154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38155$as_echo "no" >&6; }
38156fi
38157
38158
38159    test -n "$OBJDUMP" && break
38160  done
38161fi
38162if test -z "$OBJDUMP"; then
38163  ac_ct_OBJDUMP=$OBJDUMP
38164  for ac_prog in gobjdump objdump
38165do
38166  # Extract the first word of "$ac_prog", so it can be a program name with args.
38167set dummy $ac_prog; ac_word=$2
38168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38169$as_echo_n "checking for $ac_word... " >&6; }
38170if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38171  $as_echo_n "(cached) " >&6
38172else
38173  if test -n "$ac_ct_OBJDUMP"; then
38174  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38175else
38176as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38177for as_dir in $PATH
38178do
38179  IFS=$as_save_IFS
38180  test -z "$as_dir" && as_dir=.
38181    for ac_exec_ext in '' $ac_executable_extensions; do
38182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38183    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38185    break 2
38186  fi
38187done
38188  done
38189IFS=$as_save_IFS
38190
38191fi
38192fi
38193ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38194if test -n "$ac_ct_OBJDUMP"; then
38195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38196$as_echo "$ac_ct_OBJDUMP" >&6; }
38197else
38198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38199$as_echo "no" >&6; }
38200fi
38201
38202
38203  test -n "$ac_ct_OBJDUMP" && break
38204done
38205
38206  if test "x$ac_ct_OBJDUMP" = x; then
38207    OBJDUMP=""
38208  else
38209    case $cross_compiling:$ac_tool_warned in
38210yes:)
38211{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38212$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38213ac_tool_warned=yes ;;
38214esac
38215    OBJDUMP=$ac_ct_OBJDUMP
38216  fi
38217fi
38218
38219  else
38220    # The variable is set, but is it from the command line or the environment?
38221
38222    # Try to remove the string !OBJDUMP! from our list.
38223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38225      # If it failed, the variable was not from the command line. Ignore it,
38226      # but warn the user (except for BASH, which is always set by the calling BASH).
38227      if test "xOBJDUMP" != xBASH; then
38228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38229$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38230      fi
38231      # Try to locate tool using the code snippet
38232      if test -n "$ac_tool_prefix"; then
38233  for ac_prog in gobjdump objdump
38234  do
38235    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38236set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38238$as_echo_n "checking for $ac_word... " >&6; }
38239if ${ac_cv_prog_OBJDUMP+:} false; then :
38240  $as_echo_n "(cached) " >&6
38241else
38242  if test -n "$OBJDUMP"; then
38243  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38244else
38245as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38246for as_dir in $PATH
38247do
38248  IFS=$as_save_IFS
38249  test -z "$as_dir" && as_dir=.
38250    for ac_exec_ext in '' $ac_executable_extensions; do
38251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38252    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38254    break 2
38255  fi
38256done
38257  done
38258IFS=$as_save_IFS
38259
38260fi
38261fi
38262OBJDUMP=$ac_cv_prog_OBJDUMP
38263if test -n "$OBJDUMP"; then
38264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38265$as_echo "$OBJDUMP" >&6; }
38266else
38267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38268$as_echo "no" >&6; }
38269fi
38270
38271
38272    test -n "$OBJDUMP" && break
38273  done
38274fi
38275if test -z "$OBJDUMP"; then
38276  ac_ct_OBJDUMP=$OBJDUMP
38277  for ac_prog in gobjdump objdump
38278do
38279  # Extract the first word of "$ac_prog", so it can be a program name with args.
38280set dummy $ac_prog; ac_word=$2
38281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38282$as_echo_n "checking for $ac_word... " >&6; }
38283if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38284  $as_echo_n "(cached) " >&6
38285else
38286  if test -n "$ac_ct_OBJDUMP"; then
38287  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38288else
38289as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38290for as_dir in $PATH
38291do
38292  IFS=$as_save_IFS
38293  test -z "$as_dir" && as_dir=.
38294    for ac_exec_ext in '' $ac_executable_extensions; do
38295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38296    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38298    break 2
38299  fi
38300done
38301  done
38302IFS=$as_save_IFS
38303
38304fi
38305fi
38306ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38307if test -n "$ac_ct_OBJDUMP"; then
38308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38309$as_echo "$ac_ct_OBJDUMP" >&6; }
38310else
38311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38312$as_echo "no" >&6; }
38313fi
38314
38315
38316  test -n "$ac_ct_OBJDUMP" && break
38317done
38318
38319  if test "x$ac_ct_OBJDUMP" = x; then
38320    OBJDUMP=""
38321  else
38322    case $cross_compiling:$ac_tool_warned in
38323yes:)
38324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38326ac_tool_warned=yes ;;
38327esac
38328    OBJDUMP=$ac_ct_OBJDUMP
38329  fi
38330fi
38331
38332    else
38333      # If it succeeded, then it was overridden by the user. We will use it
38334      # for the tool.
38335
38336      # First remove it from the list of overridden variables, so we can test
38337      # for unknown variables in the end.
38338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38339
38340      # Check if the provided tool contains a complete path.
38341      tool_specified="$OBJDUMP"
38342      tool_basename="${tool_specified##*/}"
38343      if test "x$tool_basename" = "x$tool_specified"; then
38344        # A command without a complete path is provided, search $PATH.
38345        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38346$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38347        # Extract the first word of "$tool_basename", so it can be a program name with args.
38348set dummy $tool_basename; ac_word=$2
38349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38350$as_echo_n "checking for $ac_word... " >&6; }
38351if ${ac_cv_path_OBJDUMP+:} false; then :
38352  $as_echo_n "(cached) " >&6
38353else
38354  case $OBJDUMP in
38355  [\\/]* | ?:[\\/]*)
38356  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38357  ;;
38358  *)
38359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38360for as_dir in $PATH
38361do
38362  IFS=$as_save_IFS
38363  test -z "$as_dir" && as_dir=.
38364    for ac_exec_ext in '' $ac_executable_extensions; do
38365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38366    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38368    break 2
38369  fi
38370done
38371  done
38372IFS=$as_save_IFS
38373
38374  ;;
38375esac
38376fi
38377OBJDUMP=$ac_cv_path_OBJDUMP
38378if test -n "$OBJDUMP"; then
38379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38380$as_echo "$OBJDUMP" >&6; }
38381else
38382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38383$as_echo "no" >&6; }
38384fi
38385
38386
38387        if test "x$OBJDUMP" = x; then
38388          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38389        fi
38390      else
38391        # Otherwise we believe it is a complete path. Use it as it is.
38392        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38393$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38394        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38395$as_echo_n "checking for OBJDUMP... " >&6; }
38396        if test ! -x "$tool_specified"; then
38397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38398$as_echo "not found" >&6; }
38399          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38400        fi
38401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38402$as_echo "$tool_specified" >&6; }
38403      fi
38404    fi
38405  fi
38406
38407
38408  if test "x$OBJDUMP" != x; then
38409    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38410    # bails if argument is missing.
38411
38412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38413
38414  # First separate the path from the arguments. This will split at the first
38415  # space.
38416  complete="$OBJDUMP"
38417  path="${complete%% *}"
38418  tmp="$complete EOL"
38419  arguments="${tmp#* }"
38420
38421  # Input might be given as Windows format, start by converting to
38422  # unix format.
38423  new_path=`$CYGPATH -u "$path"`
38424
38425  # Now try to locate executable using which
38426  new_path=`$WHICH "$new_path" 2> /dev/null`
38427  # bat and cmd files are not always considered executable in cygwin causing which
38428  # to not find them
38429  if test "x$new_path" = x \
38430      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38431      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38432    new_path=`$CYGPATH -u "$path"`
38433  fi
38434  if test "x$new_path" = x; then
38435    # Oops. Which didn't find the executable.
38436    # The splitting of arguments from the executable at a space might have been incorrect,
38437    # since paths with space are more likely in Windows. Give it another try with the whole
38438    # argument.
38439    path="$complete"
38440    arguments="EOL"
38441    new_path=`$CYGPATH -u "$path"`
38442    new_path=`$WHICH "$new_path" 2> /dev/null`
38443    # bat and cmd files are not always considered executable in cygwin causing which
38444    # to not find them
38445    if test "x$new_path" = x \
38446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38448      new_path=`$CYGPATH -u "$path"`
38449    fi
38450    if test "x$new_path" = x; then
38451      # It's still not found. Now this is an unrecoverable error.
38452      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38453$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38454      has_space=`$ECHO "$complete" | $GREP " "`
38455      if test "x$has_space" != x; then
38456        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38457$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38458      fi
38459      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38460    fi
38461  fi
38462
38463  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38464  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38465  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38466  # "foo.exe" is OK but "foo" is an error.
38467  #
38468  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38469  # It is also a way to make sure we got the proper file name for the real test later on.
38470  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38471  if test "x$test_shortpath" = x; then
38472    # Short path failed, file does not exist as specified.
38473    # Try adding .exe or .cmd
38474    if test -f "${new_path}.exe"; then
38475      input_to_shortpath="${new_path}.exe"
38476    elif test -f "${new_path}.cmd"; then
38477      input_to_shortpath="${new_path}.cmd"
38478    else
38479      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38480$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38481      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38482$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38483      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38484    fi
38485  else
38486    input_to_shortpath="$new_path"
38487  fi
38488
38489  # Call helper function which possibly converts this using DOS-style short mode.
38490  # If so, the updated path is stored in $new_path.
38491  new_path="$input_to_shortpath"
38492
38493  input_path="$input_to_shortpath"
38494  # Check if we need to convert this using DOS-style short mode. If the path
38495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38496  # take no chances and rewrite it.
38497  # Note: m4 eats our [], so we need to use [ and ] instead.
38498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38499  if test "x$has_forbidden_chars" != x; then
38500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38504      # Going to short mode and back again did indeed matter. Since short mode is
38505      # case insensitive, let's make it lowercase to improve readability.
38506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38507      # Now convert it back to Unix-stile (cygpath)
38508      input_path=`$CYGPATH -u "$shortmode_path"`
38509      new_path="$input_path"
38510    fi
38511  fi
38512
38513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38514  if test "x$test_cygdrive_prefix" = x; then
38515    # As a simple fix, exclude /usr/bin since it's not a real path.
38516    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38518      # a path prefixed by /cygdrive for fixpath to work.
38519      new_path="$CYGWIN_ROOT_PATH$input_path"
38520    fi
38521  fi
38522
38523  # remove trailing .exe if any
38524  new_path="${new_path/%.exe/}"
38525
38526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38527
38528  # First separate the path from the arguments. This will split at the first
38529  # space.
38530  complete="$OBJDUMP"
38531  path="${complete%% *}"
38532  tmp="$complete EOL"
38533  arguments="${tmp#* }"
38534
38535  # Input might be given as Windows format, start by converting to
38536  # unix format.
38537  new_path="$path"
38538
38539  windows_path="$new_path"
38540  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38541    unix_path=`$CYGPATH -u "$windows_path"`
38542    new_path="$unix_path"
38543  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38544    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38545    new_path="$unix_path"
38546  fi
38547
38548
38549  # Now try to locate executable using which
38550  new_path=`$WHICH "$new_path" 2> /dev/null`
38551
38552  if test "x$new_path" = x; then
38553    # Oops. Which didn't find the executable.
38554    # The splitting of arguments from the executable at a space might have been incorrect,
38555    # since paths with space are more likely in Windows. Give it another try with the whole
38556    # argument.
38557    path="$complete"
38558    arguments="EOL"
38559    new_path="$path"
38560
38561  windows_path="$new_path"
38562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38563    unix_path=`$CYGPATH -u "$windows_path"`
38564    new_path="$unix_path"
38565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38567    new_path="$unix_path"
38568  fi
38569
38570
38571    new_path=`$WHICH "$new_path" 2> /dev/null`
38572
38573    if test "x$new_path" = x; then
38574      # It's still not found. Now this is an unrecoverable error.
38575      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38576$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38577      has_space=`$ECHO "$complete" | $GREP " "`
38578      if test "x$has_space" != x; then
38579        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38580$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38581      fi
38582      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38583    fi
38584  fi
38585
38586  # Now new_path has a complete unix path to the binary
38587  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38588    # Keep paths in /bin as-is, but remove trailing .exe if any
38589    new_path="${new_path/%.exe/}"
38590    # Do not save /bin paths to all_fixpath_prefixes!
38591  else
38592    # Not in mixed or Windows style, start by that.
38593    new_path=`cmd //c echo $new_path`
38594
38595  input_path="$new_path"
38596  # Check if we need to convert this using DOS-style short mode. If the path
38597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38598  # take no chances and rewrite it.
38599  # Note: m4 eats our [], so we need to use [ and ] instead.
38600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38601  if test "x$has_forbidden_chars" != x; then
38602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38604  fi
38605
38606    # Output is in $new_path
38607
38608  windows_path="$new_path"
38609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38610    unix_path=`$CYGPATH -u "$windows_path"`
38611    new_path="$unix_path"
38612  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38613    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38614    new_path="$unix_path"
38615  fi
38616
38617    # remove trailing .exe if any
38618    new_path="${new_path/%.exe/}"
38619
38620    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38621    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38622  fi
38623
38624  else
38625    # We're on a posix platform. Hooray! :)
38626    # First separate the path from the arguments. This will split at the first
38627    # space.
38628    complete="$OBJDUMP"
38629    path="${complete%% *}"
38630    tmp="$complete EOL"
38631    arguments="${tmp#* }"
38632
38633    # Cannot rely on the command "which" here since it doesn't always work.
38634    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38635    if test -z "$is_absolute_path"; then
38636      # Path to executable is not absolute. Find it.
38637      IFS_save="$IFS"
38638      IFS=:
38639      for p in $PATH; do
38640        if test -f "$p/$path" && test -x "$p/$path"; then
38641          new_path="$p/$path"
38642          break
38643        fi
38644      done
38645      IFS="$IFS_save"
38646    else
38647      # This is an absolute path, we can use it without further modifications.
38648      new_path="$path"
38649    fi
38650
38651    if test "x$new_path" = x; then
38652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38653$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38654      has_space=`$ECHO "$complete" | $GREP " "`
38655      if test "x$has_space" != x; then
38656        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38657$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38658      fi
38659      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38660    fi
38661  fi
38662
38663  # Now join together the path and the arguments once again
38664  if test "x$arguments" != xEOL; then
38665    new_complete="$new_path ${arguments% *}"
38666  else
38667    new_complete="$new_path"
38668  fi
38669
38670  if test "x$complete" != "x$new_complete"; then
38671    OBJDUMP="$new_complete"
38672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38673$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38674  fi
38675
38676  fi
38677
38678
38679  # Restore old path.
38680  PATH="$OLD_PATH"
38681
38682  # Restore the flags to the user specified values.
38683  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38684  CFLAGS="$ORG_CFLAGS"
38685  CXXFLAGS="$ORG_CXXFLAGS"
38686  OBJCFLAGS="$ORG_OBJCFLAGS"
38687
38688
38689# Finally do some processing after the detection phase
38690
38691  if test "x$COMPILE_TYPE" = "xcross"; then
38692    # Now we need to find a C/C++ compiler that can build executables for the
38693    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38694    # used once. Also, we need to do this without adding a tools dir to the
38695    # path, otherwise we might pick up cross-compilers which don't use standard
38696    # naming.
38697
38698    # FIXME: we should list the discovered compilers as an exclude pattern!
38699    # If we do that, we can do this detection before POST_DETECTION, and still
38700    # find the build compilers in the tools dir, if needed.
38701
38702
38703  # Publish this variable in the help.
38704
38705
38706  if test "x$BUILD_CC" = x; then
38707    # The variable is not set by user, try to locate tool using the code snippet
38708    for ac_prog in cl cc gcc
38709do
38710  # Extract the first word of "$ac_prog", so it can be a program name with args.
38711set dummy $ac_prog; ac_word=$2
38712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38713$as_echo_n "checking for $ac_word... " >&6; }
38714if ${ac_cv_path_BUILD_CC+:} false; then :
38715  $as_echo_n "(cached) " >&6
38716else
38717  case $BUILD_CC in
38718  [\\/]* | ?:[\\/]*)
38719  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38720  ;;
38721  *)
38722  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38723for as_dir in $PATH
38724do
38725  IFS=$as_save_IFS
38726  test -z "$as_dir" && as_dir=.
38727    for ac_exec_ext in '' $ac_executable_extensions; do
38728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38729    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38731    break 2
38732  fi
38733done
38734  done
38735IFS=$as_save_IFS
38736
38737  ;;
38738esac
38739fi
38740BUILD_CC=$ac_cv_path_BUILD_CC
38741if test -n "$BUILD_CC"; then
38742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38743$as_echo "$BUILD_CC" >&6; }
38744else
38745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38746$as_echo "no" >&6; }
38747fi
38748
38749
38750  test -n "$BUILD_CC" && break
38751done
38752
38753  else
38754    # The variable is set, but is it from the command line or the environment?
38755
38756    # Try to remove the string !BUILD_CC! from our list.
38757    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38758    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38759      # If it failed, the variable was not from the command line. Ignore it,
38760      # but warn the user (except for BASH, which is always set by the calling BASH).
38761      if test "xBUILD_CC" != xBASH; then
38762        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38763$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38764      fi
38765      # Try to locate tool using the code snippet
38766      for ac_prog in cl cc gcc
38767do
38768  # Extract the first word of "$ac_prog", so it can be a program name with args.
38769set dummy $ac_prog; ac_word=$2
38770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38771$as_echo_n "checking for $ac_word... " >&6; }
38772if ${ac_cv_path_BUILD_CC+:} false; then :
38773  $as_echo_n "(cached) " >&6
38774else
38775  case $BUILD_CC in
38776  [\\/]* | ?:[\\/]*)
38777  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38778  ;;
38779  *)
38780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38781for as_dir in $PATH
38782do
38783  IFS=$as_save_IFS
38784  test -z "$as_dir" && as_dir=.
38785    for ac_exec_ext in '' $ac_executable_extensions; do
38786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38787    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38789    break 2
38790  fi
38791done
38792  done
38793IFS=$as_save_IFS
38794
38795  ;;
38796esac
38797fi
38798BUILD_CC=$ac_cv_path_BUILD_CC
38799if test -n "$BUILD_CC"; then
38800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38801$as_echo "$BUILD_CC" >&6; }
38802else
38803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38804$as_echo "no" >&6; }
38805fi
38806
38807
38808  test -n "$BUILD_CC" && break
38809done
38810
38811    else
38812      # If it succeeded, then it was overridden by the user. We will use it
38813      # for the tool.
38814
38815      # First remove it from the list of overridden variables, so we can test
38816      # for unknown variables in the end.
38817      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38818
38819      # Check if the provided tool contains a complete path.
38820      tool_specified="$BUILD_CC"
38821      tool_basename="${tool_specified##*/}"
38822      if test "x$tool_basename" = "x$tool_specified"; then
38823        # A command without a complete path is provided, search $PATH.
38824        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38825$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38826        # Extract the first word of "$tool_basename", so it can be a program name with args.
38827set dummy $tool_basename; ac_word=$2
38828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38829$as_echo_n "checking for $ac_word... " >&6; }
38830if ${ac_cv_path_BUILD_CC+:} false; then :
38831  $as_echo_n "(cached) " >&6
38832else
38833  case $BUILD_CC in
38834  [\\/]* | ?:[\\/]*)
38835  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38836  ;;
38837  *)
38838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38839for as_dir in $PATH
38840do
38841  IFS=$as_save_IFS
38842  test -z "$as_dir" && as_dir=.
38843    for ac_exec_ext in '' $ac_executable_extensions; do
38844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38845    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38847    break 2
38848  fi
38849done
38850  done
38851IFS=$as_save_IFS
38852
38853  ;;
38854esac
38855fi
38856BUILD_CC=$ac_cv_path_BUILD_CC
38857if test -n "$BUILD_CC"; then
38858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38859$as_echo "$BUILD_CC" >&6; }
38860else
38861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38862$as_echo "no" >&6; }
38863fi
38864
38865
38866        if test "x$BUILD_CC" = x; then
38867          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38868        fi
38869      else
38870        # Otherwise we believe it is a complete path. Use it as it is.
38871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38872$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38873        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38874$as_echo_n "checking for BUILD_CC... " >&6; }
38875        if test ! -x "$tool_specified"; then
38876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38877$as_echo "not found" >&6; }
38878          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38879        fi
38880        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38881$as_echo "$tool_specified" >&6; }
38882      fi
38883    fi
38884  fi
38885
38886
38887
38888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38889
38890  # First separate the path from the arguments. This will split at the first
38891  # space.
38892  complete="$BUILD_CC"
38893  path="${complete%% *}"
38894  tmp="$complete EOL"
38895  arguments="${tmp#* }"
38896
38897  # Input might be given as Windows format, start by converting to
38898  # unix format.
38899  new_path=`$CYGPATH -u "$path"`
38900
38901  # Now try to locate executable using which
38902  new_path=`$WHICH "$new_path" 2> /dev/null`
38903  # bat and cmd files are not always considered executable in cygwin causing which
38904  # to not find them
38905  if test "x$new_path" = x \
38906      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38907      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38908    new_path=`$CYGPATH -u "$path"`
38909  fi
38910  if test "x$new_path" = x; then
38911    # Oops. Which didn't find the executable.
38912    # The splitting of arguments from the executable at a space might have been incorrect,
38913    # since paths with space are more likely in Windows. Give it another try with the whole
38914    # argument.
38915    path="$complete"
38916    arguments="EOL"
38917    new_path=`$CYGPATH -u "$path"`
38918    new_path=`$WHICH "$new_path" 2> /dev/null`
38919    # bat and cmd files are not always considered executable in cygwin causing which
38920    # to not find them
38921    if test "x$new_path" = x \
38922        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38923        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38924      new_path=`$CYGPATH -u "$path"`
38925    fi
38926    if test "x$new_path" = x; then
38927      # It's still not found. Now this is an unrecoverable error.
38928      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38929$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38930      has_space=`$ECHO "$complete" | $GREP " "`
38931      if test "x$has_space" != x; then
38932        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38933$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38934      fi
38935      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38936    fi
38937  fi
38938
38939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38942  # "foo.exe" is OK but "foo" is an error.
38943  #
38944  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38945  # It is also a way to make sure we got the proper file name for the real test later on.
38946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38947  if test "x$test_shortpath" = x; then
38948    # Short path failed, file does not exist as specified.
38949    # Try adding .exe or .cmd
38950    if test -f "${new_path}.exe"; then
38951      input_to_shortpath="${new_path}.exe"
38952    elif test -f "${new_path}.cmd"; then
38953      input_to_shortpath="${new_path}.cmd"
38954    else
38955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38956$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38957      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38958$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38959      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38960    fi
38961  else
38962    input_to_shortpath="$new_path"
38963  fi
38964
38965  # Call helper function which possibly converts this using DOS-style short mode.
38966  # If so, the updated path is stored in $new_path.
38967  new_path="$input_to_shortpath"
38968
38969  input_path="$input_to_shortpath"
38970  # Check if we need to convert this using DOS-style short mode. If the path
38971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38972  # take no chances and rewrite it.
38973  # Note: m4 eats our [], so we need to use [ and ] instead.
38974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38975  if test "x$has_forbidden_chars" != x; then
38976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38980      # Going to short mode and back again did indeed matter. Since short mode is
38981      # case insensitive, let's make it lowercase to improve readability.
38982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38983      # Now convert it back to Unix-stile (cygpath)
38984      input_path=`$CYGPATH -u "$shortmode_path"`
38985      new_path="$input_path"
38986    fi
38987  fi
38988
38989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38990  if test "x$test_cygdrive_prefix" = x; then
38991    # As a simple fix, exclude /usr/bin since it's not a real path.
38992    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38994      # a path prefixed by /cygdrive for fixpath to work.
38995      new_path="$CYGWIN_ROOT_PATH$input_path"
38996    fi
38997  fi
38998
38999  # remove trailing .exe if any
39000  new_path="${new_path/%.exe/}"
39001
39002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39003
39004  # First separate the path from the arguments. This will split at the first
39005  # space.
39006  complete="$BUILD_CC"
39007  path="${complete%% *}"
39008  tmp="$complete EOL"
39009  arguments="${tmp#* }"
39010
39011  # Input might be given as Windows format, start by converting to
39012  # unix format.
39013  new_path="$path"
39014
39015  windows_path="$new_path"
39016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39017    unix_path=`$CYGPATH -u "$windows_path"`
39018    new_path="$unix_path"
39019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39021    new_path="$unix_path"
39022  fi
39023
39024
39025  # Now try to locate executable using which
39026  new_path=`$WHICH "$new_path" 2> /dev/null`
39027
39028  if test "x$new_path" = x; then
39029    # Oops. Which didn't find the executable.
39030    # The splitting of arguments from the executable at a space might have been incorrect,
39031    # since paths with space are more likely in Windows. Give it another try with the whole
39032    # argument.
39033    path="$complete"
39034    arguments="EOL"
39035    new_path="$path"
39036
39037  windows_path="$new_path"
39038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39039    unix_path=`$CYGPATH -u "$windows_path"`
39040    new_path="$unix_path"
39041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39043    new_path="$unix_path"
39044  fi
39045
39046
39047    new_path=`$WHICH "$new_path" 2> /dev/null`
39048
39049    if test "x$new_path" = x; then
39050      # It's still not found. Now this is an unrecoverable error.
39051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39052$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39053      has_space=`$ECHO "$complete" | $GREP " "`
39054      if test "x$has_space" != x; then
39055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39057      fi
39058      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39059    fi
39060  fi
39061
39062  # Now new_path has a complete unix path to the binary
39063  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39064    # Keep paths in /bin as-is, but remove trailing .exe if any
39065    new_path="${new_path/%.exe/}"
39066    # Do not save /bin paths to all_fixpath_prefixes!
39067  else
39068    # Not in mixed or Windows style, start by that.
39069    new_path=`cmd //c echo $new_path`
39070
39071  input_path="$new_path"
39072  # Check if we need to convert this using DOS-style short mode. If the path
39073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39074  # take no chances and rewrite it.
39075  # Note: m4 eats our [], so we need to use [ and ] instead.
39076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39077  if test "x$has_forbidden_chars" != x; then
39078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39079    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39080  fi
39081
39082    # Output is in $new_path
39083
39084  windows_path="$new_path"
39085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39086    unix_path=`$CYGPATH -u "$windows_path"`
39087    new_path="$unix_path"
39088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39090    new_path="$unix_path"
39091  fi
39092
39093    # remove trailing .exe if any
39094    new_path="${new_path/%.exe/}"
39095
39096    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39097    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39098  fi
39099
39100  else
39101    # We're on a posix platform. Hooray! :)
39102    # First separate the path from the arguments. This will split at the first
39103    # space.
39104    complete="$BUILD_CC"
39105    path="${complete%% *}"
39106    tmp="$complete EOL"
39107    arguments="${tmp#* }"
39108
39109    # Cannot rely on the command "which" here since it doesn't always work.
39110    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39111    if test -z "$is_absolute_path"; then
39112      # Path to executable is not absolute. Find it.
39113      IFS_save="$IFS"
39114      IFS=:
39115      for p in $PATH; do
39116        if test -f "$p/$path" && test -x "$p/$path"; then
39117          new_path="$p/$path"
39118          break
39119        fi
39120      done
39121      IFS="$IFS_save"
39122    else
39123      # This is an absolute path, we can use it without further modifications.
39124      new_path="$path"
39125    fi
39126
39127    if test "x$new_path" = x; then
39128      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39129$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39130      has_space=`$ECHO "$complete" | $GREP " "`
39131      if test "x$has_space" != x; then
39132        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39133$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39134      fi
39135      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39136    fi
39137  fi
39138
39139  # Now join together the path and the arguments once again
39140  if test "x$arguments" != xEOL; then
39141    new_complete="$new_path ${arguments% *}"
39142  else
39143    new_complete="$new_path"
39144  fi
39145
39146  if test "x$complete" != "x$new_complete"; then
39147    BUILD_CC="$new_complete"
39148    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39149$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39150  fi
39151
39152
39153
39154  # Publish this variable in the help.
39155
39156
39157  if test "x$BUILD_CXX" = x; then
39158    # The variable is not set by user, try to locate tool using the code snippet
39159    for ac_prog in cl CC g++
39160do
39161  # Extract the first word of "$ac_prog", so it can be a program name with args.
39162set dummy $ac_prog; ac_word=$2
39163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39164$as_echo_n "checking for $ac_word... " >&6; }
39165if ${ac_cv_path_BUILD_CXX+:} false; then :
39166  $as_echo_n "(cached) " >&6
39167else
39168  case $BUILD_CXX in
39169  [\\/]* | ?:[\\/]*)
39170  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39171  ;;
39172  *)
39173  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39174for as_dir in $PATH
39175do
39176  IFS=$as_save_IFS
39177  test -z "$as_dir" && as_dir=.
39178    for ac_exec_ext in '' $ac_executable_extensions; do
39179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39180    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39182    break 2
39183  fi
39184done
39185  done
39186IFS=$as_save_IFS
39187
39188  ;;
39189esac
39190fi
39191BUILD_CXX=$ac_cv_path_BUILD_CXX
39192if test -n "$BUILD_CXX"; then
39193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39194$as_echo "$BUILD_CXX" >&6; }
39195else
39196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39197$as_echo "no" >&6; }
39198fi
39199
39200
39201  test -n "$BUILD_CXX" && break
39202done
39203
39204  else
39205    # The variable is set, but is it from the command line or the environment?
39206
39207    # Try to remove the string !BUILD_CXX! from our list.
39208    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39209    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39210      # If it failed, the variable was not from the command line. Ignore it,
39211      # but warn the user (except for BASH, which is always set by the calling BASH).
39212      if test "xBUILD_CXX" != xBASH; then
39213        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39214$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39215      fi
39216      # Try to locate tool using the code snippet
39217      for ac_prog in cl CC g++
39218do
39219  # Extract the first word of "$ac_prog", so it can be a program name with args.
39220set dummy $ac_prog; ac_word=$2
39221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39222$as_echo_n "checking for $ac_word... " >&6; }
39223if ${ac_cv_path_BUILD_CXX+:} false; then :
39224  $as_echo_n "(cached) " >&6
39225else
39226  case $BUILD_CXX in
39227  [\\/]* | ?:[\\/]*)
39228  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39229  ;;
39230  *)
39231  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39232for as_dir in $PATH
39233do
39234  IFS=$as_save_IFS
39235  test -z "$as_dir" && as_dir=.
39236    for ac_exec_ext in '' $ac_executable_extensions; do
39237  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39238    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39239    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39240    break 2
39241  fi
39242done
39243  done
39244IFS=$as_save_IFS
39245
39246  ;;
39247esac
39248fi
39249BUILD_CXX=$ac_cv_path_BUILD_CXX
39250if test -n "$BUILD_CXX"; then
39251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39252$as_echo "$BUILD_CXX" >&6; }
39253else
39254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39255$as_echo "no" >&6; }
39256fi
39257
39258
39259  test -n "$BUILD_CXX" && break
39260done
39261
39262    else
39263      # If it succeeded, then it was overridden by the user. We will use it
39264      # for the tool.
39265
39266      # First remove it from the list of overridden variables, so we can test
39267      # for unknown variables in the end.
39268      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39269
39270      # Check if the provided tool contains a complete path.
39271      tool_specified="$BUILD_CXX"
39272      tool_basename="${tool_specified##*/}"
39273      if test "x$tool_basename" = "x$tool_specified"; then
39274        # A command without a complete path is provided, search $PATH.
39275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39276$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39277        # Extract the first word of "$tool_basename", so it can be a program name with args.
39278set dummy $tool_basename; ac_word=$2
39279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39280$as_echo_n "checking for $ac_word... " >&6; }
39281if ${ac_cv_path_BUILD_CXX+:} false; then :
39282  $as_echo_n "(cached) " >&6
39283else
39284  case $BUILD_CXX in
39285  [\\/]* | ?:[\\/]*)
39286  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39287  ;;
39288  *)
39289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39290for as_dir in $PATH
39291do
39292  IFS=$as_save_IFS
39293  test -z "$as_dir" && as_dir=.
39294    for ac_exec_ext in '' $ac_executable_extensions; do
39295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39296    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39298    break 2
39299  fi
39300done
39301  done
39302IFS=$as_save_IFS
39303
39304  ;;
39305esac
39306fi
39307BUILD_CXX=$ac_cv_path_BUILD_CXX
39308if test -n "$BUILD_CXX"; then
39309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39310$as_echo "$BUILD_CXX" >&6; }
39311else
39312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39313$as_echo "no" >&6; }
39314fi
39315
39316
39317        if test "x$BUILD_CXX" = x; then
39318          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39319        fi
39320      else
39321        # Otherwise we believe it is a complete path. Use it as it is.
39322        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39323$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39324        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39325$as_echo_n "checking for BUILD_CXX... " >&6; }
39326        if test ! -x "$tool_specified"; then
39327          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39328$as_echo "not found" >&6; }
39329          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39330        fi
39331        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39332$as_echo "$tool_specified" >&6; }
39333      fi
39334    fi
39335  fi
39336
39337
39338
39339  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39340
39341  # First separate the path from the arguments. This will split at the first
39342  # space.
39343  complete="$BUILD_CXX"
39344  path="${complete%% *}"
39345  tmp="$complete EOL"
39346  arguments="${tmp#* }"
39347
39348  # Input might be given as Windows format, start by converting to
39349  # unix format.
39350  new_path=`$CYGPATH -u "$path"`
39351
39352  # Now try to locate executable using which
39353  new_path=`$WHICH "$new_path" 2> /dev/null`
39354  # bat and cmd files are not always considered executable in cygwin causing which
39355  # to not find them
39356  if test "x$new_path" = x \
39357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39359    new_path=`$CYGPATH -u "$path"`
39360  fi
39361  if test "x$new_path" = x; then
39362    # Oops. Which didn't find the executable.
39363    # The splitting of arguments from the executable at a space might have been incorrect,
39364    # since paths with space are more likely in Windows. Give it another try with the whole
39365    # argument.
39366    path="$complete"
39367    arguments="EOL"
39368    new_path=`$CYGPATH -u "$path"`
39369    new_path=`$WHICH "$new_path" 2> /dev/null`
39370    # bat and cmd files are not always considered executable in cygwin causing which
39371    # to not find them
39372    if test "x$new_path" = x \
39373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39375      new_path=`$CYGPATH -u "$path"`
39376    fi
39377    if test "x$new_path" = x; then
39378      # It's still not found. Now this is an unrecoverable error.
39379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39380$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39381      has_space=`$ECHO "$complete" | $GREP " "`
39382      if test "x$has_space" != x; then
39383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39385      fi
39386      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39387    fi
39388  fi
39389
39390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39393  # "foo.exe" is OK but "foo" is an error.
39394  #
39395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39396  # It is also a way to make sure we got the proper file name for the real test later on.
39397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39398  if test "x$test_shortpath" = x; then
39399    # Short path failed, file does not exist as specified.
39400    # Try adding .exe or .cmd
39401    if test -f "${new_path}.exe"; then
39402      input_to_shortpath="${new_path}.exe"
39403    elif test -f "${new_path}.cmd"; then
39404      input_to_shortpath="${new_path}.cmd"
39405    else
39406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39407$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39410      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39411    fi
39412  else
39413    input_to_shortpath="$new_path"
39414  fi
39415
39416  # Call helper function which possibly converts this using DOS-style short mode.
39417  # If so, the updated path is stored in $new_path.
39418  new_path="$input_to_shortpath"
39419
39420  input_path="$input_to_shortpath"
39421  # Check if we need to convert this using DOS-style short mode. If the path
39422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39423  # take no chances and rewrite it.
39424  # Note: m4 eats our [], so we need to use [ and ] instead.
39425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39426  if test "x$has_forbidden_chars" != x; then
39427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39431      # Going to short mode and back again did indeed matter. Since short mode is
39432      # case insensitive, let's make it lowercase to improve readability.
39433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39434      # Now convert it back to Unix-stile (cygpath)
39435      input_path=`$CYGPATH -u "$shortmode_path"`
39436      new_path="$input_path"
39437    fi
39438  fi
39439
39440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39441  if test "x$test_cygdrive_prefix" = x; then
39442    # As a simple fix, exclude /usr/bin since it's not a real path.
39443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39445      # a path prefixed by /cygdrive for fixpath to work.
39446      new_path="$CYGWIN_ROOT_PATH$input_path"
39447    fi
39448  fi
39449
39450  # remove trailing .exe if any
39451  new_path="${new_path/%.exe/}"
39452
39453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39454
39455  # First separate the path from the arguments. This will split at the first
39456  # space.
39457  complete="$BUILD_CXX"
39458  path="${complete%% *}"
39459  tmp="$complete EOL"
39460  arguments="${tmp#* }"
39461
39462  # Input might be given as Windows format, start by converting to
39463  # unix format.
39464  new_path="$path"
39465
39466  windows_path="$new_path"
39467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39468    unix_path=`$CYGPATH -u "$windows_path"`
39469    new_path="$unix_path"
39470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39472    new_path="$unix_path"
39473  fi
39474
39475
39476  # Now try to locate executable using which
39477  new_path=`$WHICH "$new_path" 2> /dev/null`
39478
39479  if test "x$new_path" = x; then
39480    # Oops. Which didn't find the executable.
39481    # The splitting of arguments from the executable at a space might have been incorrect,
39482    # since paths with space are more likely in Windows. Give it another try with the whole
39483    # argument.
39484    path="$complete"
39485    arguments="EOL"
39486    new_path="$path"
39487
39488  windows_path="$new_path"
39489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39490    unix_path=`$CYGPATH -u "$windows_path"`
39491    new_path="$unix_path"
39492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39494    new_path="$unix_path"
39495  fi
39496
39497
39498    new_path=`$WHICH "$new_path" 2> /dev/null`
39499
39500    if test "x$new_path" = x; then
39501      # It's still not found. Now this is an unrecoverable error.
39502      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39503$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39504      has_space=`$ECHO "$complete" | $GREP " "`
39505      if test "x$has_space" != x; then
39506        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39507$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39508      fi
39509      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39510    fi
39511  fi
39512
39513  # Now new_path has a complete unix path to the binary
39514  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39515    # Keep paths in /bin as-is, but remove trailing .exe if any
39516    new_path="${new_path/%.exe/}"
39517    # Do not save /bin paths to all_fixpath_prefixes!
39518  else
39519    # Not in mixed or Windows style, start by that.
39520    new_path=`cmd //c echo $new_path`
39521
39522  input_path="$new_path"
39523  # Check if we need to convert this using DOS-style short mode. If the path
39524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39525  # take no chances and rewrite it.
39526  # Note: m4 eats our [], so we need to use [ and ] instead.
39527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39528  if test "x$has_forbidden_chars" != x; then
39529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39531  fi
39532
39533    # Output is in $new_path
39534
39535  windows_path="$new_path"
39536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39537    unix_path=`$CYGPATH -u "$windows_path"`
39538    new_path="$unix_path"
39539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39541    new_path="$unix_path"
39542  fi
39543
39544    # remove trailing .exe if any
39545    new_path="${new_path/%.exe/}"
39546
39547    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39548    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39549  fi
39550
39551  else
39552    # We're on a posix platform. Hooray! :)
39553    # First separate the path from the arguments. This will split at the first
39554    # space.
39555    complete="$BUILD_CXX"
39556    path="${complete%% *}"
39557    tmp="$complete EOL"
39558    arguments="${tmp#* }"
39559
39560    # Cannot rely on the command "which" here since it doesn't always work.
39561    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39562    if test -z "$is_absolute_path"; then
39563      # Path to executable is not absolute. Find it.
39564      IFS_save="$IFS"
39565      IFS=:
39566      for p in $PATH; do
39567        if test -f "$p/$path" && test -x "$p/$path"; then
39568          new_path="$p/$path"
39569          break
39570        fi
39571      done
39572      IFS="$IFS_save"
39573    else
39574      # This is an absolute path, we can use it without further modifications.
39575      new_path="$path"
39576    fi
39577
39578    if test "x$new_path" = x; then
39579      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39580$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39581      has_space=`$ECHO "$complete" | $GREP " "`
39582      if test "x$has_space" != x; then
39583        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39584$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39585      fi
39586      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39587    fi
39588  fi
39589
39590  # Now join together the path and the arguments once again
39591  if test "x$arguments" != xEOL; then
39592    new_complete="$new_path ${arguments% *}"
39593  else
39594    new_complete="$new_path"
39595  fi
39596
39597  if test "x$complete" != "x$new_complete"; then
39598    BUILD_CXX="$new_complete"
39599    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39600$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39601  fi
39602
39603
39604
39605  # Publish this variable in the help.
39606
39607
39608  if test "x$BUILD_LD" = x; then
39609    # The variable is not set by user, try to locate tool using the code snippet
39610    for ac_prog in ld
39611do
39612  # Extract the first word of "$ac_prog", so it can be a program name with args.
39613set dummy $ac_prog; ac_word=$2
39614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39615$as_echo_n "checking for $ac_word... " >&6; }
39616if ${ac_cv_path_BUILD_LD+:} false; then :
39617  $as_echo_n "(cached) " >&6
39618else
39619  case $BUILD_LD in
39620  [\\/]* | ?:[\\/]*)
39621  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39622  ;;
39623  *)
39624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39625for as_dir in $PATH
39626do
39627  IFS=$as_save_IFS
39628  test -z "$as_dir" && as_dir=.
39629    for ac_exec_ext in '' $ac_executable_extensions; do
39630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39631    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39633    break 2
39634  fi
39635done
39636  done
39637IFS=$as_save_IFS
39638
39639  ;;
39640esac
39641fi
39642BUILD_LD=$ac_cv_path_BUILD_LD
39643if test -n "$BUILD_LD"; then
39644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39645$as_echo "$BUILD_LD" >&6; }
39646else
39647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39648$as_echo "no" >&6; }
39649fi
39650
39651
39652  test -n "$BUILD_LD" && break
39653done
39654
39655  else
39656    # The variable is set, but is it from the command line or the environment?
39657
39658    # Try to remove the string !BUILD_LD! from our list.
39659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39661      # If it failed, the variable was not from the command line. Ignore it,
39662      # but warn the user (except for BASH, which is always set by the calling BASH).
39663      if test "xBUILD_LD" != xBASH; then
39664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39665$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39666      fi
39667      # Try to locate tool using the code snippet
39668      for ac_prog in ld
39669do
39670  # Extract the first word of "$ac_prog", so it can be a program name with args.
39671set dummy $ac_prog; ac_word=$2
39672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39673$as_echo_n "checking for $ac_word... " >&6; }
39674if ${ac_cv_path_BUILD_LD+:} false; then :
39675  $as_echo_n "(cached) " >&6
39676else
39677  case $BUILD_LD in
39678  [\\/]* | ?:[\\/]*)
39679  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39680  ;;
39681  *)
39682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39683for as_dir in $PATH
39684do
39685  IFS=$as_save_IFS
39686  test -z "$as_dir" && as_dir=.
39687    for ac_exec_ext in '' $ac_executable_extensions; do
39688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39689    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39691    break 2
39692  fi
39693done
39694  done
39695IFS=$as_save_IFS
39696
39697  ;;
39698esac
39699fi
39700BUILD_LD=$ac_cv_path_BUILD_LD
39701if test -n "$BUILD_LD"; then
39702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39703$as_echo "$BUILD_LD" >&6; }
39704else
39705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39706$as_echo "no" >&6; }
39707fi
39708
39709
39710  test -n "$BUILD_LD" && break
39711done
39712
39713    else
39714      # If it succeeded, then it was overridden by the user. We will use it
39715      # for the tool.
39716
39717      # First remove it from the list of overridden variables, so we can test
39718      # for unknown variables in the end.
39719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39720
39721      # Check if the provided tool contains a complete path.
39722      tool_specified="$BUILD_LD"
39723      tool_basename="${tool_specified##*/}"
39724      if test "x$tool_basename" = "x$tool_specified"; then
39725        # A command without a complete path is provided, search $PATH.
39726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39727$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39728        # Extract the first word of "$tool_basename", so it can be a program name with args.
39729set dummy $tool_basename; ac_word=$2
39730{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39731$as_echo_n "checking for $ac_word... " >&6; }
39732if ${ac_cv_path_BUILD_LD+:} false; then :
39733  $as_echo_n "(cached) " >&6
39734else
39735  case $BUILD_LD in
39736  [\\/]* | ?:[\\/]*)
39737  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39738  ;;
39739  *)
39740  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39741for as_dir in $PATH
39742do
39743  IFS=$as_save_IFS
39744  test -z "$as_dir" && as_dir=.
39745    for ac_exec_ext in '' $ac_executable_extensions; do
39746  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39747    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39748    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39749    break 2
39750  fi
39751done
39752  done
39753IFS=$as_save_IFS
39754
39755  ;;
39756esac
39757fi
39758BUILD_LD=$ac_cv_path_BUILD_LD
39759if test -n "$BUILD_LD"; then
39760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39761$as_echo "$BUILD_LD" >&6; }
39762else
39763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39764$as_echo "no" >&6; }
39765fi
39766
39767
39768        if test "x$BUILD_LD" = x; then
39769          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39770        fi
39771      else
39772        # Otherwise we believe it is a complete path. Use it as it is.
39773        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39774$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39775        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39776$as_echo_n "checking for BUILD_LD... " >&6; }
39777        if test ! -x "$tool_specified"; then
39778          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39779$as_echo "not found" >&6; }
39780          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39781        fi
39782        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39783$as_echo "$tool_specified" >&6; }
39784      fi
39785    fi
39786  fi
39787
39788
39789
39790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39791
39792  # First separate the path from the arguments. This will split at the first
39793  # space.
39794  complete="$BUILD_LD"
39795  path="${complete%% *}"
39796  tmp="$complete EOL"
39797  arguments="${tmp#* }"
39798
39799  # Input might be given as Windows format, start by converting to
39800  # unix format.
39801  new_path=`$CYGPATH -u "$path"`
39802
39803  # Now try to locate executable using which
39804  new_path=`$WHICH "$new_path" 2> /dev/null`
39805  # bat and cmd files are not always considered executable in cygwin causing which
39806  # to not find them
39807  if test "x$new_path" = x \
39808      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39809      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39810    new_path=`$CYGPATH -u "$path"`
39811  fi
39812  if test "x$new_path" = x; then
39813    # Oops. Which didn't find the executable.
39814    # The splitting of arguments from the executable at a space might have been incorrect,
39815    # since paths with space are more likely in Windows. Give it another try with the whole
39816    # argument.
39817    path="$complete"
39818    arguments="EOL"
39819    new_path=`$CYGPATH -u "$path"`
39820    new_path=`$WHICH "$new_path" 2> /dev/null`
39821    # bat and cmd files are not always considered executable in cygwin causing which
39822    # to not find them
39823    if test "x$new_path" = x \
39824        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39825        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39826      new_path=`$CYGPATH -u "$path"`
39827    fi
39828    if test "x$new_path" = x; then
39829      # It's still not found. Now this is an unrecoverable error.
39830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39831$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39832      has_space=`$ECHO "$complete" | $GREP " "`
39833      if test "x$has_space" != x; then
39834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39836      fi
39837      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39838    fi
39839  fi
39840
39841  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39842  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39843  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39844  # "foo.exe" is OK but "foo" is an error.
39845  #
39846  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39847  # It is also a way to make sure we got the proper file name for the real test later on.
39848  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39849  if test "x$test_shortpath" = x; then
39850    # Short path failed, file does not exist as specified.
39851    # Try adding .exe or .cmd
39852    if test -f "${new_path}.exe"; then
39853      input_to_shortpath="${new_path}.exe"
39854    elif test -f "${new_path}.cmd"; then
39855      input_to_shortpath="${new_path}.cmd"
39856    else
39857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39858$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39859      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39860$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39861      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39862    fi
39863  else
39864    input_to_shortpath="$new_path"
39865  fi
39866
39867  # Call helper function which possibly converts this using DOS-style short mode.
39868  # If so, the updated path is stored in $new_path.
39869  new_path="$input_to_shortpath"
39870
39871  input_path="$input_to_shortpath"
39872  # Check if we need to convert this using DOS-style short mode. If the path
39873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39874  # take no chances and rewrite it.
39875  # Note: m4 eats our [], so we need to use [ and ] instead.
39876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39877  if test "x$has_forbidden_chars" != x; then
39878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39882      # Going to short mode and back again did indeed matter. Since short mode is
39883      # case insensitive, let's make it lowercase to improve readability.
39884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39885      # Now convert it back to Unix-stile (cygpath)
39886      input_path=`$CYGPATH -u "$shortmode_path"`
39887      new_path="$input_path"
39888    fi
39889  fi
39890
39891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39892  if test "x$test_cygdrive_prefix" = x; then
39893    # As a simple fix, exclude /usr/bin since it's not a real path.
39894    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39896      # a path prefixed by /cygdrive for fixpath to work.
39897      new_path="$CYGWIN_ROOT_PATH$input_path"
39898    fi
39899  fi
39900
39901  # remove trailing .exe if any
39902  new_path="${new_path/%.exe/}"
39903
39904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39905
39906  # First separate the path from the arguments. This will split at the first
39907  # space.
39908  complete="$BUILD_LD"
39909  path="${complete%% *}"
39910  tmp="$complete EOL"
39911  arguments="${tmp#* }"
39912
39913  # Input might be given as Windows format, start by converting to
39914  # unix format.
39915  new_path="$path"
39916
39917  windows_path="$new_path"
39918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39919    unix_path=`$CYGPATH -u "$windows_path"`
39920    new_path="$unix_path"
39921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39922    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39923    new_path="$unix_path"
39924  fi
39925
39926
39927  # Now try to locate executable using which
39928  new_path=`$WHICH "$new_path" 2> /dev/null`
39929
39930  if test "x$new_path" = x; then
39931    # Oops. Which didn't find the executable.
39932    # The splitting of arguments from the executable at a space might have been incorrect,
39933    # since paths with space are more likely in Windows. Give it another try with the whole
39934    # argument.
39935    path="$complete"
39936    arguments="EOL"
39937    new_path="$path"
39938
39939  windows_path="$new_path"
39940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39941    unix_path=`$CYGPATH -u "$windows_path"`
39942    new_path="$unix_path"
39943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39945    new_path="$unix_path"
39946  fi
39947
39948
39949    new_path=`$WHICH "$new_path" 2> /dev/null`
39950
39951    if test "x$new_path" = x; then
39952      # It's still not found. Now this is an unrecoverable error.
39953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39954$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39955      has_space=`$ECHO "$complete" | $GREP " "`
39956      if test "x$has_space" != x; then
39957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39959      fi
39960      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39961    fi
39962  fi
39963
39964  # Now new_path has a complete unix path to the binary
39965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39966    # Keep paths in /bin as-is, but remove trailing .exe if any
39967    new_path="${new_path/%.exe/}"
39968    # Do not save /bin paths to all_fixpath_prefixes!
39969  else
39970    # Not in mixed or Windows style, start by that.
39971    new_path=`cmd //c echo $new_path`
39972
39973  input_path="$new_path"
39974  # Check if we need to convert this using DOS-style short mode. If the path
39975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39976  # take no chances and rewrite it.
39977  # Note: m4 eats our [], so we need to use [ and ] instead.
39978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39979  if test "x$has_forbidden_chars" != x; then
39980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39982  fi
39983
39984    # Output is in $new_path
39985
39986  windows_path="$new_path"
39987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39988    unix_path=`$CYGPATH -u "$windows_path"`
39989    new_path="$unix_path"
39990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39992    new_path="$unix_path"
39993  fi
39994
39995    # remove trailing .exe if any
39996    new_path="${new_path/%.exe/}"
39997
39998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40000  fi
40001
40002  else
40003    # We're on a posix platform. Hooray! :)
40004    # First separate the path from the arguments. This will split at the first
40005    # space.
40006    complete="$BUILD_LD"
40007    path="${complete%% *}"
40008    tmp="$complete EOL"
40009    arguments="${tmp#* }"
40010
40011    # Cannot rely on the command "which" here since it doesn't always work.
40012    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40013    if test -z "$is_absolute_path"; then
40014      # Path to executable is not absolute. Find it.
40015      IFS_save="$IFS"
40016      IFS=:
40017      for p in $PATH; do
40018        if test -f "$p/$path" && test -x "$p/$path"; then
40019          new_path="$p/$path"
40020          break
40021        fi
40022      done
40023      IFS="$IFS_save"
40024    else
40025      # This is an absolute path, we can use it without further modifications.
40026      new_path="$path"
40027    fi
40028
40029    if test "x$new_path" = x; then
40030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40031$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40032      has_space=`$ECHO "$complete" | $GREP " "`
40033      if test "x$has_space" != x; then
40034        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40036      fi
40037      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40038    fi
40039  fi
40040
40041  # Now join together the path and the arguments once again
40042  if test "x$arguments" != xEOL; then
40043    new_complete="$new_path ${arguments% *}"
40044  else
40045    new_complete="$new_path"
40046  fi
40047
40048  if test "x$complete" != "x$new_complete"; then
40049    BUILD_LD="$new_complete"
40050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40051$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40052  fi
40053
40054  else
40055    # If we are not cross compiling, use the normal target compilers for
40056    # building the build platform executables.
40057    BUILD_CC="$CC"
40058    BUILD_CXX="$CXX"
40059    BUILD_LD="$LD"
40060  fi
40061
40062
40063
40064
40065
40066
40067  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40068    # For hotspot, we need these in Windows mixed path,
40069    # so rewrite them all. Need added .exe suffix.
40070    HOTSPOT_CXX="$CXX.exe"
40071    HOTSPOT_LD="$LD.exe"
40072    HOTSPOT_MT="$MT.exe"
40073    HOTSPOT_RC="$RC.exe"
40074
40075  unix_path="$HOTSPOT_CXX"
40076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40077    windows_path=`$CYGPATH -m "$unix_path"`
40078    HOTSPOT_CXX="$windows_path"
40079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40080    windows_path=`cmd //c echo $unix_path`
40081    HOTSPOT_CXX="$windows_path"
40082  fi
40083
40084
40085  unix_path="$HOTSPOT_LD"
40086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40087    windows_path=`$CYGPATH -m "$unix_path"`
40088    HOTSPOT_LD="$windows_path"
40089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40090    windows_path=`cmd //c echo $unix_path`
40091    HOTSPOT_LD="$windows_path"
40092  fi
40093
40094
40095  unix_path="$HOTSPOT_MT"
40096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40097    windows_path=`$CYGPATH -m "$unix_path"`
40098    HOTSPOT_MT="$windows_path"
40099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40100    windows_path=`cmd //c echo $unix_path`
40101    HOTSPOT_MT="$windows_path"
40102  fi
40103
40104
40105  unix_path="$HOTSPOT_RC"
40106  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40107    windows_path=`$CYGPATH -m "$unix_path"`
40108    HOTSPOT_RC="$windows_path"
40109  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40110    windows_path=`cmd //c echo $unix_path`
40111    HOTSPOT_RC="$windows_path"
40112  fi
40113
40114
40115
40116  else
40117    HOTSPOT_CXX="$CXX"
40118    HOTSPOT_LD="$LD"
40119  fi
40120
40121
40122
40123  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40124    USE_CLANG=true
40125  fi
40126
40127
40128  # LDEXE is the linker to use, when creating executables. Not really used.
40129  # FIXME: These should just be removed!
40130  LDEXE="$LD"
40131  LDEXECXX="$LDCXX"
40132
40133
40134
40135
40136  # The package path is used only on macosx?
40137  # FIXME: clean this up, and/or move it elsewhere.
40138  PACKAGE_PATH=/opt/local
40139
40140
40141  # Check for extra potential brokenness.
40142  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40143    # On Windows, double-check that we got the right compiler.
40144    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40145    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40146    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40147      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40148        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40149      fi
40150    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40151      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40152        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40153      fi
40154    fi
40155  fi
40156
40157  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40158    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40159    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40160    # This is later checked when setting flags.
40161  fi
40162
40163  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40164  # in executable.'
40165  USING_BROKEN_SUSE_LD=no
40166  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40167    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40168$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40169    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40170    echo "int main() { }" > main.c
40171    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40173$as_echo "no" >&6; }
40174      USING_BROKEN_SUSE_LD=no
40175    else
40176      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40177$as_echo "yes" >&6; }
40178      USING_BROKEN_SUSE_LD=yes
40179    fi
40180    rm -rf version-script.map main.c a.out
40181  fi
40182
40183
40184
40185# Setup the JTReg Regression Test Harness.
40186
40187
40188# Check whether --with-jtreg was given.
40189if test "${with_jtreg+set}" = set; then :
40190  withval=$with_jtreg;
40191else
40192  with_jtreg=no
40193fi
40194
40195
40196  if test "x$with_jtreg" = xno; then
40197    # jtreg disabled
40198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40199$as_echo_n "checking for jtreg... " >&6; }
40200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40201$as_echo "no" >&6; }
40202  else
40203    if test "x$with_jtreg" != xyes; then
40204      # with path specified.
40205      JT_HOME="$with_jtreg"
40206    fi
40207
40208    if test "x$JT_HOME" != x; then
40209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40210$as_echo_n "checking for jtreg... " >&6; }
40211
40212      # use JT_HOME enviroment var.
40213
40214  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40215
40216  # Input might be given as Windows format, start by converting to
40217  # unix format.
40218  path="$JT_HOME"
40219  new_path=`$CYGPATH -u "$path"`
40220
40221  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40222  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40223  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40224  # "foo.exe" is OK but "foo" is an error.
40225  #
40226  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40227  # It is also a way to make sure we got the proper file name for the real test later on.
40228  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40229  if test "x$test_shortpath" = x; then
40230    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40231$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40232    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40233  fi
40234
40235  # Call helper function which possibly converts this using DOS-style short mode.
40236  # If so, the updated path is stored in $new_path.
40237
40238  input_path="$new_path"
40239  # Check if we need to convert this using DOS-style short mode. If the path
40240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40241  # take no chances and rewrite it.
40242  # Note: m4 eats our [], so we need to use [ and ] instead.
40243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40244  if test "x$has_forbidden_chars" != x; then
40245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40249      # Going to short mode and back again did indeed matter. Since short mode is
40250      # case insensitive, let's make it lowercase to improve readability.
40251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40252      # Now convert it back to Unix-stile (cygpath)
40253      input_path=`$CYGPATH -u "$shortmode_path"`
40254      new_path="$input_path"
40255    fi
40256  fi
40257
40258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40259  if test "x$test_cygdrive_prefix" = x; then
40260    # As a simple fix, exclude /usr/bin since it's not a real path.
40261    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40263      # a path prefixed by /cygdrive for fixpath to work.
40264      new_path="$CYGWIN_ROOT_PATH$input_path"
40265    fi
40266  fi
40267
40268
40269  if test "x$path" != "x$new_path"; then
40270    JT_HOME="$new_path"
40271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40272$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40273  fi
40274
40275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40276
40277  path="$JT_HOME"
40278  has_colon=`$ECHO $path | $GREP ^.:`
40279  new_path="$path"
40280  if test "x$has_colon" = x; then
40281    # Not in mixed or Windows style, start by that.
40282    new_path=`cmd //c echo $path`
40283  fi
40284
40285
40286  input_path="$new_path"
40287  # Check if we need to convert this using DOS-style short mode. If the path
40288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40289  # take no chances and rewrite it.
40290  # Note: m4 eats our [], so we need to use [ and ] instead.
40291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40292  if test "x$has_forbidden_chars" != x; then
40293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40294    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40295  fi
40296
40297
40298  windows_path="$new_path"
40299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40300    unix_path=`$CYGPATH -u "$windows_path"`
40301    new_path="$unix_path"
40302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40304    new_path="$unix_path"
40305  fi
40306
40307  if test "x$path" != "x$new_path"; then
40308    JT_HOME="$new_path"
40309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40310$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40311  fi
40312
40313  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40314  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40315
40316  else
40317    # We're on a posix platform. Hooray! :)
40318    path="$JT_HOME"
40319    has_space=`$ECHO "$path" | $GREP " "`
40320    if test "x$has_space" != x; then
40321      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40322$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40323      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40324    fi
40325
40326    # Use eval to expand a potential ~
40327    eval path="$path"
40328    if test ! -f "$path" && test ! -d "$path"; then
40329      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40330    fi
40331
40332    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40333  fi
40334
40335
40336      # jtreg win32 script works for everybody
40337      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40338
40339      if test ! -f "$JTREGEXE"; then
40340        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40341      fi
40342
40343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40344$as_echo "$JTREGEXE" >&6; }
40345    else
40346      # try to find jtreg on path
40347
40348
40349
40350  # Publish this variable in the help.
40351
40352
40353  if test "x$JTREGEXE" = x; then
40354    # The variable is not set by user, try to locate tool using the code snippet
40355    for ac_prog in jtreg
40356do
40357  # Extract the first word of "$ac_prog", so it can be a program name with args.
40358set dummy $ac_prog; ac_word=$2
40359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40360$as_echo_n "checking for $ac_word... " >&6; }
40361if ${ac_cv_path_JTREGEXE+:} false; then :
40362  $as_echo_n "(cached) " >&6
40363else
40364  case $JTREGEXE in
40365  [\\/]* | ?:[\\/]*)
40366  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40367  ;;
40368  *)
40369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40370for as_dir in $PATH
40371do
40372  IFS=$as_save_IFS
40373  test -z "$as_dir" && as_dir=.
40374    for ac_exec_ext in '' $ac_executable_extensions; do
40375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40376    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40378    break 2
40379  fi
40380done
40381  done
40382IFS=$as_save_IFS
40383
40384  ;;
40385esac
40386fi
40387JTREGEXE=$ac_cv_path_JTREGEXE
40388if test -n "$JTREGEXE"; then
40389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40390$as_echo "$JTREGEXE" >&6; }
40391else
40392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40393$as_echo "no" >&6; }
40394fi
40395
40396
40397  test -n "$JTREGEXE" && break
40398done
40399
40400  else
40401    # The variable is set, but is it from the command line or the environment?
40402
40403    # Try to remove the string !JTREGEXE! from our list.
40404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40406      # If it failed, the variable was not from the command line. Ignore it,
40407      # but warn the user (except for BASH, which is always set by the calling BASH).
40408      if test "xJTREGEXE" != xBASH; then
40409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40410$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40411      fi
40412      # Try to locate tool using the code snippet
40413      for ac_prog in jtreg
40414do
40415  # Extract the first word of "$ac_prog", so it can be a program name with args.
40416set dummy $ac_prog; ac_word=$2
40417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40418$as_echo_n "checking for $ac_word... " >&6; }
40419if ${ac_cv_path_JTREGEXE+:} false; then :
40420  $as_echo_n "(cached) " >&6
40421else
40422  case $JTREGEXE in
40423  [\\/]* | ?:[\\/]*)
40424  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40425  ;;
40426  *)
40427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40428for as_dir in $PATH
40429do
40430  IFS=$as_save_IFS
40431  test -z "$as_dir" && as_dir=.
40432    for ac_exec_ext in '' $ac_executable_extensions; do
40433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40434    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40436    break 2
40437  fi
40438done
40439  done
40440IFS=$as_save_IFS
40441
40442  ;;
40443esac
40444fi
40445JTREGEXE=$ac_cv_path_JTREGEXE
40446if test -n "$JTREGEXE"; then
40447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40448$as_echo "$JTREGEXE" >&6; }
40449else
40450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40451$as_echo "no" >&6; }
40452fi
40453
40454
40455  test -n "$JTREGEXE" && break
40456done
40457
40458    else
40459      # If it succeeded, then it was overridden by the user. We will use it
40460      # for the tool.
40461
40462      # First remove it from the list of overridden variables, so we can test
40463      # for unknown variables in the end.
40464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40465
40466      # Check if the provided tool contains a complete path.
40467      tool_specified="$JTREGEXE"
40468      tool_basename="${tool_specified##*/}"
40469      if test "x$tool_basename" = "x$tool_specified"; then
40470        # A command without a complete path is provided, search $PATH.
40471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40472$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40473        # Extract the first word of "$tool_basename", so it can be a program name with args.
40474set dummy $tool_basename; ac_word=$2
40475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40476$as_echo_n "checking for $ac_word... " >&6; }
40477if ${ac_cv_path_JTREGEXE+:} false; then :
40478  $as_echo_n "(cached) " >&6
40479else
40480  case $JTREGEXE in
40481  [\\/]* | ?:[\\/]*)
40482  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40483  ;;
40484  *)
40485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40486for as_dir in $PATH
40487do
40488  IFS=$as_save_IFS
40489  test -z "$as_dir" && as_dir=.
40490    for ac_exec_ext in '' $ac_executable_extensions; do
40491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40492    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40494    break 2
40495  fi
40496done
40497  done
40498IFS=$as_save_IFS
40499
40500  ;;
40501esac
40502fi
40503JTREGEXE=$ac_cv_path_JTREGEXE
40504if test -n "$JTREGEXE"; then
40505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40506$as_echo "$JTREGEXE" >&6; }
40507else
40508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40509$as_echo "no" >&6; }
40510fi
40511
40512
40513        if test "x$JTREGEXE" = x; then
40514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40515        fi
40516      else
40517        # Otherwise we believe it is a complete path. Use it as it is.
40518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40519$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40521$as_echo_n "checking for JTREGEXE... " >&6; }
40522        if test ! -x "$tool_specified"; then
40523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40524$as_echo "not found" >&6; }
40525          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40526        fi
40527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40528$as_echo "$tool_specified" >&6; }
40529      fi
40530    fi
40531  fi
40532
40533
40534
40535  if test "x$JTREGEXE" = x; then
40536    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40537  fi
40538
40539
40540      JT_HOME="`$DIRNAME $JTREGEXE`"
40541    fi
40542  fi
40543
40544
40545
40546
40547
40548
40549  # Option used to tell the compiler whether to create 32- or 64-bit executables
40550  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40551    COMPILER_TARGET_BITS_FLAG="-q"
40552  else
40553    COMPILER_TARGET_BITS_FLAG="-m"
40554  fi
40555
40556
40557  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40558  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40559    ARFLAGS="-r"
40560  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40561    ARFLAGS="-X64"
40562  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40563    # lib.exe is used as AR to create static libraries.
40564    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40565  else
40566    ARFLAGS=""
40567  fi
40568
40569
40570  ## Setup strip.
40571  # FIXME: should this really be per platform, or should it be per toolchain type?
40572  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40573  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40574  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40575    STRIPFLAGS="-g"
40576  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40577    STRIPFLAGS="-x"
40578  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40579    STRIPFLAGS="-S"
40580  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40581    STRIPFLAGS="-X32_64"
40582  fi
40583
40584  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40585    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40586  fi
40587
40588
40589  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40590    # FIXME: break out into MCSFLAGS
40591    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40592  fi
40593
40594
40595  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40596    CC_OUT_OPTION=-Fo
40597    EXE_OUT_OPTION=-out:
40598    LD_OUT_OPTION=-out:
40599    AR_OUT_OPTION=-out:
40600  else
40601    # The option used to specify the target .o,.a or .so file.
40602    # When compiling, how to specify the to be created object file.
40603    CC_OUT_OPTION='-o$(SPACE)'
40604    # When linking, how to specify the to be created executable.
40605    EXE_OUT_OPTION='-o$(SPACE)'
40606    # When linking, how to specify the to be created dynamically linkable library.
40607    LD_OUT_OPTION='-o$(SPACE)'
40608    # When archiving, how to specify the to be create static archive for object files.
40609    AR_OUT_OPTION='rcs$(SPACE)'
40610  fi
40611
40612
40613
40614
40615
40616  # On Windows, we need to set RC flags.
40617  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40618    RC_FLAGS="-nologo -l 0x409 -r"
40619    if test "x$VARIANT" = xOPT; then
40620      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40621    fi
40622
40623    # The version variables used to create RC_FLAGS may be overridden
40624    # in a custom configure script, or possibly the command line.
40625    # Let those variables be expanded at make time in spec.gmk.
40626    # The \$ are escaped to the shell, and the $(...) variables
40627    # are evaluated by make.
40628    RC_FLAGS="$RC_FLAGS \
40629        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40630        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40631        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40632        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40633        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40634        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40635        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40636  fi
40637
40638
40639  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40640    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40641    CCXXFLAGS="$CCXXFLAGS -nologo"
40642  fi
40643
40644
40645# FIXME: Currently we must test this after toolchain but before flags. Fix!
40646
40647# Now we can test some aspects on the target using configure macros.
40648
40649
40650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40651$as_echo_n "checking for ANSI C header files... " >&6; }
40652if ${ac_cv_header_stdc+:} false; then :
40653  $as_echo_n "(cached) " >&6
40654else
40655  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40656/* end confdefs.h.  */
40657#include <stdlib.h>
40658#include <stdarg.h>
40659#include <string.h>
40660#include <float.h>
40661
40662int
40663main ()
40664{
40665
40666  ;
40667  return 0;
40668}
40669_ACEOF
40670if ac_fn_cxx_try_compile "$LINENO"; then :
40671  ac_cv_header_stdc=yes
40672else
40673  ac_cv_header_stdc=no
40674fi
40675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40676
40677if test $ac_cv_header_stdc = yes; then
40678  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40679  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40680/* end confdefs.h.  */
40681#include <string.h>
40682
40683_ACEOF
40684if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40685  $EGREP "memchr" >/dev/null 2>&1; then :
40686
40687else
40688  ac_cv_header_stdc=no
40689fi
40690rm -f conftest*
40691
40692fi
40693
40694if test $ac_cv_header_stdc = yes; then
40695  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40697/* end confdefs.h.  */
40698#include <stdlib.h>
40699
40700_ACEOF
40701if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40702  $EGREP "free" >/dev/null 2>&1; then :
40703
40704else
40705  ac_cv_header_stdc=no
40706fi
40707rm -f conftest*
40708
40709fi
40710
40711if test $ac_cv_header_stdc = yes; then
40712  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40713  if test "$cross_compiling" = yes; then :
40714  :
40715else
40716  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40717/* end confdefs.h.  */
40718#include <ctype.h>
40719#include <stdlib.h>
40720#if ((' ' & 0x0FF) == 0x020)
40721# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40722# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40723#else
40724# define ISLOWER(c) \
40725		   (('a' <= (c) && (c) <= 'i') \
40726		     || ('j' <= (c) && (c) <= 'r') \
40727		     || ('s' <= (c) && (c) <= 'z'))
40728# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40729#endif
40730
40731#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40732int
40733main ()
40734{
40735  int i;
40736  for (i = 0; i < 256; i++)
40737    if (XOR (islower (i), ISLOWER (i))
40738	|| toupper (i) != TOUPPER (i))
40739      return 2;
40740  return 0;
40741}
40742_ACEOF
40743if ac_fn_cxx_try_run "$LINENO"; then :
40744
40745else
40746  ac_cv_header_stdc=no
40747fi
40748rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40749  conftest.$ac_objext conftest.beam conftest.$ac_ext
40750fi
40751
40752fi
40753fi
40754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40755$as_echo "$ac_cv_header_stdc" >&6; }
40756if test $ac_cv_header_stdc = yes; then
40757
40758$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40759
40760fi
40761
40762# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40763for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40764		  inttypes.h stdint.h unistd.h
40765do :
40766  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40767ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40768"
40769if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40770  cat >>confdefs.h <<_ACEOF
40771#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40772_ACEOF
40773
40774fi
40775
40776done
40777
40778
40779
40780  ###############################################################################
40781  #
40782  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40783  # (The JVM can use 32 or 64 bit Java pointers but that decision
40784  # is made at runtime.)
40785  #
40786
40787  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40788    # Always specify -m flag on Solaris
40789    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40790
40791  # When we add flags to the "official" CFLAGS etc, we need to
40792  # keep track of these additions in ADDED_CFLAGS etc. These
40793  # will later be checked to make sure only controlled additions
40794  # have been made to CFLAGS etc.
40795  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40796  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40797  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40798
40799  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40800  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40801  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40802
40803  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40804  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40805  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40806
40807  elif test "x$COMPILE_TYPE" = xreduced; then
40808    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40809      # Specify -m if running reduced on other Posix platforms
40810
40811  # When we add flags to the "official" CFLAGS etc, we need to
40812  # keep track of these additions in ADDED_CFLAGS etc. These
40813  # will later be checked to make sure only controlled additions
40814  # have been made to CFLAGS etc.
40815  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40816  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40817  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40818
40819  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40820  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40821  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40822
40823  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40824  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40825  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40826
40827    fi
40828  fi
40829
40830  # Make compilation sanity check
40831  for ac_header in stdio.h
40832do :
40833  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40834if test "x$ac_cv_header_stdio_h" = xyes; then :
40835  cat >>confdefs.h <<_ACEOF
40836#define HAVE_STDIO_H 1
40837_ACEOF
40838
40839else
40840
40841    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40842$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40843    if test "x$COMPILE_TYPE" = xreduced; then
40844      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40845$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40846    elif test "x$COMPILE_TYPE" = xcross; then
40847      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40848$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40849    fi
40850    as_fn_error $? "Cannot continue." "$LINENO" 5
40851
40852fi
40853
40854done
40855
40856
40857  # The cast to long int works around a bug in the HP C Compiler
40858# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40859# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40860# This bug is HP SR number 8606223364.
40861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40862$as_echo_n "checking size of int *... " >&6; }
40863if ${ac_cv_sizeof_int_p+:} false; then :
40864  $as_echo_n "(cached) " >&6
40865else
40866  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40867
40868else
40869  if test "$ac_cv_type_int_p" = yes; then
40870     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40871$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40872as_fn_error 77 "cannot compute sizeof (int *)
40873See \`config.log' for more details" "$LINENO" 5; }
40874   else
40875     ac_cv_sizeof_int_p=0
40876   fi
40877fi
40878
40879fi
40880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40881$as_echo "$ac_cv_sizeof_int_p" >&6; }
40882
40883
40884
40885cat >>confdefs.h <<_ACEOF
40886#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40887_ACEOF
40888
40889
40890
40891  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40892  if test "x$ac_cv_sizeof_int_p" = x; then
40893    # The test failed, lets stick to the assumed value.
40894    { $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
40895$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40896  else
40897    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40898
40899    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40900      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40901      # Let's try to implicitely set the compilers target architecture and retry the test
40902      { $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
40903$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;}
40904      { $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
40905$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;}
40906
40907  # When we add flags to the "official" CFLAGS etc, we need to
40908  # keep track of these additions in ADDED_CFLAGS etc. These
40909  # will later be checked to make sure only controlled additions
40910  # have been made to CFLAGS etc.
40911  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40912  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40913  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40914
40915  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40916  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40917  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40918
40919  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40920  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40921  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40922
40923
40924      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40925      unset ac_cv_sizeof_int_p
40926      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40927      cat >>confdefs.h <<_ACEOF
40928#undef SIZEOF_INT_P
40929_ACEOF
40930
40931      # The cast to long int works around a bug in the HP C Compiler
40932# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40933# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40934# This bug is HP SR number 8606223364.
40935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40936$as_echo_n "checking size of int *... " >&6; }
40937if ${ac_cv_sizeof_int_p+:} false; then :
40938  $as_echo_n "(cached) " >&6
40939else
40940  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40941
40942else
40943  if test "$ac_cv_type_int_p" = yes; then
40944     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40946as_fn_error 77 "cannot compute sizeof (int *)
40947See \`config.log' for more details" "$LINENO" 5; }
40948   else
40949     ac_cv_sizeof_int_p=0
40950   fi
40951fi
40952
40953fi
40954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40955$as_echo "$ac_cv_sizeof_int_p" >&6; }
40956
40957
40958
40959cat >>confdefs.h <<_ACEOF
40960#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40961_ACEOF
40962
40963
40964
40965      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40966
40967      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40968        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
40969      fi
40970    fi
40971  fi
40972
40973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40974$as_echo_n "checking for target address size... " >&6; }
40975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40976$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40977
40978
40979  ###############################################################################
40980  #
40981  # Is the target little of big endian?
40982  #
40983   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40984$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40985if ${ac_cv_c_bigendian+:} false; then :
40986  $as_echo_n "(cached) " >&6
40987else
40988  ac_cv_c_bigendian=unknown
40989    # See if we're dealing with a universal compiler.
40990    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40991/* end confdefs.h.  */
40992#ifndef __APPLE_CC__
40993	       not a universal capable compiler
40994	     #endif
40995	     typedef int dummy;
40996
40997_ACEOF
40998if ac_fn_cxx_try_compile "$LINENO"; then :
40999
41000	# Check for potential -arch flags.  It is not universal unless
41001	# there are at least two -arch flags with different values.
41002	ac_arch=
41003	ac_prev=
41004	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41005	 if test -n "$ac_prev"; then
41006	   case $ac_word in
41007	     i?86 | x86_64 | ppc | ppc64)
41008	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41009		 ac_arch=$ac_word
41010	       else
41011		 ac_cv_c_bigendian=universal
41012		 break
41013	       fi
41014	       ;;
41015	   esac
41016	   ac_prev=
41017	 elif test "x$ac_word" = "x-arch"; then
41018	   ac_prev=arch
41019	 fi
41020       done
41021fi
41022rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41023    if test $ac_cv_c_bigendian = unknown; then
41024      # See if sys/param.h defines the BYTE_ORDER macro.
41025      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41026/* end confdefs.h.  */
41027#include <sys/types.h>
41028	     #include <sys/param.h>
41029
41030int
41031main ()
41032{
41033#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41034		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41035		     && LITTLE_ENDIAN)
41036	      bogus endian macros
41037	     #endif
41038
41039  ;
41040  return 0;
41041}
41042_ACEOF
41043if ac_fn_cxx_try_compile "$LINENO"; then :
41044  # It does; now see whether it defined to BIG_ENDIAN or not.
41045	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41046/* end confdefs.h.  */
41047#include <sys/types.h>
41048		#include <sys/param.h>
41049
41050int
41051main ()
41052{
41053#if BYTE_ORDER != BIG_ENDIAN
41054		 not big endian
41055		#endif
41056
41057  ;
41058  return 0;
41059}
41060_ACEOF
41061if ac_fn_cxx_try_compile "$LINENO"; then :
41062  ac_cv_c_bigendian=yes
41063else
41064  ac_cv_c_bigendian=no
41065fi
41066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41067fi
41068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41069    fi
41070    if test $ac_cv_c_bigendian = unknown; then
41071      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41072      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41073/* end confdefs.h.  */
41074#include <limits.h>
41075
41076int
41077main ()
41078{
41079#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41080	      bogus endian macros
41081	     #endif
41082
41083  ;
41084  return 0;
41085}
41086_ACEOF
41087if ac_fn_cxx_try_compile "$LINENO"; then :
41088  # It does; now see whether it defined to _BIG_ENDIAN or not.
41089	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41090/* end confdefs.h.  */
41091#include <limits.h>
41092
41093int
41094main ()
41095{
41096#ifndef _BIG_ENDIAN
41097		 not big endian
41098		#endif
41099
41100  ;
41101  return 0;
41102}
41103_ACEOF
41104if ac_fn_cxx_try_compile "$LINENO"; then :
41105  ac_cv_c_bigendian=yes
41106else
41107  ac_cv_c_bigendian=no
41108fi
41109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41110fi
41111rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41112    fi
41113    if test $ac_cv_c_bigendian = unknown; then
41114      # Compile a test program.
41115      if test "$cross_compiling" = yes; then :
41116  # Try to guess by grepping values from an object file.
41117	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41118/* end confdefs.h.  */
41119short int ascii_mm[] =
41120		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41121		short int ascii_ii[] =
41122		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41123		int use_ascii (int i) {
41124		  return ascii_mm[i] + ascii_ii[i];
41125		}
41126		short int ebcdic_ii[] =
41127		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41128		short int ebcdic_mm[] =
41129		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41130		int use_ebcdic (int i) {
41131		  return ebcdic_mm[i] + ebcdic_ii[i];
41132		}
41133		extern int foo;
41134
41135int
41136main ()
41137{
41138return use_ascii (foo) == use_ebcdic (foo);
41139  ;
41140  return 0;
41141}
41142_ACEOF
41143if ac_fn_cxx_try_compile "$LINENO"; then :
41144  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41145	      ac_cv_c_bigendian=yes
41146	    fi
41147	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41148	      if test "$ac_cv_c_bigendian" = unknown; then
41149		ac_cv_c_bigendian=no
41150	      else
41151		# finding both strings is unlikely to happen, but who knows?
41152		ac_cv_c_bigendian=unknown
41153	      fi
41154	    fi
41155fi
41156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41157else
41158  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41159/* end confdefs.h.  */
41160$ac_includes_default
41161int
41162main ()
41163{
41164
41165	     /* Are we little or big endian?  From Harbison&Steele.  */
41166	     union
41167	     {
41168	       long int l;
41169	       char c[sizeof (long int)];
41170	     } u;
41171	     u.l = 1;
41172	     return u.c[sizeof (long int) - 1] == 1;
41173
41174  ;
41175  return 0;
41176}
41177_ACEOF
41178if ac_fn_cxx_try_run "$LINENO"; then :
41179  ac_cv_c_bigendian=no
41180else
41181  ac_cv_c_bigendian=yes
41182fi
41183rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41184  conftest.$ac_objext conftest.beam conftest.$ac_ext
41185fi
41186
41187    fi
41188fi
41189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41190$as_echo "$ac_cv_c_bigendian" >&6; }
41191 case $ac_cv_c_bigendian in #(
41192   yes)
41193     ENDIAN="big";; #(
41194   no)
41195     ENDIAN="little" ;; #(
41196   universal)
41197     ENDIAN="universal_endianness"
41198     ;; #(
41199   *)
41200     ENDIAN="unknown" ;;
41201 esac
41202
41203
41204  if test "x$ENDIAN" = xuniversal_endianness; then
41205    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41206  fi
41207  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41208    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
41209  fi
41210
41211
41212# Configure flags for the tools
41213
41214  ###############################################################################
41215  #
41216  # How to compile shared libraries.
41217  #
41218
41219  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41220    PICFLAG="-fPIC"
41221    C_FLAG_REORDER=''
41222    CXX_FLAG_REORDER=''
41223
41224    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41225      # Linking is different on MacOSX
41226      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41227      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41228      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41229      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41230      SET_SHARED_LIBRARY_MAPFILE=''
41231    else
41232      # Default works for linux, might work on other platforms as well.
41233      SHARED_LIBRARY_FLAGS='-shared'
41234      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41235      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41236      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41237      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41238    fi
41239  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41240    PICFLAG="-KPIC"
41241    C_FLAG_REORDER='-xF'
41242    CXX_FLAG_REORDER='-xF'
41243    SHARED_LIBRARY_FLAGS="-G"
41244    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41245    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41246    SET_SHARED_LIBRARY_NAME=''
41247    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41248  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41249    PICFLAG="-qpic=large"
41250    C_FLAG_REORDER=''
41251    CXX_FLAG_REORDER=''
41252    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41253    SET_EXECUTABLE_ORIGIN=""
41254    SET_SHARED_LIBRARY_ORIGIN=''
41255    SET_SHARED_LIBRARY_NAME=''
41256    SET_SHARED_LIBRARY_MAPFILE=''
41257  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41258    PICFLAG=""
41259    C_FLAG_REORDER=''
41260    CXX_FLAG_REORDER=''
41261    SHARED_LIBRARY_FLAGS="-LD"
41262    SET_EXECUTABLE_ORIGIN=''
41263    SET_SHARED_LIBRARY_ORIGIN=''
41264    SET_SHARED_LIBRARY_NAME=''
41265    SET_SHARED_LIBRARY_MAPFILE=''
41266  fi
41267
41268
41269
41270
41271
41272
41273
41274
41275
41276  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41277    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41278    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41279    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41280  fi
41281  # The (cross) compiler is now configured, we can now test capabilities
41282  # of the target platform.
41283
41284
41285
41286  ###############################################################################
41287  #
41288  # Setup the opt flags for different compilers
41289  # and different operating systems.
41290  #
41291
41292  # FIXME: this was indirectly the old default, but just inherited.
41293  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41294  #   C_FLAG_DEPS="-MMD -MF"
41295  # fi
41296
41297  # Generate make dependency files
41298  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41299    C_FLAG_DEPS="-MMD -MF"
41300  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41301    C_FLAG_DEPS="-xMMD -xMF"
41302  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41303    C_FLAG_DEPS="-qmakedep=gcc -MF"
41304  fi
41305  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41306
41307
41308
41309  # Debug symbols
41310  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41311    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41312      CFLAGS_DEBUG_SYMBOLS="-g1"
41313      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41314    else
41315      CFLAGS_DEBUG_SYMBOLS="-g"
41316      CXXFLAGS_DEBUG_SYMBOLS="-g"
41317    fi
41318  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41319    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41320    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41321  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41322    CFLAGS_DEBUG_SYMBOLS="-g"
41323    CXXFLAGS_DEBUG_SYMBOLS="-g"
41324  fi
41325
41326
41327
41328  # Optimization levels
41329  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41330    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41331
41332    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41333      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41334      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41335      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41336      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41337      C_O_FLAG_NONE="-xregs=no%frameptr"
41338      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41339      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41340      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41341      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41342      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41343        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41344        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41345      fi
41346    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41347      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41348      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41349      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41350      C_O_FLAG_NONE=""
41351      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41352      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41353      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41354      CXX_O_FLAG_NONE=""
41355    fi
41356  else
41357    # The remaining toolchains share opt flags between CC and CXX;
41358    # setup for C and duplicate afterwards.
41359    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41360      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41361        # On MacOSX we optimize for size, something
41362        # we should do for all platforms?
41363        C_O_FLAG_HIGHEST="-Os"
41364        C_O_FLAG_HI="-Os"
41365        C_O_FLAG_NORM="-Os"
41366        C_O_FLAG_NONE=""
41367      else
41368        C_O_FLAG_HIGHEST="-O3"
41369        C_O_FLAG_HI="-O3"
41370        C_O_FLAG_NORM="-O2"
41371        C_O_FLAG_NONE="-O0"
41372      fi
41373    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41374      C_O_FLAG_HIGHEST="-O3"
41375      C_O_FLAG_HI="-O3 -qstrict"
41376      C_O_FLAG_NORM="-O2"
41377      C_O_FLAG_NONE=""
41378    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41379      C_O_FLAG_HIGHEST="-O2"
41380      C_O_FLAG_HI="-O1"
41381      C_O_FLAG_NORM="-O1"
41382      C_O_FLAG_NONE="-Od"
41383    fi
41384    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41385    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41386    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41387    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41388  fi
41389
41390
41391
41392
41393
41394
41395
41396
41397
41398
41399
41400  # Special extras...
41401  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41402    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41403      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41404      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41405    fi
41406  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41407    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41408    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41409    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41410  fi
41411
41412  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41414$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41415  fi
41416
41417  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41418    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41419$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41420  fi
41421
41422  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41423    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41424$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41425  fi
41426
41427
41428# Check whether --with-extra-cflags was given.
41429if test "${with_extra_cflags+set}" = set; then :
41430  withval=$with_extra_cflags;
41431fi
41432
41433
41434
41435# Check whether --with-extra-cxxflags was given.
41436if test "${with_extra_cxxflags+set}" = set; then :
41437  withval=$with_extra_cxxflags;
41438fi
41439
41440
41441
41442# Check whether --with-extra-ldflags was given.
41443if test "${with_extra_ldflags+set}" = set; then :
41444  withval=$with_extra_ldflags;
41445fi
41446
41447
41448  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41449  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41450  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41451
41452  # Hotspot needs these set in their legacy form
41453  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41454  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41455  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41456
41457
41458
41459
41460
41461  ###############################################################################
41462  #
41463  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41464  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41465  #
41466
41467  # Setup compiler/platform specific flags to CFLAGS_JDK,
41468  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41469  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41470    # these options are used for both C and C++ compiles
41471    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41472        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41473    case $OPENJDK_TARGET_CPU_ARCH in
41474      arm )
41475        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41476        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41477        ;;
41478      ppc )
41479        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41480        ;;
41481      * )
41482        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41483        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41484        ;;
41485    esac
41486  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41487    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41488    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41489      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41490      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41491    fi
41492
41493    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41494    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41495  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41496    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41497    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41498  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41499    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41500    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41501    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41502    -DWIN32 -DIAL"
41503    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41504      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41505    else
41506      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41507    fi
41508  fi
41509
41510  ###############################################################################
41511
41512  # Adjust flags according to debug level.
41513  case $DEBUG_LEVEL in
41514    fastdebug )
41515      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41516      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41517      C_O_FLAG_HI="$C_O_FLAG_NORM"
41518      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41519      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41520      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41521      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41522      ;;
41523    slowdebug )
41524      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41525      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41526      C_O_FLAG_HI="$C_O_FLAG_NONE"
41527      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41528      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41529      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41530      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41531      ;;
41532  esac
41533
41534  # Setup LP64
41535  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41536
41537  # Set some common defines. These works for all compilers, but assume
41538  # -D is universally accepted.
41539
41540  # Setup endianness
41541  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41542    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41543    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41544    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41545    #   Note: -Dmacro         is the same as    #define macro 1
41546    #         -Dmacro=        is the same as    #define macro
41547    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41548      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41549    else
41550      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41551    fi
41552  else
41553    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41554  fi
41555
41556  # Setup target OS define. Use OS target name but in upper case.
41557  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41558  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41559
41560  # Setup target CPU
41561  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41562
41563  # Setup debug/release defines
41564  if test "x$DEBUG_LEVEL" = xrelease; then
41565    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41566    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41567      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41568    fi
41569  else
41570    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41571  fi
41572
41573  # Setup release name
41574  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41575
41576
41577  # Set some additional per-OS defines.
41578  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41579    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41580  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41581    # FIXME: PPC64 should not be here.
41582    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41583  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41584    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41585  fi
41586
41587  # Additional macosx handling
41588  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41589    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41590      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41591      # FIXME: clean this up, and/or move it elsewhere.
41592
41593      # Setting these parameters makes it an error to link to macosx APIs that are
41594      # newer than the given OS version and makes the linked binaries compatible
41595      # even if built on a newer version of the OS.
41596      # The expected format is X.Y.Z
41597      MACOSX_VERSION_MIN=10.7.0
41598
41599
41600      # The macro takes the version with no dots, ex: 1070
41601      # Let the flags variables get resolved in make for easier override on make
41602      # command line.
41603      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41604      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41605    fi
41606  fi
41607
41608  # Setup some hard coded includes
41609  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41610      -I${JDK_OUTPUTDIR}/include \
41611      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41612      -I${JDK_TOPDIR}/src/share/javavm/export \
41613      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41614      -I${JDK_TOPDIR}/src/share/native/common \
41615      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41616
41617  # The shared libraries are compiled using the picflag.
41618  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41619  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41620
41621  # Executable flags
41622  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41623  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41624
41625
41626
41627
41628
41629
41630  # Setup LDFLAGS et al.
41631  #
41632  # Now this is odd. The JDK native libraries have to link against libjvm.so
41633  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41634  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41635  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41636  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41637  # libraries will link to whatever is in memory. Yuck.
41638  #
41639  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41640  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41641    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41642    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41643      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41644    fi
41645    # TODO: make -debug optional "--disable-full-debug-symbols"
41646    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41647    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41648    LDFLAGS_JDKLIB_SUFFIX=""
41649    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41650      LDFLAGS_STACK_SIZE=1048576
41651    else
41652      LDFLAGS_STACK_SIZE=327680
41653    fi
41654    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41655  else
41656    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41657      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41658      # We have previously set HAS_GNU_HASH if this is the case
41659      if test -n "$HAS_GNU_HASH"; then
41660        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41661      fi
41662      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41663        # And since we now know that the linker is gnu, then add -z defs, to forbid
41664        # undefined symbols in object files.
41665        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41666        if test "x$DEBUG_LEVEL" = "xrelease"; then
41667          # When building release libraries, tell the linker optimize them.
41668          # Should this be supplied to the OSS linker as well?
41669          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41670        fi
41671      fi
41672    fi
41673
41674    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41675      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41676      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41677    fi
41678
41679    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41680        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41681
41682    # On some platforms (mac) the linker warns about non existing -L dirs.
41683    # Add server first if available. Linking aginst client does not always produce the same results.
41684    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41685    # Default to server for other variants.
41686    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41687      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41688    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41689      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41690    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41691      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41692    else
41693      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41694    fi
41695
41696    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41697    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41698      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41699    fi
41700
41701    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41702    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41703      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41704    fi
41705  fi
41706
41707
41708
41709
41710
41711
41712
41713
41714  # Some Zero and Shark settings.
41715  # ZERO_ARCHFLAG tells the compiler which mode to build for
41716  case "${OPENJDK_TARGET_CPU}" in
41717    s390)
41718      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41719      ;;
41720    *)
41721      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41722  esac
41723
41724  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41725$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41726  supports=yes
41727
41728  saved_cflags="$CFLAGS"
41729  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41730  ac_ext=c
41731ac_cpp='$CPP $CPPFLAGS'
41732ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41733ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41734ac_compiler_gnu=$ac_cv_c_compiler_gnu
41735
41736  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41737/* end confdefs.h.  */
41738int i;
41739_ACEOF
41740if ac_fn_c_try_compile "$LINENO"; then :
41741
41742else
41743  supports=no
41744fi
41745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41746  ac_ext=cpp
41747ac_cpp='$CXXCPP $CPPFLAGS'
41748ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41749ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41750ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41751
41752  CFLAGS="$saved_cflags"
41753
41754  saved_cxxflags="$CXXFLAGS"
41755  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
41756  ac_ext=cpp
41757ac_cpp='$CXXCPP $CPPFLAGS'
41758ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41759ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41760ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41761
41762  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41763/* end confdefs.h.  */
41764int i;
41765_ACEOF
41766if ac_fn_cxx_try_compile "$LINENO"; then :
41767
41768else
41769  supports=no
41770fi
41771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41772  ac_ext=cpp
41773ac_cpp='$CXXCPP $CPPFLAGS'
41774ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41775ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41776ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41777
41778  CXXFLAGS="$saved_cxxflags"
41779
41780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41781$as_echo "$supports" >&6; }
41782  if test "x$supports" = "xyes" ; then
41783    :
41784  else
41785    ZERO_ARCHFLAG=""
41786  fi
41787
41788
41789
41790  # Check that the compiler supports -mX (or -qX on AIX) flags
41791  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41792
41793  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41794$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41795  supports=yes
41796
41797  saved_cflags="$CFLAGS"
41798  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41799  ac_ext=c
41800ac_cpp='$CPP $CPPFLAGS'
41801ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41802ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41803ac_compiler_gnu=$ac_cv_c_compiler_gnu
41804
41805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41806/* end confdefs.h.  */
41807int i;
41808_ACEOF
41809if ac_fn_c_try_compile "$LINENO"; then :
41810
41811else
41812  supports=no
41813fi
41814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41815  ac_ext=cpp
41816ac_cpp='$CXXCPP $CPPFLAGS'
41817ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41818ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41819ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41820
41821  CFLAGS="$saved_cflags"
41822
41823  saved_cxxflags="$CXXFLAGS"
41824  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41825  ac_ext=cpp
41826ac_cpp='$CXXCPP $CPPFLAGS'
41827ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41828ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41829ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41830
41831  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41832/* end confdefs.h.  */
41833int i;
41834_ACEOF
41835if ac_fn_cxx_try_compile "$LINENO"; then :
41836
41837else
41838  supports=no
41839fi
41840rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41841  ac_ext=cpp
41842ac_cpp='$CXXCPP $CPPFLAGS'
41843ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41844ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41845ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41846
41847  CXXFLAGS="$saved_cxxflags"
41848
41849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41850$as_echo "$supports" >&6; }
41851  if test "x$supports" = "xyes" ; then
41852    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41853  else
41854    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41855  fi
41856
41857
41858
41859
41860# Setup debug symbols (need objcopy from the toolchain for that)
41861
41862  #
41863  # ENABLE_DEBUG_SYMBOLS
41864  # This must be done after the toolchain is setup, since we're looking at objcopy.
41865  #
41866  # Check whether --enable-debug-symbols was given.
41867if test "${enable_debug_symbols+set}" = set; then :
41868  enableval=$enable_debug_symbols;
41869fi
41870
41871
41872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41873$as_echo_n "checking if we should generate debug symbols... " >&6; }
41874
41875  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41876    # explicit enabling of enable-debug-symbols and can't find objcopy
41877    #   this is an error
41878    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41879  fi
41880
41881  if test "x$enable_debug_symbols" = "xyes"; then
41882    ENABLE_DEBUG_SYMBOLS=true
41883  elif test "x$enable_debug_symbols" = "xno"; then
41884    ENABLE_DEBUG_SYMBOLS=false
41885  else
41886    # Default is on if objcopy is found
41887    if test "x$OBJCOPY" != x; then
41888      ENABLE_DEBUG_SYMBOLS=true
41889    # MacOS X and Windows don't use objcopy but default is on for those OSes
41890    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41891      ENABLE_DEBUG_SYMBOLS=true
41892    else
41893      ENABLE_DEBUG_SYMBOLS=false
41894    fi
41895  fi
41896
41897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41898$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41899
41900  #
41901  # ZIP_DEBUGINFO_FILES
41902  #
41903  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41904$as_echo_n "checking if we should zip debug-info files... " >&6; }
41905  # Check whether --enable-zip-debug-info was given.
41906if test "${enable_zip_debug_info+set}" = set; then :
41907  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41908else
41909  enable_zip_debug_info="yes"
41910fi
41911
41912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41913$as_echo "${enable_zip_debug_info}" >&6; }
41914
41915  if test "x${enable_zip_debug_info}" = "xno"; then
41916    ZIP_DEBUGINFO_FILES=false
41917  else
41918    ZIP_DEBUGINFO_FILES=true
41919  fi
41920
41921
41922
41923
41924
41925###############################################################################
41926#
41927# Check dependencies for external and internal libraries.
41928#
41929###############################################################################
41930
41931# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
41932
41933  # When using cygwin or msys, we need a wrapper binary that renames
41934  # /cygdrive/c/ arguments into c:/ arguments and peeks into
41935  # @files and rewrites these too! This wrapper binary is
41936  # called fixpath.
41937  FIXPATH=
41938  if test "x$OPENJDK_BUILD_OS" = xwindows; then
41939    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
41940$as_echo_n "checking if fixpath can be created... " >&6; }
41941    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
41942    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
41943    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
41944      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
41945      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
41946      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
41947      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
41948    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
41949      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
41950      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
41951
41952      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
41953      # @ was chosen as separator to minimize risk of other tools messing around with it
41954      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
41955      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
41956
41957      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
41958    fi
41959    rm -f $OUTPUT_ROOT/fixpath*
41960    cd $OUTPUT_ROOT
41961    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
41962    cd $CURDIR
41963
41964    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
41965      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41966$as_echo "no" >&6; }
41967      cat $OUTPUT_ROOT/fixpath1.log
41968      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
41969    fi
41970    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41971$as_echo "yes" >&6; }
41972    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
41973$as_echo_n "checking if fixpath.exe works... " >&6; }
41974    cd $OUTPUT_ROOT
41975    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
41976    cd $CURDIR
41977    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
41978      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41979$as_echo "no" >&6; }
41980      cat $OUTPUT_ROOT/fixpath2.log
41981      as_fn_error $? "fixpath did not work!" "$LINENO" 5
41982    fi
41983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41984$as_echo "yes" >&6; }
41985    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
41986  fi
41987
41988
41989
41990
41991
41992
41993  ###############################################################################
41994  #
41995  # OS specific settings that we never will need to probe.
41996  #
41997  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41998    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
41999$as_echo_n "checking what is not needed on Linux?... " >&6; }
42000    PULSE_NOT_NEEDED=yes
42001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42002$as_echo "pulse" >&6; }
42003  fi
42004
42005  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42006    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42007$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42008    ALSA_NOT_NEEDED=yes
42009    PULSE_NOT_NEEDED=yes
42010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42011$as_echo "alsa pulse" >&6; }
42012  fi
42013
42014  if test "x$OPENJDK_TARGET_OS" = xaix; then
42015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42016$as_echo_n "checking what is not needed on AIX?... " >&6; }
42017    ALSA_NOT_NEEDED=yes
42018    PULSE_NOT_NEEDED=yes
42019    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42020$as_echo "alsa pulse" >&6; }
42021  fi
42022
42023
42024  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42025    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42026$as_echo_n "checking what is not needed on Windows?... " >&6; }
42027    CUPS_NOT_NEEDED=yes
42028    ALSA_NOT_NEEDED=yes
42029    PULSE_NOT_NEEDED=yes
42030    X11_NOT_NEEDED=yes
42031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42032$as_echo "alsa cups pulse x11" >&6; }
42033  fi
42034
42035  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42036    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42037$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42038    ALSA_NOT_NEEDED=yes
42039    PULSE_NOT_NEEDED=yes
42040    X11_NOT_NEEDED=yes
42041    # If the java runtime framework is disabled, then we need X11.
42042    # This will be adjusted below.
42043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42044$as_echo "alsa pulse x11" >&6; }
42045  fi
42046
42047  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42048    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42049$as_echo_n "checking what is not needed on bsd?... " >&6; }
42050    ALSA_NOT_NEEDED=yes
42051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42052$as_echo "alsa" >&6; }
42053  fi
42054
42055  if test "x$OPENJDK" = "xfalse"; then
42056    FREETYPE_NOT_NEEDED=yes
42057  fi
42058
42059  if test "x$SUPPORT_HEADFUL" = xno; then
42060    X11_NOT_NEEDED=yes
42061  fi
42062
42063  ###############################################################################
42064  #
42065  # Check for MacOSX support for OpenJDK.
42066  #
42067
42068
42069  # Check whether --enable-macosx-runtime-support was given.
42070if test "${enable_macosx_runtime_support+set}" = set; then :
42071  enableval=$enable_macosx_runtime_support;
42072fi
42073
42074  if test "x$enable_macosx_runtime_support" != x; then
42075    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42076$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42077  fi
42078
42079
42080  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42081$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42082  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42084$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42085  else
42086    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42087$as_echo "no" >&6; }
42088  fi
42089
42090
42091
42092  ###############################################################################
42093  #
42094  # Check for X Windows
42095  #
42096
42097  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42098  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42099  # --x-libraries for the sysroot, if that seems to be correct.
42100  if test "x$SYS_ROOT" != "x/"; then
42101    if test "x$x_includes" = xNONE; then
42102      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42103        x_includes="$SYS_ROOT/usr/X11R6/include"
42104      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42105        x_includes="$SYS_ROOT/usr/include"
42106      fi
42107    fi
42108    if test "x$x_libraries" = xNONE; then
42109      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42110        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42111      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42112        x_libraries="$SYS_ROOT/usr/lib64"
42113      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42114        x_libraries="$SYS_ROOT/usr/lib"
42115      fi
42116    fi
42117  fi
42118
42119  # Now let autoconf do it's magic
42120  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42121$as_echo_n "checking for X... " >&6; }
42122
42123
42124# Check whether --with-x was given.
42125if test "${with_x+set}" = set; then :
42126  withval=$with_x;
42127fi
42128
42129# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42130if test "x$with_x" = xno; then
42131  # The user explicitly disabled X.
42132  have_x=disabled
42133else
42134  case $x_includes,$x_libraries in #(
42135    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42136    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42137  $as_echo_n "(cached) " >&6
42138else
42139  # One or both of the vars are not set, and there is no cached value.
42140ac_x_includes=no ac_x_libraries=no
42141rm -f -r conftest.dir
42142if mkdir conftest.dir; then
42143  cd conftest.dir
42144  cat >Imakefile <<'_ACEOF'
42145incroot:
42146	@echo incroot='${INCROOT}'
42147usrlibdir:
42148	@echo usrlibdir='${USRLIBDIR}'
42149libdir:
42150	@echo libdir='${LIBDIR}'
42151_ACEOF
42152  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42153    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42154    for ac_var in incroot usrlibdir libdir; do
42155      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42156    done
42157    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42158    for ac_extension in a so sl dylib la dll; do
42159      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42160	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42161	ac_im_usrlibdir=$ac_im_libdir; break
42162      fi
42163    done
42164    # Screen out bogus values from the imake configuration.  They are
42165    # bogus both because they are the default anyway, and because
42166    # using them would break gcc on systems where it needs fixed includes.
42167    case $ac_im_incroot in
42168	/usr/include) ac_x_includes= ;;
42169	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42170    esac
42171    case $ac_im_usrlibdir in
42172	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42173	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42174    esac
42175  fi
42176  cd ..
42177  rm -f -r conftest.dir
42178fi
42179
42180# Standard set of common directories for X headers.
42181# Check X11 before X11Rn because it is often a symlink to the current release.
42182ac_x_header_dirs='
42183/usr/X11/include
42184/usr/X11R7/include
42185/usr/X11R6/include
42186/usr/X11R5/include
42187/usr/X11R4/include
42188
42189/usr/include/X11
42190/usr/include/X11R7
42191/usr/include/X11R6
42192/usr/include/X11R5
42193/usr/include/X11R4
42194
42195/usr/local/X11/include
42196/usr/local/X11R7/include
42197/usr/local/X11R6/include
42198/usr/local/X11R5/include
42199/usr/local/X11R4/include
42200
42201/usr/local/include/X11
42202/usr/local/include/X11R7
42203/usr/local/include/X11R6
42204/usr/local/include/X11R5
42205/usr/local/include/X11R4
42206
42207/usr/X386/include
42208/usr/x386/include
42209/usr/XFree86/include/X11
42210
42211/usr/include
42212/usr/local/include
42213/usr/unsupported/include
42214/usr/athena/include
42215/usr/local/x11r5/include
42216/usr/lpp/Xamples/include
42217
42218/usr/openwin/include
42219/usr/openwin/share/include'
42220
42221if test "$ac_x_includes" = no; then
42222  # Guess where to find include files, by looking for Xlib.h.
42223  # First, try using that file with no special directory specified.
42224  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42225/* end confdefs.h.  */
42226#include <X11/Xlib.h>
42227_ACEOF
42228if ac_fn_cxx_try_cpp "$LINENO"; then :
42229  # We can compile using X headers with no special include directory.
42230ac_x_includes=
42231else
42232  for ac_dir in $ac_x_header_dirs; do
42233  if test -r "$ac_dir/X11/Xlib.h"; then
42234    ac_x_includes=$ac_dir
42235    break
42236  fi
42237done
42238fi
42239rm -f conftest.err conftest.i conftest.$ac_ext
42240fi # $ac_x_includes = no
42241
42242if test "$ac_x_libraries" = no; then
42243  # Check for the libraries.
42244  # See if we find them without any special options.
42245  # Don't add to $LIBS permanently.
42246  ac_save_LIBS=$LIBS
42247  LIBS="-lX11 $LIBS"
42248  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42249/* end confdefs.h.  */
42250#include <X11/Xlib.h>
42251int
42252main ()
42253{
42254XrmInitialize ()
42255  ;
42256  return 0;
42257}
42258_ACEOF
42259if ac_fn_cxx_try_link "$LINENO"; then :
42260  LIBS=$ac_save_LIBS
42261# We can link X programs with no special library path.
42262ac_x_libraries=
42263else
42264  LIBS=$ac_save_LIBS
42265for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42266do
42267  # Don't even attempt the hair of trying to link an X program!
42268  for ac_extension in a so sl dylib la dll; do
42269    if test -r "$ac_dir/libX11.$ac_extension"; then
42270      ac_x_libraries=$ac_dir
42271      break 2
42272    fi
42273  done
42274done
42275fi
42276rm -f core conftest.err conftest.$ac_objext \
42277    conftest$ac_exeext conftest.$ac_ext
42278fi # $ac_x_libraries = no
42279
42280case $ac_x_includes,$ac_x_libraries in #(
42281  no,* | *,no | *\'*)
42282    # Didn't find X, or a directory has "'" in its name.
42283    ac_cv_have_x="have_x=no";; #(
42284  *)
42285    # Record where we found X for the cache.
42286    ac_cv_have_x="have_x=yes\
42287	ac_x_includes='$ac_x_includes'\
42288	ac_x_libraries='$ac_x_libraries'"
42289esac
42290fi
42291;; #(
42292    *) have_x=yes;;
42293  esac
42294  eval "$ac_cv_have_x"
42295fi # $with_x != no
42296
42297if test "$have_x" != yes; then
42298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42299$as_echo "$have_x" >&6; }
42300  no_x=yes
42301else
42302  # If each of the values was on the command line, it overrides each guess.
42303  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42304  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42305  # Update the cache value to reflect the command line values.
42306  ac_cv_have_x="have_x=yes\
42307	ac_x_includes='$x_includes'\
42308	ac_x_libraries='$x_libraries'"
42309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42310$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42311fi
42312
42313  if test "$no_x" = yes; then
42314  # Not all programs may use this symbol, but it does not hurt to define it.
42315
42316$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42317
42318  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42319else
42320  if test -n "$x_includes"; then
42321    X_CFLAGS="$X_CFLAGS -I$x_includes"
42322  fi
42323
42324  # It would also be nice to do this for all -L options, not just this one.
42325  if test -n "$x_libraries"; then
42326    X_LIBS="$X_LIBS -L$x_libraries"
42327    # For Solaris; some versions of Sun CC require a space after -R and
42328    # others require no space.  Words are not sufficient . . . .
42329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42330$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42331    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42332    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42333    ac_cxx_werror_flag=yes
42334    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42335/* end confdefs.h.  */
42336
42337int
42338main ()
42339{
42340
42341  ;
42342  return 0;
42343}
42344_ACEOF
42345if ac_fn_cxx_try_link "$LINENO"; then :
42346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42347$as_echo "no" >&6; }
42348       X_LIBS="$X_LIBS -R$x_libraries"
42349else
42350  LIBS="$ac_xsave_LIBS -R $x_libraries"
42351       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42352/* end confdefs.h.  */
42353
42354int
42355main ()
42356{
42357
42358  ;
42359  return 0;
42360}
42361_ACEOF
42362if ac_fn_cxx_try_link "$LINENO"; then :
42363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42364$as_echo "yes" >&6; }
42365	  X_LIBS="$X_LIBS -R $x_libraries"
42366else
42367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42368$as_echo "neither works" >&6; }
42369fi
42370rm -f core conftest.err conftest.$ac_objext \
42371    conftest$ac_exeext conftest.$ac_ext
42372fi
42373rm -f core conftest.err conftest.$ac_objext \
42374    conftest$ac_exeext conftest.$ac_ext
42375    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42376    LIBS=$ac_xsave_LIBS
42377  fi
42378
42379  # Check for system-dependent libraries X programs must link with.
42380  # Do this before checking for the system-independent R6 libraries
42381  # (-lICE), since we may need -lsocket or whatever for X linking.
42382
42383  if test "$ISC" = yes; then
42384    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42385  else
42386    # Martyn Johnson says this is needed for Ultrix, if the X
42387    # libraries were built with DECnet support.  And Karl Berry says
42388    # the Alpha needs dnet_stub (dnet does not exist).
42389    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42390    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42391/* end confdefs.h.  */
42392
42393/* Override any GCC internal prototype to avoid an error.
42394   Use char because int might match the return type of a GCC
42395   builtin and then its argument prototype would still apply.  */
42396#ifdef __cplusplus
42397extern "C"
42398#endif
42399char XOpenDisplay ();
42400int
42401main ()
42402{
42403return XOpenDisplay ();
42404  ;
42405  return 0;
42406}
42407_ACEOF
42408if ac_fn_cxx_try_link "$LINENO"; then :
42409
42410else
42411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42412$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42413if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42414  $as_echo_n "(cached) " >&6
42415else
42416  ac_check_lib_save_LIBS=$LIBS
42417LIBS="-ldnet  $LIBS"
42418cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42419/* end confdefs.h.  */
42420
42421/* Override any GCC internal prototype to avoid an error.
42422   Use char because int might match the return type of a GCC
42423   builtin and then its argument prototype would still apply.  */
42424#ifdef __cplusplus
42425extern "C"
42426#endif
42427char dnet_ntoa ();
42428int
42429main ()
42430{
42431return dnet_ntoa ();
42432  ;
42433  return 0;
42434}
42435_ACEOF
42436if ac_fn_cxx_try_link "$LINENO"; then :
42437  ac_cv_lib_dnet_dnet_ntoa=yes
42438else
42439  ac_cv_lib_dnet_dnet_ntoa=no
42440fi
42441rm -f core conftest.err conftest.$ac_objext \
42442    conftest$ac_exeext conftest.$ac_ext
42443LIBS=$ac_check_lib_save_LIBS
42444fi
42445{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42446$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42447if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42448  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42449fi
42450
42451    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42452      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42453$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42454if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42455  $as_echo_n "(cached) " >&6
42456else
42457  ac_check_lib_save_LIBS=$LIBS
42458LIBS="-ldnet_stub  $LIBS"
42459cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42460/* end confdefs.h.  */
42461
42462/* Override any GCC internal prototype to avoid an error.
42463   Use char because int might match the return type of a GCC
42464   builtin and then its argument prototype would still apply.  */
42465#ifdef __cplusplus
42466extern "C"
42467#endif
42468char dnet_ntoa ();
42469int
42470main ()
42471{
42472return dnet_ntoa ();
42473  ;
42474  return 0;
42475}
42476_ACEOF
42477if ac_fn_cxx_try_link "$LINENO"; then :
42478  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42479else
42480  ac_cv_lib_dnet_stub_dnet_ntoa=no
42481fi
42482rm -f core conftest.err conftest.$ac_objext \
42483    conftest$ac_exeext conftest.$ac_ext
42484LIBS=$ac_check_lib_save_LIBS
42485fi
42486{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42487$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42488if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42489  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42490fi
42491
42492    fi
42493fi
42494rm -f core conftest.err conftest.$ac_objext \
42495    conftest$ac_exeext conftest.$ac_ext
42496    LIBS="$ac_xsave_LIBS"
42497
42498    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42499    # to get the SysV transport functions.
42500    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42501    # needs -lnsl.
42502    # The nsl library prevents programs from opening the X display
42503    # on Irix 5.2, according to T.E. Dickey.
42504    # The functions gethostbyname, getservbyname, and inet_addr are
42505    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42506    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42507if test "x$ac_cv_func_gethostbyname" = xyes; then :
42508
42509fi
42510
42511    if test $ac_cv_func_gethostbyname = no; then
42512      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42513$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42514if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42515  $as_echo_n "(cached) " >&6
42516else
42517  ac_check_lib_save_LIBS=$LIBS
42518LIBS="-lnsl  $LIBS"
42519cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42520/* end confdefs.h.  */
42521
42522/* Override any GCC internal prototype to avoid an error.
42523   Use char because int might match the return type of a GCC
42524   builtin and then its argument prototype would still apply.  */
42525#ifdef __cplusplus
42526extern "C"
42527#endif
42528char gethostbyname ();
42529int
42530main ()
42531{
42532return gethostbyname ();
42533  ;
42534  return 0;
42535}
42536_ACEOF
42537if ac_fn_cxx_try_link "$LINENO"; then :
42538  ac_cv_lib_nsl_gethostbyname=yes
42539else
42540  ac_cv_lib_nsl_gethostbyname=no
42541fi
42542rm -f core conftest.err conftest.$ac_objext \
42543    conftest$ac_exeext conftest.$ac_ext
42544LIBS=$ac_check_lib_save_LIBS
42545fi
42546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42547$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42548if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42549  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42550fi
42551
42552      if test $ac_cv_lib_nsl_gethostbyname = no; then
42553	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42554$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42555if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42556  $as_echo_n "(cached) " >&6
42557else
42558  ac_check_lib_save_LIBS=$LIBS
42559LIBS="-lbsd  $LIBS"
42560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42561/* end confdefs.h.  */
42562
42563/* Override any GCC internal prototype to avoid an error.
42564   Use char because int might match the return type of a GCC
42565   builtin and then its argument prototype would still apply.  */
42566#ifdef __cplusplus
42567extern "C"
42568#endif
42569char gethostbyname ();
42570int
42571main ()
42572{
42573return gethostbyname ();
42574  ;
42575  return 0;
42576}
42577_ACEOF
42578if ac_fn_cxx_try_link "$LINENO"; then :
42579  ac_cv_lib_bsd_gethostbyname=yes
42580else
42581  ac_cv_lib_bsd_gethostbyname=no
42582fi
42583rm -f core conftest.err conftest.$ac_objext \
42584    conftest$ac_exeext conftest.$ac_ext
42585LIBS=$ac_check_lib_save_LIBS
42586fi
42587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42588$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42589if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42590  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42591fi
42592
42593      fi
42594    fi
42595
42596    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42597    # socket/setsockopt and other routines are undefined under SCO ODT
42598    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42599    # on later versions), says Simon Leinen: it contains gethostby*
42600    # variants that don't use the name server (or something).  -lsocket
42601    # must be given before -lnsl if both are needed.  We assume that
42602    # if connect needs -lnsl, so does gethostbyname.
42603    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42604if test "x$ac_cv_func_connect" = xyes; then :
42605
42606fi
42607
42608    if test $ac_cv_func_connect = no; then
42609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42610$as_echo_n "checking for connect in -lsocket... " >&6; }
42611if ${ac_cv_lib_socket_connect+:} false; then :
42612  $as_echo_n "(cached) " >&6
42613else
42614  ac_check_lib_save_LIBS=$LIBS
42615LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42616cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42617/* end confdefs.h.  */
42618
42619/* Override any GCC internal prototype to avoid an error.
42620   Use char because int might match the return type of a GCC
42621   builtin and then its argument prototype would still apply.  */
42622#ifdef __cplusplus
42623extern "C"
42624#endif
42625char connect ();
42626int
42627main ()
42628{
42629return connect ();
42630  ;
42631  return 0;
42632}
42633_ACEOF
42634if ac_fn_cxx_try_link "$LINENO"; then :
42635  ac_cv_lib_socket_connect=yes
42636else
42637  ac_cv_lib_socket_connect=no
42638fi
42639rm -f core conftest.err conftest.$ac_objext \
42640    conftest$ac_exeext conftest.$ac_ext
42641LIBS=$ac_check_lib_save_LIBS
42642fi
42643{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42644$as_echo "$ac_cv_lib_socket_connect" >&6; }
42645if test "x$ac_cv_lib_socket_connect" = xyes; then :
42646  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42647fi
42648
42649    fi
42650
42651    # Guillermo Gomez says -lposix is necessary on A/UX.
42652    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42653if test "x$ac_cv_func_remove" = xyes; then :
42654
42655fi
42656
42657    if test $ac_cv_func_remove = no; then
42658      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42659$as_echo_n "checking for remove in -lposix... " >&6; }
42660if ${ac_cv_lib_posix_remove+:} false; then :
42661  $as_echo_n "(cached) " >&6
42662else
42663  ac_check_lib_save_LIBS=$LIBS
42664LIBS="-lposix  $LIBS"
42665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42666/* end confdefs.h.  */
42667
42668/* Override any GCC internal prototype to avoid an error.
42669   Use char because int might match the return type of a GCC
42670   builtin and then its argument prototype would still apply.  */
42671#ifdef __cplusplus
42672extern "C"
42673#endif
42674char remove ();
42675int
42676main ()
42677{
42678return remove ();
42679  ;
42680  return 0;
42681}
42682_ACEOF
42683if ac_fn_cxx_try_link "$LINENO"; then :
42684  ac_cv_lib_posix_remove=yes
42685else
42686  ac_cv_lib_posix_remove=no
42687fi
42688rm -f core conftest.err conftest.$ac_objext \
42689    conftest$ac_exeext conftest.$ac_ext
42690LIBS=$ac_check_lib_save_LIBS
42691fi
42692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42693$as_echo "$ac_cv_lib_posix_remove" >&6; }
42694if test "x$ac_cv_lib_posix_remove" = xyes; then :
42695  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42696fi
42697
42698    fi
42699
42700    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42701    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42702if test "x$ac_cv_func_shmat" = xyes; then :
42703
42704fi
42705
42706    if test $ac_cv_func_shmat = no; then
42707      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42708$as_echo_n "checking for shmat in -lipc... " >&6; }
42709if ${ac_cv_lib_ipc_shmat+:} false; then :
42710  $as_echo_n "(cached) " >&6
42711else
42712  ac_check_lib_save_LIBS=$LIBS
42713LIBS="-lipc  $LIBS"
42714cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42715/* end confdefs.h.  */
42716
42717/* Override any GCC internal prototype to avoid an error.
42718   Use char because int might match the return type of a GCC
42719   builtin and then its argument prototype would still apply.  */
42720#ifdef __cplusplus
42721extern "C"
42722#endif
42723char shmat ();
42724int
42725main ()
42726{
42727return shmat ();
42728  ;
42729  return 0;
42730}
42731_ACEOF
42732if ac_fn_cxx_try_link "$LINENO"; then :
42733  ac_cv_lib_ipc_shmat=yes
42734else
42735  ac_cv_lib_ipc_shmat=no
42736fi
42737rm -f core conftest.err conftest.$ac_objext \
42738    conftest$ac_exeext conftest.$ac_ext
42739LIBS=$ac_check_lib_save_LIBS
42740fi
42741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42742$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42743if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42744  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42745fi
42746
42747    fi
42748  fi
42749
42750  # Check for libraries that X11R6 Xt/Xaw programs need.
42751  ac_save_LDFLAGS=$LDFLAGS
42752  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42753  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42754  # check for ICE first), but we must link in the order -lSM -lICE or
42755  # we get undefined symbols.  So assume we have SM if we have ICE.
42756  # These have to be linked with before -lX11, unlike the other
42757  # libraries we check for below, so use a different variable.
42758  # John Interrante, Karl Berry
42759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42760$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42761if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42762  $as_echo_n "(cached) " >&6
42763else
42764  ac_check_lib_save_LIBS=$LIBS
42765LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42766cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42767/* end confdefs.h.  */
42768
42769/* Override any GCC internal prototype to avoid an error.
42770   Use char because int might match the return type of a GCC
42771   builtin and then its argument prototype would still apply.  */
42772#ifdef __cplusplus
42773extern "C"
42774#endif
42775char IceConnectionNumber ();
42776int
42777main ()
42778{
42779return IceConnectionNumber ();
42780  ;
42781  return 0;
42782}
42783_ACEOF
42784if ac_fn_cxx_try_link "$LINENO"; then :
42785  ac_cv_lib_ICE_IceConnectionNumber=yes
42786else
42787  ac_cv_lib_ICE_IceConnectionNumber=no
42788fi
42789rm -f core conftest.err conftest.$ac_objext \
42790    conftest$ac_exeext conftest.$ac_ext
42791LIBS=$ac_check_lib_save_LIBS
42792fi
42793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42794$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42795if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42796  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42797fi
42798
42799  LDFLAGS=$ac_save_LDFLAGS
42800
42801fi
42802
42803
42804  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42805  # this doesn't make sense so we remove it.
42806  if test "x$COMPILE_TYPE" = xcross; then
42807    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42808  fi
42809
42810  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42811
42812  # Print a helpful message on how to acquire the necessary build dependency.
42813  # x11 is the help tag: freetype, cups, pulse, alsa etc
42814  MISSING_DEPENDENCY=x11
42815
42816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42817    cygwin_help $MISSING_DEPENDENCY
42818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42819    msys_help $MISSING_DEPENDENCY
42820  else
42821    PKGHANDLER_COMMAND=
42822
42823    case $PKGHANDLER in
42824      apt-get)
42825        apt_help     $MISSING_DEPENDENCY ;;
42826      yum)
42827        yum_help     $MISSING_DEPENDENCY ;;
42828      port)
42829        port_help    $MISSING_DEPENDENCY ;;
42830      pkgutil)
42831        pkgutil_help $MISSING_DEPENDENCY ;;
42832      pkgadd)
42833        pkgadd_help  $MISSING_DEPENDENCY ;;
42834    esac
42835
42836    if test "x$PKGHANDLER_COMMAND" != x; then
42837      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42838    fi
42839  fi
42840
42841    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42842  fi
42843
42844  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42845    OPENWIN_HOME="/usr/openwin"
42846  fi
42847
42848
42849
42850  #
42851  # Weird Sol10 something check...TODO change to try compile
42852  #
42853  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42854    if test "`uname -r`" = "5.10"; then
42855      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42856        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42857      fi
42858    fi
42859  fi
42860
42861  ac_ext=c
42862ac_cpp='$CPP $CPPFLAGS'
42863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42865ac_compiler_gnu=$ac_cv_c_compiler_gnu
42866
42867  OLD_CFLAGS="$CFLAGS"
42868  CFLAGS="$CFLAGS $X_CFLAGS"
42869
42870  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42871  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42872do :
42873  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42874ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42875        # include <X11/Xlib.h>
42876        # include <X11/Xutil.h>
42877
42878
42879"
42880if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42881  cat >>confdefs.h <<_ACEOF
42882#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42883_ACEOF
42884 X11_A_OK=yes
42885else
42886  X11_A_OK=no; break
42887fi
42888
42889done
42890
42891
42892  CFLAGS="$OLD_CFLAGS"
42893  ac_ext=cpp
42894ac_cpp='$CXXCPP $CPPFLAGS'
42895ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42896ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42897ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42898
42899
42900  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42901
42902  # Print a helpful message on how to acquire the necessary build dependency.
42903  # x11 is the help tag: freetype, cups, pulse, alsa etc
42904  MISSING_DEPENDENCY=x11
42905
42906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42907    cygwin_help $MISSING_DEPENDENCY
42908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42909    msys_help $MISSING_DEPENDENCY
42910  else
42911    PKGHANDLER_COMMAND=
42912
42913    case $PKGHANDLER in
42914      apt-get)
42915        apt_help     $MISSING_DEPENDENCY ;;
42916      yum)
42917        yum_help     $MISSING_DEPENDENCY ;;
42918      port)
42919        port_help    $MISSING_DEPENDENCY ;;
42920      pkgutil)
42921        pkgutil_help $MISSING_DEPENDENCY ;;
42922      pkgadd)
42923        pkgadd_help  $MISSING_DEPENDENCY ;;
42924    esac
42925
42926    if test "x$PKGHANDLER_COMMAND" != x; then
42927      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42928    fi
42929  fi
42930
42931    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
42932  fi
42933
42934
42935
42936
42937
42938
42939  ###############################################################################
42940  #
42941  # The common unix printing system cups is used to print from java.
42942  #
42943
42944# Check whether --with-cups was given.
42945if test "${with_cups+set}" = set; then :
42946  withval=$with_cups;
42947fi
42948
42949
42950# Check whether --with-cups-include was given.
42951if test "${with_cups_include+set}" = set; then :
42952  withval=$with_cups_include;
42953fi
42954
42955
42956  if test "x$CUPS_NOT_NEEDED" = xyes; then
42957    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
42958      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
42959$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
42960    fi
42961    CUPS_CFLAGS=
42962  else
42963    CUPS_FOUND=no
42964
42965    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
42966      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
42967    fi
42968
42969    if test "x${with_cups}" != x; then
42970      CUPS_CFLAGS="-I${with_cups}/include"
42971      CUPS_FOUND=yes
42972    fi
42973    if test "x${with_cups_include}" != x; then
42974      CUPS_CFLAGS="-I${with_cups_include}"
42975      CUPS_FOUND=yes
42976    fi
42977    if test "x$CUPS_FOUND" = xno; then
42978
42979
42980  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
42981    # Source the builddeps file again, to make sure it uses the latest variables!
42982    . $builddepsfile
42983    # Look for a target and build machine specific resource!
42984    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
42985    if test "x$resource" = x; then
42986      # Ok, lets instead look for a target specific resource
42987      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
42988    fi
42989    if test "x$resource" = x; then
42990      # Ok, lets instead look for a build specific resource
42991      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
42992    fi
42993    if test "x$resource" = x; then
42994      # Ok, lets instead look for a generic resource
42995      # (The cups comes from M4 and not the shell, thus no need for eval here.)
42996      resource=${builddep_cups}
42997    fi
42998    if test "x$resource" != x; then
42999      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43000$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43001      # If the resource in the builddeps.conf file is an existing directory,
43002      # for example /java/linux/cups
43003      if test -d ${resource}; then
43004        depdir=${resource}
43005      else
43006
43007  # cups is for example mymodule
43008  # $resource is for example libs/general/libmymod_1_2_3.zip
43009  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43010  # $with_builddeps_dir is for example /localhome/builddeps
43011  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43012  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43013  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43014  filename=`basename $resource`
43015  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43016  filebase=${filename%%.*}
43017  extension=${filename#*.}
43018  installdir=$with_builddeps_dir/$filebase
43019  if test ! -f $installdir/$filename.unpacked; then
43020    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43021$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43022    if test ! -d $installdir; then
43023      mkdir -p $installdir
43024    fi
43025    if test ! -d $installdir; then
43026      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43027    fi
43028    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43029    touch $tmpfile
43030    if test ! -f $tmpfile; then
43031      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43032    fi
43033
43034  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43035  # $tmpfile is the local file name for the downloaded file.
43036  VALID_TOOL=no
43037  if test "x$BDEPS_FTP" = xwget; then
43038    VALID_TOOL=yes
43039    wget -O $tmpfile $with_builddeps_server/$resource
43040  fi
43041  if test "x$BDEPS_FTP" = xlftp; then
43042    VALID_TOOL=yes
43043    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43044  fi
43045  if test "x$BDEPS_FTP" = xftp; then
43046    VALID_TOOL=yes
43047    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43048    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43049    FTPUSERPWD=${FTPSERVER%%@*}
43050    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43051      FTPUSER=${userpwd%%:*}
43052      FTPPWD=${userpwd#*@}
43053      FTPSERVER=${FTPSERVER#*@}
43054    else
43055      FTPUSER=ftp
43056      FTPPWD=ftp
43057    fi
43058    # the "pass" command does not work on some
43059    # ftp clients (read ftp.exe) but if it works,
43060    # passive mode is better!
43061    ( \
43062        echo "user $FTPUSER $FTPPWD"        ; \
43063        echo "pass"                         ; \
43064        echo "bin"                          ; \
43065        echo "get $FTPPATH $tmpfile"              ; \
43066    ) | ftp -in $FTPSERVER
43067  fi
43068  if test "x$VALID_TOOL" != xyes; then
43069    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43070  fi
43071
43072    mv $tmpfile $installdir/$filename
43073    if test ! -s $installdir/$filename; then
43074      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43075    fi
43076    case "$extension" in
43077      zip)  echo "Unzipping $installdir/$filename..."
43078        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43079        ;;
43080      tar.gz) echo "Untaring $installdir/$filename..."
43081        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43082        ;;
43083      tgz) echo "Untaring $installdir/$filename..."
43084        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43085        ;;
43086      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43087        ;;
43088    esac
43089  fi
43090  if test -f $installdir/$filename.unpacked; then
43091    depdir=$installdir
43092  fi
43093
43094      fi
43095      # Source the builddeps file again, because in the previous command, the depdir
43096      # was updated to point at the current build dependency install directory.
43097      . $builddepsfile
43098      # Now extract variables from the builddeps.conf files.
43099      theroot=${builddep_cups_ROOT}
43100      thecflags=${builddep_cups_CFLAGS}
43101      thelibs=${builddep_cups_LIBS}
43102      if test "x$depdir" = x; then
43103        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43104      fi
43105      CUPS=$depdir
43106      if test "x$theroot" != x; then
43107        CUPS="$theroot"
43108      fi
43109      if test "x$thecflags" != x; then
43110        CUPS_CFLAGS="$thecflags"
43111      fi
43112      if test "x$thelibs" != x; then
43113        CUPS_LIBS="$thelibs"
43114      fi
43115      CUPS_FOUND=yes
43116
43117    fi
43118
43119  fi
43120
43121    fi
43122    if test "x$CUPS_FOUND" = xno; then
43123      # Are the cups headers installed in the default /usr/include location?
43124      for ac_header in cups/cups.h cups/ppd.h
43125do :
43126  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43127ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43128if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43129  cat >>confdefs.h <<_ACEOF
43130#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43131_ACEOF
43132
43133            CUPS_FOUND=yes
43134            CUPS_CFLAGS=
43135            DEFAULT_CUPS=yes
43136
43137
43138fi
43139
43140done
43141
43142    fi
43143    if test "x$CUPS_FOUND" = xno; then
43144      # Getting nervous now? Lets poke around for standard Solaris third-party
43145      # package installation locations.
43146      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43147$as_echo_n "checking for cups headers... " >&6; }
43148      if test -s /opt/sfw/cups/include/cups/cups.h; then
43149        # An SFW package seems to be installed!
43150        CUPS_FOUND=yes
43151        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43152      elif test -s /opt/csw/include/cups/cups.h; then
43153        # A CSW package seems to be installed!
43154        CUPS_FOUND=yes
43155        CUPS_CFLAGS="-I/opt/csw/include"
43156      fi
43157      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43158$as_echo "$CUPS_FOUND" >&6; }
43159    fi
43160    if test "x$CUPS_FOUND" = xno; then
43161
43162  # Print a helpful message on how to acquire the necessary build dependency.
43163  # cups is the help tag: freetype, cups, pulse, alsa etc
43164  MISSING_DEPENDENCY=cups
43165
43166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43167    cygwin_help $MISSING_DEPENDENCY
43168  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43169    msys_help $MISSING_DEPENDENCY
43170  else
43171    PKGHANDLER_COMMAND=
43172
43173    case $PKGHANDLER in
43174      apt-get)
43175        apt_help     $MISSING_DEPENDENCY ;;
43176      yum)
43177        yum_help     $MISSING_DEPENDENCY ;;
43178      port)
43179        port_help    $MISSING_DEPENDENCY ;;
43180      pkgutil)
43181        pkgutil_help $MISSING_DEPENDENCY ;;
43182      pkgadd)
43183        pkgadd_help  $MISSING_DEPENDENCY ;;
43184    esac
43185
43186    if test "x$PKGHANDLER_COMMAND" != x; then
43187      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43188    fi
43189  fi
43190
43191      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43192    fi
43193  fi
43194
43195
43196
43197
43198
43199
43200  ###############################################################################
43201  #
43202  # The ubiquitous freetype library is used to render fonts.
43203  #
43204
43205# Check whether --with-freetype was given.
43206if test "${with_freetype+set}" = set; then :
43207  withval=$with_freetype;
43208fi
43209
43210
43211# Check whether --with-freetype-include was given.
43212if test "${with_freetype_include+set}" = set; then :
43213  withval=$with_freetype_include;
43214fi
43215
43216
43217# Check whether --with-freetype-lib was given.
43218if test "${with_freetype_lib+set}" = set; then :
43219  withval=$with_freetype_lib;
43220fi
43221
43222  # Check whether --enable-freetype-bundling was given.
43223if test "${enable_freetype_bundling+set}" = set; then :
43224  enableval=$enable_freetype_bundling;
43225fi
43226
43227
43228  FREETYPE_CFLAGS=
43229  FREETYPE_LIBS=
43230  FREETYPE_BUNDLE_LIB_PATH=
43231
43232  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43233    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43234      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43235$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43236    fi
43237    if test "x$enable_freetype_bundling" != x; then
43238      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43239$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43240    fi
43241  else
43242    # freetype is needed to build; go get it!
43243
43244    BUNDLE_FREETYPE="$enable_freetype_bundling"
43245
43246    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43247      # User has specified settings
43248
43249      if test "x$BUNDLE_FREETYPE" = x; then
43250        # If not specified, default is to bundle freetype
43251        BUNDLE_FREETYPE=yes
43252      fi
43253
43254      if test "x$with_freetype" != x; then
43255        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43256        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43257      fi
43258
43259      # Allow --with-freetype-lib and --with-freetype-include to override
43260      if test "x$with_freetype_include" != x; then
43261        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43262      fi
43263      if test "x$with_freetype_lib" != x; then
43264        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43265      fi
43266
43267      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43268        # Okay, we got it. Check that it works.
43269
43270  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43271  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43272  METHOD="--with-freetype"
43273
43274  # First check if the files exists.
43275  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43276    # We found an arbitrary include file. That's a good sign.
43277    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43278$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43279    FOUND_FREETYPE=yes
43280
43281    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43282    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43283      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43284$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43285      FOUND_FREETYPE=no
43286    else
43287      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43288        # On Windows, we will need both .lib and .dll file.
43289        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43290          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43291$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43292          FOUND_FREETYPE=no
43293        fi
43294      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
43295        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43296        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43297      fi
43298    fi
43299  fi
43300
43301  if test "x$FOUND_FREETYPE" = xyes; then
43302
43303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43304
43305  # Input might be given as Windows format, start by converting to
43306  # unix format.
43307  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43308  new_path=`$CYGPATH -u "$path"`
43309
43310  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43311  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43312  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43313  # "foo.exe" is OK but "foo" is an error.
43314  #
43315  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43316  # It is also a way to make sure we got the proper file name for the real test later on.
43317  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43318  if test "x$test_shortpath" = x; then
43319    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43320$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43321    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43322  fi
43323
43324  # Call helper function which possibly converts this using DOS-style short mode.
43325  # If so, the updated path is stored in $new_path.
43326
43327  input_path="$new_path"
43328  # Check if we need to convert this using DOS-style short mode. If the path
43329  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43330  # take no chances and rewrite it.
43331  # Note: m4 eats our [], so we need to use [ and ] instead.
43332  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43333  if test "x$has_forbidden_chars" != x; then
43334    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43335    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43336    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43337    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43338      # Going to short mode and back again did indeed matter. Since short mode is
43339      # case insensitive, let's make it lowercase to improve readability.
43340      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43341      # Now convert it back to Unix-stile (cygpath)
43342      input_path=`$CYGPATH -u "$shortmode_path"`
43343      new_path="$input_path"
43344    fi
43345  fi
43346
43347  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43348  if test "x$test_cygdrive_prefix" = x; then
43349    # As a simple fix, exclude /usr/bin since it's not a real path.
43350    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43351      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43352      # a path prefixed by /cygdrive for fixpath to work.
43353      new_path="$CYGWIN_ROOT_PATH$input_path"
43354    fi
43355  fi
43356
43357
43358  if test "x$path" != "x$new_path"; then
43359    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43360    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43361$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43362  fi
43363
43364  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43365
43366  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43367  has_colon=`$ECHO $path | $GREP ^.:`
43368  new_path="$path"
43369  if test "x$has_colon" = x; then
43370    # Not in mixed or Windows style, start by that.
43371    new_path=`cmd //c echo $path`
43372  fi
43373
43374
43375  input_path="$new_path"
43376  # Check if we need to convert this using DOS-style short mode. If the path
43377  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43378  # take no chances and rewrite it.
43379  # Note: m4 eats our [], so we need to use [ and ] instead.
43380  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43381  if test "x$has_forbidden_chars" != x; then
43382    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43383    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43384  fi
43385
43386
43387  windows_path="$new_path"
43388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43389    unix_path=`$CYGPATH -u "$windows_path"`
43390    new_path="$unix_path"
43391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43393    new_path="$unix_path"
43394  fi
43395
43396  if test "x$path" != "x$new_path"; then
43397    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43399$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43400  fi
43401
43402  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43403  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43404
43405  else
43406    # We're on a posix platform. Hooray! :)
43407    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43408    has_space=`$ECHO "$path" | $GREP " "`
43409    if test "x$has_space" != x; then
43410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43412      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43413    fi
43414
43415    # Use eval to expand a potential ~
43416    eval path="$path"
43417    if test ! -f "$path" && test ! -d "$path"; then
43418      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43419    fi
43420
43421    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43422  fi
43423
43424
43425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43426
43427  # Input might be given as Windows format, start by converting to
43428  # unix format.
43429  path="$POTENTIAL_FREETYPE_LIB_PATH"
43430  new_path=`$CYGPATH -u "$path"`
43431
43432  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43433  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43434  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43435  # "foo.exe" is OK but "foo" is an error.
43436  #
43437  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43438  # It is also a way to make sure we got the proper file name for the real test later on.
43439  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43440  if test "x$test_shortpath" = x; then
43441    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43442$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43443    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43444  fi
43445
43446  # Call helper function which possibly converts this using DOS-style short mode.
43447  # If so, the updated path is stored in $new_path.
43448
43449  input_path="$new_path"
43450  # Check if we need to convert this using DOS-style short mode. If the path
43451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43452  # take no chances and rewrite it.
43453  # Note: m4 eats our [], so we need to use [ and ] instead.
43454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43455  if test "x$has_forbidden_chars" != x; then
43456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43457    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43458    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43459    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43460      # Going to short mode and back again did indeed matter. Since short mode is
43461      # case insensitive, let's make it lowercase to improve readability.
43462      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43463      # Now convert it back to Unix-stile (cygpath)
43464      input_path=`$CYGPATH -u "$shortmode_path"`
43465      new_path="$input_path"
43466    fi
43467  fi
43468
43469  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43470  if test "x$test_cygdrive_prefix" = x; then
43471    # As a simple fix, exclude /usr/bin since it's not a real path.
43472    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43473      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43474      # a path prefixed by /cygdrive for fixpath to work.
43475      new_path="$CYGWIN_ROOT_PATH$input_path"
43476    fi
43477  fi
43478
43479
43480  if test "x$path" != "x$new_path"; then
43481    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43482    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43483$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43484  fi
43485
43486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43487
43488  path="$POTENTIAL_FREETYPE_LIB_PATH"
43489  has_colon=`$ECHO $path | $GREP ^.:`
43490  new_path="$path"
43491  if test "x$has_colon" = x; then
43492    # Not in mixed or Windows style, start by that.
43493    new_path=`cmd //c echo $path`
43494  fi
43495
43496
43497  input_path="$new_path"
43498  # Check if we need to convert this using DOS-style short mode. If the path
43499  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43500  # take no chances and rewrite it.
43501  # Note: m4 eats our [], so we need to use [ and ] instead.
43502  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43503  if test "x$has_forbidden_chars" != x; then
43504    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43505    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43506  fi
43507
43508
43509  windows_path="$new_path"
43510  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43511    unix_path=`$CYGPATH -u "$windows_path"`
43512    new_path="$unix_path"
43513  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43514    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43515    new_path="$unix_path"
43516  fi
43517
43518  if test "x$path" != "x$new_path"; then
43519    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43521$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43522  fi
43523
43524  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43525  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43526
43527  else
43528    # We're on a posix platform. Hooray! :)
43529    path="$POTENTIAL_FREETYPE_LIB_PATH"
43530    has_space=`$ECHO "$path" | $GREP " "`
43531    if test "x$has_space" != x; then
43532      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43533$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43534      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43535    fi
43536
43537    # Use eval to expand a potential ~
43538    eval path="$path"
43539    if test ! -f "$path" && test ! -d "$path"; then
43540      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43541    fi
43542
43543    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43544  fi
43545
43546
43547    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43548    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43549$as_echo_n "checking for freetype includes... " >&6; }
43550    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43551$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43552    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43553    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43554$as_echo_n "checking for freetype libraries... " >&6; }
43555    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43556$as_echo "$FREETYPE_LIB_PATH" >&6; }
43557  fi
43558
43559        if test "x$FOUND_FREETYPE" != xyes; then
43560          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43561        fi
43562      else
43563        # User specified only one of lib or include. This is an error.
43564        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43565          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43566$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43567          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43568        else
43569          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43570$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43571          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43572        fi
43573      fi
43574    else
43575      # User did not specify settings, but we need freetype. Try to locate it.
43576
43577      if test "x$BUNDLE_FREETYPE" = x; then
43578        # If not specified, default is to bundle freetype only on windows
43579        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43580          BUNDLE_FREETYPE=yes
43581        else
43582          BUNDLE_FREETYPE=no
43583        fi
43584      fi
43585
43586      if test "x$FOUND_FREETYPE" != xyes; then
43587        # Check builddeps
43588
43589
43590  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43591    # Source the builddeps file again, to make sure it uses the latest variables!
43592    . $builddepsfile
43593    # Look for a target and build machine specific resource!
43594    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43595    if test "x$resource" = x; then
43596      # Ok, lets instead look for a target specific resource
43597      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43598    fi
43599    if test "x$resource" = x; then
43600      # Ok, lets instead look for a build specific resource
43601      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43602    fi
43603    if test "x$resource" = x; then
43604      # Ok, lets instead look for a generic resource
43605      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43606      resource=${builddep_freetype2}
43607    fi
43608    if test "x$resource" != x; then
43609      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43610$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43611      # If the resource in the builddeps.conf file is an existing directory,
43612      # for example /java/linux/cups
43613      if test -d ${resource}; then
43614        depdir=${resource}
43615      else
43616
43617  # freetype2 is for example mymodule
43618  # $resource is for example libs/general/libmymod_1_2_3.zip
43619  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43620  # $with_builddeps_dir is for example /localhome/builddeps
43621  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43622  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43623  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43624  filename=`basename $resource`
43625  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43626  filebase=${filename%%.*}
43627  extension=${filename#*.}
43628  installdir=$with_builddeps_dir/$filebase
43629  if test ! -f $installdir/$filename.unpacked; then
43630    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43631$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43632    if test ! -d $installdir; then
43633      mkdir -p $installdir
43634    fi
43635    if test ! -d $installdir; then
43636      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43637    fi
43638    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43639    touch $tmpfile
43640    if test ! -f $tmpfile; then
43641      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43642    fi
43643
43644  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43645  # $tmpfile is the local file name for the downloaded file.
43646  VALID_TOOL=no
43647  if test "x$BDEPS_FTP" = xwget; then
43648    VALID_TOOL=yes
43649    wget -O $tmpfile $with_builddeps_server/$resource
43650  fi
43651  if test "x$BDEPS_FTP" = xlftp; then
43652    VALID_TOOL=yes
43653    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43654  fi
43655  if test "x$BDEPS_FTP" = xftp; then
43656    VALID_TOOL=yes
43657    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43658    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43659    FTPUSERPWD=${FTPSERVER%%@*}
43660    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43661      FTPUSER=${userpwd%%:*}
43662      FTPPWD=${userpwd#*@}
43663      FTPSERVER=${FTPSERVER#*@}
43664    else
43665      FTPUSER=ftp
43666      FTPPWD=ftp
43667    fi
43668    # the "pass" command does not work on some
43669    # ftp clients (read ftp.exe) but if it works,
43670    # passive mode is better!
43671    ( \
43672        echo "user $FTPUSER $FTPPWD"        ; \
43673        echo "pass"                         ; \
43674        echo "bin"                          ; \
43675        echo "get $FTPPATH $tmpfile"              ; \
43676    ) | ftp -in $FTPSERVER
43677  fi
43678  if test "x$VALID_TOOL" != xyes; then
43679    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43680  fi
43681
43682    mv $tmpfile $installdir/$filename
43683    if test ! -s $installdir/$filename; then
43684      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43685    fi
43686    case "$extension" in
43687      zip)  echo "Unzipping $installdir/$filename..."
43688        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43689        ;;
43690      tar.gz) echo "Untaring $installdir/$filename..."
43691        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43692        ;;
43693      tgz) echo "Untaring $installdir/$filename..."
43694        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43695        ;;
43696      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43697        ;;
43698    esac
43699  fi
43700  if test -f $installdir/$filename.unpacked; then
43701    depdir=$installdir
43702  fi
43703
43704      fi
43705      # Source the builddeps file again, because in the previous command, the depdir
43706      # was updated to point at the current build dependency install directory.
43707      . $builddepsfile
43708      # Now extract variables from the builddeps.conf files.
43709      theroot=${builddep_freetype2_ROOT}
43710      thecflags=${builddep_freetype2_CFLAGS}
43711      thelibs=${builddep_freetype2_LIBS}
43712      if test "x$depdir" = x; then
43713        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43714      fi
43715      FREETYPE=$depdir
43716      if test "x$theroot" != x; then
43717        FREETYPE="$theroot"
43718      fi
43719      if test "x$thecflags" != x; then
43720        FREETYPE_CFLAGS="$thecflags"
43721      fi
43722      if test "x$thelibs" != x; then
43723        FREETYPE_LIBS="$thelibs"
43724      fi
43725      FOUND_FREETYPE=yes
43726      else FOUND_FREETYPE=no
43727
43728    fi
43729    else FOUND_FREETYPE=no
43730
43731  fi
43732
43733        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43734        if test "x$FOUND_FREETYPE" = xyes; then
43735          if test "x$BUNDLE_FREETYPE" = xyes; then
43736            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43737$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43738            FOUND_FREETYPE=no
43739          else
43740            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43741$as_echo_n "checking for freetype... " >&6; }
43742            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43743$as_echo "yes (using builddeps)" >&6; }
43744          fi
43745        fi
43746      fi
43747
43748      if test "x$FOUND_FREETYPE" != xyes; then
43749        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43750        if test "x$PKG_CONFIG" != x; then
43751
43752pkg_failed=no
43753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43754$as_echo_n "checking for FREETYPE... " >&6; }
43755
43756if test -n "$FREETYPE_CFLAGS"; then
43757    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43758 elif test -n "$PKG_CONFIG"; then
43759    if test -n "$PKG_CONFIG" && \
43760    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43761  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43762  ac_status=$?
43763  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43764  test $ac_status = 0; }; then
43765  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43766else
43767  pkg_failed=yes
43768fi
43769 else
43770    pkg_failed=untried
43771fi
43772if test -n "$FREETYPE_LIBS"; then
43773    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43774 elif test -n "$PKG_CONFIG"; then
43775    if test -n "$PKG_CONFIG" && \
43776    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43777  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43778  ac_status=$?
43779  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43780  test $ac_status = 0; }; then
43781  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43782else
43783  pkg_failed=yes
43784fi
43785 else
43786    pkg_failed=untried
43787fi
43788
43789
43790
43791if test $pkg_failed = yes; then
43792
43793if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43794        _pkg_short_errors_supported=yes
43795else
43796        _pkg_short_errors_supported=no
43797fi
43798        if test $_pkg_short_errors_supported = yes; then
43799	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43800        else
43801	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43802        fi
43803	# Put the nasty error message in config.log where it belongs
43804	echo "$FREETYPE_PKG_ERRORS" >&5
43805
43806	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43807$as_echo "no" >&6; }
43808                FOUND_FREETYPE=no
43809elif test $pkg_failed = untried; then
43810	FOUND_FREETYPE=no
43811else
43812	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43813	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43815$as_echo "yes" >&6; }
43816	FOUND_FREETYPE=yes
43817fi
43818          if test "x$FOUND_FREETYPE" = xyes; then
43819            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43820            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43821            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43822            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43823              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43824            fi
43825            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43826            if test "x$BUNDLE_FREETYPE" = xyes; then
43827              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43828$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43829              FOUND_FREETYPE=no
43830            else
43831              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43832$as_echo_n "checking for freetype... " >&6; }
43833              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43834$as_echo "yes (using pkg-config)" >&6; }
43835            fi
43836          fi
43837        fi
43838      fi
43839
43840      if test "x$FOUND_FREETYPE" != xyes; then
43841        # Check in well-known locations
43842        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43843          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43844
43845  windows_path="$FREETYPE_BASE_DIR"
43846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43847    unix_path=`$CYGPATH -u "$windows_path"`
43848    FREETYPE_BASE_DIR="$unix_path"
43849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43851    FREETYPE_BASE_DIR="$unix_path"
43852  fi
43853
43854
43855  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43856  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43857  METHOD="well-known location"
43858
43859  # First check if the files exists.
43860  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43861    # We found an arbitrary include file. That's a good sign.
43862    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43863$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43864    FOUND_FREETYPE=yes
43865
43866    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43867    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43868      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43869$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43870      FOUND_FREETYPE=no
43871    else
43872      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43873        # On Windows, we will need both .lib and .dll file.
43874        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43875          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43876$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43877          FOUND_FREETYPE=no
43878        fi
43879      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
43880        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43881        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43882      fi
43883    fi
43884  fi
43885
43886  if test "x$FOUND_FREETYPE" = xyes; then
43887
43888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43889
43890  # Input might be given as Windows format, start by converting to
43891  # unix format.
43892  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43893  new_path=`$CYGPATH -u "$path"`
43894
43895  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43896  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43897  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43898  # "foo.exe" is OK but "foo" is an error.
43899  #
43900  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43901  # It is also a way to make sure we got the proper file name for the real test later on.
43902  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43903  if test "x$test_shortpath" = x; then
43904    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43905$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43906    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43907  fi
43908
43909  # Call helper function which possibly converts this using DOS-style short mode.
43910  # If so, the updated path is stored in $new_path.
43911
43912  input_path="$new_path"
43913  # Check if we need to convert this using DOS-style short mode. If the path
43914  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43915  # take no chances and rewrite it.
43916  # Note: m4 eats our [], so we need to use [ and ] instead.
43917  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43918  if test "x$has_forbidden_chars" != x; then
43919    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43920    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43921    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43922    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43923      # Going to short mode and back again did indeed matter. Since short mode is
43924      # case insensitive, let's make it lowercase to improve readability.
43925      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43926      # Now convert it back to Unix-stile (cygpath)
43927      input_path=`$CYGPATH -u "$shortmode_path"`
43928      new_path="$input_path"
43929    fi
43930  fi
43931
43932  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43933  if test "x$test_cygdrive_prefix" = x; then
43934    # As a simple fix, exclude /usr/bin since it's not a real path.
43935    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43936      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43937      # a path prefixed by /cygdrive for fixpath to work.
43938      new_path="$CYGWIN_ROOT_PATH$input_path"
43939    fi
43940  fi
43941
43942
43943  if test "x$path" != "x$new_path"; then
43944    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43946$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43947  fi
43948
43949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43950
43951  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43952  has_colon=`$ECHO $path | $GREP ^.:`
43953  new_path="$path"
43954  if test "x$has_colon" = x; then
43955    # Not in mixed or Windows style, start by that.
43956    new_path=`cmd //c echo $path`
43957  fi
43958
43959
43960  input_path="$new_path"
43961  # Check if we need to convert this using DOS-style short mode. If the path
43962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43963  # take no chances and rewrite it.
43964  # Note: m4 eats our [], so we need to use [ and ] instead.
43965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43966  if test "x$has_forbidden_chars" != x; then
43967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43969  fi
43970
43971
43972  windows_path="$new_path"
43973  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43974    unix_path=`$CYGPATH -u "$windows_path"`
43975    new_path="$unix_path"
43976  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43977    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43978    new_path="$unix_path"
43979  fi
43980
43981  if test "x$path" != "x$new_path"; then
43982    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43985  fi
43986
43987  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43988  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43989
43990  else
43991    # We're on a posix platform. Hooray! :)
43992    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43993    has_space=`$ECHO "$path" | $GREP " "`
43994    if test "x$has_space" != x; then
43995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43996$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43997      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43998    fi
43999
44000    # Use eval to expand a potential ~
44001    eval path="$path"
44002    if test ! -f "$path" && test ! -d "$path"; then
44003      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44004    fi
44005
44006    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44007  fi
44008
44009
44010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44011
44012  # Input might be given as Windows format, start by converting to
44013  # unix format.
44014  path="$POTENTIAL_FREETYPE_LIB_PATH"
44015  new_path=`$CYGPATH -u "$path"`
44016
44017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44020  # "foo.exe" is OK but "foo" is an error.
44021  #
44022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44023  # It is also a way to make sure we got the proper file name for the real test later on.
44024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44025  if test "x$test_shortpath" = x; then
44026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44027$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44028    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44029  fi
44030
44031  # Call helper function which possibly converts this using DOS-style short mode.
44032  # If so, the updated path is stored in $new_path.
44033
44034  input_path="$new_path"
44035  # Check if we need to convert this using DOS-style short mode. If the path
44036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44037  # take no chances and rewrite it.
44038  # Note: m4 eats our [], so we need to use [ and ] instead.
44039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44040  if test "x$has_forbidden_chars" != x; then
44041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44045      # Going to short mode and back again did indeed matter. Since short mode is
44046      # case insensitive, let's make it lowercase to improve readability.
44047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44048      # Now convert it back to Unix-stile (cygpath)
44049      input_path=`$CYGPATH -u "$shortmode_path"`
44050      new_path="$input_path"
44051    fi
44052  fi
44053
44054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44055  if test "x$test_cygdrive_prefix" = x; then
44056    # As a simple fix, exclude /usr/bin since it's not a real path.
44057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44059      # a path prefixed by /cygdrive for fixpath to work.
44060      new_path="$CYGWIN_ROOT_PATH$input_path"
44061    fi
44062  fi
44063
44064
44065  if test "x$path" != "x$new_path"; then
44066    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44068$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44069  fi
44070
44071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44072
44073  path="$POTENTIAL_FREETYPE_LIB_PATH"
44074  has_colon=`$ECHO $path | $GREP ^.:`
44075  new_path="$path"
44076  if test "x$has_colon" = x; then
44077    # Not in mixed or Windows style, start by that.
44078    new_path=`cmd //c echo $path`
44079  fi
44080
44081
44082  input_path="$new_path"
44083  # Check if we need to convert this using DOS-style short mode. If the path
44084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44085  # take no chances and rewrite it.
44086  # Note: m4 eats our [], so we need to use [ and ] instead.
44087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44088  if test "x$has_forbidden_chars" != x; then
44089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44091  fi
44092
44093
44094  windows_path="$new_path"
44095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44096    unix_path=`$CYGPATH -u "$windows_path"`
44097    new_path="$unix_path"
44098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44100    new_path="$unix_path"
44101  fi
44102
44103  if test "x$path" != "x$new_path"; then
44104    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44106$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44107  fi
44108
44109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44111
44112  else
44113    # We're on a posix platform. Hooray! :)
44114    path="$POTENTIAL_FREETYPE_LIB_PATH"
44115    has_space=`$ECHO "$path" | $GREP " "`
44116    if test "x$has_space" != x; then
44117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44118$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44120    fi
44121
44122    # Use eval to expand a potential ~
44123    eval path="$path"
44124    if test ! -f "$path" && test ! -d "$path"; then
44125      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44126    fi
44127
44128    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44129  fi
44130
44131
44132    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44134$as_echo_n "checking for freetype includes... " >&6; }
44135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44136$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44137    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44138    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44139$as_echo_n "checking for freetype libraries... " >&6; }
44140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44141$as_echo "$FREETYPE_LIB_PATH" >&6; }
44142  fi
44143
44144          if test "x$FOUND_FREETYPE" != xyes; then
44145            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44146
44147  windows_path="$FREETYPE_BASE_DIR"
44148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44149    unix_path=`$CYGPATH -u "$windows_path"`
44150    FREETYPE_BASE_DIR="$unix_path"
44151  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44152    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44153    FREETYPE_BASE_DIR="$unix_path"
44154  fi
44155
44156
44157  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44158  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44159  METHOD="well-known location"
44160
44161  # First check if the files exists.
44162  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44163    # We found an arbitrary include file. That's a good sign.
44164    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44165$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44166    FOUND_FREETYPE=yes
44167
44168    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44169    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44170      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44171$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44172      FOUND_FREETYPE=no
44173    else
44174      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44175        # On Windows, we will need both .lib and .dll file.
44176        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44177          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44179          FOUND_FREETYPE=no
44180        fi
44181      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
44182        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44183        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44184      fi
44185    fi
44186  fi
44187
44188  if test "x$FOUND_FREETYPE" = xyes; then
44189
44190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44191
44192  # Input might be given as Windows format, start by converting to
44193  # unix format.
44194  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44195  new_path=`$CYGPATH -u "$path"`
44196
44197  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44198  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44199  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44200  # "foo.exe" is OK but "foo" is an error.
44201  #
44202  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44203  # It is also a way to make sure we got the proper file name for the real test later on.
44204  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44205  if test "x$test_shortpath" = x; then
44206    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44207$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44208    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44209  fi
44210
44211  # Call helper function which possibly converts this using DOS-style short mode.
44212  # If so, the updated path is stored in $new_path.
44213
44214  input_path="$new_path"
44215  # Check if we need to convert this using DOS-style short mode. If the path
44216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44217  # take no chances and rewrite it.
44218  # Note: m4 eats our [], so we need to use [ and ] instead.
44219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44220  if test "x$has_forbidden_chars" != x; then
44221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44225      # Going to short mode and back again did indeed matter. Since short mode is
44226      # case insensitive, let's make it lowercase to improve readability.
44227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44228      # Now convert it back to Unix-stile (cygpath)
44229      input_path=`$CYGPATH -u "$shortmode_path"`
44230      new_path="$input_path"
44231    fi
44232  fi
44233
44234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44235  if test "x$test_cygdrive_prefix" = x; then
44236    # As a simple fix, exclude /usr/bin since it's not a real path.
44237    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44239      # a path prefixed by /cygdrive for fixpath to work.
44240      new_path="$CYGWIN_ROOT_PATH$input_path"
44241    fi
44242  fi
44243
44244
44245  if test "x$path" != "x$new_path"; then
44246    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44247    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44248$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44249  fi
44250
44251  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44252
44253  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44254  has_colon=`$ECHO $path | $GREP ^.:`
44255  new_path="$path"
44256  if test "x$has_colon" = x; then
44257    # Not in mixed or Windows style, start by that.
44258    new_path=`cmd //c echo $path`
44259  fi
44260
44261
44262  input_path="$new_path"
44263  # Check if we need to convert this using DOS-style short mode. If the path
44264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44265  # take no chances and rewrite it.
44266  # Note: m4 eats our [], so we need to use [ and ] instead.
44267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44268  if test "x$has_forbidden_chars" != x; then
44269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44270    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44271  fi
44272
44273
44274  windows_path="$new_path"
44275  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44276    unix_path=`$CYGPATH -u "$windows_path"`
44277    new_path="$unix_path"
44278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44279    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44280    new_path="$unix_path"
44281  fi
44282
44283  if test "x$path" != "x$new_path"; then
44284    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44285    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44286$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44287  fi
44288
44289  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44290  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44291
44292  else
44293    # We're on a posix platform. Hooray! :)
44294    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44295    has_space=`$ECHO "$path" | $GREP " "`
44296    if test "x$has_space" != x; then
44297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44298$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44299      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44300    fi
44301
44302    # Use eval to expand a potential ~
44303    eval path="$path"
44304    if test ! -f "$path" && test ! -d "$path"; then
44305      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44306    fi
44307
44308    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44309  fi
44310
44311
44312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44313
44314  # Input might be given as Windows format, start by converting to
44315  # unix format.
44316  path="$POTENTIAL_FREETYPE_LIB_PATH"
44317  new_path=`$CYGPATH -u "$path"`
44318
44319  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44320  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44321  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44322  # "foo.exe" is OK but "foo" is an error.
44323  #
44324  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44325  # It is also a way to make sure we got the proper file name for the real test later on.
44326  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44327  if test "x$test_shortpath" = x; then
44328    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44329$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44330    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44331  fi
44332
44333  # Call helper function which possibly converts this using DOS-style short mode.
44334  # If so, the updated path is stored in $new_path.
44335
44336  input_path="$new_path"
44337  # Check if we need to convert this using DOS-style short mode. If the path
44338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44339  # take no chances and rewrite it.
44340  # Note: m4 eats our [], so we need to use [ and ] instead.
44341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44342  if test "x$has_forbidden_chars" != x; then
44343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44344    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44345    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44346    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44347      # Going to short mode and back again did indeed matter. Since short mode is
44348      # case insensitive, let's make it lowercase to improve readability.
44349      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44350      # Now convert it back to Unix-stile (cygpath)
44351      input_path=`$CYGPATH -u "$shortmode_path"`
44352      new_path="$input_path"
44353    fi
44354  fi
44355
44356  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44357  if test "x$test_cygdrive_prefix" = x; then
44358    # As a simple fix, exclude /usr/bin since it's not a real path.
44359    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44360      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44361      # a path prefixed by /cygdrive for fixpath to work.
44362      new_path="$CYGWIN_ROOT_PATH$input_path"
44363    fi
44364  fi
44365
44366
44367  if test "x$path" != "x$new_path"; then
44368    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44370$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44371  fi
44372
44373  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44374
44375  path="$POTENTIAL_FREETYPE_LIB_PATH"
44376  has_colon=`$ECHO $path | $GREP ^.:`
44377  new_path="$path"
44378  if test "x$has_colon" = x; then
44379    # Not in mixed or Windows style, start by that.
44380    new_path=`cmd //c echo $path`
44381  fi
44382
44383
44384  input_path="$new_path"
44385  # Check if we need to convert this using DOS-style short mode. If the path
44386  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44387  # take no chances and rewrite it.
44388  # Note: m4 eats our [], so we need to use [ and ] instead.
44389  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44390  if test "x$has_forbidden_chars" != x; then
44391    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44392    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44393  fi
44394
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405  if test "x$path" != "x$new_path"; then
44406    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44409  fi
44410
44411  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44412  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44413
44414  else
44415    # We're on a posix platform. Hooray! :)
44416    path="$POTENTIAL_FREETYPE_LIB_PATH"
44417    has_space=`$ECHO "$path" | $GREP " "`
44418    if test "x$has_space" != x; then
44419      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44421      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44422    fi
44423
44424    # Use eval to expand a potential ~
44425    eval path="$path"
44426    if test ! -f "$path" && test ! -d "$path"; then
44427      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44428    fi
44429
44430    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44431  fi
44432
44433
44434    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44435    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44436$as_echo_n "checking for freetype includes... " >&6; }
44437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44438$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44439    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44441$as_echo_n "checking for freetype libraries... " >&6; }
44442    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44443$as_echo "$FREETYPE_LIB_PATH" >&6; }
44444  fi
44445
44446          fi
44447        else
44448          if test "x$SYS_ROOT" = "x/"; then
44449            FREETYPE_ROOT=
44450          else
44451            FREETYPE_ROOT="$SYS_ROOT"
44452          fi
44453          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44454
44455  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44456  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44457  METHOD="well-known location"
44458
44459  # First check if the files exists.
44460  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44461    # We found an arbitrary include file. That's a good sign.
44462    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44463$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44464    FOUND_FREETYPE=yes
44465
44466    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44467    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44468      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44469$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44470      FOUND_FREETYPE=no
44471    else
44472      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44473        # On Windows, we will need both .lib and .dll file.
44474        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44475          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44476$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44477          FOUND_FREETYPE=no
44478        fi
44479      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
44480        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44481        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44482      fi
44483    fi
44484  fi
44485
44486  if test "x$FOUND_FREETYPE" = xyes; then
44487
44488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44489
44490  # Input might be given as Windows format, start by converting to
44491  # unix format.
44492  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44493  new_path=`$CYGPATH -u "$path"`
44494
44495  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44496  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44497  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44498  # "foo.exe" is OK but "foo" is an error.
44499  #
44500  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44501  # It is also a way to make sure we got the proper file name for the real test later on.
44502  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44503  if test "x$test_shortpath" = x; then
44504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44505$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44506    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44507  fi
44508
44509  # Call helper function which possibly converts this using DOS-style short mode.
44510  # If so, the updated path is stored in $new_path.
44511
44512  input_path="$new_path"
44513  # Check if we need to convert this using DOS-style short mode. If the path
44514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44515  # take no chances and rewrite it.
44516  # Note: m4 eats our [], so we need to use [ and ] instead.
44517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44518  if test "x$has_forbidden_chars" != x; then
44519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44520    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44521    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44522    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44523      # Going to short mode and back again did indeed matter. Since short mode is
44524      # case insensitive, let's make it lowercase to improve readability.
44525      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44526      # Now convert it back to Unix-stile (cygpath)
44527      input_path=`$CYGPATH -u "$shortmode_path"`
44528      new_path="$input_path"
44529    fi
44530  fi
44531
44532  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44533  if test "x$test_cygdrive_prefix" = x; then
44534    # As a simple fix, exclude /usr/bin since it's not a real path.
44535    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44536      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44537      # a path prefixed by /cygdrive for fixpath to work.
44538      new_path="$CYGWIN_ROOT_PATH$input_path"
44539    fi
44540  fi
44541
44542
44543  if test "x$path" != "x$new_path"; then
44544    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44547  fi
44548
44549  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44550
44551  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44552  has_colon=`$ECHO $path | $GREP ^.:`
44553  new_path="$path"
44554  if test "x$has_colon" = x; then
44555    # Not in mixed or Windows style, start by that.
44556    new_path=`cmd //c echo $path`
44557  fi
44558
44559
44560  input_path="$new_path"
44561  # Check if we need to convert this using DOS-style short mode. If the path
44562  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44563  # take no chances and rewrite it.
44564  # Note: m4 eats our [], so we need to use [ and ] instead.
44565  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44566  if test "x$has_forbidden_chars" != x; then
44567    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44568    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44569  fi
44570
44571
44572  windows_path="$new_path"
44573  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44574    unix_path=`$CYGPATH -u "$windows_path"`
44575    new_path="$unix_path"
44576  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44577    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44578    new_path="$unix_path"
44579  fi
44580
44581  if test "x$path" != "x$new_path"; then
44582    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44584$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44585  fi
44586
44587  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44588  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44589
44590  else
44591    # We're on a posix platform. Hooray! :)
44592    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44593    has_space=`$ECHO "$path" | $GREP " "`
44594    if test "x$has_space" != x; then
44595      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44596$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44597      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44598    fi
44599
44600    # Use eval to expand a potential ~
44601    eval path="$path"
44602    if test ! -f "$path" && test ! -d "$path"; then
44603      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44604    fi
44605
44606    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44607  fi
44608
44609
44610  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44611
44612  # Input might be given as Windows format, start by converting to
44613  # unix format.
44614  path="$POTENTIAL_FREETYPE_LIB_PATH"
44615  new_path=`$CYGPATH -u "$path"`
44616
44617  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44618  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44619  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44620  # "foo.exe" is OK but "foo" is an error.
44621  #
44622  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44623  # It is also a way to make sure we got the proper file name for the real test later on.
44624  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44625  if test "x$test_shortpath" = x; then
44626    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44627$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44628    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44629  fi
44630
44631  # Call helper function which possibly converts this using DOS-style short mode.
44632  # If so, the updated path is stored in $new_path.
44633
44634  input_path="$new_path"
44635  # Check if we need to convert this using DOS-style short mode. If the path
44636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44637  # take no chances and rewrite it.
44638  # Note: m4 eats our [], so we need to use [ and ] instead.
44639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44640  if test "x$has_forbidden_chars" != x; then
44641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44642    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44643    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44644    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44645      # Going to short mode and back again did indeed matter. Since short mode is
44646      # case insensitive, let's make it lowercase to improve readability.
44647      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44648      # Now convert it back to Unix-stile (cygpath)
44649      input_path=`$CYGPATH -u "$shortmode_path"`
44650      new_path="$input_path"
44651    fi
44652  fi
44653
44654  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44655  if test "x$test_cygdrive_prefix" = x; then
44656    # As a simple fix, exclude /usr/bin since it's not a real path.
44657    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44658      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44659      # a path prefixed by /cygdrive for fixpath to work.
44660      new_path="$CYGWIN_ROOT_PATH$input_path"
44661    fi
44662  fi
44663
44664
44665  if test "x$path" != "x$new_path"; then
44666    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44667    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44668$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44669  fi
44670
44671  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44672
44673  path="$POTENTIAL_FREETYPE_LIB_PATH"
44674  has_colon=`$ECHO $path | $GREP ^.:`
44675  new_path="$path"
44676  if test "x$has_colon" = x; then
44677    # Not in mixed or Windows style, start by that.
44678    new_path=`cmd //c echo $path`
44679  fi
44680
44681
44682  input_path="$new_path"
44683  # Check if we need to convert this using DOS-style short mode. If the path
44684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44685  # take no chances and rewrite it.
44686  # Note: m4 eats our [], so we need to use [ and ] instead.
44687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44688  if test "x$has_forbidden_chars" != x; then
44689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44690    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44691  fi
44692
44693
44694  windows_path="$new_path"
44695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44696    unix_path=`$CYGPATH -u "$windows_path"`
44697    new_path="$unix_path"
44698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44699    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44700    new_path="$unix_path"
44701  fi
44702
44703  if test "x$path" != "x$new_path"; then
44704    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44707  fi
44708
44709  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44710  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44711
44712  else
44713    # We're on a posix platform. Hooray! :)
44714    path="$POTENTIAL_FREETYPE_LIB_PATH"
44715    has_space=`$ECHO "$path" | $GREP " "`
44716    if test "x$has_space" != x; then
44717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44718$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44719      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44720    fi
44721
44722    # Use eval to expand a potential ~
44723    eval path="$path"
44724    if test ! -f "$path" && test ! -d "$path"; then
44725      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44726    fi
44727
44728    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44729  fi
44730
44731
44732    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44734$as_echo_n "checking for freetype includes... " >&6; }
44735    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44736$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44737    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44739$as_echo_n "checking for freetype libraries... " >&6; }
44740    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44741$as_echo "$FREETYPE_LIB_PATH" >&6; }
44742  fi
44743
44744
44745          if test "x$FOUND_FREETYPE" != xyes; then
44746            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44747
44748  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44749  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44750  METHOD="well-known location"
44751
44752  # First check if the files exists.
44753  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44754    # We found an arbitrary include file. That's a good sign.
44755    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44756$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44757    FOUND_FREETYPE=yes
44758
44759    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44760    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44761      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44762$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44763      FOUND_FREETYPE=no
44764    else
44765      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44766        # On Windows, we will need both .lib and .dll file.
44767        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44768          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44769$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44770          FOUND_FREETYPE=no
44771        fi
44772      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
44773        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44774        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44775      fi
44776    fi
44777  fi
44778
44779  if test "x$FOUND_FREETYPE" = xyes; then
44780
44781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44782
44783  # Input might be given as Windows format, start by converting to
44784  # unix format.
44785  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44786  new_path=`$CYGPATH -u "$path"`
44787
44788  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44789  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44790  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44791  # "foo.exe" is OK but "foo" is an error.
44792  #
44793  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44794  # It is also a way to make sure we got the proper file name for the real test later on.
44795  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44796  if test "x$test_shortpath" = x; then
44797    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44799    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44800  fi
44801
44802  # Call helper function which possibly converts this using DOS-style short mode.
44803  # If so, the updated path is stored in $new_path.
44804
44805  input_path="$new_path"
44806  # Check if we need to convert this using DOS-style short mode. If the path
44807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44808  # take no chances and rewrite it.
44809  # Note: m4 eats our [], so we need to use [ and ] instead.
44810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44811  if test "x$has_forbidden_chars" != x; then
44812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44816      # Going to short mode and back again did indeed matter. Since short mode is
44817      # case insensitive, let's make it lowercase to improve readability.
44818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44819      # Now convert it back to Unix-stile (cygpath)
44820      input_path=`$CYGPATH -u "$shortmode_path"`
44821      new_path="$input_path"
44822    fi
44823  fi
44824
44825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44826  if test "x$test_cygdrive_prefix" = x; then
44827    # As a simple fix, exclude /usr/bin since it's not a real path.
44828    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44830      # a path prefixed by /cygdrive for fixpath to work.
44831      new_path="$CYGWIN_ROOT_PATH$input_path"
44832    fi
44833  fi
44834
44835
44836  if test "x$path" != "x$new_path"; then
44837    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44838    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44839$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44840  fi
44841
44842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44843
44844  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44845  has_colon=`$ECHO $path | $GREP ^.:`
44846  new_path="$path"
44847  if test "x$has_colon" = x; then
44848    # Not in mixed or Windows style, start by that.
44849    new_path=`cmd //c echo $path`
44850  fi
44851
44852
44853  input_path="$new_path"
44854  # Check if we need to convert this using DOS-style short mode. If the path
44855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44856  # take no chances and rewrite it.
44857  # Note: m4 eats our [], so we need to use [ and ] instead.
44858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44859  if test "x$has_forbidden_chars" != x; then
44860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44861    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44862  fi
44863
44864
44865  windows_path="$new_path"
44866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44867    unix_path=`$CYGPATH -u "$windows_path"`
44868    new_path="$unix_path"
44869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44871    new_path="$unix_path"
44872  fi
44873
44874  if test "x$path" != "x$new_path"; then
44875    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44877$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44878  fi
44879
44880  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44881  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44882
44883  else
44884    # We're on a posix platform. Hooray! :)
44885    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44886    has_space=`$ECHO "$path" | $GREP " "`
44887    if test "x$has_space" != x; then
44888      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44889$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44890      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44891    fi
44892
44893    # Use eval to expand a potential ~
44894    eval path="$path"
44895    if test ! -f "$path" && test ! -d "$path"; then
44896      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44897    fi
44898
44899    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44900  fi
44901
44902
44903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44904
44905  # Input might be given as Windows format, start by converting to
44906  # unix format.
44907  path="$POTENTIAL_FREETYPE_LIB_PATH"
44908  new_path=`$CYGPATH -u "$path"`
44909
44910  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44911  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44912  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44913  # "foo.exe" is OK but "foo" is an error.
44914  #
44915  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44916  # It is also a way to make sure we got the proper file name for the real test later on.
44917  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44918  if test "x$test_shortpath" = x; then
44919    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44920$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44921    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44922  fi
44923
44924  # Call helper function which possibly converts this using DOS-style short mode.
44925  # If so, the updated path is stored in $new_path.
44926
44927  input_path="$new_path"
44928  # Check if we need to convert this using DOS-style short mode. If the path
44929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44930  # take no chances and rewrite it.
44931  # Note: m4 eats our [], so we need to use [ and ] instead.
44932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44933  if test "x$has_forbidden_chars" != x; then
44934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44938      # Going to short mode and back again did indeed matter. Since short mode is
44939      # case insensitive, let's make it lowercase to improve readability.
44940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44941      # Now convert it back to Unix-stile (cygpath)
44942      input_path=`$CYGPATH -u "$shortmode_path"`
44943      new_path="$input_path"
44944    fi
44945  fi
44946
44947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44948  if test "x$test_cygdrive_prefix" = x; then
44949    # As a simple fix, exclude /usr/bin since it's not a real path.
44950    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44952      # a path prefixed by /cygdrive for fixpath to work.
44953      new_path="$CYGWIN_ROOT_PATH$input_path"
44954    fi
44955  fi
44956
44957
44958  if test "x$path" != "x$new_path"; then
44959    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44960    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44961$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44962  fi
44963
44964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44965
44966  path="$POTENTIAL_FREETYPE_LIB_PATH"
44967  has_colon=`$ECHO $path | $GREP ^.:`
44968  new_path="$path"
44969  if test "x$has_colon" = x; then
44970    # Not in mixed or Windows style, start by that.
44971    new_path=`cmd //c echo $path`
44972  fi
44973
44974
44975  input_path="$new_path"
44976  # Check if we need to convert this using DOS-style short mode. If the path
44977  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44978  # take no chances and rewrite it.
44979  # Note: m4 eats our [], so we need to use [ and ] instead.
44980  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44981  if test "x$has_forbidden_chars" != x; then
44982    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44983    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44984  fi
44985
44986
44987  windows_path="$new_path"
44988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44989    unix_path=`$CYGPATH -u "$windows_path"`
44990    new_path="$unix_path"
44991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44993    new_path="$unix_path"
44994  fi
44995
44996  if test "x$path" != "x$new_path"; then
44997    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45000  fi
45001
45002  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45003  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45004
45005  else
45006    # We're on a posix platform. Hooray! :)
45007    path="$POTENTIAL_FREETYPE_LIB_PATH"
45008    has_space=`$ECHO "$path" | $GREP " "`
45009    if test "x$has_space" != x; then
45010      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45011$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45012      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45013    fi
45014
45015    # Use eval to expand a potential ~
45016    eval path="$path"
45017    if test ! -f "$path" && test ! -d "$path"; then
45018      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45019    fi
45020
45021    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45022  fi
45023
45024
45025    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45027$as_echo_n "checking for freetype includes... " >&6; }
45028    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45029$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45030    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45031    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45032$as_echo_n "checking for freetype libraries... " >&6; }
45033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45034$as_echo "$FREETYPE_LIB_PATH" >&6; }
45035  fi
45036
45037          fi
45038
45039          if test "x$FOUND_FREETYPE" != xyes; then
45040            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45041            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45042
45043  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45044  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45045  METHOD="well-known location"
45046
45047  # First check if the files exists.
45048  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45049    # We found an arbitrary include file. That's a good sign.
45050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45051$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45052    FOUND_FREETYPE=yes
45053
45054    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45055    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45056      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45057$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45058      FOUND_FREETYPE=no
45059    else
45060      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45061        # On Windows, we will need both .lib and .dll file.
45062        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45063          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45064$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45065          FOUND_FREETYPE=no
45066        fi
45067      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
45068        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45069        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45070      fi
45071    fi
45072  fi
45073
45074  if test "x$FOUND_FREETYPE" = xyes; then
45075
45076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45077
45078  # Input might be given as Windows format, start by converting to
45079  # unix format.
45080  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45081  new_path=`$CYGPATH -u "$path"`
45082
45083  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45084  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45085  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45086  # "foo.exe" is OK but "foo" is an error.
45087  #
45088  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45089  # It is also a way to make sure we got the proper file name for the real test later on.
45090  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45091  if test "x$test_shortpath" = x; then
45092    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45093$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45094    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45095  fi
45096
45097  # Call helper function which possibly converts this using DOS-style short mode.
45098  # If so, the updated path is stored in $new_path.
45099
45100  input_path="$new_path"
45101  # Check if we need to convert this using DOS-style short mode. If the path
45102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45103  # take no chances and rewrite it.
45104  # Note: m4 eats our [], so we need to use [ and ] instead.
45105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45106  if test "x$has_forbidden_chars" != x; then
45107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45108    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45109    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45110    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45111      # Going to short mode and back again did indeed matter. Since short mode is
45112      # case insensitive, let's make it lowercase to improve readability.
45113      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45114      # Now convert it back to Unix-stile (cygpath)
45115      input_path=`$CYGPATH -u "$shortmode_path"`
45116      new_path="$input_path"
45117    fi
45118  fi
45119
45120  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45121  if test "x$test_cygdrive_prefix" = x; then
45122    # As a simple fix, exclude /usr/bin since it's not a real path.
45123    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45124      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45125      # a path prefixed by /cygdrive for fixpath to work.
45126      new_path="$CYGWIN_ROOT_PATH$input_path"
45127    fi
45128  fi
45129
45130
45131  if test "x$path" != "x$new_path"; then
45132    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45133    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45134$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45135  fi
45136
45137  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45138
45139  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45140  has_colon=`$ECHO $path | $GREP ^.:`
45141  new_path="$path"
45142  if test "x$has_colon" = x; then
45143    # Not in mixed or Windows style, start by that.
45144    new_path=`cmd //c echo $path`
45145  fi
45146
45147
45148  input_path="$new_path"
45149  # Check if we need to convert this using DOS-style short mode. If the path
45150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45151  # take no chances and rewrite it.
45152  # Note: m4 eats our [], so we need to use [ and ] instead.
45153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45154  if test "x$has_forbidden_chars" != x; then
45155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45156    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45157  fi
45158
45159
45160  windows_path="$new_path"
45161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45162    unix_path=`$CYGPATH -u "$windows_path"`
45163    new_path="$unix_path"
45164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45166    new_path="$unix_path"
45167  fi
45168
45169  if test "x$path" != "x$new_path"; then
45170    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45172$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45173  fi
45174
45175  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45176  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45177
45178  else
45179    # We're on a posix platform. Hooray! :)
45180    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45181    has_space=`$ECHO "$path" | $GREP " "`
45182    if test "x$has_space" != x; then
45183      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45184$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45185      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45186    fi
45187
45188    # Use eval to expand a potential ~
45189    eval path="$path"
45190    if test ! -f "$path" && test ! -d "$path"; then
45191      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45192    fi
45193
45194    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45195  fi
45196
45197
45198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45199
45200  # Input might be given as Windows format, start by converting to
45201  # unix format.
45202  path="$POTENTIAL_FREETYPE_LIB_PATH"
45203  new_path=`$CYGPATH -u "$path"`
45204
45205  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45206  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45207  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45208  # "foo.exe" is OK but "foo" is an error.
45209  #
45210  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45211  # It is also a way to make sure we got the proper file name for the real test later on.
45212  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45213  if test "x$test_shortpath" = x; then
45214    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45215$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45216    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45217  fi
45218
45219  # Call helper function which possibly converts this using DOS-style short mode.
45220  # If so, the updated path is stored in $new_path.
45221
45222  input_path="$new_path"
45223  # Check if we need to convert this using DOS-style short mode. If the path
45224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45225  # take no chances and rewrite it.
45226  # Note: m4 eats our [], so we need to use [ and ] instead.
45227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45228  if test "x$has_forbidden_chars" != x; then
45229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45233      # Going to short mode and back again did indeed matter. Since short mode is
45234      # case insensitive, let's make it lowercase to improve readability.
45235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45236      # Now convert it back to Unix-stile (cygpath)
45237      input_path=`$CYGPATH -u "$shortmode_path"`
45238      new_path="$input_path"
45239    fi
45240  fi
45241
45242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45243  if test "x$test_cygdrive_prefix" = x; then
45244    # As a simple fix, exclude /usr/bin since it's not a real path.
45245    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45247      # a path prefixed by /cygdrive for fixpath to work.
45248      new_path="$CYGWIN_ROOT_PATH$input_path"
45249    fi
45250  fi
45251
45252
45253  if test "x$path" != "x$new_path"; then
45254    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45255    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45256$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45257  fi
45258
45259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45260
45261  path="$POTENTIAL_FREETYPE_LIB_PATH"
45262  has_colon=`$ECHO $path | $GREP ^.:`
45263  new_path="$path"
45264  if test "x$has_colon" = x; then
45265    # Not in mixed or Windows style, start by that.
45266    new_path=`cmd //c echo $path`
45267  fi
45268
45269
45270  input_path="$new_path"
45271  # Check if we need to convert this using DOS-style short mode. If the path
45272  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45273  # take no chances and rewrite it.
45274  # Note: m4 eats our [], so we need to use [ and ] instead.
45275  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45276  if test "x$has_forbidden_chars" != x; then
45277    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45278    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45279  fi
45280
45281
45282  windows_path="$new_path"
45283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45284    unix_path=`$CYGPATH -u "$windows_path"`
45285    new_path="$unix_path"
45286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45288    new_path="$unix_path"
45289  fi
45290
45291  if test "x$path" != "x$new_path"; then
45292    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45294$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45295  fi
45296
45297  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45298  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45299
45300  else
45301    # We're on a posix platform. Hooray! :)
45302    path="$POTENTIAL_FREETYPE_LIB_PATH"
45303    has_space=`$ECHO "$path" | $GREP " "`
45304    if test "x$has_space" != x; then
45305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45306$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45307      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45308    fi
45309
45310    # Use eval to expand a potential ~
45311    eval path="$path"
45312    if test ! -f "$path" && test ! -d "$path"; then
45313      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45314    fi
45315
45316    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45317  fi
45318
45319
45320    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45321    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45322$as_echo_n "checking for freetype includes... " >&6; }
45323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45324$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45325    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45326    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45327$as_echo_n "checking for freetype libraries... " >&6; }
45328    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45329$as_echo "$FREETYPE_LIB_PATH" >&6; }
45330  fi
45331
45332            else
45333
45334  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45335  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45336  METHOD="well-known location"
45337
45338  # First check if the files exists.
45339  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45340    # We found an arbitrary include file. That's a good sign.
45341    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45342$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45343    FOUND_FREETYPE=yes
45344
45345    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45346    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45347      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45348$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45349      FOUND_FREETYPE=no
45350    else
45351      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45352        # On Windows, we will need both .lib and .dll file.
45353        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45354          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45355$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45356          FOUND_FREETYPE=no
45357        fi
45358      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
45359        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45360        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45361      fi
45362    fi
45363  fi
45364
45365  if test "x$FOUND_FREETYPE" = xyes; then
45366
45367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45368
45369  # Input might be given as Windows format, start by converting to
45370  # unix format.
45371  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45372  new_path=`$CYGPATH -u "$path"`
45373
45374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45377  # "foo.exe" is OK but "foo" is an error.
45378  #
45379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45380  # It is also a way to make sure we got the proper file name for the real test later on.
45381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45382  if test "x$test_shortpath" = x; then
45383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45384$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45385    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45386  fi
45387
45388  # Call helper function which possibly converts this using DOS-style short mode.
45389  # If so, the updated path is stored in $new_path.
45390
45391  input_path="$new_path"
45392  # Check if we need to convert this using DOS-style short mode. If the path
45393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45394  # take no chances and rewrite it.
45395  # Note: m4 eats our [], so we need to use [ and ] instead.
45396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45397  if test "x$has_forbidden_chars" != x; then
45398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45402      # Going to short mode and back again did indeed matter. Since short mode is
45403      # case insensitive, let's make it lowercase to improve readability.
45404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45405      # Now convert it back to Unix-stile (cygpath)
45406      input_path=`$CYGPATH -u "$shortmode_path"`
45407      new_path="$input_path"
45408    fi
45409  fi
45410
45411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45412  if test "x$test_cygdrive_prefix" = x; then
45413    # As a simple fix, exclude /usr/bin since it's not a real path.
45414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45416      # a path prefixed by /cygdrive for fixpath to work.
45417      new_path="$CYGWIN_ROOT_PATH$input_path"
45418    fi
45419  fi
45420
45421
45422  if test "x$path" != "x$new_path"; then
45423    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45425$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45426  fi
45427
45428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45429
45430  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45431  has_colon=`$ECHO $path | $GREP ^.:`
45432  new_path="$path"
45433  if test "x$has_colon" = x; then
45434    # Not in mixed or Windows style, start by that.
45435    new_path=`cmd //c echo $path`
45436  fi
45437
45438
45439  input_path="$new_path"
45440  # Check if we need to convert this using DOS-style short mode. If the path
45441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45442  # take no chances and rewrite it.
45443  # Note: m4 eats our [], so we need to use [ and ] instead.
45444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45445  if test "x$has_forbidden_chars" != x; then
45446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45448  fi
45449
45450
45451  windows_path="$new_path"
45452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45453    unix_path=`$CYGPATH -u "$windows_path"`
45454    new_path="$unix_path"
45455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45457    new_path="$unix_path"
45458  fi
45459
45460  if test "x$path" != "x$new_path"; then
45461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45464  fi
45465
45466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45468
45469  else
45470    # We're on a posix platform. Hooray! :)
45471    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45472    has_space=`$ECHO "$path" | $GREP " "`
45473    if test "x$has_space" != x; then
45474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45475$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45476      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45477    fi
45478
45479    # Use eval to expand a potential ~
45480    eval path="$path"
45481    if test ! -f "$path" && test ! -d "$path"; then
45482      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45483    fi
45484
45485    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45486  fi
45487
45488
45489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45490
45491  # Input might be given as Windows format, start by converting to
45492  # unix format.
45493  path="$POTENTIAL_FREETYPE_LIB_PATH"
45494  new_path=`$CYGPATH -u "$path"`
45495
45496  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45497  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45498  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45499  # "foo.exe" is OK but "foo" is an error.
45500  #
45501  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45502  # It is also a way to make sure we got the proper file name for the real test later on.
45503  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45504  if test "x$test_shortpath" = x; then
45505    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45506$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45507    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45508  fi
45509
45510  # Call helper function which possibly converts this using DOS-style short mode.
45511  # If so, the updated path is stored in $new_path.
45512
45513  input_path="$new_path"
45514  # Check if we need to convert this using DOS-style short mode. If the path
45515  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45516  # take no chances and rewrite it.
45517  # Note: m4 eats our [], so we need to use [ and ] instead.
45518  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45519  if test "x$has_forbidden_chars" != x; then
45520    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45521    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45522    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45523    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45524      # Going to short mode and back again did indeed matter. Since short mode is
45525      # case insensitive, let's make it lowercase to improve readability.
45526      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45527      # Now convert it back to Unix-stile (cygpath)
45528      input_path=`$CYGPATH -u "$shortmode_path"`
45529      new_path="$input_path"
45530    fi
45531  fi
45532
45533  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45534  if test "x$test_cygdrive_prefix" = x; then
45535    # As a simple fix, exclude /usr/bin since it's not a real path.
45536    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45537      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45538      # a path prefixed by /cygdrive for fixpath to work.
45539      new_path="$CYGWIN_ROOT_PATH$input_path"
45540    fi
45541  fi
45542
45543
45544  if test "x$path" != "x$new_path"; then
45545    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45546    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45547$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45548  fi
45549
45550  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45551
45552  path="$POTENTIAL_FREETYPE_LIB_PATH"
45553  has_colon=`$ECHO $path | $GREP ^.:`
45554  new_path="$path"
45555  if test "x$has_colon" = x; then
45556    # Not in mixed or Windows style, start by that.
45557    new_path=`cmd //c echo $path`
45558  fi
45559
45560
45561  input_path="$new_path"
45562  # Check if we need to convert this using DOS-style short mode. If the path
45563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45564  # take no chances and rewrite it.
45565  # Note: m4 eats our [], so we need to use [ and ] instead.
45566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45567  if test "x$has_forbidden_chars" != x; then
45568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45570  fi
45571
45572
45573  windows_path="$new_path"
45574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45575    unix_path=`$CYGPATH -u "$windows_path"`
45576    new_path="$unix_path"
45577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45579    new_path="$unix_path"
45580  fi
45581
45582  if test "x$path" != "x$new_path"; then
45583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45586  fi
45587
45588  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45589  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45590
45591  else
45592    # We're on a posix platform. Hooray! :)
45593    path="$POTENTIAL_FREETYPE_LIB_PATH"
45594    has_space=`$ECHO "$path" | $GREP " "`
45595    if test "x$has_space" != x; then
45596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45598      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45599    fi
45600
45601    # Use eval to expand a potential ~
45602    eval path="$path"
45603    if test ! -f "$path" && test ! -d "$path"; then
45604      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45605    fi
45606
45607    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45608  fi
45609
45610
45611    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45612    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45613$as_echo_n "checking for freetype includes... " >&6; }
45614    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45615$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45616    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45618$as_echo_n "checking for freetype libraries... " >&6; }
45619    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45620$as_echo "$FREETYPE_LIB_PATH" >&6; }
45621  fi
45622
45623              if test "x$FOUND_FREETYPE" != xyes; then
45624
45625  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45626  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45627  METHOD="well-known location"
45628
45629  # First check if the files exists.
45630  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45631    # We found an arbitrary include file. That's a good sign.
45632    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45633$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45634    FOUND_FREETYPE=yes
45635
45636    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45637    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45638      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45639$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45640      FOUND_FREETYPE=no
45641    else
45642      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45643        # On Windows, we will need both .lib and .dll file.
45644        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45645          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45646$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45647          FOUND_FREETYPE=no
45648        fi
45649      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
45650        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45651        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45652      fi
45653    fi
45654  fi
45655
45656  if test "x$FOUND_FREETYPE" = xyes; then
45657
45658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45659
45660  # Input might be given as Windows format, start by converting to
45661  # unix format.
45662  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45663  new_path=`$CYGPATH -u "$path"`
45664
45665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45668  # "foo.exe" is OK but "foo" is an error.
45669  #
45670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45671  # It is also a way to make sure we got the proper file name for the real test later on.
45672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45673  if test "x$test_shortpath" = x; then
45674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45675$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45676    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45677  fi
45678
45679  # Call helper function which possibly converts this using DOS-style short mode.
45680  # If so, the updated path is stored in $new_path.
45681
45682  input_path="$new_path"
45683  # Check if we need to convert this using DOS-style short mode. If the path
45684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45685  # take no chances and rewrite it.
45686  # Note: m4 eats our [], so we need to use [ and ] instead.
45687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45688  if test "x$has_forbidden_chars" != x; then
45689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45693      # Going to short mode and back again did indeed matter. Since short mode is
45694      # case insensitive, let's make it lowercase to improve readability.
45695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45696      # Now convert it back to Unix-stile (cygpath)
45697      input_path=`$CYGPATH -u "$shortmode_path"`
45698      new_path="$input_path"
45699    fi
45700  fi
45701
45702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45703  if test "x$test_cygdrive_prefix" = x; then
45704    # As a simple fix, exclude /usr/bin since it's not a real path.
45705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45707      # a path prefixed by /cygdrive for fixpath to work.
45708      new_path="$CYGWIN_ROOT_PATH$input_path"
45709    fi
45710  fi
45711
45712
45713  if test "x$path" != "x$new_path"; then
45714    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45716$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45717  fi
45718
45719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45720
45721  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45722  has_colon=`$ECHO $path | $GREP ^.:`
45723  new_path="$path"
45724  if test "x$has_colon" = x; then
45725    # Not in mixed or Windows style, start by that.
45726    new_path=`cmd //c echo $path`
45727  fi
45728
45729
45730  input_path="$new_path"
45731  # Check if we need to convert this using DOS-style short mode. If the path
45732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45733  # take no chances and rewrite it.
45734  # Note: m4 eats our [], so we need to use [ and ] instead.
45735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45736  if test "x$has_forbidden_chars" != x; then
45737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45739  fi
45740
45741
45742  windows_path="$new_path"
45743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45744    unix_path=`$CYGPATH -u "$windows_path"`
45745    new_path="$unix_path"
45746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45748    new_path="$unix_path"
45749  fi
45750
45751  if test "x$path" != "x$new_path"; then
45752    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45755  fi
45756
45757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45759
45760  else
45761    # We're on a posix platform. Hooray! :)
45762    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45763    has_space=`$ECHO "$path" | $GREP " "`
45764    if test "x$has_space" != x; then
45765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45766$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45767      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45768    fi
45769
45770    # Use eval to expand a potential ~
45771    eval path="$path"
45772    if test ! -f "$path" && test ! -d "$path"; then
45773      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45774    fi
45775
45776    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45777  fi
45778
45779
45780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45781
45782  # Input might be given as Windows format, start by converting to
45783  # unix format.
45784  path="$POTENTIAL_FREETYPE_LIB_PATH"
45785  new_path=`$CYGPATH -u "$path"`
45786
45787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45790  # "foo.exe" is OK but "foo" is an error.
45791  #
45792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45793  # It is also a way to make sure we got the proper file name for the real test later on.
45794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45795  if test "x$test_shortpath" = x; then
45796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45797$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45798    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45799  fi
45800
45801  # Call helper function which possibly converts this using DOS-style short mode.
45802  # If so, the updated path is stored in $new_path.
45803
45804  input_path="$new_path"
45805  # Check if we need to convert this using DOS-style short mode. If the path
45806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45807  # take no chances and rewrite it.
45808  # Note: m4 eats our [], so we need to use [ and ] instead.
45809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45810  if test "x$has_forbidden_chars" != x; then
45811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45815      # Going to short mode and back again did indeed matter. Since short mode is
45816      # case insensitive, let's make it lowercase to improve readability.
45817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45818      # Now convert it back to Unix-stile (cygpath)
45819      input_path=`$CYGPATH -u "$shortmode_path"`
45820      new_path="$input_path"
45821    fi
45822  fi
45823
45824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45825  if test "x$test_cygdrive_prefix" = x; then
45826    # As a simple fix, exclude /usr/bin since it's not a real path.
45827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45829      # a path prefixed by /cygdrive for fixpath to work.
45830      new_path="$CYGWIN_ROOT_PATH$input_path"
45831    fi
45832  fi
45833
45834
45835  if test "x$path" != "x$new_path"; then
45836    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45838$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45839  fi
45840
45841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45842
45843  path="$POTENTIAL_FREETYPE_LIB_PATH"
45844  has_colon=`$ECHO $path | $GREP ^.:`
45845  new_path="$path"
45846  if test "x$has_colon" = x; then
45847    # Not in mixed or Windows style, start by that.
45848    new_path=`cmd //c echo $path`
45849  fi
45850
45851
45852  input_path="$new_path"
45853  # Check if we need to convert this using DOS-style short mode. If the path
45854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45855  # take no chances and rewrite it.
45856  # Note: m4 eats our [], so we need to use [ and ] instead.
45857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45858  if test "x$has_forbidden_chars" != x; then
45859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45861  fi
45862
45863
45864  windows_path="$new_path"
45865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45866    unix_path=`$CYGPATH -u "$windows_path"`
45867    new_path="$unix_path"
45868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45870    new_path="$unix_path"
45871  fi
45872
45873  if test "x$path" != "x$new_path"; then
45874    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45876$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45877  fi
45878
45879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45881
45882  else
45883    # We're on a posix platform. Hooray! :)
45884    path="$POTENTIAL_FREETYPE_LIB_PATH"
45885    has_space=`$ECHO "$path" | $GREP " "`
45886    if test "x$has_space" != x; then
45887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45888$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45889      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45890    fi
45891
45892    # Use eval to expand a potential ~
45893    eval path="$path"
45894    if test ! -f "$path" && test ! -d "$path"; then
45895      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45896    fi
45897
45898    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45899  fi
45900
45901
45902    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45903    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45904$as_echo_n "checking for freetype includes... " >&6; }
45905    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45906$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45907    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45908    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45909$as_echo_n "checking for freetype libraries... " >&6; }
45910    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45911$as_echo "$FREETYPE_LIB_PATH" >&6; }
45912  fi
45913
45914              fi
45915            fi
45916          fi
45917        fi
45918      fi # end check in well-known locations
45919
45920      if test "x$FOUND_FREETYPE" != xyes; then
45921
45922  # Print a helpful message on how to acquire the necessary build dependency.
45923  # freetype is the help tag: freetype, cups, pulse, alsa etc
45924  MISSING_DEPENDENCY=freetype
45925
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927    cygwin_help $MISSING_DEPENDENCY
45928  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45929    msys_help $MISSING_DEPENDENCY
45930  else
45931    PKGHANDLER_COMMAND=
45932
45933    case $PKGHANDLER in
45934      apt-get)
45935        apt_help     $MISSING_DEPENDENCY ;;
45936      yum)
45937        yum_help     $MISSING_DEPENDENCY ;;
45938      port)
45939        port_help    $MISSING_DEPENDENCY ;;
45940      pkgutil)
45941        pkgutil_help $MISSING_DEPENDENCY ;;
45942      pkgadd)
45943        pkgadd_help  $MISSING_DEPENDENCY ;;
45944    esac
45945
45946    if test "x$PKGHANDLER_COMMAND" != x; then
45947      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45948    fi
45949  fi
45950
45951        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
45952      fi
45953    fi # end user specified settings
45954
45955    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
45956    if test "x$FREETYPE_CFLAGS" = x; then
45957
45958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45959
45960  # Input might be given as Windows format, start by converting to
45961  # unix format.
45962  path="$FREETYPE_INCLUDE_PATH"
45963  new_path=`$CYGPATH -u "$path"`
45964
45965  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45966  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45967  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45968  # "foo.exe" is OK but "foo" is an error.
45969  #
45970  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45971  # It is also a way to make sure we got the proper file name for the real test later on.
45972  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45973  if test "x$test_shortpath" = x; then
45974    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45975$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45976    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
45977  fi
45978
45979  # Call helper function which possibly converts this using DOS-style short mode.
45980  # If so, the updated path is stored in $new_path.
45981
45982  input_path="$new_path"
45983  # Check if we need to convert this using DOS-style short mode. If the path
45984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45985  # take no chances and rewrite it.
45986  # Note: m4 eats our [], so we need to use [ and ] instead.
45987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45988  if test "x$has_forbidden_chars" != x; then
45989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45990    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45991    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45992    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45993      # Going to short mode and back again did indeed matter. Since short mode is
45994      # case insensitive, let's make it lowercase to improve readability.
45995      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45996      # Now convert it back to Unix-stile (cygpath)
45997      input_path=`$CYGPATH -u "$shortmode_path"`
45998      new_path="$input_path"
45999    fi
46000  fi
46001
46002  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46003  if test "x$test_cygdrive_prefix" = x; then
46004    # As a simple fix, exclude /usr/bin since it's not a real path.
46005    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46006      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46007      # a path prefixed by /cygdrive for fixpath to work.
46008      new_path="$CYGWIN_ROOT_PATH$input_path"
46009    fi
46010  fi
46011
46012
46013  if test "x$path" != "x$new_path"; then
46014    FREETYPE_INCLUDE_PATH="$new_path"
46015    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46016$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46017  fi
46018
46019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46020
46021  path="$FREETYPE_INCLUDE_PATH"
46022  has_colon=`$ECHO $path | $GREP ^.:`
46023  new_path="$path"
46024  if test "x$has_colon" = x; then
46025    # Not in mixed or Windows style, start by that.
46026    new_path=`cmd //c echo $path`
46027  fi
46028
46029
46030  input_path="$new_path"
46031  # Check if we need to convert this using DOS-style short mode. If the path
46032  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46033  # take no chances and rewrite it.
46034  # Note: m4 eats our [], so we need to use [ and ] instead.
46035  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46036  if test "x$has_forbidden_chars" != x; then
46037    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46038    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46039  fi
46040
46041
46042  windows_path="$new_path"
46043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46044    unix_path=`$CYGPATH -u "$windows_path"`
46045    new_path="$unix_path"
46046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46048    new_path="$unix_path"
46049  fi
46050
46051  if test "x$path" != "x$new_path"; then
46052    FREETYPE_INCLUDE_PATH="$new_path"
46053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46054$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46055  fi
46056
46057  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46058  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46059
46060  else
46061    # We're on a posix platform. Hooray! :)
46062    path="$FREETYPE_INCLUDE_PATH"
46063    has_space=`$ECHO "$path" | $GREP " "`
46064    if test "x$has_space" != x; then
46065      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46066$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46067      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46068    fi
46069
46070    # Use eval to expand a potential ~
46071    eval path="$path"
46072    if test ! -f "$path" && test ! -d "$path"; then
46073      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46074    fi
46075
46076    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46077  fi
46078
46079      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46080        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46081      else
46082        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46083      fi
46084    fi
46085
46086    if test "x$FREETYPE_LIBS" = x; then
46087
46088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46089
46090  # Input might be given as Windows format, start by converting to
46091  # unix format.
46092  path="$FREETYPE_LIB_PATH"
46093  new_path=`$CYGPATH -u "$path"`
46094
46095  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46096  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46097  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46098  # "foo.exe" is OK but "foo" is an error.
46099  #
46100  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46101  # It is also a way to make sure we got the proper file name for the real test later on.
46102  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46103  if test "x$test_shortpath" = x; then
46104    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46105$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46106    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46107  fi
46108
46109  # Call helper function which possibly converts this using DOS-style short mode.
46110  # If so, the updated path is stored in $new_path.
46111
46112  input_path="$new_path"
46113  # Check if we need to convert this using DOS-style short mode. If the path
46114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46115  # take no chances and rewrite it.
46116  # Note: m4 eats our [], so we need to use [ and ] instead.
46117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46118  if test "x$has_forbidden_chars" != x; then
46119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46123      # Going to short mode and back again did indeed matter. Since short mode is
46124      # case insensitive, let's make it lowercase to improve readability.
46125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46126      # Now convert it back to Unix-stile (cygpath)
46127      input_path=`$CYGPATH -u "$shortmode_path"`
46128      new_path="$input_path"
46129    fi
46130  fi
46131
46132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46133  if test "x$test_cygdrive_prefix" = x; then
46134    # As a simple fix, exclude /usr/bin since it's not a real path.
46135    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46137      # a path prefixed by /cygdrive for fixpath to work.
46138      new_path="$CYGWIN_ROOT_PATH$input_path"
46139    fi
46140  fi
46141
46142
46143  if test "x$path" != "x$new_path"; then
46144    FREETYPE_LIB_PATH="$new_path"
46145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46146$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46147  fi
46148
46149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46150
46151  path="$FREETYPE_LIB_PATH"
46152  has_colon=`$ECHO $path | $GREP ^.:`
46153  new_path="$path"
46154  if test "x$has_colon" = x; then
46155    # Not in mixed or Windows style, start by that.
46156    new_path=`cmd //c echo $path`
46157  fi
46158
46159
46160  input_path="$new_path"
46161  # Check if we need to convert this using DOS-style short mode. If the path
46162  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46163  # take no chances and rewrite it.
46164  # Note: m4 eats our [], so we need to use [ and ] instead.
46165  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46166  if test "x$has_forbidden_chars" != x; then
46167    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46168    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46169  fi
46170
46171
46172  windows_path="$new_path"
46173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46174    unix_path=`$CYGPATH -u "$windows_path"`
46175    new_path="$unix_path"
46176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46178    new_path="$unix_path"
46179  fi
46180
46181  if test "x$path" != "x$new_path"; then
46182    FREETYPE_LIB_PATH="$new_path"
46183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46184$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46185  fi
46186
46187  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46188  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46189
46190  else
46191    # We're on a posix platform. Hooray! :)
46192    path="$FREETYPE_LIB_PATH"
46193    has_space=`$ECHO "$path" | $GREP " "`
46194    if test "x$has_space" != x; then
46195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46196$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46197      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46198    fi
46199
46200    # Use eval to expand a potential ~
46201    eval path="$path"
46202    if test ! -f "$path" && test ! -d "$path"; then
46203      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46204    fi
46205
46206    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46207  fi
46208
46209      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46210        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46211      else
46212        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46213      fi
46214    fi
46215
46216    # Try to compile it
46217    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46218$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46219    ac_ext=cpp
46220ac_cpp='$CXXCPP $CPPFLAGS'
46221ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46222ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46223ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46224
46225    PREV_CXXCFLAGS="$CXXFLAGS"
46226    PREV_LIBS="$LIBS"
46227    PREV_CXX="$CXX"
46228    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46229    LIBS="$LIBS $FREETYPE_LIBS"
46230    CXX="$FIXPATH $CXX"
46231    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46232/* end confdefs.h.  */
46233
46234          #include<ft2build.h>
46235          #include FT_FREETYPE_H
46236          int main () {
46237            FT_Init_FreeType(NULL);
46238            return 0;
46239          }
46240
46241_ACEOF
46242if ac_fn_cxx_try_link "$LINENO"; then :
46243
46244          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46245$as_echo "yes" >&6; }
46246
46247else
46248
46249          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46250$as_echo "no" >&6; }
46251          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46252$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46253          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46254$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46255
46256
46257  # Print a helpful message on how to acquire the necessary build dependency.
46258  # freetype is the help tag: freetype, cups, pulse, alsa etc
46259  MISSING_DEPENDENCY=freetype
46260
46261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46262    cygwin_help $MISSING_DEPENDENCY
46263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46264    msys_help $MISSING_DEPENDENCY
46265  else
46266    PKGHANDLER_COMMAND=
46267
46268    case $PKGHANDLER in
46269      apt-get)
46270        apt_help     $MISSING_DEPENDENCY ;;
46271      yum)
46272        yum_help     $MISSING_DEPENDENCY ;;
46273      port)
46274        port_help    $MISSING_DEPENDENCY ;;
46275      pkgutil)
46276        pkgutil_help $MISSING_DEPENDENCY ;;
46277      pkgadd)
46278        pkgadd_help  $MISSING_DEPENDENCY ;;
46279    esac
46280
46281    if test "x$PKGHANDLER_COMMAND" != x; then
46282      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46283    fi
46284  fi
46285
46286
46287          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46288
46289
46290fi
46291rm -f core conftest.err conftest.$ac_objext \
46292    conftest$ac_exeext conftest.$ac_ext
46293    CXXCFLAGS="$PREV_CXXFLAGS"
46294    LIBS="$PREV_LIBS"
46295    CXX="$PREV_CXX"
46296    ac_ext=cpp
46297ac_cpp='$CXXCPP $CPPFLAGS'
46298ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46299ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46300ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46301
46302
46303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46304$as_echo_n "checking if we should bundle freetype... " >&6; }
46305    if test "x$BUNDLE_FREETYPE" = xyes; then
46306      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46307    fi
46308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46309$as_echo "$BUNDLE_FREETYPE" >&6; }
46310
46311  fi # end freetype needed
46312
46313
46314
46315
46316
46317
46318
46319  ###############################################################################
46320  #
46321  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46322  #
46323
46324# Check whether --with-alsa was given.
46325if test "${with_alsa+set}" = set; then :
46326  withval=$with_alsa;
46327fi
46328
46329
46330# Check whether --with-alsa-include was given.
46331if test "${with_alsa_include+set}" = set; then :
46332  withval=$with_alsa_include;
46333fi
46334
46335
46336# Check whether --with-alsa-lib was given.
46337if test "${with_alsa_lib+set}" = set; then :
46338  withval=$with_alsa_lib;
46339fi
46340
46341
46342  if test "x$ALSA_NOT_NEEDED" = xyes; then
46343    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46344      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46345$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46346    fi
46347    ALSA_CFLAGS=
46348    ALSA_LIBS=
46349  else
46350    ALSA_FOUND=no
46351
46352    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46353      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46354    fi
46355
46356    if test "x${with_alsa}" != x; then
46357      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46358      ALSA_CFLAGS="-I${with_alsa}/include"
46359      ALSA_FOUND=yes
46360    fi
46361    if test "x${with_alsa_include}" != x; then
46362      ALSA_CFLAGS="-I${with_alsa_include}"
46363      ALSA_FOUND=yes
46364    fi
46365    if test "x${with_alsa_lib}" != x; then
46366      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46367      ALSA_FOUND=yes
46368    fi
46369    if test "x$ALSA_FOUND" = xno; then
46370
46371
46372  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46373    # Source the builddeps file again, to make sure it uses the latest variables!
46374    . $builddepsfile
46375    # Look for a target and build machine specific resource!
46376    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46377    if test "x$resource" = x; then
46378      # Ok, lets instead look for a target specific resource
46379      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46380    fi
46381    if test "x$resource" = x; then
46382      # Ok, lets instead look for a build specific resource
46383      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46384    fi
46385    if test "x$resource" = x; then
46386      # Ok, lets instead look for a generic resource
46387      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46388      resource=${builddep_alsa}
46389    fi
46390    if test "x$resource" != x; then
46391      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46392$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46393      # If the resource in the builddeps.conf file is an existing directory,
46394      # for example /java/linux/cups
46395      if test -d ${resource}; then
46396        depdir=${resource}
46397      else
46398
46399  # alsa is for example mymodule
46400  # $resource is for example libs/general/libmymod_1_2_3.zip
46401  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46402  # $with_builddeps_dir is for example /localhome/builddeps
46403  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46404  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46405  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46406  filename=`basename $resource`
46407  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46408  filebase=${filename%%.*}
46409  extension=${filename#*.}
46410  installdir=$with_builddeps_dir/$filebase
46411  if test ! -f $installdir/$filename.unpacked; then
46412    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46413$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46414    if test ! -d $installdir; then
46415      mkdir -p $installdir
46416    fi
46417    if test ! -d $installdir; then
46418      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46419    fi
46420    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46421    touch $tmpfile
46422    if test ! -f $tmpfile; then
46423      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46424    fi
46425
46426  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46427  # $tmpfile is the local file name for the downloaded file.
46428  VALID_TOOL=no
46429  if test "x$BDEPS_FTP" = xwget; then
46430    VALID_TOOL=yes
46431    wget -O $tmpfile $with_builddeps_server/$resource
46432  fi
46433  if test "x$BDEPS_FTP" = xlftp; then
46434    VALID_TOOL=yes
46435    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46436  fi
46437  if test "x$BDEPS_FTP" = xftp; then
46438    VALID_TOOL=yes
46439    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46440    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46441    FTPUSERPWD=${FTPSERVER%%@*}
46442    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46443      FTPUSER=${userpwd%%:*}
46444      FTPPWD=${userpwd#*@}
46445      FTPSERVER=${FTPSERVER#*@}
46446    else
46447      FTPUSER=ftp
46448      FTPPWD=ftp
46449    fi
46450    # the "pass" command does not work on some
46451    # ftp clients (read ftp.exe) but if it works,
46452    # passive mode is better!
46453    ( \
46454        echo "user $FTPUSER $FTPPWD"        ; \
46455        echo "pass"                         ; \
46456        echo "bin"                          ; \
46457        echo "get $FTPPATH $tmpfile"              ; \
46458    ) | ftp -in $FTPSERVER
46459  fi
46460  if test "x$VALID_TOOL" != xyes; then
46461    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46462  fi
46463
46464    mv $tmpfile $installdir/$filename
46465    if test ! -s $installdir/$filename; then
46466      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46467    fi
46468    case "$extension" in
46469      zip)  echo "Unzipping $installdir/$filename..."
46470        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46471        ;;
46472      tar.gz) echo "Untaring $installdir/$filename..."
46473        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46474        ;;
46475      tgz) echo "Untaring $installdir/$filename..."
46476        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46477        ;;
46478      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46479        ;;
46480    esac
46481  fi
46482  if test -f $installdir/$filename.unpacked; then
46483    depdir=$installdir
46484  fi
46485
46486      fi
46487      # Source the builddeps file again, because in the previous command, the depdir
46488      # was updated to point at the current build dependency install directory.
46489      . $builddepsfile
46490      # Now extract variables from the builddeps.conf files.
46491      theroot=${builddep_alsa_ROOT}
46492      thecflags=${builddep_alsa_CFLAGS}
46493      thelibs=${builddep_alsa_LIBS}
46494      if test "x$depdir" = x; then
46495        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46496      fi
46497      ALSA=$depdir
46498      if test "x$theroot" != x; then
46499        ALSA="$theroot"
46500      fi
46501      if test "x$thecflags" != x; then
46502        ALSA_CFLAGS="$thecflags"
46503      fi
46504      if test "x$thelibs" != x; then
46505        ALSA_LIBS="$thelibs"
46506      fi
46507      ALSA_FOUND=yes
46508      else ALSA_FOUND=no
46509
46510    fi
46511    else ALSA_FOUND=no
46512
46513  fi
46514
46515    fi
46516    if test "x$ALSA_FOUND" = xno; then
46517
46518pkg_failed=no
46519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46520$as_echo_n "checking for ALSA... " >&6; }
46521
46522if test -n "$ALSA_CFLAGS"; then
46523    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46524 elif test -n "$PKG_CONFIG"; then
46525    if test -n "$PKG_CONFIG" && \
46526    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46527  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46528  ac_status=$?
46529  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46530  test $ac_status = 0; }; then
46531  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46532else
46533  pkg_failed=yes
46534fi
46535 else
46536    pkg_failed=untried
46537fi
46538if test -n "$ALSA_LIBS"; then
46539    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46540 elif test -n "$PKG_CONFIG"; then
46541    if test -n "$PKG_CONFIG" && \
46542    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46543  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46544  ac_status=$?
46545  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46546  test $ac_status = 0; }; then
46547  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46548else
46549  pkg_failed=yes
46550fi
46551 else
46552    pkg_failed=untried
46553fi
46554
46555
46556
46557if test $pkg_failed = yes; then
46558
46559if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46560        _pkg_short_errors_supported=yes
46561else
46562        _pkg_short_errors_supported=no
46563fi
46564        if test $_pkg_short_errors_supported = yes; then
46565	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46566        else
46567	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46568        fi
46569	# Put the nasty error message in config.log where it belongs
46570	echo "$ALSA_PKG_ERRORS" >&5
46571
46572	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46573$as_echo "no" >&6; }
46574                ALSA_FOUND=no
46575elif test $pkg_failed = untried; then
46576	ALSA_FOUND=no
46577else
46578	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46579	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46580        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46581$as_echo "yes" >&6; }
46582	ALSA_FOUND=yes
46583fi
46584    fi
46585    if test "x$ALSA_FOUND" = xno; then
46586      for ac_header in alsa/asoundlib.h
46587do :
46588  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46589if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46590  cat >>confdefs.h <<_ACEOF
46591#define HAVE_ALSA_ASOUNDLIB_H 1
46592_ACEOF
46593
46594            ALSA_FOUND=yes
46595            ALSA_CFLAGS=-Iignoreme
46596            ALSA_LIBS=-lasound
46597            DEFAULT_ALSA=yes
46598
46599else
46600  ALSA_FOUND=no
46601fi
46602
46603done
46604
46605    fi
46606    if test "x$ALSA_FOUND" = xno; then
46607
46608  # Print a helpful message on how to acquire the necessary build dependency.
46609  # alsa is the help tag: freetype, cups, pulse, alsa etc
46610  MISSING_DEPENDENCY=alsa
46611
46612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46613    cygwin_help $MISSING_DEPENDENCY
46614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46615    msys_help $MISSING_DEPENDENCY
46616  else
46617    PKGHANDLER_COMMAND=
46618
46619    case $PKGHANDLER in
46620      apt-get)
46621        apt_help     $MISSING_DEPENDENCY ;;
46622      yum)
46623        yum_help     $MISSING_DEPENDENCY ;;
46624      port)
46625        port_help    $MISSING_DEPENDENCY ;;
46626      pkgutil)
46627        pkgutil_help $MISSING_DEPENDENCY ;;
46628      pkgadd)
46629        pkgadd_help  $MISSING_DEPENDENCY ;;
46630    esac
46631
46632    if test "x$PKGHANDLER_COMMAND" != x; then
46633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46634    fi
46635  fi
46636
46637      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46638    fi
46639  fi
46640
46641
46642
46643
46644
46645
46646  ###############################################################################
46647  #
46648  # Check for the jpeg library
46649  #
46650
46651  USE_EXTERNAL_LIBJPEG=true
46652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46653$as_echo_n "checking for main in -ljpeg... " >&6; }
46654if ${ac_cv_lib_jpeg_main+:} false; then :
46655  $as_echo_n "(cached) " >&6
46656else
46657  ac_check_lib_save_LIBS=$LIBS
46658LIBS="-ljpeg  $LIBS"
46659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46660/* end confdefs.h.  */
46661
46662
46663int
46664main ()
46665{
46666return main ();
46667  ;
46668  return 0;
46669}
46670_ACEOF
46671if ac_fn_cxx_try_link "$LINENO"; then :
46672  ac_cv_lib_jpeg_main=yes
46673else
46674  ac_cv_lib_jpeg_main=no
46675fi
46676rm -f core conftest.err conftest.$ac_objext \
46677    conftest$ac_exeext conftest.$ac_ext
46678LIBS=$ac_check_lib_save_LIBS
46679fi
46680{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46681$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46682if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46683  cat >>confdefs.h <<_ACEOF
46684#define HAVE_LIBJPEG 1
46685_ACEOF
46686
46687  LIBS="-ljpeg $LIBS"
46688
46689else
46690   USE_EXTERNAL_LIBJPEG=false
46691      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46692$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46693
46694fi
46695
46696
46697
46698  ###############################################################################
46699  #
46700  # Check for the gif library
46701  #
46702
46703
46704# Check whether --with-giflib was given.
46705if test "${with_giflib+set}" = set; then :
46706  withval=$with_giflib;
46707fi
46708
46709
46710
46711  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46712$as_echo_n "checking for which giflib to use... " >&6; }
46713
46714  # default is bundled
46715  DEFAULT_GIFLIB=bundled
46716
46717  #
46718  # if user didn't specify, use DEFAULT_GIFLIB
46719  #
46720  if test "x${with_giflib}" = "x"; then
46721    with_giflib=${DEFAULT_GIFLIB}
46722  fi
46723
46724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46725$as_echo "${with_giflib}" >&6; }
46726
46727  if test "x${with_giflib}" = "xbundled"; then
46728    USE_EXTERNAL_LIBGIF=false
46729  elif test "x${with_giflib}" = "xsystem"; then
46730    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46731if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46732
46733else
46734   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46735fi
46736
46737
46738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46739$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46740if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46741  $as_echo_n "(cached) " >&6
46742else
46743  ac_check_lib_save_LIBS=$LIBS
46744LIBS="-lgif  $LIBS"
46745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46746/* end confdefs.h.  */
46747
46748/* Override any GCC internal prototype to avoid an error.
46749   Use char because int might match the return type of a GCC
46750   builtin and then its argument prototype would still apply.  */
46751#ifdef __cplusplus
46752extern "C"
46753#endif
46754char DGifGetCode ();
46755int
46756main ()
46757{
46758return DGifGetCode ();
46759  ;
46760  return 0;
46761}
46762_ACEOF
46763if ac_fn_cxx_try_link "$LINENO"; then :
46764  ac_cv_lib_gif_DGifGetCode=yes
46765else
46766  ac_cv_lib_gif_DGifGetCode=no
46767fi
46768rm -f core conftest.err conftest.$ac_objext \
46769    conftest$ac_exeext conftest.$ac_ext
46770LIBS=$ac_check_lib_save_LIBS
46771fi
46772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46773$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46774if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46775  cat >>confdefs.h <<_ACEOF
46776#define HAVE_LIBGIF 1
46777_ACEOF
46778
46779  LIBS="-lgif $LIBS"
46780
46781else
46782   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46783fi
46784
46785
46786    USE_EXTERNAL_LIBGIF=true
46787  else
46788    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46789  fi
46790
46791
46792  ###############################################################################
46793  #
46794  # Check for the png library
46795  #
46796
46797
46798# Check whether --with-libpng was given.
46799if test "${with_libpng+set}" = set; then :
46800  withval=$with_libpng;
46801fi
46802
46803
46804
46805  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
46806$as_echo_n "checking for which libpng to use... " >&6; }
46807
46808  # default is bundled
46809  DEFAULT_LIBPNG=bundled
46810
46811  #
46812  # if user didn't specify, use DEFAULT_LIBPNG
46813  #
46814  if test "x${with_libpng}" = "x"; then
46815      with_libpng=${DEFAULT_LIBPNG}
46816  fi
46817
46818  if test "x${with_libpng}" = "xbundled"; then
46819      USE_EXTERNAL_LIBPNG=false
46820      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46821$as_echo "bundled" >&6; }
46822  elif test "x${with_libpng}" = "xsystem"; then
46823
46824pkg_failed=no
46825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
46826$as_echo_n "checking for PNG... " >&6; }
46827
46828if test -n "$PNG_CFLAGS"; then
46829    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
46830 elif test -n "$PKG_CONFIG"; then
46831    if test -n "$PKG_CONFIG" && \
46832    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
46833  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
46834  ac_status=$?
46835  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46836  test $ac_status = 0; }; then
46837  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
46838else
46839  pkg_failed=yes
46840fi
46841 else
46842    pkg_failed=untried
46843fi
46844if test -n "$PNG_LIBS"; then
46845    pkg_cv_PNG_LIBS="$PNG_LIBS"
46846 elif test -n "$PKG_CONFIG"; then
46847    if test -n "$PKG_CONFIG" && \
46848    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
46849  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
46850  ac_status=$?
46851  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46852  test $ac_status = 0; }; then
46853  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
46854else
46855  pkg_failed=yes
46856fi
46857 else
46858    pkg_failed=untried
46859fi
46860
46861
46862
46863if test $pkg_failed = yes; then
46864
46865if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46866        _pkg_short_errors_supported=yes
46867else
46868        _pkg_short_errors_supported=no
46869fi
46870        if test $_pkg_short_errors_supported = yes; then
46871	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
46872        else
46873	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
46874        fi
46875	# Put the nasty error message in config.log where it belongs
46876	echo "$PNG_PKG_ERRORS" >&5
46877
46878	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46879$as_echo "no" >&6; }
46880                 LIBPNG_FOUND=no
46881elif test $pkg_failed = untried; then
46882	 LIBPNG_FOUND=no
46883else
46884	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
46885	PNG_LIBS=$pkg_cv_PNG_LIBS
46886        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46887$as_echo "yes" >&6; }
46888	 LIBPNG_FOUND=yes
46889fi
46890      if test "x${LIBPNG_FOUND}" = "xyes"; then
46891          USE_EXTERNAL_LIBPNG=true
46892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46893$as_echo "system" >&6; }
46894      else
46895          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46896$as_echo "system not found" >&6; }
46897          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
46898      fi
46899  else
46900      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
46901  fi
46902
46903
46904  ###############################################################################
46905  #
46906  # Check for the zlib library
46907  #
46908
46909
46910# Check whether --with-zlib was given.
46911if test "${with_zlib+set}" = set; then :
46912  withval=$with_zlib;
46913fi
46914
46915
46916  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
46917$as_echo_n "checking for compress in -lz... " >&6; }
46918if ${ac_cv_lib_z_compress+:} false; then :
46919  $as_echo_n "(cached) " >&6
46920else
46921  ac_check_lib_save_LIBS=$LIBS
46922LIBS="-lz  $LIBS"
46923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46924/* end confdefs.h.  */
46925
46926/* Override any GCC internal prototype to avoid an error.
46927   Use char because int might match the return type of a GCC
46928   builtin and then its argument prototype would still apply.  */
46929#ifdef __cplusplus
46930extern "C"
46931#endif
46932char compress ();
46933int
46934main ()
46935{
46936return compress ();
46937  ;
46938  return 0;
46939}
46940_ACEOF
46941if ac_fn_cxx_try_link "$LINENO"; then :
46942  ac_cv_lib_z_compress=yes
46943else
46944  ac_cv_lib_z_compress=no
46945fi
46946rm -f core conftest.err conftest.$ac_objext \
46947    conftest$ac_exeext conftest.$ac_ext
46948LIBS=$ac_check_lib_save_LIBS
46949fi
46950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
46951$as_echo "$ac_cv_lib_z_compress" >&6; }
46952if test "x$ac_cv_lib_z_compress" = xyes; then :
46953   ZLIB_FOUND=yes
46954else
46955   ZLIB_FOUND=no
46956fi
46957
46958
46959  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
46960$as_echo_n "checking for which zlib to use... " >&6; }
46961
46962  DEFAULT_ZLIB=bundled
46963  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46964    #
46965    # On macosx default is system...on others default is
46966    #
46967    DEFAULT_ZLIB=system
46968  fi
46969
46970  if test "x${ZLIB_FOUND}" != "xyes"; then
46971    #
46972    # If we don't find any system...set default to bundled
46973    #
46974    DEFAULT_ZLIB=bundled
46975  fi
46976
46977  #
46978  # If user didn't specify, use DEFAULT_ZLIB
46979  #
46980  if test "x${with_zlib}" = "x"; then
46981    with_zlib=${DEFAULT_ZLIB}
46982  fi
46983
46984  if test "x${with_zlib}" = "xbundled"; then
46985    USE_EXTERNAL_LIBZ=false
46986    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46987$as_echo "bundled" >&6; }
46988  elif test "x${with_zlib}" = "xsystem"; then
46989    if test "x${ZLIB_FOUND}" = "xyes"; then
46990      USE_EXTERNAL_LIBZ=true
46991      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46992$as_echo "system" >&6; }
46993    else
46994      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46995$as_echo "system not found" >&6; }
46996      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
46997    fi
46998  else
46999    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
47000  fi
47001
47002
47003
47004  ###############################################################################
47005  LIBZIP_CAN_USE_MMAP=true
47006
47007
47008
47009  ###############################################################################
47010  #
47011  # Check if altzone exists in time.h
47012  #
47013
47014  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47015/* end confdefs.h.  */
47016#include <time.h>
47017int
47018main ()
47019{
47020return (int)altzone;
47021  ;
47022  return 0;
47023}
47024_ACEOF
47025if ac_fn_cxx_try_link "$LINENO"; then :
47026  has_altzone=yes
47027else
47028  has_altzone=no
47029fi
47030rm -f core conftest.err conftest.$ac_objext \
47031    conftest$ac_exeext conftest.$ac_ext
47032  if test "x$has_altzone" = xyes; then
47033
47034$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
47035
47036  fi
47037
47038  ###############################################################################
47039  #
47040  # Check the maths library
47041  #
47042
47043  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
47044$as_echo_n "checking for cos in -lm... " >&6; }
47045if ${ac_cv_lib_m_cos+:} false; then :
47046  $as_echo_n "(cached) " >&6
47047else
47048  ac_check_lib_save_LIBS=$LIBS
47049LIBS="-lm  $LIBS"
47050cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47051/* end confdefs.h.  */
47052
47053/* Override any GCC internal prototype to avoid an error.
47054   Use char because int might match the return type of a GCC
47055   builtin and then its argument prototype would still apply.  */
47056#ifdef __cplusplus
47057extern "C"
47058#endif
47059char cos ();
47060int
47061main ()
47062{
47063return cos ();
47064  ;
47065  return 0;
47066}
47067_ACEOF
47068if ac_fn_cxx_try_link "$LINENO"; then :
47069  ac_cv_lib_m_cos=yes
47070else
47071  ac_cv_lib_m_cos=no
47072fi
47073rm -f core conftest.err conftest.$ac_objext \
47074    conftest$ac_exeext conftest.$ac_ext
47075LIBS=$ac_check_lib_save_LIBS
47076fi
47077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
47078$as_echo "$ac_cv_lib_m_cos" >&6; }
47079if test "x$ac_cv_lib_m_cos" = xyes; then :
47080  cat >>confdefs.h <<_ACEOF
47081#define HAVE_LIBM 1
47082_ACEOF
47083
47084  LIBS="-lm $LIBS"
47085
47086else
47087
47088        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
47089$as_echo "$as_me: Maths library was not found" >&6;}
47090
47091
47092fi
47093
47094
47095
47096  ###############################################################################
47097  #
47098  # Check for libdl.so
47099
47100  save_LIBS="$LIBS"
47101  LIBS=""
47102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
47103$as_echo_n "checking for dlopen in -ldl... " >&6; }
47104if ${ac_cv_lib_dl_dlopen+:} false; then :
47105  $as_echo_n "(cached) " >&6
47106else
47107  ac_check_lib_save_LIBS=$LIBS
47108LIBS="-ldl  $LIBS"
47109cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47110/* end confdefs.h.  */
47111
47112/* Override any GCC internal prototype to avoid an error.
47113   Use char because int might match the return type of a GCC
47114   builtin and then its argument prototype would still apply.  */
47115#ifdef __cplusplus
47116extern "C"
47117#endif
47118char dlopen ();
47119int
47120main ()
47121{
47122return dlopen ();
47123  ;
47124  return 0;
47125}
47126_ACEOF
47127if ac_fn_cxx_try_link "$LINENO"; then :
47128  ac_cv_lib_dl_dlopen=yes
47129else
47130  ac_cv_lib_dl_dlopen=no
47131fi
47132rm -f core conftest.err conftest.$ac_objext \
47133    conftest$ac_exeext conftest.$ac_ext
47134LIBS=$ac_check_lib_save_LIBS
47135fi
47136{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47137$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47138if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47139  cat >>confdefs.h <<_ACEOF
47140#define HAVE_LIBDL 1
47141_ACEOF
47142
47143  LIBS="-ldl $LIBS"
47144
47145fi
47146
47147  LIBDL="$LIBS"
47148
47149  LIBS="$save_LIBS"
47150
47151
47152  ###############################################################################
47153  #
47154  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47155  # dynamic build is configured on command line.
47156  #
47157
47158# Check whether --with-stdc++lib was given.
47159if test "${with_stdc__lib+set}" = set; then :
47160  withval=$with_stdc__lib;
47161        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47162                && test "x$with_stdc__lib" != xdefault; then
47163          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47164        fi
47165
47166else
47167  with_stdc__lib=default
47168
47169fi
47170
47171
47172  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47173    # Test if -lstdc++ works.
47174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47175$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47176    ac_ext=cpp
47177ac_cpp='$CXXCPP $CPPFLAGS'
47178ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47179ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47180ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47181
47182    OLD_CXXFLAGS="$CXXFLAGS"
47183    CXXFLAGS="$CXXFLAGS -lstdc++"
47184    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47185/* end confdefs.h.  */
47186
47187int
47188main ()
47189{
47190return 0;
47191  ;
47192  return 0;
47193}
47194_ACEOF
47195if ac_fn_cxx_try_link "$LINENO"; then :
47196  has_dynamic_libstdcxx=yes
47197else
47198  has_dynamic_libstdcxx=no
47199fi
47200rm -f core conftest.err conftest.$ac_objext \
47201    conftest$ac_exeext conftest.$ac_ext
47202    CXXFLAGS="$OLD_CXXFLAGS"
47203    ac_ext=cpp
47204ac_cpp='$CXXCPP $CPPFLAGS'
47205ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47206ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47207ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47208
47209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47210$as_echo "$has_dynamic_libstdcxx" >&6; }
47211
47212    # Test if stdc++ can be linked statically.
47213    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47214$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47215    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47216    ac_ext=cpp
47217ac_cpp='$CXXCPP $CPPFLAGS'
47218ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47219ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47220ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47221
47222    OLD_LIBS="$LIBS"
47223    OLD_CXX="$CXX"
47224    LIBS="$STATIC_STDCXX_FLAGS"
47225    CXX="$CC"
47226    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47227/* end confdefs.h.  */
47228
47229int
47230main ()
47231{
47232return 0;
47233  ;
47234  return 0;
47235}
47236_ACEOF
47237if ac_fn_cxx_try_link "$LINENO"; then :
47238  has_static_libstdcxx=yes
47239else
47240  has_static_libstdcxx=no
47241fi
47242rm -f core conftest.err conftest.$ac_objext \
47243    conftest$ac_exeext conftest.$ac_ext
47244    LIBS="$OLD_LIBS"
47245    CXX="$OLD_CXX"
47246    ac_ext=cpp
47247ac_cpp='$CXXCPP $CPPFLAGS'
47248ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47249ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47250ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47251
47252    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47253$as_echo "$has_static_libstdcxx" >&6; }
47254
47255    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47256      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47257    fi
47258
47259    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47260      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47261    fi
47262
47263    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47264      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47265    fi
47266
47267    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47268$as_echo_n "checking how to link with libstdc++... " >&6; }
47269    # If dynamic was requested, it's available since it would fail above otherwise.
47270    # If dynamic wasn't requested, go with static unless it isn't available.
47271    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47272      LIBCXX="$LIBCXX -lstdc++"
47273      LDCXX="$CXX"
47274      STATIC_CXX_SETTING="STATIC_CXX=false"
47275      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47276$as_echo "dynamic" >&6; }
47277    else
47278      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47279      LDCXX="$CC"
47280      STATIC_CXX_SETTING="STATIC_CXX=true"
47281      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47282$as_echo "static" >&6; }
47283    fi
47284  fi
47285
47286
47287  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47288    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47289
47290pkg_failed=no
47291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47292$as_echo_n "checking for LIBFFI... " >&6; }
47293
47294if test -n "$LIBFFI_CFLAGS"; then
47295    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47296 elif test -n "$PKG_CONFIG"; then
47297    if test -n "$PKG_CONFIG" && \
47298    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47299  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47300  ac_status=$?
47301  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47302  test $ac_status = 0; }; then
47303  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47304else
47305  pkg_failed=yes
47306fi
47307 else
47308    pkg_failed=untried
47309fi
47310if test -n "$LIBFFI_LIBS"; then
47311    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47312 elif test -n "$PKG_CONFIG"; then
47313    if test -n "$PKG_CONFIG" && \
47314    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47315  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47316  ac_status=$?
47317  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47318  test $ac_status = 0; }; then
47319  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47320else
47321  pkg_failed=yes
47322fi
47323 else
47324    pkg_failed=untried
47325fi
47326
47327
47328
47329if test $pkg_failed = yes; then
47330
47331if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47332        _pkg_short_errors_supported=yes
47333else
47334        _pkg_short_errors_supported=no
47335fi
47336        if test $_pkg_short_errors_supported = yes; then
47337	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47338        else
47339	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47340        fi
47341	# Put the nasty error message in config.log where it belongs
47342	echo "$LIBFFI_PKG_ERRORS" >&5
47343
47344	as_fn_error $? "Package requirements (libffi) were not met:
47345
47346$LIBFFI_PKG_ERRORS
47347
47348Consider adjusting the PKG_CONFIG_PATH environment variable if you
47349installed software in a non-standard prefix.
47350
47351Alternatively, you may set the environment variables LIBFFI_CFLAGS
47352and LIBFFI_LIBS to avoid the need to call pkg-config.
47353See the pkg-config man page for more details.
47354" "$LINENO" 5
47355elif test $pkg_failed = untried; then
47356	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47357$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47358as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47359is in your PATH or set the PKG_CONFIG environment variable to the full
47360path to pkg-config.
47361
47362Alternatively, you may set the environment variables LIBFFI_CFLAGS
47363and LIBFFI_LIBS to avoid the need to call pkg-config.
47364See the pkg-config man page for more details.
47365
47366To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47367See \`config.log' for more details" "$LINENO" 5; }
47368else
47369	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47370	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47371        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47372$as_echo "yes" >&6; }
47373	:
47374fi
47375
47376  fi
47377
47378  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47379    # Extract the first word of "llvm-config", so it can be a program name with args.
47380set dummy llvm-config; ac_word=$2
47381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47382$as_echo_n "checking for $ac_word... " >&6; }
47383if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47384  $as_echo_n "(cached) " >&6
47385else
47386  if test -n "$LLVM_CONFIG"; then
47387  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47388else
47389as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47390for as_dir in $PATH
47391do
47392  IFS=$as_save_IFS
47393  test -z "$as_dir" && as_dir=.
47394    for ac_exec_ext in '' $ac_executable_extensions; do
47395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47396    ac_cv_prog_LLVM_CONFIG="llvm-config"
47397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47398    break 2
47399  fi
47400done
47401  done
47402IFS=$as_save_IFS
47403
47404fi
47405fi
47406LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47407if test -n "$LLVM_CONFIG"; then
47408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47409$as_echo "$LLVM_CONFIG" >&6; }
47410else
47411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47412$as_echo "no" >&6; }
47413fi
47414
47415
47416
47417    if test "x$LLVM_CONFIG" != xllvm-config; then
47418      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47419    fi
47420
47421    llvm_components="jit mcjit engine nativecodegen native"
47422    unset LLVM_CFLAGS
47423    for flag in $("$LLVM_CONFIG" --cxxflags); do
47424      if echo "${flag}" | grep -q '^-[ID]'; then
47425        if test "${flag}" != "-D_DEBUG" ; then
47426          if test "${LLVM_CFLAGS}" != "" ; then
47427            LLVM_CFLAGS="${LLVM_CFLAGS} "
47428          fi
47429          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47430        fi
47431      fi
47432    done
47433    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47434    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47435
47436    unset LLVM_LDFLAGS
47437    for flag in $("${LLVM_CONFIG}" --ldflags); do
47438      if echo "${flag}" | grep -q '^-L'; then
47439        if test "${LLVM_LDFLAGS}" != ""; then
47440          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47441        fi
47442        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47443      fi
47444    done
47445
47446    unset LLVM_LIBS
47447    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47448      if echo "${flag}" | grep -q '^-l'; then
47449        if test "${LLVM_LIBS}" != ""; then
47450          LLVM_LIBS="${LLVM_LIBS} "
47451        fi
47452        LLVM_LIBS="${LLVM_LIBS}${flag}"
47453      fi
47454    done
47455
47456
47457
47458
47459  fi
47460
47461  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47462  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47463    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47464  fi
47465
47466  # TODO better (platform agnostic) test
47467  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47468    LIBCXX="-lstdc++"
47469  fi
47470
47471
47472
47473
47474  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47475
47476
47477# Check whether --with-msvcr-dll was given.
47478if test "${with_msvcr_dll+set}" = set; then :
47479  withval=$with_msvcr_dll;
47480fi
47481
47482
47483  if test "x$with_msvcr_dll" != x; then
47484    # If given explicitely by user, do not probe. If not present, fail directly.
47485
47486  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47487  METHOD="--with-msvcr-dll"
47488  if test -e "$POSSIBLE_MSVCR_DLL"; then
47489    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47490$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47491
47492    # Need to check if the found msvcr is correct architecture
47493    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47494$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47495    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47496    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47497      CORRECT_MSVCR_ARCH=386
47498    else
47499      CORRECT_MSVCR_ARCH=x86-64
47500    fi
47501    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47502      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47503$as_echo "ok" >&6; }
47504      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47505      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47506$as_echo_n "checking for msvcr100.dll... " >&6; }
47507      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47508$as_echo "$MSVCR_DLL" >&6; }
47509    else
47510      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47511$as_echo "incorrect, ignoring" >&6; }
47512      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47513$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47514    fi
47515  fi
47516
47517    if test "x$MSVCR_DLL" = x; then
47518      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47519    fi
47520  fi
47521
47522  if test "x$MSVCR_DLL" = x; then
47523    # Probe: Using well-known location from Visual Studio 10.0
47524    if test "x$VCINSTALLDIR" != x; then
47525      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47526
47527  windows_path="$CYGWIN_VC_INSTALL_DIR"
47528  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47529    unix_path=`$CYGPATH -u "$windows_path"`
47530    CYGWIN_VC_INSTALL_DIR="$unix_path"
47531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47532    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47533    CYGWIN_VC_INSTALL_DIR="$unix_path"
47534  fi
47535
47536      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47537        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47538      else
47539        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47540      fi
47541
47542  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47543  METHOD="well-known location in VCINSTALLDIR"
47544  if test -e "$POSSIBLE_MSVCR_DLL"; then
47545    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47546$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47547
47548    # Need to check if the found msvcr is correct architecture
47549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47550$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47551    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47552    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47553      CORRECT_MSVCR_ARCH=386
47554    else
47555      CORRECT_MSVCR_ARCH=x86-64
47556    fi
47557    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47559$as_echo "ok" >&6; }
47560      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47561      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47562$as_echo_n "checking for msvcr100.dll... " >&6; }
47563      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47564$as_echo "$MSVCR_DLL" >&6; }
47565    else
47566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47567$as_echo "incorrect, ignoring" >&6; }
47568      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47569$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47570    fi
47571  fi
47572
47573    fi
47574  fi
47575
47576  if test "x$MSVCR_DLL" = x; then
47577    # Probe: Check in the Boot JDK directory.
47578    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47579
47580  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47581  METHOD="well-known location in Boot JDK"
47582  if test -e "$POSSIBLE_MSVCR_DLL"; then
47583    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47584$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47585
47586    # Need to check if the found msvcr is correct architecture
47587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47588$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47589    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47590    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47591      CORRECT_MSVCR_ARCH=386
47592    else
47593      CORRECT_MSVCR_ARCH=x86-64
47594    fi
47595    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47597$as_echo "ok" >&6; }
47598      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47600$as_echo_n "checking for msvcr100.dll... " >&6; }
47601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47602$as_echo "$MSVCR_DLL" >&6; }
47603    else
47604      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47605$as_echo "incorrect, ignoring" >&6; }
47606      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47607$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47608    fi
47609  fi
47610
47611  fi
47612
47613  if test "x$MSVCR_DLL" = x; then
47614    # Probe: Look in the Windows system32 directory
47615    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47616
47617  windows_path="$CYGWIN_SYSTEMROOT"
47618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47619    unix_path=`$CYGPATH -u "$windows_path"`
47620    CYGWIN_SYSTEMROOT="$unix_path"
47621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47623    CYGWIN_SYSTEMROOT="$unix_path"
47624  fi
47625
47626    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47627
47628  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47629  METHOD="well-known location in SYSTEMROOT"
47630  if test -e "$POSSIBLE_MSVCR_DLL"; then
47631    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47632$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47633
47634    # Need to check if the found msvcr is correct architecture
47635    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47636$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47637    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47638    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47639      CORRECT_MSVCR_ARCH=386
47640    else
47641      CORRECT_MSVCR_ARCH=x86-64
47642    fi
47643    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47645$as_echo "ok" >&6; }
47646      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47647      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47648$as_echo_n "checking for msvcr100.dll... " >&6; }
47649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47650$as_echo "$MSVCR_DLL" >&6; }
47651    else
47652      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47653$as_echo "incorrect, ignoring" >&6; }
47654      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47655$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47656    fi
47657  fi
47658
47659  fi
47660
47661  if test "x$MSVCR_DLL" = x; then
47662    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47663    if test "x$VS100COMNTOOLS" != x; then
47664      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47665
47666  windows_path="$CYGWIN_VS_TOOLS_DIR"
47667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47668    unix_path=`$CYGPATH -u "$windows_path"`
47669    CYGWIN_VS_TOOLS_DIR="$unix_path"
47670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47672    CYGWIN_VS_TOOLS_DIR="$unix_path"
47673  fi
47674
47675      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47676        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47677      else
47678        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47679      fi
47680
47681  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47682  METHOD="search of VS100COMNTOOLS"
47683  if test -e "$POSSIBLE_MSVCR_DLL"; then
47684    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47685$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47686
47687    # Need to check if the found msvcr is correct architecture
47688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47689$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47690    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47691    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47692      CORRECT_MSVCR_ARCH=386
47693    else
47694      CORRECT_MSVCR_ARCH=x86-64
47695    fi
47696    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47698$as_echo "ok" >&6; }
47699      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47701$as_echo_n "checking for msvcr100.dll... " >&6; }
47702      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47703$as_echo "$MSVCR_DLL" >&6; }
47704    else
47705      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47706$as_echo "incorrect, ignoring" >&6; }
47707      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47708$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47709    fi
47710  fi
47711
47712    fi
47713  fi
47714
47715  if test "x$MSVCR_DLL" = x; then
47716    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47717    # (This was the original behaviour; kept since it might turn up something)
47718    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47719      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47720        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47721      else
47722        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47723        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47724          # We're grasping at straws now...
47725          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47726        fi
47727      fi
47728
47729
47730  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47731  METHOD="search of VCINSTALLDIR"
47732  if test -e "$POSSIBLE_MSVCR_DLL"; then
47733    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47734$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47735
47736    # Need to check if the found msvcr is correct architecture
47737    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47738$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47739    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47740    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47741      CORRECT_MSVCR_ARCH=386
47742    else
47743      CORRECT_MSVCR_ARCH=x86-64
47744    fi
47745    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47747$as_echo "ok" >&6; }
47748      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47749      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47750$as_echo_n "checking for msvcr100.dll... " >&6; }
47751      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47752$as_echo "$MSVCR_DLL" >&6; }
47753    else
47754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47755$as_echo "incorrect, ignoring" >&6; }
47756      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47757$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47758    fi
47759  fi
47760
47761    fi
47762  fi
47763
47764  if test "x$MSVCR_DLL" = x; then
47765    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47766$as_echo_n "checking for msvcr100.dll... " >&6; }
47767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47768$as_echo "no" >&6; }
47769    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47770  fi
47771
47772
47773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47774
47775  # Input might be given as Windows format, start by converting to
47776  # unix format.
47777  path="$MSVCR_DLL"
47778  new_path=`$CYGPATH -u "$path"`
47779
47780  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47781  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47782  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47783  # "foo.exe" is OK but "foo" is an error.
47784  #
47785  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47786  # It is also a way to make sure we got the proper file name for the real test later on.
47787  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47788  if test "x$test_shortpath" = x; then
47789    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47790$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47791    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47792  fi
47793
47794  # Call helper function which possibly converts this using DOS-style short mode.
47795  # If so, the updated path is stored in $new_path.
47796
47797  input_path="$new_path"
47798  # Check if we need to convert this using DOS-style short mode. If the path
47799  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47800  # take no chances and rewrite it.
47801  # Note: m4 eats our [], so we need to use [ and ] instead.
47802  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47803  if test "x$has_forbidden_chars" != x; then
47804    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47805    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47806    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47807    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47808      # Going to short mode and back again did indeed matter. Since short mode is
47809      # case insensitive, let's make it lowercase to improve readability.
47810      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47811      # Now convert it back to Unix-stile (cygpath)
47812      input_path=`$CYGPATH -u "$shortmode_path"`
47813      new_path="$input_path"
47814    fi
47815  fi
47816
47817  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47818  if test "x$test_cygdrive_prefix" = x; then
47819    # As a simple fix, exclude /usr/bin since it's not a real path.
47820    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47821      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47822      # a path prefixed by /cygdrive for fixpath to work.
47823      new_path="$CYGWIN_ROOT_PATH$input_path"
47824    fi
47825  fi
47826
47827
47828  if test "x$path" != "x$new_path"; then
47829    MSVCR_DLL="$new_path"
47830    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47831$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47832  fi
47833
47834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47835
47836  path="$MSVCR_DLL"
47837  has_colon=`$ECHO $path | $GREP ^.:`
47838  new_path="$path"
47839  if test "x$has_colon" = x; then
47840    # Not in mixed or Windows style, start by that.
47841    new_path=`cmd //c echo $path`
47842  fi
47843
47844
47845  input_path="$new_path"
47846  # Check if we need to convert this using DOS-style short mode. If the path
47847  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47848  # take no chances and rewrite it.
47849  # Note: m4 eats our [], so we need to use [ and ] instead.
47850  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47851  if test "x$has_forbidden_chars" != x; then
47852    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47853    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47854  fi
47855
47856
47857  windows_path="$new_path"
47858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47859    unix_path=`$CYGPATH -u "$windows_path"`
47860    new_path="$unix_path"
47861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47863    new_path="$unix_path"
47864  fi
47865
47866  if test "x$path" != "x$new_path"; then
47867    MSVCR_DLL="$new_path"
47868    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47869$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47870  fi
47871
47872  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47873  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47874
47875  else
47876    # We're on a posix platform. Hooray! :)
47877    path="$MSVCR_DLL"
47878    has_space=`$ECHO "$path" | $GREP " "`
47879    if test "x$has_space" != x; then
47880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47881$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47882      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47883    fi
47884
47885    # Use eval to expand a potential ~
47886    eval path="$path"
47887    if test ! -f "$path" && test ! -d "$path"; then
47888      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47889    fi
47890
47891    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
47892  fi
47893
47894
47895
47896
47897# Check whether --with-dxsdk was given.
47898if test "${with_dxsdk+set}" = set; then :
47899  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
47900$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
47901fi
47902
47903
47904
47905
47906# Check whether --with-dxsdk-lib was given.
47907if test "${with_dxsdk_lib+set}" = set; then :
47908  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
47909$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
47910fi
47911
47912
47913
47914
47915# Check whether --with-dxsdk-include was given.
47916if test "${with_dxsdk_include+set}" = set; then :
47917  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
47918$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
47919fi
47920
47921
47922  fi
47923
47924
47925
47926###############################################################################
47927#
47928# We need to do some final tweaking, when everything else is done.
47929#
47930###############################################################################
47931
47932
47933  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47934
47935
47936  # The name of the Service Agent jar.
47937  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47938  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47939    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47940  fi
47941
47942
47943
47944    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47945$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47946
47947    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47948      ENABLE_INTREE_EC=yes
47949      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47950$as_echo "yes" >&6; }
47951    else
47952      ENABLE_INTREE_EC=no
47953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47954$as_echo "no" >&6; }
47955    fi
47956
47957
47958
47959
47960###############################################################################
47961#
47962# Configure parts of the build that only affect the build performance,
47963# not the result.
47964#
47965###############################################################################
47966
47967
47968  # How many cores do we have on this build system?
47969
47970# Check whether --with-num-cores was given.
47971if test "${with_num_cores+set}" = set; then :
47972  withval=$with_num_cores;
47973fi
47974
47975  if test "x$with_num_cores" = x; then
47976    # The number of cores were not specified, try to probe them.
47977
47978  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47979$as_echo_n "checking for number of cores... " >&6; }
47980  NUM_CORES=1
47981  FOUND_CORES=no
47982
47983  if test -f /proc/cpuinfo; then
47984    # Looks like a Linux (or cygwin) system
47985    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47986    FOUND_CORES=yes
47987  elif test -x /usr/sbin/psrinfo; then
47988    # Looks like a Solaris system
47989    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47990    FOUND_CORES=yes
47991  elif test -x /usr/sbin/system_profiler; then
47992    # Looks like a MacOSX system
47993    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47994    FOUND_CORES=yes
47995  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47996    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47997    FOUND_CORES=yes
47998  elif test -n "$NUMBER_OF_PROCESSORS"; then
47999    # On windows, look in the env
48000    NUM_CORES=$NUMBER_OF_PROCESSORS
48001    FOUND_CORES=yes
48002  fi
48003
48004  if test "x$FOUND_CORES" = xyes; then
48005    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
48006$as_echo "$NUM_CORES" >&6; }
48007  else
48008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
48009$as_echo "could not detect number of cores, defaulting to 1" >&6; }
48010    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
48011$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
48012  fi
48013
48014  else
48015    NUM_CORES=$with_num_cores
48016  fi
48017
48018
48019
48020  # How much memory do we have on this build system?
48021
48022# Check whether --with-memory-size was given.
48023if test "${with_memory_size+set}" = set; then :
48024  withval=$with_memory_size;
48025fi
48026
48027  if test "x$with_memory_size" = x; then
48028    # The memory size was not specified, try to probe it.
48029
48030  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
48031$as_echo_n "checking for memory size... " >&6; }
48032  # Default to 1024 MB
48033  MEMORY_SIZE=1024
48034  FOUND_MEM=no
48035
48036  if test -f /proc/meminfo; then
48037    # Looks like a Linux (or cygwin) system
48038    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
48039    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
48040    FOUND_MEM=yes
48041  elif test -x /usr/sbin/prtconf; then
48042    # Looks like a Solaris or AIX system
48043    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
48044    FOUND_MEM=yes
48045  elif test -x /usr/sbin/system_profiler; then
48046    # Looks like a MacOSX system
48047    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
48048    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
48049    FOUND_MEM=yes
48050  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
48051    # Windows, but without cygwin
48052    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
48053    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
48054    FOUND_MEM=yes
48055  fi
48056
48057  if test "x$FOUND_MEM" = xyes; then
48058    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
48059$as_echo "$MEMORY_SIZE MB" >&6; }
48060  else
48061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
48062$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
48063    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
48064$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
48065  fi
48066
48067  else
48068    MEMORY_SIZE=$with_memory_size
48069  fi
48070
48071
48072
48073  # Provide a decent default number of parallel jobs for make depending on
48074  # number of cores, amount of memory and machine architecture.
48075
48076# Check whether --with-jobs was given.
48077if test "${with_jobs+set}" = set; then :
48078  withval=$with_jobs;
48079fi
48080
48081  if test "x$with_jobs" = x; then
48082    # Number of jobs was not specified, calculate.
48083    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
48084$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
48085    # Approximate memory in GB, rounding up a bit.
48086    memory_gb=`expr $MEMORY_SIZE / 1100`
48087    # Pick the lowest of memory in gb and number of cores.
48088    if test "$memory_gb" -lt "$NUM_CORES"; then
48089      JOBS="$memory_gb"
48090    else
48091      JOBS="$NUM_CORES"
48092      # On bigger machines, leave some room for other processes to run
48093      if test "$JOBS" -gt "4"; then
48094        JOBS=`expr $JOBS '*' 90 / 100`
48095      fi
48096    fi
48097    # Cap number of jobs to 16
48098    if test "$JOBS" -gt "16"; then
48099      JOBS=16
48100    fi
48101    if test "$JOBS" -eq "0"; then
48102      JOBS=1
48103    fi
48104    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
48105$as_echo "$JOBS" >&6; }
48106  else
48107    JOBS=$with_jobs
48108  fi
48109
48110
48111
48112# Setup smart javac (after cores and memory have been setup)
48113
48114
48115# Check whether --with-sjavac-server-java was given.
48116if test "${with_sjavac_server_java+set}" = set; then :
48117  withval=$with_sjavac_server_java;
48118fi
48119
48120
48121  if test "x$with_sjavac_server_java" != x; then
48122    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48123    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48124    if test "x$FOUND_VERSION" = x; then
48125      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48126    fi
48127  else
48128    SJAVAC_SERVER_JAVA=""
48129    # Hotspot specific options.
48130
48131  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48132  $ECHO "Command: $JAVA -verbosegc -version" >&5
48133  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48134  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48135  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48136  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48137    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48138    JVM_ARG_OK=true
48139  else
48140    $ECHO "Arg failed:" >&5
48141    $ECHO "$OUTPUT" >&5
48142    JVM_ARG_OK=false
48143  fi
48144
48145    # JRockit specific options.
48146
48147  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48148  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48149  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48150  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48151  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48152  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48153    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48154    JVM_ARG_OK=true
48155  else
48156    $ECHO "Arg failed:" >&5
48157    $ECHO "$OUTPUT" >&5
48158    JVM_ARG_OK=false
48159  fi
48160
48161    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48162  fi
48163
48164
48165  if test "$MEMORY_SIZE" -gt "2500"; then
48166
48167  $ECHO "Check if jvm arg is ok: -d64" >&5
48168  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48169  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48170  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48171  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48172  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48173    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48174    JVM_ARG_OK=true
48175  else
48176    $ECHO "Arg failed:" >&5
48177    $ECHO "$OUTPUT" >&5
48178    JVM_ARG_OK=false
48179  fi
48180
48181    if test "$JVM_ARG_OK" = true; then
48182      JVM_64BIT=true
48183      JVM_ARG_OK=false
48184    fi
48185  fi
48186
48187  if test "$JVM_64BIT" = true; then
48188    if test "$MEMORY_SIZE" -gt "17000"; then
48189
48190  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48191  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48192  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48193  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48194  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48195  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48196    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48197    JVM_ARG_OK=true
48198  else
48199    $ECHO "Arg failed:" >&5
48200    $ECHO "$OUTPUT" >&5
48201    JVM_ARG_OK=false
48202  fi
48203
48204    fi
48205    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48206
48207  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48208  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48209  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48210  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48211  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48212  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48213    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48214    JVM_ARG_OK=true
48215  else
48216    $ECHO "Arg failed:" >&5
48217    $ECHO "$OUTPUT" >&5
48218    JVM_ARG_OK=false
48219  fi
48220
48221    fi
48222    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48223
48224  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48225  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48226  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48227  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48228  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48229  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48230    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48231    JVM_ARG_OK=true
48232  else
48233    $ECHO "Arg failed:" >&5
48234    $ECHO "$OUTPUT" >&5
48235    JVM_ARG_OK=false
48236  fi
48237
48238    fi
48239    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48240
48241  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48242  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48243  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48244  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48245  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48246  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48247    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48248    JVM_ARG_OK=true
48249  else
48250    $ECHO "Arg failed:" >&5
48251    $ECHO "$OUTPUT" >&5
48252    JVM_ARG_OK=false
48253  fi
48254
48255    fi
48256  fi
48257  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48258
48259  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48260  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48261  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48262  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48263  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48265    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48266    JVM_ARG_OK=true
48267  else
48268    $ECHO "Arg failed:" >&5
48269    $ECHO "$OUTPUT" >&5
48270    JVM_ARG_OK=false
48271  fi
48272
48273  fi
48274  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48275
48276  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48277  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48278  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48279  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48280  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48281  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48282    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48283    JVM_ARG_OK=true
48284  else
48285    $ECHO "Arg failed:" >&5
48286    $ECHO "$OUTPUT" >&5
48287    JVM_ARG_OK=false
48288  fi
48289
48290  fi
48291  if test "$JVM_ARG_OK" = false; then
48292
48293  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48294  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48295  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48296  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48297  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48298  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48299    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48300    JVM_ARG_OK=true
48301  else
48302    $ECHO "Arg failed:" >&5
48303    $ECHO "$OUTPUT" >&5
48304    JVM_ARG_OK=false
48305  fi
48306
48307  fi
48308
48309  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48310$as_echo_n "checking whether to use sjavac... " >&6; }
48311  # Check whether --enable-sjavac was given.
48312if test "${enable_sjavac+set}" = set; then :
48313  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48314else
48315  ENABLE_SJAVAC='no'
48316fi
48317
48318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48319$as_echo "$ENABLE_SJAVAC" >&6; }
48320
48321
48322  if test "x$ENABLE_SJAVAC" = xyes; then
48323    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48324  else
48325    SJAVAC_SERVER_DIR=
48326  fi
48327
48328
48329
48330# Can the C/C++ compiler use precompiled headers?
48331
48332
48333  ###############################################################################
48334  #
48335  # Can the C/C++ compiler use precompiled headers?
48336  #
48337  # Check whether --enable-precompiled-headers was given.
48338if test "${enable_precompiled_headers+set}" = set; then :
48339  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48340else
48341  ENABLE_PRECOMPH=yes
48342fi
48343
48344
48345  USE_PRECOMPILED_HEADER=1
48346  if test "x$ENABLE_PRECOMPH" = xno; then
48347    USE_PRECOMPILED_HEADER=0
48348  fi
48349
48350  if test "x$ENABLE_PRECOMPH" = xyes; then
48351    # Check that the compiler actually supports precomp headers.
48352    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48353      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48354$as_echo_n "checking that precompiled headers work... " >&6; }
48355      echo "int alfa();" > conftest.h
48356      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48357      if test ! -f conftest.hpp.gch; then
48358        USE_PRECOMPILED_HEADER=0
48359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48360$as_echo "no" >&6; }
48361      else
48362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48363$as_echo "yes" >&6; }
48364      fi
48365      rm -f conftest.h conftest.hpp.gch
48366    fi
48367  fi
48368
48369
48370
48371
48372# Setup use of ccache, if available
48373
48374  # Check whether --enable-ccache was given.
48375if test "${enable_ccache+set}" = set; then :
48376  enableval=$enable_ccache;
48377fi
48378
48379
48380  CCACHE=
48381  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48382$as_echo_n "checking is ccache enabled... " >&6; }
48383  ENABLE_CCACHE=$enable_ccache
48384  if test "x$enable_ccache" = xyes; then
48385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48386$as_echo "yes" >&6; }
48387    OLD_PATH="$PATH"
48388    if test "x$TOOLS_DIR" != x; then
48389      PATH=$TOOLS_DIR:$PATH
48390    fi
48391
48392
48393
48394  # Publish this variable in the help.
48395
48396
48397  if test "x$CCACHE" = x; then
48398    # The variable is not set by user, try to locate tool using the code snippet
48399    for ac_prog in ccache
48400do
48401  # Extract the first word of "$ac_prog", so it can be a program name with args.
48402set dummy $ac_prog; ac_word=$2
48403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48404$as_echo_n "checking for $ac_word... " >&6; }
48405if ${ac_cv_path_CCACHE+:} false; then :
48406  $as_echo_n "(cached) " >&6
48407else
48408  case $CCACHE in
48409  [\\/]* | ?:[\\/]*)
48410  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48411  ;;
48412  *)
48413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48414for as_dir in $PATH
48415do
48416  IFS=$as_save_IFS
48417  test -z "$as_dir" && as_dir=.
48418    for ac_exec_ext in '' $ac_executable_extensions; do
48419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48420    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48422    break 2
48423  fi
48424done
48425  done
48426IFS=$as_save_IFS
48427
48428  ;;
48429esac
48430fi
48431CCACHE=$ac_cv_path_CCACHE
48432if test -n "$CCACHE"; then
48433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48434$as_echo "$CCACHE" >&6; }
48435else
48436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48437$as_echo "no" >&6; }
48438fi
48439
48440
48441  test -n "$CCACHE" && break
48442done
48443
48444  else
48445    # The variable is set, but is it from the command line or the environment?
48446
48447    # Try to remove the string !CCACHE! from our list.
48448    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48449    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48450      # If it failed, the variable was not from the command line. Ignore it,
48451      # but warn the user (except for BASH, which is always set by the calling BASH).
48452      if test "xCCACHE" != xBASH; then
48453        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48454$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48455      fi
48456      # Try to locate tool using the code snippet
48457      for ac_prog in ccache
48458do
48459  # Extract the first word of "$ac_prog", so it can be a program name with args.
48460set dummy $ac_prog; ac_word=$2
48461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48462$as_echo_n "checking for $ac_word... " >&6; }
48463if ${ac_cv_path_CCACHE+:} false; then :
48464  $as_echo_n "(cached) " >&6
48465else
48466  case $CCACHE in
48467  [\\/]* | ?:[\\/]*)
48468  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48469  ;;
48470  *)
48471  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48472for as_dir in $PATH
48473do
48474  IFS=$as_save_IFS
48475  test -z "$as_dir" && as_dir=.
48476    for ac_exec_ext in '' $ac_executable_extensions; do
48477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48478    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48480    break 2
48481  fi
48482done
48483  done
48484IFS=$as_save_IFS
48485
48486  ;;
48487esac
48488fi
48489CCACHE=$ac_cv_path_CCACHE
48490if test -n "$CCACHE"; then
48491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48492$as_echo "$CCACHE" >&6; }
48493else
48494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48495$as_echo "no" >&6; }
48496fi
48497
48498
48499  test -n "$CCACHE" && break
48500done
48501
48502    else
48503      # If it succeeded, then it was overridden by the user. We will use it
48504      # for the tool.
48505
48506      # First remove it from the list of overridden variables, so we can test
48507      # for unknown variables in the end.
48508      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48509
48510      # Check if the provided tool contains a complete path.
48511      tool_specified="$CCACHE"
48512      tool_basename="${tool_specified##*/}"
48513      if test "x$tool_basename" = "x$tool_specified"; then
48514        # A command without a complete path is provided, search $PATH.
48515        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48516$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48517        # Extract the first word of "$tool_basename", so it can be a program name with args.
48518set dummy $tool_basename; ac_word=$2
48519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48520$as_echo_n "checking for $ac_word... " >&6; }
48521if ${ac_cv_path_CCACHE+:} false; then :
48522  $as_echo_n "(cached) " >&6
48523else
48524  case $CCACHE in
48525  [\\/]* | ?:[\\/]*)
48526  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48527  ;;
48528  *)
48529  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48530for as_dir in $PATH
48531do
48532  IFS=$as_save_IFS
48533  test -z "$as_dir" && as_dir=.
48534    for ac_exec_ext in '' $ac_executable_extensions; do
48535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48536    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48538    break 2
48539  fi
48540done
48541  done
48542IFS=$as_save_IFS
48543
48544  ;;
48545esac
48546fi
48547CCACHE=$ac_cv_path_CCACHE
48548if test -n "$CCACHE"; then
48549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48550$as_echo "$CCACHE" >&6; }
48551else
48552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48553$as_echo "no" >&6; }
48554fi
48555
48556
48557        if test "x$CCACHE" = x; then
48558          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48559        fi
48560      else
48561        # Otherwise we believe it is a complete path. Use it as it is.
48562        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48563$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48565$as_echo_n "checking for CCACHE... " >&6; }
48566        if test ! -x "$tool_specified"; then
48567          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48568$as_echo "not found" >&6; }
48569          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48570        fi
48571        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48572$as_echo "$tool_specified" >&6; }
48573      fi
48574    fi
48575  fi
48576
48577
48578
48579  if test "x$CCACHE" = x; then
48580    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48581  fi
48582
48583
48584    CCACHE_STATUS="enabled"
48585    PATH="$OLD_PATH"
48586  elif test "x$enable_ccache" = xno; then
48587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48588$as_echo "no, explicitly disabled" >&6; }
48589  elif test "x$enable_ccache" = x; then
48590    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48591$as_echo "no" >&6; }
48592  else
48593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48594$as_echo "unknown" >&6; }
48595    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48596  fi
48597
48598
48599
48600# Check whether --with-ccache-dir was given.
48601if test "${with_ccache_dir+set}" = set; then :
48602  withval=$with_ccache_dir;
48603fi
48604
48605
48606  if test "x$with_ccache_dir" != x; then
48607    # When using a non home ccache directory, assume the use is to share ccache files
48608    # with other users. Thus change the umask.
48609    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48610    if test "x$CCACHE" = x; then
48611      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48612$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48613    fi
48614  fi
48615
48616  if test "x$CCACHE" != x; then
48617
48618  if test "x$CCACHE" != x; then
48619    # Only use ccache if it is 3.1.4 or later, which supports
48620    # precompiled headers.
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48622$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48623    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48624    if test "x$HAS_GOOD_CCACHE" = x; then
48625      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48626$as_echo "no, disabling ccache" >&6; }
48627      CCACHE=
48628      CCACHE_STATUS="disabled"
48629    else
48630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48631$as_echo "yes" >&6; }
48632      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48633$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48634      PUSHED_FLAGS="$CXXFLAGS"
48635      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48636      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48637/* end confdefs.h.  */
48638
48639int
48640main ()
48641{
48642
48643  ;
48644  return 0;
48645}
48646_ACEOF
48647if ac_fn_cxx_try_compile "$LINENO"; then :
48648  CC_KNOWS_CCACHE_TRICK=yes
48649else
48650  CC_KNOWS_CCACHE_TRICK=no
48651fi
48652rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48653      CXXFLAGS="$PUSHED_FLAGS"
48654      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48655        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48656$as_echo "yes" >&6; }
48657      else
48658        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48659$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48660        CCACHE=
48661        CCACHE_STATUS="disabled"
48662      fi
48663    fi
48664  fi
48665
48666  if test "x$CCACHE" != x; then
48667    CCACHE_SLOPPINESS=time_macros
48668    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48669    CCACHE_FLAGS=-fpch-preprocess
48670
48671    if test "x$SET_CCACHE_DIR" != x; then
48672      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48673      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48674    fi
48675  fi
48676
48677  fi
48678
48679
48680###############################################################################
48681#
48682# And now the finish...
48683#
48684###############################################################################
48685
48686# Check for some common pitfalls
48687
48688  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48689    file_to_test="$SRC_ROOT/LICENSE"
48690    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48691      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
48692    fi
48693  fi
48694
48695
48696  # Did user specify any unknown variables?
48697
48698  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48699    # Replace the separating ! with spaces before presenting for end user.
48700    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48701    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48702$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48703  fi
48704
48705
48706  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48707$as_echo_n "checking if build directory is on local disk... " >&6; }
48708
48709  # df -l lists only local disks; if the given directory is not found then
48710  # a non-zero exit code is given
48711  if test "x$DF" = x; then
48712    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48713      # msys does not have df; use Windows "net use" instead.
48714      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48715      if test "x$IS_NETWORK_DISK" = x; then
48716        OUTPUT_DIR_IS_LOCAL="yes"
48717      else
48718        OUTPUT_DIR_IS_LOCAL="no"
48719      fi
48720    else
48721      # No df here, say it's local
48722      OUTPUT_DIR_IS_LOCAL="yes"
48723    fi
48724  else
48725    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48726      OUTPUT_DIR_IS_LOCAL="yes"
48727    else
48728      OUTPUT_DIR_IS_LOCAL="no"
48729    fi
48730  fi
48731
48732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48733$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48734
48735
48736
48737  # Check if the user has any old-style ALT_ variables set.
48738  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48739
48740  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48741  # Since we can't properly handle the dependencies for this, warn the user about the situation
48742  if test -e $OUTPUT_ROOT/spec.gmk; then
48743    IS_RECONFIGURE=yes
48744  else
48745    IS_RECONFIGURE=no
48746  fi
48747
48748
48749# At the end, call the custom hook. (Dummy macro if no custom sources available)
48750
48751
48752# We're messing a bit with internal autoconf variables to put the config.status
48753# in the output directory instead of the current directory.
48754CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48755
48756# Create the actual output files. Now the main work of configure is done.
48757cat >confcache <<\_ACEOF
48758# This file is a shell script that caches the results of configure
48759# tests run on this system so they can be shared between configure
48760# scripts and configure runs, see configure's option --config-cache.
48761# It is not useful on other systems.  If it contains results you don't
48762# want to keep, you may remove or edit it.
48763#
48764# config.status only pays attention to the cache file if you give it
48765# the --recheck option to rerun configure.
48766#
48767# `ac_cv_env_foo' variables (set or unset) will be overridden when
48768# loading this file, other *unset* `ac_cv_foo' will be assigned the
48769# following values.
48770
48771_ACEOF
48772
48773# The following way of writing the cache mishandles newlines in values,
48774# but we know of no workaround that is simple, portable, and efficient.
48775# So, we kill variables containing newlines.
48776# Ultrix sh set writes to stderr and can't be redirected directly,
48777# and sets the high bit in the cache file unless we assign to the vars.
48778(
48779  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48780    eval ac_val=\$$ac_var
48781    case $ac_val in #(
48782    *${as_nl}*)
48783      case $ac_var in #(
48784      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48785$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48786      esac
48787      case $ac_var in #(
48788      _ | IFS | as_nl) ;; #(
48789      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48790      *) { eval $ac_var=; unset $ac_var;} ;;
48791      esac ;;
48792    esac
48793  done
48794
48795  (set) 2>&1 |
48796    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48797    *${as_nl}ac_space=\ *)
48798      # `set' does not quote correctly, so add quotes: double-quote
48799      # substitution turns \\\\ into \\, and sed turns \\ into \.
48800      sed -n \
48801	"s/'/'\\\\''/g;
48802	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48803      ;; #(
48804    *)
48805      # `set' quotes correctly as required by POSIX, so do not add quotes.
48806      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48807      ;;
48808    esac |
48809    sort
48810) |
48811  sed '
48812     /^ac_cv_env_/b end
48813     t clear
48814     :clear
48815     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48816     t end
48817     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48818     :end' >>confcache
48819if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48820  if test -w "$cache_file"; then
48821    if test "x$cache_file" != "x/dev/null"; then
48822      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48823$as_echo "$as_me: updating cache $cache_file" >&6;}
48824      if test ! -f "$cache_file" || test -h "$cache_file"; then
48825	cat confcache >"$cache_file"
48826      else
48827        case $cache_file in #(
48828        */* | ?:*)
48829	  mv -f confcache "$cache_file"$$ &&
48830	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48831        *)
48832	  mv -f confcache "$cache_file" ;;
48833	esac
48834      fi
48835    fi
48836  else
48837    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48838$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48839  fi
48840fi
48841rm -f confcache
48842
48843test "x$prefix" = xNONE && prefix=$ac_default_prefix
48844# Let make expand exec_prefix.
48845test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48846
48847DEFS=-DHAVE_CONFIG_H
48848
48849ac_libobjs=
48850ac_ltlibobjs=
48851U=
48852for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48853  # 1. Remove the extension, and $U if already installed.
48854  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48855  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48856  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48857  #    will be set to the directory where LIBOBJS objects are built.
48858  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48859  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48860done
48861LIBOBJS=$ac_libobjs
48862
48863LTLIBOBJS=$ac_ltlibobjs
48864
48865
48866
48867: "${CONFIG_STATUS=./config.status}"
48868ac_write_fail=0
48869ac_clean_files_save=$ac_clean_files
48870ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48871{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48872$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48873as_write_fail=0
48874cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48875#! $SHELL
48876# Generated by $as_me.
48877# Run this file to recreate the current configuration.
48878# Compiler output produced by configure, useful for debugging
48879# configure, is in config.log if it exists.
48880
48881debug=false
48882ac_cs_recheck=false
48883ac_cs_silent=false
48884
48885SHELL=\${CONFIG_SHELL-$SHELL}
48886export SHELL
48887_ASEOF
48888cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48889## -------------------- ##
48890## M4sh Initialization. ##
48891## -------------------- ##
48892
48893# Be more Bourne compatible
48894DUALCASE=1; export DUALCASE # for MKS sh
48895if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48896  emulate sh
48897  NULLCMD=:
48898  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48899  # is contrary to our usage.  Disable this feature.
48900  alias -g '${1+"$@"}'='"$@"'
48901  setopt NO_GLOB_SUBST
48902else
48903  case `(set -o) 2>/dev/null` in #(
48904  *posix*) :
48905    set -o posix ;; #(
48906  *) :
48907     ;;
48908esac
48909fi
48910
48911
48912as_nl='
48913'
48914export as_nl
48915# Printing a long string crashes Solaris 7 /usr/bin/printf.
48916as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48917as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48918as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48919# Prefer a ksh shell builtin over an external printf program on Solaris,
48920# but without wasting forks for bash or zsh.
48921if test -z "$BASH_VERSION$ZSH_VERSION" \
48922    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48923  as_echo='print -r --'
48924  as_echo_n='print -rn --'
48925elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48926  as_echo='printf %s\n'
48927  as_echo_n='printf %s'
48928else
48929  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48930    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48931    as_echo_n='/usr/ucb/echo -n'
48932  else
48933    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48934    as_echo_n_body='eval
48935      arg=$1;
48936      case $arg in #(
48937      *"$as_nl"*)
48938	expr "X$arg" : "X\\(.*\\)$as_nl";
48939	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48940      esac;
48941      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48942    '
48943    export as_echo_n_body
48944    as_echo_n='sh -c $as_echo_n_body as_echo'
48945  fi
48946  export as_echo_body
48947  as_echo='sh -c $as_echo_body as_echo'
48948fi
48949
48950# The user is always right.
48951if test "${PATH_SEPARATOR+set}" != set; then
48952  PATH_SEPARATOR=:
48953  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48954    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48955      PATH_SEPARATOR=';'
48956  }
48957fi
48958
48959
48960# IFS
48961# We need space, tab and new line, in precisely that order.  Quoting is
48962# there to prevent editors from complaining about space-tab.
48963# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48964# splitting by setting IFS to empty value.)
48965IFS=" ""	$as_nl"
48966
48967# Find who we are.  Look in the path if we contain no directory separator.
48968as_myself=
48969case $0 in #((
48970  *[\\/]* ) as_myself=$0 ;;
48971  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48972for as_dir in $PATH
48973do
48974  IFS=$as_save_IFS
48975  test -z "$as_dir" && as_dir=.
48976    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48977  done
48978IFS=$as_save_IFS
48979
48980     ;;
48981esac
48982# We did not find ourselves, most probably we were run as `sh COMMAND'
48983# in which case we are not to be found in the path.
48984if test "x$as_myself" = x; then
48985  as_myself=$0
48986fi
48987if test ! -f "$as_myself"; then
48988  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48989  exit 1
48990fi
48991
48992# Unset variables that we do not need and which cause bugs (e.g. in
48993# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48994# suppresses any "Segmentation fault" message there.  '((' could
48995# trigger a bug in pdksh 5.2.14.
48996for as_var in BASH_ENV ENV MAIL MAILPATH
48997do eval test x\${$as_var+set} = xset \
48998  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48999done
49000PS1='$ '
49001PS2='> '
49002PS4='+ '
49003
49004# NLS nuisances.
49005LC_ALL=C
49006export LC_ALL
49007LANGUAGE=C
49008export LANGUAGE
49009
49010# CDPATH.
49011(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
49012
49013
49014# as_fn_error STATUS ERROR [LINENO LOG_FD]
49015# ----------------------------------------
49016# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
49017# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
49018# script with STATUS, using 1 if that was 0.
49019as_fn_error ()
49020{
49021  as_status=$1; test $as_status -eq 0 && as_status=1
49022  if test "$4"; then
49023    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
49024    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
49025  fi
49026  $as_echo "$as_me: error: $2" >&2
49027  as_fn_exit $as_status
49028} # as_fn_error
49029
49030
49031# as_fn_set_status STATUS
49032# -----------------------
49033# Set $? to STATUS, without forking.
49034as_fn_set_status ()
49035{
49036  return $1
49037} # as_fn_set_status
49038
49039# as_fn_exit STATUS
49040# -----------------
49041# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
49042as_fn_exit ()
49043{
49044  set +e
49045  as_fn_set_status $1
49046  exit $1
49047} # as_fn_exit
49048
49049# as_fn_unset VAR
49050# ---------------
49051# Portably unset VAR.
49052as_fn_unset ()
49053{
49054  { eval $1=; unset $1;}
49055}
49056as_unset=as_fn_unset
49057# as_fn_append VAR VALUE
49058# ----------------------
49059# Append the text in VALUE to the end of the definition contained in VAR. Take
49060# advantage of any shell optimizations that allow amortized linear growth over
49061# repeated appends, instead of the typical quadratic growth present in naive
49062# implementations.
49063if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
49064  eval 'as_fn_append ()
49065  {
49066    eval $1+=\$2
49067  }'
49068else
49069  as_fn_append ()
49070  {
49071    eval $1=\$$1\$2
49072  }
49073fi # as_fn_append
49074
49075# as_fn_arith ARG...
49076# ------------------
49077# Perform arithmetic evaluation on the ARGs, and store the result in the
49078# global $as_val. Take advantage of shells that can avoid forks. The arguments
49079# must be portable across $(()) and expr.
49080if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
49081  eval 'as_fn_arith ()
49082  {
49083    as_val=$(( $* ))
49084  }'
49085else
49086  as_fn_arith ()
49087  {
49088    as_val=`expr "$@" || test $? -eq 1`
49089  }
49090fi # as_fn_arith
49091
49092
49093if expr a : '\(a\)' >/dev/null 2>&1 &&
49094   test "X`expr 00001 : '.*\(...\)'`" = X001; then
49095  as_expr=expr
49096else
49097  as_expr=false
49098fi
49099
49100if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
49101  as_basename=basename
49102else
49103  as_basename=false
49104fi
49105
49106if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
49107  as_dirname=dirname
49108else
49109  as_dirname=false
49110fi
49111
49112as_me=`$as_basename -- "$0" ||
49113$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
49114	 X"$0" : 'X\(//\)$' \| \
49115	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
49116$as_echo X/"$0" |
49117    sed '/^.*\/\([^/][^/]*\)\/*$/{
49118	    s//\1/
49119	    q
49120	  }
49121	  /^X\/\(\/\/\)$/{
49122	    s//\1/
49123	    q
49124	  }
49125	  /^X\/\(\/\).*/{
49126	    s//\1/
49127	    q
49128	  }
49129	  s/.*/./; q'`
49130
49131# Avoid depending upon Character Ranges.
49132as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49133as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49134as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49135as_cr_digits='0123456789'
49136as_cr_alnum=$as_cr_Letters$as_cr_digits
49137
49138ECHO_C= ECHO_N= ECHO_T=
49139case `echo -n x` in #(((((
49140-n*)
49141  case `echo 'xy\c'` in
49142  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49143  xy)  ECHO_C='\c';;
49144  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49145       ECHO_T='	';;
49146  esac;;
49147*)
49148  ECHO_N='-n';;
49149esac
49150
49151rm -f conf$$ conf$$.exe conf$$.file
49152if test -d conf$$.dir; then
49153  rm -f conf$$.dir/conf$$.file
49154else
49155  rm -f conf$$.dir
49156  mkdir conf$$.dir 2>/dev/null
49157fi
49158if (echo >conf$$.file) 2>/dev/null; then
49159  if ln -s conf$$.file conf$$ 2>/dev/null; then
49160    as_ln_s='ln -s'
49161    # ... but there are two gotchas:
49162    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49163    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49164    # In both cases, we have to default to `cp -pR'.
49165    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49166      as_ln_s='cp -pR'
49167  elif ln conf$$.file conf$$ 2>/dev/null; then
49168    as_ln_s=ln
49169  else
49170    as_ln_s='cp -pR'
49171  fi
49172else
49173  as_ln_s='cp -pR'
49174fi
49175rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49176rmdir conf$$.dir 2>/dev/null
49177
49178
49179# as_fn_mkdir_p
49180# -------------
49181# Create "$as_dir" as a directory, including parents if necessary.
49182as_fn_mkdir_p ()
49183{
49184
49185  case $as_dir in #(
49186  -*) as_dir=./$as_dir;;
49187  esac
49188  test -d "$as_dir" || eval $as_mkdir_p || {
49189    as_dirs=
49190    while :; do
49191      case $as_dir in #(
49192      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49193      *) as_qdir=$as_dir;;
49194      esac
49195      as_dirs="'$as_qdir' $as_dirs"
49196      as_dir=`$as_dirname -- "$as_dir" ||
49197$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49198	 X"$as_dir" : 'X\(//\)[^/]' \| \
49199	 X"$as_dir" : 'X\(//\)$' \| \
49200	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49201$as_echo X"$as_dir" |
49202    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49203	    s//\1/
49204	    q
49205	  }
49206	  /^X\(\/\/\)[^/].*/{
49207	    s//\1/
49208	    q
49209	  }
49210	  /^X\(\/\/\)$/{
49211	    s//\1/
49212	    q
49213	  }
49214	  /^X\(\/\).*/{
49215	    s//\1/
49216	    q
49217	  }
49218	  s/.*/./; q'`
49219      test -d "$as_dir" && break
49220    done
49221    test -z "$as_dirs" || eval "mkdir $as_dirs"
49222  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49223
49224
49225} # as_fn_mkdir_p
49226if mkdir -p . 2>/dev/null; then
49227  as_mkdir_p='mkdir -p "$as_dir"'
49228else
49229  test -d ./-p && rmdir ./-p
49230  as_mkdir_p=false
49231fi
49232
49233
49234# as_fn_executable_p FILE
49235# -----------------------
49236# Test if FILE is an executable regular file.
49237as_fn_executable_p ()
49238{
49239  test -f "$1" && test -x "$1"
49240} # as_fn_executable_p
49241as_test_x='test -x'
49242as_executable_p=as_fn_executable_p
49243
49244# Sed expression to map a string onto a valid CPP name.
49245as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49246
49247# Sed expression to map a string onto a valid variable name.
49248as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49249
49250
49251exec 6>&1
49252## ----------------------------------- ##
49253## Main body of $CONFIG_STATUS script. ##
49254## ----------------------------------- ##
49255_ASEOF
49256test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49257
49258cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49259# Save the log message, to keep $0 and so on meaningful, and to
49260# report actual input values of CONFIG_FILES etc. instead of their
49261# values after options handling.
49262ac_log="
49263This file was extended by OpenJDK $as_me jdk8, which was
49264generated by GNU Autoconf 2.69.  Invocation command line was
49265
49266  CONFIG_FILES    = $CONFIG_FILES
49267  CONFIG_HEADERS  = $CONFIG_HEADERS
49268  CONFIG_LINKS    = $CONFIG_LINKS
49269  CONFIG_COMMANDS = $CONFIG_COMMANDS
49270  $ $0 $@
49271
49272on `(hostname || uname -n) 2>/dev/null | sed 1q`
49273"
49274
49275_ACEOF
49276
49277case $ac_config_files in *"
49278"*) set x $ac_config_files; shift; ac_config_files=$*;;
49279esac
49280
49281case $ac_config_headers in *"
49282"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49283esac
49284
49285
49286cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49287# Files that config.status was made for.
49288config_files="$ac_config_files"
49289config_headers="$ac_config_headers"
49290
49291_ACEOF
49292
49293cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49294ac_cs_usage="\
49295\`$as_me' instantiates files and other configuration actions
49296from templates according to the current configuration.  Unless the files
49297and actions are specified as TAGs, all are instantiated by default.
49298
49299Usage: $0 [OPTION]... [TAG]...
49300
49301  -h, --help       print this help, then exit
49302  -V, --version    print version number and configuration settings, then exit
49303      --config     print configuration, then exit
49304  -q, --quiet, --silent
49305                   do not print progress messages
49306  -d, --debug      don't remove temporary files
49307      --recheck    update $as_me by reconfiguring in the same conditions
49308      --file=FILE[:TEMPLATE]
49309                   instantiate the configuration file FILE
49310      --header=FILE[:TEMPLATE]
49311                   instantiate the configuration header FILE
49312
49313Configuration files:
49314$config_files
49315
49316Configuration headers:
49317$config_headers
49318
49319Report bugs to <build-dev@openjdk.java.net>.
49320OpenJDK home page: <http://openjdk.java.net>."
49321
49322_ACEOF
49323cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49324ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49325ac_cs_version="\\
49326OpenJDK config.status jdk8
49327configured by $0, generated by GNU Autoconf 2.69,
49328  with options \\"\$ac_cs_config\\"
49329
49330Copyright (C) 2012 Free Software Foundation, Inc.
49331This config.status script is free software; the Free Software Foundation
49332gives unlimited permission to copy, distribute and modify it."
49333
49334ac_pwd='$ac_pwd'
49335srcdir='$srcdir'
49336AWK='$AWK'
49337test -n "\$AWK" || AWK=awk
49338_ACEOF
49339
49340cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49341# The default lists apply if the user does not specify any file.
49342ac_need_defaults=:
49343while test $# != 0
49344do
49345  case $1 in
49346  --*=?*)
49347    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49348    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49349    ac_shift=:
49350    ;;
49351  --*=)
49352    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49353    ac_optarg=
49354    ac_shift=:
49355    ;;
49356  *)
49357    ac_option=$1
49358    ac_optarg=$2
49359    ac_shift=shift
49360    ;;
49361  esac
49362
49363  case $ac_option in
49364  # Handling of the options.
49365  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49366    ac_cs_recheck=: ;;
49367  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49368    $as_echo "$ac_cs_version"; exit ;;
49369  --config | --confi | --conf | --con | --co | --c )
49370    $as_echo "$ac_cs_config"; exit ;;
49371  --debug | --debu | --deb | --de | --d | -d )
49372    debug=: ;;
49373  --file | --fil | --fi | --f )
49374    $ac_shift
49375    case $ac_optarg in
49376    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49377    '') as_fn_error $? "missing file argument" ;;
49378    esac
49379    as_fn_append CONFIG_FILES " '$ac_optarg'"
49380    ac_need_defaults=false;;
49381  --header | --heade | --head | --hea )
49382    $ac_shift
49383    case $ac_optarg in
49384    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49385    esac
49386    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49387    ac_need_defaults=false;;
49388  --he | --h)
49389    # Conflict between --help and --header
49390    as_fn_error $? "ambiguous option: \`$1'
49391Try \`$0 --help' for more information.";;
49392  --help | --hel | -h )
49393    $as_echo "$ac_cs_usage"; exit ;;
49394  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49395  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49396    ac_cs_silent=: ;;
49397
49398  # This is an error.
49399  -*) as_fn_error $? "unrecognized option: \`$1'
49400Try \`$0 --help' for more information." ;;
49401
49402  *) as_fn_append ac_config_targets " $1"
49403     ac_need_defaults=false ;;
49404
49405  esac
49406  shift
49407done
49408
49409ac_configure_extra_args=
49410
49411if $ac_cs_silent; then
49412  exec 6>/dev/null
49413  ac_configure_extra_args="$ac_configure_extra_args --silent"
49414fi
49415
49416_ACEOF
49417cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49418if \$ac_cs_recheck; then
49419  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49420  shift
49421  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49422  CONFIG_SHELL='$SHELL'
49423  export CONFIG_SHELL
49424  exec "\$@"
49425fi
49426
49427_ACEOF
49428cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49429exec 5>>config.log
49430{
49431  echo
49432  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49433## Running $as_me. ##
49434_ASBOX
49435  $as_echo "$ac_log"
49436} >&5
49437
49438_ACEOF
49439cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49440_ACEOF
49441
49442cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49443
49444# Handling of arguments.
49445for ac_config_target in $ac_config_targets
49446do
49447  case $ac_config_target in
49448    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49449    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49450    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49451    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49452    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49453    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49454    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49455
49456  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49457  esac
49458done
49459
49460
49461# If the user did not use the arguments to specify the items to instantiate,
49462# then the envvar interface is used.  Set only those that are not.
49463# We use the long form for the default assignment because of an extremely
49464# bizarre bug on SunOS 4.1.3.
49465if $ac_need_defaults; then
49466  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49467  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49468fi
49469
49470# Have a temporary directory for convenience.  Make it in the build tree
49471# simply because there is no reason against having it here, and in addition,
49472# creating and moving files from /tmp can sometimes cause problems.
49473# Hook for its removal unless debugging.
49474# Note that there is a small window in which the directory will not be cleaned:
49475# after its creation but before its name has been assigned to `$tmp'.
49476$debug ||
49477{
49478  tmp= ac_tmp=
49479  trap 'exit_status=$?
49480  : "${ac_tmp:=$tmp}"
49481  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49482' 0
49483  trap 'as_fn_exit 1' 1 2 13 15
49484}
49485# Create a (secure) tmp directory for tmp files.
49486
49487{
49488  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49489  test -d "$tmp"
49490}  ||
49491{
49492  tmp=./conf$$-$RANDOM
49493  (umask 077 && mkdir "$tmp")
49494} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49495ac_tmp=$tmp
49496
49497# Set up the scripts for CONFIG_FILES section.
49498# No need to generate them if there are no CONFIG_FILES.
49499# This happens for instance with `./config.status config.h'.
49500if test -n "$CONFIG_FILES"; then
49501
49502
49503ac_cr=`echo X | tr X '\015'`
49504# On cygwin, bash can eat \r inside `` if the user requested igncr.
49505# But we know of no other shell where ac_cr would be empty at this
49506# point, so we can use a bashism as a fallback.
49507if test "x$ac_cr" = x; then
49508  eval ac_cr=\$\'\\r\'
49509fi
49510ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49511if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49512  ac_cs_awk_cr='\\r'
49513else
49514  ac_cs_awk_cr=$ac_cr
49515fi
49516
49517echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49518_ACEOF
49519
49520
49521{
49522  echo "cat >conf$$subs.awk <<_ACEOF" &&
49523  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49524  echo "_ACEOF"
49525} >conf$$subs.sh ||
49526  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49527ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49528ac_delim='%!_!# '
49529for ac_last_try in false false false false false :; do
49530  . ./conf$$subs.sh ||
49531    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49532
49533  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49534  if test $ac_delim_n = $ac_delim_num; then
49535    break
49536  elif $ac_last_try; then
49537    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49538  else
49539    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49540  fi
49541done
49542rm -f conf$$subs.sh
49543
49544cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49545cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49546_ACEOF
49547sed -n '
49548h
49549s/^/S["/; s/!.*/"]=/
49550p
49551g
49552s/^[^!]*!//
49553:repl
49554t repl
49555s/'"$ac_delim"'$//
49556t delim
49557:nl
49558h
49559s/\(.\{148\}\)..*/\1/
49560t more1
49561s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49562p
49563n
49564b repl
49565:more1
49566s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49567p
49568g
49569s/.\{148\}//
49570t nl
49571:delim
49572h
49573s/\(.\{148\}\)..*/\1/
49574t more2
49575s/["\\]/\\&/g; s/^/"/; s/$/"/
49576p
49577b
49578:more2
49579s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49580p
49581g
49582s/.\{148\}//
49583t delim
49584' <conf$$subs.awk | sed '
49585/^[^""]/{
49586  N
49587  s/\n//
49588}
49589' >>$CONFIG_STATUS || ac_write_fail=1
49590rm -f conf$$subs.awk
49591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49592_ACAWK
49593cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49594  for (key in S) S_is_set[key] = 1
49595  FS = ""
49596
49597}
49598{
49599  line = $ 0
49600  nfields = split(line, field, "@")
49601  substed = 0
49602  len = length(field[1])
49603  for (i = 2; i < nfields; i++) {
49604    key = field[i]
49605    keylen = length(key)
49606    if (S_is_set[key]) {
49607      value = S[key]
49608      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49609      len += length(value) + length(field[++i])
49610      substed = 1
49611    } else
49612      len += 1 + keylen
49613  }
49614
49615  print line
49616}
49617
49618_ACAWK
49619_ACEOF
49620cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49621if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49622  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49623else
49624  cat
49625fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49626  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49627_ACEOF
49628
49629# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49630# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49631# trailing colons and then remove the whole line if VPATH becomes empty
49632# (actually we leave an empty line to preserve line numbers).
49633if test "x$srcdir" = x.; then
49634  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49635h
49636s///
49637s/^/:/
49638s/[	 ]*$/:/
49639s/:\$(srcdir):/:/g
49640s/:\${srcdir}:/:/g
49641s/:@srcdir@:/:/g
49642s/^:*//
49643s/:*$//
49644x
49645s/\(=[	 ]*\).*/\1/
49646G
49647s/\n//
49648s/^[^=]*=[	 ]*$//
49649}'
49650fi
49651
49652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49653fi # test -n "$CONFIG_FILES"
49654
49655# Set up the scripts for CONFIG_HEADERS section.
49656# No need to generate them if there are no CONFIG_HEADERS.
49657# This happens for instance with `./config.status Makefile'.
49658if test -n "$CONFIG_HEADERS"; then
49659cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49660BEGIN {
49661_ACEOF
49662
49663# Transform confdefs.h into an awk script `defines.awk', embedded as
49664# here-document in config.status, that substitutes the proper values into
49665# config.h.in to produce config.h.
49666
49667# Create a delimiter string that does not exist in confdefs.h, to ease
49668# handling of long lines.
49669ac_delim='%!_!# '
49670for ac_last_try in false false :; do
49671  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49672  if test -z "$ac_tt"; then
49673    break
49674  elif $ac_last_try; then
49675    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49676  else
49677    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49678  fi
49679done
49680
49681# For the awk script, D is an array of macro values keyed by name,
49682# likewise P contains macro parameters if any.  Preserve backslash
49683# newline sequences.
49684
49685ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49686sed -n '
49687s/.\{148\}/&'"$ac_delim"'/g
49688t rset
49689:rset
49690s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49691t def
49692d
49693:def
49694s/\\$//
49695t bsnl
49696s/["\\]/\\&/g
49697s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49698D["\1"]=" \3"/p
49699s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49700d
49701:bsnl
49702s/["\\]/\\&/g
49703s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49704D["\1"]=" \3\\\\\\n"\\/p
49705t cont
49706s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49707t cont
49708d
49709:cont
49710n
49711s/.\{148\}/&'"$ac_delim"'/g
49712t clear
49713:clear
49714s/\\$//
49715t bsnlc
49716s/["\\]/\\&/g; s/^/"/; s/$/"/p
49717d
49718:bsnlc
49719s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49720b cont
49721' <confdefs.h | sed '
49722s/'"$ac_delim"'/"\\\
49723"/g' >>$CONFIG_STATUS || ac_write_fail=1
49724
49725cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49726  for (key in D) D_is_set[key] = 1
49727  FS = ""
49728}
49729/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49730  line = \$ 0
49731  split(line, arg, " ")
49732  if (arg[1] == "#") {
49733    defundef = arg[2]
49734    mac1 = arg[3]
49735  } else {
49736    defundef = substr(arg[1], 2)
49737    mac1 = arg[2]
49738  }
49739  split(mac1, mac2, "(") #)
49740  macro = mac2[1]
49741  prefix = substr(line, 1, index(line, defundef) - 1)
49742  if (D_is_set[macro]) {
49743    # Preserve the white space surrounding the "#".
49744    print prefix "define", macro P[macro] D[macro]
49745    next
49746  } else {
49747    # Replace #undef with comments.  This is necessary, for example,
49748    # in the case of _POSIX_SOURCE, which is predefined and required
49749    # on some systems where configure will not decide to define it.
49750    if (defundef == "undef") {
49751      print "/*", prefix defundef, macro, "*/"
49752      next
49753    }
49754  }
49755}
49756{ print }
49757_ACAWK
49758_ACEOF
49759cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49760  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49761fi # test -n "$CONFIG_HEADERS"
49762
49763
49764eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49765shift
49766for ac_tag
49767do
49768  case $ac_tag in
49769  :[FHLC]) ac_mode=$ac_tag; continue;;
49770  esac
49771  case $ac_mode$ac_tag in
49772  :[FHL]*:*);;
49773  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49774  :[FH]-) ac_tag=-:-;;
49775  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49776  esac
49777  ac_save_IFS=$IFS
49778  IFS=:
49779  set x $ac_tag
49780  IFS=$ac_save_IFS
49781  shift
49782  ac_file=$1
49783  shift
49784
49785  case $ac_mode in
49786  :L) ac_source=$1;;
49787  :[FH])
49788    ac_file_inputs=
49789    for ac_f
49790    do
49791      case $ac_f in
49792      -) ac_f="$ac_tmp/stdin";;
49793      *) # Look for the file first in the build tree, then in the source tree
49794	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49795	 # because $ac_f cannot contain `:'.
49796	 test -f "$ac_f" ||
49797	   case $ac_f in
49798	   [\\/$]*) false;;
49799	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49800	   esac ||
49801	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49802      esac
49803      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49804      as_fn_append ac_file_inputs " '$ac_f'"
49805    done
49806
49807    # Let's still pretend it is `configure' which instantiates (i.e., don't
49808    # use $as_me), people would be surprised to read:
49809    #    /* config.h.  Generated by config.status.  */
49810    configure_input='Generated from '`
49811	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49812	`' by configure.'
49813    if test x"$ac_file" != x-; then
49814      configure_input="$ac_file.  $configure_input"
49815      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49816$as_echo "$as_me: creating $ac_file" >&6;}
49817    fi
49818    # Neutralize special characters interpreted by sed in replacement strings.
49819    case $configure_input in #(
49820    *\&* | *\|* | *\\* )
49821       ac_sed_conf_input=`$as_echo "$configure_input" |
49822       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49823    *) ac_sed_conf_input=$configure_input;;
49824    esac
49825
49826    case $ac_tag in
49827    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49828      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49829    esac
49830    ;;
49831  esac
49832
49833  ac_dir=`$as_dirname -- "$ac_file" ||
49834$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49835	 X"$ac_file" : 'X\(//\)[^/]' \| \
49836	 X"$ac_file" : 'X\(//\)$' \| \
49837	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49838$as_echo X"$ac_file" |
49839    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49840	    s//\1/
49841	    q
49842	  }
49843	  /^X\(\/\/\)[^/].*/{
49844	    s//\1/
49845	    q
49846	  }
49847	  /^X\(\/\/\)$/{
49848	    s//\1/
49849	    q
49850	  }
49851	  /^X\(\/\).*/{
49852	    s//\1/
49853	    q
49854	  }
49855	  s/.*/./; q'`
49856  as_dir="$ac_dir"; as_fn_mkdir_p
49857  ac_builddir=.
49858
49859case "$ac_dir" in
49860.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49861*)
49862  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49863  # A ".." for each directory in $ac_dir_suffix.
49864  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49865  case $ac_top_builddir_sub in
49866  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49867  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49868  esac ;;
49869esac
49870ac_abs_top_builddir=$ac_pwd
49871ac_abs_builddir=$ac_pwd$ac_dir_suffix
49872# for backward compatibility:
49873ac_top_builddir=$ac_top_build_prefix
49874
49875case $srcdir in
49876  .)  # We are building in place.
49877    ac_srcdir=.
49878    ac_top_srcdir=$ac_top_builddir_sub
49879    ac_abs_top_srcdir=$ac_pwd ;;
49880  [\\/]* | ?:[\\/]* )  # Absolute name.
49881    ac_srcdir=$srcdir$ac_dir_suffix;
49882    ac_top_srcdir=$srcdir
49883    ac_abs_top_srcdir=$srcdir ;;
49884  *) # Relative name.
49885    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49886    ac_top_srcdir=$ac_top_build_prefix$srcdir
49887    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49888esac
49889ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49890
49891
49892  case $ac_mode in
49893  :F)
49894  #
49895  # CONFIG_FILE
49896  #
49897
49898_ACEOF
49899
49900cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49901# If the template does not know about datarootdir, expand it.
49902# FIXME: This hack should be removed a few years after 2.60.
49903ac_datarootdir_hack=; ac_datarootdir_seen=
49904ac_sed_dataroot='
49905/datarootdir/ {
49906  p
49907  q
49908}
49909/@datadir@/p
49910/@docdir@/p
49911/@infodir@/p
49912/@localedir@/p
49913/@mandir@/p'
49914case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49915*datarootdir*) ac_datarootdir_seen=yes;;
49916*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49917  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49918$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49919_ACEOF
49920cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49921  ac_datarootdir_hack='
49922  s&@datadir@&$datadir&g
49923  s&@docdir@&$docdir&g
49924  s&@infodir@&$infodir&g
49925  s&@localedir@&$localedir&g
49926  s&@mandir@&$mandir&g
49927  s&\\\${datarootdir}&$datarootdir&g' ;;
49928esac
49929_ACEOF
49930
49931# Neutralize VPATH when `$srcdir' = `.'.
49932# Shell code in configure.ac might set extrasub.
49933# FIXME: do we really want to maintain this feature?
49934cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49935ac_sed_extra="$ac_vpsub
49936$extrasub
49937_ACEOF
49938cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49939:t
49940/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49941s|@configure_input@|$ac_sed_conf_input|;t t
49942s&@top_builddir@&$ac_top_builddir_sub&;t t
49943s&@top_build_prefix@&$ac_top_build_prefix&;t t
49944s&@srcdir@&$ac_srcdir&;t t
49945s&@abs_srcdir@&$ac_abs_srcdir&;t t
49946s&@top_srcdir@&$ac_top_srcdir&;t t
49947s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49948s&@builddir@&$ac_builddir&;t t
49949s&@abs_builddir@&$ac_abs_builddir&;t t
49950s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49951$ac_datarootdir_hack
49952"
49953eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49954  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49955
49956test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49957  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49958  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49959      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49960  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49961which seems to be undefined.  Please make sure it is defined" >&5
49962$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49963which seems to be undefined.  Please make sure it is defined" >&2;}
49964
49965  rm -f "$ac_tmp/stdin"
49966  case $ac_file in
49967  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49968  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49969  esac \
49970  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49971 ;;
49972  :H)
49973  #
49974  # CONFIG_HEADER
49975  #
49976  if test x"$ac_file" != x-; then
49977    {
49978      $as_echo "/* $configure_input  */" \
49979      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49980    } >"$ac_tmp/config.h" \
49981      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49982    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49983      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49984$as_echo "$as_me: $ac_file is unchanged" >&6;}
49985    else
49986      rm -f "$ac_file"
49987      mv "$ac_tmp/config.h" "$ac_file" \
49988	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49989    fi
49990  else
49991    $as_echo "/* $configure_input  */" \
49992      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49993      || as_fn_error $? "could not create -" "$LINENO" 5
49994  fi
49995 ;;
49996
49997
49998  esac
49999
50000done # for ac_tag
50001
50002
50003as_fn_exit 0
50004_ACEOF
50005ac_clean_files=$ac_clean_files_save
50006
50007test $ac_write_fail = 0 ||
50008  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
50009
50010
50011# configure is writing to config.log, and then calls config.status.
50012# config.status does its own redirection, appending to config.log.
50013# Unfortunately, on DOS this fails, as config.log is still kept open
50014# by configure, so config.status won't be able to write to it; its
50015# output is simply discarded.  So we exec the FD to /dev/null,
50016# effectively closing config.log, so it can be properly (re)opened and
50017# appended to by config.status.  When coming back to configure, we
50018# need to make the FD available again.
50019if test "$no_create" != yes; then
50020  ac_cs_success=:
50021  ac_config_status_args=
50022  test "$silent" = yes &&
50023    ac_config_status_args="$ac_config_status_args --quiet"
50024  exec 5>/dev/null
50025  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
50026  exec 5>>config.log
50027  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50028  # would make configure fail if this is the last instruction.
50029  $ac_cs_success || as_fn_exit 1
50030fi
50031if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
50032  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
50033$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
50034fi
50035
50036
50037# Try to move the config.log file to the output directory.
50038if test -e ./config.log; then
50039  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
50040fi
50041
50042# Make the compare script executable
50043$CHMOD +x $OUTPUT_ROOT/compare.sh
50044
50045# Finally output some useful information to the user
50046
50047  # Finally output some useful information to the user
50048
50049  printf "\n"
50050  printf "====================================================\n"
50051  if test "x$no_create" != "xyes"; then
50052    if test "x$IS_RECONFIGURE" != "xyes"; then
50053      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
50054    else
50055      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
50056    fi
50057  else
50058    if test "x$IS_RECONFIGURE" != "xyes"; then
50059      printf "A configuration has been successfully checked but not created\n"
50060    else
50061      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
50062    fi
50063  fi
50064  if test "x$CONFIGURE_COMMAND_LINE" != x; then
50065    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
50066  else
50067    printf "using default settings.\n"
50068  fi
50069
50070  printf "\n"
50071  printf "Configuration summary:\n"
50072  printf "* Debug level:    $DEBUG_LEVEL\n"
50073  printf "* JDK variant:    $JDK_VARIANT\n"
50074  printf "* JVM variants:   $with_jvm_variants\n"
50075  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
50076
50077  printf "\n"
50078  printf "Tools summary:\n"
50079  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
50080    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
50081  fi
50082  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
50083  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
50084  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
50085  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
50086
50087  printf "\n"
50088  printf "Build performance summary:\n"
50089  printf "* Cores to use:   $JOBS\n"
50090  printf "* Memory limit:   $MEMORY_SIZE MB\n"
50091  if test "x$CCACHE_STATUS" != "x"; then
50092    printf "* ccache status:  $CCACHE_STATUS\n"
50093  fi
50094  printf "\n"
50095
50096  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
50097    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
50098    printf "will result in longer build times.\n"
50099    printf "\n"
50100  fi
50101
50102  if test "x$FOUND_ALT_VARIABLES" != "x"; then
50103    printf "WARNING: You have old-style ALT_ environment variables set.\n"
50104    printf "These are not respected, and will be ignored. It is recommended\n"
50105    printf "that you clean your environment. The following variables are set:\n"
50106    printf "$FOUND_ALT_VARIABLES\n"
50107    printf "\n"
50108  fi
50109
50110  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
50111    printf "WARNING: Your build output directory is not on a local disk.\n"
50112    printf "This will severely degrade build performance!\n"
50113    printf "It is recommended that you create an output directory on a local disk,\n"
50114    printf "and run the configure script again from that directory.\n"
50115    printf "\n"
50116  fi
50117
50118  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
50119    printf "WARNING: The result of this configuration has overridden an older\n"
50120    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
50121    printf "proper build. Failure to do so might result in strange build problems.\n"
50122    printf "\n"
50123  fi
50124
50125  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50126    printf "WARNING: The result of this configuration was not saved.\n"
50127    printf "You should run without '--no-create | -n' to create the configuration.\n"
50128    printf "\n"
50129  fi
50130
50131