generated-configure.sh revision 980:73d85b04c45c
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_LIBGIF
657USE_EXTERNAL_LIBJPEG
658ALSA_LIBS
659ALSA_CFLAGS
660FREETYPE_BUNDLE_LIB_PATH
661FREETYPE_LIBS
662FREETYPE_CFLAGS
663CUPS_CFLAGS
664OPENWIN_HOME
665X_EXTRA_LIBS
666X_LIBS
667X_PRE_LIBS
668X_CFLAGS
669XMKMF
670FIXPATH
671ZIP_DEBUGINFO_FILES
672ENABLE_DEBUG_SYMBOLS
673COMPILER_SUPPORTS_TARGET_BITS_FLAG
674ZERO_ARCHFLAG
675LDFLAGS_CXX_JDK
676LDFLAGS_JDKEXE_SUFFIX
677LDFLAGS_JDKLIB_SUFFIX
678LDFLAGS_JDKEXE
679LDFLAGS_JDKLIB
680CXXFLAGS_JDKEXE
681CXXFLAGS_JDKLIB
682CFLAGS_JDKEXE
683CFLAGS_JDKLIB
684MACOSX_VERSION_MIN
685LEGACY_EXTRA_LDFLAGS
686LEGACY_EXTRA_CXXFLAGS
687LEGACY_EXTRA_CFLAGS
688CXX_O_FLAG_NONE
689CXX_O_FLAG_NORM
690CXX_O_FLAG_HI
691CXX_O_FLAG_HIGHEST
692C_O_FLAG_NONE
693C_O_FLAG_NORM
694C_O_FLAG_HI
695C_O_FLAG_HIGHEST
696CXXFLAGS_DEBUG_SYMBOLS
697CFLAGS_DEBUG_SYMBOLS
698CXX_FLAG_DEPS
699C_FLAG_DEPS
700SET_SHARED_LIBRARY_MAPFILE
701SET_SHARED_LIBRARY_NAME
702SET_SHARED_LIBRARY_ORIGIN
703SET_EXECUTABLE_ORIGIN
704SHARED_LIBRARY_FLAGS
705CXX_FLAG_REORDER
706C_FLAG_REORDER
707RC_FLAGS
708AR_OUT_OPTION
709LD_OUT_OPTION
710EXE_OUT_OPTION
711CC_OUT_OPTION
712POST_MCS_CMD
713POST_STRIP_CMD
714ARFLAGS
715COMPILER_TARGET_BITS_FLAG
716JT_HOME
717JTREGEXE
718USING_BROKEN_SUSE_LD
719PACKAGE_PATH
720LDEXECXX
721LDEXE
722USE_CLANG
723HOTSPOT_LD
724HOTSPOT_CXX
725HOTSPOT_RC
726HOTSPOT_MT
727BUILD_LD
728BUILD_CXX
729BUILD_CC
730ac_ct_OBJDUMP
731OBJDUMP
732ac_ct_OBJCOPY
733OBJCOPY
734ac_ct_NM
735ac_ct_STRIP
736MCS
737GNM
738NM
739STRIP
740DUMPBIN
741RC
742MT
743LIPO
744ac_ct_OBJC
745OBJCFLAGS
746OBJC
747ac_ct_AR
748AR
749AS
750LDCXX
751LD
752CXXCPP
753CPP
754ac_ct_CXX
755CXXFLAGS
756CXX
757ac_ct_PROPER_COMPILER_CXX
758PROPER_COMPILER_CXX
759TOOLS_DIR_CXX
760POTENTIAL_CXX
761OBJEXT
762EXEEXT
763ac_ct_CC
764CPPFLAGS
765LDFLAGS
766CFLAGS
767CC
768ac_ct_PROPER_COMPILER_CC
769PROPER_COMPILER_CC
770TOOLS_DIR_CC
771POTENTIAL_CC
772VS_PATH
773VS_LIB
774VS_INCLUDE
775CYGWIN_LINK
776EXE_SUFFIX
777OBJ_SUFFIX
778STATIC_LIBRARY
779SHARED_LIBRARY
780STATIC_LIBRARY_SUFFIX
781SHARED_LIBRARY_SUFFIX
782LIBRARY_PREFIX
783TOOLCHAIN_TYPE
784BUILD_HOTSPOT
785HOTSPOT_DIST
786BUILD_OUTPUT
787OVERRIDE_SRC_ROOT
788ADD_SRC_ROOT
789JDK_TOPDIR
790NASHORN_TOPDIR
791HOTSPOT_TOPDIR
792JAXWS_TOPDIR
793JAXP_TOPDIR
794CORBA_TOPDIR
795LANGTOOLS_TOPDIR
796BOOT_JDK_JVMARGS
797JAVAC_FLAGS
798BOOT_JDK_SOURCETARGET
799JARSIGNER
800NATIVE2ASCII
801JAR
802JAVAH
803JAVAC
804JAVA
805BOOT_JDK
806BOOT_TOOLSJAR
807BOOT_RTJAR
808JAVA_CHECK
809JAVAC_CHECK
810COOKED_BUILD_NUMBER
811JDK_VERSION
812COPYRIGHT_YEAR
813MACOSX_BUNDLE_ID_BASE
814MACOSX_BUNDLE_NAME_BASE
815COMPANY_NAME
816JDK_RC_PLATFORM_NAME
817PRODUCT_SUFFIX
818PRODUCT_NAME
819LAUNCHER_NAME
820MILESTONE
821JDK_BUILD_NUMBER
822JDK_UPDATE_VERSION
823JDK_MICRO_VERSION
824JDK_MINOR_VERSION
825JDK_MAJOR_VERSION
826USER_RELEASE_SUFFIX
827COMPRESS_JARS
828RMICONNECTOR_IIOP
829UNLIMITED_CRYPTO
830CACERTS_FILE
831TEST_IN_BUILD
832BUILD_HEADLESS
833SUPPORT_HEADFUL
834SUPPORT_HEADLESS
835BDEPS_FTP
836BDEPS_UNZIP
837OS_VERSION_MICRO
838OS_VERSION_MINOR
839OS_VERSION_MAJOR
840PKG_CONFIG
841CODESIGN
842XATTR
843DSYMUTIL
844IS_GNU_TIME
845TIME
846STAT
847HG
848READELF
849OTOOL
850LDD
851ZIP
852UNZIP
853FIND_DELETE
854MAKE
855CHECK_TOOLSDIR_MAKE
856CHECK_TOOLSDIR_GMAKE
857CHECK_MAKE
858CHECK_GMAKE
859PKGHANDLER
860OUTPUT_ROOT
861CONF_NAME
862SPEC
863BUILD_VARIANT_RELEASE
864DEBUG_CLASSFILES
865FASTDEBUG
866VARIANT
867DEBUG_LEVEL
868MACOSX_UNIVERSAL
869INCLUDE_SA
870JVM_VARIANT_CORE
871JVM_VARIANT_ZEROSHARK
872JVM_VARIANT_ZERO
873JVM_VARIANT_KERNEL
874JVM_VARIANT_MINIMAL1
875JVM_VARIANT_CLIENT
876JVM_VARIANT_SERVER
877JVM_VARIANTS
878JVM_INTERPRETER
879JDK_VARIANT
880SET_OPENJDK
881BUILD_LOG_WRAPPER
882BUILD_LOG_PREVIOUS
883BUILD_LOG
884SYS_ROOT
885TOPDIR
886PATH_SEP
887ZERO_ARCHDEF
888DEFINE_CROSS_COMPILE_ARCH
889LP64
890OPENJDK_TARGET_OS_EXPORT_DIR
891OPENJDK_TARGET_OS_API_DIR
892OPENJDK_TARGET_CPU_JLI_CFLAGS
893OPENJDK_TARGET_CPU_OSARCH
894OPENJDK_TARGET_CPU_ISADIR
895OPENJDK_TARGET_CPU_LIBDIR
896OPENJDK_TARGET_CPU_LEGACY_LIB
897OPENJDK_TARGET_CPU_LEGACY
898REQUIRED_OS_VERSION
899REQUIRED_OS_NAME
900COMPILE_TYPE
901OPENJDK_TARGET_CPU_ENDIAN
902OPENJDK_TARGET_CPU_BITS
903OPENJDK_TARGET_CPU_ARCH
904OPENJDK_TARGET_CPU
905OPENJDK_TARGET_OS_API
906OPENJDK_TARGET_OS
907OPENJDK_BUILD_CPU_ENDIAN
908OPENJDK_BUILD_CPU_BITS
909OPENJDK_BUILD_CPU_ARCH
910OPENJDK_BUILD_CPU
911OPENJDK_BUILD_OS_API
912OPENJDK_BUILD_OS
913OPENJDK_BUILD_AUTOCONF_NAME
914OPENJDK_TARGET_AUTOCONF_NAME
915target_os
916target_vendor
917target_cpu
918target
919host_os
920host_vendor
921host_cpu
922host
923build_os
924build_vendor
925build_cpu
926build
927SETFILE
928DF
929READLINK
930CYGPATH
931SED
932FGREP
933EGREP
934GREP
935AWK
936XARGS
937WHICH
938WC
939UNIQ
940UNAME
941TR
942TOUCH
943TEE
944TAR
945TAIL
946SORT
947SH
948RM
949PRINTF
950NAWK
951MV
952MKTEMP
953MKDIR
954LS
955LN
956HEAD
957FIND
958FILE
959EXPR
960ECHO
961DIRNAME
962DIFF
963DATE
964CUT
965CPIO
966CP
967COMM
968CMP
969CHMOD
970CAT
971BASH
972BASENAME
973DATE_WHEN_CONFIGURED
974CONFIGURE_COMMAND_LINE
975target_alias
976host_alias
977build_alias
978LIBS
979ECHO_T
980ECHO_N
981ECHO_C
982DEFS
983mandir
984localedir
985libdir
986psdir
987pdfdir
988dvidir
989htmldir
990infodir
991docdir
992oldincludedir
993includedir
994localstatedir
995sharedstatedir
996sysconfdir
997datadir
998datarootdir
999libexecdir
1000sbindir
1001bindir
1002program_transform_name
1003prefix
1004exec_prefix
1005PACKAGE_URL
1006PACKAGE_BUGREPORT
1007PACKAGE_STRING
1008PACKAGE_VERSION
1009PACKAGE_TARNAME
1010PACKAGE_NAME
1011PATH_SEPARATOR
1012SHELL'
1013ac_subst_files=''
1014ac_user_opts='
1015enable_option_checking
1016with_target_bits
1017with_sys_root
1018with_tools_dir
1019with_devkit
1020enable_openjdk_only
1021with_custom_make_dir
1022with_jdk_variant
1023with_jvm_interpreter
1024with_jvm_variants
1025enable_debug
1026with_debug_level
1027with_conf_name
1028with_builddeps_conf
1029with_builddeps_server
1030with_builddeps_dir
1031with_builddeps_group
1032enable_headful
1033enable_hotspot_test_in_build
1034with_cacerts_file
1035enable_unlimited_crypto
1036enable_rmiconnector_iiop
1037with_milestone
1038with_update_version
1039with_user_release_suffix
1040with_build_number
1041with_boot_jdk
1042with_boot_jdk_jvmargs
1043with_add_source_root
1044with_override_source_root
1045with_adds_and_overrides
1046with_override_langtools
1047with_override_corba
1048with_override_jaxp
1049with_override_jaxws
1050with_override_hotspot
1051with_override_nashorn
1052with_override_jdk
1053with_import_hotspot
1054with_toolchain_type
1055with_jtreg
1056with_extra_cflags
1057with_extra_cxxflags
1058with_extra_ldflags
1059enable_debug_symbols
1060enable_zip_debug_info
1061enable_macosx_runtime_support
1062with_x
1063with_cups
1064with_cups_include
1065with_freetype
1066with_freetype_include
1067with_freetype_lib
1068enable_freetype_bundling
1069with_alsa
1070with_alsa_include
1071with_alsa_lib
1072with_giflib
1073with_zlib
1074with_stdc__lib
1075with_msvcr_dll
1076with_dxsdk
1077with_dxsdk_lib
1078with_dxsdk_include
1079with_num_cores
1080with_memory_size
1081with_jobs
1082with_sjavac_server_java
1083enable_sjavac
1084enable_precompiled_headers
1085enable_ccache
1086with_ccache_dir
1087'
1088      ac_precious_vars='build_alias
1089host_alias
1090target_alias
1091BASENAME
1092BASH
1093CAT
1094CHMOD
1095CMP
1096COMM
1097CP
1098CPIO
1099CUT
1100DATE
1101DIFF
1102DIRNAME
1103ECHO
1104EXPR
1105FILE
1106FIND
1107HEAD
1108LN
1109LS
1110MKDIR
1111MKTEMP
1112MV
1113NAWK
1114PRINTF
1115RM
1116SH
1117SORT
1118TAIL
1119TAR
1120TEE
1121TOUCH
1122TR
1123UNAME
1124UNIQ
1125WC
1126WHICH
1127XARGS
1128AWK
1129GREP
1130EGREP
1131FGREP
1132SED
1133CYGPATH
1134READLINK
1135DF
1136SETFILE
1137UNZIP
1138ZIP
1139LDD
1140OTOOL
1141READELF
1142HG
1143STAT
1144TIME
1145DSYMUTIL
1146XATTR
1147CODESIGN
1148PKG_CONFIG
1149JAVA
1150JAVAC
1151JAVAH
1152JAR
1153NATIVE2ASCII
1154JARSIGNER
1155CC
1156CFLAGS
1157LDFLAGS
1158LIBS
1159CPPFLAGS
1160CXX
1161CXXFLAGS
1162CCC
1163CPP
1164CXXCPP
1165AS
1166AR
1167OBJC
1168OBJCFLAGS
1169LIPO
1170STRIP
1171NM
1172GNM
1173MCS
1174OBJCOPY
1175OBJDUMP
1176BUILD_CC
1177BUILD_CXX
1178BUILD_LD
1179JTREGEXE
1180XMKMF
1181FREETYPE_CFLAGS
1182FREETYPE_LIBS
1183ALSA_CFLAGS
1184ALSA_LIBS
1185LIBFFI_CFLAGS
1186LIBFFI_LIBS
1187CCACHE'
1188
1189
1190# Initialize some variables set by options.
1191ac_init_help=
1192ac_init_version=false
1193ac_unrecognized_opts=
1194ac_unrecognized_sep=
1195# The variables have the same names as the options, with
1196# dashes changed to underlines.
1197cache_file=/dev/null
1198exec_prefix=NONE
1199no_create=
1200no_recursion=
1201prefix=NONE
1202program_prefix=NONE
1203program_suffix=NONE
1204program_transform_name=s,x,x,
1205silent=
1206site=
1207srcdir=
1208verbose=
1209x_includes=NONE
1210x_libraries=NONE
1211
1212# Installation directory options.
1213# These are left unexpanded so users can "make install exec_prefix=/foo"
1214# and all the variables that are supposed to be based on exec_prefix
1215# by default will actually change.
1216# Use braces instead of parens because sh, perl, etc. also accept them.
1217# (The list follows the same order as the GNU Coding Standards.)
1218bindir='${exec_prefix}/bin'
1219sbindir='${exec_prefix}/sbin'
1220libexecdir='${exec_prefix}/libexec'
1221datarootdir='${prefix}/share'
1222datadir='${datarootdir}'
1223sysconfdir='${prefix}/etc'
1224sharedstatedir='${prefix}/com'
1225localstatedir='${prefix}/var'
1226includedir='${prefix}/include'
1227oldincludedir='/usr/include'
1228docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1229infodir='${datarootdir}/info'
1230htmldir='${docdir}'
1231dvidir='${docdir}'
1232pdfdir='${docdir}'
1233psdir='${docdir}'
1234libdir='${exec_prefix}/lib'
1235localedir='${datarootdir}/locale'
1236mandir='${datarootdir}/man'
1237
1238ac_prev=
1239ac_dashdash=
1240for ac_option
1241do
1242  # If the previous option needs an argument, assign it.
1243  if test -n "$ac_prev"; then
1244    eval $ac_prev=\$ac_option
1245    ac_prev=
1246    continue
1247  fi
1248
1249  case $ac_option in
1250  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1251  *=)   ac_optarg= ;;
1252  *)    ac_optarg=yes ;;
1253  esac
1254
1255  # Accept the important Cygnus configure options, so we can diagnose typos.
1256
1257  case $ac_dashdash$ac_option in
1258  --)
1259    ac_dashdash=yes ;;
1260
1261  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1262    ac_prev=bindir ;;
1263  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1264    bindir=$ac_optarg ;;
1265
1266  -build | --build | --buil | --bui | --bu)
1267    ac_prev=build_alias ;;
1268  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1269    build_alias=$ac_optarg ;;
1270
1271  -cache-file | --cache-file | --cache-fil | --cache-fi \
1272  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1273    ac_prev=cache_file ;;
1274  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1275  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1276    cache_file=$ac_optarg ;;
1277
1278  --config-cache | -C)
1279    cache_file=config.cache ;;
1280
1281  -datadir | --datadir | --datadi | --datad)
1282    ac_prev=datadir ;;
1283  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1284    datadir=$ac_optarg ;;
1285
1286  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1287  | --dataroo | --dataro | --datar)
1288    ac_prev=datarootdir ;;
1289  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1290  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1291    datarootdir=$ac_optarg ;;
1292
1293  -disable-* | --disable-*)
1294    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1295    # Reject names that are not valid shell variable names.
1296    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1297      as_fn_error $? "invalid feature name: $ac_useropt"
1298    ac_useropt_orig=$ac_useropt
1299    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1300    case $ac_user_opts in
1301      *"
1302"enable_$ac_useropt"
1303"*) ;;
1304      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1305	 ac_unrecognized_sep=', ';;
1306    esac
1307    eval enable_$ac_useropt=no ;;
1308
1309  -docdir | --docdir | --docdi | --doc | --do)
1310    ac_prev=docdir ;;
1311  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1312    docdir=$ac_optarg ;;
1313
1314  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1315    ac_prev=dvidir ;;
1316  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1317    dvidir=$ac_optarg ;;
1318
1319  -enable-* | --enable-*)
1320    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1321    # Reject names that are not valid shell variable names.
1322    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1323      as_fn_error $? "invalid feature name: $ac_useropt"
1324    ac_useropt_orig=$ac_useropt
1325    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1326    case $ac_user_opts in
1327      *"
1328"enable_$ac_useropt"
1329"*) ;;
1330      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1331	 ac_unrecognized_sep=', ';;
1332    esac
1333    eval enable_$ac_useropt=\$ac_optarg ;;
1334
1335  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1336  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1337  | --exec | --exe | --ex)
1338    ac_prev=exec_prefix ;;
1339  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1340  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1341  | --exec=* | --exe=* | --ex=*)
1342    exec_prefix=$ac_optarg ;;
1343
1344  -gas | --gas | --ga | --g)
1345    # Obsolete; use --with-gas.
1346    with_gas=yes ;;
1347
1348  -help | --help | --hel | --he | -h)
1349    ac_init_help=long ;;
1350  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1351    ac_init_help=recursive ;;
1352  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1353    ac_init_help=short ;;
1354
1355  -host | --host | --hos | --ho)
1356    ac_prev=host_alias ;;
1357  -host=* | --host=* | --hos=* | --ho=*)
1358    host_alias=$ac_optarg ;;
1359
1360  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1361    ac_prev=htmldir ;;
1362  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1363  | --ht=*)
1364    htmldir=$ac_optarg ;;
1365
1366  -includedir | --includedir | --includedi | --included | --include \
1367  | --includ | --inclu | --incl | --inc)
1368    ac_prev=includedir ;;
1369  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1370  | --includ=* | --inclu=* | --incl=* | --inc=*)
1371    includedir=$ac_optarg ;;
1372
1373  -infodir | --infodir | --infodi | --infod | --info | --inf)
1374    ac_prev=infodir ;;
1375  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1376    infodir=$ac_optarg ;;
1377
1378  -libdir | --libdir | --libdi | --libd)
1379    ac_prev=libdir ;;
1380  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1381    libdir=$ac_optarg ;;
1382
1383  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1384  | --libexe | --libex | --libe)
1385    ac_prev=libexecdir ;;
1386  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1387  | --libexe=* | --libex=* | --libe=*)
1388    libexecdir=$ac_optarg ;;
1389
1390  -localedir | --localedir | --localedi | --localed | --locale)
1391    ac_prev=localedir ;;
1392  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1393    localedir=$ac_optarg ;;
1394
1395  -localstatedir | --localstatedir | --localstatedi | --localstated \
1396  | --localstate | --localstat | --localsta | --localst | --locals)
1397    ac_prev=localstatedir ;;
1398  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1399  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1400    localstatedir=$ac_optarg ;;
1401
1402  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1403    ac_prev=mandir ;;
1404  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1405    mandir=$ac_optarg ;;
1406
1407  -nfp | --nfp | --nf)
1408    # Obsolete; use --without-fp.
1409    with_fp=no ;;
1410
1411  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1412  | --no-cr | --no-c | -n)
1413    no_create=yes ;;
1414
1415  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1416  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1417    no_recursion=yes ;;
1418
1419  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1420  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1421  | --oldin | --oldi | --old | --ol | --o)
1422    ac_prev=oldincludedir ;;
1423  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1424  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1425  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1426    oldincludedir=$ac_optarg ;;
1427
1428  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1429    ac_prev=prefix ;;
1430  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1431    prefix=$ac_optarg ;;
1432
1433  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1434  | --program-pre | --program-pr | --program-p)
1435    ac_prev=program_prefix ;;
1436  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1437  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1438    program_prefix=$ac_optarg ;;
1439
1440  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1441  | --program-suf | --program-su | --program-s)
1442    ac_prev=program_suffix ;;
1443  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1444  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1445    program_suffix=$ac_optarg ;;
1446
1447  -program-transform-name | --program-transform-name \
1448  | --program-transform-nam | --program-transform-na \
1449  | --program-transform-n | --program-transform- \
1450  | --program-transform | --program-transfor \
1451  | --program-transfo | --program-transf \
1452  | --program-trans | --program-tran \
1453  | --progr-tra | --program-tr | --program-t)
1454    ac_prev=program_transform_name ;;
1455  -program-transform-name=* | --program-transform-name=* \
1456  | --program-transform-nam=* | --program-transform-na=* \
1457  | --program-transform-n=* | --program-transform-=* \
1458  | --program-transform=* | --program-transfor=* \
1459  | --program-transfo=* | --program-transf=* \
1460  | --program-trans=* | --program-tran=* \
1461  | --progr-tra=* | --program-tr=* | --program-t=*)
1462    program_transform_name=$ac_optarg ;;
1463
1464  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1465    ac_prev=pdfdir ;;
1466  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1467    pdfdir=$ac_optarg ;;
1468
1469  -psdir | --psdir | --psdi | --psd | --ps)
1470    ac_prev=psdir ;;
1471  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1472    psdir=$ac_optarg ;;
1473
1474  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1475  | -silent | --silent | --silen | --sile | --sil)
1476    silent=yes ;;
1477
1478  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1479    ac_prev=sbindir ;;
1480  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1481  | --sbi=* | --sb=*)
1482    sbindir=$ac_optarg ;;
1483
1484  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1485  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1486  | --sharedst | --shareds | --shared | --share | --shar \
1487  | --sha | --sh)
1488    ac_prev=sharedstatedir ;;
1489  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1490  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1491  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1492  | --sha=* | --sh=*)
1493    sharedstatedir=$ac_optarg ;;
1494
1495  -site | --site | --sit)
1496    ac_prev=site ;;
1497  -site=* | --site=* | --sit=*)
1498    site=$ac_optarg ;;
1499
1500  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1501    ac_prev=srcdir ;;
1502  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1503    srcdir=$ac_optarg ;;
1504
1505  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1506  | --syscon | --sysco | --sysc | --sys | --sy)
1507    ac_prev=sysconfdir ;;
1508  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1509  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1510    sysconfdir=$ac_optarg ;;
1511
1512  -target | --target | --targe | --targ | --tar | --ta | --t)
1513    ac_prev=target_alias ;;
1514  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1515    target_alias=$ac_optarg ;;
1516
1517  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1518    verbose=yes ;;
1519
1520  -version | --version | --versio | --versi | --vers | -V)
1521    ac_init_version=: ;;
1522
1523  -with-* | --with-*)
1524    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1525    # Reject names that are not valid shell variable names.
1526    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1527      as_fn_error $? "invalid package name: $ac_useropt"
1528    ac_useropt_orig=$ac_useropt
1529    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1530    case $ac_user_opts in
1531      *"
1532"with_$ac_useropt"
1533"*) ;;
1534      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1535	 ac_unrecognized_sep=', ';;
1536    esac
1537    eval with_$ac_useropt=\$ac_optarg ;;
1538
1539  -without-* | --without-*)
1540    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1541    # Reject names that are not valid shell variable names.
1542    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1543      as_fn_error $? "invalid package name: $ac_useropt"
1544    ac_useropt_orig=$ac_useropt
1545    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1546    case $ac_user_opts in
1547      *"
1548"with_$ac_useropt"
1549"*) ;;
1550      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1551	 ac_unrecognized_sep=', ';;
1552    esac
1553    eval with_$ac_useropt=no ;;
1554
1555  --x)
1556    # Obsolete; use --with-x.
1557    with_x=yes ;;
1558
1559  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1560  | --x-incl | --x-inc | --x-in | --x-i)
1561    ac_prev=x_includes ;;
1562  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1563  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1564    x_includes=$ac_optarg ;;
1565
1566  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1567  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1568    ac_prev=x_libraries ;;
1569  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1570  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1571    x_libraries=$ac_optarg ;;
1572
1573  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1574Try \`$0 --help' for more information"
1575    ;;
1576
1577  *=*)
1578    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1579    # Reject names that are not valid shell variable names.
1580    case $ac_envvar in #(
1581      '' | [0-9]* | *[!_$as_cr_alnum]* )
1582      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1583    esac
1584    eval $ac_envvar=\$ac_optarg
1585    export $ac_envvar ;;
1586
1587  *)
1588    # FIXME: should be removed in autoconf 3.0.
1589    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1590    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1591      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1592    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1593    ;;
1594
1595  esac
1596done
1597
1598if test -n "$ac_prev"; then
1599  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1600  as_fn_error $? "missing argument to $ac_option"
1601fi
1602
1603if test -n "$ac_unrecognized_opts"; then
1604  case $enable_option_checking in
1605    no) ;;
1606    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1607    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1608  esac
1609fi
1610
1611# Check all directory arguments for consistency.
1612for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1613		datadir sysconfdir sharedstatedir localstatedir includedir \
1614		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1615		libdir localedir mandir
1616do
1617  eval ac_val=\$$ac_var
1618  # Remove trailing slashes.
1619  case $ac_val in
1620    */ )
1621      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1622      eval $ac_var=\$ac_val;;
1623  esac
1624  # Be sure to have absolute directory names.
1625  case $ac_val in
1626    [\\/$]* | ?:[\\/]* )  continue;;
1627    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1628  esac
1629  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1630done
1631
1632# There might be people who depend on the old broken behavior: `$host'
1633# used to hold the argument of --host etc.
1634# FIXME: To remove some day.
1635build=$build_alias
1636host=$host_alias
1637target=$target_alias
1638
1639# FIXME: To remove some day.
1640if test "x$host_alias" != x; then
1641  if test "x$build_alias" = x; then
1642    cross_compiling=maybe
1643  elif test "x$build_alias" != "x$host_alias"; then
1644    cross_compiling=yes
1645  fi
1646fi
1647
1648ac_tool_prefix=
1649test -n "$host_alias" && ac_tool_prefix=$host_alias-
1650
1651test "$silent" = yes && exec 6>/dev/null
1652
1653
1654ac_pwd=`pwd` && test -n "$ac_pwd" &&
1655ac_ls_di=`ls -di .` &&
1656ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1657  as_fn_error $? "working directory cannot be determined"
1658test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1659  as_fn_error $? "pwd does not report name of working directory"
1660
1661
1662# Find the source files, if location was not specified.
1663if test -z "$srcdir"; then
1664  ac_srcdir_defaulted=yes
1665  # Try the directory containing this script, then the parent directory.
1666  ac_confdir=`$as_dirname -- "$as_myself" ||
1667$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1668	 X"$as_myself" : 'X\(//\)[^/]' \| \
1669	 X"$as_myself" : 'X\(//\)$' \| \
1670	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1671$as_echo X"$as_myself" |
1672    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1673	    s//\1/
1674	    q
1675	  }
1676	  /^X\(\/\/\)[^/].*/{
1677	    s//\1/
1678	    q
1679	  }
1680	  /^X\(\/\/\)$/{
1681	    s//\1/
1682	    q
1683	  }
1684	  /^X\(\/\).*/{
1685	    s//\1/
1686	    q
1687	  }
1688	  s/.*/./; q'`
1689  srcdir=$ac_confdir
1690  if test ! -r "$srcdir/$ac_unique_file"; then
1691    srcdir=..
1692  fi
1693else
1694  ac_srcdir_defaulted=no
1695fi
1696if test ! -r "$srcdir/$ac_unique_file"; then
1697  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1698  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1699fi
1700ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1701ac_abs_confdir=`(
1702	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1703	pwd)`
1704# When building in place, set srcdir=.
1705if test "$ac_abs_confdir" = "$ac_pwd"; then
1706  srcdir=.
1707fi
1708# Remove unnecessary trailing slashes from srcdir.
1709# Double slashes in file names in object file debugging info
1710# mess up M-x gdb in Emacs.
1711case $srcdir in
1712*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1713esac
1714for ac_var in $ac_precious_vars; do
1715  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1716  eval ac_env_${ac_var}_value=\$${ac_var}
1717  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1718  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1719done
1720
1721#
1722# Report the --help message.
1723#
1724if test "$ac_init_help" = "long"; then
1725  # Omit some internal or obsolete options to make the list less imposing.
1726  # This message is too long to be a string in the A/UX 3.1 sh.
1727  cat <<_ACEOF
1728\`configure' configures OpenJDK jdk8 to adapt to many kinds of systems.
1729
1730Usage: $0 [OPTION]... [VAR=VALUE]...
1731
1732To assign environment variables (e.g., CC, CFLAGS...), specify them as
1733VAR=VALUE.  See below for descriptions of some of the useful variables.
1734
1735Defaults for the options are specified in brackets.
1736
1737Configuration:
1738  -h, --help              display this help and exit
1739      --help=short        display options specific to this package
1740      --help=recursive    display the short help of all the included packages
1741  -V, --version           display version information and exit
1742  -q, --quiet, --silent   do not print \`checking ...' messages
1743      --cache-file=FILE   cache test results in FILE [disabled]
1744  -C, --config-cache      alias for \`--cache-file=config.cache'
1745  -n, --no-create         do not create output files
1746      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1747
1748Installation directories:
1749  --prefix=PREFIX         install architecture-independent files in PREFIX
1750                          [$ac_default_prefix]
1751  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1752                          [PREFIX]
1753
1754By default, \`make install' will install all the files in
1755\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1756an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1757for instance \`--prefix=\$HOME'.
1758
1759For better control, use the options below.
1760
1761Fine tuning of the installation directories:
1762  --bindir=DIR            user executables [EPREFIX/bin]
1763  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1764  --libexecdir=DIR        program executables [EPREFIX/libexec]
1765  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1766  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1767  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1768  --libdir=DIR            object code libraries [EPREFIX/lib]
1769  --includedir=DIR        C header files [PREFIX/include]
1770  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1771  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1772  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1773  --infodir=DIR           info documentation [DATAROOTDIR/info]
1774  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1775  --mandir=DIR            man documentation [DATAROOTDIR/man]
1776  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1777  --htmldir=DIR           html documentation [DOCDIR]
1778  --dvidir=DIR            dvi documentation [DOCDIR]
1779  --pdfdir=DIR            pdf documentation [DOCDIR]
1780  --psdir=DIR             ps documentation [DOCDIR]
1781_ACEOF
1782
1783  cat <<\_ACEOF
1784
1785X features:
1786  --x-includes=DIR    X include files are in DIR
1787  --x-libraries=DIR   X library files are in DIR
1788
1789System types:
1790  --build=BUILD     configure for building on BUILD [guessed]
1791  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1792  --target=TARGET   configure for building compilers for TARGET [HOST]
1793_ACEOF
1794fi
1795
1796if test -n "$ac_init_help"; then
1797  case $ac_init_help in
1798     short | recursive ) echo "Configuration of OpenJDK jdk8:";;
1799   esac
1800  cat <<\_ACEOF
1801
1802Optional Features:
1803  --disable-option-checking  ignore unrecognized --enable/--with options
1804  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1805  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1806  --enable-openjdk-only   suppress building custom source even if present
1807                          [disabled]
1808  --enable-debug          set the debug level to fastdebug (shorthand for
1809                          --with-debug-level=fastdebug) [disabled]
1810  --disable-headful       disable building headful support (graphical UI
1811                          support) [enabled]
1812  --enable-hotspot-test-in-build
1813                          run the Queens test after Hotspot build [disabled]
1814  --enable-unlimited-crypto
1815                          Enable unlimited crypto policy [disabled]
1816  --enable-rmiconnector-iiop
1817                          enable the JMX RMIConnector iiop transport
1818                          [disabled]
1819  --disable-debug-symbols disable generation of debug symbols [enabled]
1820  --disable-zip-debug-info
1821                          disable zipping of debug-info files [enabled]
1822  --enable-macosx-runtime-support
1823                          Deprecated. Option is kept for backwards
1824                          compatibility and is ignored
1825  --disable-freetype-bundling
1826                          disable bundling of the freetype library with the
1827                          build result [enabled on Windows or when using
1828                          --with-freetype, disabled otherwise]
1829  --enable-sjavac         use sjavac to do fast incremental compiles
1830                          [disabled]
1831  --disable-precompiled-headers
1832                          disable using precompiled headers when compiling C++
1833                          [enabled]
1834  --enable-ccache         enable using ccache to speed up recompilations
1835                          [disabled]
1836
1837Optional Packages:
1838  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1839  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1840  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1841                          support it), e.g. --with-target-bits=32 [guessed]
1842  --with-sys-root         pass this sys-root to the compilers and tools (for
1843                          cross-compiling)
1844  --with-tools-dir        search this directory for compilers and tools (for
1845                          cross-compiling)
1846  --with-devkit           use this directory as base for tools-dir and
1847                          sys-root (for cross-compiling)
1848  --with-custom-make-dir  Deprecated. Option is kept for backwards
1849                          compatibility and is ignored
1850  --with-jdk-variant      JDK variant to build (normal) [normal]
1851  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1852  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1853                          client, minimal1, kernel, zero, zeroshark, core)
1854                          [server]
1855  --with-debug-level      set the debug level (release, fastdebug, slowdebug)
1856                          [release]
1857  --with-conf-name        use this as the name of the configuration [generated
1858                          from important configuration options]
1859  --with-builddeps-conf   use this configuration file for the builddeps
1860  --with-builddeps-server download and use build dependencies from this server
1861                          url
1862  --with-builddeps-dir    store downloaded build dependencies here
1863                          [/localhome/builddeps]
1864  --with-builddeps-group  chgrp the downloaded build dependencies to this
1865                          group
1866  --with-cacerts-file     specify alternative cacerts file
1867  --with-milestone        Set milestone value for build [internal]
1868  --with-update-version   Set update version value for build [b00]
1869  --with-user-release-suffix
1870                          Add a custom string to the version string if build
1871                          number is not set.[username_builddateb00]
1872  --with-build-number     Set build number value for build [b00]
1873  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1874  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all
1875                          invocations of the Boot JDK, overriding the default
1876                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1877                          -enableassertions"
1878  --with-add-source-root  for each and every source directory, look in this
1879                          additional source root for the same directory; if it
1880                          exists and have files in it, include it in the build
1881  --with-override-source-root
1882                          for each and every source directory, look in this
1883                          override source root for the same directory; if it
1884                          exists, use that directory instead and ignore the
1885                          directory in the original source root
1886  --with-adds-and-overrides
1887                          use the subdirs 'adds' and 'overrides' in the
1888                          specified directory as add-source-root and
1889                          override-source-root
1890  --with-override-langtools
1891                          use this langtools dir for the build
1892  --with-override-corba   use this corba dir for the build
1893  --with-override-jaxp    use this jaxp dir for the build
1894  --with-override-jaxws   use this jaxws dir for the build
1895  --with-override-hotspot use this hotspot dir for the build
1896  --with-override-nashorn use this nashorn dir for the build
1897  --with-override-jdk     use this jdk dir for the build
1898  --with-import-hotspot   import hotspot binaries from this jdk image or
1899                          hotspot build dist dir instead of building from
1900                          source
1901  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1902                          to show possible values [platform dependent]
1903  --with-jtreg            Regression Test Harness [probed]
1904  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1905  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1906  --with-extra-ldflags    extra flags to be used when linking jdk
1907  --with-x                use the X Window System
1908  --with-cups             specify prefix directory for the cups package
1909                          (expecting the headers under PATH/include)
1910  --with-cups-include     specify directory for the cups include files
1911  --with-freetype         specify prefix directory for the freetype package
1912                          (expecting the libraries under PATH/lib and the
1913                          headers under PATH/include)
1914  --with-freetype-include specify directory for the freetype include files
1915  --with-freetype-lib     specify directory for the freetype library
1916  --with-alsa             specify prefix directory for the alsa package
1917                          (expecting the libraries under PATH/lib and the
1918                          headers under PATH/include)
1919  --with-alsa-include     specify directory for the alsa include files
1920  --with-alsa-lib         specify directory for the alsa library
1921  --with-giflib           use giflib from build system or OpenJDK source
1922                          (system, bundled) [bundled]
1923  --with-zlib             use zlib from build system or OpenJDK source
1924                          (system, bundled) [bundled]
1925  --with-stdc++lib=<static>,<dynamic>,<default>
1926                          force linking of the C++ runtime on Linux to either
1927                          static or dynamic, default is static with dynamic as
1928                          fallback
1929  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1930                          only) [probed]
1931  --with-dxsdk            Deprecated. Option is kept for backwards
1932                          compatibility and is ignored
1933  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1934                          compatibility and is ignored
1935  --with-dxsdk-include    Deprecated. Option is kept for backwards
1936                          compatibility and is ignored
1937  --with-num-cores        number of cores in the build system, e.g.
1938                          --with-num-cores=8 [probed]
1939  --with-memory-size      memory (in MB) available in the build system, e.g.
1940                          --with-memory-size=1024 [probed]
1941  --with-jobs             number of parallel jobs to let make run [calculated
1942                          based on cores and memory]
1943  --with-sjavac-server-java
1944                          use this java binary for running the sjavac
1945                          background server [Boot JDK java]
1946  --with-ccache-dir       where to store ccache files [~/.ccache]
1947
1948Some influential environment variables:
1949  BASENAME    Override default value for BASENAME
1950  BASH        Override default value for BASH
1951  CAT         Override default value for CAT
1952  CHMOD       Override default value for CHMOD
1953  CMP         Override default value for CMP
1954  COMM        Override default value for COMM
1955  CP          Override default value for CP
1956  CPIO        Override default value for CPIO
1957  CUT         Override default value for CUT
1958  DATE        Override default value for DATE
1959  DIFF        Override default value for DIFF
1960  DIRNAME     Override default value for DIRNAME
1961  ECHO        Override default value for ECHO
1962  EXPR        Override default value for EXPR
1963  FILE        Override default value for FILE
1964  FIND        Override default value for FIND
1965  HEAD        Override default value for HEAD
1966  LN          Override default value for LN
1967  LS          Override default value for LS
1968  MKDIR       Override default value for MKDIR
1969  MKTEMP      Override default value for MKTEMP
1970  MV          Override default value for MV
1971  NAWK        Override default value for NAWK
1972  PRINTF      Override default value for PRINTF
1973  RM          Override default value for RM
1974  SH          Override default value for SH
1975  SORT        Override default value for SORT
1976  TAIL        Override default value for TAIL
1977  TAR         Override default value for TAR
1978  TEE         Override default value for TEE
1979  TOUCH       Override default value for TOUCH
1980  TR          Override default value for TR
1981  UNAME       Override default value for UNAME
1982  UNIQ        Override default value for UNIQ
1983  WC          Override default value for WC
1984  WHICH       Override default value for WHICH
1985  XARGS       Override default value for XARGS
1986  AWK         Override default value for AWK
1987  GREP        Override default value for GREP
1988  EGREP       Override default value for EGREP
1989  FGREP       Override default value for FGREP
1990  SED         Override default value for SED
1991  CYGPATH     Override default value for CYGPATH
1992  READLINK    Override default value for READLINK
1993  DF          Override default value for DF
1994  SETFILE     Override default value for SETFILE
1995  UNZIP       Override default value for UNZIP
1996  ZIP         Override default value for ZIP
1997  LDD         Override default value for LDD
1998  OTOOL       Override default value for OTOOL
1999  READELF     Override default value for READELF
2000  HG          Override default value for HG
2001  STAT        Override default value for STAT
2002  TIME        Override default value for TIME
2003  DSYMUTIL    Override default value for DSYMUTIL
2004  XATTR       Override default value for XATTR
2005  CODESIGN    Override default value for CODESIGN
2006  PKG_CONFIG  path to pkg-config utility
2007  JAVA        Override default value for JAVA
2008  JAVAC       Override default value for JAVAC
2009  JAVAH       Override default value for JAVAH
2010  JAR         Override default value for JAR
2011  NATIVE2ASCII
2012              Override default value for NATIVE2ASCII
2013  JARSIGNER   Override default value for JARSIGNER
2014  CC          C compiler command
2015  CFLAGS      C compiler flags
2016  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2017              nonstandard directory <lib dir>
2018  LIBS        libraries to pass to the linker, e.g. -l<library>
2019  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2020              you have headers in a nonstandard directory <include dir>
2021  CXX         C++ compiler command
2022  CXXFLAGS    C++ compiler flags
2023  CPP         C preprocessor
2024  CXXCPP      C++ preprocessor
2025  AS          Override default value for AS
2026  AR          Override default value for AR
2027  OBJC        Objective C compiler command
2028  OBJCFLAGS   Objective C compiler flags
2029  LIPO        Override default value for LIPO
2030  STRIP       Override default value for STRIP
2031  NM          Override default value for NM
2032  GNM         Override default value for GNM
2033  MCS         Override default value for MCS
2034  OBJCOPY     Override default value for OBJCOPY
2035  OBJDUMP     Override default value for OBJDUMP
2036  BUILD_CC    Override default value for BUILD_CC
2037  BUILD_CXX   Override default value for BUILD_CXX
2038  BUILD_LD    Override default value for BUILD_LD
2039  JTREGEXE    Override default value for JTREGEXE
2040  XMKMF       Path to xmkmf, Makefile generator for X Window System
2041  FREETYPE_CFLAGS
2042              C compiler flags for FREETYPE, overriding pkg-config
2043  FREETYPE_LIBS
2044              linker flags for FREETYPE, overriding pkg-config
2045  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2046  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2047  LIBFFI_CFLAGS
2048              C compiler flags for LIBFFI, overriding pkg-config
2049  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2050  CCACHE      Override default value for CCACHE
2051
2052Use these variables to override the choices made by `configure' or to help
2053it to find libraries and programs with nonstandard names/locations.
2054
2055Report bugs to <build-dev@openjdk.java.net>.
2056OpenJDK home page: <http://openjdk.java.net>.
2057_ACEOF
2058ac_status=$?
2059fi
2060
2061if test "$ac_init_help" = "recursive"; then
2062  # If there are subdirs, report their specific --help.
2063  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2064    test -d "$ac_dir" ||
2065      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2066      continue
2067    ac_builddir=.
2068
2069case "$ac_dir" in
2070.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2071*)
2072  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2073  # A ".." for each directory in $ac_dir_suffix.
2074  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2075  case $ac_top_builddir_sub in
2076  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2077  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2078  esac ;;
2079esac
2080ac_abs_top_builddir=$ac_pwd
2081ac_abs_builddir=$ac_pwd$ac_dir_suffix
2082# for backward compatibility:
2083ac_top_builddir=$ac_top_build_prefix
2084
2085case $srcdir in
2086  .)  # We are building in place.
2087    ac_srcdir=.
2088    ac_top_srcdir=$ac_top_builddir_sub
2089    ac_abs_top_srcdir=$ac_pwd ;;
2090  [\\/]* | ?:[\\/]* )  # Absolute name.
2091    ac_srcdir=$srcdir$ac_dir_suffix;
2092    ac_top_srcdir=$srcdir
2093    ac_abs_top_srcdir=$srcdir ;;
2094  *) # Relative name.
2095    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2096    ac_top_srcdir=$ac_top_build_prefix$srcdir
2097    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2098esac
2099ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2100
2101    cd "$ac_dir" || { ac_status=$?; continue; }
2102    # Check for guested configure.
2103    if test -f "$ac_srcdir/configure.gnu"; then
2104      echo &&
2105      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2106    elif test -f "$ac_srcdir/configure"; then
2107      echo &&
2108      $SHELL "$ac_srcdir/configure" --help=recursive
2109    else
2110      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2111    fi || ac_status=$?
2112    cd "$ac_pwd" || { ac_status=$?; break; }
2113  done
2114fi
2115
2116test -n "$ac_init_help" && exit $ac_status
2117if $ac_init_version; then
2118  cat <<\_ACEOF
2119OpenJDK configure jdk8
2120generated by GNU Autoconf 2.69
2121
2122Copyright (C) 2012 Free Software Foundation, Inc.
2123This configure script is free software; the Free Software Foundation
2124gives unlimited permission to copy, distribute and modify it.
2125_ACEOF
2126  exit
2127fi
2128
2129## ------------------------ ##
2130## Autoconf initialization. ##
2131## ------------------------ ##
2132
2133# ac_fn_c_try_compile LINENO
2134# --------------------------
2135# Try to compile conftest.$ac_ext, and return whether this succeeded.
2136ac_fn_c_try_compile ()
2137{
2138  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2139  rm -f conftest.$ac_objext
2140  if { { ac_try="$ac_compile"
2141case "(($ac_try" in
2142  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2143  *) ac_try_echo=$ac_try;;
2144esac
2145eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2146$as_echo "$ac_try_echo"; } >&5
2147  (eval "$ac_compile") 2>conftest.err
2148  ac_status=$?
2149  if test -s conftest.err; then
2150    grep -v '^ *+' conftest.err >conftest.er1
2151    cat conftest.er1 >&5
2152    mv -f conftest.er1 conftest.err
2153  fi
2154  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2155  test $ac_status = 0; } && {
2156	 test -z "$ac_c_werror_flag" ||
2157	 test ! -s conftest.err
2158       } && test -s conftest.$ac_objext; then :
2159  ac_retval=0
2160else
2161  $as_echo "$as_me: failed program was:" >&5
2162sed 's/^/| /' conftest.$ac_ext >&5
2163
2164	ac_retval=1
2165fi
2166  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2167  as_fn_set_status $ac_retval
2168
2169} # ac_fn_c_try_compile
2170
2171# ac_fn_cxx_try_compile LINENO
2172# ----------------------------
2173# Try to compile conftest.$ac_ext, and return whether this succeeded.
2174ac_fn_cxx_try_compile ()
2175{
2176  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2177  rm -f conftest.$ac_objext
2178  if { { ac_try="$ac_compile"
2179case "(($ac_try" in
2180  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2181  *) ac_try_echo=$ac_try;;
2182esac
2183eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2184$as_echo "$ac_try_echo"; } >&5
2185  (eval "$ac_compile") 2>conftest.err
2186  ac_status=$?
2187  if test -s conftest.err; then
2188    grep -v '^ *+' conftest.err >conftest.er1
2189    cat conftest.er1 >&5
2190    mv -f conftest.er1 conftest.err
2191  fi
2192  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2193  test $ac_status = 0; } && {
2194	 test -z "$ac_cxx_werror_flag" ||
2195	 test ! -s conftest.err
2196       } && test -s conftest.$ac_objext; then :
2197  ac_retval=0
2198else
2199  $as_echo "$as_me: failed program was:" >&5
2200sed 's/^/| /' conftest.$ac_ext >&5
2201
2202	ac_retval=1
2203fi
2204  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2205  as_fn_set_status $ac_retval
2206
2207} # ac_fn_cxx_try_compile
2208
2209# ac_fn_c_try_cpp LINENO
2210# ----------------------
2211# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2212ac_fn_c_try_cpp ()
2213{
2214  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2215  if { { ac_try="$ac_cpp conftest.$ac_ext"
2216case "(($ac_try" in
2217  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2218  *) ac_try_echo=$ac_try;;
2219esac
2220eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2221$as_echo "$ac_try_echo"; } >&5
2222  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2223  ac_status=$?
2224  if test -s conftest.err; then
2225    grep -v '^ *+' conftest.err >conftest.er1
2226    cat conftest.er1 >&5
2227    mv -f conftest.er1 conftest.err
2228  fi
2229  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2230  test $ac_status = 0; } > conftest.i && {
2231	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2232	 test ! -s conftest.err
2233       }; then :
2234  ac_retval=0
2235else
2236  $as_echo "$as_me: failed program was:" >&5
2237sed 's/^/| /' conftest.$ac_ext >&5
2238
2239    ac_retval=1
2240fi
2241  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2242  as_fn_set_status $ac_retval
2243
2244} # ac_fn_c_try_cpp
2245
2246# ac_fn_cxx_try_cpp LINENO
2247# ------------------------
2248# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2249ac_fn_cxx_try_cpp ()
2250{
2251  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2252  if { { ac_try="$ac_cpp conftest.$ac_ext"
2253case "(($ac_try" in
2254  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2255  *) ac_try_echo=$ac_try;;
2256esac
2257eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2258$as_echo "$ac_try_echo"; } >&5
2259  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2260  ac_status=$?
2261  if test -s conftest.err; then
2262    grep -v '^ *+' conftest.err >conftest.er1
2263    cat conftest.er1 >&5
2264    mv -f conftest.er1 conftest.err
2265  fi
2266  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2267  test $ac_status = 0; } > conftest.i && {
2268	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2269	 test ! -s conftest.err
2270       }; then :
2271  ac_retval=0
2272else
2273  $as_echo "$as_me: failed program was:" >&5
2274sed 's/^/| /' conftest.$ac_ext >&5
2275
2276    ac_retval=1
2277fi
2278  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2279  as_fn_set_status $ac_retval
2280
2281} # ac_fn_cxx_try_cpp
2282
2283# ac_fn_objc_try_compile LINENO
2284# -----------------------------
2285# Try to compile conftest.$ac_ext, and return whether this succeeded.
2286ac_fn_objc_try_compile ()
2287{
2288  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2289  rm -f conftest.$ac_objext
2290  if { { ac_try="$ac_compile"
2291case "(($ac_try" in
2292  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2293  *) ac_try_echo=$ac_try;;
2294esac
2295eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2296$as_echo "$ac_try_echo"; } >&5
2297  (eval "$ac_compile") 2>conftest.err
2298  ac_status=$?
2299  if test -s conftest.err; then
2300    grep -v '^ *+' conftest.err >conftest.er1
2301    cat conftest.er1 >&5
2302    mv -f conftest.er1 conftest.err
2303  fi
2304  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2305  test $ac_status = 0; } && {
2306	 test -z "$ac_objc_werror_flag" ||
2307	 test ! -s conftest.err
2308       } && test -s conftest.$ac_objext; then :
2309  ac_retval=0
2310else
2311  $as_echo "$as_me: failed program was:" >&5
2312sed 's/^/| /' conftest.$ac_ext >&5
2313
2314	ac_retval=1
2315fi
2316  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2317  as_fn_set_status $ac_retval
2318
2319} # ac_fn_objc_try_compile
2320
2321# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2322# ---------------------------------------------------------
2323# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2324# the include files in INCLUDES and setting the cache variable VAR
2325# accordingly.
2326ac_fn_cxx_check_header_mongrel ()
2327{
2328  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2329  if eval \${$3+:} false; then :
2330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2331$as_echo_n "checking for $2... " >&6; }
2332if eval \${$3+:} false; then :
2333  $as_echo_n "(cached) " >&6
2334fi
2335eval ac_res=\$$3
2336	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2337$as_echo "$ac_res" >&6; }
2338else
2339  # Is the header compilable?
2340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2341$as_echo_n "checking $2 usability... " >&6; }
2342cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2343/* end confdefs.h.  */
2344$4
2345#include <$2>
2346_ACEOF
2347if ac_fn_cxx_try_compile "$LINENO"; then :
2348  ac_header_compiler=yes
2349else
2350  ac_header_compiler=no
2351fi
2352rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2354$as_echo "$ac_header_compiler" >&6; }
2355
2356# Is the header present?
2357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2358$as_echo_n "checking $2 presence... " >&6; }
2359cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2360/* end confdefs.h.  */
2361#include <$2>
2362_ACEOF
2363if ac_fn_cxx_try_cpp "$LINENO"; then :
2364  ac_header_preproc=yes
2365else
2366  ac_header_preproc=no
2367fi
2368rm -f conftest.err conftest.i conftest.$ac_ext
2369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2370$as_echo "$ac_header_preproc" >&6; }
2371
2372# So?  What about this header?
2373case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2374  yes:no: )
2375    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2376$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2378$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2379    ;;
2380  no:yes:* )
2381    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2382$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2383    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2384$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2385    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2386$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2387    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2388$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2389    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2390$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2391( $as_echo "## ----------------------------------------- ##
2392## Report this to build-dev@openjdk.java.net ##
2393## ----------------------------------------- ##"
2394     ) | sed "s/^/$as_me: WARNING:     /" >&2
2395    ;;
2396esac
2397  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2398$as_echo_n "checking for $2... " >&6; }
2399if eval \${$3+:} false; then :
2400  $as_echo_n "(cached) " >&6
2401else
2402  eval "$3=\$ac_header_compiler"
2403fi
2404eval ac_res=\$$3
2405	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2406$as_echo "$ac_res" >&6; }
2407fi
2408  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2409
2410} # ac_fn_cxx_check_header_mongrel
2411
2412# ac_fn_cxx_try_run LINENO
2413# ------------------------
2414# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2415# that executables *can* be run.
2416ac_fn_cxx_try_run ()
2417{
2418  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2419  if { { ac_try="$ac_link"
2420case "(($ac_try" in
2421  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2422  *) ac_try_echo=$ac_try;;
2423esac
2424eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2425$as_echo "$ac_try_echo"; } >&5
2426  (eval "$ac_link") 2>&5
2427  ac_status=$?
2428  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2429  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2430  { { case "(($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_try") 2>&5
2437  ac_status=$?
2438  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2439  test $ac_status = 0; }; }; then :
2440  ac_retval=0
2441else
2442  $as_echo "$as_me: program exited with status $ac_status" >&5
2443       $as_echo "$as_me: failed program was:" >&5
2444sed 's/^/| /' conftest.$ac_ext >&5
2445
2446       ac_retval=$ac_status
2447fi
2448  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2449  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2450  as_fn_set_status $ac_retval
2451
2452} # ac_fn_cxx_try_run
2453
2454# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2455# ---------------------------------------------------------
2456# Tests whether HEADER exists and can be compiled using the include files in
2457# INCLUDES, setting the cache variable VAR accordingly.
2458ac_fn_cxx_check_header_compile ()
2459{
2460  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2461  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2462$as_echo_n "checking for $2... " >&6; }
2463if eval \${$3+:} false; then :
2464  $as_echo_n "(cached) " >&6
2465else
2466  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2467/* end confdefs.h.  */
2468$4
2469#include <$2>
2470_ACEOF
2471if ac_fn_cxx_try_compile "$LINENO"; then :
2472  eval "$3=yes"
2473else
2474  eval "$3=no"
2475fi
2476rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2477fi
2478eval ac_res=\$$3
2479	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2480$as_echo "$ac_res" >&6; }
2481  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2482
2483} # ac_fn_cxx_check_header_compile
2484
2485# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2486# ----------------------------------------------
2487# Tries to find the compile-time value of EXPR in a program that includes
2488# INCLUDES, setting VAR accordingly. Returns whether the value could be
2489# computed
2490ac_fn_cxx_compute_int ()
2491{
2492  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2493  if test "$cross_compiling" = yes; then
2494    # Depending upon the size, compute the lo and hi bounds.
2495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2496/* end confdefs.h.  */
2497$4
2498int
2499main ()
2500{
2501static int test_array [1 - 2 * !(($2) >= 0)];
2502test_array [0] = 0;
2503return test_array [0];
2504
2505  ;
2506  return 0;
2507}
2508_ACEOF
2509if ac_fn_cxx_try_compile "$LINENO"; then :
2510  ac_lo=0 ac_mid=0
2511  while :; do
2512    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2513/* end confdefs.h.  */
2514$4
2515int
2516main ()
2517{
2518static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2519test_array [0] = 0;
2520return test_array [0];
2521
2522  ;
2523  return 0;
2524}
2525_ACEOF
2526if ac_fn_cxx_try_compile "$LINENO"; then :
2527  ac_hi=$ac_mid; break
2528else
2529  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2530			if test $ac_lo -le $ac_mid; then
2531			  ac_lo= ac_hi=
2532			  break
2533			fi
2534			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2535fi
2536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2537  done
2538else
2539  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2540/* end confdefs.h.  */
2541$4
2542int
2543main ()
2544{
2545static int test_array [1 - 2 * !(($2) < 0)];
2546test_array [0] = 0;
2547return test_array [0];
2548
2549  ;
2550  return 0;
2551}
2552_ACEOF
2553if ac_fn_cxx_try_compile "$LINENO"; then :
2554  ac_hi=-1 ac_mid=-1
2555  while :; do
2556    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2557/* end confdefs.h.  */
2558$4
2559int
2560main ()
2561{
2562static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2563test_array [0] = 0;
2564return test_array [0];
2565
2566  ;
2567  return 0;
2568}
2569_ACEOF
2570if ac_fn_cxx_try_compile "$LINENO"; then :
2571  ac_lo=$ac_mid; break
2572else
2573  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2574			if test $ac_mid -le $ac_hi; then
2575			  ac_lo= ac_hi=
2576			  break
2577			fi
2578			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2579fi
2580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2581  done
2582else
2583  ac_lo= ac_hi=
2584fi
2585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2586fi
2587rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2588# Binary search between lo and hi bounds.
2589while test "x$ac_lo" != "x$ac_hi"; do
2590  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2591  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2592/* end confdefs.h.  */
2593$4
2594int
2595main ()
2596{
2597static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2598test_array [0] = 0;
2599return test_array [0];
2600
2601  ;
2602  return 0;
2603}
2604_ACEOF
2605if ac_fn_cxx_try_compile "$LINENO"; then :
2606  ac_hi=$ac_mid
2607else
2608  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2609fi
2610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611done
2612case $ac_lo in #((
2613?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2614'') ac_retval=1 ;;
2615esac
2616  else
2617    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620static long int longval () { return $2; }
2621static unsigned long int ulongval () { return $2; }
2622#include <stdio.h>
2623#include <stdlib.h>
2624int
2625main ()
2626{
2627
2628  FILE *f = fopen ("conftest.val", "w");
2629  if (! f)
2630    return 1;
2631  if (($2) < 0)
2632    {
2633      long int i = longval ();
2634      if (i != ($2))
2635	return 1;
2636      fprintf (f, "%ld", i);
2637    }
2638  else
2639    {
2640      unsigned long int i = ulongval ();
2641      if (i != ($2))
2642	return 1;
2643      fprintf (f, "%lu", i);
2644    }
2645  /* Do not output a trailing newline, as this causes \r\n confusion
2646     on some platforms.  */
2647  return ferror (f) || fclose (f) != 0;
2648
2649  ;
2650  return 0;
2651}
2652_ACEOF
2653if ac_fn_cxx_try_run "$LINENO"; then :
2654  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2655else
2656  ac_retval=1
2657fi
2658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2659  conftest.$ac_objext conftest.beam conftest.$ac_ext
2660rm -f conftest.val
2661
2662  fi
2663  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2664  as_fn_set_status $ac_retval
2665
2666} # ac_fn_cxx_compute_int
2667
2668# ac_fn_cxx_try_link LINENO
2669# -------------------------
2670# Try to link conftest.$ac_ext, and return whether this succeeded.
2671ac_fn_cxx_try_link ()
2672{
2673  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2674  rm -f conftest.$ac_objext conftest$ac_exeext
2675  if { { ac_try="$ac_link"
2676case "(($ac_try" in
2677  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2678  *) ac_try_echo=$ac_try;;
2679esac
2680eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2681$as_echo "$ac_try_echo"; } >&5
2682  (eval "$ac_link") 2>conftest.err
2683  ac_status=$?
2684  if test -s conftest.err; then
2685    grep -v '^ *+' conftest.err >conftest.er1
2686    cat conftest.er1 >&5
2687    mv -f conftest.er1 conftest.err
2688  fi
2689  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2690  test $ac_status = 0; } && {
2691	 test -z "$ac_cxx_werror_flag" ||
2692	 test ! -s conftest.err
2693       } && test -s conftest$ac_exeext && {
2694	 test "$cross_compiling" = yes ||
2695	 test -x conftest$ac_exeext
2696       }; then :
2697  ac_retval=0
2698else
2699  $as_echo "$as_me: failed program was:" >&5
2700sed 's/^/| /' conftest.$ac_ext >&5
2701
2702	ac_retval=1
2703fi
2704  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2705  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2706  # interfere with the next link command; also delete a directory that is
2707  # left behind by Apple's compiler.  We do this before executing the actions.
2708  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2709  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2710  as_fn_set_status $ac_retval
2711
2712} # ac_fn_cxx_try_link
2713
2714# ac_fn_cxx_check_func LINENO FUNC VAR
2715# ------------------------------------
2716# Tests whether FUNC exists, setting the cache variable VAR accordingly
2717ac_fn_cxx_check_func ()
2718{
2719  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2720  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2721$as_echo_n "checking for $2... " >&6; }
2722if eval \${$3+:} false; then :
2723  $as_echo_n "(cached) " >&6
2724else
2725  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2726/* end confdefs.h.  */
2727/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2728   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2729#define $2 innocuous_$2
2730
2731/* System header to define __stub macros and hopefully few prototypes,
2732    which can conflict with char $2 (); below.
2733    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2734    <limits.h> exists even on freestanding compilers.  */
2735
2736#ifdef __STDC__
2737# include <limits.h>
2738#else
2739# include <assert.h>
2740#endif
2741
2742#undef $2
2743
2744/* Override any GCC internal prototype to avoid an error.
2745   Use char because int might match the return type of a GCC
2746   builtin and then its argument prototype would still apply.  */
2747#ifdef __cplusplus
2748extern "C"
2749#endif
2750char $2 ();
2751/* The GNU C library defines this for functions which it implements
2752    to always fail with ENOSYS.  Some functions are actually named
2753    something starting with __ and the normal name is an alias.  */
2754#if defined __stub_$2 || defined __stub___$2
2755choke me
2756#endif
2757
2758int
2759main ()
2760{
2761return $2 ();
2762  ;
2763  return 0;
2764}
2765_ACEOF
2766if ac_fn_cxx_try_link "$LINENO"; then :
2767  eval "$3=yes"
2768else
2769  eval "$3=no"
2770fi
2771rm -f core conftest.err conftest.$ac_objext \
2772    conftest$ac_exeext conftest.$ac_ext
2773fi
2774eval ac_res=\$$3
2775	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2776$as_echo "$ac_res" >&6; }
2777  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2778
2779} # ac_fn_cxx_check_func
2780
2781# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2782# -------------------------------------------------------
2783# Tests whether HEADER exists and can be compiled using the include files in
2784# INCLUDES, setting the cache variable VAR accordingly.
2785ac_fn_c_check_header_compile ()
2786{
2787  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2788  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2789$as_echo_n "checking for $2... " >&6; }
2790if eval \${$3+:} false; then :
2791  $as_echo_n "(cached) " >&6
2792else
2793  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2794/* end confdefs.h.  */
2795$4
2796#include <$2>
2797_ACEOF
2798if ac_fn_c_try_compile "$LINENO"; then :
2799  eval "$3=yes"
2800else
2801  eval "$3=no"
2802fi
2803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2804fi
2805eval ac_res=\$$3
2806	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2807$as_echo "$ac_res" >&6; }
2808  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2809
2810} # ac_fn_c_check_header_compile
2811cat >config.log <<_ACEOF
2812This file contains any messages produced by compilers while
2813running configure, to aid debugging if configure makes a mistake.
2814
2815It was created by OpenJDK $as_me jdk8, which was
2816generated by GNU Autoconf 2.69.  Invocation command line was
2817
2818  $ $0 $@
2819
2820_ACEOF
2821exec 5>>config.log
2822{
2823cat <<_ASUNAME
2824## --------- ##
2825## Platform. ##
2826## --------- ##
2827
2828hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2829uname -m = `(uname -m) 2>/dev/null || echo unknown`
2830uname -r = `(uname -r) 2>/dev/null || echo unknown`
2831uname -s = `(uname -s) 2>/dev/null || echo unknown`
2832uname -v = `(uname -v) 2>/dev/null || echo unknown`
2833
2834/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2835/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2836
2837/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2838/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2839/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2840/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2841/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2842/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2843/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2844
2845_ASUNAME
2846
2847as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2848for as_dir in $PATH
2849do
2850  IFS=$as_save_IFS
2851  test -z "$as_dir" && as_dir=.
2852    $as_echo "PATH: $as_dir"
2853  done
2854IFS=$as_save_IFS
2855
2856} >&5
2857
2858cat >&5 <<_ACEOF
2859
2860
2861## ----------- ##
2862## Core tests. ##
2863## ----------- ##
2864
2865_ACEOF
2866
2867
2868# Keep a trace of the command line.
2869# Strip out --no-create and --no-recursion so they do not pile up.
2870# Strip out --silent because we don't want to record it for future runs.
2871# Also quote any args containing shell meta-characters.
2872# Make two passes to allow for proper duplicate-argument suppression.
2873ac_configure_args=
2874ac_configure_args0=
2875ac_configure_args1=
2876ac_must_keep_next=false
2877for ac_pass in 1 2
2878do
2879  for ac_arg
2880  do
2881    case $ac_arg in
2882    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2883    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2884    | -silent | --silent | --silen | --sile | --sil)
2885      continue ;;
2886    *\'*)
2887      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2888    esac
2889    case $ac_pass in
2890    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2891    2)
2892      as_fn_append ac_configure_args1 " '$ac_arg'"
2893      if test $ac_must_keep_next = true; then
2894	ac_must_keep_next=false # Got value, back to normal.
2895      else
2896	case $ac_arg in
2897	  *=* | --config-cache | -C | -disable-* | --disable-* \
2898	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2899	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2900	  | -with-* | --with-* | -without-* | --without-* | --x)
2901	    case "$ac_configure_args0 " in
2902	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2903	    esac
2904	    ;;
2905	  -* ) ac_must_keep_next=true ;;
2906	esac
2907      fi
2908      as_fn_append ac_configure_args " '$ac_arg'"
2909      ;;
2910    esac
2911  done
2912done
2913{ ac_configure_args0=; unset ac_configure_args0;}
2914{ ac_configure_args1=; unset ac_configure_args1;}
2915
2916# When interrupted or exit'd, cleanup temporary files, and complete
2917# config.log.  We remove comments because anyway the quotes in there
2918# would cause problems or look ugly.
2919# WARNING: Use '\'' to represent an apostrophe within the trap.
2920# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2921trap 'exit_status=$?
2922  # Save into config.log some information that might help in debugging.
2923  {
2924    echo
2925
2926    $as_echo "## ---------------- ##
2927## Cache variables. ##
2928## ---------------- ##"
2929    echo
2930    # The following way of writing the cache mishandles newlines in values,
2931(
2932  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2933    eval ac_val=\$$ac_var
2934    case $ac_val in #(
2935    *${as_nl}*)
2936      case $ac_var in #(
2937      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2938$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2939      esac
2940      case $ac_var in #(
2941      _ | IFS | as_nl) ;; #(
2942      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2943      *) { eval $ac_var=; unset $ac_var;} ;;
2944      esac ;;
2945    esac
2946  done
2947  (set) 2>&1 |
2948    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2949    *${as_nl}ac_space=\ *)
2950      sed -n \
2951	"s/'\''/'\''\\\\'\'''\''/g;
2952	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2953      ;; #(
2954    *)
2955      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2956      ;;
2957    esac |
2958    sort
2959)
2960    echo
2961
2962    $as_echo "## ----------------- ##
2963## Output variables. ##
2964## ----------------- ##"
2965    echo
2966    for ac_var in $ac_subst_vars
2967    do
2968      eval ac_val=\$$ac_var
2969      case $ac_val in
2970      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2971      esac
2972      $as_echo "$ac_var='\''$ac_val'\''"
2973    done | sort
2974    echo
2975
2976    if test -n "$ac_subst_files"; then
2977      $as_echo "## ------------------- ##
2978## File substitutions. ##
2979## ------------------- ##"
2980      echo
2981      for ac_var in $ac_subst_files
2982      do
2983	eval ac_val=\$$ac_var
2984	case $ac_val in
2985	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2986	esac
2987	$as_echo "$ac_var='\''$ac_val'\''"
2988      done | sort
2989      echo
2990    fi
2991
2992    if test -s confdefs.h; then
2993      $as_echo "## ----------- ##
2994## confdefs.h. ##
2995## ----------- ##"
2996      echo
2997      cat confdefs.h
2998      echo
2999    fi
3000    test "$ac_signal" != 0 &&
3001      $as_echo "$as_me: caught signal $ac_signal"
3002    $as_echo "$as_me: exit $exit_status"
3003  } >&5
3004  rm -f core *.core core.conftest.* &&
3005    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3006    exit $exit_status
3007' 0
3008for ac_signal in 1 2 13 15; do
3009  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3010done
3011ac_signal=0
3012
3013# confdefs.h avoids OS command line length limits that DEFS can exceed.
3014rm -f -r conftest* confdefs.h
3015
3016$as_echo "/* confdefs.h */" > confdefs.h
3017
3018# Predefined preprocessor variables.
3019
3020cat >>confdefs.h <<_ACEOF
3021#define PACKAGE_NAME "$PACKAGE_NAME"
3022_ACEOF
3023
3024cat >>confdefs.h <<_ACEOF
3025#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3026_ACEOF
3027
3028cat >>confdefs.h <<_ACEOF
3029#define PACKAGE_VERSION "$PACKAGE_VERSION"
3030_ACEOF
3031
3032cat >>confdefs.h <<_ACEOF
3033#define PACKAGE_STRING "$PACKAGE_STRING"
3034_ACEOF
3035
3036cat >>confdefs.h <<_ACEOF
3037#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3038_ACEOF
3039
3040cat >>confdefs.h <<_ACEOF
3041#define PACKAGE_URL "$PACKAGE_URL"
3042_ACEOF
3043
3044
3045# Let the site file select an alternate cache file if it wants to.
3046# Prefer an explicitly selected file to automatically selected ones.
3047ac_site_file1=NONE
3048ac_site_file2=NONE
3049if test -n "$CONFIG_SITE"; then
3050  # We do not want a PATH search for config.site.
3051  case $CONFIG_SITE in #((
3052    -*)  ac_site_file1=./$CONFIG_SITE;;
3053    */*) ac_site_file1=$CONFIG_SITE;;
3054    *)   ac_site_file1=./$CONFIG_SITE;;
3055  esac
3056elif test "x$prefix" != xNONE; then
3057  ac_site_file1=$prefix/share/config.site
3058  ac_site_file2=$prefix/etc/config.site
3059else
3060  ac_site_file1=$ac_default_prefix/share/config.site
3061  ac_site_file2=$ac_default_prefix/etc/config.site
3062fi
3063for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3064do
3065  test "x$ac_site_file" = xNONE && continue
3066  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3067    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3068$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3069    sed 's/^/| /' "$ac_site_file" >&5
3070    . "$ac_site_file" \
3071      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3072$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3073as_fn_error $? "failed to load site script $ac_site_file
3074See \`config.log' for more details" "$LINENO" 5; }
3075  fi
3076done
3077
3078if test -r "$cache_file"; then
3079  # Some versions of bash will fail to source /dev/null (special files
3080  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3081  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3082    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3083$as_echo "$as_me: loading cache $cache_file" >&6;}
3084    case $cache_file in
3085      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3086      *)                      . "./$cache_file";;
3087    esac
3088  fi
3089else
3090  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3091$as_echo "$as_me: creating cache $cache_file" >&6;}
3092  >$cache_file
3093fi
3094
3095# Check that the precious variables saved in the cache have kept the same
3096# value.
3097ac_cache_corrupted=false
3098for ac_var in $ac_precious_vars; do
3099  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3100  eval ac_new_set=\$ac_env_${ac_var}_set
3101  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3102  eval ac_new_val=\$ac_env_${ac_var}_value
3103  case $ac_old_set,$ac_new_set in
3104    set,)
3105      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3106$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3107      ac_cache_corrupted=: ;;
3108    ,set)
3109      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3110$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3111      ac_cache_corrupted=: ;;
3112    ,);;
3113    *)
3114      if test "x$ac_old_val" != "x$ac_new_val"; then
3115	# differences in whitespace do not lead to failure.
3116	ac_old_val_w=`echo x $ac_old_val`
3117	ac_new_val_w=`echo x $ac_new_val`
3118	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3119	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3120$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3121	  ac_cache_corrupted=:
3122	else
3123	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3124$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3125	  eval $ac_var=\$ac_old_val
3126	fi
3127	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3128$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3129	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3130$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3131      fi;;
3132  esac
3133  # Pass precious variables to config.status.
3134  if test "$ac_new_set" = set; then
3135    case $ac_new_val in
3136    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3137    *) ac_arg=$ac_var=$ac_new_val ;;
3138    esac
3139    case " $ac_configure_args " in
3140      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3141      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3142    esac
3143  fi
3144done
3145if $ac_cache_corrupted; then
3146  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3148  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3149$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3150  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3151fi
3152## -------------------- ##
3153## Main body of script. ##
3154## -------------------- ##
3155
3156ac_ext=c
3157ac_cpp='$CPP $CPPFLAGS'
3158ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3159ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3160ac_compiler_gnu=$ac_cv_c_compiler_gnu
3161
3162
3163
3164ac_aux_dir=
3165for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3166  if test -f "$ac_dir/install-sh"; then
3167    ac_aux_dir=$ac_dir
3168    ac_install_sh="$ac_aux_dir/install-sh -c"
3169    break
3170  elif test -f "$ac_dir/install.sh"; then
3171    ac_aux_dir=$ac_dir
3172    ac_install_sh="$ac_aux_dir/install.sh -c"
3173    break
3174  elif test -f "$ac_dir/shtool"; then
3175    ac_aux_dir=$ac_dir
3176    ac_install_sh="$ac_aux_dir/shtool install -c"
3177    break
3178  fi
3179done
3180if test -z "$ac_aux_dir"; then
3181  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
3182fi
3183
3184# These three variables are undocumented and unsupported,
3185# and are intended to be withdrawn in a future Autoconf release.
3186# They can cause serious problems if a builder's source tree is in a directory
3187# whose full name contains unusual characters.
3188ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3189ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3190ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3191
3192
3193# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3194
3195#
3196# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3197# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3198#
3199# This code is free software; you can redistribute it and/or modify it
3200# under the terms of the GNU General Public License version 2 only, as
3201# published by the Free Software Foundation.  Oracle designates this
3202# particular file as subject to the "Classpath" exception as provided
3203# by Oracle in the LICENSE file that accompanied this code.
3204#
3205# This code is distributed in the hope that it will be useful, but WITHOUT
3206# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3207# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3208# version 2 for more details (a copy is included in the LICENSE file that
3209# accompanied this code).
3210#
3211# You should have received a copy of the GNU General Public License version
3212# 2 along with this work; if not, write to the Free Software Foundation,
3213# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3214#
3215# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3216# or visit www.oracle.com if you need additional information or have any
3217# questions.
3218#
3219
3220#
3221# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3222#
3223# This program is free software; you can redistribute it and/or modify
3224# it under the terms of the GNU General Public License as published by
3225# the Free Software Foundation; either version 2 of the License, or
3226# (at your option) any later version.
3227#
3228# This program is distributed in the hope that it will be useful, but
3229# WITHOUT ANY WARRANTY; without even the implied warranty of
3230# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3231# General Public License for more details.
3232#
3233# You should have received a copy of the GNU General Public License
3234# along with this program; if not, write to the Free Software
3235# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3236#
3237# As a special exception to the GNU General Public License, if you
3238# distribute this file as part of a program that contains a
3239# configuration script generated by Autoconf, you may include it under
3240# the same distribution terms that you use for the rest of that program.
3241
3242# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3243# ----------------------------------
3244# PKG_PROG_PKG_CONFIG
3245
3246# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3247#
3248# Check to see whether a particular set of modules exists.  Similar
3249# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3250#
3251#
3252# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3253# this or PKG_CHECK_MODULES is called, or make sure to call
3254# PKG_CHECK_EXISTS manually
3255# --------------------------------------------------------------
3256
3257
3258
3259# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3260# ---------------------------------------------
3261# _PKG_CONFIG
3262
3263# _PKG_SHORT_ERRORS_SUPPORTED
3264# -----------------------------
3265# _PKG_SHORT_ERRORS_SUPPORTED
3266
3267
3268# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3269# [ACTION-IF-NOT-FOUND])
3270#
3271#
3272# Note that if there is a possibility the first call to
3273# PKG_CHECK_MODULES might not happen, you should be sure to include an
3274# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3275#
3276#
3277# --------------------------------------------------------------
3278# PKG_CHECK_MODULES
3279
3280
3281# Include these first...
3282#
3283# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3284# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3285#
3286# This code is free software; you can redistribute it and/or modify it
3287# under the terms of the GNU General Public License version 2 only, as
3288# published by the Free Software Foundation.  Oracle designates this
3289# particular file as subject to the "Classpath" exception as provided
3290# by Oracle in the LICENSE file that accompanied this code.
3291#
3292# This code is distributed in the hope that it will be useful, but WITHOUT
3293# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3294# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3295# version 2 for more details (a copy is included in the LICENSE file that
3296# accompanied this code).
3297#
3298# You should have received a copy of the GNU General Public License version
3299# 2 along with this work; if not, write to the Free Software Foundation,
3300# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3301#
3302# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3303# or visit www.oracle.com if you need additional information or have any
3304# questions.
3305#
3306
3307# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3308# If so, then append $1 to $2 \
3309# Also set JVM_ARG_OK to true/false depending on outcome.
3310
3311
3312# Appends a string to a path variable, only adding the : when needed.
3313
3314
3315# This will make sure the given variable points to a full and proper
3316# path. This means:
3317# 1) There will be no spaces in the path. On posix platforms,
3318#    spaces in the path will result in an error. On Windows,
3319#    the path will be rewritten using short-style to be space-free.
3320# 2) The path will be absolute, and it will be in unix-style (on
3321#     cygwin).
3322# $1: The name of the variable to fix
3323
3324
3325# This will make sure the given variable points to a executable
3326# with a full and proper 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# Any arguments given to the executable is preserved.
3333# If the input variable does not have a directory specification, then
3334# it need to be in the PATH.
3335# $1: The name of the variable to fix
3336
3337
3338
3339
3340# Register a --with argument but mark it as deprecated
3341# $1: The name of the with argument to deprecate, not including --with-
3342
3343
3344# Register a --enable argument but mark it as deprecated
3345# $1: The name of the with argument to deprecate, not including --enable-
3346# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3347
3348
3349
3350
3351# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3352# $1: variable to check
3353
3354
3355# Check that there are no unprocessed overridden variables left.
3356# If so, they are an incorrect argument and we will exit with an error.
3357
3358
3359# Setup a tool for the given variable. If correctly specified by the user,
3360# use that value, otherwise search for the tool using the supplied code snippet.
3361# $1: variable to set
3362# $2: code snippet to call to look for the tool
3363
3364
3365# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3366# $1: variable to set
3367# $2: executable name (or list of names) to look for
3368
3369
3370# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3371# $1: variable to set
3372# $2: executable name (or list of names) to look for
3373
3374
3375# Like BASIC_PATH_PROGS but fails if no tool was found.
3376# $1: variable to set
3377# $2: executable name (or list of names) to look for
3378
3379
3380# Like BASIC_SETUP_TOOL but fails if no tool was found.
3381# $1: variable to set
3382# $2: autoconf macro to call to look for the special tool
3383
3384
3385# Setup the most fundamental tools that relies on not much else to set up,
3386# but is used by much of the early bootstrap code.
3387
3388
3389# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3390
3391
3392
3393
3394
3395
3396
3397#%%% Simple tools %%%
3398
3399# Check if we have found a usable version of make
3400# $1: the path to a potential make binary (or empty)
3401# $2: the description on how we found this
3402
3403
3404# Goes looking for a usable version of GNU make.
3405
3406
3407
3408
3409
3410
3411# Check if build directory is on local disk. If not possible to determine,
3412# we prefer to claim it's local.
3413# Argument 1: directory to test
3414# Argument 2: what to do if it is on local disk
3415# Argument 3: what to do otherwise (remote disk or failure)
3416
3417
3418# Check that source files have basic read permissions set. This might
3419# not be the case in cygwin in certain conditions.
3420
3421
3422
3423
3424#
3425# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3426# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3427#
3428# This code is free software; you can redistribute it and/or modify it
3429# under the terms of the GNU General Public License version 2 only, as
3430# published by the Free Software Foundation.  Oracle designates this
3431# particular file as subject to the "Classpath" exception as provided
3432# by Oracle in the LICENSE file that accompanied this code.
3433#
3434# This code is distributed in the hope that it will be useful, but WITHOUT
3435# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3436# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3437# version 2 for more details (a copy is included in the LICENSE file that
3438# accompanied this code).
3439#
3440# You should have received a copy of the GNU General Public License version
3441# 2 along with this work; if not, write to the Free Software Foundation,
3442# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3443#
3444# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3445# or visit www.oracle.com if you need additional information or have any
3446# questions.
3447#
3448
3449
3450
3451
3452
3453# Helper function which possibly converts a path using DOS-style short mode.
3454# If so, the updated path is stored in $new_path.
3455# $1: The path to check
3456
3457
3458# Helper function which possibly converts a path using DOS-style short mode.
3459# If so, the updated path is stored in $new_path.
3460# $1: The path to check
3461
3462
3463# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3464# and could probably be heavily simplified. However, all changes in this
3465# area tend to need lot of testing in different scenarios, and in lack of
3466# proper unit testing, cleaning this up has not been deemed worth the effort
3467# at the moment.
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3478
3479
3480
3481
3482#
3483# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3484# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3485#
3486# This code is free software; you can redistribute it and/or modify it
3487# under the terms of the GNU General Public License version 2 only, as
3488# published by the Free Software Foundation.  Oracle designates this
3489# particular file as subject to the "Classpath" exception as provided
3490# by Oracle in the LICENSE file that accompanied this code.
3491#
3492# This code is distributed in the hope that it will be useful, but WITHOUT
3493# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3494# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3495# version 2 for more details (a copy is included in the LICENSE file that
3496# accompanied this code).
3497#
3498# You should have received a copy of the GNU General Public License version
3499# 2 along with this work; if not, write to the Free Software Foundation,
3500# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3501#
3502# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3503# or visit www.oracle.com if you need additional information or have any
3504# questions.
3505#
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517# ... then the rest
3518#
3519# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3520# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3521#
3522# This code is free software; you can redistribute it and/or modify it
3523# under the terms of the GNU General Public License version 2 only, as
3524# published by the Free Software Foundation.  Oracle designates this
3525# particular file as subject to the "Classpath" exception as provided
3526# by Oracle in the LICENSE file that accompanied this code.
3527#
3528# This code is distributed in the hope that it will be useful, but WITHOUT
3529# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3530# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3531# version 2 for more details (a copy is included in the LICENSE file that
3532# accompanied this code).
3533#
3534# You should have received a copy of the GNU General Public License version
3535# 2 along with this work; if not, write to the Free Software Foundation,
3536# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3537#
3538# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3539# or visit www.oracle.com if you need additional information or have any
3540# questions.
3541#
3542
3543########################################################################
3544# This file handles detection of the Boot JDK. The Boot JDK detection
3545# process has been developed as a response to solve a complex real-world
3546# problem. Initially, it was simple, but it has grown as platform after
3547# platform, idiosyncracy after idiosyncracy has been supported.
3548#
3549# The basic idea is this:
3550# 1) You need an acceptable *) JDK to use as a Boot JDK
3551# 2) There are several ways to locate a JDK, that are mostly platform
3552#    dependent **)
3553# 3) You can have multiple JDKs installed
3554# 4) If possible, configure should try to dig out an acceptable JDK
3555#    automatically, without having to resort to command-line options
3556#
3557# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3558#     javac) and not a JRE, etc.
3559#
3560# **) On Windows we typically use a well-known path.
3561#     On MacOSX we typically use the tool java_home.
3562#     On Linux we typically find javac in the $PATH, and then follow a
3563#     chain of symlinks that often ends up in a real JDK.
3564#
3565# This leads to the code where we check in different ways to locate a
3566# JDK, and if one is found, check if it is acceptable. If not, we print
3567# our reasons for rejecting it (useful when debugging non-working
3568# configure situations) and continue checking the next one.
3569########################################################################
3570
3571# Execute the check given as argument, and verify the result
3572# If the Boot JDK was previously found, do nothing
3573# $1 A command line (typically autoconf macro) to execute
3574
3575
3576# Test: Is bootjdk explicitely set by command line arguments?
3577
3578
3579# Test: Is bootjdk available from builddeps?
3580
3581
3582# Test: Is $JAVA_HOME set?
3583
3584
3585# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3586
3587
3588# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3589# $1: Argument to the java_home binary (optional)
3590
3591
3592# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3593
3594
3595# Look for a jdk in the given path. If there are multiple, try to select the newest.
3596# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3597# $1 = Path to directory containing jdk installations.
3598# $2 = String to append to the found JDK directory to get the proper JDK home
3599
3600
3601# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3602# environmental variable as base for where to look.
3603# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3604
3605
3606# Test: Is there a JDK installed in default, well-known locations?
3607
3608
3609# Check that a command-line tool in the Boot JDK is correct
3610# $1 = name of variable to assign
3611# $2 = name of binary
3612
3613
3614###############################################################################
3615#
3616# We need a Boot JDK to bootstrap the build.
3617#
3618
3619
3620
3621
3622
3623#
3624# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3625# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3626#
3627# This code is free software; you can redistribute it and/or modify it
3628# under the terms of the GNU General Public License version 2 only, as
3629# published by the Free Software Foundation.  Oracle designates this
3630# particular file as subject to the "Classpath" exception as provided
3631# by Oracle in the LICENSE file that accompanied this code.
3632#
3633# This code is distributed in the hope that it will be useful, but WITHOUT
3634# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3635# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3636# version 2 for more details (a copy is included in the LICENSE file that
3637# accompanied this code).
3638#
3639# You should have received a copy of the GNU General Public License version
3640# 2 along with this work; if not, write to the Free Software Foundation,
3641# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3642#
3643# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3644# or visit www.oracle.com if you need additional information or have any
3645# questions.
3646#
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667#
3668# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3669# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3670#
3671# This code is free software; you can redistribute it and/or modify it
3672# under the terms of the GNU General Public License version 2 only, as
3673# published by the Free Software Foundation.  Oracle designates this
3674# particular file as subject to the "Classpath" exception as provided
3675# by Oracle in the LICENSE file that accompanied this code.
3676#
3677# This code is distributed in the hope that it will be useful, but WITHOUT
3678# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3679# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3680# version 2 for more details (a copy is included in the LICENSE file that
3681# accompanied this code).
3682#
3683# You should have received a copy of the GNU General Public License version
3684# 2 along with this work; if not, write to the Free Software Foundation,
3685# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3686#
3687# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3688# or visit www.oracle.com if you need additional information or have any
3689# questions.
3690#
3691
3692
3693
3694
3695
3696# Documentation on common flags used for solstudio in HIGHEST.
3697#
3698# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3699#          done with care, there are some assumptions below that need to
3700#          be understood about the use of pointers, and IEEE behavior.
3701#
3702# -fns: Use non-standard floating point mode (not IEEE 754)
3703# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3704# -fsingle: Use single precision floating point with 'float'
3705# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3706#   (Source with excessing pointer casting and data access with mixed
3707#    pointer types are not recommended)
3708# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3709#   (If you expect perfect errno behavior, do not use this)
3710# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3711# -xrestrict: Pointer parameters to functions do not overlap
3712#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3713#    If you pass in multiple pointers to the same data, do not use this)
3714# -xlibmil: Inline some library routines
3715#   (If you expect perfect errno behavior, do not use this)
3716# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3717#   (If you expect perfect errno behavior, do not use this)
3718#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3719
3720    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3721    # Bug?
3722    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3723    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3724    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3725    #fi
3726
3727
3728
3729
3730
3731
3732# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3733#                                   [RUN-IF-FALSE])
3734# ------------------------------------------------------------
3735# Check that the c and c++ compilers support an argument
3736
3737
3738
3739
3740#
3741# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3742# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3743#
3744# This code is free software; you can redistribute it and/or modify it
3745# under the terms of the GNU General Public License version 2 only, as
3746# published by the Free Software Foundation.  Oracle designates this
3747# particular file as subject to the "Classpath" exception as provided
3748# by Oracle in the LICENSE file that accompanied this code.
3749#
3750# This code is distributed in the hope that it will be useful, but WITHOUT
3751# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3752# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3753# version 2 for more details (a copy is included in the LICENSE file that
3754# accompanied this code).
3755#
3756# You should have received a copy of the GNU General Public License version
3757# 2 along with this work; if not, write to the Free Software Foundation,
3758# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3759#
3760# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3761# or visit www.oracle.com if you need additional information or have any
3762# questions.
3763#
3764
3765
3766
3767
3768
3769cygwin_help() {
3770  case $1 in
3771    unzip)
3772      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3773      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3774      ;;
3775    zip)
3776      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3777      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3778      ;;
3779    make)
3780      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3781      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3782      ;;
3783    freetype)
3784      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3785        HELP_MSG="To install freetype, run:
3786wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3787chmod +x /tmp/freetype-setup.exe
3788/tmp/freetype-setup.exe
3789Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3790After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3791      else
3792        HELP_MSG="You need to build a 64-bit version of freetype.
3793This is not readily available.
3794You can find source code and build instructions on
3795http://www.freetype.org/
3796If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3797      fi
3798      ;;
3799  esac
3800}
3801
3802msys_help() {
3803  PKGHANDLER_COMMAND=""
3804}
3805
3806apt_help() {
3807  case $1 in
3808    devkit)
3809      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3810    openjdk)
3811      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3812    alsa)
3813      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3814    cups)
3815      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3816    freetype)
3817      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3818    pulse)
3819      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3820    x11)
3821      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3822    ccache)
3823      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3824  esac
3825}
3826
3827yum_help() {
3828  case $1 in
3829    devkit)
3830      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3831    openjdk)
3832      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3833    alsa)
3834      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3835    cups)
3836      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3837    freetype)
3838      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3839    pulse)
3840      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3841    x11)
3842      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3843    ccache)
3844      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3845  esac
3846}
3847
3848port_help() {
3849  PKGHANDLER_COMMAND=""
3850}
3851
3852pkgutil_help() {
3853  PKGHANDLER_COMMAND=""
3854}
3855
3856pkgadd_help() {
3857  PKGHANDLER_COMMAND=""
3858}
3859
3860# This function will check if we're called from the "configure" wrapper while
3861# printing --help. If so, we will print out additional information that can
3862# only be extracted within the autoconf script, and then exit. This must be
3863# called at the very beginning in configure.ac.
3864
3865
3866
3867
3868#
3869# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3870# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3871#
3872# This code is free software; you can redistribute it and/or modify it
3873# under the terms of the GNU General Public License version 2 only, as
3874# published by the Free Software Foundation.  Oracle designates this
3875# particular file as subject to the "Classpath" exception as provided
3876# by Oracle in the LICENSE file that accompanied this code.
3877#
3878# This code is distributed in the hope that it will be useful, but WITHOUT
3879# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3880# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3881# version 2 for more details (a copy is included in the LICENSE file that
3882# accompanied this code).
3883#
3884# You should have received a copy of the GNU General Public License version
3885# 2 along with this work; if not, write to the Free Software Foundation,
3886# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3887#
3888# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3889# or visit www.oracle.com if you need additional information or have any
3890# questions.
3891#
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902###############################################################################
3903#
3904# Should we build only OpenJDK even if closed sources are present?
3905#
3906
3907
3908
3909
3910###############################################################################
3911#
3912# Setup version numbers
3913#
3914
3915
3916
3917
3918
3919
3920#
3921# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3922# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3923#
3924# This code is free software; you can redistribute it and/or modify it
3925# under the terms of the GNU General Public License version 2 only, as
3926# published by the Free Software Foundation.  Oracle designates this
3927# particular file as subject to the "Classpath" exception as provided
3928# by Oracle in the LICENSE file that accompanied this code.
3929#
3930# This code is distributed in the hope that it will be useful, but WITHOUT
3931# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3932# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3933# version 2 for more details (a copy is included in the LICENSE file that
3934# accompanied this code).
3935#
3936# You should have received a copy of the GNU General Public License version
3937# 2 along with this work; if not, write to the Free Software Foundation,
3938# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3939#
3940# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3941# or visit www.oracle.com if you need additional information or have any
3942# questions.
3943#
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963#
3964# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3965# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3966#
3967# This code is free software; you can redistribute it and/or modify it
3968# under the terms of the GNU General Public License version 2 only, as
3969# published by the Free Software Foundation.  Oracle designates this
3970# particular file as subject to the "Classpath" exception as provided
3971# by Oracle in the LICENSE file that accompanied this code.
3972#
3973# This code is distributed in the hope that it will be useful, but WITHOUT
3974# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3975# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3976# version 2 for more details (a copy is included in the LICENSE file that
3977# accompanied this code).
3978#
3979# You should have received a copy of the GNU General Public License version
3980# 2 along with this work; if not, write to the Free Software Foundation,
3981# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3982#
3983# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3984# or visit www.oracle.com if you need additional information or have any
3985# questions.
3986#
3987
3988# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3989# Converts autoconf style CPU name to OpenJDK style, into
3990# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
3991
3992
3993# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
3994# Converts autoconf style OS name to OpenJDK style, into
3995# VAR_OS and VAR_OS_API.
3996
3997
3998# Expects $host_os $host_cpu $build_os and $build_cpu
3999# and $with_target_bits to have been setup!
4000#
4001# Translate the standard triplet(quadruplet) definition
4002# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4003# OPENJDK_BUILD_OS, etc.
4004
4005
4006# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4007# accordingly. Must be done after setting up build and target system, but before
4008# doing anything else with these values.
4009
4010
4011# Setup the legacy variables, for controlling the old makefiles.
4012#
4013
4014
4015
4016
4017#%%% Build and target systems %%%
4018
4019
4020
4021
4022# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4023# Add -mX to various FLAGS variables.
4024
4025
4026
4027
4028
4029
4030#
4031# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4032# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4033#
4034# This code is free software; you can redistribute it and/or modify it
4035# under the terms of the GNU General Public License version 2 only, as
4036# published by the Free Software Foundation.  Oracle designates this
4037# particular file as subject to the "Classpath" exception as provided
4038# by Oracle in the LICENSE file that accompanied this code.
4039#
4040# This code is distributed in the hope that it will be useful, but WITHOUT
4041# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4042# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4043# version 2 for more details (a copy is included in the LICENSE file that
4044# accompanied this code).
4045#
4046# You should have received a copy of the GNU General Public License version
4047# 2 along with this work; if not, write to the Free Software Foundation,
4048# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4049#
4050# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4051# or visit www.oracle.com if you need additional information or have any
4052# questions.
4053#
4054
4055
4056
4057
4058
4059
4060
4061
4062#
4063# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4064# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4065#
4066# This code is free software; you can redistribute it and/or modify it
4067# under the terms of the GNU General Public License version 2 only, as
4068# published by the Free Software Foundation.  Oracle designates this
4069# particular file as subject to the "Classpath" exception as provided
4070# by Oracle in the LICENSE file that accompanied this code.
4071#
4072# This code is distributed in the hope that it will be useful, but WITHOUT
4073# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4074# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4075# version 2 for more details (a copy is included in the LICENSE file that
4076# accompanied this code).
4077#
4078# You should have received a copy of the GNU General Public License version
4079# 2 along with this work; if not, write to the Free Software Foundation,
4080# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4081#
4082# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4083# or visit www.oracle.com if you need additional information or have any
4084# questions.
4085#
4086
4087########################################################################
4088# This file is responsible for detecting, verifying and setting up the
4089# toolchain, i.e. the compiler, linker and related utilities. It will setup
4090# proper paths to the binaries, but it will not setup any flags.
4091#
4092# The binaries used is determined by the toolchain type, which is the family of
4093# compilers and related tools that are used.
4094########################################################################
4095
4096
4097# All valid toolchains, regardless of platform (used by help.m4)
4098VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4099
4100# These toolchains are valid on different platforms
4101VALID_TOOLCHAINS_linux="gcc clang"
4102VALID_TOOLCHAINS_solaris="solstudio"
4103VALID_TOOLCHAINS_macosx="gcc clang"
4104VALID_TOOLCHAINS_aix="xlc"
4105VALID_TOOLCHAINS_windows="microsoft"
4106
4107# Toolchain descriptions
4108TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4109TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4110TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4111TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4112TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4113
4114# Setup a number of variables describing how native output files are
4115# named on this platform/toolchain.
4116
4117
4118# Determine which toolchain type to use, and make sure it is valid for this
4119# platform. Setup various information about the selected toolchain.
4120
4121
4122# Before we start detecting the toolchain executables, we might need some
4123# special setup, e.g. additional paths etc.
4124
4125
4126# Restore path, etc
4127
4128
4129# Check if a compiler is of the toolchain type we expect, and save the version
4130# information from it. If the compiler does not match the expected type,
4131# this function will abort using AC_MSG_ERROR. If it matches, the version will
4132# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4133# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4134#
4135# $1 = compiler to test (CC or CXX)
4136# $2 = human readable name of compiler (C or C++)
4137
4138
4139# Try to locate the given C or C++ compiler in the path, or otherwise.
4140#
4141# $1 = compiler to test (CC or CXX)
4142# $2 = human readable name of compiler (C or C++)
4143# $3 = list of compiler names to search for
4144
4145
4146# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4147# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4148# archiver (AR). Verify that the compilers are correct according to the
4149# toolchain type.
4150
4151
4152# Setup additional tools that is considered a part of the toolchain, but not the
4153# core part. Many of these are highly platform-specific and do not exist,
4154# and/or are not needed on all platforms.
4155
4156
4157# Setup the build tools (i.e, the compiler and linker used to build programs
4158# that should be run on the build platform, not the target platform, as a build
4159# helper). Since the non-cross-compile case uses the normal, target compilers
4160# for this, we can only do this after these have been setup.
4161
4162
4163# Setup legacy variables that are still needed as alternative ways to refer to
4164# parts of the toolchain.
4165
4166
4167# Do some additional checks on the detected tools.
4168
4169
4170# Setup the JTReg Regression Test Harness.
4171
4172
4173#
4174# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4175# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4176#
4177# This code is free software; you can redistribute it and/or modify it
4178# under the terms of the GNU General Public License version 2 only, as
4179# published by the Free Software Foundation.  Oracle designates this
4180# particular file as subject to the "Classpath" exception as provided
4181# by Oracle in the LICENSE file that accompanied this code.
4182#
4183# This code is distributed in the hope that it will be useful, but WITHOUT
4184# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4185# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4186# version 2 for more details (a copy is included in the LICENSE file that
4187# accompanied this code).
4188#
4189# You should have received a copy of the GNU General Public License version
4190# 2 along with this work; if not, write to the Free Software Foundation,
4191# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4192#
4193# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4194# or visit www.oracle.com if you need additional information or have any
4195# questions.
4196#
4197
4198
4199
4200
4201
4202
4203
4204# Check if the VS env variables were setup prior to running configure.
4205# If not, then find vcvarsall.bat and run it automatically, and integrate
4206# the set env variables into the spec file.
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217# This line needs to be here, verbatim, after all includes and the dummy hook
4218# definitions. It is replaced with custom functionality when building
4219# custom sources.
4220#CUSTOM_AUTOCONF_INCLUDE
4221
4222# Do not change or remove the following line, it is needed for consistency checks:
4223DATE_WHEN_GENERATED=1393490405
4224
4225###############################################################################
4226#
4227# Initialization / Boot-strapping
4228#
4229# The bootstrapping process needs to solve the "chicken or the egg" problem,
4230# thus it jumps back and forth, each time gaining something needed later on.
4231#
4232###############################################################################
4233
4234# If we are requested to print additional help, do that and then exit.
4235# This must be the very first call.
4236
4237  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4238    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4239    $PRINTF "Which are valid to use depends on the build platform.\n"
4240    for toolchain in $VALID_TOOLCHAINS_all; do
4241      # Use indirect variable referencing
4242      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4243      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4244      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4245    done
4246
4247    # And now exit directly
4248    exit 0
4249  fi
4250
4251
4252# Basic initialization that must happen first of all in the normal process.
4253
4254  # Save the original command line. This is passed to us by the wrapper configure script.
4255
4256  DATE_WHEN_CONFIGURED=`LANG=C date`
4257
4258  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4259$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4260  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4261$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4262
4263
4264  # Start with tools that do not need have cross compilation support
4265  # and can be expected to be found in the default PATH. These tools are
4266  # used by configure. Nor are these tools expected to be found in the
4267  # devkit from the builddeps server either, since they are
4268  # needed to download the devkit.
4269
4270  # First are all the simple required tools.
4271
4272
4273
4274  # Publish this variable in the help.
4275
4276
4277  if test "x$BASENAME" = x; then
4278    # The variable is not set by user, try to locate tool using the code snippet
4279    for ac_prog in basename
4280do
4281  # Extract the first word of "$ac_prog", so it can be a program name with args.
4282set dummy $ac_prog; ac_word=$2
4283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4284$as_echo_n "checking for $ac_word... " >&6; }
4285if ${ac_cv_path_BASENAME+:} false; then :
4286  $as_echo_n "(cached) " >&6
4287else
4288  case $BASENAME in
4289  [\\/]* | ?:[\\/]*)
4290  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4291  ;;
4292  *)
4293  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4294for as_dir in $PATH
4295do
4296  IFS=$as_save_IFS
4297  test -z "$as_dir" && as_dir=.
4298    for ac_exec_ext in '' $ac_executable_extensions; do
4299  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4300    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4301    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4302    break 2
4303  fi
4304done
4305  done
4306IFS=$as_save_IFS
4307
4308  ;;
4309esac
4310fi
4311BASENAME=$ac_cv_path_BASENAME
4312if test -n "$BASENAME"; then
4313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4314$as_echo "$BASENAME" >&6; }
4315else
4316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4317$as_echo "no" >&6; }
4318fi
4319
4320
4321  test -n "$BASENAME" && break
4322done
4323
4324  else
4325    # The variable is set, but is it from the command line or the environment?
4326
4327    # Try to remove the string !BASENAME! from our list.
4328    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4329    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4330      # If it failed, the variable was not from the command line. Ignore it,
4331      # but warn the user (except for BASH, which is always set by the calling BASH).
4332      if test "xBASENAME" != xBASH; then
4333        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4334$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4335      fi
4336      # Try to locate tool using the code snippet
4337      for ac_prog in basename
4338do
4339  # Extract the first word of "$ac_prog", so it can be a program name with args.
4340set dummy $ac_prog; ac_word=$2
4341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4342$as_echo_n "checking for $ac_word... " >&6; }
4343if ${ac_cv_path_BASENAME+:} false; then :
4344  $as_echo_n "(cached) " >&6
4345else
4346  case $BASENAME in
4347  [\\/]* | ?:[\\/]*)
4348  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4349  ;;
4350  *)
4351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4352for as_dir in $PATH
4353do
4354  IFS=$as_save_IFS
4355  test -z "$as_dir" && as_dir=.
4356    for ac_exec_ext in '' $ac_executable_extensions; do
4357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4358    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4360    break 2
4361  fi
4362done
4363  done
4364IFS=$as_save_IFS
4365
4366  ;;
4367esac
4368fi
4369BASENAME=$ac_cv_path_BASENAME
4370if test -n "$BASENAME"; then
4371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4372$as_echo "$BASENAME" >&6; }
4373else
4374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4375$as_echo "no" >&6; }
4376fi
4377
4378
4379  test -n "$BASENAME" && break
4380done
4381
4382    else
4383      # If it succeeded, then it was overridden by the user. We will use it
4384      # for the tool.
4385
4386      # First remove it from the list of overridden variables, so we can test
4387      # for unknown variables in the end.
4388      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4389
4390      # Check if the provided tool contains a complete path.
4391      tool_specified="$BASENAME"
4392      tool_basename="${tool_specified##*/}"
4393      if test "x$tool_basename" = "x$tool_specified"; then
4394        # A command without a complete path is provided, search $PATH.
4395        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4396$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4397        # Extract the first word of "$tool_basename", so it can be a program name with args.
4398set dummy $tool_basename; ac_word=$2
4399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4400$as_echo_n "checking for $ac_word... " >&6; }
4401if ${ac_cv_path_BASENAME+:} false; then :
4402  $as_echo_n "(cached) " >&6
4403else
4404  case $BASENAME in
4405  [\\/]* | ?:[\\/]*)
4406  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4407  ;;
4408  *)
4409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4410for as_dir in $PATH
4411do
4412  IFS=$as_save_IFS
4413  test -z "$as_dir" && as_dir=.
4414    for ac_exec_ext in '' $ac_executable_extensions; do
4415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4416    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4418    break 2
4419  fi
4420done
4421  done
4422IFS=$as_save_IFS
4423
4424  ;;
4425esac
4426fi
4427BASENAME=$ac_cv_path_BASENAME
4428if test -n "$BASENAME"; then
4429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4430$as_echo "$BASENAME" >&6; }
4431else
4432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4433$as_echo "no" >&6; }
4434fi
4435
4436
4437        if test "x$BASENAME" = x; then
4438          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4439        fi
4440      else
4441        # Otherwise we believe it is a complete path. Use it as it is.
4442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4443$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4444        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4445$as_echo_n "checking for BASENAME... " >&6; }
4446        if test ! -x "$tool_specified"; then
4447          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4448$as_echo "not found" >&6; }
4449          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4450        fi
4451        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4452$as_echo "$tool_specified" >&6; }
4453      fi
4454    fi
4455  fi
4456
4457
4458
4459  if test "x$BASENAME" = x; then
4460    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4461  fi
4462
4463
4464
4465
4466
4467  # Publish this variable in the help.
4468
4469
4470  if test "x$BASH" = x; then
4471    # The variable is not set by user, try to locate tool using the code snippet
4472    for ac_prog in bash
4473do
4474  # Extract the first word of "$ac_prog", so it can be a program name with args.
4475set dummy $ac_prog; ac_word=$2
4476{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4477$as_echo_n "checking for $ac_word... " >&6; }
4478if ${ac_cv_path_BASH+:} false; then :
4479  $as_echo_n "(cached) " >&6
4480else
4481  case $BASH in
4482  [\\/]* | ?:[\\/]*)
4483  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4484  ;;
4485  *)
4486  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4487for as_dir in $PATH
4488do
4489  IFS=$as_save_IFS
4490  test -z "$as_dir" && as_dir=.
4491    for ac_exec_ext in '' $ac_executable_extensions; do
4492  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4493    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4494    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4495    break 2
4496  fi
4497done
4498  done
4499IFS=$as_save_IFS
4500
4501  ;;
4502esac
4503fi
4504BASH=$ac_cv_path_BASH
4505if test -n "$BASH"; then
4506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4507$as_echo "$BASH" >&6; }
4508else
4509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4510$as_echo "no" >&6; }
4511fi
4512
4513
4514  test -n "$BASH" && break
4515done
4516
4517  else
4518    # The variable is set, but is it from the command line or the environment?
4519
4520    # Try to remove the string !BASH! from our list.
4521    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4522    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4523      # If it failed, the variable was not from the command line. Ignore it,
4524      # but warn the user (except for BASH, which is always set by the calling BASH).
4525      if test "xBASH" != xBASH; then
4526        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4527$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4528      fi
4529      # Try to locate tool using the code snippet
4530      for ac_prog in bash
4531do
4532  # Extract the first word of "$ac_prog", so it can be a program name with args.
4533set dummy $ac_prog; ac_word=$2
4534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4535$as_echo_n "checking for $ac_word... " >&6; }
4536if ${ac_cv_path_BASH+:} false; then :
4537  $as_echo_n "(cached) " >&6
4538else
4539  case $BASH in
4540  [\\/]* | ?:[\\/]*)
4541  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4542  ;;
4543  *)
4544  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4545for as_dir in $PATH
4546do
4547  IFS=$as_save_IFS
4548  test -z "$as_dir" && as_dir=.
4549    for ac_exec_ext in '' $ac_executable_extensions; do
4550  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4551    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4552    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4553    break 2
4554  fi
4555done
4556  done
4557IFS=$as_save_IFS
4558
4559  ;;
4560esac
4561fi
4562BASH=$ac_cv_path_BASH
4563if test -n "$BASH"; then
4564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4565$as_echo "$BASH" >&6; }
4566else
4567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4568$as_echo "no" >&6; }
4569fi
4570
4571
4572  test -n "$BASH" && break
4573done
4574
4575    else
4576      # If it succeeded, then it was overridden by the user. We will use it
4577      # for the tool.
4578
4579      # First remove it from the list of overridden variables, so we can test
4580      # for unknown variables in the end.
4581      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4582
4583      # Check if the provided tool contains a complete path.
4584      tool_specified="$BASH"
4585      tool_basename="${tool_specified##*/}"
4586      if test "x$tool_basename" = "x$tool_specified"; then
4587        # A command without a complete path is provided, search $PATH.
4588        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4589$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4590        # Extract the first word of "$tool_basename", so it can be a program name with args.
4591set dummy $tool_basename; ac_word=$2
4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4593$as_echo_n "checking for $ac_word... " >&6; }
4594if ${ac_cv_path_BASH+:} false; then :
4595  $as_echo_n "(cached) " >&6
4596else
4597  case $BASH in
4598  [\\/]* | ?:[\\/]*)
4599  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4600  ;;
4601  *)
4602  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4603for as_dir in $PATH
4604do
4605  IFS=$as_save_IFS
4606  test -z "$as_dir" && as_dir=.
4607    for ac_exec_ext in '' $ac_executable_extensions; do
4608  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4609    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4610    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4611    break 2
4612  fi
4613done
4614  done
4615IFS=$as_save_IFS
4616
4617  ;;
4618esac
4619fi
4620BASH=$ac_cv_path_BASH
4621if test -n "$BASH"; then
4622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4623$as_echo "$BASH" >&6; }
4624else
4625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4626$as_echo "no" >&6; }
4627fi
4628
4629
4630        if test "x$BASH" = x; then
4631          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4632        fi
4633      else
4634        # Otherwise we believe it is a complete path. Use it as it is.
4635        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4636$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4637        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4638$as_echo_n "checking for BASH... " >&6; }
4639        if test ! -x "$tool_specified"; then
4640          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4641$as_echo "not found" >&6; }
4642          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4643        fi
4644        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4645$as_echo "$tool_specified" >&6; }
4646      fi
4647    fi
4648  fi
4649
4650
4651
4652  if test "x$BASH" = x; then
4653    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4654  fi
4655
4656
4657
4658
4659
4660  # Publish this variable in the help.
4661
4662
4663  if test "x$CAT" = x; then
4664    # The variable is not set by user, try to locate tool using the code snippet
4665    for ac_prog in cat
4666do
4667  # Extract the first word of "$ac_prog", so it can be a program name with args.
4668set dummy $ac_prog; ac_word=$2
4669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4670$as_echo_n "checking for $ac_word... " >&6; }
4671if ${ac_cv_path_CAT+:} false; then :
4672  $as_echo_n "(cached) " >&6
4673else
4674  case $CAT in
4675  [\\/]* | ?:[\\/]*)
4676  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4677  ;;
4678  *)
4679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4680for as_dir in $PATH
4681do
4682  IFS=$as_save_IFS
4683  test -z "$as_dir" && as_dir=.
4684    for ac_exec_ext in '' $ac_executable_extensions; do
4685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4686    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4688    break 2
4689  fi
4690done
4691  done
4692IFS=$as_save_IFS
4693
4694  ;;
4695esac
4696fi
4697CAT=$ac_cv_path_CAT
4698if test -n "$CAT"; then
4699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4700$as_echo "$CAT" >&6; }
4701else
4702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4703$as_echo "no" >&6; }
4704fi
4705
4706
4707  test -n "$CAT" && break
4708done
4709
4710  else
4711    # The variable is set, but is it from the command line or the environment?
4712
4713    # Try to remove the string !CAT! from our list.
4714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4716      # If it failed, the variable was not from the command line. Ignore it,
4717      # but warn the user (except for BASH, which is always set by the calling BASH).
4718      if test "xCAT" != xBASH; then
4719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4720$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4721      fi
4722      # Try to locate tool using the code snippet
4723      for ac_prog in cat
4724do
4725  # Extract the first word of "$ac_prog", so it can be a program name with args.
4726set dummy $ac_prog; ac_word=$2
4727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4728$as_echo_n "checking for $ac_word... " >&6; }
4729if ${ac_cv_path_CAT+:} false; then :
4730  $as_echo_n "(cached) " >&6
4731else
4732  case $CAT in
4733  [\\/]* | ?:[\\/]*)
4734  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4735  ;;
4736  *)
4737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4738for as_dir in $PATH
4739do
4740  IFS=$as_save_IFS
4741  test -z "$as_dir" && as_dir=.
4742    for ac_exec_ext in '' $ac_executable_extensions; do
4743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4744    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4746    break 2
4747  fi
4748done
4749  done
4750IFS=$as_save_IFS
4751
4752  ;;
4753esac
4754fi
4755CAT=$ac_cv_path_CAT
4756if test -n "$CAT"; then
4757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4758$as_echo "$CAT" >&6; }
4759else
4760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4761$as_echo "no" >&6; }
4762fi
4763
4764
4765  test -n "$CAT" && break
4766done
4767
4768    else
4769      # If it succeeded, then it was overridden by the user. We will use it
4770      # for the tool.
4771
4772      # First remove it from the list of overridden variables, so we can test
4773      # for unknown variables in the end.
4774      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4775
4776      # Check if the provided tool contains a complete path.
4777      tool_specified="$CAT"
4778      tool_basename="${tool_specified##*/}"
4779      if test "x$tool_basename" = "x$tool_specified"; then
4780        # A command without a complete path is provided, search $PATH.
4781        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4782$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4783        # Extract the first word of "$tool_basename", so it can be a program name with args.
4784set dummy $tool_basename; ac_word=$2
4785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4786$as_echo_n "checking for $ac_word... " >&6; }
4787if ${ac_cv_path_CAT+:} false; then :
4788  $as_echo_n "(cached) " >&6
4789else
4790  case $CAT in
4791  [\\/]* | ?:[\\/]*)
4792  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4793  ;;
4794  *)
4795  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4796for as_dir in $PATH
4797do
4798  IFS=$as_save_IFS
4799  test -z "$as_dir" && as_dir=.
4800    for ac_exec_ext in '' $ac_executable_extensions; do
4801  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4802    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4803    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4804    break 2
4805  fi
4806done
4807  done
4808IFS=$as_save_IFS
4809
4810  ;;
4811esac
4812fi
4813CAT=$ac_cv_path_CAT
4814if test -n "$CAT"; then
4815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4816$as_echo "$CAT" >&6; }
4817else
4818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4819$as_echo "no" >&6; }
4820fi
4821
4822
4823        if test "x$CAT" = x; then
4824          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4825        fi
4826      else
4827        # Otherwise we believe it is a complete path. Use it as it is.
4828        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4829$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4830        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4831$as_echo_n "checking for CAT... " >&6; }
4832        if test ! -x "$tool_specified"; then
4833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4834$as_echo "not found" >&6; }
4835          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4836        fi
4837        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4838$as_echo "$tool_specified" >&6; }
4839      fi
4840    fi
4841  fi
4842
4843
4844
4845  if test "x$CAT" = x; then
4846    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4847  fi
4848
4849
4850
4851
4852
4853  # Publish this variable in the help.
4854
4855
4856  if test "x$CHMOD" = x; then
4857    # The variable is not set by user, try to locate tool using the code snippet
4858    for ac_prog in chmod
4859do
4860  # Extract the first word of "$ac_prog", so it can be a program name with args.
4861set dummy $ac_prog; ac_word=$2
4862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4863$as_echo_n "checking for $ac_word... " >&6; }
4864if ${ac_cv_path_CHMOD+:} false; then :
4865  $as_echo_n "(cached) " >&6
4866else
4867  case $CHMOD in
4868  [\\/]* | ?:[\\/]*)
4869  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4870  ;;
4871  *)
4872  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4873for as_dir in $PATH
4874do
4875  IFS=$as_save_IFS
4876  test -z "$as_dir" && as_dir=.
4877    for ac_exec_ext in '' $ac_executable_extensions; do
4878  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4879    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4880    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4881    break 2
4882  fi
4883done
4884  done
4885IFS=$as_save_IFS
4886
4887  ;;
4888esac
4889fi
4890CHMOD=$ac_cv_path_CHMOD
4891if test -n "$CHMOD"; then
4892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4893$as_echo "$CHMOD" >&6; }
4894else
4895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4896$as_echo "no" >&6; }
4897fi
4898
4899
4900  test -n "$CHMOD" && break
4901done
4902
4903  else
4904    # The variable is set, but is it from the command line or the environment?
4905
4906    # Try to remove the string !CHMOD! from our list.
4907    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4908    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4909      # If it failed, the variable was not from the command line. Ignore it,
4910      # but warn the user (except for BASH, which is always set by the calling BASH).
4911      if test "xCHMOD" != xBASH; then
4912        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
4913$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
4914      fi
4915      # Try to locate tool using the code snippet
4916      for ac_prog in chmod
4917do
4918  # Extract the first word of "$ac_prog", so it can be a program name with args.
4919set dummy $ac_prog; ac_word=$2
4920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4921$as_echo_n "checking for $ac_word... " >&6; }
4922if ${ac_cv_path_CHMOD+:} false; then :
4923  $as_echo_n "(cached) " >&6
4924else
4925  case $CHMOD in
4926  [\\/]* | ?:[\\/]*)
4927  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4928  ;;
4929  *)
4930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4931for as_dir in $PATH
4932do
4933  IFS=$as_save_IFS
4934  test -z "$as_dir" && as_dir=.
4935    for ac_exec_ext in '' $ac_executable_extensions; do
4936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4937    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4939    break 2
4940  fi
4941done
4942  done
4943IFS=$as_save_IFS
4944
4945  ;;
4946esac
4947fi
4948CHMOD=$ac_cv_path_CHMOD
4949if test -n "$CHMOD"; then
4950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4951$as_echo "$CHMOD" >&6; }
4952else
4953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4954$as_echo "no" >&6; }
4955fi
4956
4957
4958  test -n "$CHMOD" && break
4959done
4960
4961    else
4962      # If it succeeded, then it was overridden by the user. We will use it
4963      # for the tool.
4964
4965      # First remove it from the list of overridden variables, so we can test
4966      # for unknown variables in the end.
4967      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4968
4969      # Check if the provided tool contains a complete path.
4970      tool_specified="$CHMOD"
4971      tool_basename="${tool_specified##*/}"
4972      if test "x$tool_basename" = "x$tool_specified"; then
4973        # A command without a complete path is provided, search $PATH.
4974        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
4975$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
4976        # Extract the first word of "$tool_basename", so it can be a program name with args.
4977set dummy $tool_basename; ac_word=$2
4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979$as_echo_n "checking for $ac_word... " >&6; }
4980if ${ac_cv_path_CHMOD+:} false; then :
4981  $as_echo_n "(cached) " >&6
4982else
4983  case $CHMOD in
4984  [\\/]* | ?:[\\/]*)
4985  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4986  ;;
4987  *)
4988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989for as_dir in $PATH
4990do
4991  IFS=$as_save_IFS
4992  test -z "$as_dir" && as_dir=.
4993    for ac_exec_ext in '' $ac_executable_extensions; do
4994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4995    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997    break 2
4998  fi
4999done
5000  done
5001IFS=$as_save_IFS
5002
5003  ;;
5004esac
5005fi
5006CHMOD=$ac_cv_path_CHMOD
5007if test -n "$CHMOD"; then
5008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5009$as_echo "$CHMOD" >&6; }
5010else
5011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012$as_echo "no" >&6; }
5013fi
5014
5015
5016        if test "x$CHMOD" = x; then
5017          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5018        fi
5019      else
5020        # Otherwise we believe it is a complete path. Use it as it is.
5021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5022$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5023        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5024$as_echo_n "checking for CHMOD... " >&6; }
5025        if test ! -x "$tool_specified"; then
5026          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5027$as_echo "not found" >&6; }
5028          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5029        fi
5030        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5031$as_echo "$tool_specified" >&6; }
5032      fi
5033    fi
5034  fi
5035
5036
5037
5038  if test "x$CHMOD" = x; then
5039    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5040  fi
5041
5042
5043
5044
5045
5046  # Publish this variable in the help.
5047
5048
5049  if test "x$CMP" = x; then
5050    # The variable is not set by user, try to locate tool using the code snippet
5051    for ac_prog in cmp
5052do
5053  # Extract the first word of "$ac_prog", so it can be a program name with args.
5054set dummy $ac_prog; ac_word=$2
5055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5056$as_echo_n "checking for $ac_word... " >&6; }
5057if ${ac_cv_path_CMP+:} false; then :
5058  $as_echo_n "(cached) " >&6
5059else
5060  case $CMP in
5061  [\\/]* | ?:[\\/]*)
5062  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5063  ;;
5064  *)
5065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066for as_dir in $PATH
5067do
5068  IFS=$as_save_IFS
5069  test -z "$as_dir" && as_dir=.
5070    for ac_exec_ext in '' $ac_executable_extensions; do
5071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5072    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5074    break 2
5075  fi
5076done
5077  done
5078IFS=$as_save_IFS
5079
5080  ;;
5081esac
5082fi
5083CMP=$ac_cv_path_CMP
5084if test -n "$CMP"; then
5085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5086$as_echo "$CMP" >&6; }
5087else
5088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5089$as_echo "no" >&6; }
5090fi
5091
5092
5093  test -n "$CMP" && break
5094done
5095
5096  else
5097    # The variable is set, but is it from the command line or the environment?
5098
5099    # Try to remove the string !CMP! from our list.
5100    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5101    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5102      # If it failed, the variable was not from the command line. Ignore it,
5103      # but warn the user (except for BASH, which is always set by the calling BASH).
5104      if test "xCMP" != xBASH; then
5105        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5106$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5107      fi
5108      # Try to locate tool using the code snippet
5109      for ac_prog in cmp
5110do
5111  # Extract the first word of "$ac_prog", so it can be a program name with args.
5112set dummy $ac_prog; ac_word=$2
5113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114$as_echo_n "checking for $ac_word... " >&6; }
5115if ${ac_cv_path_CMP+:} false; then :
5116  $as_echo_n "(cached) " >&6
5117else
5118  case $CMP in
5119  [\\/]* | ?:[\\/]*)
5120  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5121  ;;
5122  *)
5123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124for as_dir in $PATH
5125do
5126  IFS=$as_save_IFS
5127  test -z "$as_dir" && as_dir=.
5128    for ac_exec_ext in '' $ac_executable_extensions; do
5129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5130    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5132    break 2
5133  fi
5134done
5135  done
5136IFS=$as_save_IFS
5137
5138  ;;
5139esac
5140fi
5141CMP=$ac_cv_path_CMP
5142if test -n "$CMP"; then
5143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5144$as_echo "$CMP" >&6; }
5145else
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147$as_echo "no" >&6; }
5148fi
5149
5150
5151  test -n "$CMP" && break
5152done
5153
5154    else
5155      # If it succeeded, then it was overridden by the user. We will use it
5156      # for the tool.
5157
5158      # First remove it from the list of overridden variables, so we can test
5159      # for unknown variables in the end.
5160      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5161
5162      # Check if the provided tool contains a complete path.
5163      tool_specified="$CMP"
5164      tool_basename="${tool_specified##*/}"
5165      if test "x$tool_basename" = "x$tool_specified"; then
5166        # A command without a complete path is provided, search $PATH.
5167        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5168$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5169        # Extract the first word of "$tool_basename", so it can be a program name with args.
5170set dummy $tool_basename; ac_word=$2
5171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5172$as_echo_n "checking for $ac_word... " >&6; }
5173if ${ac_cv_path_CMP+:} false; then :
5174  $as_echo_n "(cached) " >&6
5175else
5176  case $CMP in
5177  [\\/]* | ?:[\\/]*)
5178  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5179  ;;
5180  *)
5181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5182for as_dir in $PATH
5183do
5184  IFS=$as_save_IFS
5185  test -z "$as_dir" && as_dir=.
5186    for ac_exec_ext in '' $ac_executable_extensions; do
5187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5188    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5190    break 2
5191  fi
5192done
5193  done
5194IFS=$as_save_IFS
5195
5196  ;;
5197esac
5198fi
5199CMP=$ac_cv_path_CMP
5200if test -n "$CMP"; then
5201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5202$as_echo "$CMP" >&6; }
5203else
5204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5205$as_echo "no" >&6; }
5206fi
5207
5208
5209        if test "x$CMP" = x; then
5210          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5211        fi
5212      else
5213        # Otherwise we believe it is a complete path. Use it as it is.
5214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5215$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5217$as_echo_n "checking for CMP... " >&6; }
5218        if test ! -x "$tool_specified"; then
5219          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5220$as_echo "not found" >&6; }
5221          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5222        fi
5223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5224$as_echo "$tool_specified" >&6; }
5225      fi
5226    fi
5227  fi
5228
5229
5230
5231  if test "x$CMP" = x; then
5232    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5233  fi
5234
5235
5236
5237
5238
5239  # Publish this variable in the help.
5240
5241
5242  if test "x$COMM" = x; then
5243    # The variable is not set by user, try to locate tool using the code snippet
5244    for ac_prog in comm
5245do
5246  # Extract the first word of "$ac_prog", so it can be a program name with args.
5247set dummy $ac_prog; ac_word=$2
5248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5249$as_echo_n "checking for $ac_word... " >&6; }
5250if ${ac_cv_path_COMM+:} false; then :
5251  $as_echo_n "(cached) " >&6
5252else
5253  case $COMM in
5254  [\\/]* | ?:[\\/]*)
5255  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5256  ;;
5257  *)
5258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5259for as_dir in $PATH
5260do
5261  IFS=$as_save_IFS
5262  test -z "$as_dir" && as_dir=.
5263    for ac_exec_ext in '' $ac_executable_extensions; do
5264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5265    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5267    break 2
5268  fi
5269done
5270  done
5271IFS=$as_save_IFS
5272
5273  ;;
5274esac
5275fi
5276COMM=$ac_cv_path_COMM
5277if test -n "$COMM"; then
5278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5279$as_echo "$COMM" >&6; }
5280else
5281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5282$as_echo "no" >&6; }
5283fi
5284
5285
5286  test -n "$COMM" && break
5287done
5288
5289  else
5290    # The variable is set, but is it from the command line or the environment?
5291
5292    # Try to remove the string !COMM! from our list.
5293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5295      # If it failed, the variable was not from the command line. Ignore it,
5296      # but warn the user (except for BASH, which is always set by the calling BASH).
5297      if test "xCOMM" != xBASH; then
5298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5299$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5300      fi
5301      # Try to locate tool using the code snippet
5302      for ac_prog in comm
5303do
5304  # Extract the first word of "$ac_prog", so it can be a program name with args.
5305set dummy $ac_prog; ac_word=$2
5306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5307$as_echo_n "checking for $ac_word... " >&6; }
5308if ${ac_cv_path_COMM+:} false; then :
5309  $as_echo_n "(cached) " >&6
5310else
5311  case $COMM in
5312  [\\/]* | ?:[\\/]*)
5313  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5314  ;;
5315  *)
5316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5317for as_dir in $PATH
5318do
5319  IFS=$as_save_IFS
5320  test -z "$as_dir" && as_dir=.
5321    for ac_exec_ext in '' $ac_executable_extensions; do
5322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5323    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5325    break 2
5326  fi
5327done
5328  done
5329IFS=$as_save_IFS
5330
5331  ;;
5332esac
5333fi
5334COMM=$ac_cv_path_COMM
5335if test -n "$COMM"; then
5336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5337$as_echo "$COMM" >&6; }
5338else
5339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5340$as_echo "no" >&6; }
5341fi
5342
5343
5344  test -n "$COMM" && break
5345done
5346
5347    else
5348      # If it succeeded, then it was overridden by the user. We will use it
5349      # for the tool.
5350
5351      # First remove it from the list of overridden variables, so we can test
5352      # for unknown variables in the end.
5353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5354
5355      # Check if the provided tool contains a complete path.
5356      tool_specified="$COMM"
5357      tool_basename="${tool_specified##*/}"
5358      if test "x$tool_basename" = "x$tool_specified"; then
5359        # A command without a complete path is provided, search $PATH.
5360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5361$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5362        # Extract the first word of "$tool_basename", so it can be a program name with args.
5363set dummy $tool_basename; ac_word=$2
5364{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5365$as_echo_n "checking for $ac_word... " >&6; }
5366if ${ac_cv_path_COMM+:} false; then :
5367  $as_echo_n "(cached) " >&6
5368else
5369  case $COMM in
5370  [\\/]* | ?:[\\/]*)
5371  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5372  ;;
5373  *)
5374  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5375for as_dir in $PATH
5376do
5377  IFS=$as_save_IFS
5378  test -z "$as_dir" && as_dir=.
5379    for ac_exec_ext in '' $ac_executable_extensions; do
5380  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5381    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5382    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5383    break 2
5384  fi
5385done
5386  done
5387IFS=$as_save_IFS
5388
5389  ;;
5390esac
5391fi
5392COMM=$ac_cv_path_COMM
5393if test -n "$COMM"; then
5394  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5395$as_echo "$COMM" >&6; }
5396else
5397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5398$as_echo "no" >&6; }
5399fi
5400
5401
5402        if test "x$COMM" = x; then
5403          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5404        fi
5405      else
5406        # Otherwise we believe it is a complete path. Use it as it is.
5407        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5408$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5409        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5410$as_echo_n "checking for COMM... " >&6; }
5411        if test ! -x "$tool_specified"; then
5412          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5413$as_echo "not found" >&6; }
5414          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5415        fi
5416        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5417$as_echo "$tool_specified" >&6; }
5418      fi
5419    fi
5420  fi
5421
5422
5423
5424  if test "x$COMM" = x; then
5425    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5426  fi
5427
5428
5429
5430
5431
5432  # Publish this variable in the help.
5433
5434
5435  if test "x$CP" = x; then
5436    # The variable is not set by user, try to locate tool using the code snippet
5437    for ac_prog in cp
5438do
5439  # Extract the first word of "$ac_prog", so it can be a program name with args.
5440set dummy $ac_prog; ac_word=$2
5441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5442$as_echo_n "checking for $ac_word... " >&6; }
5443if ${ac_cv_path_CP+:} false; then :
5444  $as_echo_n "(cached) " >&6
5445else
5446  case $CP in
5447  [\\/]* | ?:[\\/]*)
5448  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5449  ;;
5450  *)
5451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5452for as_dir in $PATH
5453do
5454  IFS=$as_save_IFS
5455  test -z "$as_dir" && as_dir=.
5456    for ac_exec_ext in '' $ac_executable_extensions; do
5457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5458    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5460    break 2
5461  fi
5462done
5463  done
5464IFS=$as_save_IFS
5465
5466  ;;
5467esac
5468fi
5469CP=$ac_cv_path_CP
5470if test -n "$CP"; then
5471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5472$as_echo "$CP" >&6; }
5473else
5474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5475$as_echo "no" >&6; }
5476fi
5477
5478
5479  test -n "$CP" && break
5480done
5481
5482  else
5483    # The variable is set, but is it from the command line or the environment?
5484
5485    # Try to remove the string !CP! from our list.
5486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5488      # If it failed, the variable was not from the command line. Ignore it,
5489      # but warn the user (except for BASH, which is always set by the calling BASH).
5490      if test "xCP" != xBASH; then
5491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5492$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5493      fi
5494      # Try to locate tool using the code snippet
5495      for ac_prog in cp
5496do
5497  # Extract the first word of "$ac_prog", so it can be a program name with args.
5498set dummy $ac_prog; ac_word=$2
5499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5500$as_echo_n "checking for $ac_word... " >&6; }
5501if ${ac_cv_path_CP+:} false; then :
5502  $as_echo_n "(cached) " >&6
5503else
5504  case $CP in
5505  [\\/]* | ?:[\\/]*)
5506  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5507  ;;
5508  *)
5509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5510for as_dir in $PATH
5511do
5512  IFS=$as_save_IFS
5513  test -z "$as_dir" && as_dir=.
5514    for ac_exec_ext in '' $ac_executable_extensions; do
5515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5516    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5518    break 2
5519  fi
5520done
5521  done
5522IFS=$as_save_IFS
5523
5524  ;;
5525esac
5526fi
5527CP=$ac_cv_path_CP
5528if test -n "$CP"; then
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5530$as_echo "$CP" >&6; }
5531else
5532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5533$as_echo "no" >&6; }
5534fi
5535
5536
5537  test -n "$CP" && break
5538done
5539
5540    else
5541      # If it succeeded, then it was overridden by the user. We will use it
5542      # for the tool.
5543
5544      # First remove it from the list of overridden variables, so we can test
5545      # for unknown variables in the end.
5546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5547
5548      # Check if the provided tool contains a complete path.
5549      tool_specified="$CP"
5550      tool_basename="${tool_specified##*/}"
5551      if test "x$tool_basename" = "x$tool_specified"; then
5552        # A command without a complete path is provided, search $PATH.
5553        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5554$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5555        # Extract the first word of "$tool_basename", so it can be a program name with args.
5556set dummy $tool_basename; ac_word=$2
5557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5558$as_echo_n "checking for $ac_word... " >&6; }
5559if ${ac_cv_path_CP+:} false; then :
5560  $as_echo_n "(cached) " >&6
5561else
5562  case $CP in
5563  [\\/]* | ?:[\\/]*)
5564  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5565  ;;
5566  *)
5567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5568for as_dir in $PATH
5569do
5570  IFS=$as_save_IFS
5571  test -z "$as_dir" && as_dir=.
5572    for ac_exec_ext in '' $ac_executable_extensions; do
5573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5574    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5576    break 2
5577  fi
5578done
5579  done
5580IFS=$as_save_IFS
5581
5582  ;;
5583esac
5584fi
5585CP=$ac_cv_path_CP
5586if test -n "$CP"; then
5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5588$as_echo "$CP" >&6; }
5589else
5590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5591$as_echo "no" >&6; }
5592fi
5593
5594
5595        if test "x$CP" = x; then
5596          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5597        fi
5598      else
5599        # Otherwise we believe it is a complete path. Use it as it is.
5600        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5601$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5603$as_echo_n "checking for CP... " >&6; }
5604        if test ! -x "$tool_specified"; then
5605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5606$as_echo "not found" >&6; }
5607          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5608        fi
5609        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5610$as_echo "$tool_specified" >&6; }
5611      fi
5612    fi
5613  fi
5614
5615
5616
5617  if test "x$CP" = x; then
5618    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5619  fi
5620
5621
5622
5623
5624
5625  # Publish this variable in the help.
5626
5627
5628  if test "x$CPIO" = x; then
5629    # The variable is not set by user, try to locate tool using the code snippet
5630    for ac_prog in cpio
5631do
5632  # Extract the first word of "$ac_prog", so it can be a program name with args.
5633set dummy $ac_prog; ac_word=$2
5634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5635$as_echo_n "checking for $ac_word... " >&6; }
5636if ${ac_cv_path_CPIO+:} false; then :
5637  $as_echo_n "(cached) " >&6
5638else
5639  case $CPIO in
5640  [\\/]* | ?:[\\/]*)
5641  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5642  ;;
5643  *)
5644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5645for as_dir in $PATH
5646do
5647  IFS=$as_save_IFS
5648  test -z "$as_dir" && as_dir=.
5649    for ac_exec_ext in '' $ac_executable_extensions; do
5650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5651    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5653    break 2
5654  fi
5655done
5656  done
5657IFS=$as_save_IFS
5658
5659  ;;
5660esac
5661fi
5662CPIO=$ac_cv_path_CPIO
5663if test -n "$CPIO"; then
5664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5665$as_echo "$CPIO" >&6; }
5666else
5667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5668$as_echo "no" >&6; }
5669fi
5670
5671
5672  test -n "$CPIO" && break
5673done
5674
5675  else
5676    # The variable is set, but is it from the command line or the environment?
5677
5678    # Try to remove the string !CPIO! from our list.
5679    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5680    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5681      # If it failed, the variable was not from the command line. Ignore it,
5682      # but warn the user (except for BASH, which is always set by the calling BASH).
5683      if test "xCPIO" != xBASH; then
5684        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5685$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5686      fi
5687      # Try to locate tool using the code snippet
5688      for ac_prog in cpio
5689do
5690  # Extract the first word of "$ac_prog", so it can be a program name with args.
5691set dummy $ac_prog; ac_word=$2
5692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5693$as_echo_n "checking for $ac_word... " >&6; }
5694if ${ac_cv_path_CPIO+:} false; then :
5695  $as_echo_n "(cached) " >&6
5696else
5697  case $CPIO in
5698  [\\/]* | ?:[\\/]*)
5699  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5700  ;;
5701  *)
5702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5703for as_dir in $PATH
5704do
5705  IFS=$as_save_IFS
5706  test -z "$as_dir" && as_dir=.
5707    for ac_exec_ext in '' $ac_executable_extensions; do
5708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5709    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5711    break 2
5712  fi
5713done
5714  done
5715IFS=$as_save_IFS
5716
5717  ;;
5718esac
5719fi
5720CPIO=$ac_cv_path_CPIO
5721if test -n "$CPIO"; then
5722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5723$as_echo "$CPIO" >&6; }
5724else
5725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5726$as_echo "no" >&6; }
5727fi
5728
5729
5730  test -n "$CPIO" && break
5731done
5732
5733    else
5734      # If it succeeded, then it was overridden by the user. We will use it
5735      # for the tool.
5736
5737      # First remove it from the list of overridden variables, so we can test
5738      # for unknown variables in the end.
5739      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5740
5741      # Check if the provided tool contains a complete path.
5742      tool_specified="$CPIO"
5743      tool_basename="${tool_specified##*/}"
5744      if test "x$tool_basename" = "x$tool_specified"; then
5745        # A command without a complete path is provided, search $PATH.
5746        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5747$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5748        # Extract the first word of "$tool_basename", so it can be a program name with args.
5749set dummy $tool_basename; ac_word=$2
5750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5751$as_echo_n "checking for $ac_word... " >&6; }
5752if ${ac_cv_path_CPIO+:} false; then :
5753  $as_echo_n "(cached) " >&6
5754else
5755  case $CPIO in
5756  [\\/]* | ?:[\\/]*)
5757  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5758  ;;
5759  *)
5760  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5761for as_dir in $PATH
5762do
5763  IFS=$as_save_IFS
5764  test -z "$as_dir" && as_dir=.
5765    for ac_exec_ext in '' $ac_executable_extensions; do
5766  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5767    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5768    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5769    break 2
5770  fi
5771done
5772  done
5773IFS=$as_save_IFS
5774
5775  ;;
5776esac
5777fi
5778CPIO=$ac_cv_path_CPIO
5779if test -n "$CPIO"; then
5780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5781$as_echo "$CPIO" >&6; }
5782else
5783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5784$as_echo "no" >&6; }
5785fi
5786
5787
5788        if test "x$CPIO" = x; then
5789          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5790        fi
5791      else
5792        # Otherwise we believe it is a complete path. Use it as it is.
5793        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5794$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5795        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5796$as_echo_n "checking for CPIO... " >&6; }
5797        if test ! -x "$tool_specified"; then
5798          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5799$as_echo "not found" >&6; }
5800          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5801        fi
5802        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5803$as_echo "$tool_specified" >&6; }
5804      fi
5805    fi
5806  fi
5807
5808
5809
5810  if test "x$CPIO" = x; then
5811    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5812  fi
5813
5814
5815
5816
5817
5818  # Publish this variable in the help.
5819
5820
5821  if test "x$CUT" = x; then
5822    # The variable is not set by user, try to locate tool using the code snippet
5823    for ac_prog in cut
5824do
5825  # Extract the first word of "$ac_prog", so it can be a program name with args.
5826set dummy $ac_prog; ac_word=$2
5827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5828$as_echo_n "checking for $ac_word... " >&6; }
5829if ${ac_cv_path_CUT+:} false; then :
5830  $as_echo_n "(cached) " >&6
5831else
5832  case $CUT in
5833  [\\/]* | ?:[\\/]*)
5834  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5835  ;;
5836  *)
5837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5838for as_dir in $PATH
5839do
5840  IFS=$as_save_IFS
5841  test -z "$as_dir" && as_dir=.
5842    for ac_exec_ext in '' $ac_executable_extensions; do
5843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5844    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5846    break 2
5847  fi
5848done
5849  done
5850IFS=$as_save_IFS
5851
5852  ;;
5853esac
5854fi
5855CUT=$ac_cv_path_CUT
5856if test -n "$CUT"; then
5857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5858$as_echo "$CUT" >&6; }
5859else
5860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5861$as_echo "no" >&6; }
5862fi
5863
5864
5865  test -n "$CUT" && break
5866done
5867
5868  else
5869    # The variable is set, but is it from the command line or the environment?
5870
5871    # Try to remove the string !CUT! from our list.
5872    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5873    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5874      # If it failed, the variable was not from the command line. Ignore it,
5875      # but warn the user (except for BASH, which is always set by the calling BASH).
5876      if test "xCUT" != xBASH; then
5877        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5878$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5879      fi
5880      # Try to locate tool using the code snippet
5881      for ac_prog in cut
5882do
5883  # Extract the first word of "$ac_prog", so it can be a program name with args.
5884set dummy $ac_prog; ac_word=$2
5885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5886$as_echo_n "checking for $ac_word... " >&6; }
5887if ${ac_cv_path_CUT+:} false; then :
5888  $as_echo_n "(cached) " >&6
5889else
5890  case $CUT in
5891  [\\/]* | ?:[\\/]*)
5892  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5893  ;;
5894  *)
5895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5896for as_dir in $PATH
5897do
5898  IFS=$as_save_IFS
5899  test -z "$as_dir" && as_dir=.
5900    for ac_exec_ext in '' $ac_executable_extensions; do
5901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5902    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5904    break 2
5905  fi
5906done
5907  done
5908IFS=$as_save_IFS
5909
5910  ;;
5911esac
5912fi
5913CUT=$ac_cv_path_CUT
5914if test -n "$CUT"; then
5915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5916$as_echo "$CUT" >&6; }
5917else
5918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919$as_echo "no" >&6; }
5920fi
5921
5922
5923  test -n "$CUT" && break
5924done
5925
5926    else
5927      # If it succeeded, then it was overridden by the user. We will use it
5928      # for the tool.
5929
5930      # First remove it from the list of overridden variables, so we can test
5931      # for unknown variables in the end.
5932      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5933
5934      # Check if the provided tool contains a complete path.
5935      tool_specified="$CUT"
5936      tool_basename="${tool_specified##*/}"
5937      if test "x$tool_basename" = "x$tool_specified"; then
5938        # A command without a complete path is provided, search $PATH.
5939        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
5940$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
5941        # Extract the first word of "$tool_basename", so it can be a program name with args.
5942set dummy $tool_basename; ac_word=$2
5943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5944$as_echo_n "checking for $ac_word... " >&6; }
5945if ${ac_cv_path_CUT+:} false; then :
5946  $as_echo_n "(cached) " >&6
5947else
5948  case $CUT in
5949  [\\/]* | ?:[\\/]*)
5950  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5951  ;;
5952  *)
5953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5954for as_dir in $PATH
5955do
5956  IFS=$as_save_IFS
5957  test -z "$as_dir" && as_dir=.
5958    for ac_exec_ext in '' $ac_executable_extensions; do
5959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5960    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5962    break 2
5963  fi
5964done
5965  done
5966IFS=$as_save_IFS
5967
5968  ;;
5969esac
5970fi
5971CUT=$ac_cv_path_CUT
5972if test -n "$CUT"; then
5973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5974$as_echo "$CUT" >&6; }
5975else
5976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5977$as_echo "no" >&6; }
5978fi
5979
5980
5981        if test "x$CUT" = x; then
5982          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5983        fi
5984      else
5985        # Otherwise we believe it is a complete path. Use it as it is.
5986        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
5987$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
5988        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
5989$as_echo_n "checking for CUT... " >&6; }
5990        if test ! -x "$tool_specified"; then
5991          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5992$as_echo "not found" >&6; }
5993          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
5994        fi
5995        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5996$as_echo "$tool_specified" >&6; }
5997      fi
5998    fi
5999  fi
6000
6001
6002
6003  if test "x$CUT" = x; then
6004    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6005  fi
6006
6007
6008
6009
6010
6011  # Publish this variable in the help.
6012
6013
6014  if test "x$DATE" = x; then
6015    # The variable is not set by user, try to locate tool using the code snippet
6016    for ac_prog in date
6017do
6018  # Extract the first word of "$ac_prog", so it can be a program name with args.
6019set dummy $ac_prog; ac_word=$2
6020{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6021$as_echo_n "checking for $ac_word... " >&6; }
6022if ${ac_cv_path_DATE+:} false; then :
6023  $as_echo_n "(cached) " >&6
6024else
6025  case $DATE in
6026  [\\/]* | ?:[\\/]*)
6027  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6028  ;;
6029  *)
6030  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6031for as_dir in $PATH
6032do
6033  IFS=$as_save_IFS
6034  test -z "$as_dir" && as_dir=.
6035    for ac_exec_ext in '' $ac_executable_extensions; do
6036  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6037    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6038    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6039    break 2
6040  fi
6041done
6042  done
6043IFS=$as_save_IFS
6044
6045  ;;
6046esac
6047fi
6048DATE=$ac_cv_path_DATE
6049if test -n "$DATE"; then
6050  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6051$as_echo "$DATE" >&6; }
6052else
6053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6054$as_echo "no" >&6; }
6055fi
6056
6057
6058  test -n "$DATE" && break
6059done
6060
6061  else
6062    # The variable is set, but is it from the command line or the environment?
6063
6064    # Try to remove the string !DATE! from our list.
6065    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6066    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6067      # If it failed, the variable was not from the command line. Ignore it,
6068      # but warn the user (except for BASH, which is always set by the calling BASH).
6069      if test "xDATE" != xBASH; then
6070        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6071$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6072      fi
6073      # Try to locate tool using the code snippet
6074      for ac_prog in date
6075do
6076  # Extract the first word of "$ac_prog", so it can be a program name with args.
6077set dummy $ac_prog; ac_word=$2
6078{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6079$as_echo_n "checking for $ac_word... " >&6; }
6080if ${ac_cv_path_DATE+:} false; then :
6081  $as_echo_n "(cached) " >&6
6082else
6083  case $DATE in
6084  [\\/]* | ?:[\\/]*)
6085  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6086  ;;
6087  *)
6088  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6089for as_dir in $PATH
6090do
6091  IFS=$as_save_IFS
6092  test -z "$as_dir" && as_dir=.
6093    for ac_exec_ext in '' $ac_executable_extensions; do
6094  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6095    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6096    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6097    break 2
6098  fi
6099done
6100  done
6101IFS=$as_save_IFS
6102
6103  ;;
6104esac
6105fi
6106DATE=$ac_cv_path_DATE
6107if test -n "$DATE"; then
6108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6109$as_echo "$DATE" >&6; }
6110else
6111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6112$as_echo "no" >&6; }
6113fi
6114
6115
6116  test -n "$DATE" && break
6117done
6118
6119    else
6120      # If it succeeded, then it was overridden by the user. We will use it
6121      # for the tool.
6122
6123      # First remove it from the list of overridden variables, so we can test
6124      # for unknown variables in the end.
6125      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6126
6127      # Check if the provided tool contains a complete path.
6128      tool_specified="$DATE"
6129      tool_basename="${tool_specified##*/}"
6130      if test "x$tool_basename" = "x$tool_specified"; then
6131        # A command without a complete path is provided, search $PATH.
6132        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6133$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6134        # Extract the first word of "$tool_basename", so it can be a program name with args.
6135set dummy $tool_basename; ac_word=$2
6136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6137$as_echo_n "checking for $ac_word... " >&6; }
6138if ${ac_cv_path_DATE+:} false; then :
6139  $as_echo_n "(cached) " >&6
6140else
6141  case $DATE in
6142  [\\/]* | ?:[\\/]*)
6143  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6144  ;;
6145  *)
6146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6147for as_dir in $PATH
6148do
6149  IFS=$as_save_IFS
6150  test -z "$as_dir" && as_dir=.
6151    for ac_exec_ext in '' $ac_executable_extensions; do
6152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6153    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6155    break 2
6156  fi
6157done
6158  done
6159IFS=$as_save_IFS
6160
6161  ;;
6162esac
6163fi
6164DATE=$ac_cv_path_DATE
6165if test -n "$DATE"; then
6166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6167$as_echo "$DATE" >&6; }
6168else
6169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6170$as_echo "no" >&6; }
6171fi
6172
6173
6174        if test "x$DATE" = x; then
6175          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6176        fi
6177      else
6178        # Otherwise we believe it is a complete path. Use it as it is.
6179        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6180$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6181        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6182$as_echo_n "checking for DATE... " >&6; }
6183        if test ! -x "$tool_specified"; then
6184          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6185$as_echo "not found" >&6; }
6186          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6187        fi
6188        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6189$as_echo "$tool_specified" >&6; }
6190      fi
6191    fi
6192  fi
6193
6194
6195
6196  if test "x$DATE" = x; then
6197    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6198  fi
6199
6200
6201
6202
6203
6204  # Publish this variable in the help.
6205
6206
6207  if test "x$DIFF" = x; then
6208    # The variable is not set by user, try to locate tool using the code snippet
6209    for ac_prog in gdiff diff
6210do
6211  # Extract the first word of "$ac_prog", so it can be a program name with args.
6212set dummy $ac_prog; ac_word=$2
6213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6214$as_echo_n "checking for $ac_word... " >&6; }
6215if ${ac_cv_path_DIFF+:} false; then :
6216  $as_echo_n "(cached) " >&6
6217else
6218  case $DIFF in
6219  [\\/]* | ?:[\\/]*)
6220  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6221  ;;
6222  *)
6223  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6224for as_dir in $PATH
6225do
6226  IFS=$as_save_IFS
6227  test -z "$as_dir" && as_dir=.
6228    for ac_exec_ext in '' $ac_executable_extensions; do
6229  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6230    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6231    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6232    break 2
6233  fi
6234done
6235  done
6236IFS=$as_save_IFS
6237
6238  ;;
6239esac
6240fi
6241DIFF=$ac_cv_path_DIFF
6242if test -n "$DIFF"; then
6243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6244$as_echo "$DIFF" >&6; }
6245else
6246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6247$as_echo "no" >&6; }
6248fi
6249
6250
6251  test -n "$DIFF" && break
6252done
6253
6254  else
6255    # The variable is set, but is it from the command line or the environment?
6256
6257    # Try to remove the string !DIFF! from our list.
6258    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6259    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6260      # If it failed, the variable was not from the command line. Ignore it,
6261      # but warn the user (except for BASH, which is always set by the calling BASH).
6262      if test "xDIFF" != xBASH; then
6263        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6264$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6265      fi
6266      # Try to locate tool using the code snippet
6267      for ac_prog in gdiff diff
6268do
6269  # Extract the first word of "$ac_prog", so it can be a program name with args.
6270set dummy $ac_prog; ac_word=$2
6271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6272$as_echo_n "checking for $ac_word... " >&6; }
6273if ${ac_cv_path_DIFF+:} false; then :
6274  $as_echo_n "(cached) " >&6
6275else
6276  case $DIFF in
6277  [\\/]* | ?:[\\/]*)
6278  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6279  ;;
6280  *)
6281  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6282for as_dir in $PATH
6283do
6284  IFS=$as_save_IFS
6285  test -z "$as_dir" && as_dir=.
6286    for ac_exec_ext in '' $ac_executable_extensions; do
6287  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6288    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6289    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6290    break 2
6291  fi
6292done
6293  done
6294IFS=$as_save_IFS
6295
6296  ;;
6297esac
6298fi
6299DIFF=$ac_cv_path_DIFF
6300if test -n "$DIFF"; then
6301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6302$as_echo "$DIFF" >&6; }
6303else
6304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6305$as_echo "no" >&6; }
6306fi
6307
6308
6309  test -n "$DIFF" && break
6310done
6311
6312    else
6313      # If it succeeded, then it was overridden by the user. We will use it
6314      # for the tool.
6315
6316      # First remove it from the list of overridden variables, so we can test
6317      # for unknown variables in the end.
6318      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6319
6320      # Check if the provided tool contains a complete path.
6321      tool_specified="$DIFF"
6322      tool_basename="${tool_specified##*/}"
6323      if test "x$tool_basename" = "x$tool_specified"; then
6324        # A command without a complete path is provided, search $PATH.
6325        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6326$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6327        # Extract the first word of "$tool_basename", so it can be a program name with args.
6328set dummy $tool_basename; ac_word=$2
6329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6330$as_echo_n "checking for $ac_word... " >&6; }
6331if ${ac_cv_path_DIFF+:} false; then :
6332  $as_echo_n "(cached) " >&6
6333else
6334  case $DIFF in
6335  [\\/]* | ?:[\\/]*)
6336  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6337  ;;
6338  *)
6339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6340for as_dir in $PATH
6341do
6342  IFS=$as_save_IFS
6343  test -z "$as_dir" && as_dir=.
6344    for ac_exec_ext in '' $ac_executable_extensions; do
6345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6346    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6348    break 2
6349  fi
6350done
6351  done
6352IFS=$as_save_IFS
6353
6354  ;;
6355esac
6356fi
6357DIFF=$ac_cv_path_DIFF
6358if test -n "$DIFF"; then
6359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6360$as_echo "$DIFF" >&6; }
6361else
6362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6363$as_echo "no" >&6; }
6364fi
6365
6366
6367        if test "x$DIFF" = x; then
6368          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6369        fi
6370      else
6371        # Otherwise we believe it is a complete path. Use it as it is.
6372        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6373$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6375$as_echo_n "checking for DIFF... " >&6; }
6376        if test ! -x "$tool_specified"; then
6377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6378$as_echo "not found" >&6; }
6379          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6380        fi
6381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6382$as_echo "$tool_specified" >&6; }
6383      fi
6384    fi
6385  fi
6386
6387
6388
6389  if test "x$DIFF" = x; then
6390    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6391  fi
6392
6393
6394
6395
6396
6397  # Publish this variable in the help.
6398
6399
6400  if test "x$DIRNAME" = x; then
6401    # The variable is not set by user, try to locate tool using the code snippet
6402    for ac_prog in dirname
6403do
6404  # Extract the first word of "$ac_prog", so it can be a program name with args.
6405set dummy $ac_prog; ac_word=$2
6406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6407$as_echo_n "checking for $ac_word... " >&6; }
6408if ${ac_cv_path_DIRNAME+:} false; then :
6409  $as_echo_n "(cached) " >&6
6410else
6411  case $DIRNAME in
6412  [\\/]* | ?:[\\/]*)
6413  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6414  ;;
6415  *)
6416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6417for as_dir in $PATH
6418do
6419  IFS=$as_save_IFS
6420  test -z "$as_dir" && as_dir=.
6421    for ac_exec_ext in '' $ac_executable_extensions; do
6422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6423    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6425    break 2
6426  fi
6427done
6428  done
6429IFS=$as_save_IFS
6430
6431  ;;
6432esac
6433fi
6434DIRNAME=$ac_cv_path_DIRNAME
6435if test -n "$DIRNAME"; then
6436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6437$as_echo "$DIRNAME" >&6; }
6438else
6439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6440$as_echo "no" >&6; }
6441fi
6442
6443
6444  test -n "$DIRNAME" && break
6445done
6446
6447  else
6448    # The variable is set, but is it from the command line or the environment?
6449
6450    # Try to remove the string !DIRNAME! from our list.
6451    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6452    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6453      # If it failed, the variable was not from the command line. Ignore it,
6454      # but warn the user (except for BASH, which is always set by the calling BASH).
6455      if test "xDIRNAME" != xBASH; then
6456        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6457$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6458      fi
6459      # Try to locate tool using the code snippet
6460      for ac_prog in dirname
6461do
6462  # Extract the first word of "$ac_prog", so it can be a program name with args.
6463set dummy $ac_prog; ac_word=$2
6464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6465$as_echo_n "checking for $ac_word... " >&6; }
6466if ${ac_cv_path_DIRNAME+:} false; then :
6467  $as_echo_n "(cached) " >&6
6468else
6469  case $DIRNAME in
6470  [\\/]* | ?:[\\/]*)
6471  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6472  ;;
6473  *)
6474  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6475for as_dir in $PATH
6476do
6477  IFS=$as_save_IFS
6478  test -z "$as_dir" && as_dir=.
6479    for ac_exec_ext in '' $ac_executable_extensions; do
6480  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6481    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6482    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6483    break 2
6484  fi
6485done
6486  done
6487IFS=$as_save_IFS
6488
6489  ;;
6490esac
6491fi
6492DIRNAME=$ac_cv_path_DIRNAME
6493if test -n "$DIRNAME"; then
6494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6495$as_echo "$DIRNAME" >&6; }
6496else
6497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498$as_echo "no" >&6; }
6499fi
6500
6501
6502  test -n "$DIRNAME" && break
6503done
6504
6505    else
6506      # If it succeeded, then it was overridden by the user. We will use it
6507      # for the tool.
6508
6509      # First remove it from the list of overridden variables, so we can test
6510      # for unknown variables in the end.
6511      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6512
6513      # Check if the provided tool contains a complete path.
6514      tool_specified="$DIRNAME"
6515      tool_basename="${tool_specified##*/}"
6516      if test "x$tool_basename" = "x$tool_specified"; then
6517        # A command without a complete path is provided, search $PATH.
6518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6519$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6520        # Extract the first word of "$tool_basename", so it can be a program name with args.
6521set dummy $tool_basename; ac_word=$2
6522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6523$as_echo_n "checking for $ac_word... " >&6; }
6524if ${ac_cv_path_DIRNAME+:} false; then :
6525  $as_echo_n "(cached) " >&6
6526else
6527  case $DIRNAME in
6528  [\\/]* | ?:[\\/]*)
6529  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6530  ;;
6531  *)
6532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6533for as_dir in $PATH
6534do
6535  IFS=$as_save_IFS
6536  test -z "$as_dir" && as_dir=.
6537    for ac_exec_ext in '' $ac_executable_extensions; do
6538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6539    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6541    break 2
6542  fi
6543done
6544  done
6545IFS=$as_save_IFS
6546
6547  ;;
6548esac
6549fi
6550DIRNAME=$ac_cv_path_DIRNAME
6551if test -n "$DIRNAME"; then
6552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6553$as_echo "$DIRNAME" >&6; }
6554else
6555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6556$as_echo "no" >&6; }
6557fi
6558
6559
6560        if test "x$DIRNAME" = x; then
6561          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6562        fi
6563      else
6564        # Otherwise we believe it is a complete path. Use it as it is.
6565        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6566$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6567        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6568$as_echo_n "checking for DIRNAME... " >&6; }
6569        if test ! -x "$tool_specified"; then
6570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6571$as_echo "not found" >&6; }
6572          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6573        fi
6574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6575$as_echo "$tool_specified" >&6; }
6576      fi
6577    fi
6578  fi
6579
6580
6581
6582  if test "x$DIRNAME" = x; then
6583    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6584  fi
6585
6586
6587
6588
6589
6590  # Publish this variable in the help.
6591
6592
6593  if test "x$ECHO" = x; then
6594    # The variable is not set by user, try to locate tool using the code snippet
6595    for ac_prog in echo
6596do
6597  # Extract the first word of "$ac_prog", so it can be a program name with args.
6598set dummy $ac_prog; ac_word=$2
6599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6600$as_echo_n "checking for $ac_word... " >&6; }
6601if ${ac_cv_path_ECHO+:} false; then :
6602  $as_echo_n "(cached) " >&6
6603else
6604  case $ECHO in
6605  [\\/]* | ?:[\\/]*)
6606  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6607  ;;
6608  *)
6609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6610for as_dir in $PATH
6611do
6612  IFS=$as_save_IFS
6613  test -z "$as_dir" && as_dir=.
6614    for ac_exec_ext in '' $ac_executable_extensions; do
6615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6616    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6618    break 2
6619  fi
6620done
6621  done
6622IFS=$as_save_IFS
6623
6624  ;;
6625esac
6626fi
6627ECHO=$ac_cv_path_ECHO
6628if test -n "$ECHO"; then
6629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6630$as_echo "$ECHO" >&6; }
6631else
6632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6633$as_echo "no" >&6; }
6634fi
6635
6636
6637  test -n "$ECHO" && break
6638done
6639
6640  else
6641    # The variable is set, but is it from the command line or the environment?
6642
6643    # Try to remove the string !ECHO! from our list.
6644    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6645    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6646      # If it failed, the variable was not from the command line. Ignore it,
6647      # but warn the user (except for BASH, which is always set by the calling BASH).
6648      if test "xECHO" != xBASH; then
6649        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6650$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6651      fi
6652      # Try to locate tool using the code snippet
6653      for ac_prog in echo
6654do
6655  # Extract the first word of "$ac_prog", so it can be a program name with args.
6656set dummy $ac_prog; ac_word=$2
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6658$as_echo_n "checking for $ac_word... " >&6; }
6659if ${ac_cv_path_ECHO+:} false; then :
6660  $as_echo_n "(cached) " >&6
6661else
6662  case $ECHO in
6663  [\\/]* | ?:[\\/]*)
6664  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6665  ;;
6666  *)
6667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6668for as_dir in $PATH
6669do
6670  IFS=$as_save_IFS
6671  test -z "$as_dir" && as_dir=.
6672    for ac_exec_ext in '' $ac_executable_extensions; do
6673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6674    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6676    break 2
6677  fi
6678done
6679  done
6680IFS=$as_save_IFS
6681
6682  ;;
6683esac
6684fi
6685ECHO=$ac_cv_path_ECHO
6686if test -n "$ECHO"; then
6687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6688$as_echo "$ECHO" >&6; }
6689else
6690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6691$as_echo "no" >&6; }
6692fi
6693
6694
6695  test -n "$ECHO" && break
6696done
6697
6698    else
6699      # If it succeeded, then it was overridden by the user. We will use it
6700      # for the tool.
6701
6702      # First remove it from the list of overridden variables, so we can test
6703      # for unknown variables in the end.
6704      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6705
6706      # Check if the provided tool contains a complete path.
6707      tool_specified="$ECHO"
6708      tool_basename="${tool_specified##*/}"
6709      if test "x$tool_basename" = "x$tool_specified"; then
6710        # A command without a complete path is provided, search $PATH.
6711        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6712$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6713        # Extract the first word of "$tool_basename", so it can be a program name with args.
6714set dummy $tool_basename; ac_word=$2
6715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6716$as_echo_n "checking for $ac_word... " >&6; }
6717if ${ac_cv_path_ECHO+:} false; then :
6718  $as_echo_n "(cached) " >&6
6719else
6720  case $ECHO in
6721  [\\/]* | ?:[\\/]*)
6722  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6723  ;;
6724  *)
6725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6726for as_dir in $PATH
6727do
6728  IFS=$as_save_IFS
6729  test -z "$as_dir" && as_dir=.
6730    for ac_exec_ext in '' $ac_executable_extensions; do
6731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6732    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6734    break 2
6735  fi
6736done
6737  done
6738IFS=$as_save_IFS
6739
6740  ;;
6741esac
6742fi
6743ECHO=$ac_cv_path_ECHO
6744if test -n "$ECHO"; then
6745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6746$as_echo "$ECHO" >&6; }
6747else
6748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749$as_echo "no" >&6; }
6750fi
6751
6752
6753        if test "x$ECHO" = x; then
6754          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6755        fi
6756      else
6757        # Otherwise we believe it is a complete path. Use it as it is.
6758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6759$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6760        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6761$as_echo_n "checking for ECHO... " >&6; }
6762        if test ! -x "$tool_specified"; then
6763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6764$as_echo "not found" >&6; }
6765          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6766        fi
6767        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6768$as_echo "$tool_specified" >&6; }
6769      fi
6770    fi
6771  fi
6772
6773
6774
6775  if test "x$ECHO" = x; then
6776    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6777  fi
6778
6779
6780
6781
6782
6783  # Publish this variable in the help.
6784
6785
6786  if test "x$EXPR" = x; then
6787    # The variable is not set by user, try to locate tool using the code snippet
6788    for ac_prog in expr
6789do
6790  # Extract the first word of "$ac_prog", so it can be a program name with args.
6791set dummy $ac_prog; ac_word=$2
6792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6793$as_echo_n "checking for $ac_word... " >&6; }
6794if ${ac_cv_path_EXPR+:} false; then :
6795  $as_echo_n "(cached) " >&6
6796else
6797  case $EXPR in
6798  [\\/]* | ?:[\\/]*)
6799  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6800  ;;
6801  *)
6802  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6803for as_dir in $PATH
6804do
6805  IFS=$as_save_IFS
6806  test -z "$as_dir" && as_dir=.
6807    for ac_exec_ext in '' $ac_executable_extensions; do
6808  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6809    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6810    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6811    break 2
6812  fi
6813done
6814  done
6815IFS=$as_save_IFS
6816
6817  ;;
6818esac
6819fi
6820EXPR=$ac_cv_path_EXPR
6821if test -n "$EXPR"; then
6822  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6823$as_echo "$EXPR" >&6; }
6824else
6825  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6826$as_echo "no" >&6; }
6827fi
6828
6829
6830  test -n "$EXPR" && break
6831done
6832
6833  else
6834    # The variable is set, but is it from the command line or the environment?
6835
6836    # Try to remove the string !EXPR! from our list.
6837    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6838    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6839      # If it failed, the variable was not from the command line. Ignore it,
6840      # but warn the user (except for BASH, which is always set by the calling BASH).
6841      if test "xEXPR" != xBASH; then
6842        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6843$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6844      fi
6845      # Try to locate tool using the code snippet
6846      for ac_prog in expr
6847do
6848  # Extract the first word of "$ac_prog", so it can be a program name with args.
6849set dummy $ac_prog; ac_word=$2
6850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6851$as_echo_n "checking for $ac_word... " >&6; }
6852if ${ac_cv_path_EXPR+:} false; then :
6853  $as_echo_n "(cached) " >&6
6854else
6855  case $EXPR in
6856  [\\/]* | ?:[\\/]*)
6857  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6858  ;;
6859  *)
6860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6861for as_dir in $PATH
6862do
6863  IFS=$as_save_IFS
6864  test -z "$as_dir" && as_dir=.
6865    for ac_exec_ext in '' $ac_executable_extensions; do
6866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6867    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6869    break 2
6870  fi
6871done
6872  done
6873IFS=$as_save_IFS
6874
6875  ;;
6876esac
6877fi
6878EXPR=$ac_cv_path_EXPR
6879if test -n "$EXPR"; then
6880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6881$as_echo "$EXPR" >&6; }
6882else
6883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6884$as_echo "no" >&6; }
6885fi
6886
6887
6888  test -n "$EXPR" && break
6889done
6890
6891    else
6892      # If it succeeded, then it was overridden by the user. We will use it
6893      # for the tool.
6894
6895      # First remove it from the list of overridden variables, so we can test
6896      # for unknown variables in the end.
6897      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6898
6899      # Check if the provided tool contains a complete path.
6900      tool_specified="$EXPR"
6901      tool_basename="${tool_specified##*/}"
6902      if test "x$tool_basename" = "x$tool_specified"; then
6903        # A command without a complete path is provided, search $PATH.
6904        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6905$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6906        # Extract the first word of "$tool_basename", so it can be a program name with args.
6907set dummy $tool_basename; ac_word=$2
6908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6909$as_echo_n "checking for $ac_word... " >&6; }
6910if ${ac_cv_path_EXPR+:} false; then :
6911  $as_echo_n "(cached) " >&6
6912else
6913  case $EXPR in
6914  [\\/]* | ?:[\\/]*)
6915  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6916  ;;
6917  *)
6918  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6919for as_dir in $PATH
6920do
6921  IFS=$as_save_IFS
6922  test -z "$as_dir" && as_dir=.
6923    for ac_exec_ext in '' $ac_executable_extensions; do
6924  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6925    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6926    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6927    break 2
6928  fi
6929done
6930  done
6931IFS=$as_save_IFS
6932
6933  ;;
6934esac
6935fi
6936EXPR=$ac_cv_path_EXPR
6937if test -n "$EXPR"; then
6938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6939$as_echo "$EXPR" >&6; }
6940else
6941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6942$as_echo "no" >&6; }
6943fi
6944
6945
6946        if test "x$EXPR" = x; then
6947          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6948        fi
6949      else
6950        # Otherwise we believe it is a complete path. Use it as it is.
6951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
6952$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
6953        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
6954$as_echo_n "checking for EXPR... " >&6; }
6955        if test ! -x "$tool_specified"; then
6956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6957$as_echo "not found" >&6; }
6958          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
6959        fi
6960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6961$as_echo "$tool_specified" >&6; }
6962      fi
6963    fi
6964  fi
6965
6966
6967
6968  if test "x$EXPR" = x; then
6969    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
6970  fi
6971
6972
6973
6974
6975
6976  # Publish this variable in the help.
6977
6978
6979  if test "x$FILE" = x; then
6980    # The variable is not set by user, try to locate tool using the code snippet
6981    for ac_prog in file
6982do
6983  # Extract the first word of "$ac_prog", so it can be a program name with args.
6984set dummy $ac_prog; ac_word=$2
6985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6986$as_echo_n "checking for $ac_word... " >&6; }
6987if ${ac_cv_path_FILE+:} false; then :
6988  $as_echo_n "(cached) " >&6
6989else
6990  case $FILE in
6991  [\\/]* | ?:[\\/]*)
6992  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
6993  ;;
6994  *)
6995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6996for as_dir in $PATH
6997do
6998  IFS=$as_save_IFS
6999  test -z "$as_dir" && as_dir=.
7000    for ac_exec_ext in '' $ac_executable_extensions; do
7001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7002    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7004    break 2
7005  fi
7006done
7007  done
7008IFS=$as_save_IFS
7009
7010  ;;
7011esac
7012fi
7013FILE=$ac_cv_path_FILE
7014if test -n "$FILE"; then
7015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7016$as_echo "$FILE" >&6; }
7017else
7018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7019$as_echo "no" >&6; }
7020fi
7021
7022
7023  test -n "$FILE" && break
7024done
7025
7026  else
7027    # The variable is set, but is it from the command line or the environment?
7028
7029    # Try to remove the string !FILE! from our list.
7030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7032      # If it failed, the variable was not from the command line. Ignore it,
7033      # but warn the user (except for BASH, which is always set by the calling BASH).
7034      if test "xFILE" != xBASH; then
7035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7036$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7037      fi
7038      # Try to locate tool using the code snippet
7039      for ac_prog in file
7040do
7041  # Extract the first word of "$ac_prog", so it can be a program name with args.
7042set dummy $ac_prog; ac_word=$2
7043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7044$as_echo_n "checking for $ac_word... " >&6; }
7045if ${ac_cv_path_FILE+:} false; then :
7046  $as_echo_n "(cached) " >&6
7047else
7048  case $FILE in
7049  [\\/]* | ?:[\\/]*)
7050  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7051  ;;
7052  *)
7053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7054for as_dir in $PATH
7055do
7056  IFS=$as_save_IFS
7057  test -z "$as_dir" && as_dir=.
7058    for ac_exec_ext in '' $ac_executable_extensions; do
7059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7060    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7062    break 2
7063  fi
7064done
7065  done
7066IFS=$as_save_IFS
7067
7068  ;;
7069esac
7070fi
7071FILE=$ac_cv_path_FILE
7072if test -n "$FILE"; then
7073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7074$as_echo "$FILE" >&6; }
7075else
7076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7077$as_echo "no" >&6; }
7078fi
7079
7080
7081  test -n "$FILE" && break
7082done
7083
7084    else
7085      # If it succeeded, then it was overridden by the user. We will use it
7086      # for the tool.
7087
7088      # First remove it from the list of overridden variables, so we can test
7089      # for unknown variables in the end.
7090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7091
7092      # Check if the provided tool contains a complete path.
7093      tool_specified="$FILE"
7094      tool_basename="${tool_specified##*/}"
7095      if test "x$tool_basename" = "x$tool_specified"; then
7096        # A command without a complete path is provided, search $PATH.
7097        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7098$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7099        # Extract the first word of "$tool_basename", so it can be a program name with args.
7100set dummy $tool_basename; ac_word=$2
7101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7102$as_echo_n "checking for $ac_word... " >&6; }
7103if ${ac_cv_path_FILE+:} false; then :
7104  $as_echo_n "(cached) " >&6
7105else
7106  case $FILE in
7107  [\\/]* | ?:[\\/]*)
7108  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7109  ;;
7110  *)
7111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7112for as_dir in $PATH
7113do
7114  IFS=$as_save_IFS
7115  test -z "$as_dir" && as_dir=.
7116    for ac_exec_ext in '' $ac_executable_extensions; do
7117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7118    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7120    break 2
7121  fi
7122done
7123  done
7124IFS=$as_save_IFS
7125
7126  ;;
7127esac
7128fi
7129FILE=$ac_cv_path_FILE
7130if test -n "$FILE"; then
7131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7132$as_echo "$FILE" >&6; }
7133else
7134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7135$as_echo "no" >&6; }
7136fi
7137
7138
7139        if test "x$FILE" = x; then
7140          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7141        fi
7142      else
7143        # Otherwise we believe it is a complete path. Use it as it is.
7144        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7145$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7146        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7147$as_echo_n "checking for FILE... " >&6; }
7148        if test ! -x "$tool_specified"; then
7149          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7150$as_echo "not found" >&6; }
7151          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7152        fi
7153        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7154$as_echo "$tool_specified" >&6; }
7155      fi
7156    fi
7157  fi
7158
7159
7160
7161  if test "x$FILE" = x; then
7162    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7163  fi
7164
7165
7166
7167
7168
7169  # Publish this variable in the help.
7170
7171
7172  if test "x$FIND" = x; then
7173    # The variable is not set by user, try to locate tool using the code snippet
7174    for ac_prog in find
7175do
7176  # Extract the first word of "$ac_prog", so it can be a program name with args.
7177set dummy $ac_prog; ac_word=$2
7178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7179$as_echo_n "checking for $ac_word... " >&6; }
7180if ${ac_cv_path_FIND+:} false; then :
7181  $as_echo_n "(cached) " >&6
7182else
7183  case $FIND in
7184  [\\/]* | ?:[\\/]*)
7185  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7186  ;;
7187  *)
7188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7189for as_dir in $PATH
7190do
7191  IFS=$as_save_IFS
7192  test -z "$as_dir" && as_dir=.
7193    for ac_exec_ext in '' $ac_executable_extensions; do
7194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7195    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7197    break 2
7198  fi
7199done
7200  done
7201IFS=$as_save_IFS
7202
7203  ;;
7204esac
7205fi
7206FIND=$ac_cv_path_FIND
7207if test -n "$FIND"; then
7208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7209$as_echo "$FIND" >&6; }
7210else
7211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7212$as_echo "no" >&6; }
7213fi
7214
7215
7216  test -n "$FIND" && break
7217done
7218
7219  else
7220    # The variable is set, but is it from the command line or the environment?
7221
7222    # Try to remove the string !FIND! from our list.
7223    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7224    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7225      # If it failed, the variable was not from the command line. Ignore it,
7226      # but warn the user (except for BASH, which is always set by the calling BASH).
7227      if test "xFIND" != xBASH; then
7228        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7229$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7230      fi
7231      # Try to locate tool using the code snippet
7232      for ac_prog in find
7233do
7234  # Extract the first word of "$ac_prog", so it can be a program name with args.
7235set dummy $ac_prog; ac_word=$2
7236{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7237$as_echo_n "checking for $ac_word... " >&6; }
7238if ${ac_cv_path_FIND+:} false; then :
7239  $as_echo_n "(cached) " >&6
7240else
7241  case $FIND in
7242  [\\/]* | ?:[\\/]*)
7243  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7244  ;;
7245  *)
7246  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7247for as_dir in $PATH
7248do
7249  IFS=$as_save_IFS
7250  test -z "$as_dir" && as_dir=.
7251    for ac_exec_ext in '' $ac_executable_extensions; do
7252  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7253    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7254    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7255    break 2
7256  fi
7257done
7258  done
7259IFS=$as_save_IFS
7260
7261  ;;
7262esac
7263fi
7264FIND=$ac_cv_path_FIND
7265if test -n "$FIND"; then
7266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7267$as_echo "$FIND" >&6; }
7268else
7269  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7270$as_echo "no" >&6; }
7271fi
7272
7273
7274  test -n "$FIND" && break
7275done
7276
7277    else
7278      # If it succeeded, then it was overridden by the user. We will use it
7279      # for the tool.
7280
7281      # First remove it from the list of overridden variables, so we can test
7282      # for unknown variables in the end.
7283      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7284
7285      # Check if the provided tool contains a complete path.
7286      tool_specified="$FIND"
7287      tool_basename="${tool_specified##*/}"
7288      if test "x$tool_basename" = "x$tool_specified"; then
7289        # A command without a complete path is provided, search $PATH.
7290        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7291$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7292        # Extract the first word of "$tool_basename", so it can be a program name with args.
7293set dummy $tool_basename; ac_word=$2
7294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7295$as_echo_n "checking for $ac_word... " >&6; }
7296if ${ac_cv_path_FIND+:} false; then :
7297  $as_echo_n "(cached) " >&6
7298else
7299  case $FIND in
7300  [\\/]* | ?:[\\/]*)
7301  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7302  ;;
7303  *)
7304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7305for as_dir in $PATH
7306do
7307  IFS=$as_save_IFS
7308  test -z "$as_dir" && as_dir=.
7309    for ac_exec_ext in '' $ac_executable_extensions; do
7310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7311    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7313    break 2
7314  fi
7315done
7316  done
7317IFS=$as_save_IFS
7318
7319  ;;
7320esac
7321fi
7322FIND=$ac_cv_path_FIND
7323if test -n "$FIND"; then
7324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7325$as_echo "$FIND" >&6; }
7326else
7327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7328$as_echo "no" >&6; }
7329fi
7330
7331
7332        if test "x$FIND" = x; then
7333          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7334        fi
7335      else
7336        # Otherwise we believe it is a complete path. Use it as it is.
7337        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7338$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7340$as_echo_n "checking for FIND... " >&6; }
7341        if test ! -x "$tool_specified"; then
7342          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7343$as_echo "not found" >&6; }
7344          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7345        fi
7346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7347$as_echo "$tool_specified" >&6; }
7348      fi
7349    fi
7350  fi
7351
7352
7353
7354  if test "x$FIND" = x; then
7355    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7356  fi
7357
7358
7359
7360
7361
7362  # Publish this variable in the help.
7363
7364
7365  if test "x$HEAD" = x; then
7366    # The variable is not set by user, try to locate tool using the code snippet
7367    for ac_prog in head
7368do
7369  # Extract the first word of "$ac_prog", so it can be a program name with args.
7370set dummy $ac_prog; ac_word=$2
7371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7372$as_echo_n "checking for $ac_word... " >&6; }
7373if ${ac_cv_path_HEAD+:} false; then :
7374  $as_echo_n "(cached) " >&6
7375else
7376  case $HEAD in
7377  [\\/]* | ?:[\\/]*)
7378  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7379  ;;
7380  *)
7381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7382for as_dir in $PATH
7383do
7384  IFS=$as_save_IFS
7385  test -z "$as_dir" && as_dir=.
7386    for ac_exec_ext in '' $ac_executable_extensions; do
7387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7388    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7390    break 2
7391  fi
7392done
7393  done
7394IFS=$as_save_IFS
7395
7396  ;;
7397esac
7398fi
7399HEAD=$ac_cv_path_HEAD
7400if test -n "$HEAD"; then
7401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7402$as_echo "$HEAD" >&6; }
7403else
7404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7405$as_echo "no" >&6; }
7406fi
7407
7408
7409  test -n "$HEAD" && break
7410done
7411
7412  else
7413    # The variable is set, but is it from the command line or the environment?
7414
7415    # Try to remove the string !HEAD! from our list.
7416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7418      # If it failed, the variable was not from the command line. Ignore it,
7419      # but warn the user (except for BASH, which is always set by the calling BASH).
7420      if test "xHEAD" != xBASH; then
7421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7422$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7423      fi
7424      # Try to locate tool using the code snippet
7425      for ac_prog in head
7426do
7427  # Extract the first word of "$ac_prog", so it can be a program name with args.
7428set dummy $ac_prog; ac_word=$2
7429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7430$as_echo_n "checking for $ac_word... " >&6; }
7431if ${ac_cv_path_HEAD+:} false; then :
7432  $as_echo_n "(cached) " >&6
7433else
7434  case $HEAD in
7435  [\\/]* | ?:[\\/]*)
7436  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7437  ;;
7438  *)
7439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7440for as_dir in $PATH
7441do
7442  IFS=$as_save_IFS
7443  test -z "$as_dir" && as_dir=.
7444    for ac_exec_ext in '' $ac_executable_extensions; do
7445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7446    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7448    break 2
7449  fi
7450done
7451  done
7452IFS=$as_save_IFS
7453
7454  ;;
7455esac
7456fi
7457HEAD=$ac_cv_path_HEAD
7458if test -n "$HEAD"; then
7459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7460$as_echo "$HEAD" >&6; }
7461else
7462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7463$as_echo "no" >&6; }
7464fi
7465
7466
7467  test -n "$HEAD" && break
7468done
7469
7470    else
7471      # If it succeeded, then it was overridden by the user. We will use it
7472      # for the tool.
7473
7474      # First remove it from the list of overridden variables, so we can test
7475      # for unknown variables in the end.
7476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7477
7478      # Check if the provided tool contains a complete path.
7479      tool_specified="$HEAD"
7480      tool_basename="${tool_specified##*/}"
7481      if test "x$tool_basename" = "x$tool_specified"; then
7482        # A command without a complete path is provided, search $PATH.
7483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7484$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7485        # Extract the first word of "$tool_basename", so it can be a program name with args.
7486set dummy $tool_basename; ac_word=$2
7487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7488$as_echo_n "checking for $ac_word... " >&6; }
7489if ${ac_cv_path_HEAD+:} false; then :
7490  $as_echo_n "(cached) " >&6
7491else
7492  case $HEAD in
7493  [\\/]* | ?:[\\/]*)
7494  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7495  ;;
7496  *)
7497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7498for as_dir in $PATH
7499do
7500  IFS=$as_save_IFS
7501  test -z "$as_dir" && as_dir=.
7502    for ac_exec_ext in '' $ac_executable_extensions; do
7503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7504    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7506    break 2
7507  fi
7508done
7509  done
7510IFS=$as_save_IFS
7511
7512  ;;
7513esac
7514fi
7515HEAD=$ac_cv_path_HEAD
7516if test -n "$HEAD"; then
7517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7518$as_echo "$HEAD" >&6; }
7519else
7520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7521$as_echo "no" >&6; }
7522fi
7523
7524
7525        if test "x$HEAD" = x; then
7526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7527        fi
7528      else
7529        # Otherwise we believe it is a complete path. Use it as it is.
7530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7531$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7533$as_echo_n "checking for HEAD... " >&6; }
7534        if test ! -x "$tool_specified"; then
7535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7536$as_echo "not found" >&6; }
7537          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7538        fi
7539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7540$as_echo "$tool_specified" >&6; }
7541      fi
7542    fi
7543  fi
7544
7545
7546
7547  if test "x$HEAD" = x; then
7548    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7549  fi
7550
7551
7552
7553
7554
7555  # Publish this variable in the help.
7556
7557
7558  if test "x$LN" = x; then
7559    # The variable is not set by user, try to locate tool using the code snippet
7560    for ac_prog in ln
7561do
7562  # Extract the first word of "$ac_prog", so it can be a program name with args.
7563set dummy $ac_prog; ac_word=$2
7564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7565$as_echo_n "checking for $ac_word... " >&6; }
7566if ${ac_cv_path_LN+:} false; then :
7567  $as_echo_n "(cached) " >&6
7568else
7569  case $LN in
7570  [\\/]* | ?:[\\/]*)
7571  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7572  ;;
7573  *)
7574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7575for as_dir in $PATH
7576do
7577  IFS=$as_save_IFS
7578  test -z "$as_dir" && as_dir=.
7579    for ac_exec_ext in '' $ac_executable_extensions; do
7580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7581    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7583    break 2
7584  fi
7585done
7586  done
7587IFS=$as_save_IFS
7588
7589  ;;
7590esac
7591fi
7592LN=$ac_cv_path_LN
7593if test -n "$LN"; then
7594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7595$as_echo "$LN" >&6; }
7596else
7597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7598$as_echo "no" >&6; }
7599fi
7600
7601
7602  test -n "$LN" && break
7603done
7604
7605  else
7606    # The variable is set, but is it from the command line or the environment?
7607
7608    # Try to remove the string !LN! from our list.
7609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7611      # If it failed, the variable was not from the command line. Ignore it,
7612      # but warn the user (except for BASH, which is always set by the calling BASH).
7613      if test "xLN" != xBASH; then
7614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7615$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7616      fi
7617      # Try to locate tool using the code snippet
7618      for ac_prog in ln
7619do
7620  # Extract the first word of "$ac_prog", so it can be a program name with args.
7621set dummy $ac_prog; ac_word=$2
7622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7623$as_echo_n "checking for $ac_word... " >&6; }
7624if ${ac_cv_path_LN+:} false; then :
7625  $as_echo_n "(cached) " >&6
7626else
7627  case $LN in
7628  [\\/]* | ?:[\\/]*)
7629  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7630  ;;
7631  *)
7632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7633for as_dir in $PATH
7634do
7635  IFS=$as_save_IFS
7636  test -z "$as_dir" && as_dir=.
7637    for ac_exec_ext in '' $ac_executable_extensions; do
7638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7639    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7641    break 2
7642  fi
7643done
7644  done
7645IFS=$as_save_IFS
7646
7647  ;;
7648esac
7649fi
7650LN=$ac_cv_path_LN
7651if test -n "$LN"; then
7652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7653$as_echo "$LN" >&6; }
7654else
7655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7656$as_echo "no" >&6; }
7657fi
7658
7659
7660  test -n "$LN" && break
7661done
7662
7663    else
7664      # If it succeeded, then it was overridden by the user. We will use it
7665      # for the tool.
7666
7667      # First remove it from the list of overridden variables, so we can test
7668      # for unknown variables in the end.
7669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7670
7671      # Check if the provided tool contains a complete path.
7672      tool_specified="$LN"
7673      tool_basename="${tool_specified##*/}"
7674      if test "x$tool_basename" = "x$tool_specified"; then
7675        # A command without a complete path is provided, search $PATH.
7676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7677$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7678        # Extract the first word of "$tool_basename", so it can be a program name with args.
7679set dummy $tool_basename; ac_word=$2
7680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7681$as_echo_n "checking for $ac_word... " >&6; }
7682if ${ac_cv_path_LN+:} false; then :
7683  $as_echo_n "(cached) " >&6
7684else
7685  case $LN in
7686  [\\/]* | ?:[\\/]*)
7687  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7688  ;;
7689  *)
7690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7691for as_dir in $PATH
7692do
7693  IFS=$as_save_IFS
7694  test -z "$as_dir" && as_dir=.
7695    for ac_exec_ext in '' $ac_executable_extensions; do
7696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7697    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7699    break 2
7700  fi
7701done
7702  done
7703IFS=$as_save_IFS
7704
7705  ;;
7706esac
7707fi
7708LN=$ac_cv_path_LN
7709if test -n "$LN"; then
7710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7711$as_echo "$LN" >&6; }
7712else
7713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7714$as_echo "no" >&6; }
7715fi
7716
7717
7718        if test "x$LN" = x; then
7719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7720        fi
7721      else
7722        # Otherwise we believe it is a complete path. Use it as it is.
7723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7724$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7726$as_echo_n "checking for LN... " >&6; }
7727        if test ! -x "$tool_specified"; then
7728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7729$as_echo "not found" >&6; }
7730          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7731        fi
7732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7733$as_echo "$tool_specified" >&6; }
7734      fi
7735    fi
7736  fi
7737
7738
7739
7740  if test "x$LN" = x; then
7741    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7742  fi
7743
7744
7745
7746
7747
7748  # Publish this variable in the help.
7749
7750
7751  if test "x$LS" = x; then
7752    # The variable is not set by user, try to locate tool using the code snippet
7753    for ac_prog in ls
7754do
7755  # Extract the first word of "$ac_prog", so it can be a program name with args.
7756set dummy $ac_prog; ac_word=$2
7757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7758$as_echo_n "checking for $ac_word... " >&6; }
7759if ${ac_cv_path_LS+:} false; then :
7760  $as_echo_n "(cached) " >&6
7761else
7762  case $LS in
7763  [\\/]* | ?:[\\/]*)
7764  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7765  ;;
7766  *)
7767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7768for as_dir in $PATH
7769do
7770  IFS=$as_save_IFS
7771  test -z "$as_dir" && as_dir=.
7772    for ac_exec_ext in '' $ac_executable_extensions; do
7773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7774    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7776    break 2
7777  fi
7778done
7779  done
7780IFS=$as_save_IFS
7781
7782  ;;
7783esac
7784fi
7785LS=$ac_cv_path_LS
7786if test -n "$LS"; then
7787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7788$as_echo "$LS" >&6; }
7789else
7790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7791$as_echo "no" >&6; }
7792fi
7793
7794
7795  test -n "$LS" && break
7796done
7797
7798  else
7799    # The variable is set, but is it from the command line or the environment?
7800
7801    # Try to remove the string !LS! from our list.
7802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7804      # If it failed, the variable was not from the command line. Ignore it,
7805      # but warn the user (except for BASH, which is always set by the calling BASH).
7806      if test "xLS" != xBASH; then
7807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7808$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7809      fi
7810      # Try to locate tool using the code snippet
7811      for ac_prog in ls
7812do
7813  # Extract the first word of "$ac_prog", so it can be a program name with args.
7814set dummy $ac_prog; ac_word=$2
7815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7816$as_echo_n "checking for $ac_word... " >&6; }
7817if ${ac_cv_path_LS+:} false; then :
7818  $as_echo_n "(cached) " >&6
7819else
7820  case $LS in
7821  [\\/]* | ?:[\\/]*)
7822  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7823  ;;
7824  *)
7825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7826for as_dir in $PATH
7827do
7828  IFS=$as_save_IFS
7829  test -z "$as_dir" && as_dir=.
7830    for ac_exec_ext in '' $ac_executable_extensions; do
7831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7832    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7834    break 2
7835  fi
7836done
7837  done
7838IFS=$as_save_IFS
7839
7840  ;;
7841esac
7842fi
7843LS=$ac_cv_path_LS
7844if test -n "$LS"; then
7845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7846$as_echo "$LS" >&6; }
7847else
7848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7849$as_echo "no" >&6; }
7850fi
7851
7852
7853  test -n "$LS" && break
7854done
7855
7856    else
7857      # If it succeeded, then it was overridden by the user. We will use it
7858      # for the tool.
7859
7860      # First remove it from the list of overridden variables, so we can test
7861      # for unknown variables in the end.
7862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7863
7864      # Check if the provided tool contains a complete path.
7865      tool_specified="$LS"
7866      tool_basename="${tool_specified##*/}"
7867      if test "x$tool_basename" = "x$tool_specified"; then
7868        # A command without a complete path is provided, search $PATH.
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7870$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7871        # Extract the first word of "$tool_basename", so it can be a program name with args.
7872set dummy $tool_basename; ac_word=$2
7873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7874$as_echo_n "checking for $ac_word... " >&6; }
7875if ${ac_cv_path_LS+:} false; then :
7876  $as_echo_n "(cached) " >&6
7877else
7878  case $LS in
7879  [\\/]* | ?:[\\/]*)
7880  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7881  ;;
7882  *)
7883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7884for as_dir in $PATH
7885do
7886  IFS=$as_save_IFS
7887  test -z "$as_dir" && as_dir=.
7888    for ac_exec_ext in '' $ac_executable_extensions; do
7889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7890    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7892    break 2
7893  fi
7894done
7895  done
7896IFS=$as_save_IFS
7897
7898  ;;
7899esac
7900fi
7901LS=$ac_cv_path_LS
7902if test -n "$LS"; then
7903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7904$as_echo "$LS" >&6; }
7905else
7906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7907$as_echo "no" >&6; }
7908fi
7909
7910
7911        if test "x$LS" = x; then
7912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7913        fi
7914      else
7915        # Otherwise we believe it is a complete path. Use it as it is.
7916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
7917$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
7918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
7919$as_echo_n "checking for LS... " >&6; }
7920        if test ! -x "$tool_specified"; then
7921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7922$as_echo "not found" >&6; }
7923          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
7924        fi
7925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7926$as_echo "$tool_specified" >&6; }
7927      fi
7928    fi
7929  fi
7930
7931
7932
7933  if test "x$LS" = x; then
7934    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
7935  fi
7936
7937
7938
7939
7940
7941  # Publish this variable in the help.
7942
7943
7944  if test "x$MKDIR" = x; then
7945    # The variable is not set by user, try to locate tool using the code snippet
7946    for ac_prog in mkdir
7947do
7948  # Extract the first word of "$ac_prog", so it can be a program name with args.
7949set dummy $ac_prog; ac_word=$2
7950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7951$as_echo_n "checking for $ac_word... " >&6; }
7952if ${ac_cv_path_MKDIR+:} false; then :
7953  $as_echo_n "(cached) " >&6
7954else
7955  case $MKDIR in
7956  [\\/]* | ?:[\\/]*)
7957  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
7958  ;;
7959  *)
7960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7961for as_dir in $PATH
7962do
7963  IFS=$as_save_IFS
7964  test -z "$as_dir" && as_dir=.
7965    for ac_exec_ext in '' $ac_executable_extensions; do
7966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7967    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
7968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7969    break 2
7970  fi
7971done
7972  done
7973IFS=$as_save_IFS
7974
7975  ;;
7976esac
7977fi
7978MKDIR=$ac_cv_path_MKDIR
7979if test -n "$MKDIR"; then
7980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
7981$as_echo "$MKDIR" >&6; }
7982else
7983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7984$as_echo "no" >&6; }
7985fi
7986
7987
7988  test -n "$MKDIR" && break
7989done
7990
7991  else
7992    # The variable is set, but is it from the command line or the environment?
7993
7994    # Try to remove the string !MKDIR! from our list.
7995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
7996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7997      # If it failed, the variable was not from the command line. Ignore it,
7998      # but warn the user (except for BASH, which is always set by the calling BASH).
7999      if test "xMKDIR" != xBASH; then
8000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8001$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8002      fi
8003      # Try to locate tool using the code snippet
8004      for ac_prog in mkdir
8005do
8006  # Extract the first word of "$ac_prog", so it can be a program name with args.
8007set dummy $ac_prog; ac_word=$2
8008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8009$as_echo_n "checking for $ac_word... " >&6; }
8010if ${ac_cv_path_MKDIR+:} false; then :
8011  $as_echo_n "(cached) " >&6
8012else
8013  case $MKDIR in
8014  [\\/]* | ?:[\\/]*)
8015  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8016  ;;
8017  *)
8018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8019for as_dir in $PATH
8020do
8021  IFS=$as_save_IFS
8022  test -z "$as_dir" && as_dir=.
8023    for ac_exec_ext in '' $ac_executable_extensions; do
8024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8025    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8027    break 2
8028  fi
8029done
8030  done
8031IFS=$as_save_IFS
8032
8033  ;;
8034esac
8035fi
8036MKDIR=$ac_cv_path_MKDIR
8037if test -n "$MKDIR"; then
8038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8039$as_echo "$MKDIR" >&6; }
8040else
8041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8042$as_echo "no" >&6; }
8043fi
8044
8045
8046  test -n "$MKDIR" && break
8047done
8048
8049    else
8050      # If it succeeded, then it was overridden by the user. We will use it
8051      # for the tool.
8052
8053      # First remove it from the list of overridden variables, so we can test
8054      # for unknown variables in the end.
8055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8056
8057      # Check if the provided tool contains a complete path.
8058      tool_specified="$MKDIR"
8059      tool_basename="${tool_specified##*/}"
8060      if test "x$tool_basename" = "x$tool_specified"; then
8061        # A command without a complete path is provided, search $PATH.
8062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8063$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8064        # Extract the first word of "$tool_basename", so it can be a program name with args.
8065set dummy $tool_basename; ac_word=$2
8066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8067$as_echo_n "checking for $ac_word... " >&6; }
8068if ${ac_cv_path_MKDIR+:} false; then :
8069  $as_echo_n "(cached) " >&6
8070else
8071  case $MKDIR in
8072  [\\/]* | ?:[\\/]*)
8073  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8074  ;;
8075  *)
8076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8077for as_dir in $PATH
8078do
8079  IFS=$as_save_IFS
8080  test -z "$as_dir" && as_dir=.
8081    for ac_exec_ext in '' $ac_executable_extensions; do
8082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8083    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8085    break 2
8086  fi
8087done
8088  done
8089IFS=$as_save_IFS
8090
8091  ;;
8092esac
8093fi
8094MKDIR=$ac_cv_path_MKDIR
8095if test -n "$MKDIR"; then
8096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8097$as_echo "$MKDIR" >&6; }
8098else
8099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8100$as_echo "no" >&6; }
8101fi
8102
8103
8104        if test "x$MKDIR" = x; then
8105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8106        fi
8107      else
8108        # Otherwise we believe it is a complete path. Use it as it is.
8109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8110$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8112$as_echo_n "checking for MKDIR... " >&6; }
8113        if test ! -x "$tool_specified"; then
8114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8115$as_echo "not found" >&6; }
8116          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8117        fi
8118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8119$as_echo "$tool_specified" >&6; }
8120      fi
8121    fi
8122  fi
8123
8124
8125
8126  if test "x$MKDIR" = x; then
8127    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8128  fi
8129
8130
8131
8132
8133
8134  # Publish this variable in the help.
8135
8136
8137  if test "x$MKTEMP" = x; then
8138    # The variable is not set by user, try to locate tool using the code snippet
8139    for ac_prog in mktemp
8140do
8141  # Extract the first word of "$ac_prog", so it can be a program name with args.
8142set dummy $ac_prog; ac_word=$2
8143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8144$as_echo_n "checking for $ac_word... " >&6; }
8145if ${ac_cv_path_MKTEMP+:} false; then :
8146  $as_echo_n "(cached) " >&6
8147else
8148  case $MKTEMP in
8149  [\\/]* | ?:[\\/]*)
8150  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8151  ;;
8152  *)
8153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8154for as_dir in $PATH
8155do
8156  IFS=$as_save_IFS
8157  test -z "$as_dir" && as_dir=.
8158    for ac_exec_ext in '' $ac_executable_extensions; do
8159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8160    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8162    break 2
8163  fi
8164done
8165  done
8166IFS=$as_save_IFS
8167
8168  ;;
8169esac
8170fi
8171MKTEMP=$ac_cv_path_MKTEMP
8172if test -n "$MKTEMP"; then
8173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8174$as_echo "$MKTEMP" >&6; }
8175else
8176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8177$as_echo "no" >&6; }
8178fi
8179
8180
8181  test -n "$MKTEMP" && break
8182done
8183
8184  else
8185    # The variable is set, but is it from the command line or the environment?
8186
8187    # Try to remove the string !MKTEMP! from our list.
8188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8190      # If it failed, the variable was not from the command line. Ignore it,
8191      # but warn the user (except for BASH, which is always set by the calling BASH).
8192      if test "xMKTEMP" != xBASH; then
8193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8194$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8195      fi
8196      # Try to locate tool using the code snippet
8197      for ac_prog in mktemp
8198do
8199  # Extract the first word of "$ac_prog", so it can be a program name with args.
8200set dummy $ac_prog; ac_word=$2
8201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8202$as_echo_n "checking for $ac_word... " >&6; }
8203if ${ac_cv_path_MKTEMP+:} false; then :
8204  $as_echo_n "(cached) " >&6
8205else
8206  case $MKTEMP in
8207  [\\/]* | ?:[\\/]*)
8208  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8209  ;;
8210  *)
8211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8212for as_dir in $PATH
8213do
8214  IFS=$as_save_IFS
8215  test -z "$as_dir" && as_dir=.
8216    for ac_exec_ext in '' $ac_executable_extensions; do
8217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8218    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8220    break 2
8221  fi
8222done
8223  done
8224IFS=$as_save_IFS
8225
8226  ;;
8227esac
8228fi
8229MKTEMP=$ac_cv_path_MKTEMP
8230if test -n "$MKTEMP"; then
8231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8232$as_echo "$MKTEMP" >&6; }
8233else
8234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8235$as_echo "no" >&6; }
8236fi
8237
8238
8239  test -n "$MKTEMP" && break
8240done
8241
8242    else
8243      # If it succeeded, then it was overridden by the user. We will use it
8244      # for the tool.
8245
8246      # First remove it from the list of overridden variables, so we can test
8247      # for unknown variables in the end.
8248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8249
8250      # Check if the provided tool contains a complete path.
8251      tool_specified="$MKTEMP"
8252      tool_basename="${tool_specified##*/}"
8253      if test "x$tool_basename" = "x$tool_specified"; then
8254        # A command without a complete path is provided, search $PATH.
8255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8256$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8257        # Extract the first word of "$tool_basename", so it can be a program name with args.
8258set dummy $tool_basename; ac_word=$2
8259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8260$as_echo_n "checking for $ac_word... " >&6; }
8261if ${ac_cv_path_MKTEMP+:} false; then :
8262  $as_echo_n "(cached) " >&6
8263else
8264  case $MKTEMP in
8265  [\\/]* | ?:[\\/]*)
8266  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8267  ;;
8268  *)
8269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8270for as_dir in $PATH
8271do
8272  IFS=$as_save_IFS
8273  test -z "$as_dir" && as_dir=.
8274    for ac_exec_ext in '' $ac_executable_extensions; do
8275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8276    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8278    break 2
8279  fi
8280done
8281  done
8282IFS=$as_save_IFS
8283
8284  ;;
8285esac
8286fi
8287MKTEMP=$ac_cv_path_MKTEMP
8288if test -n "$MKTEMP"; then
8289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8290$as_echo "$MKTEMP" >&6; }
8291else
8292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8293$as_echo "no" >&6; }
8294fi
8295
8296
8297        if test "x$MKTEMP" = x; then
8298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8299        fi
8300      else
8301        # Otherwise we believe it is a complete path. Use it as it is.
8302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8303$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8305$as_echo_n "checking for MKTEMP... " >&6; }
8306        if test ! -x "$tool_specified"; then
8307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8308$as_echo "not found" >&6; }
8309          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8310        fi
8311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8312$as_echo "$tool_specified" >&6; }
8313      fi
8314    fi
8315  fi
8316
8317
8318
8319  if test "x$MKTEMP" = x; then
8320    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8321  fi
8322
8323
8324
8325
8326
8327  # Publish this variable in the help.
8328
8329
8330  if test "x$MV" = x; then
8331    # The variable is not set by user, try to locate tool using the code snippet
8332    for ac_prog in mv
8333do
8334  # Extract the first word of "$ac_prog", so it can be a program name with args.
8335set dummy $ac_prog; ac_word=$2
8336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8337$as_echo_n "checking for $ac_word... " >&6; }
8338if ${ac_cv_path_MV+:} false; then :
8339  $as_echo_n "(cached) " >&6
8340else
8341  case $MV in
8342  [\\/]* | ?:[\\/]*)
8343  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8344  ;;
8345  *)
8346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8347for as_dir in $PATH
8348do
8349  IFS=$as_save_IFS
8350  test -z "$as_dir" && as_dir=.
8351    for ac_exec_ext in '' $ac_executable_extensions; do
8352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8353    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8355    break 2
8356  fi
8357done
8358  done
8359IFS=$as_save_IFS
8360
8361  ;;
8362esac
8363fi
8364MV=$ac_cv_path_MV
8365if test -n "$MV"; then
8366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8367$as_echo "$MV" >&6; }
8368else
8369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8370$as_echo "no" >&6; }
8371fi
8372
8373
8374  test -n "$MV" && break
8375done
8376
8377  else
8378    # The variable is set, but is it from the command line or the environment?
8379
8380    # Try to remove the string !MV! from our list.
8381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8383      # If it failed, the variable was not from the command line. Ignore it,
8384      # but warn the user (except for BASH, which is always set by the calling BASH).
8385      if test "xMV" != xBASH; then
8386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8387$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8388      fi
8389      # Try to locate tool using the code snippet
8390      for ac_prog in mv
8391do
8392  # Extract the first word of "$ac_prog", so it can be a program name with args.
8393set dummy $ac_prog; ac_word=$2
8394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8395$as_echo_n "checking for $ac_word... " >&6; }
8396if ${ac_cv_path_MV+:} false; then :
8397  $as_echo_n "(cached) " >&6
8398else
8399  case $MV in
8400  [\\/]* | ?:[\\/]*)
8401  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8402  ;;
8403  *)
8404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8405for as_dir in $PATH
8406do
8407  IFS=$as_save_IFS
8408  test -z "$as_dir" && as_dir=.
8409    for ac_exec_ext in '' $ac_executable_extensions; do
8410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8411    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8413    break 2
8414  fi
8415done
8416  done
8417IFS=$as_save_IFS
8418
8419  ;;
8420esac
8421fi
8422MV=$ac_cv_path_MV
8423if test -n "$MV"; then
8424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8425$as_echo "$MV" >&6; }
8426else
8427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8428$as_echo "no" >&6; }
8429fi
8430
8431
8432  test -n "$MV" && break
8433done
8434
8435    else
8436      # If it succeeded, then it was overridden by the user. We will use it
8437      # for the tool.
8438
8439      # First remove it from the list of overridden variables, so we can test
8440      # for unknown variables in the end.
8441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8442
8443      # Check if the provided tool contains a complete path.
8444      tool_specified="$MV"
8445      tool_basename="${tool_specified##*/}"
8446      if test "x$tool_basename" = "x$tool_specified"; then
8447        # A command without a complete path is provided, search $PATH.
8448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8449$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8450        # Extract the first word of "$tool_basename", so it can be a program name with args.
8451set dummy $tool_basename; ac_word=$2
8452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8453$as_echo_n "checking for $ac_word... " >&6; }
8454if ${ac_cv_path_MV+:} false; then :
8455  $as_echo_n "(cached) " >&6
8456else
8457  case $MV in
8458  [\\/]* | ?:[\\/]*)
8459  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8460  ;;
8461  *)
8462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8463for as_dir in $PATH
8464do
8465  IFS=$as_save_IFS
8466  test -z "$as_dir" && as_dir=.
8467    for ac_exec_ext in '' $ac_executable_extensions; do
8468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8469    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8471    break 2
8472  fi
8473done
8474  done
8475IFS=$as_save_IFS
8476
8477  ;;
8478esac
8479fi
8480MV=$ac_cv_path_MV
8481if test -n "$MV"; then
8482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8483$as_echo "$MV" >&6; }
8484else
8485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8486$as_echo "no" >&6; }
8487fi
8488
8489
8490        if test "x$MV" = x; then
8491          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8492        fi
8493      else
8494        # Otherwise we believe it is a complete path. Use it as it is.
8495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8496$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8498$as_echo_n "checking for MV... " >&6; }
8499        if test ! -x "$tool_specified"; then
8500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8501$as_echo "not found" >&6; }
8502          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8503        fi
8504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8505$as_echo "$tool_specified" >&6; }
8506      fi
8507    fi
8508  fi
8509
8510
8511
8512  if test "x$MV" = x; then
8513    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8514  fi
8515
8516
8517
8518
8519
8520  # Publish this variable in the help.
8521
8522
8523  if test "x$NAWK" = x; then
8524    # The variable is not set by user, try to locate tool using the code snippet
8525    for ac_prog in nawk gawk awk
8526do
8527  # Extract the first word of "$ac_prog", so it can be a program name with args.
8528set dummy $ac_prog; ac_word=$2
8529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8530$as_echo_n "checking for $ac_word... " >&6; }
8531if ${ac_cv_path_NAWK+:} false; then :
8532  $as_echo_n "(cached) " >&6
8533else
8534  case $NAWK in
8535  [\\/]* | ?:[\\/]*)
8536  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8537  ;;
8538  *)
8539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8540for as_dir in $PATH
8541do
8542  IFS=$as_save_IFS
8543  test -z "$as_dir" && as_dir=.
8544    for ac_exec_ext in '' $ac_executable_extensions; do
8545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8546    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8548    break 2
8549  fi
8550done
8551  done
8552IFS=$as_save_IFS
8553
8554  ;;
8555esac
8556fi
8557NAWK=$ac_cv_path_NAWK
8558if test -n "$NAWK"; then
8559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8560$as_echo "$NAWK" >&6; }
8561else
8562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8563$as_echo "no" >&6; }
8564fi
8565
8566
8567  test -n "$NAWK" && break
8568done
8569
8570  else
8571    # The variable is set, but is it from the command line or the environment?
8572
8573    # Try to remove the string !NAWK! from our list.
8574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8576      # If it failed, the variable was not from the command line. Ignore it,
8577      # but warn the user (except for BASH, which is always set by the calling BASH).
8578      if test "xNAWK" != xBASH; then
8579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8580$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8581      fi
8582      # Try to locate tool using the code snippet
8583      for ac_prog in nawk gawk awk
8584do
8585  # Extract the first word of "$ac_prog", so it can be a program name with args.
8586set dummy $ac_prog; ac_word=$2
8587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8588$as_echo_n "checking for $ac_word... " >&6; }
8589if ${ac_cv_path_NAWK+:} false; then :
8590  $as_echo_n "(cached) " >&6
8591else
8592  case $NAWK in
8593  [\\/]* | ?:[\\/]*)
8594  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8595  ;;
8596  *)
8597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8598for as_dir in $PATH
8599do
8600  IFS=$as_save_IFS
8601  test -z "$as_dir" && as_dir=.
8602    for ac_exec_ext in '' $ac_executable_extensions; do
8603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8604    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8606    break 2
8607  fi
8608done
8609  done
8610IFS=$as_save_IFS
8611
8612  ;;
8613esac
8614fi
8615NAWK=$ac_cv_path_NAWK
8616if test -n "$NAWK"; then
8617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8618$as_echo "$NAWK" >&6; }
8619else
8620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8621$as_echo "no" >&6; }
8622fi
8623
8624
8625  test -n "$NAWK" && break
8626done
8627
8628    else
8629      # If it succeeded, then it was overridden by the user. We will use it
8630      # for the tool.
8631
8632      # First remove it from the list of overridden variables, so we can test
8633      # for unknown variables in the end.
8634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8635
8636      # Check if the provided tool contains a complete path.
8637      tool_specified="$NAWK"
8638      tool_basename="${tool_specified##*/}"
8639      if test "x$tool_basename" = "x$tool_specified"; then
8640        # A command without a complete path is provided, search $PATH.
8641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8642$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8643        # Extract the first word of "$tool_basename", so it can be a program name with args.
8644set dummy $tool_basename; ac_word=$2
8645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8646$as_echo_n "checking for $ac_word... " >&6; }
8647if ${ac_cv_path_NAWK+:} false; then :
8648  $as_echo_n "(cached) " >&6
8649else
8650  case $NAWK in
8651  [\\/]* | ?:[\\/]*)
8652  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8653  ;;
8654  *)
8655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8656for as_dir in $PATH
8657do
8658  IFS=$as_save_IFS
8659  test -z "$as_dir" && as_dir=.
8660    for ac_exec_ext in '' $ac_executable_extensions; do
8661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8662    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8664    break 2
8665  fi
8666done
8667  done
8668IFS=$as_save_IFS
8669
8670  ;;
8671esac
8672fi
8673NAWK=$ac_cv_path_NAWK
8674if test -n "$NAWK"; then
8675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8676$as_echo "$NAWK" >&6; }
8677else
8678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8679$as_echo "no" >&6; }
8680fi
8681
8682
8683        if test "x$NAWK" = x; then
8684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8685        fi
8686      else
8687        # Otherwise we believe it is a complete path. Use it as it is.
8688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8689$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8691$as_echo_n "checking for NAWK... " >&6; }
8692        if test ! -x "$tool_specified"; then
8693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8694$as_echo "not found" >&6; }
8695          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8696        fi
8697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8698$as_echo "$tool_specified" >&6; }
8699      fi
8700    fi
8701  fi
8702
8703
8704
8705  if test "x$NAWK" = x; then
8706    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8707  fi
8708
8709
8710
8711
8712
8713  # Publish this variable in the help.
8714
8715
8716  if test "x$PRINTF" = x; then
8717    # The variable is not set by user, try to locate tool using the code snippet
8718    for ac_prog in printf
8719do
8720  # Extract the first word of "$ac_prog", so it can be a program name with args.
8721set dummy $ac_prog; ac_word=$2
8722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8723$as_echo_n "checking for $ac_word... " >&6; }
8724if ${ac_cv_path_PRINTF+:} false; then :
8725  $as_echo_n "(cached) " >&6
8726else
8727  case $PRINTF in
8728  [\\/]* | ?:[\\/]*)
8729  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8730  ;;
8731  *)
8732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8733for as_dir in $PATH
8734do
8735  IFS=$as_save_IFS
8736  test -z "$as_dir" && as_dir=.
8737    for ac_exec_ext in '' $ac_executable_extensions; do
8738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8739    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8741    break 2
8742  fi
8743done
8744  done
8745IFS=$as_save_IFS
8746
8747  ;;
8748esac
8749fi
8750PRINTF=$ac_cv_path_PRINTF
8751if test -n "$PRINTF"; then
8752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8753$as_echo "$PRINTF" >&6; }
8754else
8755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8756$as_echo "no" >&6; }
8757fi
8758
8759
8760  test -n "$PRINTF" && break
8761done
8762
8763  else
8764    # The variable is set, but is it from the command line or the environment?
8765
8766    # Try to remove the string !PRINTF! from our list.
8767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8769      # If it failed, the variable was not from the command line. Ignore it,
8770      # but warn the user (except for BASH, which is always set by the calling BASH).
8771      if test "xPRINTF" != xBASH; then
8772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8773$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8774      fi
8775      # Try to locate tool using the code snippet
8776      for ac_prog in printf
8777do
8778  # Extract the first word of "$ac_prog", so it can be a program name with args.
8779set dummy $ac_prog; ac_word=$2
8780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8781$as_echo_n "checking for $ac_word... " >&6; }
8782if ${ac_cv_path_PRINTF+:} false; then :
8783  $as_echo_n "(cached) " >&6
8784else
8785  case $PRINTF in
8786  [\\/]* | ?:[\\/]*)
8787  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8788  ;;
8789  *)
8790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8791for as_dir in $PATH
8792do
8793  IFS=$as_save_IFS
8794  test -z "$as_dir" && as_dir=.
8795    for ac_exec_ext in '' $ac_executable_extensions; do
8796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8797    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8799    break 2
8800  fi
8801done
8802  done
8803IFS=$as_save_IFS
8804
8805  ;;
8806esac
8807fi
8808PRINTF=$ac_cv_path_PRINTF
8809if test -n "$PRINTF"; then
8810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8811$as_echo "$PRINTF" >&6; }
8812else
8813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8814$as_echo "no" >&6; }
8815fi
8816
8817
8818  test -n "$PRINTF" && break
8819done
8820
8821    else
8822      # If it succeeded, then it was overridden by the user. We will use it
8823      # for the tool.
8824
8825      # First remove it from the list of overridden variables, so we can test
8826      # for unknown variables in the end.
8827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8828
8829      # Check if the provided tool contains a complete path.
8830      tool_specified="$PRINTF"
8831      tool_basename="${tool_specified##*/}"
8832      if test "x$tool_basename" = "x$tool_specified"; then
8833        # A command without a complete path is provided, search $PATH.
8834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8835$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8836        # Extract the first word of "$tool_basename", so it can be a program name with args.
8837set dummy $tool_basename; ac_word=$2
8838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8839$as_echo_n "checking for $ac_word... " >&6; }
8840if ${ac_cv_path_PRINTF+:} false; then :
8841  $as_echo_n "(cached) " >&6
8842else
8843  case $PRINTF in
8844  [\\/]* | ?:[\\/]*)
8845  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8846  ;;
8847  *)
8848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8849for as_dir in $PATH
8850do
8851  IFS=$as_save_IFS
8852  test -z "$as_dir" && as_dir=.
8853    for ac_exec_ext in '' $ac_executable_extensions; do
8854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8855    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8857    break 2
8858  fi
8859done
8860  done
8861IFS=$as_save_IFS
8862
8863  ;;
8864esac
8865fi
8866PRINTF=$ac_cv_path_PRINTF
8867if test -n "$PRINTF"; then
8868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8869$as_echo "$PRINTF" >&6; }
8870else
8871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8872$as_echo "no" >&6; }
8873fi
8874
8875
8876        if test "x$PRINTF" = x; then
8877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8878        fi
8879      else
8880        # Otherwise we believe it is a complete path. Use it as it is.
8881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8882$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8884$as_echo_n "checking for PRINTF... " >&6; }
8885        if test ! -x "$tool_specified"; then
8886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8887$as_echo "not found" >&6; }
8888          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8889        fi
8890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8891$as_echo "$tool_specified" >&6; }
8892      fi
8893    fi
8894  fi
8895
8896
8897
8898  if test "x$PRINTF" = x; then
8899    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8900  fi
8901
8902
8903
8904
8905
8906  # Publish this variable in the help.
8907
8908
8909  if test "x$RM" = x; then
8910    # The variable is not set by user, try to locate tool using the code snippet
8911    for ac_prog in rm
8912do
8913  # Extract the first word of "$ac_prog", so it can be a program name with args.
8914set dummy $ac_prog; ac_word=$2
8915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8916$as_echo_n "checking for $ac_word... " >&6; }
8917if ${ac_cv_path_RM+:} false; then :
8918  $as_echo_n "(cached) " >&6
8919else
8920  case $RM in
8921  [\\/]* | ?:[\\/]*)
8922  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8923  ;;
8924  *)
8925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8926for as_dir in $PATH
8927do
8928  IFS=$as_save_IFS
8929  test -z "$as_dir" && as_dir=.
8930    for ac_exec_ext in '' $ac_executable_extensions; do
8931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8932    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8934    break 2
8935  fi
8936done
8937  done
8938IFS=$as_save_IFS
8939
8940  ;;
8941esac
8942fi
8943RM=$ac_cv_path_RM
8944if test -n "$RM"; then
8945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
8946$as_echo "$RM" >&6; }
8947else
8948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8949$as_echo "no" >&6; }
8950fi
8951
8952
8953  test -n "$RM" && break
8954done
8955
8956  else
8957    # The variable is set, but is it from the command line or the environment?
8958
8959    # Try to remove the string !RM! from our list.
8960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
8961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8962      # If it failed, the variable was not from the command line. Ignore it,
8963      # but warn the user (except for BASH, which is always set by the calling BASH).
8964      if test "xRM" != xBASH; then
8965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
8966$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
8967      fi
8968      # Try to locate tool using the code snippet
8969      for ac_prog in rm
8970do
8971  # Extract the first word of "$ac_prog", so it can be a program name with args.
8972set dummy $ac_prog; ac_word=$2
8973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8974$as_echo_n "checking for $ac_word... " >&6; }
8975if ${ac_cv_path_RM+:} false; then :
8976  $as_echo_n "(cached) " >&6
8977else
8978  case $RM in
8979  [\\/]* | ?:[\\/]*)
8980  ac_cv_path_RM="$RM" # Let the user override the test with a path.
8981  ;;
8982  *)
8983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8984for as_dir in $PATH
8985do
8986  IFS=$as_save_IFS
8987  test -z "$as_dir" && as_dir=.
8988    for ac_exec_ext in '' $ac_executable_extensions; do
8989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8990    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
8991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8992    break 2
8993  fi
8994done
8995  done
8996IFS=$as_save_IFS
8997
8998  ;;
8999esac
9000fi
9001RM=$ac_cv_path_RM
9002if test -n "$RM"; then
9003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9004$as_echo "$RM" >&6; }
9005else
9006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9007$as_echo "no" >&6; }
9008fi
9009
9010
9011  test -n "$RM" && break
9012done
9013
9014    else
9015      # If it succeeded, then it was overridden by the user. We will use it
9016      # for the tool.
9017
9018      # First remove it from the list of overridden variables, so we can test
9019      # for unknown variables in the end.
9020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9021
9022      # Check if the provided tool contains a complete path.
9023      tool_specified="$RM"
9024      tool_basename="${tool_specified##*/}"
9025      if test "x$tool_basename" = "x$tool_specified"; then
9026        # A command without a complete path is provided, search $PATH.
9027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9028$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9029        # Extract the first word of "$tool_basename", so it can be a program name with args.
9030set dummy $tool_basename; ac_word=$2
9031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9032$as_echo_n "checking for $ac_word... " >&6; }
9033if ${ac_cv_path_RM+:} false; then :
9034  $as_echo_n "(cached) " >&6
9035else
9036  case $RM in
9037  [\\/]* | ?:[\\/]*)
9038  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9039  ;;
9040  *)
9041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9042for as_dir in $PATH
9043do
9044  IFS=$as_save_IFS
9045  test -z "$as_dir" && as_dir=.
9046    for ac_exec_ext in '' $ac_executable_extensions; do
9047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9048    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9050    break 2
9051  fi
9052done
9053  done
9054IFS=$as_save_IFS
9055
9056  ;;
9057esac
9058fi
9059RM=$ac_cv_path_RM
9060if test -n "$RM"; then
9061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9062$as_echo "$RM" >&6; }
9063else
9064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9065$as_echo "no" >&6; }
9066fi
9067
9068
9069        if test "x$RM" = x; then
9070          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9071        fi
9072      else
9073        # Otherwise we believe it is a complete path. Use it as it is.
9074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9075$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9077$as_echo_n "checking for RM... " >&6; }
9078        if test ! -x "$tool_specified"; then
9079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9080$as_echo "not found" >&6; }
9081          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9082        fi
9083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9084$as_echo "$tool_specified" >&6; }
9085      fi
9086    fi
9087  fi
9088
9089
9090
9091  if test "x$RM" = x; then
9092    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9093  fi
9094
9095
9096
9097
9098
9099  # Publish this variable in the help.
9100
9101
9102  if test "x$SH" = x; then
9103    # The variable is not set by user, try to locate tool using the code snippet
9104    for ac_prog in sh
9105do
9106  # Extract the first word of "$ac_prog", so it can be a program name with args.
9107set dummy $ac_prog; ac_word=$2
9108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9109$as_echo_n "checking for $ac_word... " >&6; }
9110if ${ac_cv_path_SH+:} false; then :
9111  $as_echo_n "(cached) " >&6
9112else
9113  case $SH in
9114  [\\/]* | ?:[\\/]*)
9115  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9116  ;;
9117  *)
9118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9119for as_dir in $PATH
9120do
9121  IFS=$as_save_IFS
9122  test -z "$as_dir" && as_dir=.
9123    for ac_exec_ext in '' $ac_executable_extensions; do
9124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9125    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9127    break 2
9128  fi
9129done
9130  done
9131IFS=$as_save_IFS
9132
9133  ;;
9134esac
9135fi
9136SH=$ac_cv_path_SH
9137if test -n "$SH"; then
9138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9139$as_echo "$SH" >&6; }
9140else
9141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9142$as_echo "no" >&6; }
9143fi
9144
9145
9146  test -n "$SH" && break
9147done
9148
9149  else
9150    # The variable is set, but is it from the command line or the environment?
9151
9152    # Try to remove the string !SH! from our list.
9153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9155      # If it failed, the variable was not from the command line. Ignore it,
9156      # but warn the user (except for BASH, which is always set by the calling BASH).
9157      if test "xSH" != xBASH; then
9158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9159$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9160      fi
9161      # Try to locate tool using the code snippet
9162      for ac_prog in sh
9163do
9164  # Extract the first word of "$ac_prog", so it can be a program name with args.
9165set dummy $ac_prog; ac_word=$2
9166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9167$as_echo_n "checking for $ac_word... " >&6; }
9168if ${ac_cv_path_SH+:} false; then :
9169  $as_echo_n "(cached) " >&6
9170else
9171  case $SH in
9172  [\\/]* | ?:[\\/]*)
9173  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9174  ;;
9175  *)
9176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9177for as_dir in $PATH
9178do
9179  IFS=$as_save_IFS
9180  test -z "$as_dir" && as_dir=.
9181    for ac_exec_ext in '' $ac_executable_extensions; do
9182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9183    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9185    break 2
9186  fi
9187done
9188  done
9189IFS=$as_save_IFS
9190
9191  ;;
9192esac
9193fi
9194SH=$ac_cv_path_SH
9195if test -n "$SH"; then
9196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9197$as_echo "$SH" >&6; }
9198else
9199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200$as_echo "no" >&6; }
9201fi
9202
9203
9204  test -n "$SH" && break
9205done
9206
9207    else
9208      # If it succeeded, then it was overridden by the user. We will use it
9209      # for the tool.
9210
9211      # First remove it from the list of overridden variables, so we can test
9212      # for unknown variables in the end.
9213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9214
9215      # Check if the provided tool contains a complete path.
9216      tool_specified="$SH"
9217      tool_basename="${tool_specified##*/}"
9218      if test "x$tool_basename" = "x$tool_specified"; then
9219        # A command without a complete path is provided, search $PATH.
9220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9221$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9222        # Extract the first word of "$tool_basename", so it can be a program name with args.
9223set dummy $tool_basename; ac_word=$2
9224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9225$as_echo_n "checking for $ac_word... " >&6; }
9226if ${ac_cv_path_SH+:} false; then :
9227  $as_echo_n "(cached) " >&6
9228else
9229  case $SH in
9230  [\\/]* | ?:[\\/]*)
9231  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9232  ;;
9233  *)
9234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9235for as_dir in $PATH
9236do
9237  IFS=$as_save_IFS
9238  test -z "$as_dir" && as_dir=.
9239    for ac_exec_ext in '' $ac_executable_extensions; do
9240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9241    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9243    break 2
9244  fi
9245done
9246  done
9247IFS=$as_save_IFS
9248
9249  ;;
9250esac
9251fi
9252SH=$ac_cv_path_SH
9253if test -n "$SH"; then
9254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9255$as_echo "$SH" >&6; }
9256else
9257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9258$as_echo "no" >&6; }
9259fi
9260
9261
9262        if test "x$SH" = x; then
9263          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9264        fi
9265      else
9266        # Otherwise we believe it is a complete path. Use it as it is.
9267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9268$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9270$as_echo_n "checking for SH... " >&6; }
9271        if test ! -x "$tool_specified"; then
9272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9273$as_echo "not found" >&6; }
9274          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9275        fi
9276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9277$as_echo "$tool_specified" >&6; }
9278      fi
9279    fi
9280  fi
9281
9282
9283
9284  if test "x$SH" = x; then
9285    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9286  fi
9287
9288
9289
9290
9291
9292  # Publish this variable in the help.
9293
9294
9295  if test "x$SORT" = x; then
9296    # The variable is not set by user, try to locate tool using the code snippet
9297    for ac_prog in sort
9298do
9299  # Extract the first word of "$ac_prog", so it can be a program name with args.
9300set dummy $ac_prog; ac_word=$2
9301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9302$as_echo_n "checking for $ac_word... " >&6; }
9303if ${ac_cv_path_SORT+:} false; then :
9304  $as_echo_n "(cached) " >&6
9305else
9306  case $SORT in
9307  [\\/]* | ?:[\\/]*)
9308  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9309  ;;
9310  *)
9311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9312for as_dir in $PATH
9313do
9314  IFS=$as_save_IFS
9315  test -z "$as_dir" && as_dir=.
9316    for ac_exec_ext in '' $ac_executable_extensions; do
9317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9318    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9320    break 2
9321  fi
9322done
9323  done
9324IFS=$as_save_IFS
9325
9326  ;;
9327esac
9328fi
9329SORT=$ac_cv_path_SORT
9330if test -n "$SORT"; then
9331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9332$as_echo "$SORT" >&6; }
9333else
9334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9335$as_echo "no" >&6; }
9336fi
9337
9338
9339  test -n "$SORT" && break
9340done
9341
9342  else
9343    # The variable is set, but is it from the command line or the environment?
9344
9345    # Try to remove the string !SORT! from our list.
9346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9348      # If it failed, the variable was not from the command line. Ignore it,
9349      # but warn the user (except for BASH, which is always set by the calling BASH).
9350      if test "xSORT" != xBASH; then
9351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9352$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9353      fi
9354      # Try to locate tool using the code snippet
9355      for ac_prog in sort
9356do
9357  # Extract the first word of "$ac_prog", so it can be a program name with args.
9358set dummy $ac_prog; ac_word=$2
9359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9360$as_echo_n "checking for $ac_word... " >&6; }
9361if ${ac_cv_path_SORT+:} false; then :
9362  $as_echo_n "(cached) " >&6
9363else
9364  case $SORT in
9365  [\\/]* | ?:[\\/]*)
9366  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9367  ;;
9368  *)
9369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9370for as_dir in $PATH
9371do
9372  IFS=$as_save_IFS
9373  test -z "$as_dir" && as_dir=.
9374    for ac_exec_ext in '' $ac_executable_extensions; do
9375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9376    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9378    break 2
9379  fi
9380done
9381  done
9382IFS=$as_save_IFS
9383
9384  ;;
9385esac
9386fi
9387SORT=$ac_cv_path_SORT
9388if test -n "$SORT"; then
9389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9390$as_echo "$SORT" >&6; }
9391else
9392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9393$as_echo "no" >&6; }
9394fi
9395
9396
9397  test -n "$SORT" && break
9398done
9399
9400    else
9401      # If it succeeded, then it was overridden by the user. We will use it
9402      # for the tool.
9403
9404      # First remove it from the list of overridden variables, so we can test
9405      # for unknown variables in the end.
9406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9407
9408      # Check if the provided tool contains a complete path.
9409      tool_specified="$SORT"
9410      tool_basename="${tool_specified##*/}"
9411      if test "x$tool_basename" = "x$tool_specified"; then
9412        # A command without a complete path is provided, search $PATH.
9413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9414$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9415        # Extract the first word of "$tool_basename", so it can be a program name with args.
9416set dummy $tool_basename; ac_word=$2
9417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9418$as_echo_n "checking for $ac_word... " >&6; }
9419if ${ac_cv_path_SORT+:} false; then :
9420  $as_echo_n "(cached) " >&6
9421else
9422  case $SORT in
9423  [\\/]* | ?:[\\/]*)
9424  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9425  ;;
9426  *)
9427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9428for as_dir in $PATH
9429do
9430  IFS=$as_save_IFS
9431  test -z "$as_dir" && as_dir=.
9432    for ac_exec_ext in '' $ac_executable_extensions; do
9433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9434    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9436    break 2
9437  fi
9438done
9439  done
9440IFS=$as_save_IFS
9441
9442  ;;
9443esac
9444fi
9445SORT=$ac_cv_path_SORT
9446if test -n "$SORT"; then
9447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9448$as_echo "$SORT" >&6; }
9449else
9450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9451$as_echo "no" >&6; }
9452fi
9453
9454
9455        if test "x$SORT" = x; then
9456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9457        fi
9458      else
9459        # Otherwise we believe it is a complete path. Use it as it is.
9460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9461$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9463$as_echo_n "checking for SORT... " >&6; }
9464        if test ! -x "$tool_specified"; then
9465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9466$as_echo "not found" >&6; }
9467          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9468        fi
9469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9470$as_echo "$tool_specified" >&6; }
9471      fi
9472    fi
9473  fi
9474
9475
9476
9477  if test "x$SORT" = x; then
9478    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9479  fi
9480
9481
9482
9483
9484
9485  # Publish this variable in the help.
9486
9487
9488  if test "x$TAIL" = x; then
9489    # The variable is not set by user, try to locate tool using the code snippet
9490    for ac_prog in tail
9491do
9492  # Extract the first word of "$ac_prog", so it can be a program name with args.
9493set dummy $ac_prog; ac_word=$2
9494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9495$as_echo_n "checking for $ac_word... " >&6; }
9496if ${ac_cv_path_TAIL+:} false; then :
9497  $as_echo_n "(cached) " >&6
9498else
9499  case $TAIL in
9500  [\\/]* | ?:[\\/]*)
9501  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9502  ;;
9503  *)
9504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9505for as_dir in $PATH
9506do
9507  IFS=$as_save_IFS
9508  test -z "$as_dir" && as_dir=.
9509    for ac_exec_ext in '' $ac_executable_extensions; do
9510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9511    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9513    break 2
9514  fi
9515done
9516  done
9517IFS=$as_save_IFS
9518
9519  ;;
9520esac
9521fi
9522TAIL=$ac_cv_path_TAIL
9523if test -n "$TAIL"; then
9524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9525$as_echo "$TAIL" >&6; }
9526else
9527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9528$as_echo "no" >&6; }
9529fi
9530
9531
9532  test -n "$TAIL" && break
9533done
9534
9535  else
9536    # The variable is set, but is it from the command line or the environment?
9537
9538    # Try to remove the string !TAIL! from our list.
9539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9541      # If it failed, the variable was not from the command line. Ignore it,
9542      # but warn the user (except for BASH, which is always set by the calling BASH).
9543      if test "xTAIL" != xBASH; then
9544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9545$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9546      fi
9547      # Try to locate tool using the code snippet
9548      for ac_prog in tail
9549do
9550  # Extract the first word of "$ac_prog", so it can be a program name with args.
9551set dummy $ac_prog; ac_word=$2
9552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9553$as_echo_n "checking for $ac_word... " >&6; }
9554if ${ac_cv_path_TAIL+:} false; then :
9555  $as_echo_n "(cached) " >&6
9556else
9557  case $TAIL in
9558  [\\/]* | ?:[\\/]*)
9559  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9560  ;;
9561  *)
9562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9563for as_dir in $PATH
9564do
9565  IFS=$as_save_IFS
9566  test -z "$as_dir" && as_dir=.
9567    for ac_exec_ext in '' $ac_executable_extensions; do
9568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9569    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9571    break 2
9572  fi
9573done
9574  done
9575IFS=$as_save_IFS
9576
9577  ;;
9578esac
9579fi
9580TAIL=$ac_cv_path_TAIL
9581if test -n "$TAIL"; then
9582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9583$as_echo "$TAIL" >&6; }
9584else
9585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9586$as_echo "no" >&6; }
9587fi
9588
9589
9590  test -n "$TAIL" && break
9591done
9592
9593    else
9594      # If it succeeded, then it was overridden by the user. We will use it
9595      # for the tool.
9596
9597      # First remove it from the list of overridden variables, so we can test
9598      # for unknown variables in the end.
9599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9600
9601      # Check if the provided tool contains a complete path.
9602      tool_specified="$TAIL"
9603      tool_basename="${tool_specified##*/}"
9604      if test "x$tool_basename" = "x$tool_specified"; then
9605        # A command without a complete path is provided, search $PATH.
9606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9607$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9608        # Extract the first word of "$tool_basename", so it can be a program name with args.
9609set dummy $tool_basename; ac_word=$2
9610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9611$as_echo_n "checking for $ac_word... " >&6; }
9612if ${ac_cv_path_TAIL+:} false; then :
9613  $as_echo_n "(cached) " >&6
9614else
9615  case $TAIL in
9616  [\\/]* | ?:[\\/]*)
9617  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9618  ;;
9619  *)
9620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9621for as_dir in $PATH
9622do
9623  IFS=$as_save_IFS
9624  test -z "$as_dir" && as_dir=.
9625    for ac_exec_ext in '' $ac_executable_extensions; do
9626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9627    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9629    break 2
9630  fi
9631done
9632  done
9633IFS=$as_save_IFS
9634
9635  ;;
9636esac
9637fi
9638TAIL=$ac_cv_path_TAIL
9639if test -n "$TAIL"; then
9640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9641$as_echo "$TAIL" >&6; }
9642else
9643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9644$as_echo "no" >&6; }
9645fi
9646
9647
9648        if test "x$TAIL" = x; then
9649          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9650        fi
9651      else
9652        # Otherwise we believe it is a complete path. Use it as it is.
9653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9654$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9656$as_echo_n "checking for TAIL... " >&6; }
9657        if test ! -x "$tool_specified"; then
9658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9659$as_echo "not found" >&6; }
9660          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9661        fi
9662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9663$as_echo "$tool_specified" >&6; }
9664      fi
9665    fi
9666  fi
9667
9668
9669
9670  if test "x$TAIL" = x; then
9671    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9672  fi
9673
9674
9675
9676
9677
9678  # Publish this variable in the help.
9679
9680
9681  if test "x$TAR" = x; then
9682    # The variable is not set by user, try to locate tool using the code snippet
9683    for ac_prog in tar
9684do
9685  # Extract the first word of "$ac_prog", so it can be a program name with args.
9686set dummy $ac_prog; ac_word=$2
9687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9688$as_echo_n "checking for $ac_word... " >&6; }
9689if ${ac_cv_path_TAR+:} false; then :
9690  $as_echo_n "(cached) " >&6
9691else
9692  case $TAR in
9693  [\\/]* | ?:[\\/]*)
9694  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9695  ;;
9696  *)
9697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9698for as_dir in $PATH
9699do
9700  IFS=$as_save_IFS
9701  test -z "$as_dir" && as_dir=.
9702    for ac_exec_ext in '' $ac_executable_extensions; do
9703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9704    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9706    break 2
9707  fi
9708done
9709  done
9710IFS=$as_save_IFS
9711
9712  ;;
9713esac
9714fi
9715TAR=$ac_cv_path_TAR
9716if test -n "$TAR"; then
9717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9718$as_echo "$TAR" >&6; }
9719else
9720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9721$as_echo "no" >&6; }
9722fi
9723
9724
9725  test -n "$TAR" && break
9726done
9727
9728  else
9729    # The variable is set, but is it from the command line or the environment?
9730
9731    # Try to remove the string !TAR! from our list.
9732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9734      # If it failed, the variable was not from the command line. Ignore it,
9735      # but warn the user (except for BASH, which is always set by the calling BASH).
9736      if test "xTAR" != xBASH; then
9737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9738$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9739      fi
9740      # Try to locate tool using the code snippet
9741      for ac_prog in tar
9742do
9743  # Extract the first word of "$ac_prog", so it can be a program name with args.
9744set dummy $ac_prog; ac_word=$2
9745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9746$as_echo_n "checking for $ac_word... " >&6; }
9747if ${ac_cv_path_TAR+:} false; then :
9748  $as_echo_n "(cached) " >&6
9749else
9750  case $TAR in
9751  [\\/]* | ?:[\\/]*)
9752  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9753  ;;
9754  *)
9755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9756for as_dir in $PATH
9757do
9758  IFS=$as_save_IFS
9759  test -z "$as_dir" && as_dir=.
9760    for ac_exec_ext in '' $ac_executable_extensions; do
9761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9762    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9764    break 2
9765  fi
9766done
9767  done
9768IFS=$as_save_IFS
9769
9770  ;;
9771esac
9772fi
9773TAR=$ac_cv_path_TAR
9774if test -n "$TAR"; then
9775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9776$as_echo "$TAR" >&6; }
9777else
9778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9779$as_echo "no" >&6; }
9780fi
9781
9782
9783  test -n "$TAR" && break
9784done
9785
9786    else
9787      # If it succeeded, then it was overridden by the user. We will use it
9788      # for the tool.
9789
9790      # First remove it from the list of overridden variables, so we can test
9791      # for unknown variables in the end.
9792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9793
9794      # Check if the provided tool contains a complete path.
9795      tool_specified="$TAR"
9796      tool_basename="${tool_specified##*/}"
9797      if test "x$tool_basename" = "x$tool_specified"; then
9798        # A command without a complete path is provided, search $PATH.
9799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9800$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9801        # Extract the first word of "$tool_basename", so it can be a program name with args.
9802set dummy $tool_basename; ac_word=$2
9803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9804$as_echo_n "checking for $ac_word... " >&6; }
9805if ${ac_cv_path_TAR+:} false; then :
9806  $as_echo_n "(cached) " >&6
9807else
9808  case $TAR in
9809  [\\/]* | ?:[\\/]*)
9810  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9811  ;;
9812  *)
9813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9814for as_dir in $PATH
9815do
9816  IFS=$as_save_IFS
9817  test -z "$as_dir" && as_dir=.
9818    for ac_exec_ext in '' $ac_executable_extensions; do
9819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9820    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9822    break 2
9823  fi
9824done
9825  done
9826IFS=$as_save_IFS
9827
9828  ;;
9829esac
9830fi
9831TAR=$ac_cv_path_TAR
9832if test -n "$TAR"; then
9833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9834$as_echo "$TAR" >&6; }
9835else
9836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9837$as_echo "no" >&6; }
9838fi
9839
9840
9841        if test "x$TAR" = x; then
9842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9843        fi
9844      else
9845        # Otherwise we believe it is a complete path. Use it as it is.
9846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9847$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9849$as_echo_n "checking for TAR... " >&6; }
9850        if test ! -x "$tool_specified"; then
9851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9852$as_echo "not found" >&6; }
9853          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9854        fi
9855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9856$as_echo "$tool_specified" >&6; }
9857      fi
9858    fi
9859  fi
9860
9861
9862
9863  if test "x$TAR" = x; then
9864    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9865  fi
9866
9867
9868
9869
9870
9871  # Publish this variable in the help.
9872
9873
9874  if test "x$TEE" = x; then
9875    # The variable is not set by user, try to locate tool using the code snippet
9876    for ac_prog in tee
9877do
9878  # Extract the first word of "$ac_prog", so it can be a program name with args.
9879set dummy $ac_prog; ac_word=$2
9880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9881$as_echo_n "checking for $ac_word... " >&6; }
9882if ${ac_cv_path_TEE+:} false; then :
9883  $as_echo_n "(cached) " >&6
9884else
9885  case $TEE in
9886  [\\/]* | ?:[\\/]*)
9887  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9888  ;;
9889  *)
9890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9891for as_dir in $PATH
9892do
9893  IFS=$as_save_IFS
9894  test -z "$as_dir" && as_dir=.
9895    for ac_exec_ext in '' $ac_executable_extensions; do
9896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9897    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9899    break 2
9900  fi
9901done
9902  done
9903IFS=$as_save_IFS
9904
9905  ;;
9906esac
9907fi
9908TEE=$ac_cv_path_TEE
9909if test -n "$TEE"; then
9910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9911$as_echo "$TEE" >&6; }
9912else
9913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9914$as_echo "no" >&6; }
9915fi
9916
9917
9918  test -n "$TEE" && break
9919done
9920
9921  else
9922    # The variable is set, but is it from the command line or the environment?
9923
9924    # Try to remove the string !TEE! from our list.
9925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
9926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9927      # If it failed, the variable was not from the command line. Ignore it,
9928      # but warn the user (except for BASH, which is always set by the calling BASH).
9929      if test "xTEE" != xBASH; then
9930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
9931$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
9932      fi
9933      # Try to locate tool using the code snippet
9934      for ac_prog in tee
9935do
9936  # Extract the first word of "$ac_prog", so it can be a program name with args.
9937set dummy $ac_prog; ac_word=$2
9938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9939$as_echo_n "checking for $ac_word... " >&6; }
9940if ${ac_cv_path_TEE+:} false; then :
9941  $as_echo_n "(cached) " >&6
9942else
9943  case $TEE in
9944  [\\/]* | ?:[\\/]*)
9945  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9946  ;;
9947  *)
9948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9949for as_dir in $PATH
9950do
9951  IFS=$as_save_IFS
9952  test -z "$as_dir" && as_dir=.
9953    for ac_exec_ext in '' $ac_executable_extensions; do
9954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9955    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9957    break 2
9958  fi
9959done
9960  done
9961IFS=$as_save_IFS
9962
9963  ;;
9964esac
9965fi
9966TEE=$ac_cv_path_TEE
9967if test -n "$TEE"; then
9968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9969$as_echo "$TEE" >&6; }
9970else
9971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9972$as_echo "no" >&6; }
9973fi
9974
9975
9976  test -n "$TEE" && break
9977done
9978
9979    else
9980      # If it succeeded, then it was overridden by the user. We will use it
9981      # for the tool.
9982
9983      # First remove it from the list of overridden variables, so we can test
9984      # for unknown variables in the end.
9985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9986
9987      # Check if the provided tool contains a complete path.
9988      tool_specified="$TEE"
9989      tool_basename="${tool_specified##*/}"
9990      if test "x$tool_basename" = "x$tool_specified"; then
9991        # A command without a complete path is provided, search $PATH.
9992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
9993$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
9994        # Extract the first word of "$tool_basename", so it can be a program name with args.
9995set dummy $tool_basename; ac_word=$2
9996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9997$as_echo_n "checking for $ac_word... " >&6; }
9998if ${ac_cv_path_TEE+:} false; then :
9999  $as_echo_n "(cached) " >&6
10000else
10001  case $TEE in
10002  [\\/]* | ?:[\\/]*)
10003  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10004  ;;
10005  *)
10006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10007for as_dir in $PATH
10008do
10009  IFS=$as_save_IFS
10010  test -z "$as_dir" && as_dir=.
10011    for ac_exec_ext in '' $ac_executable_extensions; do
10012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10013    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10015    break 2
10016  fi
10017done
10018  done
10019IFS=$as_save_IFS
10020
10021  ;;
10022esac
10023fi
10024TEE=$ac_cv_path_TEE
10025if test -n "$TEE"; then
10026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10027$as_echo "$TEE" >&6; }
10028else
10029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10030$as_echo "no" >&6; }
10031fi
10032
10033
10034        if test "x$TEE" = x; then
10035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10036        fi
10037      else
10038        # Otherwise we believe it is a complete path. Use it as it is.
10039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10040$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10042$as_echo_n "checking for TEE... " >&6; }
10043        if test ! -x "$tool_specified"; then
10044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10045$as_echo "not found" >&6; }
10046          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10047        fi
10048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10049$as_echo "$tool_specified" >&6; }
10050      fi
10051    fi
10052  fi
10053
10054
10055
10056  if test "x$TEE" = x; then
10057    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10058  fi
10059
10060
10061
10062
10063
10064  # Publish this variable in the help.
10065
10066
10067  if test "x$TOUCH" = x; then
10068    # The variable is not set by user, try to locate tool using the code snippet
10069    for ac_prog in touch
10070do
10071  # Extract the first word of "$ac_prog", so it can be a program name with args.
10072set dummy $ac_prog; ac_word=$2
10073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10074$as_echo_n "checking for $ac_word... " >&6; }
10075if ${ac_cv_path_TOUCH+:} false; then :
10076  $as_echo_n "(cached) " >&6
10077else
10078  case $TOUCH in
10079  [\\/]* | ?:[\\/]*)
10080  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10081  ;;
10082  *)
10083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10084for as_dir in $PATH
10085do
10086  IFS=$as_save_IFS
10087  test -z "$as_dir" && as_dir=.
10088    for ac_exec_ext in '' $ac_executable_extensions; do
10089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10090    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10092    break 2
10093  fi
10094done
10095  done
10096IFS=$as_save_IFS
10097
10098  ;;
10099esac
10100fi
10101TOUCH=$ac_cv_path_TOUCH
10102if test -n "$TOUCH"; then
10103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10104$as_echo "$TOUCH" >&6; }
10105else
10106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10107$as_echo "no" >&6; }
10108fi
10109
10110
10111  test -n "$TOUCH" && break
10112done
10113
10114  else
10115    # The variable is set, but is it from the command line or the environment?
10116
10117    # Try to remove the string !TOUCH! from our list.
10118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10120      # If it failed, the variable was not from the command line. Ignore it,
10121      # but warn the user (except for BASH, which is always set by the calling BASH).
10122      if test "xTOUCH" != xBASH; then
10123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10124$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10125      fi
10126      # Try to locate tool using the code snippet
10127      for ac_prog in touch
10128do
10129  # Extract the first word of "$ac_prog", so it can be a program name with args.
10130set dummy $ac_prog; ac_word=$2
10131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10132$as_echo_n "checking for $ac_word... " >&6; }
10133if ${ac_cv_path_TOUCH+:} false; then :
10134  $as_echo_n "(cached) " >&6
10135else
10136  case $TOUCH in
10137  [\\/]* | ?:[\\/]*)
10138  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10139  ;;
10140  *)
10141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10142for as_dir in $PATH
10143do
10144  IFS=$as_save_IFS
10145  test -z "$as_dir" && as_dir=.
10146    for ac_exec_ext in '' $ac_executable_extensions; do
10147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10148    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10150    break 2
10151  fi
10152done
10153  done
10154IFS=$as_save_IFS
10155
10156  ;;
10157esac
10158fi
10159TOUCH=$ac_cv_path_TOUCH
10160if test -n "$TOUCH"; then
10161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10162$as_echo "$TOUCH" >&6; }
10163else
10164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10165$as_echo "no" >&6; }
10166fi
10167
10168
10169  test -n "$TOUCH" && break
10170done
10171
10172    else
10173      # If it succeeded, then it was overridden by the user. We will use it
10174      # for the tool.
10175
10176      # First remove it from the list of overridden variables, so we can test
10177      # for unknown variables in the end.
10178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10179
10180      # Check if the provided tool contains a complete path.
10181      tool_specified="$TOUCH"
10182      tool_basename="${tool_specified##*/}"
10183      if test "x$tool_basename" = "x$tool_specified"; then
10184        # A command without a complete path is provided, search $PATH.
10185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10186$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10187        # Extract the first word of "$tool_basename", so it can be a program name with args.
10188set dummy $tool_basename; ac_word=$2
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10190$as_echo_n "checking for $ac_word... " >&6; }
10191if ${ac_cv_path_TOUCH+:} false; then :
10192  $as_echo_n "(cached) " >&6
10193else
10194  case $TOUCH in
10195  [\\/]* | ?:[\\/]*)
10196  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10197  ;;
10198  *)
10199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10200for as_dir in $PATH
10201do
10202  IFS=$as_save_IFS
10203  test -z "$as_dir" && as_dir=.
10204    for ac_exec_ext in '' $ac_executable_extensions; do
10205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10206    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10208    break 2
10209  fi
10210done
10211  done
10212IFS=$as_save_IFS
10213
10214  ;;
10215esac
10216fi
10217TOUCH=$ac_cv_path_TOUCH
10218if test -n "$TOUCH"; then
10219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10220$as_echo "$TOUCH" >&6; }
10221else
10222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10223$as_echo "no" >&6; }
10224fi
10225
10226
10227        if test "x$TOUCH" = x; then
10228          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10229        fi
10230      else
10231        # Otherwise we believe it is a complete path. Use it as it is.
10232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10233$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10235$as_echo_n "checking for TOUCH... " >&6; }
10236        if test ! -x "$tool_specified"; then
10237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10238$as_echo "not found" >&6; }
10239          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10240        fi
10241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10242$as_echo "$tool_specified" >&6; }
10243      fi
10244    fi
10245  fi
10246
10247
10248
10249  if test "x$TOUCH" = x; then
10250    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10251  fi
10252
10253
10254
10255
10256
10257  # Publish this variable in the help.
10258
10259
10260  if test "x$TR" = x; then
10261    # The variable is not set by user, try to locate tool using the code snippet
10262    for ac_prog in tr
10263do
10264  # Extract the first word of "$ac_prog", so it can be a program name with args.
10265set dummy $ac_prog; ac_word=$2
10266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10267$as_echo_n "checking for $ac_word... " >&6; }
10268if ${ac_cv_path_TR+:} false; then :
10269  $as_echo_n "(cached) " >&6
10270else
10271  case $TR in
10272  [\\/]* | ?:[\\/]*)
10273  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10274  ;;
10275  *)
10276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10277for as_dir in $PATH
10278do
10279  IFS=$as_save_IFS
10280  test -z "$as_dir" && as_dir=.
10281    for ac_exec_ext in '' $ac_executable_extensions; do
10282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10283    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10285    break 2
10286  fi
10287done
10288  done
10289IFS=$as_save_IFS
10290
10291  ;;
10292esac
10293fi
10294TR=$ac_cv_path_TR
10295if test -n "$TR"; then
10296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10297$as_echo "$TR" >&6; }
10298else
10299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10300$as_echo "no" >&6; }
10301fi
10302
10303
10304  test -n "$TR" && break
10305done
10306
10307  else
10308    # The variable is set, but is it from the command line or the environment?
10309
10310    # Try to remove the string !TR! from our list.
10311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10313      # If it failed, the variable was not from the command line. Ignore it,
10314      # but warn the user (except for BASH, which is always set by the calling BASH).
10315      if test "xTR" != xBASH; then
10316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10317$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10318      fi
10319      # Try to locate tool using the code snippet
10320      for ac_prog in tr
10321do
10322  # Extract the first word of "$ac_prog", so it can be a program name with args.
10323set dummy $ac_prog; ac_word=$2
10324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10325$as_echo_n "checking for $ac_word... " >&6; }
10326if ${ac_cv_path_TR+:} false; then :
10327  $as_echo_n "(cached) " >&6
10328else
10329  case $TR in
10330  [\\/]* | ?:[\\/]*)
10331  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10332  ;;
10333  *)
10334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10335for as_dir in $PATH
10336do
10337  IFS=$as_save_IFS
10338  test -z "$as_dir" && as_dir=.
10339    for ac_exec_ext in '' $ac_executable_extensions; do
10340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10341    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10343    break 2
10344  fi
10345done
10346  done
10347IFS=$as_save_IFS
10348
10349  ;;
10350esac
10351fi
10352TR=$ac_cv_path_TR
10353if test -n "$TR"; then
10354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10355$as_echo "$TR" >&6; }
10356else
10357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10358$as_echo "no" >&6; }
10359fi
10360
10361
10362  test -n "$TR" && break
10363done
10364
10365    else
10366      # If it succeeded, then it was overridden by the user. We will use it
10367      # for the tool.
10368
10369      # First remove it from the list of overridden variables, so we can test
10370      # for unknown variables in the end.
10371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10372
10373      # Check if the provided tool contains a complete path.
10374      tool_specified="$TR"
10375      tool_basename="${tool_specified##*/}"
10376      if test "x$tool_basename" = "x$tool_specified"; then
10377        # A command without a complete path is provided, search $PATH.
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10379$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10380        # Extract the first word of "$tool_basename", so it can be a program name with args.
10381set dummy $tool_basename; ac_word=$2
10382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10383$as_echo_n "checking for $ac_word... " >&6; }
10384if ${ac_cv_path_TR+:} false; then :
10385  $as_echo_n "(cached) " >&6
10386else
10387  case $TR in
10388  [\\/]* | ?:[\\/]*)
10389  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10390  ;;
10391  *)
10392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10393for as_dir in $PATH
10394do
10395  IFS=$as_save_IFS
10396  test -z "$as_dir" && as_dir=.
10397    for ac_exec_ext in '' $ac_executable_extensions; do
10398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10399    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10401    break 2
10402  fi
10403done
10404  done
10405IFS=$as_save_IFS
10406
10407  ;;
10408esac
10409fi
10410TR=$ac_cv_path_TR
10411if test -n "$TR"; then
10412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10413$as_echo "$TR" >&6; }
10414else
10415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10416$as_echo "no" >&6; }
10417fi
10418
10419
10420        if test "x$TR" = x; then
10421          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10422        fi
10423      else
10424        # Otherwise we believe it is a complete path. Use it as it is.
10425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10426$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10428$as_echo_n "checking for TR... " >&6; }
10429        if test ! -x "$tool_specified"; then
10430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10431$as_echo "not found" >&6; }
10432          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10433        fi
10434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10435$as_echo "$tool_specified" >&6; }
10436      fi
10437    fi
10438  fi
10439
10440
10441
10442  if test "x$TR" = x; then
10443    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10444  fi
10445
10446
10447
10448
10449
10450  # Publish this variable in the help.
10451
10452
10453  if test "x$UNAME" = x; then
10454    # The variable is not set by user, try to locate tool using the code snippet
10455    for ac_prog in uname
10456do
10457  # Extract the first word of "$ac_prog", so it can be a program name with args.
10458set dummy $ac_prog; ac_word=$2
10459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10460$as_echo_n "checking for $ac_word... " >&6; }
10461if ${ac_cv_path_UNAME+:} false; then :
10462  $as_echo_n "(cached) " >&6
10463else
10464  case $UNAME in
10465  [\\/]* | ?:[\\/]*)
10466  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10467  ;;
10468  *)
10469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10470for as_dir in $PATH
10471do
10472  IFS=$as_save_IFS
10473  test -z "$as_dir" && as_dir=.
10474    for ac_exec_ext in '' $ac_executable_extensions; do
10475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10476    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10478    break 2
10479  fi
10480done
10481  done
10482IFS=$as_save_IFS
10483
10484  ;;
10485esac
10486fi
10487UNAME=$ac_cv_path_UNAME
10488if test -n "$UNAME"; then
10489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10490$as_echo "$UNAME" >&6; }
10491else
10492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10493$as_echo "no" >&6; }
10494fi
10495
10496
10497  test -n "$UNAME" && break
10498done
10499
10500  else
10501    # The variable is set, but is it from the command line or the environment?
10502
10503    # Try to remove the string !UNAME! from our list.
10504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10506      # If it failed, the variable was not from the command line. Ignore it,
10507      # but warn the user (except for BASH, which is always set by the calling BASH).
10508      if test "xUNAME" != xBASH; then
10509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10510$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10511      fi
10512      # Try to locate tool using the code snippet
10513      for ac_prog in uname
10514do
10515  # Extract the first word of "$ac_prog", so it can be a program name with args.
10516set dummy $ac_prog; ac_word=$2
10517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10518$as_echo_n "checking for $ac_word... " >&6; }
10519if ${ac_cv_path_UNAME+:} false; then :
10520  $as_echo_n "(cached) " >&6
10521else
10522  case $UNAME in
10523  [\\/]* | ?:[\\/]*)
10524  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10525  ;;
10526  *)
10527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10528for as_dir in $PATH
10529do
10530  IFS=$as_save_IFS
10531  test -z "$as_dir" && as_dir=.
10532    for ac_exec_ext in '' $ac_executable_extensions; do
10533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10534    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10536    break 2
10537  fi
10538done
10539  done
10540IFS=$as_save_IFS
10541
10542  ;;
10543esac
10544fi
10545UNAME=$ac_cv_path_UNAME
10546if test -n "$UNAME"; then
10547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10548$as_echo "$UNAME" >&6; }
10549else
10550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10551$as_echo "no" >&6; }
10552fi
10553
10554
10555  test -n "$UNAME" && break
10556done
10557
10558    else
10559      # If it succeeded, then it was overridden by the user. We will use it
10560      # for the tool.
10561
10562      # First remove it from the list of overridden variables, so we can test
10563      # for unknown variables in the end.
10564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10565
10566      # Check if the provided tool contains a complete path.
10567      tool_specified="$UNAME"
10568      tool_basename="${tool_specified##*/}"
10569      if test "x$tool_basename" = "x$tool_specified"; then
10570        # A command without a complete path is provided, search $PATH.
10571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10572$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10573        # Extract the first word of "$tool_basename", so it can be a program name with args.
10574set dummy $tool_basename; ac_word=$2
10575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10576$as_echo_n "checking for $ac_word... " >&6; }
10577if ${ac_cv_path_UNAME+:} false; then :
10578  $as_echo_n "(cached) " >&6
10579else
10580  case $UNAME in
10581  [\\/]* | ?:[\\/]*)
10582  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10583  ;;
10584  *)
10585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10586for as_dir in $PATH
10587do
10588  IFS=$as_save_IFS
10589  test -z "$as_dir" && as_dir=.
10590    for ac_exec_ext in '' $ac_executable_extensions; do
10591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10592    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10594    break 2
10595  fi
10596done
10597  done
10598IFS=$as_save_IFS
10599
10600  ;;
10601esac
10602fi
10603UNAME=$ac_cv_path_UNAME
10604if test -n "$UNAME"; then
10605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10606$as_echo "$UNAME" >&6; }
10607else
10608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10609$as_echo "no" >&6; }
10610fi
10611
10612
10613        if test "x$UNAME" = x; then
10614          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10615        fi
10616      else
10617        # Otherwise we believe it is a complete path. Use it as it is.
10618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10619$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10621$as_echo_n "checking for UNAME... " >&6; }
10622        if test ! -x "$tool_specified"; then
10623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10624$as_echo "not found" >&6; }
10625          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10626        fi
10627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10628$as_echo "$tool_specified" >&6; }
10629      fi
10630    fi
10631  fi
10632
10633
10634
10635  if test "x$UNAME" = x; then
10636    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10637  fi
10638
10639
10640
10641
10642
10643  # Publish this variable in the help.
10644
10645
10646  if test "x$UNIQ" = x; then
10647    # The variable is not set by user, try to locate tool using the code snippet
10648    for ac_prog in uniq
10649do
10650  # Extract the first word of "$ac_prog", so it can be a program name with args.
10651set dummy $ac_prog; ac_word=$2
10652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10653$as_echo_n "checking for $ac_word... " >&6; }
10654if ${ac_cv_path_UNIQ+:} false; then :
10655  $as_echo_n "(cached) " >&6
10656else
10657  case $UNIQ in
10658  [\\/]* | ?:[\\/]*)
10659  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10660  ;;
10661  *)
10662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10663for as_dir in $PATH
10664do
10665  IFS=$as_save_IFS
10666  test -z "$as_dir" && as_dir=.
10667    for ac_exec_ext in '' $ac_executable_extensions; do
10668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10669    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10671    break 2
10672  fi
10673done
10674  done
10675IFS=$as_save_IFS
10676
10677  ;;
10678esac
10679fi
10680UNIQ=$ac_cv_path_UNIQ
10681if test -n "$UNIQ"; then
10682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10683$as_echo "$UNIQ" >&6; }
10684else
10685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10686$as_echo "no" >&6; }
10687fi
10688
10689
10690  test -n "$UNIQ" && break
10691done
10692
10693  else
10694    # The variable is set, but is it from the command line or the environment?
10695
10696    # Try to remove the string !UNIQ! from our list.
10697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10699      # If it failed, the variable was not from the command line. Ignore it,
10700      # but warn the user (except for BASH, which is always set by the calling BASH).
10701      if test "xUNIQ" != xBASH; then
10702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10703$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10704      fi
10705      # Try to locate tool using the code snippet
10706      for ac_prog in uniq
10707do
10708  # Extract the first word of "$ac_prog", so it can be a program name with args.
10709set dummy $ac_prog; ac_word=$2
10710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10711$as_echo_n "checking for $ac_word... " >&6; }
10712if ${ac_cv_path_UNIQ+:} false; then :
10713  $as_echo_n "(cached) " >&6
10714else
10715  case $UNIQ in
10716  [\\/]* | ?:[\\/]*)
10717  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10718  ;;
10719  *)
10720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10721for as_dir in $PATH
10722do
10723  IFS=$as_save_IFS
10724  test -z "$as_dir" && as_dir=.
10725    for ac_exec_ext in '' $ac_executable_extensions; do
10726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10727    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10729    break 2
10730  fi
10731done
10732  done
10733IFS=$as_save_IFS
10734
10735  ;;
10736esac
10737fi
10738UNIQ=$ac_cv_path_UNIQ
10739if test -n "$UNIQ"; then
10740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10741$as_echo "$UNIQ" >&6; }
10742else
10743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10744$as_echo "no" >&6; }
10745fi
10746
10747
10748  test -n "$UNIQ" && break
10749done
10750
10751    else
10752      # If it succeeded, then it was overridden by the user. We will use it
10753      # for the tool.
10754
10755      # First remove it from the list of overridden variables, so we can test
10756      # for unknown variables in the end.
10757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10758
10759      # Check if the provided tool contains a complete path.
10760      tool_specified="$UNIQ"
10761      tool_basename="${tool_specified##*/}"
10762      if test "x$tool_basename" = "x$tool_specified"; then
10763        # A command without a complete path is provided, search $PATH.
10764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10765$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10766        # Extract the first word of "$tool_basename", so it can be a program name with args.
10767set dummy $tool_basename; ac_word=$2
10768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10769$as_echo_n "checking for $ac_word... " >&6; }
10770if ${ac_cv_path_UNIQ+:} false; then :
10771  $as_echo_n "(cached) " >&6
10772else
10773  case $UNIQ in
10774  [\\/]* | ?:[\\/]*)
10775  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10776  ;;
10777  *)
10778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10779for as_dir in $PATH
10780do
10781  IFS=$as_save_IFS
10782  test -z "$as_dir" && as_dir=.
10783    for ac_exec_ext in '' $ac_executable_extensions; do
10784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10785    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10787    break 2
10788  fi
10789done
10790  done
10791IFS=$as_save_IFS
10792
10793  ;;
10794esac
10795fi
10796UNIQ=$ac_cv_path_UNIQ
10797if test -n "$UNIQ"; then
10798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10799$as_echo "$UNIQ" >&6; }
10800else
10801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10802$as_echo "no" >&6; }
10803fi
10804
10805
10806        if test "x$UNIQ" = x; then
10807          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10808        fi
10809      else
10810        # Otherwise we believe it is a complete path. Use it as it is.
10811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10812$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10814$as_echo_n "checking for UNIQ... " >&6; }
10815        if test ! -x "$tool_specified"; then
10816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10817$as_echo "not found" >&6; }
10818          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10819        fi
10820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10821$as_echo "$tool_specified" >&6; }
10822      fi
10823    fi
10824  fi
10825
10826
10827
10828  if test "x$UNIQ" = x; then
10829    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10830  fi
10831
10832
10833
10834
10835
10836  # Publish this variable in the help.
10837
10838
10839  if test "x$WC" = x; then
10840    # The variable is not set by user, try to locate tool using the code snippet
10841    for ac_prog in wc
10842do
10843  # Extract the first word of "$ac_prog", so it can be a program name with args.
10844set dummy $ac_prog; ac_word=$2
10845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10846$as_echo_n "checking for $ac_word... " >&6; }
10847if ${ac_cv_path_WC+:} false; then :
10848  $as_echo_n "(cached) " >&6
10849else
10850  case $WC in
10851  [\\/]* | ?:[\\/]*)
10852  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10853  ;;
10854  *)
10855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10856for as_dir in $PATH
10857do
10858  IFS=$as_save_IFS
10859  test -z "$as_dir" && as_dir=.
10860    for ac_exec_ext in '' $ac_executable_extensions; do
10861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10862    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10864    break 2
10865  fi
10866done
10867  done
10868IFS=$as_save_IFS
10869
10870  ;;
10871esac
10872fi
10873WC=$ac_cv_path_WC
10874if test -n "$WC"; then
10875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10876$as_echo "$WC" >&6; }
10877else
10878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10879$as_echo "no" >&6; }
10880fi
10881
10882
10883  test -n "$WC" && break
10884done
10885
10886  else
10887    # The variable is set, but is it from the command line or the environment?
10888
10889    # Try to remove the string !WC! from our list.
10890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10892      # If it failed, the variable was not from the command line. Ignore it,
10893      # but warn the user (except for BASH, which is always set by the calling BASH).
10894      if test "xWC" != xBASH; then
10895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10896$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10897      fi
10898      # Try to locate tool using the code snippet
10899      for ac_prog in wc
10900do
10901  # Extract the first word of "$ac_prog", so it can be a program name with args.
10902set dummy $ac_prog; ac_word=$2
10903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10904$as_echo_n "checking for $ac_word... " >&6; }
10905if ${ac_cv_path_WC+:} false; then :
10906  $as_echo_n "(cached) " >&6
10907else
10908  case $WC in
10909  [\\/]* | ?:[\\/]*)
10910  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10911  ;;
10912  *)
10913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10914for as_dir in $PATH
10915do
10916  IFS=$as_save_IFS
10917  test -z "$as_dir" && as_dir=.
10918    for ac_exec_ext in '' $ac_executable_extensions; do
10919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10920    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10922    break 2
10923  fi
10924done
10925  done
10926IFS=$as_save_IFS
10927
10928  ;;
10929esac
10930fi
10931WC=$ac_cv_path_WC
10932if test -n "$WC"; then
10933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10934$as_echo "$WC" >&6; }
10935else
10936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10937$as_echo "no" >&6; }
10938fi
10939
10940
10941  test -n "$WC" && break
10942done
10943
10944    else
10945      # If it succeeded, then it was overridden by the user. We will use it
10946      # for the tool.
10947
10948      # First remove it from the list of overridden variables, so we can test
10949      # for unknown variables in the end.
10950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10951
10952      # Check if the provided tool contains a complete path.
10953      tool_specified="$WC"
10954      tool_basename="${tool_specified##*/}"
10955      if test "x$tool_basename" = "x$tool_specified"; then
10956        # A command without a complete path is provided, search $PATH.
10957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
10958$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
10959        # Extract the first word of "$tool_basename", so it can be a program name with args.
10960set dummy $tool_basename; ac_word=$2
10961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10962$as_echo_n "checking for $ac_word... " >&6; }
10963if ${ac_cv_path_WC+:} false; then :
10964  $as_echo_n "(cached) " >&6
10965else
10966  case $WC in
10967  [\\/]* | ?:[\\/]*)
10968  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10969  ;;
10970  *)
10971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10972for as_dir in $PATH
10973do
10974  IFS=$as_save_IFS
10975  test -z "$as_dir" && as_dir=.
10976    for ac_exec_ext in '' $ac_executable_extensions; do
10977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10978    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10980    break 2
10981  fi
10982done
10983  done
10984IFS=$as_save_IFS
10985
10986  ;;
10987esac
10988fi
10989WC=$ac_cv_path_WC
10990if test -n "$WC"; then
10991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10992$as_echo "$WC" >&6; }
10993else
10994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995$as_echo "no" >&6; }
10996fi
10997
10998
10999        if test "x$WC" = x; then
11000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11001        fi
11002      else
11003        # Otherwise we believe it is a complete path. Use it as it is.
11004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11005$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11007$as_echo_n "checking for WC... " >&6; }
11008        if test ! -x "$tool_specified"; then
11009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11010$as_echo "not found" >&6; }
11011          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11012        fi
11013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11014$as_echo "$tool_specified" >&6; }
11015      fi
11016    fi
11017  fi
11018
11019
11020
11021  if test "x$WC" = x; then
11022    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11023  fi
11024
11025
11026
11027
11028
11029  # Publish this variable in the help.
11030
11031
11032  if test "x$WHICH" = x; then
11033    # The variable is not set by user, try to locate tool using the code snippet
11034    for ac_prog in which
11035do
11036  # Extract the first word of "$ac_prog", so it can be a program name with args.
11037set dummy $ac_prog; ac_word=$2
11038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11039$as_echo_n "checking for $ac_word... " >&6; }
11040if ${ac_cv_path_WHICH+:} false; then :
11041  $as_echo_n "(cached) " >&6
11042else
11043  case $WHICH in
11044  [\\/]* | ?:[\\/]*)
11045  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11046  ;;
11047  *)
11048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11049for as_dir in $PATH
11050do
11051  IFS=$as_save_IFS
11052  test -z "$as_dir" && as_dir=.
11053    for ac_exec_ext in '' $ac_executable_extensions; do
11054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11055    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11057    break 2
11058  fi
11059done
11060  done
11061IFS=$as_save_IFS
11062
11063  ;;
11064esac
11065fi
11066WHICH=$ac_cv_path_WHICH
11067if test -n "$WHICH"; then
11068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11069$as_echo "$WHICH" >&6; }
11070else
11071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11072$as_echo "no" >&6; }
11073fi
11074
11075
11076  test -n "$WHICH" && break
11077done
11078
11079  else
11080    # The variable is set, but is it from the command line or the environment?
11081
11082    # Try to remove the string !WHICH! from our list.
11083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11085      # If it failed, the variable was not from the command line. Ignore it,
11086      # but warn the user (except for BASH, which is always set by the calling BASH).
11087      if test "xWHICH" != xBASH; then
11088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11089$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11090      fi
11091      # Try to locate tool using the code snippet
11092      for ac_prog in which
11093do
11094  # Extract the first word of "$ac_prog", so it can be a program name with args.
11095set dummy $ac_prog; ac_word=$2
11096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11097$as_echo_n "checking for $ac_word... " >&6; }
11098if ${ac_cv_path_WHICH+:} false; then :
11099  $as_echo_n "(cached) " >&6
11100else
11101  case $WHICH in
11102  [\\/]* | ?:[\\/]*)
11103  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11104  ;;
11105  *)
11106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11107for as_dir in $PATH
11108do
11109  IFS=$as_save_IFS
11110  test -z "$as_dir" && as_dir=.
11111    for ac_exec_ext in '' $ac_executable_extensions; do
11112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11113    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11115    break 2
11116  fi
11117done
11118  done
11119IFS=$as_save_IFS
11120
11121  ;;
11122esac
11123fi
11124WHICH=$ac_cv_path_WHICH
11125if test -n "$WHICH"; then
11126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11127$as_echo "$WHICH" >&6; }
11128else
11129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11130$as_echo "no" >&6; }
11131fi
11132
11133
11134  test -n "$WHICH" && break
11135done
11136
11137    else
11138      # If it succeeded, then it was overridden by the user. We will use it
11139      # for the tool.
11140
11141      # First remove it from the list of overridden variables, so we can test
11142      # for unknown variables in the end.
11143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11144
11145      # Check if the provided tool contains a complete path.
11146      tool_specified="$WHICH"
11147      tool_basename="${tool_specified##*/}"
11148      if test "x$tool_basename" = "x$tool_specified"; then
11149        # A command without a complete path is provided, search $PATH.
11150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11151$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11152        # Extract the first word of "$tool_basename", so it can be a program name with args.
11153set dummy $tool_basename; ac_word=$2
11154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11155$as_echo_n "checking for $ac_word... " >&6; }
11156if ${ac_cv_path_WHICH+:} false; then :
11157  $as_echo_n "(cached) " >&6
11158else
11159  case $WHICH in
11160  [\\/]* | ?:[\\/]*)
11161  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11162  ;;
11163  *)
11164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11165for as_dir in $PATH
11166do
11167  IFS=$as_save_IFS
11168  test -z "$as_dir" && as_dir=.
11169    for ac_exec_ext in '' $ac_executable_extensions; do
11170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11171    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11173    break 2
11174  fi
11175done
11176  done
11177IFS=$as_save_IFS
11178
11179  ;;
11180esac
11181fi
11182WHICH=$ac_cv_path_WHICH
11183if test -n "$WHICH"; then
11184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11185$as_echo "$WHICH" >&6; }
11186else
11187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11188$as_echo "no" >&6; }
11189fi
11190
11191
11192        if test "x$WHICH" = x; then
11193          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11194        fi
11195      else
11196        # Otherwise we believe it is a complete path. Use it as it is.
11197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11198$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11200$as_echo_n "checking for WHICH... " >&6; }
11201        if test ! -x "$tool_specified"; then
11202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11203$as_echo "not found" >&6; }
11204          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11205        fi
11206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11207$as_echo "$tool_specified" >&6; }
11208      fi
11209    fi
11210  fi
11211
11212
11213
11214  if test "x$WHICH" = x; then
11215    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11216  fi
11217
11218
11219
11220
11221
11222  # Publish this variable in the help.
11223
11224
11225  if test "x$XARGS" = x; then
11226    # The variable is not set by user, try to locate tool using the code snippet
11227    for ac_prog in xargs
11228do
11229  # Extract the first word of "$ac_prog", so it can be a program name with args.
11230set dummy $ac_prog; ac_word=$2
11231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11232$as_echo_n "checking for $ac_word... " >&6; }
11233if ${ac_cv_path_XARGS+:} false; then :
11234  $as_echo_n "(cached) " >&6
11235else
11236  case $XARGS in
11237  [\\/]* | ?:[\\/]*)
11238  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11239  ;;
11240  *)
11241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11242for as_dir in $PATH
11243do
11244  IFS=$as_save_IFS
11245  test -z "$as_dir" && as_dir=.
11246    for ac_exec_ext in '' $ac_executable_extensions; do
11247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11248    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11250    break 2
11251  fi
11252done
11253  done
11254IFS=$as_save_IFS
11255
11256  ;;
11257esac
11258fi
11259XARGS=$ac_cv_path_XARGS
11260if test -n "$XARGS"; then
11261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11262$as_echo "$XARGS" >&6; }
11263else
11264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11265$as_echo "no" >&6; }
11266fi
11267
11268
11269  test -n "$XARGS" && break
11270done
11271
11272  else
11273    # The variable is set, but is it from the command line or the environment?
11274
11275    # Try to remove the string !XARGS! from our list.
11276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11278      # If it failed, the variable was not from the command line. Ignore it,
11279      # but warn the user (except for BASH, which is always set by the calling BASH).
11280      if test "xXARGS" != xBASH; then
11281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11282$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11283      fi
11284      # Try to locate tool using the code snippet
11285      for ac_prog in xargs
11286do
11287  # Extract the first word of "$ac_prog", so it can be a program name with args.
11288set dummy $ac_prog; ac_word=$2
11289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11290$as_echo_n "checking for $ac_word... " >&6; }
11291if ${ac_cv_path_XARGS+:} false; then :
11292  $as_echo_n "(cached) " >&6
11293else
11294  case $XARGS in
11295  [\\/]* | ?:[\\/]*)
11296  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11297  ;;
11298  *)
11299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11300for as_dir in $PATH
11301do
11302  IFS=$as_save_IFS
11303  test -z "$as_dir" && as_dir=.
11304    for ac_exec_ext in '' $ac_executable_extensions; do
11305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11306    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11308    break 2
11309  fi
11310done
11311  done
11312IFS=$as_save_IFS
11313
11314  ;;
11315esac
11316fi
11317XARGS=$ac_cv_path_XARGS
11318if test -n "$XARGS"; then
11319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11320$as_echo "$XARGS" >&6; }
11321else
11322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11323$as_echo "no" >&6; }
11324fi
11325
11326
11327  test -n "$XARGS" && break
11328done
11329
11330    else
11331      # If it succeeded, then it was overridden by the user. We will use it
11332      # for the tool.
11333
11334      # First remove it from the list of overridden variables, so we can test
11335      # for unknown variables in the end.
11336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11337
11338      # Check if the provided tool contains a complete path.
11339      tool_specified="$XARGS"
11340      tool_basename="${tool_specified##*/}"
11341      if test "x$tool_basename" = "x$tool_specified"; then
11342        # A command without a complete path is provided, search $PATH.
11343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11344$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11345        # Extract the first word of "$tool_basename", so it can be a program name with args.
11346set dummy $tool_basename; ac_word=$2
11347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11348$as_echo_n "checking for $ac_word... " >&6; }
11349if ${ac_cv_path_XARGS+:} false; then :
11350  $as_echo_n "(cached) " >&6
11351else
11352  case $XARGS in
11353  [\\/]* | ?:[\\/]*)
11354  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11355  ;;
11356  *)
11357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11358for as_dir in $PATH
11359do
11360  IFS=$as_save_IFS
11361  test -z "$as_dir" && as_dir=.
11362    for ac_exec_ext in '' $ac_executable_extensions; do
11363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11364    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11366    break 2
11367  fi
11368done
11369  done
11370IFS=$as_save_IFS
11371
11372  ;;
11373esac
11374fi
11375XARGS=$ac_cv_path_XARGS
11376if test -n "$XARGS"; then
11377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11378$as_echo "$XARGS" >&6; }
11379else
11380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11381$as_echo "no" >&6; }
11382fi
11383
11384
11385        if test "x$XARGS" = x; then
11386          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11387        fi
11388      else
11389        # Otherwise we believe it is a complete path. Use it as it is.
11390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11391$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11393$as_echo_n "checking for XARGS... " >&6; }
11394        if test ! -x "$tool_specified"; then
11395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11396$as_echo "not found" >&6; }
11397          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11398        fi
11399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11400$as_echo "$tool_specified" >&6; }
11401      fi
11402    fi
11403  fi
11404
11405
11406
11407  if test "x$XARGS" = x; then
11408    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11409  fi
11410
11411
11412
11413  # Then required tools that require some special treatment.
11414
11415
11416  # Publish this variable in the help.
11417
11418
11419  if test "x$AWK" = x; then
11420    # The variable is not set by user, try to locate tool using the code snippet
11421    for ac_prog in gawk mawk nawk awk
11422do
11423  # Extract the first word of "$ac_prog", so it can be a program name with args.
11424set dummy $ac_prog; ac_word=$2
11425{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11426$as_echo_n "checking for $ac_word... " >&6; }
11427if ${ac_cv_prog_AWK+:} false; then :
11428  $as_echo_n "(cached) " >&6
11429else
11430  if test -n "$AWK"; then
11431  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11432else
11433as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11434for as_dir in $PATH
11435do
11436  IFS=$as_save_IFS
11437  test -z "$as_dir" && as_dir=.
11438    for ac_exec_ext in '' $ac_executable_extensions; do
11439  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11440    ac_cv_prog_AWK="$ac_prog"
11441    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11442    break 2
11443  fi
11444done
11445  done
11446IFS=$as_save_IFS
11447
11448fi
11449fi
11450AWK=$ac_cv_prog_AWK
11451if test -n "$AWK"; then
11452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11453$as_echo "$AWK" >&6; }
11454else
11455  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11456$as_echo "no" >&6; }
11457fi
11458
11459
11460  test -n "$AWK" && break
11461done
11462
11463  else
11464    # The variable is set, but is it from the command line or the environment?
11465
11466    # Try to remove the string !AWK! from our list.
11467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11469      # If it failed, the variable was not from the command line. Ignore it,
11470      # but warn the user (except for BASH, which is always set by the calling BASH).
11471      if test "xAWK" != xBASH; then
11472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11473$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11474      fi
11475      # Try to locate tool using the code snippet
11476      for ac_prog in gawk mawk nawk awk
11477do
11478  # Extract the first word of "$ac_prog", so it can be a program name with args.
11479set dummy $ac_prog; ac_word=$2
11480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11481$as_echo_n "checking for $ac_word... " >&6; }
11482if ${ac_cv_prog_AWK+:} false; then :
11483  $as_echo_n "(cached) " >&6
11484else
11485  if test -n "$AWK"; then
11486  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11487else
11488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11489for as_dir in $PATH
11490do
11491  IFS=$as_save_IFS
11492  test -z "$as_dir" && as_dir=.
11493    for ac_exec_ext in '' $ac_executable_extensions; do
11494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11495    ac_cv_prog_AWK="$ac_prog"
11496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11497    break 2
11498  fi
11499done
11500  done
11501IFS=$as_save_IFS
11502
11503fi
11504fi
11505AWK=$ac_cv_prog_AWK
11506if test -n "$AWK"; then
11507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11508$as_echo "$AWK" >&6; }
11509else
11510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11511$as_echo "no" >&6; }
11512fi
11513
11514
11515  test -n "$AWK" && break
11516done
11517
11518    else
11519      # If it succeeded, then it was overridden by the user. We will use it
11520      # for the tool.
11521
11522      # First remove it from the list of overridden variables, so we can test
11523      # for unknown variables in the end.
11524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11525
11526      # Check if the provided tool contains a complete path.
11527      tool_specified="$AWK"
11528      tool_basename="${tool_specified##*/}"
11529      if test "x$tool_basename" = "x$tool_specified"; then
11530        # A command without a complete path is provided, search $PATH.
11531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11532$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11533        # Extract the first word of "$tool_basename", so it can be a program name with args.
11534set dummy $tool_basename; ac_word=$2
11535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11536$as_echo_n "checking for $ac_word... " >&6; }
11537if ${ac_cv_path_AWK+:} false; then :
11538  $as_echo_n "(cached) " >&6
11539else
11540  case $AWK in
11541  [\\/]* | ?:[\\/]*)
11542  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11543  ;;
11544  *)
11545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11546for as_dir in $PATH
11547do
11548  IFS=$as_save_IFS
11549  test -z "$as_dir" && as_dir=.
11550    for ac_exec_ext in '' $ac_executable_extensions; do
11551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11552    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11554    break 2
11555  fi
11556done
11557  done
11558IFS=$as_save_IFS
11559
11560  ;;
11561esac
11562fi
11563AWK=$ac_cv_path_AWK
11564if test -n "$AWK"; then
11565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11566$as_echo "$AWK" >&6; }
11567else
11568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11569$as_echo "no" >&6; }
11570fi
11571
11572
11573        if test "x$AWK" = x; then
11574          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11575        fi
11576      else
11577        # Otherwise we believe it is a complete path. Use it as it is.
11578        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11579$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11581$as_echo_n "checking for AWK... " >&6; }
11582        if test ! -x "$tool_specified"; then
11583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11584$as_echo "not found" >&6; }
11585          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11586        fi
11587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11588$as_echo "$tool_specified" >&6; }
11589      fi
11590    fi
11591  fi
11592
11593
11594  if test "x$AWK" = x; then
11595    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11596  fi
11597
11598
11599
11600
11601  # Publish this variable in the help.
11602
11603
11604  if test "x$GREP" = x; then
11605    # The variable is not set by user, try to locate tool using the code snippet
11606    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11607$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11608if ${ac_cv_path_GREP+:} false; then :
11609  $as_echo_n "(cached) " >&6
11610else
11611  if test -z "$GREP"; then
11612  ac_path_GREP_found=false
11613  # Loop through the user's path and test for each of PROGNAME-LIST
11614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11615for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11616do
11617  IFS=$as_save_IFS
11618  test -z "$as_dir" && as_dir=.
11619    for ac_prog in grep ggrep; do
11620    for ac_exec_ext in '' $ac_executable_extensions; do
11621      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11622      as_fn_executable_p "$ac_path_GREP" || continue
11623# Check for GNU ac_path_GREP and select it if it is found.
11624  # Check for GNU $ac_path_GREP
11625case `"$ac_path_GREP" --version 2>&1` in
11626*GNU*)
11627  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11628*)
11629  ac_count=0
11630  $as_echo_n 0123456789 >"conftest.in"
11631  while :
11632  do
11633    cat "conftest.in" "conftest.in" >"conftest.tmp"
11634    mv "conftest.tmp" "conftest.in"
11635    cp "conftest.in" "conftest.nl"
11636    $as_echo 'GREP' >> "conftest.nl"
11637    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11638    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11639    as_fn_arith $ac_count + 1 && ac_count=$as_val
11640    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11641      # Best one so far, save it but keep looking for a better one
11642      ac_cv_path_GREP="$ac_path_GREP"
11643      ac_path_GREP_max=$ac_count
11644    fi
11645    # 10*(2^10) chars as input seems more than enough
11646    test $ac_count -gt 10 && break
11647  done
11648  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11649esac
11650
11651      $ac_path_GREP_found && break 3
11652    done
11653  done
11654  done
11655IFS=$as_save_IFS
11656  if test -z "$ac_cv_path_GREP"; then
11657    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11658  fi
11659else
11660  ac_cv_path_GREP=$GREP
11661fi
11662
11663fi
11664{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11665$as_echo "$ac_cv_path_GREP" >&6; }
11666 GREP="$ac_cv_path_GREP"
11667
11668
11669  else
11670    # The variable is set, but is it from the command line or the environment?
11671
11672    # Try to remove the string !GREP! from our list.
11673    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11674    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11675      # If it failed, the variable was not from the command line. Ignore it,
11676      # but warn the user (except for BASH, which is always set by the calling BASH).
11677      if test "xGREP" != xBASH; then
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11679$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11680      fi
11681      # Try to locate tool using the code snippet
11682      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11683$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11684if ${ac_cv_path_GREP+:} false; then :
11685  $as_echo_n "(cached) " >&6
11686else
11687  if test -z "$GREP"; then
11688  ac_path_GREP_found=false
11689  # Loop through the user's path and test for each of PROGNAME-LIST
11690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11691for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11692do
11693  IFS=$as_save_IFS
11694  test -z "$as_dir" && as_dir=.
11695    for ac_prog in grep ggrep; do
11696    for ac_exec_ext in '' $ac_executable_extensions; do
11697      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11698      as_fn_executable_p "$ac_path_GREP" || continue
11699# Check for GNU ac_path_GREP and select it if it is found.
11700  # Check for GNU $ac_path_GREP
11701case `"$ac_path_GREP" --version 2>&1` in
11702*GNU*)
11703  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11704*)
11705  ac_count=0
11706  $as_echo_n 0123456789 >"conftest.in"
11707  while :
11708  do
11709    cat "conftest.in" "conftest.in" >"conftest.tmp"
11710    mv "conftest.tmp" "conftest.in"
11711    cp "conftest.in" "conftest.nl"
11712    $as_echo 'GREP' >> "conftest.nl"
11713    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11714    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11715    as_fn_arith $ac_count + 1 && ac_count=$as_val
11716    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11717      # Best one so far, save it but keep looking for a better one
11718      ac_cv_path_GREP="$ac_path_GREP"
11719      ac_path_GREP_max=$ac_count
11720    fi
11721    # 10*(2^10) chars as input seems more than enough
11722    test $ac_count -gt 10 && break
11723  done
11724  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11725esac
11726
11727      $ac_path_GREP_found && break 3
11728    done
11729  done
11730  done
11731IFS=$as_save_IFS
11732  if test -z "$ac_cv_path_GREP"; then
11733    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11734  fi
11735else
11736  ac_cv_path_GREP=$GREP
11737fi
11738
11739fi
11740{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11741$as_echo "$ac_cv_path_GREP" >&6; }
11742 GREP="$ac_cv_path_GREP"
11743
11744
11745    else
11746      # If it succeeded, then it was overridden by the user. We will use it
11747      # for the tool.
11748
11749      # First remove it from the list of overridden variables, so we can test
11750      # for unknown variables in the end.
11751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11752
11753      # Check if the provided tool contains a complete path.
11754      tool_specified="$GREP"
11755      tool_basename="${tool_specified##*/}"
11756      if test "x$tool_basename" = "x$tool_specified"; then
11757        # A command without a complete path is provided, search $PATH.
11758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11759$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11760        # Extract the first word of "$tool_basename", so it can be a program name with args.
11761set dummy $tool_basename; ac_word=$2
11762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11763$as_echo_n "checking for $ac_word... " >&6; }
11764if ${ac_cv_path_GREP+:} false; then :
11765  $as_echo_n "(cached) " >&6
11766else
11767  case $GREP in
11768  [\\/]* | ?:[\\/]*)
11769  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11770  ;;
11771  *)
11772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11773for as_dir in $PATH
11774do
11775  IFS=$as_save_IFS
11776  test -z "$as_dir" && as_dir=.
11777    for ac_exec_ext in '' $ac_executable_extensions; do
11778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11779    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11781    break 2
11782  fi
11783done
11784  done
11785IFS=$as_save_IFS
11786
11787  ;;
11788esac
11789fi
11790GREP=$ac_cv_path_GREP
11791if test -n "$GREP"; then
11792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11793$as_echo "$GREP" >&6; }
11794else
11795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11796$as_echo "no" >&6; }
11797fi
11798
11799
11800        if test "x$GREP" = x; then
11801          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11802        fi
11803      else
11804        # Otherwise we believe it is a complete path. Use it as it is.
11805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11806$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11808$as_echo_n "checking for GREP... " >&6; }
11809        if test ! -x "$tool_specified"; then
11810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11811$as_echo "not found" >&6; }
11812          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11813        fi
11814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11815$as_echo "$tool_specified" >&6; }
11816      fi
11817    fi
11818  fi
11819
11820
11821  if test "x$GREP" = x; then
11822    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11823  fi
11824
11825
11826
11827
11828  # Publish this variable in the help.
11829
11830
11831  if test "x$EGREP" = x; then
11832    # The variable is not set by user, try to locate tool using the code snippet
11833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11834$as_echo_n "checking for egrep... " >&6; }
11835if ${ac_cv_path_EGREP+:} false; then :
11836  $as_echo_n "(cached) " >&6
11837else
11838  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11839   then ac_cv_path_EGREP="$GREP -E"
11840   else
11841     if test -z "$EGREP"; then
11842  ac_path_EGREP_found=false
11843  # Loop through the user's path and test for each of PROGNAME-LIST
11844  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11845for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11846do
11847  IFS=$as_save_IFS
11848  test -z "$as_dir" && as_dir=.
11849    for ac_prog in egrep; do
11850    for ac_exec_ext in '' $ac_executable_extensions; do
11851      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11852      as_fn_executable_p "$ac_path_EGREP" || continue
11853# Check for GNU ac_path_EGREP and select it if it is found.
11854  # Check for GNU $ac_path_EGREP
11855case `"$ac_path_EGREP" --version 2>&1` in
11856*GNU*)
11857  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11858*)
11859  ac_count=0
11860  $as_echo_n 0123456789 >"conftest.in"
11861  while :
11862  do
11863    cat "conftest.in" "conftest.in" >"conftest.tmp"
11864    mv "conftest.tmp" "conftest.in"
11865    cp "conftest.in" "conftest.nl"
11866    $as_echo 'EGREP' >> "conftest.nl"
11867    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11868    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11869    as_fn_arith $ac_count + 1 && ac_count=$as_val
11870    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11871      # Best one so far, save it but keep looking for a better one
11872      ac_cv_path_EGREP="$ac_path_EGREP"
11873      ac_path_EGREP_max=$ac_count
11874    fi
11875    # 10*(2^10) chars as input seems more than enough
11876    test $ac_count -gt 10 && break
11877  done
11878  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11879esac
11880
11881      $ac_path_EGREP_found && break 3
11882    done
11883  done
11884  done
11885IFS=$as_save_IFS
11886  if test -z "$ac_cv_path_EGREP"; then
11887    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11888  fi
11889else
11890  ac_cv_path_EGREP=$EGREP
11891fi
11892
11893   fi
11894fi
11895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11896$as_echo "$ac_cv_path_EGREP" >&6; }
11897 EGREP="$ac_cv_path_EGREP"
11898
11899
11900  else
11901    # The variable is set, but is it from the command line or the environment?
11902
11903    # Try to remove the string !EGREP! from our list.
11904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11906      # If it failed, the variable was not from the command line. Ignore it,
11907      # but warn the user (except for BASH, which is always set by the calling BASH).
11908      if test "xEGREP" != xBASH; then
11909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11910$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11911      fi
11912      # Try to locate tool using the code snippet
11913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11914$as_echo_n "checking for egrep... " >&6; }
11915if ${ac_cv_path_EGREP+:} false; then :
11916  $as_echo_n "(cached) " >&6
11917else
11918  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11919   then ac_cv_path_EGREP="$GREP -E"
11920   else
11921     if test -z "$EGREP"; then
11922  ac_path_EGREP_found=false
11923  # Loop through the user's path and test for each of PROGNAME-LIST
11924  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11925for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11926do
11927  IFS=$as_save_IFS
11928  test -z "$as_dir" && as_dir=.
11929    for ac_prog in egrep; do
11930    for ac_exec_ext in '' $ac_executable_extensions; do
11931      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11932      as_fn_executable_p "$ac_path_EGREP" || continue
11933# Check for GNU ac_path_EGREP and select it if it is found.
11934  # Check for GNU $ac_path_EGREP
11935case `"$ac_path_EGREP" --version 2>&1` in
11936*GNU*)
11937  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11938*)
11939  ac_count=0
11940  $as_echo_n 0123456789 >"conftest.in"
11941  while :
11942  do
11943    cat "conftest.in" "conftest.in" >"conftest.tmp"
11944    mv "conftest.tmp" "conftest.in"
11945    cp "conftest.in" "conftest.nl"
11946    $as_echo 'EGREP' >> "conftest.nl"
11947    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11948    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11949    as_fn_arith $ac_count + 1 && ac_count=$as_val
11950    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11951      # Best one so far, save it but keep looking for a better one
11952      ac_cv_path_EGREP="$ac_path_EGREP"
11953      ac_path_EGREP_max=$ac_count
11954    fi
11955    # 10*(2^10) chars as input seems more than enough
11956    test $ac_count -gt 10 && break
11957  done
11958  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11959esac
11960
11961      $ac_path_EGREP_found && break 3
11962    done
11963  done
11964  done
11965IFS=$as_save_IFS
11966  if test -z "$ac_cv_path_EGREP"; then
11967    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11968  fi
11969else
11970  ac_cv_path_EGREP=$EGREP
11971fi
11972
11973   fi
11974fi
11975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11976$as_echo "$ac_cv_path_EGREP" >&6; }
11977 EGREP="$ac_cv_path_EGREP"
11978
11979
11980    else
11981      # If it succeeded, then it was overridden by the user. We will use it
11982      # for the tool.
11983
11984      # First remove it from the list of overridden variables, so we can test
11985      # for unknown variables in the end.
11986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11987
11988      # Check if the provided tool contains a complete path.
11989      tool_specified="$EGREP"
11990      tool_basename="${tool_specified##*/}"
11991      if test "x$tool_basename" = "x$tool_specified"; then
11992        # A command without a complete path is provided, search $PATH.
11993        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
11994$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
11995        # Extract the first word of "$tool_basename", so it can be a program name with args.
11996set dummy $tool_basename; ac_word=$2
11997{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11998$as_echo_n "checking for $ac_word... " >&6; }
11999if ${ac_cv_path_EGREP+:} false; then :
12000  $as_echo_n "(cached) " >&6
12001else
12002  case $EGREP in
12003  [\\/]* | ?:[\\/]*)
12004  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12005  ;;
12006  *)
12007  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12008for as_dir in $PATH
12009do
12010  IFS=$as_save_IFS
12011  test -z "$as_dir" && as_dir=.
12012    for ac_exec_ext in '' $ac_executable_extensions; do
12013  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12014    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12015    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12016    break 2
12017  fi
12018done
12019  done
12020IFS=$as_save_IFS
12021
12022  ;;
12023esac
12024fi
12025EGREP=$ac_cv_path_EGREP
12026if test -n "$EGREP"; then
12027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12028$as_echo "$EGREP" >&6; }
12029else
12030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12031$as_echo "no" >&6; }
12032fi
12033
12034
12035        if test "x$EGREP" = x; then
12036          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12037        fi
12038      else
12039        # Otherwise we believe it is a complete path. Use it as it is.
12040        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12041$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12042        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12043$as_echo_n "checking for EGREP... " >&6; }
12044        if test ! -x "$tool_specified"; then
12045          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12046$as_echo "not found" >&6; }
12047          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12048        fi
12049        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12050$as_echo "$tool_specified" >&6; }
12051      fi
12052    fi
12053  fi
12054
12055
12056  if test "x$EGREP" = x; then
12057    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12058  fi
12059
12060
12061
12062
12063  # Publish this variable in the help.
12064
12065
12066  if test "x$FGREP" = x; then
12067    # The variable is not set by user, try to locate tool using the code snippet
12068    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12069$as_echo_n "checking for fgrep... " >&6; }
12070if ${ac_cv_path_FGREP+:} false; then :
12071  $as_echo_n "(cached) " >&6
12072else
12073  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12074   then ac_cv_path_FGREP="$GREP -F"
12075   else
12076     if test -z "$FGREP"; then
12077  ac_path_FGREP_found=false
12078  # Loop through the user's path and test for each of PROGNAME-LIST
12079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12080for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12081do
12082  IFS=$as_save_IFS
12083  test -z "$as_dir" && as_dir=.
12084    for ac_prog in fgrep; do
12085    for ac_exec_ext in '' $ac_executable_extensions; do
12086      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12087      as_fn_executable_p "$ac_path_FGREP" || continue
12088# Check for GNU ac_path_FGREP and select it if it is found.
12089  # Check for GNU $ac_path_FGREP
12090case `"$ac_path_FGREP" --version 2>&1` in
12091*GNU*)
12092  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12093*)
12094  ac_count=0
12095  $as_echo_n 0123456789 >"conftest.in"
12096  while :
12097  do
12098    cat "conftest.in" "conftest.in" >"conftest.tmp"
12099    mv "conftest.tmp" "conftest.in"
12100    cp "conftest.in" "conftest.nl"
12101    $as_echo 'FGREP' >> "conftest.nl"
12102    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12103    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12104    as_fn_arith $ac_count + 1 && ac_count=$as_val
12105    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12106      # Best one so far, save it but keep looking for a better one
12107      ac_cv_path_FGREP="$ac_path_FGREP"
12108      ac_path_FGREP_max=$ac_count
12109    fi
12110    # 10*(2^10) chars as input seems more than enough
12111    test $ac_count -gt 10 && break
12112  done
12113  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12114esac
12115
12116      $ac_path_FGREP_found && break 3
12117    done
12118  done
12119  done
12120IFS=$as_save_IFS
12121  if test -z "$ac_cv_path_FGREP"; then
12122    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12123  fi
12124else
12125  ac_cv_path_FGREP=$FGREP
12126fi
12127
12128   fi
12129fi
12130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12131$as_echo "$ac_cv_path_FGREP" >&6; }
12132 FGREP="$ac_cv_path_FGREP"
12133
12134
12135  else
12136    # The variable is set, but is it from the command line or the environment?
12137
12138    # Try to remove the string !FGREP! from our list.
12139    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12140    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12141      # If it failed, the variable was not from the command line. Ignore it,
12142      # but warn the user (except for BASH, which is always set by the calling BASH).
12143      if test "xFGREP" != xBASH; then
12144        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12145$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12146      fi
12147      # Try to locate tool using the code snippet
12148      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12149$as_echo_n "checking for fgrep... " >&6; }
12150if ${ac_cv_path_FGREP+:} false; then :
12151  $as_echo_n "(cached) " >&6
12152else
12153  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12154   then ac_cv_path_FGREP="$GREP -F"
12155   else
12156     if test -z "$FGREP"; then
12157  ac_path_FGREP_found=false
12158  # Loop through the user's path and test for each of PROGNAME-LIST
12159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12160for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12161do
12162  IFS=$as_save_IFS
12163  test -z "$as_dir" && as_dir=.
12164    for ac_prog in fgrep; do
12165    for ac_exec_ext in '' $ac_executable_extensions; do
12166      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12167      as_fn_executable_p "$ac_path_FGREP" || continue
12168# Check for GNU ac_path_FGREP and select it if it is found.
12169  # Check for GNU $ac_path_FGREP
12170case `"$ac_path_FGREP" --version 2>&1` in
12171*GNU*)
12172  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12173*)
12174  ac_count=0
12175  $as_echo_n 0123456789 >"conftest.in"
12176  while :
12177  do
12178    cat "conftest.in" "conftest.in" >"conftest.tmp"
12179    mv "conftest.tmp" "conftest.in"
12180    cp "conftest.in" "conftest.nl"
12181    $as_echo 'FGREP' >> "conftest.nl"
12182    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12183    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12184    as_fn_arith $ac_count + 1 && ac_count=$as_val
12185    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12186      # Best one so far, save it but keep looking for a better one
12187      ac_cv_path_FGREP="$ac_path_FGREP"
12188      ac_path_FGREP_max=$ac_count
12189    fi
12190    # 10*(2^10) chars as input seems more than enough
12191    test $ac_count -gt 10 && break
12192  done
12193  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12194esac
12195
12196      $ac_path_FGREP_found && break 3
12197    done
12198  done
12199  done
12200IFS=$as_save_IFS
12201  if test -z "$ac_cv_path_FGREP"; then
12202    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12203  fi
12204else
12205  ac_cv_path_FGREP=$FGREP
12206fi
12207
12208   fi
12209fi
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12211$as_echo "$ac_cv_path_FGREP" >&6; }
12212 FGREP="$ac_cv_path_FGREP"
12213
12214
12215    else
12216      # If it succeeded, then it was overridden by the user. We will use it
12217      # for the tool.
12218
12219      # First remove it from the list of overridden variables, so we can test
12220      # for unknown variables in the end.
12221      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12222
12223      # Check if the provided tool contains a complete path.
12224      tool_specified="$FGREP"
12225      tool_basename="${tool_specified##*/}"
12226      if test "x$tool_basename" = "x$tool_specified"; then
12227        # A command without a complete path is provided, search $PATH.
12228        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12229$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12230        # Extract the first word of "$tool_basename", so it can be a program name with args.
12231set dummy $tool_basename; ac_word=$2
12232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12233$as_echo_n "checking for $ac_word... " >&6; }
12234if ${ac_cv_path_FGREP+:} false; then :
12235  $as_echo_n "(cached) " >&6
12236else
12237  case $FGREP in
12238  [\\/]* | ?:[\\/]*)
12239  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12240  ;;
12241  *)
12242  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12243for as_dir in $PATH
12244do
12245  IFS=$as_save_IFS
12246  test -z "$as_dir" && as_dir=.
12247    for ac_exec_ext in '' $ac_executable_extensions; do
12248  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12249    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12250    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12251    break 2
12252  fi
12253done
12254  done
12255IFS=$as_save_IFS
12256
12257  ;;
12258esac
12259fi
12260FGREP=$ac_cv_path_FGREP
12261if test -n "$FGREP"; then
12262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12263$as_echo "$FGREP" >&6; }
12264else
12265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12266$as_echo "no" >&6; }
12267fi
12268
12269
12270        if test "x$FGREP" = x; then
12271          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12272        fi
12273      else
12274        # Otherwise we believe it is a complete path. Use it as it is.
12275        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12276$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12277        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12278$as_echo_n "checking for FGREP... " >&6; }
12279        if test ! -x "$tool_specified"; then
12280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12281$as_echo "not found" >&6; }
12282          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12283        fi
12284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12285$as_echo "$tool_specified" >&6; }
12286      fi
12287    fi
12288  fi
12289
12290
12291  if test "x$FGREP" = x; then
12292    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12293  fi
12294
12295
12296
12297
12298  # Publish this variable in the help.
12299
12300
12301  if test "x$SED" = x; then
12302    # The variable is not set by user, try to locate tool using the code snippet
12303    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12304$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12305if ${ac_cv_path_SED+:} false; then :
12306  $as_echo_n "(cached) " >&6
12307else
12308            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12309     for ac_i in 1 2 3 4 5 6 7; do
12310       ac_script="$ac_script$as_nl$ac_script"
12311     done
12312     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12313     { ac_script=; unset ac_script;}
12314     if test -z "$SED"; then
12315  ac_path_SED_found=false
12316  # Loop through the user's path and test for each of PROGNAME-LIST
12317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_prog in sed gsed; do
12323    for ac_exec_ext in '' $ac_executable_extensions; do
12324      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12325      as_fn_executable_p "$ac_path_SED" || continue
12326# Check for GNU ac_path_SED and select it if it is found.
12327  # Check for GNU $ac_path_SED
12328case `"$ac_path_SED" --version 2>&1` in
12329*GNU*)
12330  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12331*)
12332  ac_count=0
12333  $as_echo_n 0123456789 >"conftest.in"
12334  while :
12335  do
12336    cat "conftest.in" "conftest.in" >"conftest.tmp"
12337    mv "conftest.tmp" "conftest.in"
12338    cp "conftest.in" "conftest.nl"
12339    $as_echo '' >> "conftest.nl"
12340    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12341    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12342    as_fn_arith $ac_count + 1 && ac_count=$as_val
12343    if test $ac_count -gt ${ac_path_SED_max-0}; then
12344      # Best one so far, save it but keep looking for a better one
12345      ac_cv_path_SED="$ac_path_SED"
12346      ac_path_SED_max=$ac_count
12347    fi
12348    # 10*(2^10) chars as input seems more than enough
12349    test $ac_count -gt 10 && break
12350  done
12351  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12352esac
12353
12354      $ac_path_SED_found && break 3
12355    done
12356  done
12357  done
12358IFS=$as_save_IFS
12359  if test -z "$ac_cv_path_SED"; then
12360    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12361  fi
12362else
12363  ac_cv_path_SED=$SED
12364fi
12365
12366fi
12367{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12368$as_echo "$ac_cv_path_SED" >&6; }
12369 SED="$ac_cv_path_SED"
12370  rm -f conftest.sed
12371
12372  else
12373    # The variable is set, but is it from the command line or the environment?
12374
12375    # Try to remove the string !SED! from our list.
12376    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12377    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12378      # If it failed, the variable was not from the command line. Ignore it,
12379      # but warn the user (except for BASH, which is always set by the calling BASH).
12380      if test "xSED" != xBASH; then
12381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12382$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12383      fi
12384      # Try to locate tool using the code snippet
12385      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12386$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12387if ${ac_cv_path_SED+:} false; then :
12388  $as_echo_n "(cached) " >&6
12389else
12390            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12391     for ac_i in 1 2 3 4 5 6 7; do
12392       ac_script="$ac_script$as_nl$ac_script"
12393     done
12394     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12395     { ac_script=; unset ac_script;}
12396     if test -z "$SED"; then
12397  ac_path_SED_found=false
12398  # Loop through the user's path and test for each of PROGNAME-LIST
12399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12400for as_dir in $PATH
12401do
12402  IFS=$as_save_IFS
12403  test -z "$as_dir" && as_dir=.
12404    for ac_prog in sed gsed; do
12405    for ac_exec_ext in '' $ac_executable_extensions; do
12406      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12407      as_fn_executable_p "$ac_path_SED" || continue
12408# Check for GNU ac_path_SED and select it if it is found.
12409  # Check for GNU $ac_path_SED
12410case `"$ac_path_SED" --version 2>&1` in
12411*GNU*)
12412  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12413*)
12414  ac_count=0
12415  $as_echo_n 0123456789 >"conftest.in"
12416  while :
12417  do
12418    cat "conftest.in" "conftest.in" >"conftest.tmp"
12419    mv "conftest.tmp" "conftest.in"
12420    cp "conftest.in" "conftest.nl"
12421    $as_echo '' >> "conftest.nl"
12422    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12423    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12424    as_fn_arith $ac_count + 1 && ac_count=$as_val
12425    if test $ac_count -gt ${ac_path_SED_max-0}; then
12426      # Best one so far, save it but keep looking for a better one
12427      ac_cv_path_SED="$ac_path_SED"
12428      ac_path_SED_max=$ac_count
12429    fi
12430    # 10*(2^10) chars as input seems more than enough
12431    test $ac_count -gt 10 && break
12432  done
12433  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12434esac
12435
12436      $ac_path_SED_found && break 3
12437    done
12438  done
12439  done
12440IFS=$as_save_IFS
12441  if test -z "$ac_cv_path_SED"; then
12442    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12443  fi
12444else
12445  ac_cv_path_SED=$SED
12446fi
12447
12448fi
12449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12450$as_echo "$ac_cv_path_SED" >&6; }
12451 SED="$ac_cv_path_SED"
12452  rm -f conftest.sed
12453
12454    else
12455      # If it succeeded, then it was overridden by the user. We will use it
12456      # for the tool.
12457
12458      # First remove it from the list of overridden variables, so we can test
12459      # for unknown variables in the end.
12460      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12461
12462      # Check if the provided tool contains a complete path.
12463      tool_specified="$SED"
12464      tool_basename="${tool_specified##*/}"
12465      if test "x$tool_basename" = "x$tool_specified"; then
12466        # A command without a complete path is provided, search $PATH.
12467        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12468$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12469        # Extract the first word of "$tool_basename", so it can be a program name with args.
12470set dummy $tool_basename; ac_word=$2
12471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12472$as_echo_n "checking for $ac_word... " >&6; }
12473if ${ac_cv_path_SED+:} false; then :
12474  $as_echo_n "(cached) " >&6
12475else
12476  case $SED in
12477  [\\/]* | ?:[\\/]*)
12478  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12479  ;;
12480  *)
12481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12482for as_dir in $PATH
12483do
12484  IFS=$as_save_IFS
12485  test -z "$as_dir" && as_dir=.
12486    for ac_exec_ext in '' $ac_executable_extensions; do
12487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12488    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12490    break 2
12491  fi
12492done
12493  done
12494IFS=$as_save_IFS
12495
12496  ;;
12497esac
12498fi
12499SED=$ac_cv_path_SED
12500if test -n "$SED"; then
12501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12502$as_echo "$SED" >&6; }
12503else
12504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12505$as_echo "no" >&6; }
12506fi
12507
12508
12509        if test "x$SED" = x; then
12510          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12511        fi
12512      else
12513        # Otherwise we believe it is a complete path. Use it as it is.
12514        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12515$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12516        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12517$as_echo_n "checking for SED... " >&6; }
12518        if test ! -x "$tool_specified"; then
12519          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12520$as_echo "not found" >&6; }
12521          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12522        fi
12523        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12524$as_echo "$tool_specified" >&6; }
12525      fi
12526    fi
12527  fi
12528
12529
12530  if test "x$SED" = x; then
12531    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12532  fi
12533
12534
12535
12536  # Always force rm.
12537  RM="$RM -f"
12538
12539  # pwd behaves differently on various platforms and some don't support the -L flag.
12540  # Always use the bash builtin pwd to get uniform behavior.
12541  THEPWDCMD=pwd
12542
12543  # These are not required on all platforms
12544
12545
12546  # Publish this variable in the help.
12547
12548
12549  if test "x$CYGPATH" = x; then
12550    # The variable is not set by user, try to locate tool using the code snippet
12551    for ac_prog in cygpath
12552do
12553  # Extract the first word of "$ac_prog", so it can be a program name with args.
12554set dummy $ac_prog; ac_word=$2
12555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12556$as_echo_n "checking for $ac_word... " >&6; }
12557if ${ac_cv_path_CYGPATH+:} false; then :
12558  $as_echo_n "(cached) " >&6
12559else
12560  case $CYGPATH in
12561  [\\/]* | ?:[\\/]*)
12562  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12563  ;;
12564  *)
12565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12566for as_dir in $PATH
12567do
12568  IFS=$as_save_IFS
12569  test -z "$as_dir" && as_dir=.
12570    for ac_exec_ext in '' $ac_executable_extensions; do
12571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12572    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12574    break 2
12575  fi
12576done
12577  done
12578IFS=$as_save_IFS
12579
12580  ;;
12581esac
12582fi
12583CYGPATH=$ac_cv_path_CYGPATH
12584if test -n "$CYGPATH"; then
12585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12586$as_echo "$CYGPATH" >&6; }
12587else
12588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12589$as_echo "no" >&6; }
12590fi
12591
12592
12593  test -n "$CYGPATH" && break
12594done
12595
12596  else
12597    # The variable is set, but is it from the command line or the environment?
12598
12599    # Try to remove the string !CYGPATH! from our list.
12600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12602      # If it failed, the variable was not from the command line. Ignore it,
12603      # but warn the user (except for BASH, which is always set by the calling BASH).
12604      if test "xCYGPATH" != xBASH; then
12605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12606$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12607      fi
12608      # Try to locate tool using the code snippet
12609      for ac_prog in cygpath
12610do
12611  # Extract the first word of "$ac_prog", so it can be a program name with args.
12612set dummy $ac_prog; ac_word=$2
12613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12614$as_echo_n "checking for $ac_word... " >&6; }
12615if ${ac_cv_path_CYGPATH+:} false; then :
12616  $as_echo_n "(cached) " >&6
12617else
12618  case $CYGPATH in
12619  [\\/]* | ?:[\\/]*)
12620  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12621  ;;
12622  *)
12623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12624for as_dir in $PATH
12625do
12626  IFS=$as_save_IFS
12627  test -z "$as_dir" && as_dir=.
12628    for ac_exec_ext in '' $ac_executable_extensions; do
12629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12630    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12632    break 2
12633  fi
12634done
12635  done
12636IFS=$as_save_IFS
12637
12638  ;;
12639esac
12640fi
12641CYGPATH=$ac_cv_path_CYGPATH
12642if test -n "$CYGPATH"; then
12643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12644$as_echo "$CYGPATH" >&6; }
12645else
12646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12647$as_echo "no" >&6; }
12648fi
12649
12650
12651  test -n "$CYGPATH" && break
12652done
12653
12654    else
12655      # If it succeeded, then it was overridden by the user. We will use it
12656      # for the tool.
12657
12658      # First remove it from the list of overridden variables, so we can test
12659      # for unknown variables in the end.
12660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12661
12662      # Check if the provided tool contains a complete path.
12663      tool_specified="$CYGPATH"
12664      tool_basename="${tool_specified##*/}"
12665      if test "x$tool_basename" = "x$tool_specified"; then
12666        # A command without a complete path is provided, search $PATH.
12667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12668$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12669        # Extract the first word of "$tool_basename", so it can be a program name with args.
12670set dummy $tool_basename; ac_word=$2
12671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12672$as_echo_n "checking for $ac_word... " >&6; }
12673if ${ac_cv_path_CYGPATH+:} false; then :
12674  $as_echo_n "(cached) " >&6
12675else
12676  case $CYGPATH in
12677  [\\/]* | ?:[\\/]*)
12678  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12679  ;;
12680  *)
12681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12682for as_dir in $PATH
12683do
12684  IFS=$as_save_IFS
12685  test -z "$as_dir" && as_dir=.
12686    for ac_exec_ext in '' $ac_executable_extensions; do
12687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12688    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12690    break 2
12691  fi
12692done
12693  done
12694IFS=$as_save_IFS
12695
12696  ;;
12697esac
12698fi
12699CYGPATH=$ac_cv_path_CYGPATH
12700if test -n "$CYGPATH"; then
12701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12702$as_echo "$CYGPATH" >&6; }
12703else
12704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12705$as_echo "no" >&6; }
12706fi
12707
12708
12709        if test "x$CYGPATH" = x; then
12710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12711        fi
12712      else
12713        # Otherwise we believe it is a complete path. Use it as it is.
12714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12715$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12717$as_echo_n "checking for CYGPATH... " >&6; }
12718        if test ! -x "$tool_specified"; then
12719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12720$as_echo "not found" >&6; }
12721          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12722        fi
12723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12724$as_echo "$tool_specified" >&6; }
12725      fi
12726    fi
12727  fi
12728
12729
12730
12731
12732  # Publish this variable in the help.
12733
12734
12735  if test "x$READLINK" = x; then
12736    # The variable is not set by user, try to locate tool using the code snippet
12737    for ac_prog in greadlink readlink
12738do
12739  # Extract the first word of "$ac_prog", so it can be a program name with args.
12740set dummy $ac_prog; ac_word=$2
12741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12742$as_echo_n "checking for $ac_word... " >&6; }
12743if ${ac_cv_path_READLINK+:} false; then :
12744  $as_echo_n "(cached) " >&6
12745else
12746  case $READLINK in
12747  [\\/]* | ?:[\\/]*)
12748  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12749  ;;
12750  *)
12751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12752for as_dir in $PATH
12753do
12754  IFS=$as_save_IFS
12755  test -z "$as_dir" && as_dir=.
12756    for ac_exec_ext in '' $ac_executable_extensions; do
12757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12758    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12760    break 2
12761  fi
12762done
12763  done
12764IFS=$as_save_IFS
12765
12766  ;;
12767esac
12768fi
12769READLINK=$ac_cv_path_READLINK
12770if test -n "$READLINK"; then
12771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12772$as_echo "$READLINK" >&6; }
12773else
12774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12775$as_echo "no" >&6; }
12776fi
12777
12778
12779  test -n "$READLINK" && break
12780done
12781
12782  else
12783    # The variable is set, but is it from the command line or the environment?
12784
12785    # Try to remove the string !READLINK! from our list.
12786    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12787    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12788      # If it failed, the variable was not from the command line. Ignore it,
12789      # but warn the user (except for BASH, which is always set by the calling BASH).
12790      if test "xREADLINK" != xBASH; then
12791        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12792$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12793      fi
12794      # Try to locate tool using the code snippet
12795      for ac_prog in greadlink readlink
12796do
12797  # Extract the first word of "$ac_prog", so it can be a program name with args.
12798set dummy $ac_prog; ac_word=$2
12799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12800$as_echo_n "checking for $ac_word... " >&6; }
12801if ${ac_cv_path_READLINK+:} false; then :
12802  $as_echo_n "(cached) " >&6
12803else
12804  case $READLINK in
12805  [\\/]* | ?:[\\/]*)
12806  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12807  ;;
12808  *)
12809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12810for as_dir in $PATH
12811do
12812  IFS=$as_save_IFS
12813  test -z "$as_dir" && as_dir=.
12814    for ac_exec_ext in '' $ac_executable_extensions; do
12815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12816    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12818    break 2
12819  fi
12820done
12821  done
12822IFS=$as_save_IFS
12823
12824  ;;
12825esac
12826fi
12827READLINK=$ac_cv_path_READLINK
12828if test -n "$READLINK"; then
12829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12830$as_echo "$READLINK" >&6; }
12831else
12832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12833$as_echo "no" >&6; }
12834fi
12835
12836
12837  test -n "$READLINK" && break
12838done
12839
12840    else
12841      # If it succeeded, then it was overridden by the user. We will use it
12842      # for the tool.
12843
12844      # First remove it from the list of overridden variables, so we can test
12845      # for unknown variables in the end.
12846      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12847
12848      # Check if the provided tool contains a complete path.
12849      tool_specified="$READLINK"
12850      tool_basename="${tool_specified##*/}"
12851      if test "x$tool_basename" = "x$tool_specified"; then
12852        # A command without a complete path is provided, search $PATH.
12853        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12854$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12855        # Extract the first word of "$tool_basename", so it can be a program name with args.
12856set dummy $tool_basename; ac_word=$2
12857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12858$as_echo_n "checking for $ac_word... " >&6; }
12859if ${ac_cv_path_READLINK+:} false; then :
12860  $as_echo_n "(cached) " >&6
12861else
12862  case $READLINK in
12863  [\\/]* | ?:[\\/]*)
12864  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12865  ;;
12866  *)
12867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12868for as_dir in $PATH
12869do
12870  IFS=$as_save_IFS
12871  test -z "$as_dir" && as_dir=.
12872    for ac_exec_ext in '' $ac_executable_extensions; do
12873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12874    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12876    break 2
12877  fi
12878done
12879  done
12880IFS=$as_save_IFS
12881
12882  ;;
12883esac
12884fi
12885READLINK=$ac_cv_path_READLINK
12886if test -n "$READLINK"; then
12887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12888$as_echo "$READLINK" >&6; }
12889else
12890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12891$as_echo "no" >&6; }
12892fi
12893
12894
12895        if test "x$READLINK" = x; then
12896          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12897        fi
12898      else
12899        # Otherwise we believe it is a complete path. Use it as it is.
12900        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12901$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12902        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12903$as_echo_n "checking for READLINK... " >&6; }
12904        if test ! -x "$tool_specified"; then
12905          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12906$as_echo "not found" >&6; }
12907          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12908        fi
12909        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12910$as_echo "$tool_specified" >&6; }
12911      fi
12912    fi
12913  fi
12914
12915
12916
12917
12918  # Publish this variable in the help.
12919
12920
12921  if test "x$DF" = x; then
12922    # The variable is not set by user, try to locate tool using the code snippet
12923    for ac_prog in df
12924do
12925  # Extract the first word of "$ac_prog", so it can be a program name with args.
12926set dummy $ac_prog; ac_word=$2
12927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12928$as_echo_n "checking for $ac_word... " >&6; }
12929if ${ac_cv_path_DF+:} false; then :
12930  $as_echo_n "(cached) " >&6
12931else
12932  case $DF in
12933  [\\/]* | ?:[\\/]*)
12934  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12935  ;;
12936  *)
12937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12938for as_dir in $PATH
12939do
12940  IFS=$as_save_IFS
12941  test -z "$as_dir" && as_dir=.
12942    for ac_exec_ext in '' $ac_executable_extensions; do
12943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12944    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
12945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12946    break 2
12947  fi
12948done
12949  done
12950IFS=$as_save_IFS
12951
12952  ;;
12953esac
12954fi
12955DF=$ac_cv_path_DF
12956if test -n "$DF"; then
12957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
12958$as_echo "$DF" >&6; }
12959else
12960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12961$as_echo "no" >&6; }
12962fi
12963
12964
12965  test -n "$DF" && break
12966done
12967
12968  else
12969    # The variable is set, but is it from the command line or the environment?
12970
12971    # Try to remove the string !DF! from our list.
12972    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
12973    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12974      # If it failed, the variable was not from the command line. Ignore it,
12975      # but warn the user (except for BASH, which is always set by the calling BASH).
12976      if test "xDF" != xBASH; then
12977        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
12978$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
12979      fi
12980      # Try to locate tool using the code snippet
12981      for ac_prog in df
12982do
12983  # Extract the first word of "$ac_prog", so it can be a program name with args.
12984set dummy $ac_prog; ac_word=$2
12985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12986$as_echo_n "checking for $ac_word... " >&6; }
12987if ${ac_cv_path_DF+:} false; then :
12988  $as_echo_n "(cached) " >&6
12989else
12990  case $DF in
12991  [\\/]* | ?:[\\/]*)
12992  ac_cv_path_DF="$DF" # Let the user override the test with a path.
12993  ;;
12994  *)
12995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12996for as_dir in $PATH
12997do
12998  IFS=$as_save_IFS
12999  test -z "$as_dir" && as_dir=.
13000    for ac_exec_ext in '' $ac_executable_extensions; do
13001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13002    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13004    break 2
13005  fi
13006done
13007  done
13008IFS=$as_save_IFS
13009
13010  ;;
13011esac
13012fi
13013DF=$ac_cv_path_DF
13014if test -n "$DF"; then
13015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13016$as_echo "$DF" >&6; }
13017else
13018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13019$as_echo "no" >&6; }
13020fi
13021
13022
13023  test -n "$DF" && break
13024done
13025
13026    else
13027      # If it succeeded, then it was overridden by the user. We will use it
13028      # for the tool.
13029
13030      # First remove it from the list of overridden variables, so we can test
13031      # for unknown variables in the end.
13032      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13033
13034      # Check if the provided tool contains a complete path.
13035      tool_specified="$DF"
13036      tool_basename="${tool_specified##*/}"
13037      if test "x$tool_basename" = "x$tool_specified"; then
13038        # A command without a complete path is provided, search $PATH.
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13040$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13041        # Extract the first word of "$tool_basename", so it can be a program name with args.
13042set dummy $tool_basename; ac_word=$2
13043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13044$as_echo_n "checking for $ac_word... " >&6; }
13045if ${ac_cv_path_DF+:} false; then :
13046  $as_echo_n "(cached) " >&6
13047else
13048  case $DF in
13049  [\\/]* | ?:[\\/]*)
13050  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13051  ;;
13052  *)
13053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13054for as_dir in $PATH
13055do
13056  IFS=$as_save_IFS
13057  test -z "$as_dir" && as_dir=.
13058    for ac_exec_ext in '' $ac_executable_extensions; do
13059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13060    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13062    break 2
13063  fi
13064done
13065  done
13066IFS=$as_save_IFS
13067
13068  ;;
13069esac
13070fi
13071DF=$ac_cv_path_DF
13072if test -n "$DF"; then
13073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13074$as_echo "$DF" >&6; }
13075else
13076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
13078fi
13079
13080
13081        if test "x$DF" = x; then
13082          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13083        fi
13084      else
13085        # Otherwise we believe it is a complete path. Use it as it is.
13086        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13087$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13088        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13089$as_echo_n "checking for DF... " >&6; }
13090        if test ! -x "$tool_specified"; then
13091          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13092$as_echo "not found" >&6; }
13093          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13094        fi
13095        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13096$as_echo "$tool_specified" >&6; }
13097      fi
13098    fi
13099  fi
13100
13101
13102
13103
13104  # Publish this variable in the help.
13105
13106
13107  if test "x$SETFILE" = x; then
13108    # The variable is not set by user, try to locate tool using the code snippet
13109    for ac_prog in SetFile
13110do
13111  # Extract the first word of "$ac_prog", so it can be a program name with args.
13112set dummy $ac_prog; ac_word=$2
13113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13114$as_echo_n "checking for $ac_word... " >&6; }
13115if ${ac_cv_path_SETFILE+:} false; then :
13116  $as_echo_n "(cached) " >&6
13117else
13118  case $SETFILE in
13119  [\\/]* | ?:[\\/]*)
13120  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13121  ;;
13122  *)
13123  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13124for as_dir in $PATH
13125do
13126  IFS=$as_save_IFS
13127  test -z "$as_dir" && as_dir=.
13128    for ac_exec_ext in '' $ac_executable_extensions; do
13129  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13130    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13131    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13132    break 2
13133  fi
13134done
13135  done
13136IFS=$as_save_IFS
13137
13138  ;;
13139esac
13140fi
13141SETFILE=$ac_cv_path_SETFILE
13142if test -n "$SETFILE"; then
13143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13144$as_echo "$SETFILE" >&6; }
13145else
13146  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13147$as_echo "no" >&6; }
13148fi
13149
13150
13151  test -n "$SETFILE" && break
13152done
13153
13154  else
13155    # The variable is set, but is it from the command line or the environment?
13156
13157    # Try to remove the string !SETFILE! from our list.
13158    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13159    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13160      # If it failed, the variable was not from the command line. Ignore it,
13161      # but warn the user (except for BASH, which is always set by the calling BASH).
13162      if test "xSETFILE" != xBASH; then
13163        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13164$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13165      fi
13166      # Try to locate tool using the code snippet
13167      for ac_prog in SetFile
13168do
13169  # Extract the first word of "$ac_prog", so it can be a program name with args.
13170set dummy $ac_prog; ac_word=$2
13171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13172$as_echo_n "checking for $ac_word... " >&6; }
13173if ${ac_cv_path_SETFILE+:} false; then :
13174  $as_echo_n "(cached) " >&6
13175else
13176  case $SETFILE in
13177  [\\/]* | ?:[\\/]*)
13178  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13179  ;;
13180  *)
13181  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13182for as_dir in $PATH
13183do
13184  IFS=$as_save_IFS
13185  test -z "$as_dir" && as_dir=.
13186    for ac_exec_ext in '' $ac_executable_extensions; do
13187  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13188    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13189    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13190    break 2
13191  fi
13192done
13193  done
13194IFS=$as_save_IFS
13195
13196  ;;
13197esac
13198fi
13199SETFILE=$ac_cv_path_SETFILE
13200if test -n "$SETFILE"; then
13201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13202$as_echo "$SETFILE" >&6; }
13203else
13204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13205$as_echo "no" >&6; }
13206fi
13207
13208
13209  test -n "$SETFILE" && break
13210done
13211
13212    else
13213      # If it succeeded, then it was overridden by the user. We will use it
13214      # for the tool.
13215
13216      # First remove it from the list of overridden variables, so we can test
13217      # for unknown variables in the end.
13218      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13219
13220      # Check if the provided tool contains a complete path.
13221      tool_specified="$SETFILE"
13222      tool_basename="${tool_specified##*/}"
13223      if test "x$tool_basename" = "x$tool_specified"; then
13224        # A command without a complete path is provided, search $PATH.
13225        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13226$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13227        # Extract the first word of "$tool_basename", so it can be a program name with args.
13228set dummy $tool_basename; ac_word=$2
13229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13230$as_echo_n "checking for $ac_word... " >&6; }
13231if ${ac_cv_path_SETFILE+:} false; then :
13232  $as_echo_n "(cached) " >&6
13233else
13234  case $SETFILE in
13235  [\\/]* | ?:[\\/]*)
13236  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13237  ;;
13238  *)
13239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13240for as_dir in $PATH
13241do
13242  IFS=$as_save_IFS
13243  test -z "$as_dir" && as_dir=.
13244    for ac_exec_ext in '' $ac_executable_extensions; do
13245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13246    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13248    break 2
13249  fi
13250done
13251  done
13252IFS=$as_save_IFS
13253
13254  ;;
13255esac
13256fi
13257SETFILE=$ac_cv_path_SETFILE
13258if test -n "$SETFILE"; then
13259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13260$as_echo "$SETFILE" >&6; }
13261else
13262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13263$as_echo "no" >&6; }
13264fi
13265
13266
13267        if test "x$SETFILE" = x; then
13268          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13269        fi
13270      else
13271        # Otherwise we believe it is a complete path. Use it as it is.
13272        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13273$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13274        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13275$as_echo_n "checking for SETFILE... " >&6; }
13276        if test ! -x "$tool_specified"; then
13277          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13278$as_echo "not found" >&6; }
13279          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13280        fi
13281        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13282$as_echo "$tool_specified" >&6; }
13283      fi
13284    fi
13285  fi
13286
13287
13288
13289
13290# Now we can determine OpenJDK build and target platforms. This is required to
13291# have early on.
13292# Make sure we can run config.sub.
13293$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13294  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13295
13296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13297$as_echo_n "checking build system type... " >&6; }
13298if ${ac_cv_build+:} false; then :
13299  $as_echo_n "(cached) " >&6
13300else
13301  ac_build_alias=$build_alias
13302test "x$ac_build_alias" = x &&
13303  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13304test "x$ac_build_alias" = x &&
13305  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13306ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13307  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13308
13309fi
13310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13311$as_echo "$ac_cv_build" >&6; }
13312case $ac_cv_build in
13313*-*-*) ;;
13314*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13315esac
13316build=$ac_cv_build
13317ac_save_IFS=$IFS; IFS='-'
13318set x $ac_cv_build
13319shift
13320build_cpu=$1
13321build_vendor=$2
13322shift; shift
13323# Remember, the first character of IFS is used to create $*,
13324# except with old shells:
13325build_os=$*
13326IFS=$ac_save_IFS
13327case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13328
13329
13330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13331$as_echo_n "checking host system type... " >&6; }
13332if ${ac_cv_host+:} false; then :
13333  $as_echo_n "(cached) " >&6
13334else
13335  if test "x$host_alias" = x; then
13336  ac_cv_host=$ac_cv_build
13337else
13338  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13339    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13340fi
13341
13342fi
13343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13344$as_echo "$ac_cv_host" >&6; }
13345case $ac_cv_host in
13346*-*-*) ;;
13347*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13348esac
13349host=$ac_cv_host
13350ac_save_IFS=$IFS; IFS='-'
13351set x $ac_cv_host
13352shift
13353host_cpu=$1
13354host_vendor=$2
13355shift; shift
13356# Remember, the first character of IFS is used to create $*,
13357# except with old shells:
13358host_os=$*
13359IFS=$ac_save_IFS
13360case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13361
13362
13363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13364$as_echo_n "checking target system type... " >&6; }
13365if ${ac_cv_target+:} false; then :
13366  $as_echo_n "(cached) " >&6
13367else
13368  if test "x$target_alias" = x; then
13369  ac_cv_target=$ac_cv_host
13370else
13371  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13372    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13373fi
13374
13375fi
13376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13377$as_echo "$ac_cv_target" >&6; }
13378case $ac_cv_target in
13379*-*-*) ;;
13380*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13381esac
13382target=$ac_cv_target
13383ac_save_IFS=$IFS; IFS='-'
13384set x $ac_cv_target
13385shift
13386target_cpu=$1
13387target_vendor=$2
13388shift; shift
13389# Remember, the first character of IFS is used to create $*,
13390# except with old shells:
13391target_os=$*
13392IFS=$ac_save_IFS
13393case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13394
13395
13396# The aliases save the names the user supplied, while $host etc.
13397# will get canonicalized.
13398test -n "$target_alias" &&
13399  test "$program_prefix$program_suffix$program_transform_name" = \
13400    NONENONEs,x,x, &&
13401  program_prefix=${target_alias}-
13402
13403  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13404  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13405  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13406  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13407  # to use the configure naming style.
13408
13409
13410
13411
13412
13413  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13414  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13415  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13416  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13417  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13418  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13419
13420
13421
13422  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13423
13424  case "$build_os" in
13425    *linux*)
13426      VAR_OS=linux
13427      VAR_OS_API=posix
13428      VAR_OS_ENV=linux
13429      ;;
13430    *solaris*)
13431      VAR_OS=solaris
13432      VAR_OS_API=posix
13433      VAR_OS_ENV=solaris
13434      ;;
13435    *darwin*)
13436      VAR_OS=macosx
13437      VAR_OS_API=posix
13438      VAR_OS_ENV=macosx
13439      ;;
13440    *bsd*)
13441      VAR_OS=bsd
13442      VAR_OS_API=posix
13443      VAR_OS_ENV=bsd
13444      ;;
13445    *cygwin*)
13446      VAR_OS=windows
13447      VAR_OS_API=winapi
13448      VAR_OS_ENV=windows.cygwin
13449      ;;
13450    *mingw*)
13451      VAR_OS=windows
13452      VAR_OS_API=winapi
13453      VAR_OS_ENV=windows.msys
13454      ;;
13455    *aix*)
13456      VAR_OS=aix
13457      VAR_OS_API=posix
13458      VAR_OS_ENV=aix
13459      ;;
13460    *)
13461      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13462      ;;
13463  esac
13464
13465
13466  # First argument is the cpu name from the trip/quad
13467  case "$build_cpu" in
13468    x86_64)
13469      VAR_CPU=x86_64
13470      VAR_CPU_ARCH=x86
13471      VAR_CPU_BITS=64
13472      VAR_CPU_ENDIAN=little
13473      ;;
13474    i?86)
13475      VAR_CPU=x86
13476      VAR_CPU_ARCH=x86
13477      VAR_CPU_BITS=32
13478      VAR_CPU_ENDIAN=little
13479      ;;
13480    arm*)
13481      VAR_CPU=arm
13482      VAR_CPU_ARCH=arm
13483      VAR_CPU_BITS=32
13484      VAR_CPU_ENDIAN=little
13485      ;;
13486    powerpc)
13487      VAR_CPU=ppc
13488      VAR_CPU_ARCH=ppc
13489      VAR_CPU_BITS=32
13490      VAR_CPU_ENDIAN=big
13491      ;;
13492    powerpc64)
13493      VAR_CPU=ppc64
13494      VAR_CPU_ARCH=ppc
13495      VAR_CPU_BITS=64
13496      VAR_CPU_ENDIAN=big
13497      ;;
13498    s390)
13499      VAR_CPU=s390
13500      VAR_CPU_ARCH=s390
13501      VAR_CPU_BITS=32
13502      VAR_CPU_ENDIAN=big
13503      ;;
13504    s390x)
13505      VAR_CPU=s390x
13506      VAR_CPU_ARCH=s390
13507      VAR_CPU_BITS=64
13508      VAR_CPU_ENDIAN=big
13509      ;;
13510    sparc)
13511      VAR_CPU=sparc
13512      VAR_CPU_ARCH=sparc
13513      VAR_CPU_BITS=32
13514      VAR_CPU_ENDIAN=big
13515      ;;
13516    sparcv9)
13517      VAR_CPU=sparcv9
13518      VAR_CPU_ARCH=sparc
13519      VAR_CPU_BITS=64
13520      VAR_CPU_ENDIAN=big
13521      ;;
13522    *)
13523      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13524      ;;
13525  esac
13526
13527  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13528  OPENJDK_BUILD_OS="$VAR_OS"
13529  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13530  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13531  OPENJDK_BUILD_CPU="$VAR_CPU"
13532  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13533  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13534  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13535
13536
13537
13538
13539
13540
13541
13542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13543$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13545$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13546
13547  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13548
13549  case "$host_os" in
13550    *linux*)
13551      VAR_OS=linux
13552      VAR_OS_API=posix
13553      VAR_OS_ENV=linux
13554      ;;
13555    *solaris*)
13556      VAR_OS=solaris
13557      VAR_OS_API=posix
13558      VAR_OS_ENV=solaris
13559      ;;
13560    *darwin*)
13561      VAR_OS=macosx
13562      VAR_OS_API=posix
13563      VAR_OS_ENV=macosx
13564      ;;
13565    *bsd*)
13566      VAR_OS=bsd
13567      VAR_OS_API=posix
13568      VAR_OS_ENV=bsd
13569      ;;
13570    *cygwin*)
13571      VAR_OS=windows
13572      VAR_OS_API=winapi
13573      VAR_OS_ENV=windows.cygwin
13574      ;;
13575    *mingw*)
13576      VAR_OS=windows
13577      VAR_OS_API=winapi
13578      VAR_OS_ENV=windows.msys
13579      ;;
13580    *aix*)
13581      VAR_OS=aix
13582      VAR_OS_API=posix
13583      VAR_OS_ENV=aix
13584      ;;
13585    *)
13586      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13587      ;;
13588  esac
13589
13590
13591  # First argument is the cpu name from the trip/quad
13592  case "$host_cpu" in
13593    x86_64)
13594      VAR_CPU=x86_64
13595      VAR_CPU_ARCH=x86
13596      VAR_CPU_BITS=64
13597      VAR_CPU_ENDIAN=little
13598      ;;
13599    i?86)
13600      VAR_CPU=x86
13601      VAR_CPU_ARCH=x86
13602      VAR_CPU_BITS=32
13603      VAR_CPU_ENDIAN=little
13604      ;;
13605    arm*)
13606      VAR_CPU=arm
13607      VAR_CPU_ARCH=arm
13608      VAR_CPU_BITS=32
13609      VAR_CPU_ENDIAN=little
13610      ;;
13611    powerpc)
13612      VAR_CPU=ppc
13613      VAR_CPU_ARCH=ppc
13614      VAR_CPU_BITS=32
13615      VAR_CPU_ENDIAN=big
13616      ;;
13617    powerpc64)
13618      VAR_CPU=ppc64
13619      VAR_CPU_ARCH=ppc
13620      VAR_CPU_BITS=64
13621      VAR_CPU_ENDIAN=big
13622      ;;
13623    s390)
13624      VAR_CPU=s390
13625      VAR_CPU_ARCH=s390
13626      VAR_CPU_BITS=32
13627      VAR_CPU_ENDIAN=big
13628      ;;
13629    s390x)
13630      VAR_CPU=s390x
13631      VAR_CPU_ARCH=s390
13632      VAR_CPU_BITS=64
13633      VAR_CPU_ENDIAN=big
13634      ;;
13635    sparc)
13636      VAR_CPU=sparc
13637      VAR_CPU_ARCH=sparc
13638      VAR_CPU_BITS=32
13639      VAR_CPU_ENDIAN=big
13640      ;;
13641    sparcv9)
13642      VAR_CPU=sparcv9
13643      VAR_CPU_ARCH=sparc
13644      VAR_CPU_BITS=64
13645      VAR_CPU_ENDIAN=big
13646      ;;
13647    *)
13648      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13649      ;;
13650  esac
13651
13652  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13653  OPENJDK_TARGET_OS="$VAR_OS"
13654  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13655  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13656  OPENJDK_TARGET_CPU="$VAR_CPU"
13657  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13658  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13659  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13660
13661
13662
13663
13664
13665
13666
13667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13668$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13670$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13671
13672
13673
13674# Check whether --with-target-bits was given.
13675if test "${with_target_bits+set}" = set; then :
13676  withval=$with_target_bits;
13677fi
13678
13679
13680  # We have three types of compiles:
13681  # native  == normal compilation, target system == build system
13682  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13683  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13684  #
13685  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13686    # We're doing a proper cross-compilation
13687    COMPILE_TYPE="cross"
13688  else
13689    COMPILE_TYPE="native"
13690  fi
13691
13692  if test "x$with_target_bits" != x; then
13693    if test "x$COMPILE_TYPE" = "xcross"; then
13694      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13695    fi
13696
13697    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13698      # A reduced build is requested
13699      COMPILE_TYPE="reduced"
13700      OPENJDK_TARGET_CPU_BITS=32
13701      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13702        OPENJDK_TARGET_CPU=x86
13703      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13704        OPENJDK_TARGET_CPU=sparc
13705      else
13706        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13707      fi
13708    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13709      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
13710    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13711      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13712$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13713    else
13714      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13715    fi
13716  fi
13717
13718
13719  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13720$as_echo_n "checking compilation type... " >&6; }
13721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13722$as_echo "$COMPILE_TYPE" >&6; }
13723
13724
13725  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13726    REQUIRED_OS_NAME=SunOS
13727    REQUIRED_OS_VERSION=5.10
13728  fi
13729  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13730    REQUIRED_OS_NAME=Linux
13731    REQUIRED_OS_VERSION=2.6
13732  fi
13733  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13734    REQUIRED_OS_NAME=Windows
13735    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13736      REQUIRED_OS_VERSION=5.2
13737    else
13738      REQUIRED_OS_VERSION=5.1
13739    fi
13740  fi
13741  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13742    REQUIRED_OS_NAME=Darwin
13743    REQUIRED_OS_VERSION=11.2
13744  fi
13745
13746
13747
13748
13749
13750  # Also store the legacy naming of the cpu.
13751  # Ie i586 and amd64 instead of x86 and x86_64
13752  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13753  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13754    OPENJDK_TARGET_CPU_LEGACY="i586"
13755  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13756    # On all platforms except MacOSX replace x86_64 with amd64.
13757    OPENJDK_TARGET_CPU_LEGACY="amd64"
13758  fi
13759
13760
13761  # And the second legacy naming of the cpu.
13762  # Ie i386 and amd64 instead of x86 and x86_64.
13763  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13764  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13765    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13766  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13767    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13768  fi
13769
13770
13771  # This is the name of the cpu (but using i386 and amd64 instead of
13772  # x86 and x86_64, respectively), preceeded by a /, to be used when
13773  # locating libraries. On macosx, it's empty, though.
13774  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13775  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13776    OPENJDK_TARGET_CPU_LIBDIR=""
13777  fi
13778
13779
13780  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13781  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13782  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13783  OPENJDK_TARGET_CPU_ISADIR=""
13784  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13785    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13786      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13787    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13788      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13789    fi
13790  fi
13791
13792
13793  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13794  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13795  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13796    # On linux only, we replace x86 with i386.
13797    OPENJDK_TARGET_CPU_OSARCH="i386"
13798  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13799    # On all platforms except macosx, we replace x86_64 with amd64.
13800    OPENJDK_TARGET_CPU_OSARCH="amd64"
13801  fi
13802
13803
13804  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13805  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13806    OPENJDK_TARGET_CPU_JLI="i386"
13807  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13808    # On all platforms except macosx, we replace x86_64 with amd64.
13809    OPENJDK_TARGET_CPU_JLI="amd64"
13810  fi
13811  # Now setup the -D flags for building libjli.
13812  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13813  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13814    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13815      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13816    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13817      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13818    fi
13819  fi
13820
13821
13822  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13823  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13824    OPENJDK_TARGET_OS_API_DIR="solaris"
13825  fi
13826  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13827    OPENJDK_TARGET_OS_API_DIR="windows"
13828  fi
13829
13830
13831  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13832      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13833  else
13834      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13835  fi
13836
13837
13838  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13839    A_LP64="LP64:="
13840    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13841    # unpack200.exe
13842    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13843      ADD_LP64="-D_LP64=1"
13844    fi
13845  fi
13846  LP64=$A_LP64
13847
13848
13849  if test "x$COMPILE_TYPE" = "xcross"; then
13850    # FIXME: ... or should this include reduced builds..?
13851    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13852  else
13853    DEFINE_CROSS_COMPILE_ARCH=""
13854  fi
13855
13856
13857  # ZERO_ARCHDEF is used to enable architecture-specific code
13858  case "${OPENJDK_TARGET_CPU}" in
13859    ppc*)    ZERO_ARCHDEF=PPC   ;;
13860    s390*)   ZERO_ARCHDEF=S390  ;;
13861    sparc*)  ZERO_ARCHDEF=SPARC ;;
13862    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13863    x86)     ZERO_ARCHDEF=IA32  ;;
13864    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13865  esac
13866
13867
13868
13869
13870# Continue setting up basic stuff. Most remaining code require fundamental tools.
13871
13872  # Save the current directory this script was started from
13873  CURDIR="$PWD"
13874
13875  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13876    PATH_SEP=";"
13877
13878  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13879  if test $SRC_ROOT_LENGTH -gt 100; then
13880    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13881  fi
13882
13883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13884    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13885$as_echo_n "checking cygwin release... " >&6; }
13886    CYGWIN_VERSION=`$UNAME -r`
13887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13888$as_echo "$CYGWIN_VERSION" >&6; }
13889    WINDOWS_ENV_VENDOR='cygwin'
13890    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13891
13892    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13893    if test "x$CYGWIN_VERSION_OK" = x; then
13894      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
13895$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
13896      as_fn_error $? "Cannot continue" "$LINENO" 5
13897    fi
13898    if test "x$CYGPATH" = x; then
13899      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
13900    fi
13901    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
13902$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
13903    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13904    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
13905    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
13906    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
13907    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
13908$as_echo "$CYGWIN_ROOT_PATH" >&6; }
13909    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
13910    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
13911    if test "x$test_cygdrive_prefix" = x; then
13912      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
13913    fi
13914  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
13916$as_echo_n "checking msys release... " >&6; }
13917    MSYS_VERSION=`$UNAME -r`
13918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
13919$as_echo "$MSYS_VERSION" >&6; }
13920
13921    WINDOWS_ENV_VENDOR='msys'
13922    WINDOWS_ENV_VERSION="$MSYS_VERSION"
13923
13924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
13925$as_echo_n "checking msys root directory as unix-style path... " >&6; }
13926    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
13927    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
13928
13929  windows_path="$MSYS_ROOT_PATH"
13930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13931    unix_path=`$CYGPATH -u "$windows_path"`
13932    MSYS_ROOT_PATH="$unix_path"
13933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
13934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
13935    MSYS_ROOT_PATH="$unix_path"
13936  fi
13937
13938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
13939$as_echo "$MSYS_ROOT_PATH" >&6; }
13940    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
13941  else
13942    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
13943  fi
13944
13945  # Test if windows or unix (cygwin/msys) find is first in path.
13946  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
13947$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
13948  FIND_BINARY_OUTPUT=`find --version 2>&1`
13949  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
13950    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
13951$as_echo "unix style" >&6; }
13952  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
13953    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
13954$as_echo "Windows" >&6; }
13955    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
13956$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
13957    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
13958$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
13959    as_fn_error $? "Cannot continue" "$LINENO" 5
13960  else
13961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
13962$as_echo "unknown" >&6; }
13963    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
13964$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
13965  fi
13966
13967  else
13968    PATH_SEP=":"
13969  fi
13970
13971
13972  # We get the top-level directory from the supporting wrappers.
13973  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
13974$as_echo_n "checking for top-level directory... " >&6; }
13975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
13976$as_echo "$TOPDIR" >&6; }
13977
13978
13979  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
13980
13981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13982
13983  # Input might be given as Windows format, start by converting to
13984  # unix format.
13985  path="$CURDIR"
13986  new_path=`$CYGPATH -u "$path"`
13987
13988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
13989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
13990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
13991  # "foo.exe" is OK but "foo" is an error.
13992  #
13993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
13994  # It is also a way to make sure we got the proper file name for the real test later on.
13995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
13996  if test "x$test_shortpath" = x; then
13997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
13998$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
13999    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14000  fi
14001
14002  # Call helper function which possibly converts this using DOS-style short mode.
14003  # If so, the updated path is stored in $new_path.
14004
14005  input_path="$new_path"
14006  # Check if we need to convert this using DOS-style short mode. If the path
14007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14008  # take no chances and rewrite it.
14009  # Note: m4 eats our [], so we need to use [ and ] instead.
14010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14011  if test "x$has_forbidden_chars" != x; then
14012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14016      # Going to short mode and back again did indeed matter. Since short mode is
14017      # case insensitive, let's make it lowercase to improve readability.
14018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14019      # Now convert it back to Unix-stile (cygpath)
14020      input_path=`$CYGPATH -u "$shortmode_path"`
14021      new_path="$input_path"
14022    fi
14023  fi
14024
14025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14026  if test "x$test_cygdrive_prefix" = x; then
14027    # As a simple fix, exclude /usr/bin since it's not a real path.
14028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14030      # a path prefixed by /cygdrive for fixpath to work.
14031      new_path="$CYGWIN_ROOT_PATH$input_path"
14032    fi
14033  fi
14034
14035
14036  if test "x$path" != "x$new_path"; then
14037    CURDIR="$new_path"
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14039$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14040  fi
14041
14042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14043
14044  path="$CURDIR"
14045  has_colon=`$ECHO $path | $GREP ^.:`
14046  new_path="$path"
14047  if test "x$has_colon" = x; then
14048    # Not in mixed or Windows style, start by that.
14049    new_path=`cmd //c echo $path`
14050  fi
14051
14052
14053  input_path="$new_path"
14054  # Check if we need to convert this using DOS-style short mode. If the path
14055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14056  # take no chances and rewrite it.
14057  # Note: m4 eats our [], so we need to use [ and ] instead.
14058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14059  if test "x$has_forbidden_chars" != x; then
14060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14062  fi
14063
14064
14065  windows_path="$new_path"
14066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14067    unix_path=`$CYGPATH -u "$windows_path"`
14068    new_path="$unix_path"
14069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14071    new_path="$unix_path"
14072  fi
14073
14074  if test "x$path" != "x$new_path"; then
14075    CURDIR="$new_path"
14076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14077$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14078  fi
14079
14080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14082
14083  else
14084    # We're on a posix platform. Hooray! :)
14085    path="$CURDIR"
14086    has_space=`$ECHO "$path" | $GREP " "`
14087    if test "x$has_space" != x; then
14088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14089$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14090      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14091    fi
14092
14093    # Use eval to expand a potential ~
14094    eval path="$path"
14095    if test ! -f "$path" && test ! -d "$path"; then
14096      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14097    fi
14098
14099    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14100  fi
14101
14102
14103  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14104
14105  # Input might be given as Windows format, start by converting to
14106  # unix format.
14107  path="$TOPDIR"
14108  new_path=`$CYGPATH -u "$path"`
14109
14110  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14111  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14112  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14113  # "foo.exe" is OK but "foo" is an error.
14114  #
14115  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14116  # It is also a way to make sure we got the proper file name for the real test later on.
14117  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14118  if test "x$test_shortpath" = x; then
14119    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14120$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14121    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14122  fi
14123
14124  # Call helper function which possibly converts this using DOS-style short mode.
14125  # If so, the updated path is stored in $new_path.
14126
14127  input_path="$new_path"
14128  # Check if we need to convert this using DOS-style short mode. If the path
14129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14130  # take no chances and rewrite it.
14131  # Note: m4 eats our [], so we need to use [ and ] instead.
14132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14133  if test "x$has_forbidden_chars" != x; then
14134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14135    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14136    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14137    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14138      # Going to short mode and back again did indeed matter. Since short mode is
14139      # case insensitive, let's make it lowercase to improve readability.
14140      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14141      # Now convert it back to Unix-stile (cygpath)
14142      input_path=`$CYGPATH -u "$shortmode_path"`
14143      new_path="$input_path"
14144    fi
14145  fi
14146
14147  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14148  if test "x$test_cygdrive_prefix" = x; then
14149    # As a simple fix, exclude /usr/bin since it's not a real path.
14150    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14151      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14152      # a path prefixed by /cygdrive for fixpath to work.
14153      new_path="$CYGWIN_ROOT_PATH$input_path"
14154    fi
14155  fi
14156
14157
14158  if test "x$path" != "x$new_path"; then
14159    TOPDIR="$new_path"
14160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14161$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14162  fi
14163
14164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14165
14166  path="$TOPDIR"
14167  has_colon=`$ECHO $path | $GREP ^.:`
14168  new_path="$path"
14169  if test "x$has_colon" = x; then
14170    # Not in mixed or Windows style, start by that.
14171    new_path=`cmd //c echo $path`
14172  fi
14173
14174
14175  input_path="$new_path"
14176  # Check if we need to convert this using DOS-style short mode. If the path
14177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14178  # take no chances and rewrite it.
14179  # Note: m4 eats our [], so we need to use [ and ] instead.
14180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14181  if test "x$has_forbidden_chars" != x; then
14182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14183    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14184  fi
14185
14186
14187  windows_path="$new_path"
14188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14189    unix_path=`$CYGPATH -u "$windows_path"`
14190    new_path="$unix_path"
14191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14193    new_path="$unix_path"
14194  fi
14195
14196  if test "x$path" != "x$new_path"; then
14197    TOPDIR="$new_path"
14198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14199$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14200  fi
14201
14202  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14203  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14204
14205  else
14206    # We're on a posix platform. Hooray! :)
14207    path="$TOPDIR"
14208    has_space=`$ECHO "$path" | $GREP " "`
14209    if test "x$has_space" != x; then
14210      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14211$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14212      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14213    fi
14214
14215    # Use eval to expand a potential ~
14216    eval path="$path"
14217    if test ! -f "$path" && test ! -d "$path"; then
14218      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14219    fi
14220
14221    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14222  fi
14223
14224  # SRC_ROOT is a traditional alias for TOPDIR.
14225  SRC_ROOT=$TOPDIR
14226
14227  # Locate the directory of this script.
14228  AUTOCONF_DIR=$TOPDIR/common/autoconf
14229
14230  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14231    # Add extra search paths on solaris for utilities like ar and as etc...
14232    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14233  fi
14234
14235  # You can force the sys-root if the sys-root encoded into the cross compiler tools
14236  # is not correct.
14237
14238# Check whether --with-sys-root was given.
14239if test "${with_sys_root+set}" = set; then :
14240  withval=$with_sys_root;
14241fi
14242
14243
14244  if test "x$with_sys_root" != x; then
14245    SYS_ROOT=$with_sys_root
14246  else
14247    SYS_ROOT=/
14248  fi
14249
14250
14251
14252# Check whether --with-tools-dir was given.
14253if test "${with_tools_dir+set}" = set; then :
14254  withval=$with_tools_dir; TOOLS_DIR=$with_tools_dir
14255
14256fi
14257
14258
14259
14260# Check whether --with-devkit was given.
14261if test "${with_devkit+set}" = set; then :
14262  withval=$with_devkit;
14263        if test "x$with_sys_root" != x; then
14264          as_fn_error $? "Cannot specify both --with-devkit and --with-sys-root at the same time" "$LINENO" 5
14265        fi
14266
14267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14268
14269  # Input might be given as Windows format, start by converting to
14270  # unix format.
14271  path="$with_devkit"
14272  new_path=`$CYGPATH -u "$path"`
14273
14274  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14275  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14276  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14277  # "foo.exe" is OK but "foo" is an error.
14278  #
14279  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14280  # It is also a way to make sure we got the proper file name for the real test later on.
14281  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14282  if test "x$test_shortpath" = x; then
14283    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14284$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14285    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14286  fi
14287
14288  # Call helper function which possibly converts this using DOS-style short mode.
14289  # If so, the updated path is stored in $new_path.
14290
14291  input_path="$new_path"
14292  # Check if we need to convert this using DOS-style short mode. If the path
14293  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14294  # take no chances and rewrite it.
14295  # Note: m4 eats our [], so we need to use [ and ] instead.
14296  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14297  if test "x$has_forbidden_chars" != x; then
14298    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14299    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14300    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14301    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14302      # Going to short mode and back again did indeed matter. Since short mode is
14303      # case insensitive, let's make it lowercase to improve readability.
14304      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14305      # Now convert it back to Unix-stile (cygpath)
14306      input_path=`$CYGPATH -u "$shortmode_path"`
14307      new_path="$input_path"
14308    fi
14309  fi
14310
14311  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14312  if test "x$test_cygdrive_prefix" = x; then
14313    # As a simple fix, exclude /usr/bin since it's not a real path.
14314    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14315      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14316      # a path prefixed by /cygdrive for fixpath to work.
14317      new_path="$CYGWIN_ROOT_PATH$input_path"
14318    fi
14319  fi
14320
14321
14322  if test "x$path" != "x$new_path"; then
14323    with_devkit="$new_path"
14324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14325$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14326  fi
14327
14328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14329
14330  path="$with_devkit"
14331  has_colon=`$ECHO $path | $GREP ^.:`
14332  new_path="$path"
14333  if test "x$has_colon" = x; then
14334    # Not in mixed or Windows style, start by that.
14335    new_path=`cmd //c echo $path`
14336  fi
14337
14338
14339  input_path="$new_path"
14340  # Check if we need to convert this using DOS-style short mode. If the path
14341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14342  # take no chances and rewrite it.
14343  # Note: m4 eats our [], so we need to use [ and ] instead.
14344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14345  if test "x$has_forbidden_chars" != x; then
14346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14347    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14348  fi
14349
14350
14351  windows_path="$new_path"
14352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14353    unix_path=`$CYGPATH -u "$windows_path"`
14354    new_path="$unix_path"
14355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14357    new_path="$unix_path"
14358  fi
14359
14360  if test "x$path" != "x$new_path"; then
14361    with_devkit="$new_path"
14362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14363$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14364  fi
14365
14366  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14367  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14368
14369  else
14370    # We're on a posix platform. Hooray! :)
14371    path="$with_devkit"
14372    has_space=`$ECHO "$path" | $GREP " "`
14373    if test "x$has_space" != x; then
14374      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14375$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14376      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14377    fi
14378
14379    # Use eval to expand a potential ~
14380    eval path="$path"
14381    if test ! -f "$path" && test ! -d "$path"; then
14382      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14383    fi
14384
14385    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14386  fi
14387
14388
14389  if test "x$TOOLS_DIR" = x; then
14390    TOOLS_DIR="$with_devkit/bin"
14391  else
14392    TOOLS_DIR="$TOOLS_DIR:$with_devkit/bin"
14393  fi
14394
14395        if test -d "$with_devkit/$host_alias/libc"; then
14396          SYS_ROOT=$with_devkit/$host_alias/libc
14397        elif test -d "$with_devkit/$host/sys-root"; then
14398          SYS_ROOT=$with_devkit/$host/sys-root
14399        fi
14400
14401fi
14402
14403
14404
14405  # Setup default logging of stdout and stderr to build.log in the output root.
14406  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14407  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14408  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14409
14410
14411
14412
14413
14414# Check if it's a pure open build or if custom sources are to be used.
14415
14416  # Check whether --enable-openjdk-only was given.
14417if test "${enable_openjdk_only+set}" = set; then :
14418  enableval=$enable_openjdk_only;
14419else
14420  enable_openjdk_only="no"
14421fi
14422
14423
14424  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14425$as_echo_n "checking for presence of closed sources... " >&6; }
14426  if test -d "$SRC_ROOT/jdk/src/closed"; then
14427    CLOSED_SOURCE_PRESENT=yes
14428  else
14429    CLOSED_SOURCE_PRESENT=no
14430  fi
14431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14432$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14433
14434  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14435$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14436  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14438$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14439
14440  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14441    OPENJDK=true
14442    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14443      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14444$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14445    fi
14446  else
14447    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14448      OPENJDK=true
14449    else
14450      OPENJDK=false
14451    fi
14452  fi
14453
14454  if test "x$OPENJDK" = "xtrue"; then
14455    SET_OPENJDK="OPENJDK=true"
14456  fi
14457
14458
14459
14460  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14461  # the IncludeCustomExtension macro.
14462
14463
14464# Check whether --with-custom-make-dir was given.
14465if test "${with_custom_make_dir+set}" = set; then :
14466  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
14467$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14468fi
14469
14470
14471
14472
14473# These are needed to be able to create a configuration name (and thus the output directory)
14474
14475  ###############################################################################
14476  #
14477  # Check which variant of the JDK that we want to build.
14478  # Currently we have:
14479  #    normal:   standard edition
14480  # but the custom make system may add other variants
14481  #
14482  # Effectively the JDK variant gives a name to a specific set of
14483  # modules to compile into the JDK. In the future, these modules
14484  # might even be Jigsaw modules.
14485  #
14486  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14487$as_echo_n "checking which variant of the JDK to build... " >&6; }
14488
14489# Check whether --with-jdk-variant was given.
14490if test "${with_jdk_variant+set}" = set; then :
14491  withval=$with_jdk_variant;
14492fi
14493
14494
14495  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14496    JDK_VARIANT="normal"
14497  else
14498    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14499  fi
14500
14501
14502
14503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14504$as_echo "$JDK_VARIANT" >&6; }
14505
14506
14507###############################################################################
14508#
14509# Check which interpreter of the JVM we want to build.
14510# Currently we have:
14511#    template: Template interpreter (the default)
14512#    cpp     : C++ interpreter
14513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14514$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14515
14516# Check whether --with-jvm-interpreter was given.
14517if test "${with_jvm_interpreter+set}" = set; then :
14518  withval=$with_jvm_interpreter;
14519fi
14520
14521
14522if test "x$with_jvm_interpreter" = x; then
14523     with_jvm_interpreter="template"
14524fi
14525
14526JVM_INTERPRETER="$with_jvm_interpreter"
14527
14528if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14529   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14530fi
14531
14532
14533
14534{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14535$as_echo "$with_jvm_interpreter" >&6; }
14536
14537
14538
14539  ###############################################################################
14540  #
14541  # Check which variants of the JVM that we want to build.
14542  # Currently we have:
14543  #    server: normal interpreter and a tiered C1/C2 compiler
14544  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14545  #    minimal1: reduced form of client with optional VM services and features stripped out
14546  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14547  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14548  #    zero: no machine code interpreter, no compiler
14549  #    zeroshark: zero interpreter and shark/llvm compiler backend
14550#    core: interpreter only, no compiler (only works on some platforms)
14551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14552$as_echo_n "checking which variants of the JVM to build... " >&6; }
14553
14554# Check whether --with-jvm-variants was given.
14555if test "${with_jvm_variants+set}" = set; then :
14556  withval=$with_jvm_variants;
14557fi
14558
14559
14560  if test "x$with_jvm_variants" = x; then
14561    with_jvm_variants="server"
14562  fi
14563
14564  JVM_VARIANTS=",$with_jvm_variants,"
14565  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,//'`
14566
14567  if test "x$TEST_VARIANTS" != "x,"; then
14568     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14569  fi
14570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14571$as_echo "$with_jvm_variants" >&6; }
14572
14573  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14574  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14575  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14576  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14577  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14578  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14579  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14580
14581  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14582    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14583      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14584    fi
14585  fi
14586  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14587    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14588      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14589    fi
14590  fi
14591  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14592    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14593      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14594    fi
14595  fi
14596
14597  # Replace the commas with AND for use in the build directory name.
14598  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14599  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/'`
14600  if test "x$COUNT_VARIANTS" != "x,1"; then
14601    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14602  else
14603    BUILDING_MULTIPLE_JVM_VARIANTS=no
14604  fi
14605
14606
14607
14608
14609
14610
14611
14612
14613
14614
14615  INCLUDE_SA=true
14616  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14617    INCLUDE_SA=false
14618  fi
14619  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14620    INCLUDE_SA=false
14621  fi
14622  if test "x$VAR_CPU" = xppc64 ; then
14623    INCLUDE_SA=false
14624  fi
14625
14626
14627  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14628    MACOSX_UNIVERSAL="true"
14629  fi
14630
14631
14632
14633
14634  ###############################################################################
14635  #
14636  # Set the debug level
14637  #    release: no debug information, all optimizations, no asserts.
14638  #    fastdebug: debug information (-g), all optimizations, all asserts
14639  #    slowdebug: debug information (-g), no optimizations, all asserts
14640  #
14641  DEBUG_LEVEL="release"
14642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14643$as_echo_n "checking which debug level to use... " >&6; }
14644  # Check whether --enable-debug was given.
14645if test "${enable_debug+set}" = set; then :
14646  enableval=$enable_debug;
14647        ENABLE_DEBUG="${enableval}"
14648        DEBUG_LEVEL="fastdebug"
14649
14650else
14651  ENABLE_DEBUG="no"
14652fi
14653
14654
14655
14656# Check whether --with-debug-level was given.
14657if test "${with_debug_level+set}" = set; then :
14658  withval=$with_debug_level;
14659        DEBUG_LEVEL="${withval}"
14660        if test "x$ENABLE_DEBUG" = xyes; then
14661          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14662        fi
14663
14664fi
14665
14666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14667$as_echo "$DEBUG_LEVEL" >&6; }
14668
14669  if test "x$DEBUG_LEVEL" != xrelease && \
14670      test "x$DEBUG_LEVEL" != xfastdebug && \
14671      test "x$DEBUG_LEVEL" != xslowdebug; then
14672    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14673  fi
14674
14675
14676  ###############################################################################
14677  #
14678  # Setup legacy vars/targets and new vars to deal with different debug levels.
14679  #
14680
14681  case $DEBUG_LEVEL in
14682    release )
14683      VARIANT="OPT"
14684      FASTDEBUG="false"
14685      DEBUG_CLASSFILES="false"
14686      BUILD_VARIANT_RELEASE=""
14687      HOTSPOT_DEBUG_LEVEL="product"
14688      HOTSPOT_EXPORT="product"
14689      ;;
14690    fastdebug )
14691      VARIANT="DBG"
14692      FASTDEBUG="true"
14693      DEBUG_CLASSFILES="true"
14694      BUILD_VARIANT_RELEASE="-fastdebug"
14695      HOTSPOT_DEBUG_LEVEL="fastdebug"
14696      HOTSPOT_EXPORT="fastdebug"
14697      ;;
14698    slowdebug )
14699      VARIANT="DBG"
14700      FASTDEBUG="false"
14701      DEBUG_CLASSFILES="true"
14702      BUILD_VARIANT_RELEASE="-debug"
14703      HOTSPOT_DEBUG_LEVEL="jvmg"
14704      HOTSPOT_EXPORT="debug"
14705      ;;
14706  esac
14707
14708  #####
14709  # Generate the legacy makefile targets for hotspot.
14710  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14711  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14712  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14713  # But until then ...
14714  HOTSPOT_TARGET=""
14715
14716  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14717    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14718  fi
14719
14720  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14721    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14722  fi
14723
14724  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14725    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14726  fi
14727
14728  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14729    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14730  fi
14731
14732  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14733    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14734  fi
14735
14736  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14737    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14738  fi
14739
14740  if test "x$JVM_VARIANT_CORE" = xtrue; then
14741    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14742  fi
14743
14744  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14745
14746  # On Macosx universal binaries are produced, but they only contain
14747  # 64 bit intel. This invalidates control of which jvms are built
14748  # from configure, but only server is valid anyway. Fix this
14749  # when hotspot makefiles are rewritten.
14750  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14751    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14752  fi
14753
14754  #####
14755
14756
14757
14758
14759
14760
14761
14762
14763# With basic setup done, call the custom early hook.
14764
14765
14766# To properly create a configuration name, we need to have the OpenJDK target
14767# and options (variants and debug level) parsed.
14768
14769
14770
14771# Check whether --with-conf-name was given.
14772if test "${with_conf_name+set}" = set; then :
14773  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
14774fi
14775
14776
14777  # Test from where we are running configure, in or outside of src root.
14778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
14779$as_echo_n "checking where to store configuration... " >&6; }
14780  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
14781      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
14782      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
14783    # We are running configure from the src root.
14784    # Create a default ./build/target-variant-debuglevel output root.
14785    if test "x${CONF_NAME}" = x; then
14786      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
14787$as_echo "in default location" >&6; }
14788      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
14789    else
14790      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
14791$as_echo "in build directory with custom name" >&6; }
14792    fi
14793    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
14794    $MKDIR -p "$OUTPUT_ROOT"
14795    if test ! -d "$OUTPUT_ROOT"; then
14796      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
14797    fi
14798  else
14799    # We are running configure from outside of the src dir.
14800    # Then use the current directory as output dir!
14801    # If configuration is situated in normal build directory, just use the build
14802    # directory name as configuration name, otherwise use the complete path.
14803    if test "x${CONF_NAME}" = x; then
14804      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
14805    fi
14806    OUTPUT_ROOT="$CURDIR"
14807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
14808$as_echo "in current directory" >&6; }
14809
14810    # WARNING: This might be a bad thing to do. You need to be sure you want to
14811    # have a configuration in this directory. Do some sanity checks!
14812
14813    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
14814      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
14815      # other files
14816      files_present=`$LS $OUTPUT_ROOT`
14817      # Configure has already touched config.log and confdefs.h in the current dir when this check
14818      # is performed.
14819      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
14820      | $TR -d '\n'`
14821      if test "x$filtered_files" != x; then
14822        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
14823$as_echo "$as_me: Current directory is $CURDIR." >&6;}
14824        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
14825$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
14826        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
14827$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
14828        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
14829$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
14830        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
14831$as_echo "$as_me: seriously mess up just about everything." >&6;}
14832        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
14833$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
14834        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
14835$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
14836        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
14837      fi
14838    fi
14839  fi
14840  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
14841$as_echo_n "checking what configuration name to use... " >&6; }
14842  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
14843$as_echo "$CONF_NAME" >&6; }
14844
14845
14846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14847
14848  # Input might be given as Windows format, start by converting to
14849  # unix format.
14850  path="$OUTPUT_ROOT"
14851  new_path=`$CYGPATH -u "$path"`
14852
14853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14856  # "foo.exe" is OK but "foo" is an error.
14857  #
14858  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14859  # It is also a way to make sure we got the proper file name for the real test later on.
14860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14861  if test "x$test_shortpath" = x; then
14862    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14863$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14864    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
14865  fi
14866
14867  # Call helper function which possibly converts this using DOS-style short mode.
14868  # If so, the updated path is stored in $new_path.
14869
14870  input_path="$new_path"
14871  # Check if we need to convert this using DOS-style short mode. If the path
14872  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14873  # take no chances and rewrite it.
14874  # Note: m4 eats our [], so we need to use [ and ] instead.
14875  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14876  if test "x$has_forbidden_chars" != x; then
14877    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14878    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14879    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14880    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14881      # Going to short mode and back again did indeed matter. Since short mode is
14882      # case insensitive, let's make it lowercase to improve readability.
14883      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14884      # Now convert it back to Unix-stile (cygpath)
14885      input_path=`$CYGPATH -u "$shortmode_path"`
14886      new_path="$input_path"
14887    fi
14888  fi
14889
14890  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14891  if test "x$test_cygdrive_prefix" = x; then
14892    # As a simple fix, exclude /usr/bin since it's not a real path.
14893    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14894      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14895      # a path prefixed by /cygdrive for fixpath to work.
14896      new_path="$CYGWIN_ROOT_PATH$input_path"
14897    fi
14898  fi
14899
14900
14901  if test "x$path" != "x$new_path"; then
14902    OUTPUT_ROOT="$new_path"
14903    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14904$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14905  fi
14906
14907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14908
14909  path="$OUTPUT_ROOT"
14910  has_colon=`$ECHO $path | $GREP ^.:`
14911  new_path="$path"
14912  if test "x$has_colon" = x; then
14913    # Not in mixed or Windows style, start by that.
14914    new_path=`cmd //c echo $path`
14915  fi
14916
14917
14918  input_path="$new_path"
14919  # Check if we need to convert this using DOS-style short mode. If the path
14920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14921  # take no chances and rewrite it.
14922  # Note: m4 eats our [], so we need to use [ and ] instead.
14923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14924  if test "x$has_forbidden_chars" != x; then
14925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14927  fi
14928
14929
14930  windows_path="$new_path"
14931  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14932    unix_path=`$CYGPATH -u "$windows_path"`
14933    new_path="$unix_path"
14934  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14935    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14936    new_path="$unix_path"
14937  fi
14938
14939  if test "x$path" != "x$new_path"; then
14940    OUTPUT_ROOT="$new_path"
14941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
14942$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
14943  fi
14944
14945  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14946  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14947
14948  else
14949    # We're on a posix platform. Hooray! :)
14950    path="$OUTPUT_ROOT"
14951    has_space=`$ECHO "$path" | $GREP " "`
14952    if test "x$has_space" != x; then
14953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
14954$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
14955      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14956    fi
14957
14958    # Use eval to expand a potential ~
14959    eval path="$path"
14960    if test ! -f "$path" && test ! -d "$path"; then
14961      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
14962    fi
14963
14964    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
14965  fi
14966
14967
14968  SPEC=$OUTPUT_ROOT/spec.gmk
14969
14970  CONF_NAME=$CONF_NAME
14971
14972  OUTPUT_ROOT=$OUTPUT_ROOT
14973
14974
14975  # Most of the probed defines are put into config.h
14976  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
14977
14978  # The spec.gmk file contains all variables for the make system.
14979  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
14980
14981  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
14982  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
14983
14984  # The bootcycle-spec.gmk file contains support for boot cycle builds.
14985  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
14986
14987  # The compare.sh is used to compare the build output to other builds.
14988  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
14989
14990  # Spec.sh is currently used by compare-objects.sh
14991  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
14992
14993  # The generated Makefile knows where the spec.gmk is and where the source is.
14994  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
14995  # which will look for generated configurations
14996  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
14997
14998
14999
15000# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15001
15002  for ac_prog in apt-get yum port pkgutil pkgadd
15003do
15004  # Extract the first word of "$ac_prog", so it can be a program name with args.
15005set dummy $ac_prog; ac_word=$2
15006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15007$as_echo_n "checking for $ac_word... " >&6; }
15008if ${ac_cv_prog_PKGHANDLER+:} false; then :
15009  $as_echo_n "(cached) " >&6
15010else
15011  if test -n "$PKGHANDLER"; then
15012  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15013else
15014as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15015for as_dir in $PATH
15016do
15017  IFS=$as_save_IFS
15018  test -z "$as_dir" && as_dir=.
15019    for ac_exec_ext in '' $ac_executable_extensions; do
15020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15021    ac_cv_prog_PKGHANDLER="$ac_prog"
15022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15023    break 2
15024  fi
15025done
15026  done
15027IFS=$as_save_IFS
15028
15029fi
15030fi
15031PKGHANDLER=$ac_cv_prog_PKGHANDLER
15032if test -n "$PKGHANDLER"; then
15033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15034$as_echo "$PKGHANDLER" >&6; }
15035else
15036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15037$as_echo "no" >&6; }
15038fi
15039
15040
15041  test -n "$PKGHANDLER" && break
15042done
15043
15044
15045
15046# Setup tools that requires more complex handling, or that is not needed by the configure script.
15047
15048
15049  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15050  if test "x$MAKE" != x; then
15051    # User has supplied a make, test it.
15052    if test ! -f "$MAKE"; then
15053      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15054    fi
15055
15056  MAKE_CANDIDATE=""$MAKE""
15057  DESCRIPTION="user supplied MAKE=$MAKE"
15058  if test "x$MAKE_CANDIDATE" != x; then
15059    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15060$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15061    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15062    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15063    if test "x$IS_GNU_MAKE" = x; then
15064      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15065$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15066    else
15067      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15068      if test "x$IS_MODERN_MAKE" = x; then
15069        { $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
15070$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;}
15071      else
15072        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15073          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15074            MAKE_EXPECTED_ENV='cygwin'
15075          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15076            MAKE_EXPECTED_ENV='msys'
15077          else
15078            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15079          fi
15080          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15081          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15082        else
15083          # Not relevant for non-Windows
15084          IS_MAKE_CORRECT_ENV=true
15085        fi
15086        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15087          { $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
15088$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;}
15089        else
15090          FOUND_MAKE=$MAKE_CANDIDATE
15091
15092  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15093
15094  # First separate the path from the arguments. This will split at the first
15095  # space.
15096  complete="$FOUND_MAKE"
15097  path="${complete%% *}"
15098  tmp="$complete EOL"
15099  arguments="${tmp#* }"
15100
15101  # Input might be given as Windows format, start by converting to
15102  # unix format.
15103  new_path=`$CYGPATH -u "$path"`
15104
15105  # Now try to locate executable using which
15106  new_path=`$WHICH "$new_path" 2> /dev/null`
15107  # bat and cmd files are not always considered executable in cygwin causing which
15108  # to not find them
15109  if test "x$new_path" = x \
15110      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15111      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15112    new_path=`$CYGPATH -u "$path"`
15113  fi
15114  if test "x$new_path" = x; then
15115    # Oops. Which didn't find the executable.
15116    # The splitting of arguments from the executable at a space might have been incorrect,
15117    # since paths with space are more likely in Windows. Give it another try with the whole
15118    # argument.
15119    path="$complete"
15120    arguments="EOL"
15121    new_path=`$CYGPATH -u "$path"`
15122    new_path=`$WHICH "$new_path" 2> /dev/null`
15123    # bat and cmd files are not always considered executable in cygwin causing which
15124    # to not find them
15125    if test "x$new_path" = x \
15126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15128      new_path=`$CYGPATH -u "$path"`
15129    fi
15130    if test "x$new_path" = x; then
15131      # It's still not found. Now this is an unrecoverable error.
15132      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15133$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15134      has_space=`$ECHO "$complete" | $GREP " "`
15135      if test "x$has_space" != x; then
15136        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15137$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15138      fi
15139      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15140    fi
15141  fi
15142
15143  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15144  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15145  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15146  # "foo.exe" is OK but "foo" is an error.
15147  #
15148  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15149  # It is also a way to make sure we got the proper file name for the real test later on.
15150  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15151  if test "x$test_shortpath" = x; then
15152    # Short path failed, file does not exist as specified.
15153    # Try adding .exe or .cmd
15154    if test -f "${new_path}.exe"; then
15155      input_to_shortpath="${new_path}.exe"
15156    elif test -f "${new_path}.cmd"; then
15157      input_to_shortpath="${new_path}.cmd"
15158    else
15159      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15160$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15161      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15162$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15163      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15164    fi
15165  else
15166    input_to_shortpath="$new_path"
15167  fi
15168
15169  # Call helper function which possibly converts this using DOS-style short mode.
15170  # If so, the updated path is stored in $new_path.
15171  new_path="$input_to_shortpath"
15172
15173  input_path="$input_to_shortpath"
15174  # Check if we need to convert this using DOS-style short mode. If the path
15175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15176  # take no chances and rewrite it.
15177  # Note: m4 eats our [], so we need to use [ and ] instead.
15178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15179  if test "x$has_forbidden_chars" != x; then
15180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15184      # Going to short mode and back again did indeed matter. Since short mode is
15185      # case insensitive, let's make it lowercase to improve readability.
15186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15187      # Now convert it back to Unix-stile (cygpath)
15188      input_path=`$CYGPATH -u "$shortmode_path"`
15189      new_path="$input_path"
15190    fi
15191  fi
15192
15193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15194  if test "x$test_cygdrive_prefix" = x; then
15195    # As a simple fix, exclude /usr/bin since it's not a real path.
15196    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15198      # a path prefixed by /cygdrive for fixpath to work.
15199      new_path="$CYGWIN_ROOT_PATH$input_path"
15200    fi
15201  fi
15202
15203  # remove trailing .exe if any
15204  new_path="${new_path/%.exe/}"
15205
15206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15207
15208  # First separate the path from the arguments. This will split at the first
15209  # space.
15210  complete="$FOUND_MAKE"
15211  path="${complete%% *}"
15212  tmp="$complete EOL"
15213  arguments="${tmp#* }"
15214
15215  # Input might be given as Windows format, start by converting to
15216  # unix format.
15217  new_path="$path"
15218
15219  windows_path="$new_path"
15220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15221    unix_path=`$CYGPATH -u "$windows_path"`
15222    new_path="$unix_path"
15223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15224    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15225    new_path="$unix_path"
15226  fi
15227
15228
15229  # Now try to locate executable using which
15230  new_path=`$WHICH "$new_path" 2> /dev/null`
15231
15232  if test "x$new_path" = x; then
15233    # Oops. Which didn't find the executable.
15234    # The splitting of arguments from the executable at a space might have been incorrect,
15235    # since paths with space are more likely in Windows. Give it another try with the whole
15236    # argument.
15237    path="$complete"
15238    arguments="EOL"
15239    new_path="$path"
15240
15241  windows_path="$new_path"
15242  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15243    unix_path=`$CYGPATH -u "$windows_path"`
15244    new_path="$unix_path"
15245  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15246    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15247    new_path="$unix_path"
15248  fi
15249
15250
15251    new_path=`$WHICH "$new_path" 2> /dev/null`
15252
15253    if test "x$new_path" = x; then
15254      # It's still not found. Now this is an unrecoverable error.
15255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15256$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15257      has_space=`$ECHO "$complete" | $GREP " "`
15258      if test "x$has_space" != x; then
15259        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15260$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15261      fi
15262      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15263    fi
15264  fi
15265
15266  # Now new_path has a complete unix path to the binary
15267  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15268    # Keep paths in /bin as-is, but remove trailing .exe if any
15269    new_path="${new_path/%.exe/}"
15270    # Do not save /bin paths to all_fixpath_prefixes!
15271  else
15272    # Not in mixed or Windows style, start by that.
15273    new_path=`cmd //c echo $new_path`
15274
15275  input_path="$new_path"
15276  # Check if we need to convert this using DOS-style short mode. If the path
15277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15278  # take no chances and rewrite it.
15279  # Note: m4 eats our [], so we need to use [ and ] instead.
15280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15281  if test "x$has_forbidden_chars" != x; then
15282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15284  fi
15285
15286    # Output is in $new_path
15287
15288  windows_path="$new_path"
15289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15290    unix_path=`$CYGPATH -u "$windows_path"`
15291    new_path="$unix_path"
15292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15294    new_path="$unix_path"
15295  fi
15296
15297    # remove trailing .exe if any
15298    new_path="${new_path/%.exe/}"
15299
15300    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15301    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15302  fi
15303
15304  else
15305    # We're on a posix platform. Hooray! :)
15306    # First separate the path from the arguments. This will split at the first
15307    # space.
15308    complete="$FOUND_MAKE"
15309    path="${complete%% *}"
15310    tmp="$complete EOL"
15311    arguments="${tmp#* }"
15312
15313    # Cannot rely on the command "which" here since it doesn't always work.
15314    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15315    if test -z "$is_absolute_path"; then
15316      # Path to executable is not absolute. Find it.
15317      IFS_save="$IFS"
15318      IFS=:
15319      for p in $PATH; do
15320        if test -f "$p/$path" && test -x "$p/$path"; then
15321          new_path="$p/$path"
15322          break
15323        fi
15324      done
15325      IFS="$IFS_save"
15326    else
15327      # This is an absolute path, we can use it without further modifications.
15328      new_path="$path"
15329    fi
15330
15331    if test "x$new_path" = x; then
15332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15333$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15334      has_space=`$ECHO "$complete" | $GREP " "`
15335      if test "x$has_space" != x; then
15336        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15337$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15338      fi
15339      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15340    fi
15341  fi
15342
15343  # Now join together the path and the arguments once again
15344  if test "x$arguments" != xEOL; then
15345    new_complete="$new_path ${arguments% *}"
15346  else
15347    new_complete="$new_path"
15348  fi
15349
15350  if test "x$complete" != "x$new_complete"; then
15351    FOUND_MAKE="$new_complete"
15352    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15353$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15354  fi
15355
15356        fi
15357      fi
15358    fi
15359  fi
15360
15361    if test "x$FOUND_MAKE" = x; then
15362      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15363    fi
15364  else
15365    # Try our hardest to locate a correct version of GNU make
15366    for ac_prog in gmake
15367do
15368  # Extract the first word of "$ac_prog", so it can be a program name with args.
15369set dummy $ac_prog; ac_word=$2
15370{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15371$as_echo_n "checking for $ac_word... " >&6; }
15372if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15373  $as_echo_n "(cached) " >&6
15374else
15375  case $CHECK_GMAKE in
15376  [\\/]* | ?:[\\/]*)
15377  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15378  ;;
15379  *)
15380  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15381for as_dir in $PATH
15382do
15383  IFS=$as_save_IFS
15384  test -z "$as_dir" && as_dir=.
15385    for ac_exec_ext in '' $ac_executable_extensions; do
15386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15387    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15389    break 2
15390  fi
15391done
15392  done
15393IFS=$as_save_IFS
15394
15395  ;;
15396esac
15397fi
15398CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15399if test -n "$CHECK_GMAKE"; then
15400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15401$as_echo "$CHECK_GMAKE" >&6; }
15402else
15403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15404$as_echo "no" >&6; }
15405fi
15406
15407
15408  test -n "$CHECK_GMAKE" && break
15409done
15410
15411
15412  MAKE_CANDIDATE=""$CHECK_GMAKE""
15413  DESCRIPTION="gmake in PATH"
15414  if test "x$MAKE_CANDIDATE" != x; then
15415    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15416$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15417    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15418    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15419    if test "x$IS_GNU_MAKE" = x; then
15420      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15421$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15422    else
15423      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15424      if test "x$IS_MODERN_MAKE" = x; then
15425        { $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
15426$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;}
15427      else
15428        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15429          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15430            MAKE_EXPECTED_ENV='cygwin'
15431          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15432            MAKE_EXPECTED_ENV='msys'
15433          else
15434            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15435          fi
15436          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15437          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15438        else
15439          # Not relevant for non-Windows
15440          IS_MAKE_CORRECT_ENV=true
15441        fi
15442        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15443          { $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
15444$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;}
15445        else
15446          FOUND_MAKE=$MAKE_CANDIDATE
15447
15448  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15449
15450  # First separate the path from the arguments. This will split at the first
15451  # space.
15452  complete="$FOUND_MAKE"
15453  path="${complete%% *}"
15454  tmp="$complete EOL"
15455  arguments="${tmp#* }"
15456
15457  # Input might be given as Windows format, start by converting to
15458  # unix format.
15459  new_path=`$CYGPATH -u "$path"`
15460
15461  # Now try to locate executable using which
15462  new_path=`$WHICH "$new_path" 2> /dev/null`
15463  # bat and cmd files are not always considered executable in cygwin causing which
15464  # to not find them
15465  if test "x$new_path" = x \
15466      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15467      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15468    new_path=`$CYGPATH -u "$path"`
15469  fi
15470  if test "x$new_path" = x; then
15471    # Oops. Which didn't find the executable.
15472    # The splitting of arguments from the executable at a space might have been incorrect,
15473    # since paths with space are more likely in Windows. Give it another try with the whole
15474    # argument.
15475    path="$complete"
15476    arguments="EOL"
15477    new_path=`$CYGPATH -u "$path"`
15478    new_path=`$WHICH "$new_path" 2> /dev/null`
15479    # bat and cmd files are not always considered executable in cygwin causing which
15480    # to not find them
15481    if test "x$new_path" = x \
15482        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15483        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15484      new_path=`$CYGPATH -u "$path"`
15485    fi
15486    if test "x$new_path" = x; then
15487      # It's still not found. Now this is an unrecoverable error.
15488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15489$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15490      has_space=`$ECHO "$complete" | $GREP " "`
15491      if test "x$has_space" != x; then
15492        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15493$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15494      fi
15495      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15496    fi
15497  fi
15498
15499  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15500  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15501  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15502  # "foo.exe" is OK but "foo" is an error.
15503  #
15504  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15505  # It is also a way to make sure we got the proper file name for the real test later on.
15506  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15507  if test "x$test_shortpath" = x; then
15508    # Short path failed, file does not exist as specified.
15509    # Try adding .exe or .cmd
15510    if test -f "${new_path}.exe"; then
15511      input_to_shortpath="${new_path}.exe"
15512    elif test -f "${new_path}.cmd"; then
15513      input_to_shortpath="${new_path}.cmd"
15514    else
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15516$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15517      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15518$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15519      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15520    fi
15521  else
15522    input_to_shortpath="$new_path"
15523  fi
15524
15525  # Call helper function which possibly converts this using DOS-style short mode.
15526  # If so, the updated path is stored in $new_path.
15527  new_path="$input_to_shortpath"
15528
15529  input_path="$input_to_shortpath"
15530  # Check if we need to convert this using DOS-style short mode. If the path
15531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15532  # take no chances and rewrite it.
15533  # Note: m4 eats our [], so we need to use [ and ] instead.
15534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15535  if test "x$has_forbidden_chars" != x; then
15536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15537    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15538    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15539    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15540      # Going to short mode and back again did indeed matter. Since short mode is
15541      # case insensitive, let's make it lowercase to improve readability.
15542      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15543      # Now convert it back to Unix-stile (cygpath)
15544      input_path=`$CYGPATH -u "$shortmode_path"`
15545      new_path="$input_path"
15546    fi
15547  fi
15548
15549  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15550  if test "x$test_cygdrive_prefix" = x; then
15551    # As a simple fix, exclude /usr/bin since it's not a real path.
15552    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15553      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15554      # a path prefixed by /cygdrive for fixpath to work.
15555      new_path="$CYGWIN_ROOT_PATH$input_path"
15556    fi
15557  fi
15558
15559  # remove trailing .exe if any
15560  new_path="${new_path/%.exe/}"
15561
15562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15563
15564  # First separate the path from the arguments. This will split at the first
15565  # space.
15566  complete="$FOUND_MAKE"
15567  path="${complete%% *}"
15568  tmp="$complete EOL"
15569  arguments="${tmp#* }"
15570
15571  # Input might be given as Windows format, start by converting to
15572  # unix format.
15573  new_path="$path"
15574
15575  windows_path="$new_path"
15576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15577    unix_path=`$CYGPATH -u "$windows_path"`
15578    new_path="$unix_path"
15579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15581    new_path="$unix_path"
15582  fi
15583
15584
15585  # Now try to locate executable using which
15586  new_path=`$WHICH "$new_path" 2> /dev/null`
15587
15588  if test "x$new_path" = x; then
15589    # Oops. Which didn't find the executable.
15590    # The splitting of arguments from the executable at a space might have been incorrect,
15591    # since paths with space are more likely in Windows. Give it another try with the whole
15592    # argument.
15593    path="$complete"
15594    arguments="EOL"
15595    new_path="$path"
15596
15597  windows_path="$new_path"
15598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15599    unix_path=`$CYGPATH -u "$windows_path"`
15600    new_path="$unix_path"
15601  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15602    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15603    new_path="$unix_path"
15604  fi
15605
15606
15607    new_path=`$WHICH "$new_path" 2> /dev/null`
15608
15609    if test "x$new_path" = x; then
15610      # It's still not found. Now this is an unrecoverable error.
15611      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15612$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15613      has_space=`$ECHO "$complete" | $GREP " "`
15614      if test "x$has_space" != x; then
15615        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15616$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15617      fi
15618      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15619    fi
15620  fi
15621
15622  # Now new_path has a complete unix path to the binary
15623  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15624    # Keep paths in /bin as-is, but remove trailing .exe if any
15625    new_path="${new_path/%.exe/}"
15626    # Do not save /bin paths to all_fixpath_prefixes!
15627  else
15628    # Not in mixed or Windows style, start by that.
15629    new_path=`cmd //c echo $new_path`
15630
15631  input_path="$new_path"
15632  # Check if we need to convert this using DOS-style short mode. If the path
15633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15634  # take no chances and rewrite it.
15635  # Note: m4 eats our [], so we need to use [ and ] instead.
15636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15637  if test "x$has_forbidden_chars" != x; then
15638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15640  fi
15641
15642    # Output is in $new_path
15643
15644  windows_path="$new_path"
15645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15646    unix_path=`$CYGPATH -u "$windows_path"`
15647    new_path="$unix_path"
15648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15650    new_path="$unix_path"
15651  fi
15652
15653    # remove trailing .exe if any
15654    new_path="${new_path/%.exe/}"
15655
15656    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15657    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15658  fi
15659
15660  else
15661    # We're on a posix platform. Hooray! :)
15662    # First separate the path from the arguments. This will split at the first
15663    # space.
15664    complete="$FOUND_MAKE"
15665    path="${complete%% *}"
15666    tmp="$complete EOL"
15667    arguments="${tmp#* }"
15668
15669    # Cannot rely on the command "which" here since it doesn't always work.
15670    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15671    if test -z "$is_absolute_path"; then
15672      # Path to executable is not absolute. Find it.
15673      IFS_save="$IFS"
15674      IFS=:
15675      for p in $PATH; do
15676        if test -f "$p/$path" && test -x "$p/$path"; then
15677          new_path="$p/$path"
15678          break
15679        fi
15680      done
15681      IFS="$IFS_save"
15682    else
15683      # This is an absolute path, we can use it without further modifications.
15684      new_path="$path"
15685    fi
15686
15687    if test "x$new_path" = x; then
15688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15689$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15690      has_space=`$ECHO "$complete" | $GREP " "`
15691      if test "x$has_space" != x; then
15692        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15693$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15694      fi
15695      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15696    fi
15697  fi
15698
15699  # Now join together the path and the arguments once again
15700  if test "x$arguments" != xEOL; then
15701    new_complete="$new_path ${arguments% *}"
15702  else
15703    new_complete="$new_path"
15704  fi
15705
15706  if test "x$complete" != "x$new_complete"; then
15707    FOUND_MAKE="$new_complete"
15708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15709$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15710  fi
15711
15712        fi
15713      fi
15714    fi
15715  fi
15716
15717
15718    if test "x$FOUND_MAKE" = x; then
15719      for ac_prog in make
15720do
15721  # Extract the first word of "$ac_prog", so it can be a program name with args.
15722set dummy $ac_prog; ac_word=$2
15723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15724$as_echo_n "checking for $ac_word... " >&6; }
15725if ${ac_cv_path_CHECK_MAKE+:} false; then :
15726  $as_echo_n "(cached) " >&6
15727else
15728  case $CHECK_MAKE in
15729  [\\/]* | ?:[\\/]*)
15730  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15731  ;;
15732  *)
15733  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15734for as_dir in $PATH
15735do
15736  IFS=$as_save_IFS
15737  test -z "$as_dir" && as_dir=.
15738    for ac_exec_ext in '' $ac_executable_extensions; do
15739  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15740    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15741    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15742    break 2
15743  fi
15744done
15745  done
15746IFS=$as_save_IFS
15747
15748  ;;
15749esac
15750fi
15751CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15752if test -n "$CHECK_MAKE"; then
15753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15754$as_echo "$CHECK_MAKE" >&6; }
15755else
15756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15757$as_echo "no" >&6; }
15758fi
15759
15760
15761  test -n "$CHECK_MAKE" && break
15762done
15763
15764
15765  MAKE_CANDIDATE=""$CHECK_MAKE""
15766  DESCRIPTION="make in PATH"
15767  if test "x$MAKE_CANDIDATE" != x; then
15768    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15769$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15770    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15771    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15772    if test "x$IS_GNU_MAKE" = x; then
15773      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15774$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15775    else
15776      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15777      if test "x$IS_MODERN_MAKE" = x; then
15778        { $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
15779$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;}
15780      else
15781        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15782          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15783            MAKE_EXPECTED_ENV='cygwin'
15784          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15785            MAKE_EXPECTED_ENV='msys'
15786          else
15787            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15788          fi
15789          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15790          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15791        else
15792          # Not relevant for non-Windows
15793          IS_MAKE_CORRECT_ENV=true
15794        fi
15795        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15796          { $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
15797$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;}
15798        else
15799          FOUND_MAKE=$MAKE_CANDIDATE
15800
15801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15802
15803  # First separate the path from the arguments. This will split at the first
15804  # space.
15805  complete="$FOUND_MAKE"
15806  path="${complete%% *}"
15807  tmp="$complete EOL"
15808  arguments="${tmp#* }"
15809
15810  # Input might be given as Windows format, start by converting to
15811  # unix format.
15812  new_path=`$CYGPATH -u "$path"`
15813
15814  # Now try to locate executable using which
15815  new_path=`$WHICH "$new_path" 2> /dev/null`
15816  # bat and cmd files are not always considered executable in cygwin causing which
15817  # to not find them
15818  if test "x$new_path" = x \
15819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15821    new_path=`$CYGPATH -u "$path"`
15822  fi
15823  if test "x$new_path" = x; then
15824    # Oops. Which didn't find the executable.
15825    # The splitting of arguments from the executable at a space might have been incorrect,
15826    # since paths with space are more likely in Windows. Give it another try with the whole
15827    # argument.
15828    path="$complete"
15829    arguments="EOL"
15830    new_path=`$CYGPATH -u "$path"`
15831    new_path=`$WHICH "$new_path" 2> /dev/null`
15832    # bat and cmd files are not always considered executable in cygwin causing which
15833    # to not find them
15834    if test "x$new_path" = x \
15835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15837      new_path=`$CYGPATH -u "$path"`
15838    fi
15839    if test "x$new_path" = x; then
15840      # It's still not found. Now this is an unrecoverable error.
15841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15843      has_space=`$ECHO "$complete" | $GREP " "`
15844      if test "x$has_space" != x; then
15845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15847      fi
15848      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15849    fi
15850  fi
15851
15852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15855  # "foo.exe" is OK but "foo" is an error.
15856  #
15857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15858  # It is also a way to make sure we got the proper file name for the real test later on.
15859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15860  if test "x$test_shortpath" = x; then
15861    # Short path failed, file does not exist as specified.
15862    # Try adding .exe or .cmd
15863    if test -f "${new_path}.exe"; then
15864      input_to_shortpath="${new_path}.exe"
15865    elif test -f "${new_path}.cmd"; then
15866      input_to_shortpath="${new_path}.cmd"
15867    else
15868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15872      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15873    fi
15874  else
15875    input_to_shortpath="$new_path"
15876  fi
15877
15878  # Call helper function which possibly converts this using DOS-style short mode.
15879  # If so, the updated path is stored in $new_path.
15880  new_path="$input_to_shortpath"
15881
15882  input_path="$input_to_shortpath"
15883  # Check if we need to convert this using DOS-style short mode. If the path
15884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15885  # take no chances and rewrite it.
15886  # Note: m4 eats our [], so we need to use [ and ] instead.
15887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15888  if test "x$has_forbidden_chars" != x; then
15889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15893      # Going to short mode and back again did indeed matter. Since short mode is
15894      # case insensitive, let's make it lowercase to improve readability.
15895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15896      # Now convert it back to Unix-stile (cygpath)
15897      input_path=`$CYGPATH -u "$shortmode_path"`
15898      new_path="$input_path"
15899    fi
15900  fi
15901
15902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15903  if test "x$test_cygdrive_prefix" = x; then
15904    # As a simple fix, exclude /usr/bin since it's not a real path.
15905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15907      # a path prefixed by /cygdrive for fixpath to work.
15908      new_path="$CYGWIN_ROOT_PATH$input_path"
15909    fi
15910  fi
15911
15912  # remove trailing .exe if any
15913  new_path="${new_path/%.exe/}"
15914
15915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15916
15917  # First separate the path from the arguments. This will split at the first
15918  # space.
15919  complete="$FOUND_MAKE"
15920  path="${complete%% *}"
15921  tmp="$complete EOL"
15922  arguments="${tmp#* }"
15923
15924  # Input might be given as Windows format, start by converting to
15925  # unix format.
15926  new_path="$path"
15927
15928  windows_path="$new_path"
15929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15930    unix_path=`$CYGPATH -u "$windows_path"`
15931    new_path="$unix_path"
15932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15934    new_path="$unix_path"
15935  fi
15936
15937
15938  # Now try to locate executable using which
15939  new_path=`$WHICH "$new_path" 2> /dev/null`
15940
15941  if test "x$new_path" = x; then
15942    # Oops. Which didn't find the executable.
15943    # The splitting of arguments from the executable at a space might have been incorrect,
15944    # since paths with space are more likely in Windows. Give it another try with the whole
15945    # argument.
15946    path="$complete"
15947    arguments="EOL"
15948    new_path="$path"
15949
15950  windows_path="$new_path"
15951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15952    unix_path=`$CYGPATH -u "$windows_path"`
15953    new_path="$unix_path"
15954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15956    new_path="$unix_path"
15957  fi
15958
15959
15960    new_path=`$WHICH "$new_path" 2> /dev/null`
15961
15962    if test "x$new_path" = x; then
15963      # It's still not found. Now this is an unrecoverable error.
15964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15965$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15966      has_space=`$ECHO "$complete" | $GREP " "`
15967      if test "x$has_space" != x; then
15968        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15969$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15970      fi
15971      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15972    fi
15973  fi
15974
15975  # Now new_path has a complete unix path to the binary
15976  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15977    # Keep paths in /bin as-is, but remove trailing .exe if any
15978    new_path="${new_path/%.exe/}"
15979    # Do not save /bin paths to all_fixpath_prefixes!
15980  else
15981    # Not in mixed or Windows style, start by that.
15982    new_path=`cmd //c echo $new_path`
15983
15984  input_path="$new_path"
15985  # Check if we need to convert this using DOS-style short mode. If the path
15986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15987  # take no chances and rewrite it.
15988  # Note: m4 eats our [], so we need to use [ and ] instead.
15989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15990  if test "x$has_forbidden_chars" != x; then
15991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15993  fi
15994
15995    # Output is in $new_path
15996
15997  windows_path="$new_path"
15998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15999    unix_path=`$CYGPATH -u "$windows_path"`
16000    new_path="$unix_path"
16001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16003    new_path="$unix_path"
16004  fi
16005
16006    # remove trailing .exe if any
16007    new_path="${new_path/%.exe/}"
16008
16009    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16010    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16011  fi
16012
16013  else
16014    # We're on a posix platform. Hooray! :)
16015    # First separate the path from the arguments. This will split at the first
16016    # space.
16017    complete="$FOUND_MAKE"
16018    path="${complete%% *}"
16019    tmp="$complete EOL"
16020    arguments="${tmp#* }"
16021
16022    # Cannot rely on the command "which" here since it doesn't always work.
16023    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16024    if test -z "$is_absolute_path"; then
16025      # Path to executable is not absolute. Find it.
16026      IFS_save="$IFS"
16027      IFS=:
16028      for p in $PATH; do
16029        if test -f "$p/$path" && test -x "$p/$path"; then
16030          new_path="$p/$path"
16031          break
16032        fi
16033      done
16034      IFS="$IFS_save"
16035    else
16036      # This is an absolute path, we can use it without further modifications.
16037      new_path="$path"
16038    fi
16039
16040    if test "x$new_path" = x; then
16041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16042$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16043      has_space=`$ECHO "$complete" | $GREP " "`
16044      if test "x$has_space" != x; then
16045        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16046$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16047      fi
16048      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16049    fi
16050  fi
16051
16052  # Now join together the path and the arguments once again
16053  if test "x$arguments" != xEOL; then
16054    new_complete="$new_path ${arguments% *}"
16055  else
16056    new_complete="$new_path"
16057  fi
16058
16059  if test "x$complete" != "x$new_complete"; then
16060    FOUND_MAKE="$new_complete"
16061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16062$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16063  fi
16064
16065        fi
16066      fi
16067    fi
16068  fi
16069
16070    fi
16071
16072    if test "x$FOUND_MAKE" = x; then
16073      if test "x$TOOLS_DIR" != x; then
16074        # We have a tools-dir, check that as well before giving up.
16075        OLD_PATH=$PATH
16076        PATH=$TOOLS_DIR:$PATH
16077        for ac_prog in gmake
16078do
16079  # Extract the first word of "$ac_prog", so it can be a program name with args.
16080set dummy $ac_prog; ac_word=$2
16081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16082$as_echo_n "checking for $ac_word... " >&6; }
16083if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16084  $as_echo_n "(cached) " >&6
16085else
16086  case $CHECK_TOOLSDIR_GMAKE in
16087  [\\/]* | ?:[\\/]*)
16088  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16089  ;;
16090  *)
16091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16092for as_dir in $PATH
16093do
16094  IFS=$as_save_IFS
16095  test -z "$as_dir" && as_dir=.
16096    for ac_exec_ext in '' $ac_executable_extensions; do
16097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16098    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16100    break 2
16101  fi
16102done
16103  done
16104IFS=$as_save_IFS
16105
16106  ;;
16107esac
16108fi
16109CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16110if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16112$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16113else
16114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16115$as_echo "no" >&6; }
16116fi
16117
16118
16119  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16120done
16121
16122
16123  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16124  DESCRIPTION="gmake in tools-dir"
16125  if test "x$MAKE_CANDIDATE" != x; then
16126    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16127$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16128    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16129    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16130    if test "x$IS_GNU_MAKE" = x; then
16131      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16132$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16133    else
16134      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16135      if test "x$IS_MODERN_MAKE" = x; then
16136        { $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
16137$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;}
16138      else
16139        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16140          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16141            MAKE_EXPECTED_ENV='cygwin'
16142          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16143            MAKE_EXPECTED_ENV='msys'
16144          else
16145            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16146          fi
16147          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16148          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16149        else
16150          # Not relevant for non-Windows
16151          IS_MAKE_CORRECT_ENV=true
16152        fi
16153        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16154          { $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
16155$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;}
16156        else
16157          FOUND_MAKE=$MAKE_CANDIDATE
16158
16159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16160
16161  # First separate the path from the arguments. This will split at the first
16162  # space.
16163  complete="$FOUND_MAKE"
16164  path="${complete%% *}"
16165  tmp="$complete EOL"
16166  arguments="${tmp#* }"
16167
16168  # Input might be given as Windows format, start by converting to
16169  # unix format.
16170  new_path=`$CYGPATH -u "$path"`
16171
16172  # Now try to locate executable using which
16173  new_path=`$WHICH "$new_path" 2> /dev/null`
16174  # bat and cmd files are not always considered executable in cygwin causing which
16175  # to not find them
16176  if test "x$new_path" = x \
16177      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16178      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16179    new_path=`$CYGPATH -u "$path"`
16180  fi
16181  if test "x$new_path" = x; then
16182    # Oops. Which didn't find the executable.
16183    # The splitting of arguments from the executable at a space might have been incorrect,
16184    # since paths with space are more likely in Windows. Give it another try with the whole
16185    # argument.
16186    path="$complete"
16187    arguments="EOL"
16188    new_path=`$CYGPATH -u "$path"`
16189    new_path=`$WHICH "$new_path" 2> /dev/null`
16190    # bat and cmd files are not always considered executable in cygwin causing which
16191    # to not find them
16192    if test "x$new_path" = x \
16193        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16194        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16195      new_path=`$CYGPATH -u "$path"`
16196    fi
16197    if test "x$new_path" = x; then
16198      # It's still not found. Now this is an unrecoverable error.
16199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16200$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16201      has_space=`$ECHO "$complete" | $GREP " "`
16202      if test "x$has_space" != x; then
16203        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16204$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16205      fi
16206      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16207    fi
16208  fi
16209
16210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16213  # "foo.exe" is OK but "foo" is an error.
16214  #
16215  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16216  # It is also a way to make sure we got the proper file name for the real test later on.
16217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16218  if test "x$test_shortpath" = x; then
16219    # Short path failed, file does not exist as specified.
16220    # Try adding .exe or .cmd
16221    if test -f "${new_path}.exe"; then
16222      input_to_shortpath="${new_path}.exe"
16223    elif test -f "${new_path}.cmd"; then
16224      input_to_shortpath="${new_path}.cmd"
16225    else
16226      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16227$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16228      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16229$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16230      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16231    fi
16232  else
16233    input_to_shortpath="$new_path"
16234  fi
16235
16236  # Call helper function which possibly converts this using DOS-style short mode.
16237  # If so, the updated path is stored in $new_path.
16238  new_path="$input_to_shortpath"
16239
16240  input_path="$input_to_shortpath"
16241  # Check if we need to convert this using DOS-style short mode. If the path
16242  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16243  # take no chances and rewrite it.
16244  # Note: m4 eats our [], so we need to use [ and ] instead.
16245  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16246  if test "x$has_forbidden_chars" != x; then
16247    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16248    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16249    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16250    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16251      # Going to short mode and back again did indeed matter. Since short mode is
16252      # case insensitive, let's make it lowercase to improve readability.
16253      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16254      # Now convert it back to Unix-stile (cygpath)
16255      input_path=`$CYGPATH -u "$shortmode_path"`
16256      new_path="$input_path"
16257    fi
16258  fi
16259
16260  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16261  if test "x$test_cygdrive_prefix" = x; then
16262    # As a simple fix, exclude /usr/bin since it's not a real path.
16263    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16264      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16265      # a path prefixed by /cygdrive for fixpath to work.
16266      new_path="$CYGWIN_ROOT_PATH$input_path"
16267    fi
16268  fi
16269
16270  # remove trailing .exe if any
16271  new_path="${new_path/%.exe/}"
16272
16273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16274
16275  # First separate the path from the arguments. This will split at the first
16276  # space.
16277  complete="$FOUND_MAKE"
16278  path="${complete%% *}"
16279  tmp="$complete EOL"
16280  arguments="${tmp#* }"
16281
16282  # Input might be given as Windows format, start by converting to
16283  # unix format.
16284  new_path="$path"
16285
16286  windows_path="$new_path"
16287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16288    unix_path=`$CYGPATH -u "$windows_path"`
16289    new_path="$unix_path"
16290  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16291    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16292    new_path="$unix_path"
16293  fi
16294
16295
16296  # Now try to locate executable using which
16297  new_path=`$WHICH "$new_path" 2> /dev/null`
16298
16299  if test "x$new_path" = x; then
16300    # Oops. Which didn't find the executable.
16301    # The splitting of arguments from the executable at a space might have been incorrect,
16302    # since paths with space are more likely in Windows. Give it another try with the whole
16303    # argument.
16304    path="$complete"
16305    arguments="EOL"
16306    new_path="$path"
16307
16308  windows_path="$new_path"
16309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16310    unix_path=`$CYGPATH -u "$windows_path"`
16311    new_path="$unix_path"
16312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16314    new_path="$unix_path"
16315  fi
16316
16317
16318    new_path=`$WHICH "$new_path" 2> /dev/null`
16319
16320    if test "x$new_path" = x; then
16321      # It's still not found. Now this is an unrecoverable error.
16322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16323$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16324      has_space=`$ECHO "$complete" | $GREP " "`
16325      if test "x$has_space" != x; then
16326        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16327$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16328      fi
16329      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16330    fi
16331  fi
16332
16333  # Now new_path has a complete unix path to the binary
16334  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16335    # Keep paths in /bin as-is, but remove trailing .exe if any
16336    new_path="${new_path/%.exe/}"
16337    # Do not save /bin paths to all_fixpath_prefixes!
16338  else
16339    # Not in mixed or Windows style, start by that.
16340    new_path=`cmd //c echo $new_path`
16341
16342  input_path="$new_path"
16343  # Check if we need to convert this using DOS-style short mode. If the path
16344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16345  # take no chances and rewrite it.
16346  # Note: m4 eats our [], so we need to use [ and ] instead.
16347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16348  if test "x$has_forbidden_chars" != x; then
16349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16350    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16351  fi
16352
16353    # Output is in $new_path
16354
16355  windows_path="$new_path"
16356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16357    unix_path=`$CYGPATH -u "$windows_path"`
16358    new_path="$unix_path"
16359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16361    new_path="$unix_path"
16362  fi
16363
16364    # remove trailing .exe if any
16365    new_path="${new_path/%.exe/}"
16366
16367    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16368    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16369  fi
16370
16371  else
16372    # We're on a posix platform. Hooray! :)
16373    # First separate the path from the arguments. This will split at the first
16374    # space.
16375    complete="$FOUND_MAKE"
16376    path="${complete%% *}"
16377    tmp="$complete EOL"
16378    arguments="${tmp#* }"
16379
16380    # Cannot rely on the command "which" here since it doesn't always work.
16381    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16382    if test -z "$is_absolute_path"; then
16383      # Path to executable is not absolute. Find it.
16384      IFS_save="$IFS"
16385      IFS=:
16386      for p in $PATH; do
16387        if test -f "$p/$path" && test -x "$p/$path"; then
16388          new_path="$p/$path"
16389          break
16390        fi
16391      done
16392      IFS="$IFS_save"
16393    else
16394      # This is an absolute path, we can use it without further modifications.
16395      new_path="$path"
16396    fi
16397
16398    if test "x$new_path" = x; then
16399      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16400$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16401      has_space=`$ECHO "$complete" | $GREP " "`
16402      if test "x$has_space" != x; then
16403        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16404$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16405      fi
16406      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16407    fi
16408  fi
16409
16410  # Now join together the path and the arguments once again
16411  if test "x$arguments" != xEOL; then
16412    new_complete="$new_path ${arguments% *}"
16413  else
16414    new_complete="$new_path"
16415  fi
16416
16417  if test "x$complete" != "x$new_complete"; then
16418    FOUND_MAKE="$new_complete"
16419    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16420$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16421  fi
16422
16423        fi
16424      fi
16425    fi
16426  fi
16427
16428        if test "x$FOUND_MAKE" = x; then
16429          for ac_prog in make
16430do
16431  # Extract the first word of "$ac_prog", so it can be a program name with args.
16432set dummy $ac_prog; ac_word=$2
16433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16434$as_echo_n "checking for $ac_word... " >&6; }
16435if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16436  $as_echo_n "(cached) " >&6
16437else
16438  case $CHECK_TOOLSDIR_MAKE in
16439  [\\/]* | ?:[\\/]*)
16440  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16441  ;;
16442  *)
16443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16444for as_dir in $PATH
16445do
16446  IFS=$as_save_IFS
16447  test -z "$as_dir" && as_dir=.
16448    for ac_exec_ext in '' $ac_executable_extensions; do
16449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16450    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16452    break 2
16453  fi
16454done
16455  done
16456IFS=$as_save_IFS
16457
16458  ;;
16459esac
16460fi
16461CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16462if test -n "$CHECK_TOOLSDIR_MAKE"; then
16463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16464$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16465else
16466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16467$as_echo "no" >&6; }
16468fi
16469
16470
16471  test -n "$CHECK_TOOLSDIR_MAKE" && break
16472done
16473
16474
16475  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16476  DESCRIPTION="make in tools-dir"
16477  if test "x$MAKE_CANDIDATE" != x; then
16478    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16479$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16480    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16481    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16482    if test "x$IS_GNU_MAKE" = x; then
16483      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16484$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16485    else
16486      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16487      if test "x$IS_MODERN_MAKE" = x; then
16488        { $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
16489$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;}
16490      else
16491        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16492          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16493            MAKE_EXPECTED_ENV='cygwin'
16494          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16495            MAKE_EXPECTED_ENV='msys'
16496          else
16497            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16498          fi
16499          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16500          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16501        else
16502          # Not relevant for non-Windows
16503          IS_MAKE_CORRECT_ENV=true
16504        fi
16505        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16506          { $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
16507$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;}
16508        else
16509          FOUND_MAKE=$MAKE_CANDIDATE
16510
16511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16512
16513  # First separate the path from the arguments. This will split at the first
16514  # space.
16515  complete="$FOUND_MAKE"
16516  path="${complete%% *}"
16517  tmp="$complete EOL"
16518  arguments="${tmp#* }"
16519
16520  # Input might be given as Windows format, start by converting to
16521  # unix format.
16522  new_path=`$CYGPATH -u "$path"`
16523
16524  # Now try to locate executable using which
16525  new_path=`$WHICH "$new_path" 2> /dev/null`
16526  # bat and cmd files are not always considered executable in cygwin causing which
16527  # to not find them
16528  if test "x$new_path" = x \
16529      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16530      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16531    new_path=`$CYGPATH -u "$path"`
16532  fi
16533  if test "x$new_path" = x; then
16534    # Oops. Which didn't find the executable.
16535    # The splitting of arguments from the executable at a space might have been incorrect,
16536    # since paths with space are more likely in Windows. Give it another try with the whole
16537    # argument.
16538    path="$complete"
16539    arguments="EOL"
16540    new_path=`$CYGPATH -u "$path"`
16541    new_path=`$WHICH "$new_path" 2> /dev/null`
16542    # bat and cmd files are not always considered executable in cygwin causing which
16543    # to not find them
16544    if test "x$new_path" = x \
16545        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16546        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16547      new_path=`$CYGPATH -u "$path"`
16548    fi
16549    if test "x$new_path" = x; then
16550      # It's still not found. Now this is an unrecoverable error.
16551      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16552$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16553      has_space=`$ECHO "$complete" | $GREP " "`
16554      if test "x$has_space" != x; then
16555        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16556$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16557      fi
16558      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16559    fi
16560  fi
16561
16562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16565  # "foo.exe" is OK but "foo" is an error.
16566  #
16567  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16568  # It is also a way to make sure we got the proper file name for the real test later on.
16569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16570  if test "x$test_shortpath" = x; then
16571    # Short path failed, file does not exist as specified.
16572    # Try adding .exe or .cmd
16573    if test -f "${new_path}.exe"; then
16574      input_to_shortpath="${new_path}.exe"
16575    elif test -f "${new_path}.cmd"; then
16576      input_to_shortpath="${new_path}.cmd"
16577    else
16578      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16579$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16580      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16581$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16582      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16583    fi
16584  else
16585    input_to_shortpath="$new_path"
16586  fi
16587
16588  # Call helper function which possibly converts this using DOS-style short mode.
16589  # If so, the updated path is stored in $new_path.
16590  new_path="$input_to_shortpath"
16591
16592  input_path="$input_to_shortpath"
16593  # Check if we need to convert this using DOS-style short mode. If the path
16594  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16595  # take no chances and rewrite it.
16596  # Note: m4 eats our [], so we need to use [ and ] instead.
16597  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16598  if test "x$has_forbidden_chars" != x; then
16599    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16600    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16601    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16602    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16603      # Going to short mode and back again did indeed matter. Since short mode is
16604      # case insensitive, let's make it lowercase to improve readability.
16605      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16606      # Now convert it back to Unix-stile (cygpath)
16607      input_path=`$CYGPATH -u "$shortmode_path"`
16608      new_path="$input_path"
16609    fi
16610  fi
16611
16612  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16613  if test "x$test_cygdrive_prefix" = x; then
16614    # As a simple fix, exclude /usr/bin since it's not a real path.
16615    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16616      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16617      # a path prefixed by /cygdrive for fixpath to work.
16618      new_path="$CYGWIN_ROOT_PATH$input_path"
16619    fi
16620  fi
16621
16622  # remove trailing .exe if any
16623  new_path="${new_path/%.exe/}"
16624
16625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16626
16627  # First separate the path from the arguments. This will split at the first
16628  # space.
16629  complete="$FOUND_MAKE"
16630  path="${complete%% *}"
16631  tmp="$complete EOL"
16632  arguments="${tmp#* }"
16633
16634  # Input might be given as Windows format, start by converting to
16635  # unix format.
16636  new_path="$path"
16637
16638  windows_path="$new_path"
16639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16640    unix_path=`$CYGPATH -u "$windows_path"`
16641    new_path="$unix_path"
16642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16644    new_path="$unix_path"
16645  fi
16646
16647
16648  # Now try to locate executable using which
16649  new_path=`$WHICH "$new_path" 2> /dev/null`
16650
16651  if test "x$new_path" = x; then
16652    # Oops. Which didn't find the executable.
16653    # The splitting of arguments from the executable at a space might have been incorrect,
16654    # since paths with space are more likely in Windows. Give it another try with the whole
16655    # argument.
16656    path="$complete"
16657    arguments="EOL"
16658    new_path="$path"
16659
16660  windows_path="$new_path"
16661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16662    unix_path=`$CYGPATH -u "$windows_path"`
16663    new_path="$unix_path"
16664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16666    new_path="$unix_path"
16667  fi
16668
16669
16670    new_path=`$WHICH "$new_path" 2> /dev/null`
16671
16672    if test "x$new_path" = x; then
16673      # It's still not found. Now this is an unrecoverable error.
16674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16675$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16676      has_space=`$ECHO "$complete" | $GREP " "`
16677      if test "x$has_space" != x; then
16678        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16679$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16680      fi
16681      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16682    fi
16683  fi
16684
16685  # Now new_path has a complete unix path to the binary
16686  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16687    # Keep paths in /bin as-is, but remove trailing .exe if any
16688    new_path="${new_path/%.exe/}"
16689    # Do not save /bin paths to all_fixpath_prefixes!
16690  else
16691    # Not in mixed or Windows style, start by that.
16692    new_path=`cmd //c echo $new_path`
16693
16694  input_path="$new_path"
16695  # Check if we need to convert this using DOS-style short mode. If the path
16696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16697  # take no chances and rewrite it.
16698  # Note: m4 eats our [], so we need to use [ and ] instead.
16699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16700  if test "x$has_forbidden_chars" != x; then
16701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16702    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16703  fi
16704
16705    # Output is in $new_path
16706
16707  windows_path="$new_path"
16708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16709    unix_path=`$CYGPATH -u "$windows_path"`
16710    new_path="$unix_path"
16711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16713    new_path="$unix_path"
16714  fi
16715
16716    # remove trailing .exe if any
16717    new_path="${new_path/%.exe/}"
16718
16719    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16720    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16721  fi
16722
16723  else
16724    # We're on a posix platform. Hooray! :)
16725    # First separate the path from the arguments. This will split at the first
16726    # space.
16727    complete="$FOUND_MAKE"
16728    path="${complete%% *}"
16729    tmp="$complete EOL"
16730    arguments="${tmp#* }"
16731
16732    # Cannot rely on the command "which" here since it doesn't always work.
16733    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16734    if test -z "$is_absolute_path"; then
16735      # Path to executable is not absolute. Find it.
16736      IFS_save="$IFS"
16737      IFS=:
16738      for p in $PATH; do
16739        if test -f "$p/$path" && test -x "$p/$path"; then
16740          new_path="$p/$path"
16741          break
16742        fi
16743      done
16744      IFS="$IFS_save"
16745    else
16746      # This is an absolute path, we can use it without further modifications.
16747      new_path="$path"
16748    fi
16749
16750    if test "x$new_path" = x; then
16751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16752$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16753      has_space=`$ECHO "$complete" | $GREP " "`
16754      if test "x$has_space" != x; then
16755        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16756$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16757      fi
16758      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16759    fi
16760  fi
16761
16762  # Now join together the path and the arguments once again
16763  if test "x$arguments" != xEOL; then
16764    new_complete="$new_path ${arguments% *}"
16765  else
16766    new_complete="$new_path"
16767  fi
16768
16769  if test "x$complete" != "x$new_complete"; then
16770    FOUND_MAKE="$new_complete"
16771    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16772$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16773  fi
16774
16775        fi
16776      fi
16777    fi
16778  fi
16779
16780        fi
16781        PATH=$OLD_PATH
16782      fi
16783    fi
16784
16785    if test "x$FOUND_MAKE" = x; then
16786      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
16787    fi
16788  fi
16789
16790  MAKE=$FOUND_MAKE
16791
16792  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
16793$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
16794
16795
16796
16797  # Test if find supports -delete
16798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
16799$as_echo_n "checking if find supports -delete... " >&6; }
16800  FIND_DELETE="-delete"
16801
16802  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
16803
16804  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
16805
16806  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
16807  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
16808    # No, it does not.
16809    rm $DELETEDIR/TestIfFindSupportsDelete
16810    FIND_DELETE="-exec rm \{\} \+"
16811    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16812$as_echo "no" >&6; }
16813  else
16814    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16815$as_echo "yes" >&6; }
16816  fi
16817  rmdir $DELETEDIR
16818
16819
16820
16821  # These tools might not be installed by default,
16822  # need hint on how to install them.
16823
16824
16825
16826  # Publish this variable in the help.
16827
16828
16829  if test "x$UNZIP" = x; then
16830    # The variable is not set by user, try to locate tool using the code snippet
16831    for ac_prog in unzip
16832do
16833  # Extract the first word of "$ac_prog", so it can be a program name with args.
16834set dummy $ac_prog; ac_word=$2
16835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16836$as_echo_n "checking for $ac_word... " >&6; }
16837if ${ac_cv_path_UNZIP+:} false; then :
16838  $as_echo_n "(cached) " >&6
16839else
16840  case $UNZIP in
16841  [\\/]* | ?:[\\/]*)
16842  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16843  ;;
16844  *)
16845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16846for as_dir in $PATH
16847do
16848  IFS=$as_save_IFS
16849  test -z "$as_dir" && as_dir=.
16850    for ac_exec_ext in '' $ac_executable_extensions; do
16851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16852    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16854    break 2
16855  fi
16856done
16857  done
16858IFS=$as_save_IFS
16859
16860  ;;
16861esac
16862fi
16863UNZIP=$ac_cv_path_UNZIP
16864if test -n "$UNZIP"; then
16865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16866$as_echo "$UNZIP" >&6; }
16867else
16868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16869$as_echo "no" >&6; }
16870fi
16871
16872
16873  test -n "$UNZIP" && break
16874done
16875
16876  else
16877    # The variable is set, but is it from the command line or the environment?
16878
16879    # Try to remove the string !UNZIP! from our list.
16880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
16881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
16882      # If it failed, the variable was not from the command line. Ignore it,
16883      # but warn the user (except for BASH, which is always set by the calling BASH).
16884      if test "xUNZIP" != xBASH; then
16885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
16886$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
16887      fi
16888      # Try to locate tool using the code snippet
16889      for ac_prog in unzip
16890do
16891  # Extract the first word of "$ac_prog", so it can be a program name with args.
16892set dummy $ac_prog; ac_word=$2
16893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16894$as_echo_n "checking for $ac_word... " >&6; }
16895if ${ac_cv_path_UNZIP+:} false; then :
16896  $as_echo_n "(cached) " >&6
16897else
16898  case $UNZIP in
16899  [\\/]* | ?:[\\/]*)
16900  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16901  ;;
16902  *)
16903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16904for as_dir in $PATH
16905do
16906  IFS=$as_save_IFS
16907  test -z "$as_dir" && as_dir=.
16908    for ac_exec_ext in '' $ac_executable_extensions; do
16909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16910    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16912    break 2
16913  fi
16914done
16915  done
16916IFS=$as_save_IFS
16917
16918  ;;
16919esac
16920fi
16921UNZIP=$ac_cv_path_UNZIP
16922if test -n "$UNZIP"; then
16923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16924$as_echo "$UNZIP" >&6; }
16925else
16926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16927$as_echo "no" >&6; }
16928fi
16929
16930
16931  test -n "$UNZIP" && break
16932done
16933
16934    else
16935      # If it succeeded, then it was overridden by the user. We will use it
16936      # for the tool.
16937
16938      # First remove it from the list of overridden variables, so we can test
16939      # for unknown variables in the end.
16940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
16941
16942      # Check if the provided tool contains a complete path.
16943      tool_specified="$UNZIP"
16944      tool_basename="${tool_specified##*/}"
16945      if test "x$tool_basename" = "x$tool_specified"; then
16946        # A command without a complete path is provided, search $PATH.
16947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
16948$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
16949        # Extract the first word of "$tool_basename", so it can be a program name with args.
16950set dummy $tool_basename; ac_word=$2
16951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16952$as_echo_n "checking for $ac_word... " >&6; }
16953if ${ac_cv_path_UNZIP+:} false; then :
16954  $as_echo_n "(cached) " >&6
16955else
16956  case $UNZIP in
16957  [\\/]* | ?:[\\/]*)
16958  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
16959  ;;
16960  *)
16961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16962for as_dir in $PATH
16963do
16964  IFS=$as_save_IFS
16965  test -z "$as_dir" && as_dir=.
16966    for ac_exec_ext in '' $ac_executable_extensions; do
16967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16968    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
16969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16970    break 2
16971  fi
16972done
16973  done
16974IFS=$as_save_IFS
16975
16976  ;;
16977esac
16978fi
16979UNZIP=$ac_cv_path_UNZIP
16980if test -n "$UNZIP"; then
16981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
16982$as_echo "$UNZIP" >&6; }
16983else
16984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16985$as_echo "no" >&6; }
16986fi
16987
16988
16989        if test "x$UNZIP" = x; then
16990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
16991        fi
16992      else
16993        # Otherwise we believe it is a complete path. Use it as it is.
16994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
16995$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
16996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
16997$as_echo_n "checking for UNZIP... " >&6; }
16998        if test ! -x "$tool_specified"; then
16999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17000$as_echo "not found" >&6; }
17001          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17002        fi
17003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17004$as_echo "$tool_specified" >&6; }
17005      fi
17006    fi
17007  fi
17008
17009
17010
17011  if test "x$UNZIP" = x; then
17012    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17013  fi
17014
17015
17016
17017
17018
17019  # Publish this variable in the help.
17020
17021
17022  if test "x$ZIP" = x; then
17023    # The variable is not set by user, try to locate tool using the code snippet
17024    for ac_prog in zip
17025do
17026  # Extract the first word of "$ac_prog", so it can be a program name with args.
17027set dummy $ac_prog; ac_word=$2
17028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17029$as_echo_n "checking for $ac_word... " >&6; }
17030if ${ac_cv_path_ZIP+:} false; then :
17031  $as_echo_n "(cached) " >&6
17032else
17033  case $ZIP in
17034  [\\/]* | ?:[\\/]*)
17035  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17036  ;;
17037  *)
17038  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17039for as_dir in $PATH
17040do
17041  IFS=$as_save_IFS
17042  test -z "$as_dir" && as_dir=.
17043    for ac_exec_ext in '' $ac_executable_extensions; do
17044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17045    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17047    break 2
17048  fi
17049done
17050  done
17051IFS=$as_save_IFS
17052
17053  ;;
17054esac
17055fi
17056ZIP=$ac_cv_path_ZIP
17057if test -n "$ZIP"; then
17058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17059$as_echo "$ZIP" >&6; }
17060else
17061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17062$as_echo "no" >&6; }
17063fi
17064
17065
17066  test -n "$ZIP" && break
17067done
17068
17069  else
17070    # The variable is set, but is it from the command line or the environment?
17071
17072    # Try to remove the string !ZIP! from our list.
17073    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17074    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17075      # If it failed, the variable was not from the command line. Ignore it,
17076      # but warn the user (except for BASH, which is always set by the calling BASH).
17077      if test "xZIP" != xBASH; then
17078        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17079$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17080      fi
17081      # Try to locate tool using the code snippet
17082      for ac_prog in zip
17083do
17084  # Extract the first word of "$ac_prog", so it can be a program name with args.
17085set dummy $ac_prog; ac_word=$2
17086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17087$as_echo_n "checking for $ac_word... " >&6; }
17088if ${ac_cv_path_ZIP+:} false; then :
17089  $as_echo_n "(cached) " >&6
17090else
17091  case $ZIP in
17092  [\\/]* | ?:[\\/]*)
17093  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17094  ;;
17095  *)
17096  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17097for as_dir in $PATH
17098do
17099  IFS=$as_save_IFS
17100  test -z "$as_dir" && as_dir=.
17101    for ac_exec_ext in '' $ac_executable_extensions; do
17102  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17103    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17104    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17105    break 2
17106  fi
17107done
17108  done
17109IFS=$as_save_IFS
17110
17111  ;;
17112esac
17113fi
17114ZIP=$ac_cv_path_ZIP
17115if test -n "$ZIP"; then
17116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17117$as_echo "$ZIP" >&6; }
17118else
17119  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17120$as_echo "no" >&6; }
17121fi
17122
17123
17124  test -n "$ZIP" && break
17125done
17126
17127    else
17128      # If it succeeded, then it was overridden by the user. We will use it
17129      # for the tool.
17130
17131      # First remove it from the list of overridden variables, so we can test
17132      # for unknown variables in the end.
17133      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17134
17135      # Check if the provided tool contains a complete path.
17136      tool_specified="$ZIP"
17137      tool_basename="${tool_specified##*/}"
17138      if test "x$tool_basename" = "x$tool_specified"; then
17139        # A command without a complete path is provided, search $PATH.
17140        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17141$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17142        # Extract the first word of "$tool_basename", so it can be a program name with args.
17143set dummy $tool_basename; ac_word=$2
17144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17145$as_echo_n "checking for $ac_word... " >&6; }
17146if ${ac_cv_path_ZIP+:} false; then :
17147  $as_echo_n "(cached) " >&6
17148else
17149  case $ZIP in
17150  [\\/]* | ?:[\\/]*)
17151  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17152  ;;
17153  *)
17154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17155for as_dir in $PATH
17156do
17157  IFS=$as_save_IFS
17158  test -z "$as_dir" && as_dir=.
17159    for ac_exec_ext in '' $ac_executable_extensions; do
17160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17161    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17163    break 2
17164  fi
17165done
17166  done
17167IFS=$as_save_IFS
17168
17169  ;;
17170esac
17171fi
17172ZIP=$ac_cv_path_ZIP
17173if test -n "$ZIP"; then
17174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17175$as_echo "$ZIP" >&6; }
17176else
17177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17178$as_echo "no" >&6; }
17179fi
17180
17181
17182        if test "x$ZIP" = x; then
17183          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17184        fi
17185      else
17186        # Otherwise we believe it is a complete path. Use it as it is.
17187        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17188$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17189        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17190$as_echo_n "checking for ZIP... " >&6; }
17191        if test ! -x "$tool_specified"; then
17192          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17193$as_echo "not found" >&6; }
17194          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17195        fi
17196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17197$as_echo "$tool_specified" >&6; }
17198      fi
17199    fi
17200  fi
17201
17202
17203
17204  if test "x$ZIP" = x; then
17205    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17206  fi
17207
17208
17209
17210  # Non-required basic tools
17211
17212
17213
17214  # Publish this variable in the help.
17215
17216
17217  if test "x$LDD" = x; then
17218    # The variable is not set by user, try to locate tool using the code snippet
17219    for ac_prog in ldd
17220do
17221  # Extract the first word of "$ac_prog", so it can be a program name with args.
17222set dummy $ac_prog; ac_word=$2
17223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17224$as_echo_n "checking for $ac_word... " >&6; }
17225if ${ac_cv_path_LDD+:} false; then :
17226  $as_echo_n "(cached) " >&6
17227else
17228  case $LDD in
17229  [\\/]* | ?:[\\/]*)
17230  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17231  ;;
17232  *)
17233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17234for as_dir in $PATH
17235do
17236  IFS=$as_save_IFS
17237  test -z "$as_dir" && as_dir=.
17238    for ac_exec_ext in '' $ac_executable_extensions; do
17239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17240    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17242    break 2
17243  fi
17244done
17245  done
17246IFS=$as_save_IFS
17247
17248  ;;
17249esac
17250fi
17251LDD=$ac_cv_path_LDD
17252if test -n "$LDD"; then
17253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17254$as_echo "$LDD" >&6; }
17255else
17256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17257$as_echo "no" >&6; }
17258fi
17259
17260
17261  test -n "$LDD" && break
17262done
17263
17264  else
17265    # The variable is set, but is it from the command line or the environment?
17266
17267    # Try to remove the string !LDD! from our list.
17268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17270      # If it failed, the variable was not from the command line. Ignore it,
17271      # but warn the user (except for BASH, which is always set by the calling BASH).
17272      if test "xLDD" != xBASH; then
17273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17274$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17275      fi
17276      # Try to locate tool using the code snippet
17277      for ac_prog in ldd
17278do
17279  # Extract the first word of "$ac_prog", so it can be a program name with args.
17280set dummy $ac_prog; ac_word=$2
17281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17282$as_echo_n "checking for $ac_word... " >&6; }
17283if ${ac_cv_path_LDD+:} false; then :
17284  $as_echo_n "(cached) " >&6
17285else
17286  case $LDD in
17287  [\\/]* | ?:[\\/]*)
17288  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17289  ;;
17290  *)
17291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17292for as_dir in $PATH
17293do
17294  IFS=$as_save_IFS
17295  test -z "$as_dir" && as_dir=.
17296    for ac_exec_ext in '' $ac_executable_extensions; do
17297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17298    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17300    break 2
17301  fi
17302done
17303  done
17304IFS=$as_save_IFS
17305
17306  ;;
17307esac
17308fi
17309LDD=$ac_cv_path_LDD
17310if test -n "$LDD"; then
17311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17312$as_echo "$LDD" >&6; }
17313else
17314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17315$as_echo "no" >&6; }
17316fi
17317
17318
17319  test -n "$LDD" && break
17320done
17321
17322    else
17323      # If it succeeded, then it was overridden by the user. We will use it
17324      # for the tool.
17325
17326      # First remove it from the list of overridden variables, so we can test
17327      # for unknown variables in the end.
17328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17329
17330      # Check if the provided tool contains a complete path.
17331      tool_specified="$LDD"
17332      tool_basename="${tool_specified##*/}"
17333      if test "x$tool_basename" = "x$tool_specified"; then
17334        # A command without a complete path is provided, search $PATH.
17335        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17336$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17337        # Extract the first word of "$tool_basename", so it can be a program name with args.
17338set dummy $tool_basename; ac_word=$2
17339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17340$as_echo_n "checking for $ac_word... " >&6; }
17341if ${ac_cv_path_LDD+:} false; then :
17342  $as_echo_n "(cached) " >&6
17343else
17344  case $LDD in
17345  [\\/]* | ?:[\\/]*)
17346  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17347  ;;
17348  *)
17349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17350for as_dir in $PATH
17351do
17352  IFS=$as_save_IFS
17353  test -z "$as_dir" && as_dir=.
17354    for ac_exec_ext in '' $ac_executable_extensions; do
17355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17356    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17358    break 2
17359  fi
17360done
17361  done
17362IFS=$as_save_IFS
17363
17364  ;;
17365esac
17366fi
17367LDD=$ac_cv_path_LDD
17368if test -n "$LDD"; then
17369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17370$as_echo "$LDD" >&6; }
17371else
17372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17373$as_echo "no" >&6; }
17374fi
17375
17376
17377        if test "x$LDD" = x; then
17378          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17379        fi
17380      else
17381        # Otherwise we believe it is a complete path. Use it as it is.
17382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17383$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17385$as_echo_n "checking for LDD... " >&6; }
17386        if test ! -x "$tool_specified"; then
17387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17388$as_echo "not found" >&6; }
17389          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17390        fi
17391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17392$as_echo "$tool_specified" >&6; }
17393      fi
17394    fi
17395  fi
17396
17397
17398  if test "x$LDD" = "x"; then
17399    # List shared lib dependencies is used for
17400    # debug output and checking for forbidden dependencies.
17401    # We can build without it.
17402    LDD="true"
17403  fi
17404
17405
17406  # Publish this variable in the help.
17407
17408
17409  if test "x$OTOOL" = x; then
17410    # The variable is not set by user, try to locate tool using the code snippet
17411    for ac_prog in otool
17412do
17413  # Extract the first word of "$ac_prog", so it can be a program name with args.
17414set dummy $ac_prog; ac_word=$2
17415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17416$as_echo_n "checking for $ac_word... " >&6; }
17417if ${ac_cv_path_OTOOL+:} false; then :
17418  $as_echo_n "(cached) " >&6
17419else
17420  case $OTOOL in
17421  [\\/]* | ?:[\\/]*)
17422  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17423  ;;
17424  *)
17425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17426for as_dir in $PATH
17427do
17428  IFS=$as_save_IFS
17429  test -z "$as_dir" && as_dir=.
17430    for ac_exec_ext in '' $ac_executable_extensions; do
17431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17432    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17434    break 2
17435  fi
17436done
17437  done
17438IFS=$as_save_IFS
17439
17440  ;;
17441esac
17442fi
17443OTOOL=$ac_cv_path_OTOOL
17444if test -n "$OTOOL"; then
17445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17446$as_echo "$OTOOL" >&6; }
17447else
17448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17449$as_echo "no" >&6; }
17450fi
17451
17452
17453  test -n "$OTOOL" && break
17454done
17455
17456  else
17457    # The variable is set, but is it from the command line or the environment?
17458
17459    # Try to remove the string !OTOOL! from our list.
17460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17462      # If it failed, the variable was not from the command line. Ignore it,
17463      # but warn the user (except for BASH, which is always set by the calling BASH).
17464      if test "xOTOOL" != xBASH; then
17465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17466$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17467      fi
17468      # Try to locate tool using the code snippet
17469      for ac_prog in otool
17470do
17471  # Extract the first word of "$ac_prog", so it can be a program name with args.
17472set dummy $ac_prog; ac_word=$2
17473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17474$as_echo_n "checking for $ac_word... " >&6; }
17475if ${ac_cv_path_OTOOL+:} false; then :
17476  $as_echo_n "(cached) " >&6
17477else
17478  case $OTOOL in
17479  [\\/]* | ?:[\\/]*)
17480  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17481  ;;
17482  *)
17483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17484for as_dir in $PATH
17485do
17486  IFS=$as_save_IFS
17487  test -z "$as_dir" && as_dir=.
17488    for ac_exec_ext in '' $ac_executable_extensions; do
17489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17490    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17492    break 2
17493  fi
17494done
17495  done
17496IFS=$as_save_IFS
17497
17498  ;;
17499esac
17500fi
17501OTOOL=$ac_cv_path_OTOOL
17502if test -n "$OTOOL"; then
17503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17504$as_echo "$OTOOL" >&6; }
17505else
17506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17507$as_echo "no" >&6; }
17508fi
17509
17510
17511  test -n "$OTOOL" && break
17512done
17513
17514    else
17515      # If it succeeded, then it was overridden by the user. We will use it
17516      # for the tool.
17517
17518      # First remove it from the list of overridden variables, so we can test
17519      # for unknown variables in the end.
17520      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17521
17522      # Check if the provided tool contains a complete path.
17523      tool_specified="$OTOOL"
17524      tool_basename="${tool_specified##*/}"
17525      if test "x$tool_basename" = "x$tool_specified"; then
17526        # A command without a complete path is provided, search $PATH.
17527        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17528$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17529        # Extract the first word of "$tool_basename", so it can be a program name with args.
17530set dummy $tool_basename; ac_word=$2
17531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17532$as_echo_n "checking for $ac_word... " >&6; }
17533if ${ac_cv_path_OTOOL+:} false; then :
17534  $as_echo_n "(cached) " >&6
17535else
17536  case $OTOOL in
17537  [\\/]* | ?:[\\/]*)
17538  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17539  ;;
17540  *)
17541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17542for as_dir in $PATH
17543do
17544  IFS=$as_save_IFS
17545  test -z "$as_dir" && as_dir=.
17546    for ac_exec_ext in '' $ac_executable_extensions; do
17547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17548    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17550    break 2
17551  fi
17552done
17553  done
17554IFS=$as_save_IFS
17555
17556  ;;
17557esac
17558fi
17559OTOOL=$ac_cv_path_OTOOL
17560if test -n "$OTOOL"; then
17561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17562$as_echo "$OTOOL" >&6; }
17563else
17564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17565$as_echo "no" >&6; }
17566fi
17567
17568
17569        if test "x$OTOOL" = x; then
17570          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17571        fi
17572      else
17573        # Otherwise we believe it is a complete path. Use it as it is.
17574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17575$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17576        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17577$as_echo_n "checking for OTOOL... " >&6; }
17578        if test ! -x "$tool_specified"; then
17579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17580$as_echo "not found" >&6; }
17581          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17582        fi
17583        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17584$as_echo "$tool_specified" >&6; }
17585      fi
17586    fi
17587  fi
17588
17589
17590  if test "x$OTOOL" = "x"; then
17591    OTOOL="true"
17592  fi
17593
17594
17595  # Publish this variable in the help.
17596
17597
17598  if test "x$READELF" = x; then
17599    # The variable is not set by user, try to locate tool using the code snippet
17600    for ac_prog in greadelf readelf
17601do
17602  # Extract the first word of "$ac_prog", so it can be a program name with args.
17603set dummy $ac_prog; ac_word=$2
17604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17605$as_echo_n "checking for $ac_word... " >&6; }
17606if ${ac_cv_path_READELF+:} false; then :
17607  $as_echo_n "(cached) " >&6
17608else
17609  case $READELF in
17610  [\\/]* | ?:[\\/]*)
17611  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17612  ;;
17613  *)
17614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17615for as_dir in $PATH
17616do
17617  IFS=$as_save_IFS
17618  test -z "$as_dir" && as_dir=.
17619    for ac_exec_ext in '' $ac_executable_extensions; do
17620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17621    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17623    break 2
17624  fi
17625done
17626  done
17627IFS=$as_save_IFS
17628
17629  ;;
17630esac
17631fi
17632READELF=$ac_cv_path_READELF
17633if test -n "$READELF"; then
17634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17635$as_echo "$READELF" >&6; }
17636else
17637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17638$as_echo "no" >&6; }
17639fi
17640
17641
17642  test -n "$READELF" && break
17643done
17644
17645  else
17646    # The variable is set, but is it from the command line or the environment?
17647
17648    # Try to remove the string !READELF! from our list.
17649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17651      # If it failed, the variable was not from the command line. Ignore it,
17652      # but warn the user (except for BASH, which is always set by the calling BASH).
17653      if test "xREADELF" != xBASH; then
17654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17655$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17656      fi
17657      # Try to locate tool using the code snippet
17658      for ac_prog in greadelf readelf
17659do
17660  # Extract the first word of "$ac_prog", so it can be a program name with args.
17661set dummy $ac_prog; ac_word=$2
17662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17663$as_echo_n "checking for $ac_word... " >&6; }
17664if ${ac_cv_path_READELF+:} false; then :
17665  $as_echo_n "(cached) " >&6
17666else
17667  case $READELF in
17668  [\\/]* | ?:[\\/]*)
17669  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17670  ;;
17671  *)
17672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17673for as_dir in $PATH
17674do
17675  IFS=$as_save_IFS
17676  test -z "$as_dir" && as_dir=.
17677    for ac_exec_ext in '' $ac_executable_extensions; do
17678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17679    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17681    break 2
17682  fi
17683done
17684  done
17685IFS=$as_save_IFS
17686
17687  ;;
17688esac
17689fi
17690READELF=$ac_cv_path_READELF
17691if test -n "$READELF"; then
17692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17693$as_echo "$READELF" >&6; }
17694else
17695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17696$as_echo "no" >&6; }
17697fi
17698
17699
17700  test -n "$READELF" && break
17701done
17702
17703    else
17704      # If it succeeded, then it was overridden by the user. We will use it
17705      # for the tool.
17706
17707      # First remove it from the list of overridden variables, so we can test
17708      # for unknown variables in the end.
17709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17710
17711      # Check if the provided tool contains a complete path.
17712      tool_specified="$READELF"
17713      tool_basename="${tool_specified##*/}"
17714      if test "x$tool_basename" = "x$tool_specified"; then
17715        # A command without a complete path is provided, search $PATH.
17716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17717$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17718        # Extract the first word of "$tool_basename", so it can be a program name with args.
17719set dummy $tool_basename; ac_word=$2
17720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17721$as_echo_n "checking for $ac_word... " >&6; }
17722if ${ac_cv_path_READELF+:} false; then :
17723  $as_echo_n "(cached) " >&6
17724else
17725  case $READELF in
17726  [\\/]* | ?:[\\/]*)
17727  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17728  ;;
17729  *)
17730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17731for as_dir in $PATH
17732do
17733  IFS=$as_save_IFS
17734  test -z "$as_dir" && as_dir=.
17735    for ac_exec_ext in '' $ac_executable_extensions; do
17736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17737    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17739    break 2
17740  fi
17741done
17742  done
17743IFS=$as_save_IFS
17744
17745  ;;
17746esac
17747fi
17748READELF=$ac_cv_path_READELF
17749if test -n "$READELF"; then
17750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17751$as_echo "$READELF" >&6; }
17752else
17753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17754$as_echo "no" >&6; }
17755fi
17756
17757
17758        if test "x$READELF" = x; then
17759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17760        fi
17761      else
17762        # Otherwise we believe it is a complete path. Use it as it is.
17763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17764$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
17765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
17766$as_echo_n "checking for READELF... " >&6; }
17767        if test ! -x "$tool_specified"; then
17768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17769$as_echo "not found" >&6; }
17770          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
17771        fi
17772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17773$as_echo "$tool_specified" >&6; }
17774      fi
17775    fi
17776  fi
17777
17778
17779
17780
17781  # Publish this variable in the help.
17782
17783
17784  if test "x$HG" = x; then
17785    # The variable is not set by user, try to locate tool using the code snippet
17786    for ac_prog in hg
17787do
17788  # Extract the first word of "$ac_prog", so it can be a program name with args.
17789set dummy $ac_prog; ac_word=$2
17790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17791$as_echo_n "checking for $ac_word... " >&6; }
17792if ${ac_cv_path_HG+:} false; then :
17793  $as_echo_n "(cached) " >&6
17794else
17795  case $HG in
17796  [\\/]* | ?:[\\/]*)
17797  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17798  ;;
17799  *)
17800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17801for as_dir in $PATH
17802do
17803  IFS=$as_save_IFS
17804  test -z "$as_dir" && as_dir=.
17805    for ac_exec_ext in '' $ac_executable_extensions; do
17806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17807    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17809    break 2
17810  fi
17811done
17812  done
17813IFS=$as_save_IFS
17814
17815  ;;
17816esac
17817fi
17818HG=$ac_cv_path_HG
17819if test -n "$HG"; then
17820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17821$as_echo "$HG" >&6; }
17822else
17823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17824$as_echo "no" >&6; }
17825fi
17826
17827
17828  test -n "$HG" && break
17829done
17830
17831  else
17832    # The variable is set, but is it from the command line or the environment?
17833
17834    # Try to remove the string !HG! from our list.
17835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
17836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17837      # If it failed, the variable was not from the command line. Ignore it,
17838      # but warn the user (except for BASH, which is always set by the calling BASH).
17839      if test "xHG" != xBASH; then
17840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
17841$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
17842      fi
17843      # Try to locate tool using the code snippet
17844      for ac_prog in hg
17845do
17846  # Extract the first word of "$ac_prog", so it can be a program name with args.
17847set dummy $ac_prog; ac_word=$2
17848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17849$as_echo_n "checking for $ac_word... " >&6; }
17850if ${ac_cv_path_HG+:} false; then :
17851  $as_echo_n "(cached) " >&6
17852else
17853  case $HG in
17854  [\\/]* | ?:[\\/]*)
17855  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17856  ;;
17857  *)
17858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17859for as_dir in $PATH
17860do
17861  IFS=$as_save_IFS
17862  test -z "$as_dir" && as_dir=.
17863    for ac_exec_ext in '' $ac_executable_extensions; do
17864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17865    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17867    break 2
17868  fi
17869done
17870  done
17871IFS=$as_save_IFS
17872
17873  ;;
17874esac
17875fi
17876HG=$ac_cv_path_HG
17877if test -n "$HG"; then
17878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17879$as_echo "$HG" >&6; }
17880else
17881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17882$as_echo "no" >&6; }
17883fi
17884
17885
17886  test -n "$HG" && break
17887done
17888
17889    else
17890      # If it succeeded, then it was overridden by the user. We will use it
17891      # for the tool.
17892
17893      # First remove it from the list of overridden variables, so we can test
17894      # for unknown variables in the end.
17895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17896
17897      # Check if the provided tool contains a complete path.
17898      tool_specified="$HG"
17899      tool_basename="${tool_specified##*/}"
17900      if test "x$tool_basename" = "x$tool_specified"; then
17901        # A command without a complete path is provided, search $PATH.
17902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
17903$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
17904        # Extract the first word of "$tool_basename", so it can be a program name with args.
17905set dummy $tool_basename; ac_word=$2
17906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17907$as_echo_n "checking for $ac_word... " >&6; }
17908if ${ac_cv_path_HG+:} false; then :
17909  $as_echo_n "(cached) " >&6
17910else
17911  case $HG in
17912  [\\/]* | ?:[\\/]*)
17913  ac_cv_path_HG="$HG" # Let the user override the test with a path.
17914  ;;
17915  *)
17916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17917for as_dir in $PATH
17918do
17919  IFS=$as_save_IFS
17920  test -z "$as_dir" && as_dir=.
17921    for ac_exec_ext in '' $ac_executable_extensions; do
17922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17923    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
17924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17925    break 2
17926  fi
17927done
17928  done
17929IFS=$as_save_IFS
17930
17931  ;;
17932esac
17933fi
17934HG=$ac_cv_path_HG
17935if test -n "$HG"; then
17936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
17937$as_echo "$HG" >&6; }
17938else
17939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17940$as_echo "no" >&6; }
17941fi
17942
17943
17944        if test "x$HG" = x; then
17945          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17946        fi
17947      else
17948        # Otherwise we believe it is a complete path. Use it as it is.
17949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
17950$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
17951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
17952$as_echo_n "checking for HG... " >&6; }
17953        if test ! -x "$tool_specified"; then
17954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17955$as_echo "not found" >&6; }
17956          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
17957        fi
17958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17959$as_echo "$tool_specified" >&6; }
17960      fi
17961    fi
17962  fi
17963
17964
17965
17966
17967  # Publish this variable in the help.
17968
17969
17970  if test "x$STAT" = x; then
17971    # The variable is not set by user, try to locate tool using the code snippet
17972    for ac_prog in stat
17973do
17974  # Extract the first word of "$ac_prog", so it can be a program name with args.
17975set dummy $ac_prog; ac_word=$2
17976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17977$as_echo_n "checking for $ac_word... " >&6; }
17978if ${ac_cv_path_STAT+:} false; then :
17979  $as_echo_n "(cached) " >&6
17980else
17981  case $STAT in
17982  [\\/]* | ?:[\\/]*)
17983  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
17984  ;;
17985  *)
17986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17987for as_dir in $PATH
17988do
17989  IFS=$as_save_IFS
17990  test -z "$as_dir" && as_dir=.
17991    for ac_exec_ext in '' $ac_executable_extensions; do
17992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17993    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
17994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17995    break 2
17996  fi
17997done
17998  done
17999IFS=$as_save_IFS
18000
18001  ;;
18002esac
18003fi
18004STAT=$ac_cv_path_STAT
18005if test -n "$STAT"; then
18006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18007$as_echo "$STAT" >&6; }
18008else
18009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18010$as_echo "no" >&6; }
18011fi
18012
18013
18014  test -n "$STAT" && break
18015done
18016
18017  else
18018    # The variable is set, but is it from the command line or the environment?
18019
18020    # Try to remove the string !STAT! from our list.
18021    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18022    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18023      # If it failed, the variable was not from the command line. Ignore it,
18024      # but warn the user (except for BASH, which is always set by the calling BASH).
18025      if test "xSTAT" != xBASH; then
18026        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18027$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18028      fi
18029      # Try to locate tool using the code snippet
18030      for ac_prog in stat
18031do
18032  # Extract the first word of "$ac_prog", so it can be a program name with args.
18033set dummy $ac_prog; ac_word=$2
18034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18035$as_echo_n "checking for $ac_word... " >&6; }
18036if ${ac_cv_path_STAT+:} false; then :
18037  $as_echo_n "(cached) " >&6
18038else
18039  case $STAT in
18040  [\\/]* | ?:[\\/]*)
18041  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18042  ;;
18043  *)
18044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18045for as_dir in $PATH
18046do
18047  IFS=$as_save_IFS
18048  test -z "$as_dir" && as_dir=.
18049    for ac_exec_ext in '' $ac_executable_extensions; do
18050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18051    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18053    break 2
18054  fi
18055done
18056  done
18057IFS=$as_save_IFS
18058
18059  ;;
18060esac
18061fi
18062STAT=$ac_cv_path_STAT
18063if test -n "$STAT"; then
18064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18065$as_echo "$STAT" >&6; }
18066else
18067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18068$as_echo "no" >&6; }
18069fi
18070
18071
18072  test -n "$STAT" && break
18073done
18074
18075    else
18076      # If it succeeded, then it was overridden by the user. We will use it
18077      # for the tool.
18078
18079      # First remove it from the list of overridden variables, so we can test
18080      # for unknown variables in the end.
18081      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18082
18083      # Check if the provided tool contains a complete path.
18084      tool_specified="$STAT"
18085      tool_basename="${tool_specified##*/}"
18086      if test "x$tool_basename" = "x$tool_specified"; then
18087        # A command without a complete path is provided, search $PATH.
18088        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18089$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18090        # Extract the first word of "$tool_basename", so it can be a program name with args.
18091set dummy $tool_basename; ac_word=$2
18092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18093$as_echo_n "checking for $ac_word... " >&6; }
18094if ${ac_cv_path_STAT+:} false; then :
18095  $as_echo_n "(cached) " >&6
18096else
18097  case $STAT in
18098  [\\/]* | ?:[\\/]*)
18099  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18100  ;;
18101  *)
18102  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18103for as_dir in $PATH
18104do
18105  IFS=$as_save_IFS
18106  test -z "$as_dir" && as_dir=.
18107    for ac_exec_ext in '' $ac_executable_extensions; do
18108  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18109    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18110    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18111    break 2
18112  fi
18113done
18114  done
18115IFS=$as_save_IFS
18116
18117  ;;
18118esac
18119fi
18120STAT=$ac_cv_path_STAT
18121if test -n "$STAT"; then
18122  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18123$as_echo "$STAT" >&6; }
18124else
18125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18126$as_echo "no" >&6; }
18127fi
18128
18129
18130        if test "x$STAT" = x; then
18131          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18132        fi
18133      else
18134        # Otherwise we believe it is a complete path. Use it as it is.
18135        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18136$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18138$as_echo_n "checking for STAT... " >&6; }
18139        if test ! -x "$tool_specified"; then
18140          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18141$as_echo "not found" >&6; }
18142          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18143        fi
18144        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18145$as_echo "$tool_specified" >&6; }
18146      fi
18147    fi
18148  fi
18149
18150
18151
18152
18153  # Publish this variable in the help.
18154
18155
18156  if test "x$TIME" = x; then
18157    # The variable is not set by user, try to locate tool using the code snippet
18158    for ac_prog in time
18159do
18160  # Extract the first word of "$ac_prog", so it can be a program name with args.
18161set dummy $ac_prog; ac_word=$2
18162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18163$as_echo_n "checking for $ac_word... " >&6; }
18164if ${ac_cv_path_TIME+:} false; then :
18165  $as_echo_n "(cached) " >&6
18166else
18167  case $TIME in
18168  [\\/]* | ?:[\\/]*)
18169  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18170  ;;
18171  *)
18172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18173for as_dir in $PATH
18174do
18175  IFS=$as_save_IFS
18176  test -z "$as_dir" && as_dir=.
18177    for ac_exec_ext in '' $ac_executable_extensions; do
18178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18179    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18181    break 2
18182  fi
18183done
18184  done
18185IFS=$as_save_IFS
18186
18187  ;;
18188esac
18189fi
18190TIME=$ac_cv_path_TIME
18191if test -n "$TIME"; then
18192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18193$as_echo "$TIME" >&6; }
18194else
18195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18196$as_echo "no" >&6; }
18197fi
18198
18199
18200  test -n "$TIME" && break
18201done
18202
18203  else
18204    # The variable is set, but is it from the command line or the environment?
18205
18206    # Try to remove the string !TIME! from our list.
18207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18209      # If it failed, the variable was not from the command line. Ignore it,
18210      # but warn the user (except for BASH, which is always set by the calling BASH).
18211      if test "xTIME" != xBASH; then
18212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18213$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18214      fi
18215      # Try to locate tool using the code snippet
18216      for ac_prog in time
18217do
18218  # Extract the first word of "$ac_prog", so it can be a program name with args.
18219set dummy $ac_prog; ac_word=$2
18220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18221$as_echo_n "checking for $ac_word... " >&6; }
18222if ${ac_cv_path_TIME+:} false; then :
18223  $as_echo_n "(cached) " >&6
18224else
18225  case $TIME in
18226  [\\/]* | ?:[\\/]*)
18227  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18228  ;;
18229  *)
18230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18231for as_dir in $PATH
18232do
18233  IFS=$as_save_IFS
18234  test -z "$as_dir" && as_dir=.
18235    for ac_exec_ext in '' $ac_executable_extensions; do
18236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18237    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18239    break 2
18240  fi
18241done
18242  done
18243IFS=$as_save_IFS
18244
18245  ;;
18246esac
18247fi
18248TIME=$ac_cv_path_TIME
18249if test -n "$TIME"; then
18250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18251$as_echo "$TIME" >&6; }
18252else
18253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18254$as_echo "no" >&6; }
18255fi
18256
18257
18258  test -n "$TIME" && break
18259done
18260
18261    else
18262      # If it succeeded, then it was overridden by the user. We will use it
18263      # for the tool.
18264
18265      # First remove it from the list of overridden variables, so we can test
18266      # for unknown variables in the end.
18267      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18268
18269      # Check if the provided tool contains a complete path.
18270      tool_specified="$TIME"
18271      tool_basename="${tool_specified##*/}"
18272      if test "x$tool_basename" = "x$tool_specified"; then
18273        # A command without a complete path is provided, search $PATH.
18274        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18275$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18276        # Extract the first word of "$tool_basename", so it can be a program name with args.
18277set dummy $tool_basename; ac_word=$2
18278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18279$as_echo_n "checking for $ac_word... " >&6; }
18280if ${ac_cv_path_TIME+:} false; then :
18281  $as_echo_n "(cached) " >&6
18282else
18283  case $TIME in
18284  [\\/]* | ?:[\\/]*)
18285  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18286  ;;
18287  *)
18288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18289for as_dir in $PATH
18290do
18291  IFS=$as_save_IFS
18292  test -z "$as_dir" && as_dir=.
18293    for ac_exec_ext in '' $ac_executable_extensions; do
18294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18295    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18297    break 2
18298  fi
18299done
18300  done
18301IFS=$as_save_IFS
18302
18303  ;;
18304esac
18305fi
18306TIME=$ac_cv_path_TIME
18307if test -n "$TIME"; then
18308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18309$as_echo "$TIME" >&6; }
18310else
18311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18312$as_echo "no" >&6; }
18313fi
18314
18315
18316        if test "x$TIME" = x; then
18317          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18318        fi
18319      else
18320        # Otherwise we believe it is a complete path. Use it as it is.
18321        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18322$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18323        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18324$as_echo_n "checking for TIME... " >&6; }
18325        if test ! -x "$tool_specified"; then
18326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18327$as_echo "not found" >&6; }
18328          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18329        fi
18330        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18331$as_echo "$tool_specified" >&6; }
18332      fi
18333    fi
18334  fi
18335
18336
18337  # Check if it's GNU time
18338  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18339  if test "x$IS_GNU_TIME" != x; then
18340    IS_GNU_TIME=yes
18341  else
18342    IS_GNU_TIME=no
18343  fi
18344
18345
18346  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18347
18348
18349
18350  # Publish this variable in the help.
18351
18352
18353  if test "x$COMM" = x; then
18354    # The variable is not set by user, try to locate tool using the code snippet
18355    for ac_prog in comm
18356do
18357  # Extract the first word of "$ac_prog", so it can be a program name with args.
18358set dummy $ac_prog; ac_word=$2
18359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18360$as_echo_n "checking for $ac_word... " >&6; }
18361if ${ac_cv_path_COMM+:} false; then :
18362  $as_echo_n "(cached) " >&6
18363else
18364  case $COMM in
18365  [\\/]* | ?:[\\/]*)
18366  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18367  ;;
18368  *)
18369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18370for as_dir in $PATH
18371do
18372  IFS=$as_save_IFS
18373  test -z "$as_dir" && as_dir=.
18374    for ac_exec_ext in '' $ac_executable_extensions; do
18375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18376    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18378    break 2
18379  fi
18380done
18381  done
18382IFS=$as_save_IFS
18383
18384  ;;
18385esac
18386fi
18387COMM=$ac_cv_path_COMM
18388if test -n "$COMM"; then
18389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18390$as_echo "$COMM" >&6; }
18391else
18392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18393$as_echo "no" >&6; }
18394fi
18395
18396
18397  test -n "$COMM" && break
18398done
18399
18400  else
18401    # The variable is set, but is it from the command line or the environment?
18402
18403    # Try to remove the string !COMM! from our list.
18404    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18405    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18406      # If it failed, the variable was not from the command line. Ignore it,
18407      # but warn the user (except for BASH, which is always set by the calling BASH).
18408      if test "xCOMM" != xBASH; then
18409        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18410$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18411      fi
18412      # Try to locate tool using the code snippet
18413      for ac_prog in comm
18414do
18415  # Extract the first word of "$ac_prog", so it can be a program name with args.
18416set dummy $ac_prog; ac_word=$2
18417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18418$as_echo_n "checking for $ac_word... " >&6; }
18419if ${ac_cv_path_COMM+:} false; then :
18420  $as_echo_n "(cached) " >&6
18421else
18422  case $COMM in
18423  [\\/]* | ?:[\\/]*)
18424  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18425  ;;
18426  *)
18427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18428for as_dir in $PATH
18429do
18430  IFS=$as_save_IFS
18431  test -z "$as_dir" && as_dir=.
18432    for ac_exec_ext in '' $ac_executable_extensions; do
18433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18434    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18436    break 2
18437  fi
18438done
18439  done
18440IFS=$as_save_IFS
18441
18442  ;;
18443esac
18444fi
18445COMM=$ac_cv_path_COMM
18446if test -n "$COMM"; then
18447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18448$as_echo "$COMM" >&6; }
18449else
18450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18451$as_echo "no" >&6; }
18452fi
18453
18454
18455  test -n "$COMM" && break
18456done
18457
18458    else
18459      # If it succeeded, then it was overridden by the user. We will use it
18460      # for the tool.
18461
18462      # First remove it from the list of overridden variables, so we can test
18463      # for unknown variables in the end.
18464      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18465
18466      # Check if the provided tool contains a complete path.
18467      tool_specified="$COMM"
18468      tool_basename="${tool_specified##*/}"
18469      if test "x$tool_basename" = "x$tool_specified"; then
18470        # A command without a complete path is provided, search $PATH.
18471        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18472$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18473        # Extract the first word of "$tool_basename", so it can be a program name with args.
18474set dummy $tool_basename; ac_word=$2
18475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18476$as_echo_n "checking for $ac_word... " >&6; }
18477if ${ac_cv_path_COMM+:} false; then :
18478  $as_echo_n "(cached) " >&6
18479else
18480  case $COMM in
18481  [\\/]* | ?:[\\/]*)
18482  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18483  ;;
18484  *)
18485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18486for as_dir in $PATH
18487do
18488  IFS=$as_save_IFS
18489  test -z "$as_dir" && as_dir=.
18490    for ac_exec_ext in '' $ac_executable_extensions; do
18491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18492    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18494    break 2
18495  fi
18496done
18497  done
18498IFS=$as_save_IFS
18499
18500  ;;
18501esac
18502fi
18503COMM=$ac_cv_path_COMM
18504if test -n "$COMM"; then
18505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18506$as_echo "$COMM" >&6; }
18507else
18508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18509$as_echo "no" >&6; }
18510fi
18511
18512
18513        if test "x$COMM" = x; then
18514          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18515        fi
18516      else
18517        # Otherwise we believe it is a complete path. Use it as it is.
18518        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18519$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18520        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18521$as_echo_n "checking for COMM... " >&6; }
18522        if test ! -x "$tool_specified"; then
18523          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18524$as_echo "not found" >&6; }
18525          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18526        fi
18527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18528$as_echo "$tool_specified" >&6; }
18529      fi
18530    fi
18531  fi
18532
18533
18534
18535  if test "x$COMM" = x; then
18536    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18537  fi
18538
18539
18540  fi
18541
18542  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18543
18544
18545
18546  # Publish this variable in the help.
18547
18548
18549  if test "x$DSYMUTIL" = x; then
18550    # The variable is not set by user, try to locate tool using the code snippet
18551    for ac_prog in dsymutil
18552do
18553  # Extract the first word of "$ac_prog", so it can be a program name with args.
18554set dummy $ac_prog; ac_word=$2
18555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18556$as_echo_n "checking for $ac_word... " >&6; }
18557if ${ac_cv_path_DSYMUTIL+:} false; then :
18558  $as_echo_n "(cached) " >&6
18559else
18560  case $DSYMUTIL in
18561  [\\/]* | ?:[\\/]*)
18562  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18563  ;;
18564  *)
18565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18566for as_dir in $PATH
18567do
18568  IFS=$as_save_IFS
18569  test -z "$as_dir" && as_dir=.
18570    for ac_exec_ext in '' $ac_executable_extensions; do
18571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18572    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18574    break 2
18575  fi
18576done
18577  done
18578IFS=$as_save_IFS
18579
18580  ;;
18581esac
18582fi
18583DSYMUTIL=$ac_cv_path_DSYMUTIL
18584if test -n "$DSYMUTIL"; then
18585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18586$as_echo "$DSYMUTIL" >&6; }
18587else
18588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18589$as_echo "no" >&6; }
18590fi
18591
18592
18593  test -n "$DSYMUTIL" && break
18594done
18595
18596  else
18597    # The variable is set, but is it from the command line or the environment?
18598
18599    # Try to remove the string !DSYMUTIL! from our list.
18600    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18601    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18602      # If it failed, the variable was not from the command line. Ignore it,
18603      # but warn the user (except for BASH, which is always set by the calling BASH).
18604      if test "xDSYMUTIL" != xBASH; then
18605        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18606$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18607      fi
18608      # Try to locate tool using the code snippet
18609      for ac_prog in dsymutil
18610do
18611  # Extract the first word of "$ac_prog", so it can be a program name with args.
18612set dummy $ac_prog; ac_word=$2
18613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18614$as_echo_n "checking for $ac_word... " >&6; }
18615if ${ac_cv_path_DSYMUTIL+:} false; then :
18616  $as_echo_n "(cached) " >&6
18617else
18618  case $DSYMUTIL in
18619  [\\/]* | ?:[\\/]*)
18620  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18621  ;;
18622  *)
18623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18624for as_dir in $PATH
18625do
18626  IFS=$as_save_IFS
18627  test -z "$as_dir" && as_dir=.
18628    for ac_exec_ext in '' $ac_executable_extensions; do
18629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18630    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18632    break 2
18633  fi
18634done
18635  done
18636IFS=$as_save_IFS
18637
18638  ;;
18639esac
18640fi
18641DSYMUTIL=$ac_cv_path_DSYMUTIL
18642if test -n "$DSYMUTIL"; then
18643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18644$as_echo "$DSYMUTIL" >&6; }
18645else
18646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18647$as_echo "no" >&6; }
18648fi
18649
18650
18651  test -n "$DSYMUTIL" && break
18652done
18653
18654    else
18655      # If it succeeded, then it was overridden by the user. We will use it
18656      # for the tool.
18657
18658      # First remove it from the list of overridden variables, so we can test
18659      # for unknown variables in the end.
18660      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18661
18662      # Check if the provided tool contains a complete path.
18663      tool_specified="$DSYMUTIL"
18664      tool_basename="${tool_specified##*/}"
18665      if test "x$tool_basename" = "x$tool_specified"; then
18666        # A command without a complete path is provided, search $PATH.
18667        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18668$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18669        # Extract the first word of "$tool_basename", so it can be a program name with args.
18670set dummy $tool_basename; ac_word=$2
18671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18672$as_echo_n "checking for $ac_word... " >&6; }
18673if ${ac_cv_path_DSYMUTIL+:} false; then :
18674  $as_echo_n "(cached) " >&6
18675else
18676  case $DSYMUTIL in
18677  [\\/]* | ?:[\\/]*)
18678  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18679  ;;
18680  *)
18681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18682for as_dir in $PATH
18683do
18684  IFS=$as_save_IFS
18685  test -z "$as_dir" && as_dir=.
18686    for ac_exec_ext in '' $ac_executable_extensions; do
18687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18688    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18690    break 2
18691  fi
18692done
18693  done
18694IFS=$as_save_IFS
18695
18696  ;;
18697esac
18698fi
18699DSYMUTIL=$ac_cv_path_DSYMUTIL
18700if test -n "$DSYMUTIL"; then
18701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18702$as_echo "$DSYMUTIL" >&6; }
18703else
18704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18705$as_echo "no" >&6; }
18706fi
18707
18708
18709        if test "x$DSYMUTIL" = x; then
18710          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18711        fi
18712      else
18713        # Otherwise we believe it is a complete path. Use it as it is.
18714        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18715$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18716        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18717$as_echo_n "checking for DSYMUTIL... " >&6; }
18718        if test ! -x "$tool_specified"; then
18719          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18720$as_echo "not found" >&6; }
18721          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18722        fi
18723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18724$as_echo "$tool_specified" >&6; }
18725      fi
18726    fi
18727  fi
18728
18729
18730
18731  if test "x$DSYMUTIL" = x; then
18732    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18733  fi
18734
18735
18736
18737
18738
18739  # Publish this variable in the help.
18740
18741
18742  if test "x$XATTR" = x; then
18743    # The variable is not set by user, try to locate tool using the code snippet
18744    for ac_prog in xattr
18745do
18746  # Extract the first word of "$ac_prog", so it can be a program name with args.
18747set dummy $ac_prog; ac_word=$2
18748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18749$as_echo_n "checking for $ac_word... " >&6; }
18750if ${ac_cv_path_XATTR+:} false; then :
18751  $as_echo_n "(cached) " >&6
18752else
18753  case $XATTR in
18754  [\\/]* | ?:[\\/]*)
18755  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18756  ;;
18757  *)
18758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18759for as_dir in $PATH
18760do
18761  IFS=$as_save_IFS
18762  test -z "$as_dir" && as_dir=.
18763    for ac_exec_ext in '' $ac_executable_extensions; do
18764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18765    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18767    break 2
18768  fi
18769done
18770  done
18771IFS=$as_save_IFS
18772
18773  ;;
18774esac
18775fi
18776XATTR=$ac_cv_path_XATTR
18777if test -n "$XATTR"; then
18778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18779$as_echo "$XATTR" >&6; }
18780else
18781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18782$as_echo "no" >&6; }
18783fi
18784
18785
18786  test -n "$XATTR" && break
18787done
18788
18789  else
18790    # The variable is set, but is it from the command line or the environment?
18791
18792    # Try to remove the string !XATTR! from our list.
18793    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
18794    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18795      # If it failed, the variable was not from the command line. Ignore it,
18796      # but warn the user (except for BASH, which is always set by the calling BASH).
18797      if test "xXATTR" != xBASH; then
18798        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
18799$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
18800      fi
18801      # Try to locate tool using the code snippet
18802      for ac_prog in xattr
18803do
18804  # Extract the first word of "$ac_prog", so it can be a program name with args.
18805set dummy $ac_prog; ac_word=$2
18806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18807$as_echo_n "checking for $ac_word... " >&6; }
18808if ${ac_cv_path_XATTR+:} false; then :
18809  $as_echo_n "(cached) " >&6
18810else
18811  case $XATTR in
18812  [\\/]* | ?:[\\/]*)
18813  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18814  ;;
18815  *)
18816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18817for as_dir in $PATH
18818do
18819  IFS=$as_save_IFS
18820  test -z "$as_dir" && as_dir=.
18821    for ac_exec_ext in '' $ac_executable_extensions; do
18822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18823    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18825    break 2
18826  fi
18827done
18828  done
18829IFS=$as_save_IFS
18830
18831  ;;
18832esac
18833fi
18834XATTR=$ac_cv_path_XATTR
18835if test -n "$XATTR"; then
18836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18837$as_echo "$XATTR" >&6; }
18838else
18839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18840$as_echo "no" >&6; }
18841fi
18842
18843
18844  test -n "$XATTR" && break
18845done
18846
18847    else
18848      # If it succeeded, then it was overridden by the user. We will use it
18849      # for the tool.
18850
18851      # First remove it from the list of overridden variables, so we can test
18852      # for unknown variables in the end.
18853      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18854
18855      # Check if the provided tool contains a complete path.
18856      tool_specified="$XATTR"
18857      tool_basename="${tool_specified##*/}"
18858      if test "x$tool_basename" = "x$tool_specified"; then
18859        # A command without a complete path is provided, search $PATH.
18860        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
18861$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
18862        # Extract the first word of "$tool_basename", so it can be a program name with args.
18863set dummy $tool_basename; ac_word=$2
18864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18865$as_echo_n "checking for $ac_word... " >&6; }
18866if ${ac_cv_path_XATTR+:} false; then :
18867  $as_echo_n "(cached) " >&6
18868else
18869  case $XATTR in
18870  [\\/]* | ?:[\\/]*)
18871  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18872  ;;
18873  *)
18874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18875for as_dir in $PATH
18876do
18877  IFS=$as_save_IFS
18878  test -z "$as_dir" && as_dir=.
18879    for ac_exec_ext in '' $ac_executable_extensions; do
18880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18881    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
18882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18883    break 2
18884  fi
18885done
18886  done
18887IFS=$as_save_IFS
18888
18889  ;;
18890esac
18891fi
18892XATTR=$ac_cv_path_XATTR
18893if test -n "$XATTR"; then
18894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
18895$as_echo "$XATTR" >&6; }
18896else
18897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18898$as_echo "no" >&6; }
18899fi
18900
18901
18902        if test "x$XATTR" = x; then
18903          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18904        fi
18905      else
18906        # Otherwise we believe it is a complete path. Use it as it is.
18907        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
18908$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
18909        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
18910$as_echo_n "checking for XATTR... " >&6; }
18911        if test ! -x "$tool_specified"; then
18912          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18913$as_echo "not found" >&6; }
18914          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
18915        fi
18916        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18917$as_echo "$tool_specified" >&6; }
18918      fi
18919    fi
18920  fi
18921
18922
18923
18924  if test "x$XATTR" = x; then
18925    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
18926  fi
18927
18928
18929
18930
18931  # Publish this variable in the help.
18932
18933
18934  if test "x$CODESIGN" = x; then
18935    # The variable is not set by user, try to locate tool using the code snippet
18936    for ac_prog in codesign
18937do
18938  # Extract the first word of "$ac_prog", so it can be a program name with args.
18939set dummy $ac_prog; ac_word=$2
18940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18941$as_echo_n "checking for $ac_word... " >&6; }
18942if ${ac_cv_path_CODESIGN+:} false; then :
18943  $as_echo_n "(cached) " >&6
18944else
18945  case $CODESIGN in
18946  [\\/]* | ?:[\\/]*)
18947  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
18948  ;;
18949  *)
18950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18951for as_dir in $PATH
18952do
18953  IFS=$as_save_IFS
18954  test -z "$as_dir" && as_dir=.
18955    for ac_exec_ext in '' $ac_executable_extensions; do
18956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18957    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
18958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18959    break 2
18960  fi
18961done
18962  done
18963IFS=$as_save_IFS
18964
18965  ;;
18966esac
18967fi
18968CODESIGN=$ac_cv_path_CODESIGN
18969if test -n "$CODESIGN"; then
18970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
18971$as_echo "$CODESIGN" >&6; }
18972else
18973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18974$as_echo "no" >&6; }
18975fi
18976
18977
18978  test -n "$CODESIGN" && break
18979done
18980
18981  else
18982    # The variable is set, but is it from the command line or the environment?
18983
18984    # Try to remove the string !CODESIGN! from our list.
18985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
18986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18987      # If it failed, the variable was not from the command line. Ignore it,
18988      # but warn the user (except for BASH, which is always set by the calling BASH).
18989      if test "xCODESIGN" != xBASH; then
18990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
18991$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
18992      fi
18993      # Try to locate tool using the code snippet
18994      for ac_prog in codesign
18995do
18996  # Extract the first word of "$ac_prog", so it can be a program name with args.
18997set dummy $ac_prog; ac_word=$2
18998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18999$as_echo_n "checking for $ac_word... " >&6; }
19000if ${ac_cv_path_CODESIGN+:} false; then :
19001  $as_echo_n "(cached) " >&6
19002else
19003  case $CODESIGN in
19004  [\\/]* | ?:[\\/]*)
19005  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19006  ;;
19007  *)
19008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19009for as_dir in $PATH
19010do
19011  IFS=$as_save_IFS
19012  test -z "$as_dir" && as_dir=.
19013    for ac_exec_ext in '' $ac_executable_extensions; do
19014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19015    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19017    break 2
19018  fi
19019done
19020  done
19021IFS=$as_save_IFS
19022
19023  ;;
19024esac
19025fi
19026CODESIGN=$ac_cv_path_CODESIGN
19027if test -n "$CODESIGN"; then
19028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19029$as_echo "$CODESIGN" >&6; }
19030else
19031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19032$as_echo "no" >&6; }
19033fi
19034
19035
19036  test -n "$CODESIGN" && break
19037done
19038
19039    else
19040      # If it succeeded, then it was overridden by the user. We will use it
19041      # for the tool.
19042
19043      # First remove it from the list of overridden variables, so we can test
19044      # for unknown variables in the end.
19045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19046
19047      # Check if the provided tool contains a complete path.
19048      tool_specified="$CODESIGN"
19049      tool_basename="${tool_specified##*/}"
19050      if test "x$tool_basename" = "x$tool_specified"; then
19051        # A command without a complete path is provided, search $PATH.
19052        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19053$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19054        # Extract the first word of "$tool_basename", so it can be a program name with args.
19055set dummy $tool_basename; ac_word=$2
19056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19057$as_echo_n "checking for $ac_word... " >&6; }
19058if ${ac_cv_path_CODESIGN+:} false; then :
19059  $as_echo_n "(cached) " >&6
19060else
19061  case $CODESIGN in
19062  [\\/]* | ?:[\\/]*)
19063  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19064  ;;
19065  *)
19066  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19067for as_dir in $PATH
19068do
19069  IFS=$as_save_IFS
19070  test -z "$as_dir" && as_dir=.
19071    for ac_exec_ext in '' $ac_executable_extensions; do
19072  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19073    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19074    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19075    break 2
19076  fi
19077done
19078  done
19079IFS=$as_save_IFS
19080
19081  ;;
19082esac
19083fi
19084CODESIGN=$ac_cv_path_CODESIGN
19085if test -n "$CODESIGN"; then
19086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19087$as_echo "$CODESIGN" >&6; }
19088else
19089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19090$as_echo "no" >&6; }
19091fi
19092
19093
19094        if test "x$CODESIGN" = x; then
19095          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19096        fi
19097      else
19098        # Otherwise we believe it is a complete path. Use it as it is.
19099        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19100$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19101        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19102$as_echo_n "checking for CODESIGN... " >&6; }
19103        if test ! -x "$tool_specified"; then
19104          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19105$as_echo "not found" >&6; }
19106          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19107        fi
19108        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19109$as_echo "$tool_specified" >&6; }
19110      fi
19111    fi
19112  fi
19113
19114
19115    if test "x$CODESIGN" != "x"; then
19116      # Verify that the openjdk_codesign certificate is present
19117      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19118$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19119      rm -f codesign-testfile
19120      touch codesign-testfile
19121      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19122      rm -f codesign-testfile
19123      if test "x$CODESIGN" = x; then
19124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19125$as_echo "no" >&6; }
19126      else
19127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19128$as_echo "yes" >&6; }
19129      fi
19130    fi
19131  fi
19132
19133
19134# Check if pkg-config is available.
19135
19136
19137if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19138	if test -n "$ac_tool_prefix"; then
19139  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19140set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19142$as_echo_n "checking for $ac_word... " >&6; }
19143if ${ac_cv_path_PKG_CONFIG+:} false; then :
19144  $as_echo_n "(cached) " >&6
19145else
19146  case $PKG_CONFIG in
19147  [\\/]* | ?:[\\/]*)
19148  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19149  ;;
19150  *)
19151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19152for as_dir in $PATH
19153do
19154  IFS=$as_save_IFS
19155  test -z "$as_dir" && as_dir=.
19156    for ac_exec_ext in '' $ac_executable_extensions; do
19157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19158    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19160    break 2
19161  fi
19162done
19163  done
19164IFS=$as_save_IFS
19165
19166  ;;
19167esac
19168fi
19169PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19170if test -n "$PKG_CONFIG"; then
19171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19172$as_echo "$PKG_CONFIG" >&6; }
19173else
19174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19175$as_echo "no" >&6; }
19176fi
19177
19178
19179fi
19180if test -z "$ac_cv_path_PKG_CONFIG"; then
19181  ac_pt_PKG_CONFIG=$PKG_CONFIG
19182  # Extract the first word of "pkg-config", so it can be a program name with args.
19183set dummy pkg-config; ac_word=$2
19184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19185$as_echo_n "checking for $ac_word... " >&6; }
19186if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19187  $as_echo_n "(cached) " >&6
19188else
19189  case $ac_pt_PKG_CONFIG in
19190  [\\/]* | ?:[\\/]*)
19191  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19192  ;;
19193  *)
19194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19195for as_dir in $PATH
19196do
19197  IFS=$as_save_IFS
19198  test -z "$as_dir" && as_dir=.
19199    for ac_exec_ext in '' $ac_executable_extensions; do
19200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19201    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19203    break 2
19204  fi
19205done
19206  done
19207IFS=$as_save_IFS
19208
19209  ;;
19210esac
19211fi
19212ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19213if test -n "$ac_pt_PKG_CONFIG"; then
19214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19215$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19216else
19217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19218$as_echo "no" >&6; }
19219fi
19220
19221  if test "x$ac_pt_PKG_CONFIG" = x; then
19222    PKG_CONFIG=""
19223  else
19224    case $cross_compiling:$ac_tool_warned in
19225yes:)
19226{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19227$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19228ac_tool_warned=yes ;;
19229esac
19230    PKG_CONFIG=$ac_pt_PKG_CONFIG
19231  fi
19232else
19233  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19234fi
19235
19236fi
19237if test -n "$PKG_CONFIG"; then
19238	_pkg_min_version=0.9.0
19239	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19240$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19241	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19242		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19243$as_echo "yes" >&6; }
19244	else
19245		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19246$as_echo "no" >&6; }
19247		PKG_CONFIG=""
19248	fi
19249
19250fi
19251
19252# After basic tools have been setup, we can check build os specific details.
19253
19254  ###############################################################################
19255
19256  # Note that this is the build platform OS version!
19257
19258  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19259  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19260  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19261  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19262
19263
19264
19265
19266
19267# Setup builddeps, for automatic downloading of tools we need.
19268# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19269# boot-jdk setup, but we need to have basic tools setup first.
19270
19271
19272# Check whether --with-builddeps-conf was given.
19273if test "${with_builddeps_conf+set}" = set; then :
19274  withval=$with_builddeps_conf;
19275fi
19276
19277
19278
19279# Check whether --with-builddeps-server was given.
19280if test "${with_builddeps_server+set}" = set; then :
19281  withval=$with_builddeps_server;
19282fi
19283
19284
19285
19286# Check whether --with-builddeps-dir was given.
19287if test "${with_builddeps_dir+set}" = set; then :
19288  withval=$with_builddeps_dir;
19289else
19290  with_builddeps_dir=/localhome/builddeps
19291fi
19292
19293
19294
19295# Check whether --with-builddeps-group was given.
19296if test "${with_builddeps_group+set}" = set; then :
19297  withval=$with_builddeps_group;
19298fi
19299
19300
19301
19302
19303  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19304    if test "x$with_builddeps_conf" != x; then
19305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19306$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19307      builddepsfile=$with_builddeps_conf
19308      if test -s $builddepsfile; then
19309        . $builddepsfile
19310        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19311$as_echo "loaded!" >&6; }
19312      else
19313        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19314      fi
19315    else
19316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19317$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19318      builddepsfile=`mktemp`
19319      touch $builddepsfile
19320      # Put all found confs into a single file.
19321      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19322      # Source the file to acquire the variables
19323      if test -s $builddepsfile; then
19324        . $builddepsfile
19325        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19326$as_echo "found at least one!" >&6; }
19327      else
19328        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19329      fi
19330    fi
19331    # Create build and target names that use _ instead of "-" and ".".
19332    # This is necessary to use them in variable names.
19333    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19334    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19335    # Extract rewrite information for build and target
19336    eval rewritten_build=\${REWRITE_${build_var}}
19337    if test "x$rewritten_build" = x; then
19338      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19339      echo Build stays the same $rewritten_build
19340    else
19341      echo Rewriting build for builddeps into $rewritten_build
19342    fi
19343    eval rewritten_target=\${REWRITE_${target_var}}
19344    if test "x$rewritten_target" = x; then
19345      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19346      echo Target stays the same $rewritten_target
19347    else
19348      echo Rewriting target for builddeps into $rewritten_target
19349    fi
19350    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19351    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19352  fi
19353  for ac_prog in 7z unzip
19354do
19355  # Extract the first word of "$ac_prog", so it can be a program name with args.
19356set dummy $ac_prog; ac_word=$2
19357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19358$as_echo_n "checking for $ac_word... " >&6; }
19359if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19360  $as_echo_n "(cached) " >&6
19361else
19362  if test -n "$BDEPS_UNZIP"; then
19363  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19364else
19365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19366for as_dir in $PATH
19367do
19368  IFS=$as_save_IFS
19369  test -z "$as_dir" && as_dir=.
19370    for ac_exec_ext in '' $ac_executable_extensions; do
19371  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19372    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19373    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19374    break 2
19375  fi
19376done
19377  done
19378IFS=$as_save_IFS
19379
19380fi
19381fi
19382BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19383if test -n "$BDEPS_UNZIP"; then
19384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19385$as_echo "$BDEPS_UNZIP" >&6; }
19386else
19387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19388$as_echo "no" >&6; }
19389fi
19390
19391
19392  test -n "$BDEPS_UNZIP" && break
19393done
19394
19395  if test "x$BDEPS_UNZIP" = x7z; then
19396    BDEPS_UNZIP="7z x"
19397  fi
19398
19399  for ac_prog in wget lftp ftp
19400do
19401  # Extract the first word of "$ac_prog", so it can be a program name with args.
19402set dummy $ac_prog; ac_word=$2
19403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19404$as_echo_n "checking for $ac_word... " >&6; }
19405if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19406  $as_echo_n "(cached) " >&6
19407else
19408  if test -n "$BDEPS_FTP"; then
19409  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19410else
19411as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19412for as_dir in $PATH
19413do
19414  IFS=$as_save_IFS
19415  test -z "$as_dir" && as_dir=.
19416    for ac_exec_ext in '' $ac_executable_extensions; do
19417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19418    ac_cv_prog_BDEPS_FTP="$ac_prog"
19419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19420    break 2
19421  fi
19422done
19423  done
19424IFS=$as_save_IFS
19425
19426fi
19427fi
19428BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19429if test -n "$BDEPS_FTP"; then
19430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19431$as_echo "$BDEPS_FTP" >&6; }
19432else
19433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19434$as_echo "no" >&6; }
19435fi
19436
19437
19438  test -n "$BDEPS_FTP" && break
19439done
19440
19441
19442
19443###############################################################################
19444#
19445# Determine OpenJDK variants, options and version numbers.
19446#
19447###############################################################################
19448
19449# We need build & target for this.
19450
19451
19452  ###############################################################################
19453  #
19454  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19455  # We always build headless support.
19456  #
19457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19458$as_echo_n "checking headful support... " >&6; }
19459  # Check whether --enable-headful was given.
19460if test "${enable_headful+set}" = set; then :
19461  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19462else
19463  SUPPORT_HEADFUL=yes
19464fi
19465
19466
19467  SUPPORT_HEADLESS=yes
19468  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19469
19470  if test "x$SUPPORT_HEADFUL" = xyes; then
19471    # We are building both headful and headless.
19472    headful_msg="include support for both headful and headless"
19473  fi
19474
19475  if test "x$SUPPORT_HEADFUL" = xno; then
19476    # Thus we are building headless only.
19477    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19478    headful_msg="headless only"
19479  fi
19480
19481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19482$as_echo "$headful_msg" >&6; }
19483
19484
19485
19486
19487
19488  # Control wether Hotspot runs Queens test after build.
19489  # Check whether --enable-hotspot-test-in-build was given.
19490if test "${enable_hotspot_test_in_build+set}" = set; then :
19491  enableval=$enable_hotspot_test_in_build;
19492else
19493  enable_hotspot_test_in_build=no
19494fi
19495
19496  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19497    TEST_IN_BUILD=true
19498  else
19499    TEST_IN_BUILD=false
19500  fi
19501
19502
19503  ###############################################################################
19504  #
19505  # Choose cacerts source file
19506  #
19507
19508# Check whether --with-cacerts-file was given.
19509if test "${with_cacerts_file+set}" = set; then :
19510  withval=$with_cacerts_file;
19511fi
19512
19513  if test "x$with_cacerts_file" != x; then
19514    CACERTS_FILE=$with_cacerts_file
19515  else
19516    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19517  fi
19518
19519
19520  ###############################################################################
19521  #
19522  # Enable or disable unlimited crypto
19523  #
19524  # Check whether --enable-unlimited-crypto was given.
19525if test "${enable_unlimited_crypto+set}" = set; then :
19526  enableval=$enable_unlimited_crypto;
19527else
19528  enable_unlimited_crypto=no
19529fi
19530
19531  if test "x$enable_unlimited_crypto" = "xyes"; then
19532    UNLIMITED_CRYPTO=true
19533  else
19534    UNLIMITED_CRYPTO=false
19535  fi
19536
19537
19538  ###############################################################################
19539  #
19540  # Enable or disable the elliptic curve crypto implementation
19541  #
19542
19543
19544  ###############################################################################
19545  #
19546  # --enable-rmiconnector-iiop
19547  #
19548  # Check whether --enable-rmiconnector-iiop was given.
19549if test "${enable_rmiconnector_iiop+set}" = set; then :
19550  enableval=$enable_rmiconnector_iiop;
19551fi
19552
19553  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19554    RMICONNECTOR_IIOP=true
19555  else
19556    RMICONNECTOR_IIOP=false
19557  fi
19558
19559
19560  ###############################################################################
19561  #
19562  # Compress jars
19563  #
19564  COMPRESS_JARS=false
19565
19566
19567
19568
19569  # Source the version numbers
19570  . $AUTOCONF_DIR/version-numbers
19571
19572  # Get the settings from parameters
19573
19574# Check whether --with-milestone was given.
19575if test "${with_milestone+set}" = set; then :
19576  withval=$with_milestone;
19577fi
19578
19579  if test "x$with_milestone" = xyes; then
19580    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19581  elif test "x$with_milestone" != x; then
19582    MILESTONE="$with_milestone"
19583  fi
19584  if test "x$MILESTONE" = x; then
19585    MILESTONE=internal
19586  fi
19587
19588
19589# Check whether --with-update-version was given.
19590if test "${with_update_version+set}" = set; then :
19591  withval=$with_update_version;
19592fi
19593
19594  if test "x$with_update_version" = xyes; then
19595    as_fn_error $? "Update version must have a value" "$LINENO" 5
19596  elif test "x$with_update_version" != x; then
19597    JDK_UPDATE_VERSION="$with_update_version"
19598    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19599    # to a bug in expr (which reduces it to just X). To work around this, we
19600    # always add a 0 to one digit update versions.
19601    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19602      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19603    fi
19604  fi
19605
19606
19607# Check whether --with-user-release-suffix was given.
19608if test "${with_user_release_suffix+set}" = set; then :
19609  withval=$with_user_release_suffix;
19610fi
19611
19612  if test "x$with_user_release_suffix" = xyes; then
19613    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19614  elif test "x$with_user_release_suffix" != x; then
19615    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19616  fi
19617
19618
19619# Check whether --with-build-number was given.
19620if test "${with_build_number+set}" = set; then :
19621  withval=$with_build_number;
19622fi
19623
19624  if test "x$with_build_number" = xyes; then
19625    as_fn_error $? "Build number must have a value" "$LINENO" 5
19626  elif test "x$with_build_number" != x; then
19627    JDK_BUILD_NUMBER="$with_build_number"
19628  fi
19629  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19630  if test "x$JDK_BUILD_NUMBER" = x; then
19631    JDK_BUILD_NUMBER=b00
19632    if test "x$USER_RELEASE_SUFFIX" = x; then
19633      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19634      # Avoid [:alnum:] since it depends on the locale.
19635      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19636      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19637    fi
19638  fi
19639
19640  # Now set the JDK version, milestone, build number etc.
19641
19642
19643
19644
19645
19646
19647
19648
19649
19650
19651
19652
19653
19654
19655
19656  COPYRIGHT_YEAR=`date +'%Y'`
19657
19658
19659  if test "x$JDK_UPDATE_VERSION" != x; then
19660    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19661  else
19662    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19663  fi
19664
19665
19666  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19667
19668
19669
19670###############################################################################
19671#
19672# Setup BootJDK, used to bootstrap the build.
19673#
19674###############################################################################
19675
19676
19677  BOOT_JDK_FOUND=no
19678
19679# Check whether --with-boot-jdk was given.
19680if test "${with_boot_jdk+set}" = set; then :
19681  withval=$with_boot_jdk;
19682fi
19683
19684
19685  # We look for the Boot JDK through various means, going from more certain to
19686  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19687  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19688  # must check if this is indeed valid; otherwise we'll continue looking.
19689
19690  # Test: Is bootjdk explicitely set by command line arguments?
19691
19692  if test "x$BOOT_JDK_FOUND" = xno; then
19693    # Now execute the test
19694
19695  if test "x$with_boot_jdk" != x; then
19696    BOOT_JDK=$with_boot_jdk
19697    BOOT_JDK_FOUND=maybe
19698    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19699$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19700  fi
19701
19702
19703    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19704    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19705      # Do we have a bin/java?
19706      if test ! -x "$BOOT_JDK/bin/java"; then
19707        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19708$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19709        BOOT_JDK_FOUND=no
19710      else
19711        # Do we have a bin/javac?
19712        if test ! -x "$BOOT_JDK/bin/javac"; then
19713          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19714$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19715          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19716$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19717          BOOT_JDK_FOUND=no
19718        else
19719          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19720          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19721            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19722$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19723            BOOT_JDK_FOUND=no
19724          else
19725            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19726            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19727
19728            # Extra M4 quote needed to protect [] in grep expression.
19729            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
19730            if test "x$FOUND_CORRECT_VERSION" = x; then
19731              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19733              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
19734$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
19735              BOOT_JDK_FOUND=no
19736            else
19737              # We're done! :-)
19738              BOOT_JDK_FOUND=yes
19739
19740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19741
19742  # Input might be given as Windows format, start by converting to
19743  # unix format.
19744  path="$BOOT_JDK"
19745  new_path=`$CYGPATH -u "$path"`
19746
19747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19750  # "foo.exe" is OK but "foo" is an error.
19751  #
19752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19753  # It is also a way to make sure we got the proper file name for the real test later on.
19754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19755  if test "x$test_shortpath" = x; then
19756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19757$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19758    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19759  fi
19760
19761  # Call helper function which possibly converts this using DOS-style short mode.
19762  # If so, the updated path is stored in $new_path.
19763
19764  input_path="$new_path"
19765  # Check if we need to convert this using DOS-style short mode. If the path
19766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19767  # take no chances and rewrite it.
19768  # Note: m4 eats our [], so we need to use [ and ] instead.
19769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19770  if test "x$has_forbidden_chars" != x; then
19771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19775      # Going to short mode and back again did indeed matter. Since short mode is
19776      # case insensitive, let's make it lowercase to improve readability.
19777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19778      # Now convert it back to Unix-stile (cygpath)
19779      input_path=`$CYGPATH -u "$shortmode_path"`
19780      new_path="$input_path"
19781    fi
19782  fi
19783
19784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19785  if test "x$test_cygdrive_prefix" = x; then
19786    # As a simple fix, exclude /usr/bin since it's not a real path.
19787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
19788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19789      # a path prefixed by /cygdrive for fixpath to work.
19790      new_path="$CYGWIN_ROOT_PATH$input_path"
19791    fi
19792  fi
19793
19794
19795  if test "x$path" != "x$new_path"; then
19796    BOOT_JDK="$new_path"
19797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19798$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19799  fi
19800
19801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19802
19803  path="$BOOT_JDK"
19804  has_colon=`$ECHO $path | $GREP ^.:`
19805  new_path="$path"
19806  if test "x$has_colon" = x; then
19807    # Not in mixed or Windows style, start by that.
19808    new_path=`cmd //c echo $path`
19809  fi
19810
19811
19812  input_path="$new_path"
19813  # Check if we need to convert this using DOS-style short mode. If the path
19814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19815  # take no chances and rewrite it.
19816  # Note: m4 eats our [], so we need to use [ and ] instead.
19817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19818  if test "x$has_forbidden_chars" != x; then
19819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19821  fi
19822
19823
19824  windows_path="$new_path"
19825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19826    unix_path=`$CYGPATH -u "$windows_path"`
19827    new_path="$unix_path"
19828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19830    new_path="$unix_path"
19831  fi
19832
19833  if test "x$path" != "x$new_path"; then
19834    BOOT_JDK="$new_path"
19835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
19836$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
19837  fi
19838
19839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
19840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19841
19842  else
19843    # We're on a posix platform. Hooray! :)
19844    path="$BOOT_JDK"
19845    has_space=`$ECHO "$path" | $GREP " "`
19846    if test "x$has_space" != x; then
19847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19848$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19849      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
19850    fi
19851
19852    # Use eval to expand a potential ~
19853    eval path="$path"
19854    if test ! -f "$path" && test ! -d "$path"; then
19855      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
19856    fi
19857
19858    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
19859  fi
19860
19861              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
19862$as_echo_n "checking for Boot JDK... " >&6; }
19863              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
19864$as_echo "$BOOT_JDK" >&6; }
19865              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
19866$as_echo_n "checking Boot JDK version... " >&6; }
19867              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
19868              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
19869$as_echo "$BOOT_JDK_VERSION" >&6; }
19870            fi # end check jdk version
19871          fi # end check rt.jar
19872        fi # end check javac
19873      fi # end check java
19874    fi # end check boot jdk found
19875  fi
19876
19877  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
19878    # Having specified an argument which is incorrect will produce an instant failure;
19879    # we should not go on looking
19880    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
19881  fi
19882
19883  # Test: Is bootjdk available from builddeps?
19884
19885  if test "x$BOOT_JDK_FOUND" = xno; then
19886    # Now execute the test
19887
19888
19889
19890  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19891    # Source the builddeps file again, to make sure it uses the latest variables!
19892    . $builddepsfile
19893    # Look for a target and build machine specific resource!
19894    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
19895    if test "x$resource" = x; then
19896      # Ok, lets instead look for a target specific resource
19897      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
19898    fi
19899    if test "x$resource" = x; then
19900      # Ok, lets instead look for a build specific resource
19901      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
19902    fi
19903    if test "x$resource" = x; then
19904      # Ok, lets instead look for a generic resource
19905      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
19906      resource=${builddep_bootjdk}
19907    fi
19908    if test "x$resource" != x; then
19909      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
19910$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
19911      # If the resource in the builddeps.conf file is an existing directory,
19912      # for example /java/linux/cups
19913      if test -d ${resource}; then
19914        depdir=${resource}
19915      else
19916
19917  # bootjdk is for example mymodule
19918  # $resource is for example libs/general/libmymod_1_2_3.zip
19919  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
19920  # $with_builddeps_dir is for example /localhome/builddeps
19921  # depdir is the name of the variable into which we store the depdir, eg MYMOD
19922  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
19923  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
19924  filename=`basename $resource`
19925  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
19926  filebase=${filename%%.*}
19927  extension=${filename#*.}
19928  installdir=$with_builddeps_dir/$filebase
19929  if test ! -f $installdir/$filename.unpacked; then
19930    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
19931$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
19932    if test ! -d $installdir; then
19933      mkdir -p $installdir
19934    fi
19935    if test ! -d $installdir; then
19936      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
19937    fi
19938    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
19939    touch $tmpfile
19940    if test ! -f $tmpfile; then
19941      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
19942    fi
19943
19944  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
19945  # $tmpfile is the local file name for the downloaded file.
19946  VALID_TOOL=no
19947  if test "x$BDEPS_FTP" = xwget; then
19948    VALID_TOOL=yes
19949    wget -O $tmpfile $with_builddeps_server/$resource
19950  fi
19951  if test "x$BDEPS_FTP" = xlftp; then
19952    VALID_TOOL=yes
19953    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
19954  fi
19955  if test "x$BDEPS_FTP" = xftp; then
19956    VALID_TOOL=yes
19957    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
19958    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
19959    FTPUSERPWD=${FTPSERVER%%@*}
19960    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
19961      FTPUSER=${userpwd%%:*}
19962      FTPPWD=${userpwd#*@}
19963      FTPSERVER=${FTPSERVER#*@}
19964    else
19965      FTPUSER=ftp
19966      FTPPWD=ftp
19967    fi
19968    # the "pass" command does not work on some
19969    # ftp clients (read ftp.exe) but if it works,
19970    # passive mode is better!
19971    ( \
19972        echo "user $FTPUSER $FTPPWD"        ; \
19973        echo "pass"                         ; \
19974        echo "bin"                          ; \
19975        echo "get $FTPPATH $tmpfile"              ; \
19976    ) | ftp -in $FTPSERVER
19977  fi
19978  if test "x$VALID_TOOL" != xyes; then
19979    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
19980  fi
19981
19982    mv $tmpfile $installdir/$filename
19983    if test ! -s $installdir/$filename; then
19984      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
19985    fi
19986    case "$extension" in
19987      zip)  echo "Unzipping $installdir/$filename..."
19988        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
19989        ;;
19990      tar.gz) echo "Untaring $installdir/$filename..."
19991        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19992        ;;
19993      tgz) echo "Untaring $installdir/$filename..."
19994        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
19995        ;;
19996      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
19997        ;;
19998    esac
19999  fi
20000  if test -f $installdir/$filename.unpacked; then
20001    depdir=$installdir
20002  fi
20003
20004      fi
20005      # Source the builddeps file again, because in the previous command, the depdir
20006      # was updated to point at the current build dependency install directory.
20007      . $builddepsfile
20008      # Now extract variables from the builddeps.conf files.
20009      theroot=${builddep_bootjdk_ROOT}
20010      thecflags=${builddep_bootjdk_CFLAGS}
20011      thelibs=${builddep_bootjdk_LIBS}
20012      if test "x$depdir" = x; then
20013        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20014      fi
20015      BOOT_JDK=$depdir
20016      if test "x$theroot" != x; then
20017        BOOT_JDK="$theroot"
20018      fi
20019      if test "x$thecflags" != x; then
20020        BOOT_JDK_CFLAGS="$thecflags"
20021      fi
20022      if test "x$thelibs" != x; then
20023        BOOT_JDK_LIBS="$thelibs"
20024      fi
20025      BOOT_JDK_FOUND=maybe
20026      else BOOT_JDK_FOUND=no
20027
20028    fi
20029    else BOOT_JDK_FOUND=no
20030
20031  fi
20032
20033
20034
20035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20037      # Do we have a bin/java?
20038      if test ! -x "$BOOT_JDK/bin/java"; then
20039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20041        BOOT_JDK_FOUND=no
20042      else
20043        # Do we have a bin/javac?
20044        if test ! -x "$BOOT_JDK/bin/javac"; then
20045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20049          BOOT_JDK_FOUND=no
20050        else
20051          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20052          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20053            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20055            BOOT_JDK_FOUND=no
20056          else
20057            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20058            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20059
20060            # Extra M4 quote needed to protect [] in grep expression.
20061            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20062            if test "x$FOUND_CORRECT_VERSION" = x; then
20063              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20064$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20065              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20066$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20067              BOOT_JDK_FOUND=no
20068            else
20069              # We're done! :-)
20070              BOOT_JDK_FOUND=yes
20071
20072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20073
20074  # Input might be given as Windows format, start by converting to
20075  # unix format.
20076  path="$BOOT_JDK"
20077  new_path=`$CYGPATH -u "$path"`
20078
20079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20082  # "foo.exe" is OK but "foo" is an error.
20083  #
20084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20085  # It is also a way to make sure we got the proper file name for the real test later on.
20086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20087  if test "x$test_shortpath" = x; then
20088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20089$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20090    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20091  fi
20092
20093  # Call helper function which possibly converts this using DOS-style short mode.
20094  # If so, the updated path is stored in $new_path.
20095
20096  input_path="$new_path"
20097  # Check if we need to convert this using DOS-style short mode. If the path
20098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20099  # take no chances and rewrite it.
20100  # Note: m4 eats our [], so we need to use [ and ] instead.
20101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20102  if test "x$has_forbidden_chars" != x; then
20103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20107      # Going to short mode and back again did indeed matter. Since short mode is
20108      # case insensitive, let's make it lowercase to improve readability.
20109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20110      # Now convert it back to Unix-stile (cygpath)
20111      input_path=`$CYGPATH -u "$shortmode_path"`
20112      new_path="$input_path"
20113    fi
20114  fi
20115
20116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20117  if test "x$test_cygdrive_prefix" = x; then
20118    # As a simple fix, exclude /usr/bin since it's not a real path.
20119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20121      # a path prefixed by /cygdrive for fixpath to work.
20122      new_path="$CYGWIN_ROOT_PATH$input_path"
20123    fi
20124  fi
20125
20126
20127  if test "x$path" != "x$new_path"; then
20128    BOOT_JDK="$new_path"
20129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20130$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20131  fi
20132
20133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20134
20135  path="$BOOT_JDK"
20136  has_colon=`$ECHO $path | $GREP ^.:`
20137  new_path="$path"
20138  if test "x$has_colon" = x; then
20139    # Not in mixed or Windows style, start by that.
20140    new_path=`cmd //c echo $path`
20141  fi
20142
20143
20144  input_path="$new_path"
20145  # Check if we need to convert this using DOS-style short mode. If the path
20146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20147  # take no chances and rewrite it.
20148  # Note: m4 eats our [], so we need to use [ and ] instead.
20149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20150  if test "x$has_forbidden_chars" != x; then
20151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20153  fi
20154
20155
20156  windows_path="$new_path"
20157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20158    unix_path=`$CYGPATH -u "$windows_path"`
20159    new_path="$unix_path"
20160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20162    new_path="$unix_path"
20163  fi
20164
20165  if test "x$path" != "x$new_path"; then
20166    BOOT_JDK="$new_path"
20167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20168$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20169  fi
20170
20171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20173
20174  else
20175    # We're on a posix platform. Hooray! :)
20176    path="$BOOT_JDK"
20177    has_space=`$ECHO "$path" | $GREP " "`
20178    if test "x$has_space" != x; then
20179      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20180$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20181      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20182    fi
20183
20184    # Use eval to expand a potential ~
20185    eval path="$path"
20186    if test ! -f "$path" && test ! -d "$path"; then
20187      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20188    fi
20189
20190    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20191  fi
20192
20193              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20194$as_echo_n "checking for Boot JDK... " >&6; }
20195              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20196$as_echo "$BOOT_JDK" >&6; }
20197              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20198$as_echo_n "checking Boot JDK version... " >&6; }
20199              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20200              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20201$as_echo "$BOOT_JDK_VERSION" >&6; }
20202            fi # end check jdk version
20203          fi # end check rt.jar
20204        fi # end check javac
20205      fi # end check java
20206    fi # end check boot jdk found
20207  fi
20208
20209
20210  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20211
20212  if test "x$BOOT_JDK_FOUND" = xno; then
20213    # Now execute the test
20214
20215  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20216    # First check at user selected default
20217
20218  if test "x$BOOT_JDK_FOUND" = xno; then
20219    # Now execute the test
20220
20221  if test -x /usr/libexec/java_home; then
20222    BOOT_JDK=`/usr/libexec/java_home `
20223    BOOT_JDK_FOUND=maybe
20224    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20225$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20226  fi
20227
20228
20229    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20230    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20231      # Do we have a bin/java?
20232      if test ! -x "$BOOT_JDK/bin/java"; then
20233        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20234$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20235        BOOT_JDK_FOUND=no
20236      else
20237        # Do we have a bin/javac?
20238        if test ! -x "$BOOT_JDK/bin/javac"; then
20239          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20240$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20241          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20242$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20243          BOOT_JDK_FOUND=no
20244        else
20245          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20246          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20247            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20248$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20249            BOOT_JDK_FOUND=no
20250          else
20251            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20252            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20253
20254            # Extra M4 quote needed to protect [] in grep expression.
20255            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20256            if test "x$FOUND_CORRECT_VERSION" = x; then
20257              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20258$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20259              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20260$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20261              BOOT_JDK_FOUND=no
20262            else
20263              # We're done! :-)
20264              BOOT_JDK_FOUND=yes
20265
20266  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20267
20268  # Input might be given as Windows format, start by converting to
20269  # unix format.
20270  path="$BOOT_JDK"
20271  new_path=`$CYGPATH -u "$path"`
20272
20273  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20274  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20275  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20276  # "foo.exe" is OK but "foo" is an error.
20277  #
20278  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20279  # It is also a way to make sure we got the proper file name for the real test later on.
20280  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20281  if test "x$test_shortpath" = x; then
20282    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20283$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20284    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20285  fi
20286
20287  # Call helper function which possibly converts this using DOS-style short mode.
20288  # If so, the updated path is stored in $new_path.
20289
20290  input_path="$new_path"
20291  # Check if we need to convert this using DOS-style short mode. If the path
20292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20293  # take no chances and rewrite it.
20294  # Note: m4 eats our [], so we need to use [ and ] instead.
20295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20296  if test "x$has_forbidden_chars" != x; then
20297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20301      # Going to short mode and back again did indeed matter. Since short mode is
20302      # case insensitive, let's make it lowercase to improve readability.
20303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20304      # Now convert it back to Unix-stile (cygpath)
20305      input_path=`$CYGPATH -u "$shortmode_path"`
20306      new_path="$input_path"
20307    fi
20308  fi
20309
20310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20311  if test "x$test_cygdrive_prefix" = x; then
20312    # As a simple fix, exclude /usr/bin since it's not a real path.
20313    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20315      # a path prefixed by /cygdrive for fixpath to work.
20316      new_path="$CYGWIN_ROOT_PATH$input_path"
20317    fi
20318  fi
20319
20320
20321  if test "x$path" != "x$new_path"; then
20322    BOOT_JDK="$new_path"
20323    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20324$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20325  fi
20326
20327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20328
20329  path="$BOOT_JDK"
20330  has_colon=`$ECHO $path | $GREP ^.:`
20331  new_path="$path"
20332  if test "x$has_colon" = x; then
20333    # Not in mixed or Windows style, start by that.
20334    new_path=`cmd //c echo $path`
20335  fi
20336
20337
20338  input_path="$new_path"
20339  # Check if we need to convert this using DOS-style short mode. If the path
20340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20341  # take no chances and rewrite it.
20342  # Note: m4 eats our [], so we need to use [ and ] instead.
20343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20344  if test "x$has_forbidden_chars" != x; then
20345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20347  fi
20348
20349
20350  windows_path="$new_path"
20351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20352    unix_path=`$CYGPATH -u "$windows_path"`
20353    new_path="$unix_path"
20354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20356    new_path="$unix_path"
20357  fi
20358
20359  if test "x$path" != "x$new_path"; then
20360    BOOT_JDK="$new_path"
20361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20363  fi
20364
20365  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20366  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20367
20368  else
20369    # We're on a posix platform. Hooray! :)
20370    path="$BOOT_JDK"
20371    has_space=`$ECHO "$path" | $GREP " "`
20372    if test "x$has_space" != x; then
20373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20374$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20375      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20376    fi
20377
20378    # Use eval to expand a potential ~
20379    eval path="$path"
20380    if test ! -f "$path" && test ! -d "$path"; then
20381      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20382    fi
20383
20384    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20385  fi
20386
20387              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20388$as_echo_n "checking for Boot JDK... " >&6; }
20389              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20390$as_echo "$BOOT_JDK" >&6; }
20391              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20392$as_echo_n "checking Boot JDK version... " >&6; }
20393              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20394              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20395$as_echo "$BOOT_JDK_VERSION" >&6; }
20396            fi # end check jdk version
20397          fi # end check rt.jar
20398        fi # end check javac
20399      fi # end check java
20400    fi # end check boot jdk found
20401  fi
20402
20403    # If that did not work out (e.g. too old), try explicit versions instead
20404
20405  if test "x$BOOT_JDK_FOUND" = xno; then
20406    # Now execute the test
20407
20408  if test -x /usr/libexec/java_home; then
20409    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20410    BOOT_JDK_FOUND=maybe
20411    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20412$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20413  fi
20414
20415
20416    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20417    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20418      # Do we have a bin/java?
20419      if test ! -x "$BOOT_JDK/bin/java"; then
20420        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20421$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20422        BOOT_JDK_FOUND=no
20423      else
20424        # Do we have a bin/javac?
20425        if test ! -x "$BOOT_JDK/bin/javac"; then
20426          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20427$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20428          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20429$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20430          BOOT_JDK_FOUND=no
20431        else
20432          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20433          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20434            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20435$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20436            BOOT_JDK_FOUND=no
20437          else
20438            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20439            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20440
20441            # Extra M4 quote needed to protect [] in grep expression.
20442            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20443            if test "x$FOUND_CORRECT_VERSION" = x; then
20444              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20445$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20446              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20447$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20448              BOOT_JDK_FOUND=no
20449            else
20450              # We're done! :-)
20451              BOOT_JDK_FOUND=yes
20452
20453  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20454
20455  # Input might be given as Windows format, start by converting to
20456  # unix format.
20457  path="$BOOT_JDK"
20458  new_path=`$CYGPATH -u "$path"`
20459
20460  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20461  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20462  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20463  # "foo.exe" is OK but "foo" is an error.
20464  #
20465  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20466  # It is also a way to make sure we got the proper file name for the real test later on.
20467  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20468  if test "x$test_shortpath" = x; then
20469    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20470$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20471    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20472  fi
20473
20474  # Call helper function which possibly converts this using DOS-style short mode.
20475  # If so, the updated path is stored in $new_path.
20476
20477  input_path="$new_path"
20478  # Check if we need to convert this using DOS-style short mode. If the path
20479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20480  # take no chances and rewrite it.
20481  # Note: m4 eats our [], so we need to use [ and ] instead.
20482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20483  if test "x$has_forbidden_chars" != x; then
20484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20485    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20486    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20487    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20488      # Going to short mode and back again did indeed matter. Since short mode is
20489      # case insensitive, let's make it lowercase to improve readability.
20490      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20491      # Now convert it back to Unix-stile (cygpath)
20492      input_path=`$CYGPATH -u "$shortmode_path"`
20493      new_path="$input_path"
20494    fi
20495  fi
20496
20497  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20498  if test "x$test_cygdrive_prefix" = x; then
20499    # As a simple fix, exclude /usr/bin since it's not a real path.
20500    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20501      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20502      # a path prefixed by /cygdrive for fixpath to work.
20503      new_path="$CYGWIN_ROOT_PATH$input_path"
20504    fi
20505  fi
20506
20507
20508  if test "x$path" != "x$new_path"; then
20509    BOOT_JDK="$new_path"
20510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20511$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20512  fi
20513
20514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20515
20516  path="$BOOT_JDK"
20517  has_colon=`$ECHO $path | $GREP ^.:`
20518  new_path="$path"
20519  if test "x$has_colon" = x; then
20520    # Not in mixed or Windows style, start by that.
20521    new_path=`cmd //c echo $path`
20522  fi
20523
20524
20525  input_path="$new_path"
20526  # Check if we need to convert this using DOS-style short mode. If the path
20527  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20528  # take no chances and rewrite it.
20529  # Note: m4 eats our [], so we need to use [ and ] instead.
20530  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20531  if test "x$has_forbidden_chars" != x; then
20532    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20533    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20534  fi
20535
20536
20537  windows_path="$new_path"
20538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539    unix_path=`$CYGPATH -u "$windows_path"`
20540    new_path="$unix_path"
20541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543    new_path="$unix_path"
20544  fi
20545
20546  if test "x$path" != "x$new_path"; then
20547    BOOT_JDK="$new_path"
20548    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20549$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20550  fi
20551
20552  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20553  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20554
20555  else
20556    # We're on a posix platform. Hooray! :)
20557    path="$BOOT_JDK"
20558    has_space=`$ECHO "$path" | $GREP " "`
20559    if test "x$has_space" != x; then
20560      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20561$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20562      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20563    fi
20564
20565    # Use eval to expand a potential ~
20566    eval path="$path"
20567    if test ! -f "$path" && test ! -d "$path"; then
20568      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20569    fi
20570
20571    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20572  fi
20573
20574              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20575$as_echo_n "checking for Boot JDK... " >&6; }
20576              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20577$as_echo "$BOOT_JDK" >&6; }
20578              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20579$as_echo_n "checking Boot JDK version... " >&6; }
20580              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20581              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20582$as_echo "$BOOT_JDK_VERSION" >&6; }
20583            fi # end check jdk version
20584          fi # end check rt.jar
20585        fi # end check javac
20586      fi # end check java
20587    fi # end check boot jdk found
20588  fi
20589
20590
20591  if test "x$BOOT_JDK_FOUND" = xno; then
20592    # Now execute the test
20593
20594  if test -x /usr/libexec/java_home; then
20595    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20596    BOOT_JDK_FOUND=maybe
20597    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20598$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20599  fi
20600
20601
20602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20604      # Do we have a bin/java?
20605      if test ! -x "$BOOT_JDK/bin/java"; then
20606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20608        BOOT_JDK_FOUND=no
20609      else
20610        # Do we have a bin/javac?
20611        if test ! -x "$BOOT_JDK/bin/javac"; then
20612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20616          BOOT_JDK_FOUND=no
20617        else
20618          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20619          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20620            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20622            BOOT_JDK_FOUND=no
20623          else
20624            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20626
20627            # Extra M4 quote needed to protect [] in grep expression.
20628            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20629            if test "x$FOUND_CORRECT_VERSION" = x; then
20630              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20632              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20633$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20634              BOOT_JDK_FOUND=no
20635            else
20636              # We're done! :-)
20637              BOOT_JDK_FOUND=yes
20638
20639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20640
20641  # Input might be given as Windows format, start by converting to
20642  # unix format.
20643  path="$BOOT_JDK"
20644  new_path=`$CYGPATH -u "$path"`
20645
20646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20649  # "foo.exe" is OK but "foo" is an error.
20650  #
20651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20652  # It is also a way to make sure we got the proper file name for the real test later on.
20653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20654  if test "x$test_shortpath" = x; then
20655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20657    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20658  fi
20659
20660  # Call helper function which possibly converts this using DOS-style short mode.
20661  # If so, the updated path is stored in $new_path.
20662
20663  input_path="$new_path"
20664  # Check if we need to convert this using DOS-style short mode. If the path
20665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20666  # take no chances and rewrite it.
20667  # Note: m4 eats our [], so we need to use [ and ] instead.
20668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20669  if test "x$has_forbidden_chars" != x; then
20670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20674      # Going to short mode and back again did indeed matter. Since short mode is
20675      # case insensitive, let's make it lowercase to improve readability.
20676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20677      # Now convert it back to Unix-stile (cygpath)
20678      input_path=`$CYGPATH -u "$shortmode_path"`
20679      new_path="$input_path"
20680    fi
20681  fi
20682
20683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20684  if test "x$test_cygdrive_prefix" = x; then
20685    # As a simple fix, exclude /usr/bin since it's not a real path.
20686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20688      # a path prefixed by /cygdrive for fixpath to work.
20689      new_path="$CYGWIN_ROOT_PATH$input_path"
20690    fi
20691  fi
20692
20693
20694  if test "x$path" != "x$new_path"; then
20695    BOOT_JDK="$new_path"
20696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20698  fi
20699
20700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20701
20702  path="$BOOT_JDK"
20703  has_colon=`$ECHO $path | $GREP ^.:`
20704  new_path="$path"
20705  if test "x$has_colon" = x; then
20706    # Not in mixed or Windows style, start by that.
20707    new_path=`cmd //c echo $path`
20708  fi
20709
20710
20711  input_path="$new_path"
20712  # Check if we need to convert this using DOS-style short mode. If the path
20713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20714  # take no chances and rewrite it.
20715  # Note: m4 eats our [], so we need to use [ and ] instead.
20716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20717  if test "x$has_forbidden_chars" != x; then
20718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20720  fi
20721
20722
20723  windows_path="$new_path"
20724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20725    unix_path=`$CYGPATH -u "$windows_path"`
20726    new_path="$unix_path"
20727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20729    new_path="$unix_path"
20730  fi
20731
20732  if test "x$path" != "x$new_path"; then
20733    BOOT_JDK="$new_path"
20734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20736  fi
20737
20738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20740
20741  else
20742    # We're on a posix platform. Hooray! :)
20743    path="$BOOT_JDK"
20744    has_space=`$ECHO "$path" | $GREP " "`
20745    if test "x$has_space" != x; then
20746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20749    fi
20750
20751    # Use eval to expand a potential ~
20752    eval path="$path"
20753    if test ! -f "$path" && test ! -d "$path"; then
20754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20755    fi
20756
20757    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20758  fi
20759
20760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20761$as_echo_n "checking for Boot JDK... " >&6; }
20762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20763$as_echo "$BOOT_JDK" >&6; }
20764              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20765$as_echo_n "checking Boot JDK version... " >&6; }
20766              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20768$as_echo "$BOOT_JDK_VERSION" >&6; }
20769            fi # end check jdk version
20770          fi # end check rt.jar
20771        fi # end check javac
20772      fi # end check java
20773    fi # end check boot jdk found
20774  fi
20775
20776
20777  if test "x$BOOT_JDK_FOUND" = xno; then
20778    # Now execute the test
20779
20780  if test -x /usr/libexec/java_home; then
20781    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
20782    BOOT_JDK_FOUND=maybe
20783    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
20784$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
20785  fi
20786
20787
20788    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20789    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20790      # Do we have a bin/java?
20791      if test ! -x "$BOOT_JDK/bin/java"; then
20792        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20794        BOOT_JDK_FOUND=no
20795      else
20796        # Do we have a bin/javac?
20797        if test ! -x "$BOOT_JDK/bin/javac"; then
20798          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20800          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20801$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20802          BOOT_JDK_FOUND=no
20803        else
20804          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20805          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20806            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20808            BOOT_JDK_FOUND=no
20809          else
20810            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20811            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20812
20813            # Extra M4 quote needed to protect [] in grep expression.
20814            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20815            if test "x$FOUND_CORRECT_VERSION" = x; then
20816              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20817$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20818              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20819$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20820              BOOT_JDK_FOUND=no
20821            else
20822              # We're done! :-)
20823              BOOT_JDK_FOUND=yes
20824
20825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20826
20827  # Input might be given as Windows format, start by converting to
20828  # unix format.
20829  path="$BOOT_JDK"
20830  new_path=`$CYGPATH -u "$path"`
20831
20832  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20833  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20834  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20835  # "foo.exe" is OK but "foo" is an error.
20836  #
20837  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20838  # It is also a way to make sure we got the proper file name for the real test later on.
20839  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20840  if test "x$test_shortpath" = x; then
20841    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20842$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20843    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20844  fi
20845
20846  # Call helper function which possibly converts this using DOS-style short mode.
20847  # If so, the updated path is stored in $new_path.
20848
20849  input_path="$new_path"
20850  # Check if we need to convert this using DOS-style short mode. If the path
20851  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20852  # take no chances and rewrite it.
20853  # Note: m4 eats our [], so we need to use [ and ] instead.
20854  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20855  if test "x$has_forbidden_chars" != x; then
20856    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20857    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20858    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20859    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20860      # Going to short mode and back again did indeed matter. Since short mode is
20861      # case insensitive, let's make it lowercase to improve readability.
20862      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20863      # Now convert it back to Unix-stile (cygpath)
20864      input_path=`$CYGPATH -u "$shortmode_path"`
20865      new_path="$input_path"
20866    fi
20867  fi
20868
20869  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20870  if test "x$test_cygdrive_prefix" = x; then
20871    # As a simple fix, exclude /usr/bin since it's not a real path.
20872    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20873      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20874      # a path prefixed by /cygdrive for fixpath to work.
20875      new_path="$CYGWIN_ROOT_PATH$input_path"
20876    fi
20877  fi
20878
20879
20880  if test "x$path" != "x$new_path"; then
20881    BOOT_JDK="$new_path"
20882    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20883$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20884  fi
20885
20886  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20887
20888  path="$BOOT_JDK"
20889  has_colon=`$ECHO $path | $GREP ^.:`
20890  new_path="$path"
20891  if test "x$has_colon" = x; then
20892    # Not in mixed or Windows style, start by that.
20893    new_path=`cmd //c echo $path`
20894  fi
20895
20896
20897  input_path="$new_path"
20898  # Check if we need to convert this using DOS-style short mode. If the path
20899  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20900  # take no chances and rewrite it.
20901  # Note: m4 eats our [], so we need to use [ and ] instead.
20902  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20903  if test "x$has_forbidden_chars" != x; then
20904    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20905    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20906  fi
20907
20908
20909  windows_path="$new_path"
20910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20911    unix_path=`$CYGPATH -u "$windows_path"`
20912    new_path="$unix_path"
20913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20915    new_path="$unix_path"
20916  fi
20917
20918  if test "x$path" != "x$new_path"; then
20919    BOOT_JDK="$new_path"
20920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20922  fi
20923
20924  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20925  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20926
20927  else
20928    # We're on a posix platform. Hooray! :)
20929    path="$BOOT_JDK"
20930    has_space=`$ECHO "$path" | $GREP " "`
20931    if test "x$has_space" != x; then
20932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20933$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20934      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20935    fi
20936
20937    # Use eval to expand a potential ~
20938    eval path="$path"
20939    if test ! -f "$path" && test ! -d "$path"; then
20940      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20941    fi
20942
20943    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20944  fi
20945
20946              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20947$as_echo_n "checking for Boot JDK... " >&6; }
20948              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20949$as_echo "$BOOT_JDK" >&6; }
20950              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20951$as_echo_n "checking Boot JDK version... " >&6; }
20952              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20953              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20954$as_echo "$BOOT_JDK_VERSION" >&6; }
20955            fi # end check jdk version
20956          fi # end check rt.jar
20957        fi # end check javac
20958      fi # end check java
20959    fi # end check boot jdk found
20960  fi
20961
20962  fi
20963
20964
20965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20967      # Do we have a bin/java?
20968      if test ! -x "$BOOT_JDK/bin/java"; then
20969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20971        BOOT_JDK_FOUND=no
20972      else
20973        # Do we have a bin/javac?
20974        if test ! -x "$BOOT_JDK/bin/javac"; then
20975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20979          BOOT_JDK_FOUND=no
20980        else
20981          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20982          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20983            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20985            BOOT_JDK_FOUND=no
20986          else
20987            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20989
20990            # Extra M4 quote needed to protect [] in grep expression.
20991            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
20992            if test "x$FOUND_CORRECT_VERSION" = x; then
20993              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20995              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
20996$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
20997              BOOT_JDK_FOUND=no
20998            else
20999              # We're done! :-)
21000              BOOT_JDK_FOUND=yes
21001
21002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21003
21004  # Input might be given as Windows format, start by converting to
21005  # unix format.
21006  path="$BOOT_JDK"
21007  new_path=`$CYGPATH -u "$path"`
21008
21009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21012  # "foo.exe" is OK but "foo" is an error.
21013  #
21014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21015  # It is also a way to make sure we got the proper file name for the real test later on.
21016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21017  if test "x$test_shortpath" = x; then
21018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21021  fi
21022
21023  # Call helper function which possibly converts this using DOS-style short mode.
21024  # If so, the updated path is stored in $new_path.
21025
21026  input_path="$new_path"
21027  # Check if we need to convert this using DOS-style short mode. If the path
21028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21029  # take no chances and rewrite it.
21030  # Note: m4 eats our [], so we need to use [ and ] instead.
21031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21032  if test "x$has_forbidden_chars" != x; then
21033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21037      # Going to short mode and back again did indeed matter. Since short mode is
21038      # case insensitive, let's make it lowercase to improve readability.
21039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21040      # Now convert it back to Unix-stile (cygpath)
21041      input_path=`$CYGPATH -u "$shortmode_path"`
21042      new_path="$input_path"
21043    fi
21044  fi
21045
21046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21047  if test "x$test_cygdrive_prefix" = x; then
21048    # As a simple fix, exclude /usr/bin since it's not a real path.
21049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21051      # a path prefixed by /cygdrive for fixpath to work.
21052      new_path="$CYGWIN_ROOT_PATH$input_path"
21053    fi
21054  fi
21055
21056
21057  if test "x$path" != "x$new_path"; then
21058    BOOT_JDK="$new_path"
21059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21061  fi
21062
21063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21064
21065  path="$BOOT_JDK"
21066  has_colon=`$ECHO $path | $GREP ^.:`
21067  new_path="$path"
21068  if test "x$has_colon" = x; then
21069    # Not in mixed or Windows style, start by that.
21070    new_path=`cmd //c echo $path`
21071  fi
21072
21073
21074  input_path="$new_path"
21075  # Check if we need to convert this using DOS-style short mode. If the path
21076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21077  # take no chances and rewrite it.
21078  # Note: m4 eats our [], so we need to use [ and ] instead.
21079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21080  if test "x$has_forbidden_chars" != x; then
21081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21083  fi
21084
21085
21086  windows_path="$new_path"
21087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21088    unix_path=`$CYGPATH -u "$windows_path"`
21089    new_path="$unix_path"
21090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21092    new_path="$unix_path"
21093  fi
21094
21095  if test "x$path" != "x$new_path"; then
21096    BOOT_JDK="$new_path"
21097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21099  fi
21100
21101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21103
21104  else
21105    # We're on a posix platform. Hooray! :)
21106    path="$BOOT_JDK"
21107    has_space=`$ECHO "$path" | $GREP " "`
21108    if test "x$has_space" != x; then
21109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21112    fi
21113
21114    # Use eval to expand a potential ~
21115    eval path="$path"
21116    if test ! -f "$path" && test ! -d "$path"; then
21117      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21118    fi
21119
21120    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21121  fi
21122
21123              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21124$as_echo_n "checking for Boot JDK... " >&6; }
21125              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21126$as_echo "$BOOT_JDK" >&6; }
21127              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21128$as_echo_n "checking Boot JDK version... " >&6; }
21129              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21131$as_echo "$BOOT_JDK_VERSION" >&6; }
21132            fi # end check jdk version
21133          fi # end check rt.jar
21134        fi # end check javac
21135      fi # end check java
21136    fi # end check boot jdk found
21137  fi
21138
21139
21140  # Test: Is $JAVA_HOME set?
21141
21142  if test "x$BOOT_JDK_FOUND" = xno; then
21143    # Now execute the test
21144
21145  if test "x$JAVA_HOME" != x; then
21146    JAVA_HOME_PROCESSED="$JAVA_HOME"
21147
21148  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21149
21150  # Input might be given as Windows format, start by converting to
21151  # unix format.
21152  path="$JAVA_HOME_PROCESSED"
21153  new_path=`$CYGPATH -u "$path"`
21154
21155  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21156  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21157  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21158  # "foo.exe" is OK but "foo" is an error.
21159  #
21160  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21161  # It is also a way to make sure we got the proper file name for the real test later on.
21162  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21163  if test "x$test_shortpath" = x; then
21164    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21165$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21166    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21167  fi
21168
21169  # Call helper function which possibly converts this using DOS-style short mode.
21170  # If so, the updated path is stored in $new_path.
21171
21172  input_path="$new_path"
21173  # Check if we need to convert this using DOS-style short mode. If the path
21174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21175  # take no chances and rewrite it.
21176  # Note: m4 eats our [], so we need to use [ and ] instead.
21177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21178  if test "x$has_forbidden_chars" != x; then
21179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21180    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21181    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21182    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21183      # Going to short mode and back again did indeed matter. Since short mode is
21184      # case insensitive, let's make it lowercase to improve readability.
21185      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21186      # Now convert it back to Unix-stile (cygpath)
21187      input_path=`$CYGPATH -u "$shortmode_path"`
21188      new_path="$input_path"
21189    fi
21190  fi
21191
21192  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21193  if test "x$test_cygdrive_prefix" = x; then
21194    # As a simple fix, exclude /usr/bin since it's not a real path.
21195    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21196      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21197      # a path prefixed by /cygdrive for fixpath to work.
21198      new_path="$CYGWIN_ROOT_PATH$input_path"
21199    fi
21200  fi
21201
21202
21203  if test "x$path" != "x$new_path"; then
21204    JAVA_HOME_PROCESSED="$new_path"
21205    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21206$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21207  fi
21208
21209  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21210
21211  path="$JAVA_HOME_PROCESSED"
21212  has_colon=`$ECHO $path | $GREP ^.:`
21213  new_path="$path"
21214  if test "x$has_colon" = x; then
21215    # Not in mixed or Windows style, start by that.
21216    new_path=`cmd //c echo $path`
21217  fi
21218
21219
21220  input_path="$new_path"
21221  # Check if we need to convert this using DOS-style short mode. If the path
21222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21223  # take no chances and rewrite it.
21224  # Note: m4 eats our [], so we need to use [ and ] instead.
21225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21226  if test "x$has_forbidden_chars" != x; then
21227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21228    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21229  fi
21230
21231
21232  windows_path="$new_path"
21233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21234    unix_path=`$CYGPATH -u "$windows_path"`
21235    new_path="$unix_path"
21236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21238    new_path="$unix_path"
21239  fi
21240
21241  if test "x$path" != "x$new_path"; then
21242    JAVA_HOME_PROCESSED="$new_path"
21243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21244$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21245  fi
21246
21247  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21248  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21249
21250  else
21251    # We're on a posix platform. Hooray! :)
21252    path="$JAVA_HOME_PROCESSED"
21253    has_space=`$ECHO "$path" | $GREP " "`
21254    if test "x$has_space" != x; then
21255      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21256$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21257      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21258    fi
21259
21260    # Use eval to expand a potential ~
21261    eval path="$path"
21262    if test ! -f "$path" && test ! -d "$path"; then
21263      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21264    fi
21265
21266    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21267  fi
21268
21269    if test ! -d "$JAVA_HOME_PROCESSED"; then
21270      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21271$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21272    else
21273      # Aha, the user has set a JAVA_HOME
21274      # let us use that as the Boot JDK.
21275      BOOT_JDK="$JAVA_HOME_PROCESSED"
21276      BOOT_JDK_FOUND=maybe
21277      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21278$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21279    fi
21280  fi
21281
21282
21283    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21284    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21285      # Do we have a bin/java?
21286      if test ! -x "$BOOT_JDK/bin/java"; then
21287        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21288$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21289        BOOT_JDK_FOUND=no
21290      else
21291        # Do we have a bin/javac?
21292        if test ! -x "$BOOT_JDK/bin/javac"; then
21293          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21294$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21295          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21296$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21297          BOOT_JDK_FOUND=no
21298        else
21299          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21300          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21301            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21302$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21303            BOOT_JDK_FOUND=no
21304          else
21305            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21306            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21307
21308            # Extra M4 quote needed to protect [] in grep expression.
21309            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21310            if test "x$FOUND_CORRECT_VERSION" = x; then
21311              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21312$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21313              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21314$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21315              BOOT_JDK_FOUND=no
21316            else
21317              # We're done! :-)
21318              BOOT_JDK_FOUND=yes
21319
21320  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21321
21322  # Input might be given as Windows format, start by converting to
21323  # unix format.
21324  path="$BOOT_JDK"
21325  new_path=`$CYGPATH -u "$path"`
21326
21327  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21328  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21329  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21330  # "foo.exe" is OK but "foo" is an error.
21331  #
21332  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21333  # It is also a way to make sure we got the proper file name for the real test later on.
21334  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21335  if test "x$test_shortpath" = x; then
21336    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21338    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21339  fi
21340
21341  # Call helper function which possibly converts this using DOS-style short mode.
21342  # If so, the updated path is stored in $new_path.
21343
21344  input_path="$new_path"
21345  # Check if we need to convert this using DOS-style short mode. If the path
21346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21347  # take no chances and rewrite it.
21348  # Note: m4 eats our [], so we need to use [ and ] instead.
21349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21350  if test "x$has_forbidden_chars" != x; then
21351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21355      # Going to short mode and back again did indeed matter. Since short mode is
21356      # case insensitive, let's make it lowercase to improve readability.
21357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21358      # Now convert it back to Unix-stile (cygpath)
21359      input_path=`$CYGPATH -u "$shortmode_path"`
21360      new_path="$input_path"
21361    fi
21362  fi
21363
21364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21365  if test "x$test_cygdrive_prefix" = x; then
21366    # As a simple fix, exclude /usr/bin since it's not a real path.
21367    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21369      # a path prefixed by /cygdrive for fixpath to work.
21370      new_path="$CYGWIN_ROOT_PATH$input_path"
21371    fi
21372  fi
21373
21374
21375  if test "x$path" != "x$new_path"; then
21376    BOOT_JDK="$new_path"
21377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21378$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21379  fi
21380
21381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21382
21383  path="$BOOT_JDK"
21384  has_colon=`$ECHO $path | $GREP ^.:`
21385  new_path="$path"
21386  if test "x$has_colon" = x; then
21387    # Not in mixed or Windows style, start by that.
21388    new_path=`cmd //c echo $path`
21389  fi
21390
21391
21392  input_path="$new_path"
21393  # Check if we need to convert this using DOS-style short mode. If the path
21394  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21395  # take no chances and rewrite it.
21396  # Note: m4 eats our [], so we need to use [ and ] instead.
21397  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21398  if test "x$has_forbidden_chars" != x; then
21399    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21400    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21401  fi
21402
21403
21404  windows_path="$new_path"
21405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21406    unix_path=`$CYGPATH -u "$windows_path"`
21407    new_path="$unix_path"
21408  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21409    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21410    new_path="$unix_path"
21411  fi
21412
21413  if test "x$path" != "x$new_path"; then
21414    BOOT_JDK="$new_path"
21415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21417  fi
21418
21419  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21420  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21421
21422  else
21423    # We're on a posix platform. Hooray! :)
21424    path="$BOOT_JDK"
21425    has_space=`$ECHO "$path" | $GREP " "`
21426    if test "x$has_space" != x; then
21427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21428$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21429      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21430    fi
21431
21432    # Use eval to expand a potential ~
21433    eval path="$path"
21434    if test ! -f "$path" && test ! -d "$path"; then
21435      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21436    fi
21437
21438    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21439  fi
21440
21441              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21442$as_echo_n "checking for Boot JDK... " >&6; }
21443              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21444$as_echo "$BOOT_JDK" >&6; }
21445              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21446$as_echo_n "checking Boot JDK version... " >&6; }
21447              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21448              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21449$as_echo "$BOOT_JDK_VERSION" >&6; }
21450            fi # end check jdk version
21451          fi # end check rt.jar
21452        fi # end check javac
21453      fi # end check java
21454    fi # end check boot jdk found
21455  fi
21456
21457
21458  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21459
21460  if test "x$BOOT_JDK_FOUND" = xno; then
21461    # Now execute the test
21462
21463  # Extract the first word of "javac", so it can be a program name with args.
21464set dummy javac; ac_word=$2
21465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21466$as_echo_n "checking for $ac_word... " >&6; }
21467if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21468  $as_echo_n "(cached) " >&6
21469else
21470  case $JAVAC_CHECK in
21471  [\\/]* | ?:[\\/]*)
21472  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21473  ;;
21474  *)
21475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21476for as_dir in $PATH
21477do
21478  IFS=$as_save_IFS
21479  test -z "$as_dir" && as_dir=.
21480    for ac_exec_ext in '' $ac_executable_extensions; do
21481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21482    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21484    break 2
21485  fi
21486done
21487  done
21488IFS=$as_save_IFS
21489
21490  ;;
21491esac
21492fi
21493JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21494if test -n "$JAVAC_CHECK"; then
21495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21496$as_echo "$JAVAC_CHECK" >&6; }
21497else
21498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21499$as_echo "no" >&6; }
21500fi
21501
21502
21503  # Extract the first word of "java", so it can be a program name with args.
21504set dummy java; ac_word=$2
21505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21506$as_echo_n "checking for $ac_word... " >&6; }
21507if ${ac_cv_path_JAVA_CHECK+:} false; then :
21508  $as_echo_n "(cached) " >&6
21509else
21510  case $JAVA_CHECK in
21511  [\\/]* | ?:[\\/]*)
21512  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21513  ;;
21514  *)
21515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21516for as_dir in $PATH
21517do
21518  IFS=$as_save_IFS
21519  test -z "$as_dir" && as_dir=.
21520    for ac_exec_ext in '' $ac_executable_extensions; do
21521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21522    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21524    break 2
21525  fi
21526done
21527  done
21528IFS=$as_save_IFS
21529
21530  ;;
21531esac
21532fi
21533JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21534if test -n "$JAVA_CHECK"; then
21535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21536$as_echo "$JAVA_CHECK" >&6; }
21537else
21538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21539$as_echo "no" >&6; }
21540fi
21541
21542
21543  BINARY="$JAVAC_CHECK"
21544  if test "x$JAVAC_CHECK" = x; then
21545    BINARY="$JAVA_CHECK"
21546  fi
21547  if test "x$BINARY" != x; then
21548    # So there is a java(c) binary, it might be part of a JDK.
21549    # Lets find the JDK/JRE directory by following symbolic links.
21550    # Linux/GNU systems often have links from /usr/bin/java to
21551    # /etc/alternatives/java to the real JDK binary.
21552
21553  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21554    # Follow a chain of symbolic links. Use readlink
21555    # where it exists, else fall back to horribly
21556    # complicated shell code.
21557    if test "x$READLINK_TESTED" != yes; then
21558      # On MacOSX there is a readlink tool with a different
21559      # purpose than the GNU readlink tool. Check the found readlink.
21560      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21561      if test "x$ISGNU" = x; then
21562        # A readlink that we do not know how to use.
21563        # Are there other non-GNU readlinks out there?
21564        READLINK_TESTED=yes
21565        READLINK=
21566      fi
21567    fi
21568
21569    if test "x$READLINK" != x; then
21570      BINARY=`$READLINK -f $BINARY`
21571    else
21572      # Save the current directory for restoring afterwards
21573      STARTDIR=$PWD
21574      COUNTER=0
21575      sym_link_dir=`$DIRNAME $BINARY`
21576      sym_link_file=`$BASENAME $BINARY`
21577      cd $sym_link_dir
21578      # Use -P flag to resolve symlinks in directories.
21579      cd `$THEPWDCMD -P`
21580      sym_link_dir=`$THEPWDCMD -P`
21581      # Resolve file symlinks
21582      while test $COUNTER -lt 20; do
21583        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21584        if test "x$ISLINK" == x; then
21585          # This is not a symbolic link! We are done!
21586          break
21587        fi
21588        # Again resolve directory symlinks since the target of the just found
21589        # link could be in a different directory
21590        cd `$DIRNAME $ISLINK`
21591        sym_link_dir=`$THEPWDCMD -P`
21592        sym_link_file=`$BASENAME $ISLINK`
21593        let COUNTER=COUNTER+1
21594      done
21595      cd $STARTDIR
21596      BINARY=$sym_link_dir/$sym_link_file
21597    fi
21598  fi
21599
21600    BOOT_JDK=`dirname "$BINARY"`
21601    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21602    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21603      # Looks like we found ourselves an JDK
21604      BOOT_JDK_FOUND=maybe
21605      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21606$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21607    fi
21608  fi
21609
21610
21611    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21612    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21613      # Do we have a bin/java?
21614      if test ! -x "$BOOT_JDK/bin/java"; then
21615        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21616$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21617        BOOT_JDK_FOUND=no
21618      else
21619        # Do we have a bin/javac?
21620        if test ! -x "$BOOT_JDK/bin/javac"; then
21621          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21623          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21624$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21625          BOOT_JDK_FOUND=no
21626        else
21627          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21628          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21629            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21630$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21631            BOOT_JDK_FOUND=no
21632          else
21633            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21634            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21635
21636            # Extra M4 quote needed to protect [] in grep expression.
21637            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21638            if test "x$FOUND_CORRECT_VERSION" = x; then
21639              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21641              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21642$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21643              BOOT_JDK_FOUND=no
21644            else
21645              # We're done! :-)
21646              BOOT_JDK_FOUND=yes
21647
21648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21649
21650  # Input might be given as Windows format, start by converting to
21651  # unix format.
21652  path="$BOOT_JDK"
21653  new_path=`$CYGPATH -u "$path"`
21654
21655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21658  # "foo.exe" is OK but "foo" is an error.
21659  #
21660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21661  # It is also a way to make sure we got the proper file name for the real test later on.
21662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21663  if test "x$test_shortpath" = x; then
21664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21665$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21666    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21667  fi
21668
21669  # Call helper function which possibly converts this using DOS-style short mode.
21670  # If so, the updated path is stored in $new_path.
21671
21672  input_path="$new_path"
21673  # Check if we need to convert this using DOS-style short mode. If the path
21674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21675  # take no chances and rewrite it.
21676  # Note: m4 eats our [], so we need to use [ and ] instead.
21677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21678  if test "x$has_forbidden_chars" != x; then
21679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21683      # Going to short mode and back again did indeed matter. Since short mode is
21684      # case insensitive, let's make it lowercase to improve readability.
21685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21686      # Now convert it back to Unix-stile (cygpath)
21687      input_path=`$CYGPATH -u "$shortmode_path"`
21688      new_path="$input_path"
21689    fi
21690  fi
21691
21692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21693  if test "x$test_cygdrive_prefix" = x; then
21694    # As a simple fix, exclude /usr/bin since it's not a real path.
21695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21697      # a path prefixed by /cygdrive for fixpath to work.
21698      new_path="$CYGWIN_ROOT_PATH$input_path"
21699    fi
21700  fi
21701
21702
21703  if test "x$path" != "x$new_path"; then
21704    BOOT_JDK="$new_path"
21705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21706$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21707  fi
21708
21709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21710
21711  path="$BOOT_JDK"
21712  has_colon=`$ECHO $path | $GREP ^.:`
21713  new_path="$path"
21714  if test "x$has_colon" = x; then
21715    # Not in mixed or Windows style, start by that.
21716    new_path=`cmd //c echo $path`
21717  fi
21718
21719
21720  input_path="$new_path"
21721  # Check if we need to convert this using DOS-style short mode. If the path
21722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21723  # take no chances and rewrite it.
21724  # Note: m4 eats our [], so we need to use [ and ] instead.
21725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21726  if test "x$has_forbidden_chars" != x; then
21727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21729  fi
21730
21731
21732  windows_path="$new_path"
21733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21734    unix_path=`$CYGPATH -u "$windows_path"`
21735    new_path="$unix_path"
21736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21738    new_path="$unix_path"
21739  fi
21740
21741  if test "x$path" != "x$new_path"; then
21742    BOOT_JDK="$new_path"
21743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21744$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21745  fi
21746
21747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21749
21750  else
21751    # We're on a posix platform. Hooray! :)
21752    path="$BOOT_JDK"
21753    has_space=`$ECHO "$path" | $GREP " "`
21754    if test "x$has_space" != x; then
21755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21756$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21757      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21758    fi
21759
21760    # Use eval to expand a potential ~
21761    eval path="$path"
21762    if test ! -f "$path" && test ! -d "$path"; then
21763      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21764    fi
21765
21766    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21767  fi
21768
21769              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21770$as_echo_n "checking for Boot JDK... " >&6; }
21771              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21772$as_echo "$BOOT_JDK" >&6; }
21773              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21774$as_echo_n "checking Boot JDK version... " >&6; }
21775              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21776              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21777$as_echo "$BOOT_JDK_VERSION" >&6; }
21778            fi # end check jdk version
21779          fi # end check rt.jar
21780        fi # end check javac
21781      fi # end check java
21782    fi # end check boot jdk found
21783  fi
21784
21785
21786  # Test: Is there a JDK installed in default, well-known locations?
21787
21788  if test "x$BOOT_JDK_FOUND" = xno; then
21789    # Now execute the test
21790
21791  if test "x$OPENJDK_TARGET_OS" = xwindows; then
21792
21793  if test "x$BOOT_JDK_FOUND" = xno; then
21794    # Now execute the test
21795
21796  if test "x$ProgramW6432" != x; then
21797    VIRTUAL_DIR="$ProgramW6432/Java"
21798
21799  windows_path="$VIRTUAL_DIR"
21800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21801    unix_path=`$CYGPATH -u "$windows_path"`
21802    VIRTUAL_DIR="$unix_path"
21803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21805    VIRTUAL_DIR="$unix_path"
21806  fi
21807
21808
21809  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
21810  BOOT_JDK_SUFFIX=""
21811  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
21812  if test "x$ALL_JDKS_FOUND" != x; then
21813    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
21814
21815  if test "x$BOOT_JDK_FOUND" = xno; then
21816    # Now execute the test
21817
21818        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
21819        if test -d "$BOOT_JDK"; then
21820          BOOT_JDK_FOUND=maybe
21821          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
21822$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
21823        fi
21824
21825
21826    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21827    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21828      # Do we have a bin/java?
21829      if test ! -x "$BOOT_JDK/bin/java"; then
21830        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21831$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21832        BOOT_JDK_FOUND=no
21833      else
21834        # Do we have a bin/javac?
21835        if test ! -x "$BOOT_JDK/bin/javac"; then
21836          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21837$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21838          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21839$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21840          BOOT_JDK_FOUND=no
21841        else
21842          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21843          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21844            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21846            BOOT_JDK_FOUND=no
21847          else
21848            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21849            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21850
21851            # Extra M4 quote needed to protect [] in grep expression.
21852            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
21853            if test "x$FOUND_CORRECT_VERSION" = x; then
21854              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21856              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
21857$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
21858              BOOT_JDK_FOUND=no
21859            else
21860              # We're done! :-)
21861              BOOT_JDK_FOUND=yes
21862
21863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21864
21865  # Input might be given as Windows format, start by converting to
21866  # unix format.
21867  path="$BOOT_JDK"
21868  new_path=`$CYGPATH -u "$path"`
21869
21870  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21871  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21872  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21873  # "foo.exe" is OK but "foo" is an error.
21874  #
21875  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21876  # It is also a way to make sure we got the proper file name for the real test later on.
21877  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21878  if test "x$test_shortpath" = x; then
21879    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21880$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21881    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21882  fi
21883
21884  # Call helper function which possibly converts this using DOS-style short mode.
21885  # If so, the updated path is stored in $new_path.
21886
21887  input_path="$new_path"
21888  # Check if we need to convert this using DOS-style short mode. If the path
21889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21890  # take no chances and rewrite it.
21891  # Note: m4 eats our [], so we need to use [ and ] instead.
21892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21893  if test "x$has_forbidden_chars" != x; then
21894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21898      # Going to short mode and back again did indeed matter. Since short mode is
21899      # case insensitive, let's make it lowercase to improve readability.
21900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21901      # Now convert it back to Unix-stile (cygpath)
21902      input_path=`$CYGPATH -u "$shortmode_path"`
21903      new_path="$input_path"
21904    fi
21905  fi
21906
21907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21908  if test "x$test_cygdrive_prefix" = x; then
21909    # As a simple fix, exclude /usr/bin since it's not a real path.
21910    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21912      # a path prefixed by /cygdrive for fixpath to work.
21913      new_path="$CYGWIN_ROOT_PATH$input_path"
21914    fi
21915  fi
21916
21917
21918  if test "x$path" != "x$new_path"; then
21919    BOOT_JDK="$new_path"
21920    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21921$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21922  fi
21923
21924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21925
21926  path="$BOOT_JDK"
21927  has_colon=`$ECHO $path | $GREP ^.:`
21928  new_path="$path"
21929  if test "x$has_colon" = x; then
21930    # Not in mixed or Windows style, start by that.
21931    new_path=`cmd //c echo $path`
21932  fi
21933
21934
21935  input_path="$new_path"
21936  # Check if we need to convert this using DOS-style short mode. If the path
21937  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21938  # take no chances and rewrite it.
21939  # Note: m4 eats our [], so we need to use [ and ] instead.
21940  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21941  if test "x$has_forbidden_chars" != x; then
21942    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21943    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21944  fi
21945
21946
21947  windows_path="$new_path"
21948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21949    unix_path=`$CYGPATH -u "$windows_path"`
21950    new_path="$unix_path"
21951  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21952    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21953    new_path="$unix_path"
21954  fi
21955
21956  if test "x$path" != "x$new_path"; then
21957    BOOT_JDK="$new_path"
21958    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21959$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21960  fi
21961
21962  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21963  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21964
21965  else
21966    # We're on a posix platform. Hooray! :)
21967    path="$BOOT_JDK"
21968    has_space=`$ECHO "$path" | $GREP " "`
21969    if test "x$has_space" != x; then
21970      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21971$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21972      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21973    fi
21974
21975    # Use eval to expand a potential ~
21976    eval path="$path"
21977    if test ! -f "$path" && test ! -d "$path"; then
21978      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21979    fi
21980
21981    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21982  fi
21983
21984              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21985$as_echo_n "checking for Boot JDK... " >&6; }
21986              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21987$as_echo "$BOOT_JDK" >&6; }
21988              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21989$as_echo_n "checking Boot JDK version... " >&6; }
21990              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21991              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21992$as_echo "$BOOT_JDK_VERSION" >&6; }
21993            fi # end check jdk version
21994          fi # end check rt.jar
21995        fi # end check javac
21996      fi # end check java
21997    fi # end check boot jdk found
21998  fi
21999
22000    done
22001  fi
22002
22003  fi
22004
22005
22006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22008      # Do we have a bin/java?
22009      if test ! -x "$BOOT_JDK/bin/java"; then
22010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22012        BOOT_JDK_FOUND=no
22013      else
22014        # Do we have a bin/javac?
22015        if test ! -x "$BOOT_JDK/bin/javac"; then
22016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22020          BOOT_JDK_FOUND=no
22021        else
22022          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22023          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22024            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22025$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22026            BOOT_JDK_FOUND=no
22027          else
22028            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22029            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22030
22031            # Extra M4 quote needed to protect [] in grep expression.
22032            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22033            if test "x$FOUND_CORRECT_VERSION" = x; then
22034              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22035$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22036              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22037$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22038              BOOT_JDK_FOUND=no
22039            else
22040              # We're done! :-)
22041              BOOT_JDK_FOUND=yes
22042
22043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22044
22045  # Input might be given as Windows format, start by converting to
22046  # unix format.
22047  path="$BOOT_JDK"
22048  new_path=`$CYGPATH -u "$path"`
22049
22050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22053  # "foo.exe" is OK but "foo" is an error.
22054  #
22055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22056  # It is also a way to make sure we got the proper file name for the real test later on.
22057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22058  if test "x$test_shortpath" = x; then
22059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22060$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22061    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22062  fi
22063
22064  # Call helper function which possibly converts this using DOS-style short mode.
22065  # If so, the updated path is stored in $new_path.
22066
22067  input_path="$new_path"
22068  # Check if we need to convert this using DOS-style short mode. If the path
22069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22070  # take no chances and rewrite it.
22071  # Note: m4 eats our [], so we need to use [ and ] instead.
22072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22073  if test "x$has_forbidden_chars" != x; then
22074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22078      # Going to short mode and back again did indeed matter. Since short mode is
22079      # case insensitive, let's make it lowercase to improve readability.
22080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22081      # Now convert it back to Unix-stile (cygpath)
22082      input_path=`$CYGPATH -u "$shortmode_path"`
22083      new_path="$input_path"
22084    fi
22085  fi
22086
22087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22088  if test "x$test_cygdrive_prefix" = x; then
22089    # As a simple fix, exclude /usr/bin since it's not a real path.
22090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22092      # a path prefixed by /cygdrive for fixpath to work.
22093      new_path="$CYGWIN_ROOT_PATH$input_path"
22094    fi
22095  fi
22096
22097
22098  if test "x$path" != "x$new_path"; then
22099    BOOT_JDK="$new_path"
22100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22101$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22102  fi
22103
22104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22105
22106  path="$BOOT_JDK"
22107  has_colon=`$ECHO $path | $GREP ^.:`
22108  new_path="$path"
22109  if test "x$has_colon" = x; then
22110    # Not in mixed or Windows style, start by that.
22111    new_path=`cmd //c echo $path`
22112  fi
22113
22114
22115  input_path="$new_path"
22116  # Check if we need to convert this using DOS-style short mode. If the path
22117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22118  # take no chances and rewrite it.
22119  # Note: m4 eats our [], so we need to use [ and ] instead.
22120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22121  if test "x$has_forbidden_chars" != x; then
22122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22124  fi
22125
22126
22127  windows_path="$new_path"
22128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22129    unix_path=`$CYGPATH -u "$windows_path"`
22130    new_path="$unix_path"
22131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22133    new_path="$unix_path"
22134  fi
22135
22136  if test "x$path" != "x$new_path"; then
22137    BOOT_JDK="$new_path"
22138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22139$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22140  fi
22141
22142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22144
22145  else
22146    # We're on a posix platform. Hooray! :)
22147    path="$BOOT_JDK"
22148    has_space=`$ECHO "$path" | $GREP " "`
22149    if test "x$has_space" != x; then
22150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22151$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22153    fi
22154
22155    # Use eval to expand a potential ~
22156    eval path="$path"
22157    if test ! -f "$path" && test ! -d "$path"; then
22158      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22159    fi
22160
22161    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22162  fi
22163
22164              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22165$as_echo_n "checking for Boot JDK... " >&6; }
22166              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22167$as_echo "$BOOT_JDK" >&6; }
22168              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22169$as_echo_n "checking Boot JDK version... " >&6; }
22170              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22171              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22172$as_echo "$BOOT_JDK_VERSION" >&6; }
22173            fi # end check jdk version
22174          fi # end check rt.jar
22175        fi # end check javac
22176      fi # end check java
22177    fi # end check boot jdk found
22178  fi
22179
22180
22181  if test "x$BOOT_JDK_FOUND" = xno; then
22182    # Now execute the test
22183
22184  if test "x$PROGRAMW6432" != x; then
22185    VIRTUAL_DIR="$PROGRAMW6432/Java"
22186
22187  windows_path="$VIRTUAL_DIR"
22188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22189    unix_path=`$CYGPATH -u "$windows_path"`
22190    VIRTUAL_DIR="$unix_path"
22191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22192    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22193    VIRTUAL_DIR="$unix_path"
22194  fi
22195
22196
22197  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22198  BOOT_JDK_SUFFIX=""
22199  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22200  if test "x$ALL_JDKS_FOUND" != x; then
22201    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22202
22203  if test "x$BOOT_JDK_FOUND" = xno; then
22204    # Now execute the test
22205
22206        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22207        if test -d "$BOOT_JDK"; then
22208          BOOT_JDK_FOUND=maybe
22209          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22210$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22211        fi
22212
22213
22214    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22215    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22216      # Do we have a bin/java?
22217      if test ! -x "$BOOT_JDK/bin/java"; then
22218        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22220        BOOT_JDK_FOUND=no
22221      else
22222        # Do we have a bin/javac?
22223        if test ! -x "$BOOT_JDK/bin/javac"; then
22224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22225$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22226          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22227$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22228          BOOT_JDK_FOUND=no
22229        else
22230          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22231          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22232            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22233$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22234            BOOT_JDK_FOUND=no
22235          else
22236            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22237            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22238
22239            # Extra M4 quote needed to protect [] in grep expression.
22240            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22241            if test "x$FOUND_CORRECT_VERSION" = x; then
22242              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22244              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22245$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22246              BOOT_JDK_FOUND=no
22247            else
22248              # We're done! :-)
22249              BOOT_JDK_FOUND=yes
22250
22251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22252
22253  # Input might be given as Windows format, start by converting to
22254  # unix format.
22255  path="$BOOT_JDK"
22256  new_path=`$CYGPATH -u "$path"`
22257
22258  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22259  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22260  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22261  # "foo.exe" is OK but "foo" is an error.
22262  #
22263  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22264  # It is also a way to make sure we got the proper file name for the real test later on.
22265  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22266  if test "x$test_shortpath" = x; then
22267    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22268$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22269    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22270  fi
22271
22272  # Call helper function which possibly converts this using DOS-style short mode.
22273  # If so, the updated path is stored in $new_path.
22274
22275  input_path="$new_path"
22276  # Check if we need to convert this using DOS-style short mode. If the path
22277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22278  # take no chances and rewrite it.
22279  # Note: m4 eats our [], so we need to use [ and ] instead.
22280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22281  if test "x$has_forbidden_chars" != x; then
22282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22283    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22284    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22285    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22286      # Going to short mode and back again did indeed matter. Since short mode is
22287      # case insensitive, let's make it lowercase to improve readability.
22288      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22289      # Now convert it back to Unix-stile (cygpath)
22290      input_path=`$CYGPATH -u "$shortmode_path"`
22291      new_path="$input_path"
22292    fi
22293  fi
22294
22295  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22296  if test "x$test_cygdrive_prefix" = x; then
22297    # As a simple fix, exclude /usr/bin since it's not a real path.
22298    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22299      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22300      # a path prefixed by /cygdrive for fixpath to work.
22301      new_path="$CYGWIN_ROOT_PATH$input_path"
22302    fi
22303  fi
22304
22305
22306  if test "x$path" != "x$new_path"; then
22307    BOOT_JDK="$new_path"
22308    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22309$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22310  fi
22311
22312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22313
22314  path="$BOOT_JDK"
22315  has_colon=`$ECHO $path | $GREP ^.:`
22316  new_path="$path"
22317  if test "x$has_colon" = x; then
22318    # Not in mixed or Windows style, start by that.
22319    new_path=`cmd //c echo $path`
22320  fi
22321
22322
22323  input_path="$new_path"
22324  # Check if we need to convert this using DOS-style short mode. If the path
22325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22326  # take no chances and rewrite it.
22327  # Note: m4 eats our [], so we need to use [ and ] instead.
22328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22329  if test "x$has_forbidden_chars" != x; then
22330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22331    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22332  fi
22333
22334
22335  windows_path="$new_path"
22336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22337    unix_path=`$CYGPATH -u "$windows_path"`
22338    new_path="$unix_path"
22339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22341    new_path="$unix_path"
22342  fi
22343
22344  if test "x$path" != "x$new_path"; then
22345    BOOT_JDK="$new_path"
22346    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22347$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22348  fi
22349
22350  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22351  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22352
22353  else
22354    # We're on a posix platform. Hooray! :)
22355    path="$BOOT_JDK"
22356    has_space=`$ECHO "$path" | $GREP " "`
22357    if test "x$has_space" != x; then
22358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22359$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22360      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22361    fi
22362
22363    # Use eval to expand a potential ~
22364    eval path="$path"
22365    if test ! -f "$path" && test ! -d "$path"; then
22366      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22367    fi
22368
22369    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22370  fi
22371
22372              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22373$as_echo_n "checking for Boot JDK... " >&6; }
22374              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22375$as_echo "$BOOT_JDK" >&6; }
22376              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22377$as_echo_n "checking Boot JDK version... " >&6; }
22378              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22379              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22380$as_echo "$BOOT_JDK_VERSION" >&6; }
22381            fi # end check jdk version
22382          fi # end check rt.jar
22383        fi # end check javac
22384      fi # end check java
22385    fi # end check boot jdk found
22386  fi
22387
22388    done
22389  fi
22390
22391  fi
22392
22393
22394    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22395    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22396      # Do we have a bin/java?
22397      if test ! -x "$BOOT_JDK/bin/java"; then
22398        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22400        BOOT_JDK_FOUND=no
22401      else
22402        # Do we have a bin/javac?
22403        if test ! -x "$BOOT_JDK/bin/javac"; then
22404          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22405$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22406          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22407$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22408          BOOT_JDK_FOUND=no
22409        else
22410          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22411          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22412            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22413$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22414            BOOT_JDK_FOUND=no
22415          else
22416            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22417            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22418
22419            # Extra M4 quote needed to protect [] in grep expression.
22420            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22421            if test "x$FOUND_CORRECT_VERSION" = x; then
22422              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22423$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22424              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22425$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22426              BOOT_JDK_FOUND=no
22427            else
22428              # We're done! :-)
22429              BOOT_JDK_FOUND=yes
22430
22431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22432
22433  # Input might be given as Windows format, start by converting to
22434  # unix format.
22435  path="$BOOT_JDK"
22436  new_path=`$CYGPATH -u "$path"`
22437
22438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22441  # "foo.exe" is OK but "foo" is an error.
22442  #
22443  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22444  # It is also a way to make sure we got the proper file name for the real test later on.
22445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22446  if test "x$test_shortpath" = x; then
22447    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22448$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22449    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22450  fi
22451
22452  # Call helper function which possibly converts this using DOS-style short mode.
22453  # If so, the updated path is stored in $new_path.
22454
22455  input_path="$new_path"
22456  # Check if we need to convert this using DOS-style short mode. If the path
22457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22458  # take no chances and rewrite it.
22459  # Note: m4 eats our [], so we need to use [ and ] instead.
22460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22461  if test "x$has_forbidden_chars" != x; then
22462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22466      # Going to short mode and back again did indeed matter. Since short mode is
22467      # case insensitive, let's make it lowercase to improve readability.
22468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22469      # Now convert it back to Unix-stile (cygpath)
22470      input_path=`$CYGPATH -u "$shortmode_path"`
22471      new_path="$input_path"
22472    fi
22473  fi
22474
22475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22476  if test "x$test_cygdrive_prefix" = x; then
22477    # As a simple fix, exclude /usr/bin since it's not a real path.
22478    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22480      # a path prefixed by /cygdrive for fixpath to work.
22481      new_path="$CYGWIN_ROOT_PATH$input_path"
22482    fi
22483  fi
22484
22485
22486  if test "x$path" != "x$new_path"; then
22487    BOOT_JDK="$new_path"
22488    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22489$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22490  fi
22491
22492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22493
22494  path="$BOOT_JDK"
22495  has_colon=`$ECHO $path | $GREP ^.:`
22496  new_path="$path"
22497  if test "x$has_colon" = x; then
22498    # Not in mixed or Windows style, start by that.
22499    new_path=`cmd //c echo $path`
22500  fi
22501
22502
22503  input_path="$new_path"
22504  # Check if we need to convert this using DOS-style short mode. If the path
22505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22506  # take no chances and rewrite it.
22507  # Note: m4 eats our [], so we need to use [ and ] instead.
22508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22509  if test "x$has_forbidden_chars" != x; then
22510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22511    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22512  fi
22513
22514
22515  windows_path="$new_path"
22516  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22517    unix_path=`$CYGPATH -u "$windows_path"`
22518    new_path="$unix_path"
22519  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22520    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22521    new_path="$unix_path"
22522  fi
22523
22524  if test "x$path" != "x$new_path"; then
22525    BOOT_JDK="$new_path"
22526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22528  fi
22529
22530  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22531  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22532
22533  else
22534    # We're on a posix platform. Hooray! :)
22535    path="$BOOT_JDK"
22536    has_space=`$ECHO "$path" | $GREP " "`
22537    if test "x$has_space" != x; then
22538      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22539$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22540      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22541    fi
22542
22543    # Use eval to expand a potential ~
22544    eval path="$path"
22545    if test ! -f "$path" && test ! -d "$path"; then
22546      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22547    fi
22548
22549    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22550  fi
22551
22552              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22553$as_echo_n "checking for Boot JDK... " >&6; }
22554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22555$as_echo "$BOOT_JDK" >&6; }
22556              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22557$as_echo_n "checking Boot JDK version... " >&6; }
22558              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22559              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22560$as_echo "$BOOT_JDK_VERSION" >&6; }
22561            fi # end check jdk version
22562          fi # end check rt.jar
22563        fi # end check javac
22564      fi # end check java
22565    fi # end check boot jdk found
22566  fi
22567
22568
22569  if test "x$BOOT_JDK_FOUND" = xno; then
22570    # Now execute the test
22571
22572  if test "x$PROGRAMFILES" != x; then
22573    VIRTUAL_DIR="$PROGRAMFILES/Java"
22574
22575  windows_path="$VIRTUAL_DIR"
22576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22577    unix_path=`$CYGPATH -u "$windows_path"`
22578    VIRTUAL_DIR="$unix_path"
22579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22581    VIRTUAL_DIR="$unix_path"
22582  fi
22583
22584
22585  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22586  BOOT_JDK_SUFFIX=""
22587  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22588  if test "x$ALL_JDKS_FOUND" != x; then
22589    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22590
22591  if test "x$BOOT_JDK_FOUND" = xno; then
22592    # Now execute the test
22593
22594        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22595        if test -d "$BOOT_JDK"; then
22596          BOOT_JDK_FOUND=maybe
22597          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22598$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22599        fi
22600
22601
22602    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22603    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22604      # Do we have a bin/java?
22605      if test ! -x "$BOOT_JDK/bin/java"; then
22606        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22608        BOOT_JDK_FOUND=no
22609      else
22610        # Do we have a bin/javac?
22611        if test ! -x "$BOOT_JDK/bin/javac"; then
22612          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22613$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22614          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22615$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22616          BOOT_JDK_FOUND=no
22617        else
22618          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22619          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22620            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22621$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22622            BOOT_JDK_FOUND=no
22623          else
22624            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22625            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22626
22627            # Extra M4 quote needed to protect [] in grep expression.
22628            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22629            if test "x$FOUND_CORRECT_VERSION" = x; then
22630              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22631$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22632              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22633$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22634              BOOT_JDK_FOUND=no
22635            else
22636              # We're done! :-)
22637              BOOT_JDK_FOUND=yes
22638
22639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22640
22641  # Input might be given as Windows format, start by converting to
22642  # unix format.
22643  path="$BOOT_JDK"
22644  new_path=`$CYGPATH -u "$path"`
22645
22646  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22647  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22648  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22649  # "foo.exe" is OK but "foo" is an error.
22650  #
22651  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22652  # It is also a way to make sure we got the proper file name for the real test later on.
22653  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22654  if test "x$test_shortpath" = x; then
22655    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22656$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22657    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22658  fi
22659
22660  # Call helper function which possibly converts this using DOS-style short mode.
22661  # If so, the updated path is stored in $new_path.
22662
22663  input_path="$new_path"
22664  # Check if we need to convert this using DOS-style short mode. If the path
22665  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22666  # take no chances and rewrite it.
22667  # Note: m4 eats our [], so we need to use [ and ] instead.
22668  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22669  if test "x$has_forbidden_chars" != x; then
22670    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22671    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22672    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22673    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22674      # Going to short mode and back again did indeed matter. Since short mode is
22675      # case insensitive, let's make it lowercase to improve readability.
22676      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22677      # Now convert it back to Unix-stile (cygpath)
22678      input_path=`$CYGPATH -u "$shortmode_path"`
22679      new_path="$input_path"
22680    fi
22681  fi
22682
22683  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22684  if test "x$test_cygdrive_prefix" = x; then
22685    # As a simple fix, exclude /usr/bin since it's not a real path.
22686    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22687      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22688      # a path prefixed by /cygdrive for fixpath to work.
22689      new_path="$CYGWIN_ROOT_PATH$input_path"
22690    fi
22691  fi
22692
22693
22694  if test "x$path" != "x$new_path"; then
22695    BOOT_JDK="$new_path"
22696    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22697$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22698  fi
22699
22700  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22701
22702  path="$BOOT_JDK"
22703  has_colon=`$ECHO $path | $GREP ^.:`
22704  new_path="$path"
22705  if test "x$has_colon" = x; then
22706    # Not in mixed or Windows style, start by that.
22707    new_path=`cmd //c echo $path`
22708  fi
22709
22710
22711  input_path="$new_path"
22712  # Check if we need to convert this using DOS-style short mode. If the path
22713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22714  # take no chances and rewrite it.
22715  # Note: m4 eats our [], so we need to use [ and ] instead.
22716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22717  if test "x$has_forbidden_chars" != x; then
22718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22719    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22720  fi
22721
22722
22723  windows_path="$new_path"
22724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22725    unix_path=`$CYGPATH -u "$windows_path"`
22726    new_path="$unix_path"
22727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22729    new_path="$unix_path"
22730  fi
22731
22732  if test "x$path" != "x$new_path"; then
22733    BOOT_JDK="$new_path"
22734    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22735$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22736  fi
22737
22738  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22739  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22740
22741  else
22742    # We're on a posix platform. Hooray! :)
22743    path="$BOOT_JDK"
22744    has_space=`$ECHO "$path" | $GREP " "`
22745    if test "x$has_space" != x; then
22746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22747$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22748      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22749    fi
22750
22751    # Use eval to expand a potential ~
22752    eval path="$path"
22753    if test ! -f "$path" && test ! -d "$path"; then
22754      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22755    fi
22756
22757    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22758  fi
22759
22760              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22761$as_echo_n "checking for Boot JDK... " >&6; }
22762              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22763$as_echo "$BOOT_JDK" >&6; }
22764              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22765$as_echo_n "checking Boot JDK version... " >&6; }
22766              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22767              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22768$as_echo "$BOOT_JDK_VERSION" >&6; }
22769            fi # end check jdk version
22770          fi # end check rt.jar
22771        fi # end check javac
22772      fi # end check java
22773    fi # end check boot jdk found
22774  fi
22775
22776    done
22777  fi
22778
22779  fi
22780
22781
22782    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22783    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22784      # Do we have a bin/java?
22785      if test ! -x "$BOOT_JDK/bin/java"; then
22786        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22787$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22788        BOOT_JDK_FOUND=no
22789      else
22790        # Do we have a bin/javac?
22791        if test ! -x "$BOOT_JDK/bin/javac"; then
22792          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22793$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22794          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22795$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22796          BOOT_JDK_FOUND=no
22797        else
22798          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22799          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22800            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22801$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22802            BOOT_JDK_FOUND=no
22803          else
22804            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22805            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22806
22807            # Extra M4 quote needed to protect [] in grep expression.
22808            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
22809            if test "x$FOUND_CORRECT_VERSION" = x; then
22810              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22811$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22812              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
22813$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
22814              BOOT_JDK_FOUND=no
22815            else
22816              # We're done! :-)
22817              BOOT_JDK_FOUND=yes
22818
22819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22820
22821  # Input might be given as Windows format, start by converting to
22822  # unix format.
22823  path="$BOOT_JDK"
22824  new_path=`$CYGPATH -u "$path"`
22825
22826  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22827  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22828  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22829  # "foo.exe" is OK but "foo" is an error.
22830  #
22831  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22832  # It is also a way to make sure we got the proper file name for the real test later on.
22833  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22834  if test "x$test_shortpath" = x; then
22835    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22836$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22837    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22838  fi
22839
22840  # Call helper function which possibly converts this using DOS-style short mode.
22841  # If so, the updated path is stored in $new_path.
22842
22843  input_path="$new_path"
22844  # Check if we need to convert this using DOS-style short mode. If the path
22845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22846  # take no chances and rewrite it.
22847  # Note: m4 eats our [], so we need to use [ and ] instead.
22848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22849  if test "x$has_forbidden_chars" != x; then
22850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22851    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22852    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22853    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22854      # Going to short mode and back again did indeed matter. Since short mode is
22855      # case insensitive, let's make it lowercase to improve readability.
22856      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22857      # Now convert it back to Unix-stile (cygpath)
22858      input_path=`$CYGPATH -u "$shortmode_path"`
22859      new_path="$input_path"
22860    fi
22861  fi
22862
22863  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22864  if test "x$test_cygdrive_prefix" = x; then
22865    # As a simple fix, exclude /usr/bin since it's not a real path.
22866    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22867      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22868      # a path prefixed by /cygdrive for fixpath to work.
22869      new_path="$CYGWIN_ROOT_PATH$input_path"
22870    fi
22871  fi
22872
22873
22874  if test "x$path" != "x$new_path"; then
22875    BOOT_JDK="$new_path"
22876    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22877$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22878  fi
22879
22880  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22881
22882  path="$BOOT_JDK"
22883  has_colon=`$ECHO $path | $GREP ^.:`
22884  new_path="$path"
22885  if test "x$has_colon" = x; then
22886    # Not in mixed or Windows style, start by that.
22887    new_path=`cmd //c echo $path`
22888  fi
22889
22890
22891  input_path="$new_path"
22892  # Check if we need to convert this using DOS-style short mode. If the path
22893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22894  # take no chances and rewrite it.
22895  # Note: m4 eats our [], so we need to use [ and ] instead.
22896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22897  if test "x$has_forbidden_chars" != x; then
22898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22900  fi
22901
22902
22903  windows_path="$new_path"
22904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22905    unix_path=`$CYGPATH -u "$windows_path"`
22906    new_path="$unix_path"
22907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22909    new_path="$unix_path"
22910  fi
22911
22912  if test "x$path" != "x$new_path"; then
22913    BOOT_JDK="$new_path"
22914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22916  fi
22917
22918  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22919  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22920
22921  else
22922    # We're on a posix platform. Hooray! :)
22923    path="$BOOT_JDK"
22924    has_space=`$ECHO "$path" | $GREP " "`
22925    if test "x$has_space" != x; then
22926      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22927$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22928      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22929    fi
22930
22931    # Use eval to expand a potential ~
22932    eval path="$path"
22933    if test ! -f "$path" && test ! -d "$path"; then
22934      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22935    fi
22936
22937    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22938  fi
22939
22940              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22941$as_echo_n "checking for Boot JDK... " >&6; }
22942              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22943$as_echo "$BOOT_JDK" >&6; }
22944              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22945$as_echo_n "checking Boot JDK version... " >&6; }
22946              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22947              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22948$as_echo "$BOOT_JDK_VERSION" >&6; }
22949            fi # end check jdk version
22950          fi # end check rt.jar
22951        fi # end check javac
22952      fi # end check java
22953    fi # end check boot jdk found
22954  fi
22955
22956
22957  if test "x$BOOT_JDK_FOUND" = xno; then
22958    # Now execute the test
22959
22960  if test "x$ProgramFiles" != x; then
22961    VIRTUAL_DIR="$ProgramFiles/Java"
22962
22963  windows_path="$VIRTUAL_DIR"
22964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22965    unix_path=`$CYGPATH -u "$windows_path"`
22966    VIRTUAL_DIR="$unix_path"
22967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22969    VIRTUAL_DIR="$unix_path"
22970  fi
22971
22972
22973  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22974  BOOT_JDK_SUFFIX=""
22975  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22976  if test "x$ALL_JDKS_FOUND" != x; then
22977    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22978
22979  if test "x$BOOT_JDK_FOUND" = xno; then
22980    # Now execute the test
22981
22982        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22983        if test -d "$BOOT_JDK"; then
22984          BOOT_JDK_FOUND=maybe
22985          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22986$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22987        fi
22988
22989
22990    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22991    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22992      # Do we have a bin/java?
22993      if test ! -x "$BOOT_JDK/bin/java"; then
22994        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22995$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22996        BOOT_JDK_FOUND=no
22997      else
22998        # Do we have a bin/javac?
22999        if test ! -x "$BOOT_JDK/bin/javac"; then
23000          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23001$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23002          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23003$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23004          BOOT_JDK_FOUND=no
23005        else
23006          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23007          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23008            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23009$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23010            BOOT_JDK_FOUND=no
23011          else
23012            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23013            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23014
23015            # Extra M4 quote needed to protect [] in grep expression.
23016            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23017            if test "x$FOUND_CORRECT_VERSION" = x; then
23018              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23019$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23020              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23021$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23022              BOOT_JDK_FOUND=no
23023            else
23024              # We're done! :-)
23025              BOOT_JDK_FOUND=yes
23026
23027  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23028
23029  # Input might be given as Windows format, start by converting to
23030  # unix format.
23031  path="$BOOT_JDK"
23032  new_path=`$CYGPATH -u "$path"`
23033
23034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23037  # "foo.exe" is OK but "foo" is an error.
23038  #
23039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23040  # It is also a way to make sure we got the proper file name for the real test later on.
23041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23042  if test "x$test_shortpath" = x; then
23043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23046  fi
23047
23048  # Call helper function which possibly converts this using DOS-style short mode.
23049  # If so, the updated path is stored in $new_path.
23050
23051  input_path="$new_path"
23052  # Check if we need to convert this using DOS-style short mode. If the path
23053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23054  # take no chances and rewrite it.
23055  # Note: m4 eats our [], so we need to use [ and ] instead.
23056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23057  if test "x$has_forbidden_chars" != x; then
23058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23062      # Going to short mode and back again did indeed matter. Since short mode is
23063      # case insensitive, let's make it lowercase to improve readability.
23064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23065      # Now convert it back to Unix-stile (cygpath)
23066      input_path=`$CYGPATH -u "$shortmode_path"`
23067      new_path="$input_path"
23068    fi
23069  fi
23070
23071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23072  if test "x$test_cygdrive_prefix" = x; then
23073    # As a simple fix, exclude /usr/bin since it's not a real path.
23074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23076      # a path prefixed by /cygdrive for fixpath to work.
23077      new_path="$CYGWIN_ROOT_PATH$input_path"
23078    fi
23079  fi
23080
23081
23082  if test "x$path" != "x$new_path"; then
23083    BOOT_JDK="$new_path"
23084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23086  fi
23087
23088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23089
23090  path="$BOOT_JDK"
23091  has_colon=`$ECHO $path | $GREP ^.:`
23092  new_path="$path"
23093  if test "x$has_colon" = x; then
23094    # Not in mixed or Windows style, start by that.
23095    new_path=`cmd //c echo $path`
23096  fi
23097
23098
23099  input_path="$new_path"
23100  # Check if we need to convert this using DOS-style short mode. If the path
23101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23102  # take no chances and rewrite it.
23103  # Note: m4 eats our [], so we need to use [ and ] instead.
23104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23105  if test "x$has_forbidden_chars" != x; then
23106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23108  fi
23109
23110
23111  windows_path="$new_path"
23112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23113    unix_path=`$CYGPATH -u "$windows_path"`
23114    new_path="$unix_path"
23115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23117    new_path="$unix_path"
23118  fi
23119
23120  if test "x$path" != "x$new_path"; then
23121    BOOT_JDK="$new_path"
23122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23124  fi
23125
23126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23128
23129  else
23130    # We're on a posix platform. Hooray! :)
23131    path="$BOOT_JDK"
23132    has_space=`$ECHO "$path" | $GREP " "`
23133    if test "x$has_space" != x; then
23134      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23136      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23137    fi
23138
23139    # Use eval to expand a potential ~
23140    eval path="$path"
23141    if test ! -f "$path" && test ! -d "$path"; then
23142      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23143    fi
23144
23145    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23146  fi
23147
23148              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23149$as_echo_n "checking for Boot JDK... " >&6; }
23150              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23151$as_echo "$BOOT_JDK" >&6; }
23152              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23153$as_echo_n "checking Boot JDK version... " >&6; }
23154              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23155              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23156$as_echo "$BOOT_JDK_VERSION" >&6; }
23157            fi # end check jdk version
23158          fi # end check rt.jar
23159        fi # end check javac
23160      fi # end check java
23161    fi # end check boot jdk found
23162  fi
23163
23164    done
23165  fi
23166
23167  fi
23168
23169
23170    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23171    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23172      # Do we have a bin/java?
23173      if test ! -x "$BOOT_JDK/bin/java"; then
23174        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23175$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23176        BOOT_JDK_FOUND=no
23177      else
23178        # Do we have a bin/javac?
23179        if test ! -x "$BOOT_JDK/bin/javac"; then
23180          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23182          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23183$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23184          BOOT_JDK_FOUND=no
23185        else
23186          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23187          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23188            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23189$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23190            BOOT_JDK_FOUND=no
23191          else
23192            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23193            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23194
23195            # Extra M4 quote needed to protect [] in grep expression.
23196            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23197            if test "x$FOUND_CORRECT_VERSION" = x; then
23198              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23200              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23201$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23202              BOOT_JDK_FOUND=no
23203            else
23204              # We're done! :-)
23205              BOOT_JDK_FOUND=yes
23206
23207  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23208
23209  # Input might be given as Windows format, start by converting to
23210  # unix format.
23211  path="$BOOT_JDK"
23212  new_path=`$CYGPATH -u "$path"`
23213
23214  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23215  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23216  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23217  # "foo.exe" is OK but "foo" is an error.
23218  #
23219  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23220  # It is also a way to make sure we got the proper file name for the real test later on.
23221  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23222  if test "x$test_shortpath" = x; then
23223    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23224$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23225    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23226  fi
23227
23228  # Call helper function which possibly converts this using DOS-style short mode.
23229  # If so, the updated path is stored in $new_path.
23230
23231  input_path="$new_path"
23232  # Check if we need to convert this using DOS-style short mode. If the path
23233  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23234  # take no chances and rewrite it.
23235  # Note: m4 eats our [], so we need to use [ and ] instead.
23236  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23237  if test "x$has_forbidden_chars" != x; then
23238    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23239    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23240    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23241    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23242      # Going to short mode and back again did indeed matter. Since short mode is
23243      # case insensitive, let's make it lowercase to improve readability.
23244      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23245      # Now convert it back to Unix-stile (cygpath)
23246      input_path=`$CYGPATH -u "$shortmode_path"`
23247      new_path="$input_path"
23248    fi
23249  fi
23250
23251  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23252  if test "x$test_cygdrive_prefix" = x; then
23253    # As a simple fix, exclude /usr/bin since it's not a real path.
23254    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23255      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23256      # a path prefixed by /cygdrive for fixpath to work.
23257      new_path="$CYGWIN_ROOT_PATH$input_path"
23258    fi
23259  fi
23260
23261
23262  if test "x$path" != "x$new_path"; then
23263    BOOT_JDK="$new_path"
23264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23265$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23266  fi
23267
23268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23269
23270  path="$BOOT_JDK"
23271  has_colon=`$ECHO $path | $GREP ^.:`
23272  new_path="$path"
23273  if test "x$has_colon" = x; then
23274    # Not in mixed or Windows style, start by that.
23275    new_path=`cmd //c echo $path`
23276  fi
23277
23278
23279  input_path="$new_path"
23280  # Check if we need to convert this using DOS-style short mode. If the path
23281  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23282  # take no chances and rewrite it.
23283  # Note: m4 eats our [], so we need to use [ and ] instead.
23284  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23285  if test "x$has_forbidden_chars" != x; then
23286    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23287    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23288  fi
23289
23290
23291  windows_path="$new_path"
23292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23293    unix_path=`$CYGPATH -u "$windows_path"`
23294    new_path="$unix_path"
23295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23296    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23297    new_path="$unix_path"
23298  fi
23299
23300  if test "x$path" != "x$new_path"; then
23301    BOOT_JDK="$new_path"
23302    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23303$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23304  fi
23305
23306  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23307  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23308
23309  else
23310    # We're on a posix platform. Hooray! :)
23311    path="$BOOT_JDK"
23312    has_space=`$ECHO "$path" | $GREP " "`
23313    if test "x$has_space" != x; then
23314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23315$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23316      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23317    fi
23318
23319    # Use eval to expand a potential ~
23320    eval path="$path"
23321    if test ! -f "$path" && test ! -d "$path"; then
23322      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23323    fi
23324
23325    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23326  fi
23327
23328              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23329$as_echo_n "checking for Boot JDK... " >&6; }
23330              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23331$as_echo "$BOOT_JDK" >&6; }
23332              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23333$as_echo_n "checking Boot JDK version... " >&6; }
23334              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23335              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23336$as_echo "$BOOT_JDK_VERSION" >&6; }
23337            fi # end check jdk version
23338          fi # end check rt.jar
23339        fi # end check javac
23340      fi # end check java
23341    fi # end check boot jdk found
23342  fi
23343
23344
23345  if test "x$BOOT_JDK_FOUND" = xno; then
23346    # Now execute the test
23347
23348  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23349  BOOT_JDK_SUFFIX=""
23350  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23351  if test "x$ALL_JDKS_FOUND" != x; then
23352    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23353
23354  if test "x$BOOT_JDK_FOUND" = xno; then
23355    # Now execute the test
23356
23357        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23358        if test -d "$BOOT_JDK"; then
23359          BOOT_JDK_FOUND=maybe
23360          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23361$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23362        fi
23363
23364
23365    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23366    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23367      # Do we have a bin/java?
23368      if test ! -x "$BOOT_JDK/bin/java"; then
23369        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23370$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23371        BOOT_JDK_FOUND=no
23372      else
23373        # Do we have a bin/javac?
23374        if test ! -x "$BOOT_JDK/bin/javac"; then
23375          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23377          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23378$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23379          BOOT_JDK_FOUND=no
23380        else
23381          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23382          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23383            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23384$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23385            BOOT_JDK_FOUND=no
23386          else
23387            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23388            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23389
23390            # Extra M4 quote needed to protect [] in grep expression.
23391            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23392            if test "x$FOUND_CORRECT_VERSION" = x; then
23393              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23395              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23396$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23397              BOOT_JDK_FOUND=no
23398            else
23399              # We're done! :-)
23400              BOOT_JDK_FOUND=yes
23401
23402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23403
23404  # Input might be given as Windows format, start by converting to
23405  # unix format.
23406  path="$BOOT_JDK"
23407  new_path=`$CYGPATH -u "$path"`
23408
23409  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23410  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23411  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23412  # "foo.exe" is OK but "foo" is an error.
23413  #
23414  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23415  # It is also a way to make sure we got the proper file name for the real test later on.
23416  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23417  if test "x$test_shortpath" = x; then
23418    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23419$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23420    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23421  fi
23422
23423  # Call helper function which possibly converts this using DOS-style short mode.
23424  # If so, the updated path is stored in $new_path.
23425
23426  input_path="$new_path"
23427  # Check if we need to convert this using DOS-style short mode. If the path
23428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23429  # take no chances and rewrite it.
23430  # Note: m4 eats our [], so we need to use [ and ] instead.
23431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23432  if test "x$has_forbidden_chars" != x; then
23433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23434    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23435    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23436    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23437      # Going to short mode and back again did indeed matter. Since short mode is
23438      # case insensitive, let's make it lowercase to improve readability.
23439      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23440      # Now convert it back to Unix-stile (cygpath)
23441      input_path=`$CYGPATH -u "$shortmode_path"`
23442      new_path="$input_path"
23443    fi
23444  fi
23445
23446  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23447  if test "x$test_cygdrive_prefix" = x; then
23448    # As a simple fix, exclude /usr/bin since it's not a real path.
23449    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23450      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23451      # a path prefixed by /cygdrive for fixpath to work.
23452      new_path="$CYGWIN_ROOT_PATH$input_path"
23453    fi
23454  fi
23455
23456
23457  if test "x$path" != "x$new_path"; then
23458    BOOT_JDK="$new_path"
23459    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23460$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23461  fi
23462
23463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23464
23465  path="$BOOT_JDK"
23466  has_colon=`$ECHO $path | $GREP ^.:`
23467  new_path="$path"
23468  if test "x$has_colon" = x; then
23469    # Not in mixed or Windows style, start by that.
23470    new_path=`cmd //c echo $path`
23471  fi
23472
23473
23474  input_path="$new_path"
23475  # Check if we need to convert this using DOS-style short mode. If the path
23476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23477  # take no chances and rewrite it.
23478  # Note: m4 eats our [], so we need to use [ and ] instead.
23479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23480  if test "x$has_forbidden_chars" != x; then
23481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23483  fi
23484
23485
23486  windows_path="$new_path"
23487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23488    unix_path=`$CYGPATH -u "$windows_path"`
23489    new_path="$unix_path"
23490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23492    new_path="$unix_path"
23493  fi
23494
23495  if test "x$path" != "x$new_path"; then
23496    BOOT_JDK="$new_path"
23497    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23498$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23499  fi
23500
23501  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23502  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23503
23504  else
23505    # We're on a posix platform. Hooray! :)
23506    path="$BOOT_JDK"
23507    has_space=`$ECHO "$path" | $GREP " "`
23508    if test "x$has_space" != x; then
23509      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23510$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23511      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23512    fi
23513
23514    # Use eval to expand a potential ~
23515    eval path="$path"
23516    if test ! -f "$path" && test ! -d "$path"; then
23517      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23518    fi
23519
23520    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23521  fi
23522
23523              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23524$as_echo_n "checking for Boot JDK... " >&6; }
23525              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23526$as_echo "$BOOT_JDK" >&6; }
23527              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23528$as_echo_n "checking Boot JDK version... " >&6; }
23529              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23530              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23531$as_echo "$BOOT_JDK_VERSION" >&6; }
23532            fi # end check jdk version
23533          fi # end check rt.jar
23534        fi # end check javac
23535      fi # end check java
23536    fi # end check boot jdk found
23537  fi
23538
23539    done
23540  fi
23541
23542
23543    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23544    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23545      # Do we have a bin/java?
23546      if test ! -x "$BOOT_JDK/bin/java"; then
23547        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23548$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23549        BOOT_JDK_FOUND=no
23550      else
23551        # Do we have a bin/javac?
23552        if test ! -x "$BOOT_JDK/bin/javac"; then
23553          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23555          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23556$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23557          BOOT_JDK_FOUND=no
23558        else
23559          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23560          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23561            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23562$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23563            BOOT_JDK_FOUND=no
23564          else
23565            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23566            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23567
23568            # Extra M4 quote needed to protect [] in grep expression.
23569            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23570            if test "x$FOUND_CORRECT_VERSION" = x; then
23571              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23572$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23573              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23574$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23575              BOOT_JDK_FOUND=no
23576            else
23577              # We're done! :-)
23578              BOOT_JDK_FOUND=yes
23579
23580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23581
23582  # Input might be given as Windows format, start by converting to
23583  # unix format.
23584  path="$BOOT_JDK"
23585  new_path=`$CYGPATH -u "$path"`
23586
23587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23590  # "foo.exe" is OK but "foo" is an error.
23591  #
23592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23593  # It is also a way to make sure we got the proper file name for the real test later on.
23594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23595  if test "x$test_shortpath" = x; then
23596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23597$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23598    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23599  fi
23600
23601  # Call helper function which possibly converts this using DOS-style short mode.
23602  # If so, the updated path is stored in $new_path.
23603
23604  input_path="$new_path"
23605  # Check if we need to convert this using DOS-style short mode. If the path
23606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23607  # take no chances and rewrite it.
23608  # Note: m4 eats our [], so we need to use [ and ] instead.
23609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23610  if test "x$has_forbidden_chars" != x; then
23611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23615      # Going to short mode and back again did indeed matter. Since short mode is
23616      # case insensitive, let's make it lowercase to improve readability.
23617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23618      # Now convert it back to Unix-stile (cygpath)
23619      input_path=`$CYGPATH -u "$shortmode_path"`
23620      new_path="$input_path"
23621    fi
23622  fi
23623
23624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23625  if test "x$test_cygdrive_prefix" = x; then
23626    # As a simple fix, exclude /usr/bin since it's not a real path.
23627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23629      # a path prefixed by /cygdrive for fixpath to work.
23630      new_path="$CYGWIN_ROOT_PATH$input_path"
23631    fi
23632  fi
23633
23634
23635  if test "x$path" != "x$new_path"; then
23636    BOOT_JDK="$new_path"
23637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23638$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23639  fi
23640
23641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23642
23643  path="$BOOT_JDK"
23644  has_colon=`$ECHO $path | $GREP ^.:`
23645  new_path="$path"
23646  if test "x$has_colon" = x; then
23647    # Not in mixed or Windows style, start by that.
23648    new_path=`cmd //c echo $path`
23649  fi
23650
23651
23652  input_path="$new_path"
23653  # Check if we need to convert this using DOS-style short mode. If the path
23654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23655  # take no chances and rewrite it.
23656  # Note: m4 eats our [], so we need to use [ and ] instead.
23657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23658  if test "x$has_forbidden_chars" != x; then
23659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23661  fi
23662
23663
23664  windows_path="$new_path"
23665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23666    unix_path=`$CYGPATH -u "$windows_path"`
23667    new_path="$unix_path"
23668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23670    new_path="$unix_path"
23671  fi
23672
23673  if test "x$path" != "x$new_path"; then
23674    BOOT_JDK="$new_path"
23675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23677  fi
23678
23679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23681
23682  else
23683    # We're on a posix platform. Hooray! :)
23684    path="$BOOT_JDK"
23685    has_space=`$ECHO "$path" | $GREP " "`
23686    if test "x$has_space" != x; then
23687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23688$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23690    fi
23691
23692    # Use eval to expand a potential ~
23693    eval path="$path"
23694    if test ! -f "$path" && test ! -d "$path"; then
23695      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23696    fi
23697
23698    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23699  fi
23700
23701              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23702$as_echo_n "checking for Boot JDK... " >&6; }
23703              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23704$as_echo "$BOOT_JDK" >&6; }
23705              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23706$as_echo_n "checking Boot JDK version... " >&6; }
23707              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23708              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23709$as_echo "$BOOT_JDK_VERSION" >&6; }
23710            fi # end check jdk version
23711          fi # end check rt.jar
23712        fi # end check javac
23713      fi # end check java
23714    fi # end check boot jdk found
23715  fi
23716
23717  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23718
23719  if test "x$BOOT_JDK_FOUND" = xno; then
23720    # Now execute the test
23721
23722  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23723  BOOT_JDK_SUFFIX="/Contents/Home"
23724  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23725  if test "x$ALL_JDKS_FOUND" != x; then
23726    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23727
23728  if test "x$BOOT_JDK_FOUND" = xno; then
23729    # Now execute the test
23730
23731        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23732        if test -d "$BOOT_JDK"; then
23733          BOOT_JDK_FOUND=maybe
23734          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23735$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23736        fi
23737
23738
23739    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23740    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23741      # Do we have a bin/java?
23742      if test ! -x "$BOOT_JDK/bin/java"; then
23743        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23744$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23745        BOOT_JDK_FOUND=no
23746      else
23747        # Do we have a bin/javac?
23748        if test ! -x "$BOOT_JDK/bin/javac"; then
23749          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23751          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23752$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23753          BOOT_JDK_FOUND=no
23754        else
23755          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23756          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23757            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23758$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23759            BOOT_JDK_FOUND=no
23760          else
23761            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23762            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23763
23764            # Extra M4 quote needed to protect [] in grep expression.
23765            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23766            if test "x$FOUND_CORRECT_VERSION" = x; then
23767              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23768$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23769              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23770$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23771              BOOT_JDK_FOUND=no
23772            else
23773              # We're done! :-)
23774              BOOT_JDK_FOUND=yes
23775
23776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23777
23778  # Input might be given as Windows format, start by converting to
23779  # unix format.
23780  path="$BOOT_JDK"
23781  new_path=`$CYGPATH -u "$path"`
23782
23783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23786  # "foo.exe" is OK but "foo" is an error.
23787  #
23788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23789  # It is also a way to make sure we got the proper file name for the real test later on.
23790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23791  if test "x$test_shortpath" = x; then
23792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23793$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23794    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23795  fi
23796
23797  # Call helper function which possibly converts this using DOS-style short mode.
23798  # If so, the updated path is stored in $new_path.
23799
23800  input_path="$new_path"
23801  # Check if we need to convert this using DOS-style short mode. If the path
23802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23803  # take no chances and rewrite it.
23804  # Note: m4 eats our [], so we need to use [ and ] instead.
23805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23806  if test "x$has_forbidden_chars" != x; then
23807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23811      # Going to short mode and back again did indeed matter. Since short mode is
23812      # case insensitive, let's make it lowercase to improve readability.
23813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23814      # Now convert it back to Unix-stile (cygpath)
23815      input_path=`$CYGPATH -u "$shortmode_path"`
23816      new_path="$input_path"
23817    fi
23818  fi
23819
23820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23821  if test "x$test_cygdrive_prefix" = x; then
23822    # As a simple fix, exclude /usr/bin since it's not a real path.
23823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23825      # a path prefixed by /cygdrive for fixpath to work.
23826      new_path="$CYGWIN_ROOT_PATH$input_path"
23827    fi
23828  fi
23829
23830
23831  if test "x$path" != "x$new_path"; then
23832    BOOT_JDK="$new_path"
23833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23835  fi
23836
23837  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23838
23839  path="$BOOT_JDK"
23840  has_colon=`$ECHO $path | $GREP ^.:`
23841  new_path="$path"
23842  if test "x$has_colon" = x; then
23843    # Not in mixed or Windows style, start by that.
23844    new_path=`cmd //c echo $path`
23845  fi
23846
23847
23848  input_path="$new_path"
23849  # Check if we need to convert this using DOS-style short mode. If the path
23850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23851  # take no chances and rewrite it.
23852  # Note: m4 eats our [], so we need to use [ and ] instead.
23853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23854  if test "x$has_forbidden_chars" != x; then
23855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23857  fi
23858
23859
23860  windows_path="$new_path"
23861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23862    unix_path=`$CYGPATH -u "$windows_path"`
23863    new_path="$unix_path"
23864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23866    new_path="$unix_path"
23867  fi
23868
23869  if test "x$path" != "x$new_path"; then
23870    BOOT_JDK="$new_path"
23871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23872$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23873  fi
23874
23875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23877
23878  else
23879    # We're on a posix platform. Hooray! :)
23880    path="$BOOT_JDK"
23881    has_space=`$ECHO "$path" | $GREP " "`
23882    if test "x$has_space" != x; then
23883      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23884$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23885      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23886    fi
23887
23888    # Use eval to expand a potential ~
23889    eval path="$path"
23890    if test ! -f "$path" && test ! -d "$path"; then
23891      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23892    fi
23893
23894    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23895  fi
23896
23897              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23898$as_echo_n "checking for Boot JDK... " >&6; }
23899              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23900$as_echo "$BOOT_JDK" >&6; }
23901              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23902$as_echo_n "checking Boot JDK version... " >&6; }
23903              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23904              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23905$as_echo "$BOOT_JDK_VERSION" >&6; }
23906            fi # end check jdk version
23907          fi # end check rt.jar
23908        fi # end check javac
23909      fi # end check java
23910    fi # end check boot jdk found
23911  fi
23912
23913    done
23914  fi
23915
23916
23917    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23918    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23919      # Do we have a bin/java?
23920      if test ! -x "$BOOT_JDK/bin/java"; then
23921        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23922$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23923        BOOT_JDK_FOUND=no
23924      else
23925        # Do we have a bin/javac?
23926        if test ! -x "$BOOT_JDK/bin/javac"; then
23927          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23929          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23930$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23931          BOOT_JDK_FOUND=no
23932        else
23933          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23934          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23935            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23936$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23937            BOOT_JDK_FOUND=no
23938          else
23939            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23940            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23941
23942            # Extra M4 quote needed to protect [] in grep expression.
23943            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
23944            if test "x$FOUND_CORRECT_VERSION" = x; then
23945              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23946$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23947              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
23948$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
23949              BOOT_JDK_FOUND=no
23950            else
23951              # We're done! :-)
23952              BOOT_JDK_FOUND=yes
23953
23954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23955
23956  # Input might be given as Windows format, start by converting to
23957  # unix format.
23958  path="$BOOT_JDK"
23959  new_path=`$CYGPATH -u "$path"`
23960
23961  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23962  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23963  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23964  # "foo.exe" is OK but "foo" is an error.
23965  #
23966  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23967  # It is also a way to make sure we got the proper file name for the real test later on.
23968  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23969  if test "x$test_shortpath" = x; then
23970    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23971$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23972    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23973  fi
23974
23975  # Call helper function which possibly converts this using DOS-style short mode.
23976  # If so, the updated path is stored in $new_path.
23977
23978  input_path="$new_path"
23979  # Check if we need to convert this using DOS-style short mode. If the path
23980  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23981  # take no chances and rewrite it.
23982  # Note: m4 eats our [], so we need to use [ and ] instead.
23983  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23984  if test "x$has_forbidden_chars" != x; then
23985    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23986    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23987    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23988    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23989      # Going to short mode and back again did indeed matter. Since short mode is
23990      # case insensitive, let's make it lowercase to improve readability.
23991      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23992      # Now convert it back to Unix-stile (cygpath)
23993      input_path=`$CYGPATH -u "$shortmode_path"`
23994      new_path="$input_path"
23995    fi
23996  fi
23997
23998  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23999  if test "x$test_cygdrive_prefix" = x; then
24000    # As a simple fix, exclude /usr/bin since it's not a real path.
24001    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24002      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24003      # a path prefixed by /cygdrive for fixpath to work.
24004      new_path="$CYGWIN_ROOT_PATH$input_path"
24005    fi
24006  fi
24007
24008
24009  if test "x$path" != "x$new_path"; then
24010    BOOT_JDK="$new_path"
24011    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24012$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24013  fi
24014
24015  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24016
24017  path="$BOOT_JDK"
24018  has_colon=`$ECHO $path | $GREP ^.:`
24019  new_path="$path"
24020  if test "x$has_colon" = x; then
24021    # Not in mixed or Windows style, start by that.
24022    new_path=`cmd //c echo $path`
24023  fi
24024
24025
24026  input_path="$new_path"
24027  # Check if we need to convert this using DOS-style short mode. If the path
24028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24029  # take no chances and rewrite it.
24030  # Note: m4 eats our [], so we need to use [ and ] instead.
24031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24032  if test "x$has_forbidden_chars" != x; then
24033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24035  fi
24036
24037
24038  windows_path="$new_path"
24039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24040    unix_path=`$CYGPATH -u "$windows_path"`
24041    new_path="$unix_path"
24042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24044    new_path="$unix_path"
24045  fi
24046
24047  if test "x$path" != "x$new_path"; then
24048    BOOT_JDK="$new_path"
24049    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24050$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24051  fi
24052
24053  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24054  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24055
24056  else
24057    # We're on a posix platform. Hooray! :)
24058    path="$BOOT_JDK"
24059    has_space=`$ECHO "$path" | $GREP " "`
24060    if test "x$has_space" != x; then
24061      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24062$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24063      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24064    fi
24065
24066    # Use eval to expand a potential ~
24067    eval path="$path"
24068    if test ! -f "$path" && test ! -d "$path"; then
24069      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24070    fi
24071
24072    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24073  fi
24074
24075              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24076$as_echo_n "checking for Boot JDK... " >&6; }
24077              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24078$as_echo "$BOOT_JDK" >&6; }
24079              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24080$as_echo_n "checking Boot JDK version... " >&6; }
24081              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24082              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24083$as_echo "$BOOT_JDK_VERSION" >&6; }
24084            fi # end check jdk version
24085          fi # end check rt.jar
24086        fi # end check javac
24087      fi # end check java
24088    fi # end check boot jdk found
24089  fi
24090
24091
24092  if test "x$BOOT_JDK_FOUND" = xno; then
24093    # Now execute the test
24094
24095  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24096  BOOT_JDK_SUFFIX="/Contents/Home"
24097  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24098  if test "x$ALL_JDKS_FOUND" != x; then
24099    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24100
24101  if test "x$BOOT_JDK_FOUND" = xno; then
24102    # Now execute the test
24103
24104        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24105        if test -d "$BOOT_JDK"; then
24106          BOOT_JDK_FOUND=maybe
24107          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24108$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24109        fi
24110
24111
24112    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24113    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24114      # Do we have a bin/java?
24115      if test ! -x "$BOOT_JDK/bin/java"; then
24116        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24117$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24118        BOOT_JDK_FOUND=no
24119      else
24120        # Do we have a bin/javac?
24121        if test ! -x "$BOOT_JDK/bin/javac"; then
24122          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24123$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24124          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24125$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24126          BOOT_JDK_FOUND=no
24127        else
24128          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24129          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24130            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24131$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24132            BOOT_JDK_FOUND=no
24133          else
24134            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24135            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24136
24137            # Extra M4 quote needed to protect [] in grep expression.
24138            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24139            if test "x$FOUND_CORRECT_VERSION" = x; then
24140              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24142              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24143$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24144              BOOT_JDK_FOUND=no
24145            else
24146              # We're done! :-)
24147              BOOT_JDK_FOUND=yes
24148
24149  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24150
24151  # Input might be given as Windows format, start by converting to
24152  # unix format.
24153  path="$BOOT_JDK"
24154  new_path=`$CYGPATH -u "$path"`
24155
24156  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24157  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24158  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24159  # "foo.exe" is OK but "foo" is an error.
24160  #
24161  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24162  # It is also a way to make sure we got the proper file name for the real test later on.
24163  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24164  if test "x$test_shortpath" = x; then
24165    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24166$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24167    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24168  fi
24169
24170  # Call helper function which possibly converts this using DOS-style short mode.
24171  # If so, the updated path is stored in $new_path.
24172
24173  input_path="$new_path"
24174  # Check if we need to convert this using DOS-style short mode. If the path
24175  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24176  # take no chances and rewrite it.
24177  # Note: m4 eats our [], so we need to use [ and ] instead.
24178  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24179  if test "x$has_forbidden_chars" != x; then
24180    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24181    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24182    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24183    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24184      # Going to short mode and back again did indeed matter. Since short mode is
24185      # case insensitive, let's make it lowercase to improve readability.
24186      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24187      # Now convert it back to Unix-stile (cygpath)
24188      input_path=`$CYGPATH -u "$shortmode_path"`
24189      new_path="$input_path"
24190    fi
24191  fi
24192
24193  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24194  if test "x$test_cygdrive_prefix" = x; then
24195    # As a simple fix, exclude /usr/bin since it's not a real path.
24196    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24197      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24198      # a path prefixed by /cygdrive for fixpath to work.
24199      new_path="$CYGWIN_ROOT_PATH$input_path"
24200    fi
24201  fi
24202
24203
24204  if test "x$path" != "x$new_path"; then
24205    BOOT_JDK="$new_path"
24206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24207$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24208  fi
24209
24210  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24211
24212  path="$BOOT_JDK"
24213  has_colon=`$ECHO $path | $GREP ^.:`
24214  new_path="$path"
24215  if test "x$has_colon" = x; then
24216    # Not in mixed or Windows style, start by that.
24217    new_path=`cmd //c echo $path`
24218  fi
24219
24220
24221  input_path="$new_path"
24222  # Check if we need to convert this using DOS-style short mode. If the path
24223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24224  # take no chances and rewrite it.
24225  # Note: m4 eats our [], so we need to use [ and ] instead.
24226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24227  if test "x$has_forbidden_chars" != x; then
24228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24229    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24230  fi
24231
24232
24233  windows_path="$new_path"
24234  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24235    unix_path=`$CYGPATH -u "$windows_path"`
24236    new_path="$unix_path"
24237  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24238    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24239    new_path="$unix_path"
24240  fi
24241
24242  if test "x$path" != "x$new_path"; then
24243    BOOT_JDK="$new_path"
24244    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24245$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24246  fi
24247
24248  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24249  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24250
24251  else
24252    # We're on a posix platform. Hooray! :)
24253    path="$BOOT_JDK"
24254    has_space=`$ECHO "$path" | $GREP " "`
24255    if test "x$has_space" != x; then
24256      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24257$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24258      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24259    fi
24260
24261    # Use eval to expand a potential ~
24262    eval path="$path"
24263    if test ! -f "$path" && test ! -d "$path"; then
24264      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24265    fi
24266
24267    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24268  fi
24269
24270              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24271$as_echo_n "checking for Boot JDK... " >&6; }
24272              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24273$as_echo "$BOOT_JDK" >&6; }
24274              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24275$as_echo_n "checking Boot JDK version... " >&6; }
24276              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24277              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24278$as_echo "$BOOT_JDK_VERSION" >&6; }
24279            fi # end check jdk version
24280          fi # end check rt.jar
24281        fi # end check javac
24282      fi # end check java
24283    fi # end check boot jdk found
24284  fi
24285
24286    done
24287  fi
24288
24289
24290    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24291    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24292      # Do we have a bin/java?
24293      if test ! -x "$BOOT_JDK/bin/java"; then
24294        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24295$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24296        BOOT_JDK_FOUND=no
24297      else
24298        # Do we have a bin/javac?
24299        if test ! -x "$BOOT_JDK/bin/javac"; then
24300          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24301$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24302          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24303$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24304          BOOT_JDK_FOUND=no
24305        else
24306          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24307          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24308            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24309$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24310            BOOT_JDK_FOUND=no
24311          else
24312            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24313            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24314
24315            # Extra M4 quote needed to protect [] in grep expression.
24316            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24317            if test "x$FOUND_CORRECT_VERSION" = x; then
24318              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24319$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24320              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24321$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24322              BOOT_JDK_FOUND=no
24323            else
24324              # We're done! :-)
24325              BOOT_JDK_FOUND=yes
24326
24327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24328
24329  # Input might be given as Windows format, start by converting to
24330  # unix format.
24331  path="$BOOT_JDK"
24332  new_path=`$CYGPATH -u "$path"`
24333
24334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24337  # "foo.exe" is OK but "foo" is an error.
24338  #
24339  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24340  # It is also a way to make sure we got the proper file name for the real test later on.
24341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24342  if test "x$test_shortpath" = x; then
24343    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24344$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24345    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24346  fi
24347
24348  # Call helper function which possibly converts this using DOS-style short mode.
24349  # If so, the updated path is stored in $new_path.
24350
24351  input_path="$new_path"
24352  # Check if we need to convert this using DOS-style short mode. If the path
24353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24354  # take no chances and rewrite it.
24355  # Note: m4 eats our [], so we need to use [ and ] instead.
24356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24357  if test "x$has_forbidden_chars" != x; then
24358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24362      # Going to short mode and back again did indeed matter. Since short mode is
24363      # case insensitive, let's make it lowercase to improve readability.
24364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24365      # Now convert it back to Unix-stile (cygpath)
24366      input_path=`$CYGPATH -u "$shortmode_path"`
24367      new_path="$input_path"
24368    fi
24369  fi
24370
24371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24372  if test "x$test_cygdrive_prefix" = x; then
24373    # As a simple fix, exclude /usr/bin since it's not a real path.
24374    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24376      # a path prefixed by /cygdrive for fixpath to work.
24377      new_path="$CYGWIN_ROOT_PATH$input_path"
24378    fi
24379  fi
24380
24381
24382  if test "x$path" != "x$new_path"; then
24383    BOOT_JDK="$new_path"
24384    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24385$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24386  fi
24387
24388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24389
24390  path="$BOOT_JDK"
24391  has_colon=`$ECHO $path | $GREP ^.:`
24392  new_path="$path"
24393  if test "x$has_colon" = x; then
24394    # Not in mixed or Windows style, start by that.
24395    new_path=`cmd //c echo $path`
24396  fi
24397
24398
24399  input_path="$new_path"
24400  # Check if we need to convert this using DOS-style short mode. If the path
24401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24402  # take no chances and rewrite it.
24403  # Note: m4 eats our [], so we need to use [ and ] instead.
24404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24405  if test "x$has_forbidden_chars" != x; then
24406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24407    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24408  fi
24409
24410
24411  windows_path="$new_path"
24412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24413    unix_path=`$CYGPATH -u "$windows_path"`
24414    new_path="$unix_path"
24415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24417    new_path="$unix_path"
24418  fi
24419
24420  if test "x$path" != "x$new_path"; then
24421    BOOT_JDK="$new_path"
24422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24423$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24424  fi
24425
24426  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24427  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24428
24429  else
24430    # We're on a posix platform. Hooray! :)
24431    path="$BOOT_JDK"
24432    has_space=`$ECHO "$path" | $GREP " "`
24433    if test "x$has_space" != x; then
24434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24435$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24436      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24437    fi
24438
24439    # Use eval to expand a potential ~
24440    eval path="$path"
24441    if test ! -f "$path" && test ! -d "$path"; then
24442      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24443    fi
24444
24445    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24446  fi
24447
24448              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24449$as_echo_n "checking for Boot JDK... " >&6; }
24450              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24451$as_echo "$BOOT_JDK" >&6; }
24452              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24453$as_echo_n "checking Boot JDK version... " >&6; }
24454              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24455              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24456$as_echo "$BOOT_JDK_VERSION" >&6; }
24457            fi # end check jdk version
24458          fi # end check rt.jar
24459        fi # end check javac
24460      fi # end check java
24461    fi # end check boot jdk found
24462  fi
24463
24464  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24465
24466  if test "x$BOOT_JDK_FOUND" = xno; then
24467    # Now execute the test
24468
24469  BOOT_JDK_PREFIX="/usr/lib/jvm"
24470  BOOT_JDK_SUFFIX=""
24471  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24472  if test "x$ALL_JDKS_FOUND" != x; then
24473    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24474
24475  if test "x$BOOT_JDK_FOUND" = xno; then
24476    # Now execute the test
24477
24478        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24479        if test -d "$BOOT_JDK"; then
24480          BOOT_JDK_FOUND=maybe
24481          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24482$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24483        fi
24484
24485
24486    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24487    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24488      # Do we have a bin/java?
24489      if test ! -x "$BOOT_JDK/bin/java"; then
24490        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24491$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24492        BOOT_JDK_FOUND=no
24493      else
24494        # Do we have a bin/javac?
24495        if test ! -x "$BOOT_JDK/bin/javac"; then
24496          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24497$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24498          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24499$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24500          BOOT_JDK_FOUND=no
24501        else
24502          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24503          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24504            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24505$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24506            BOOT_JDK_FOUND=no
24507          else
24508            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24509            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24510
24511            # Extra M4 quote needed to protect [] in grep expression.
24512            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24513            if test "x$FOUND_CORRECT_VERSION" = x; then
24514              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24515$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24516              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24517$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24518              BOOT_JDK_FOUND=no
24519            else
24520              # We're done! :-)
24521              BOOT_JDK_FOUND=yes
24522
24523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24524
24525  # Input might be given as Windows format, start by converting to
24526  # unix format.
24527  path="$BOOT_JDK"
24528  new_path=`$CYGPATH -u "$path"`
24529
24530  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24531  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24532  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24533  # "foo.exe" is OK but "foo" is an error.
24534  #
24535  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24536  # It is also a way to make sure we got the proper file name for the real test later on.
24537  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24538  if test "x$test_shortpath" = x; then
24539    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24540$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24541    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24542  fi
24543
24544  # Call helper function which possibly converts this using DOS-style short mode.
24545  # If so, the updated path is stored in $new_path.
24546
24547  input_path="$new_path"
24548  # Check if we need to convert this using DOS-style short mode. If the path
24549  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24550  # take no chances and rewrite it.
24551  # Note: m4 eats our [], so we need to use [ and ] instead.
24552  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24553  if test "x$has_forbidden_chars" != x; then
24554    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24555    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24556    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24557    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24558      # Going to short mode and back again did indeed matter. Since short mode is
24559      # case insensitive, let's make it lowercase to improve readability.
24560      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24561      # Now convert it back to Unix-stile (cygpath)
24562      input_path=`$CYGPATH -u "$shortmode_path"`
24563      new_path="$input_path"
24564    fi
24565  fi
24566
24567  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24568  if test "x$test_cygdrive_prefix" = x; then
24569    # As a simple fix, exclude /usr/bin since it's not a real path.
24570    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24571      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24572      # a path prefixed by /cygdrive for fixpath to work.
24573      new_path="$CYGWIN_ROOT_PATH$input_path"
24574    fi
24575  fi
24576
24577
24578  if test "x$path" != "x$new_path"; then
24579    BOOT_JDK="$new_path"
24580    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24581$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24582  fi
24583
24584  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24585
24586  path="$BOOT_JDK"
24587  has_colon=`$ECHO $path | $GREP ^.:`
24588  new_path="$path"
24589  if test "x$has_colon" = x; then
24590    # Not in mixed or Windows style, start by that.
24591    new_path=`cmd //c echo $path`
24592  fi
24593
24594
24595  input_path="$new_path"
24596  # Check if we need to convert this using DOS-style short mode. If the path
24597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24598  # take no chances and rewrite it.
24599  # Note: m4 eats our [], so we need to use [ and ] instead.
24600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24601  if test "x$has_forbidden_chars" != x; then
24602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24603    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24604  fi
24605
24606
24607  windows_path="$new_path"
24608  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24609    unix_path=`$CYGPATH -u "$windows_path"`
24610    new_path="$unix_path"
24611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24612    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24613    new_path="$unix_path"
24614  fi
24615
24616  if test "x$path" != "x$new_path"; then
24617    BOOT_JDK="$new_path"
24618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24620  fi
24621
24622  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24623  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24624
24625  else
24626    # We're on a posix platform. Hooray! :)
24627    path="$BOOT_JDK"
24628    has_space=`$ECHO "$path" | $GREP " "`
24629    if test "x$has_space" != x; then
24630      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24631$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24632      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24633    fi
24634
24635    # Use eval to expand a potential ~
24636    eval path="$path"
24637    if test ! -f "$path" && test ! -d "$path"; then
24638      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24639    fi
24640
24641    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24642  fi
24643
24644              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24645$as_echo_n "checking for Boot JDK... " >&6; }
24646              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24647$as_echo "$BOOT_JDK" >&6; }
24648              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24649$as_echo_n "checking Boot JDK version... " >&6; }
24650              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24651              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24652$as_echo "$BOOT_JDK_VERSION" >&6; }
24653            fi # end check jdk version
24654          fi # end check rt.jar
24655        fi # end check javac
24656      fi # end check java
24657    fi # end check boot jdk found
24658  fi
24659
24660    done
24661  fi
24662
24663
24664    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24665    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24666      # Do we have a bin/java?
24667      if test ! -x "$BOOT_JDK/bin/java"; then
24668        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24669$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24670        BOOT_JDK_FOUND=no
24671      else
24672        # Do we have a bin/javac?
24673        if test ! -x "$BOOT_JDK/bin/javac"; then
24674          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24675$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24676          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24677$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24678          BOOT_JDK_FOUND=no
24679        else
24680          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24681          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24682            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24683$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24684            BOOT_JDK_FOUND=no
24685          else
24686            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24687            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24688
24689            # Extra M4 quote needed to protect [] in grep expression.
24690            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24691            if test "x$FOUND_CORRECT_VERSION" = x; then
24692              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24693$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24694              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24695$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24696              BOOT_JDK_FOUND=no
24697            else
24698              # We're done! :-)
24699              BOOT_JDK_FOUND=yes
24700
24701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24702
24703  # Input might be given as Windows format, start by converting to
24704  # unix format.
24705  path="$BOOT_JDK"
24706  new_path=`$CYGPATH -u "$path"`
24707
24708  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24709  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24710  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24711  # "foo.exe" is OK but "foo" is an error.
24712  #
24713  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24714  # It is also a way to make sure we got the proper file name for the real test later on.
24715  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24716  if test "x$test_shortpath" = x; then
24717    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24718$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24719    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24720  fi
24721
24722  # Call helper function which possibly converts this using DOS-style short mode.
24723  # If so, the updated path is stored in $new_path.
24724
24725  input_path="$new_path"
24726  # Check if we need to convert this using DOS-style short mode. If the path
24727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24728  # take no chances and rewrite it.
24729  # Note: m4 eats our [], so we need to use [ and ] instead.
24730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24731  if test "x$has_forbidden_chars" != x; then
24732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24733    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24734    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24735    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24736      # Going to short mode and back again did indeed matter. Since short mode is
24737      # case insensitive, let's make it lowercase to improve readability.
24738      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24739      # Now convert it back to Unix-stile (cygpath)
24740      input_path=`$CYGPATH -u "$shortmode_path"`
24741      new_path="$input_path"
24742    fi
24743  fi
24744
24745  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24746  if test "x$test_cygdrive_prefix" = x; then
24747    # As a simple fix, exclude /usr/bin since it's not a real path.
24748    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24749      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24750      # a path prefixed by /cygdrive for fixpath to work.
24751      new_path="$CYGWIN_ROOT_PATH$input_path"
24752    fi
24753  fi
24754
24755
24756  if test "x$path" != "x$new_path"; then
24757    BOOT_JDK="$new_path"
24758    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24759$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24760  fi
24761
24762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24763
24764  path="$BOOT_JDK"
24765  has_colon=`$ECHO $path | $GREP ^.:`
24766  new_path="$path"
24767  if test "x$has_colon" = x; then
24768    # Not in mixed or Windows style, start by that.
24769    new_path=`cmd //c echo $path`
24770  fi
24771
24772
24773  input_path="$new_path"
24774  # Check if we need to convert this using DOS-style short mode. If the path
24775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24776  # take no chances and rewrite it.
24777  # Note: m4 eats our [], so we need to use [ and ] instead.
24778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24779  if test "x$has_forbidden_chars" != x; then
24780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24781    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24782  fi
24783
24784
24785  windows_path="$new_path"
24786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24787    unix_path=`$CYGPATH -u "$windows_path"`
24788    new_path="$unix_path"
24789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24790    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24791    new_path="$unix_path"
24792  fi
24793
24794  if test "x$path" != "x$new_path"; then
24795    BOOT_JDK="$new_path"
24796    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24797$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24798  fi
24799
24800  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24801  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24802
24803  else
24804    # We're on a posix platform. Hooray! :)
24805    path="$BOOT_JDK"
24806    has_space=`$ECHO "$path" | $GREP " "`
24807    if test "x$has_space" != x; then
24808      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24809$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24810      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24811    fi
24812
24813    # Use eval to expand a potential ~
24814    eval path="$path"
24815    if test ! -f "$path" && test ! -d "$path"; then
24816      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24817    fi
24818
24819    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24820  fi
24821
24822              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24823$as_echo_n "checking for Boot JDK... " >&6; }
24824              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24825$as_echo "$BOOT_JDK" >&6; }
24826              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24827$as_echo_n "checking Boot JDK version... " >&6; }
24828              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24829              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24830$as_echo "$BOOT_JDK_VERSION" >&6; }
24831            fi # end check jdk version
24832          fi # end check rt.jar
24833        fi # end check javac
24834      fi # end check java
24835    fi # end check boot jdk found
24836  fi
24837
24838  fi
24839
24840
24841    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24842    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24843      # Do we have a bin/java?
24844      if test ! -x "$BOOT_JDK/bin/java"; then
24845        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24847        BOOT_JDK_FOUND=no
24848      else
24849        # Do we have a bin/javac?
24850        if test ! -x "$BOOT_JDK/bin/javac"; then
24851          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24852$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24853          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24854$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24855          BOOT_JDK_FOUND=no
24856        else
24857          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24858          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24859            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24860$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24861            BOOT_JDK_FOUND=no
24862          else
24863            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24864            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24865
24866            # Extra M4 quote needed to protect [] in grep expression.
24867            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[789]\.'`
24868            if test "x$FOUND_CORRECT_VERSION" = x; then
24869              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24870$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24871              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 7, 8 or 9)" >&5
24872$as_echo "$as_me: (Your Boot JDK must be version 7, 8 or 9)" >&6;}
24873              BOOT_JDK_FOUND=no
24874            else
24875              # We're done! :-)
24876              BOOT_JDK_FOUND=yes
24877
24878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24879
24880  # Input might be given as Windows format, start by converting to
24881  # unix format.
24882  path="$BOOT_JDK"
24883  new_path=`$CYGPATH -u "$path"`
24884
24885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24888  # "foo.exe" is OK but "foo" is an error.
24889  #
24890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24891  # It is also a way to make sure we got the proper file name for the real test later on.
24892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24893  if test "x$test_shortpath" = x; then
24894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24896    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24897  fi
24898
24899  # Call helper function which possibly converts this using DOS-style short mode.
24900  # If so, the updated path is stored in $new_path.
24901
24902  input_path="$new_path"
24903  # Check if we need to convert this using DOS-style short mode. If the path
24904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24905  # take no chances and rewrite it.
24906  # Note: m4 eats our [], so we need to use [ and ] instead.
24907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24908  if test "x$has_forbidden_chars" != x; then
24909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24913      # Going to short mode and back again did indeed matter. Since short mode is
24914      # case insensitive, let's make it lowercase to improve readability.
24915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24916      # Now convert it back to Unix-stile (cygpath)
24917      input_path=`$CYGPATH -u "$shortmode_path"`
24918      new_path="$input_path"
24919    fi
24920  fi
24921
24922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24923  if test "x$test_cygdrive_prefix" = x; then
24924    # As a simple fix, exclude /usr/bin since it's not a real path.
24925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24927      # a path prefixed by /cygdrive for fixpath to work.
24928      new_path="$CYGWIN_ROOT_PATH$input_path"
24929    fi
24930  fi
24931
24932
24933  if test "x$path" != "x$new_path"; then
24934    BOOT_JDK="$new_path"
24935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24937  fi
24938
24939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24940
24941  path="$BOOT_JDK"
24942  has_colon=`$ECHO $path | $GREP ^.:`
24943  new_path="$path"
24944  if test "x$has_colon" = x; then
24945    # Not in mixed or Windows style, start by that.
24946    new_path=`cmd //c echo $path`
24947  fi
24948
24949
24950  input_path="$new_path"
24951  # Check if we need to convert this using DOS-style short mode. If the path
24952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24953  # take no chances and rewrite it.
24954  # Note: m4 eats our [], so we need to use [ and ] instead.
24955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24956  if test "x$has_forbidden_chars" != x; then
24957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24959  fi
24960
24961
24962  windows_path="$new_path"
24963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24964    unix_path=`$CYGPATH -u "$windows_path"`
24965    new_path="$unix_path"
24966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24968    new_path="$unix_path"
24969  fi
24970
24971  if test "x$path" != "x$new_path"; then
24972    BOOT_JDK="$new_path"
24973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24975  fi
24976
24977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24979
24980  else
24981    # We're on a posix platform. Hooray! :)
24982    path="$BOOT_JDK"
24983    has_space=`$ECHO "$path" | $GREP " "`
24984    if test "x$has_space" != x; then
24985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24987      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24988    fi
24989
24990    # Use eval to expand a potential ~
24991    eval path="$path"
24992    if test ! -f "$path" && test ! -d "$path"; then
24993      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24994    fi
24995
24996    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24997  fi
24998
24999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25000$as_echo_n "checking for Boot JDK... " >&6; }
25001              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25002$as_echo "$BOOT_JDK" >&6; }
25003              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25004$as_echo_n "checking Boot JDK version... " >&6; }
25005              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25006              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25007$as_echo "$BOOT_JDK_VERSION" >&6; }
25008            fi # end check jdk version
25009          fi # end check rt.jar
25010        fi # end check javac
25011      fi # end check java
25012    fi # end check boot jdk found
25013  fi
25014
25015
25016  # If we haven't found anything yet, we've truly lost. Give up.
25017  if test "x$BOOT_JDK_FOUND" = xno; then
25018
25019  # Print a helpful message on how to acquire the necessary build dependency.
25020  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25021  MISSING_DEPENDENCY=openjdk
25022
25023  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25024    cygwin_help $MISSING_DEPENDENCY
25025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25026    msys_help $MISSING_DEPENDENCY
25027  else
25028    PKGHANDLER_COMMAND=
25029
25030    case $PKGHANDLER in
25031      apt-get)
25032        apt_help     $MISSING_DEPENDENCY ;;
25033      yum)
25034        yum_help     $MISSING_DEPENDENCY ;;
25035      port)
25036        port_help    $MISSING_DEPENDENCY ;;
25037      pkgutil)
25038        pkgutil_help $MISSING_DEPENDENCY ;;
25039      pkgadd)
25040        pkgadd_help  $MISSING_DEPENDENCY ;;
25041    esac
25042
25043    if test "x$PKGHANDLER_COMMAND" != x; then
25044      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25045    fi
25046  fi
25047
25048    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25049$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25050    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25051$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25052    as_fn_error $? "Cannot continue" "$LINENO" 5
25053  fi
25054
25055  # Setup proper paths for what we found
25056  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25057  if test ! -f "$BOOT_RTJAR"; then
25058    # On MacOSX it is called classes.jar
25059    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25060    if test -f "$BOOT_RTJAR"; then
25061      # Remove the ..
25062      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25063    fi
25064  fi
25065  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25066  BOOT_JDK="$BOOT_JDK"
25067
25068
25069
25070
25071  # Setup tools from the Boot JDK.
25072
25073  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25074
25075  # Publish this variable in the help.
25076
25077
25078  if test "x$JAVA" = x; then
25079    # The variable is not set by user, try to locate tool using the code snippet
25080
25081      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25082$as_echo_n "checking for java in Boot JDK... " >&6; }
25083      JAVA=$BOOT_JDK/bin/java
25084      if test ! -x $JAVA; then
25085        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25086$as_echo "not found" >&6; }
25087        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25088$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25089        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25090      fi
25091      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25092$as_echo "ok" >&6; }
25093
25094
25095  else
25096    # The variable is set, but is it from the command line or the environment?
25097
25098    # Try to remove the string !JAVA! from our list.
25099    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25100    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25101      # If it failed, the variable was not from the command line. Ignore it,
25102      # but warn the user (except for BASH, which is always set by the calling BASH).
25103      if test "xJAVA" != xBASH; then
25104        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25105$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25106      fi
25107      # Try to locate tool using the code snippet
25108
25109      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25110$as_echo_n "checking for java in Boot JDK... " >&6; }
25111      JAVA=$BOOT_JDK/bin/java
25112      if test ! -x $JAVA; then
25113        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25114$as_echo "not found" >&6; }
25115        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25116$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25117        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25118      fi
25119      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25120$as_echo "ok" >&6; }
25121
25122
25123    else
25124      # If it succeeded, then it was overridden by the user. We will use it
25125      # for the tool.
25126
25127      # First remove it from the list of overridden variables, so we can test
25128      # for unknown variables in the end.
25129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25130
25131      # Check if the provided tool contains a complete path.
25132      tool_specified="$JAVA"
25133      tool_basename="${tool_specified##*/}"
25134      if test "x$tool_basename" = "x$tool_specified"; then
25135        # A command without a complete path is provided, search $PATH.
25136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25137$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25138        # Extract the first word of "$tool_basename", so it can be a program name with args.
25139set dummy $tool_basename; ac_word=$2
25140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25141$as_echo_n "checking for $ac_word... " >&6; }
25142if ${ac_cv_path_JAVA+:} false; then :
25143  $as_echo_n "(cached) " >&6
25144else
25145  case $JAVA in
25146  [\\/]* | ?:[\\/]*)
25147  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25148  ;;
25149  *)
25150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25151for as_dir in $PATH
25152do
25153  IFS=$as_save_IFS
25154  test -z "$as_dir" && as_dir=.
25155    for ac_exec_ext in '' $ac_executable_extensions; do
25156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25157    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25159    break 2
25160  fi
25161done
25162  done
25163IFS=$as_save_IFS
25164
25165  ;;
25166esac
25167fi
25168JAVA=$ac_cv_path_JAVA
25169if test -n "$JAVA"; then
25170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25171$as_echo "$JAVA" >&6; }
25172else
25173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25174$as_echo "no" >&6; }
25175fi
25176
25177
25178        if test "x$JAVA" = x; then
25179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25180        fi
25181      else
25182        # Otherwise we believe it is a complete path. Use it as it is.
25183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25184$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25186$as_echo_n "checking for JAVA... " >&6; }
25187        if test ! -x "$tool_specified"; then
25188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25189$as_echo "not found" >&6; }
25190          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25191        fi
25192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25193$as_echo "$tool_specified" >&6; }
25194      fi
25195    fi
25196  fi
25197
25198
25199
25200  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25201
25202  # Publish this variable in the help.
25203
25204
25205  if test "x$JAVAC" = x; then
25206    # The variable is not set by user, try to locate tool using the code snippet
25207
25208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25209$as_echo_n "checking for javac in Boot JDK... " >&6; }
25210      JAVAC=$BOOT_JDK/bin/javac
25211      if test ! -x $JAVAC; then
25212        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25213$as_echo "not found" >&6; }
25214        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25215$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25216        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25217      fi
25218      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25219$as_echo "ok" >&6; }
25220
25221
25222  else
25223    # The variable is set, but is it from the command line or the environment?
25224
25225    # Try to remove the string !JAVAC! from our list.
25226    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25227    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25228      # If it failed, the variable was not from the command line. Ignore it,
25229      # but warn the user (except for BASH, which is always set by the calling BASH).
25230      if test "xJAVAC" != xBASH; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25232$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25233      fi
25234      # Try to locate tool using the code snippet
25235
25236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25237$as_echo_n "checking for javac in Boot JDK... " >&6; }
25238      JAVAC=$BOOT_JDK/bin/javac
25239      if test ! -x $JAVAC; then
25240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25241$as_echo "not found" >&6; }
25242        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25243$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25244        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25245      fi
25246      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25247$as_echo "ok" >&6; }
25248
25249
25250    else
25251      # If it succeeded, then it was overridden by the user. We will use it
25252      # for the tool.
25253
25254      # First remove it from the list of overridden variables, so we can test
25255      # for unknown variables in the end.
25256      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25257
25258      # Check if the provided tool contains a complete path.
25259      tool_specified="$JAVAC"
25260      tool_basename="${tool_specified##*/}"
25261      if test "x$tool_basename" = "x$tool_specified"; then
25262        # A command without a complete path is provided, search $PATH.
25263        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25264$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25265        # Extract the first word of "$tool_basename", so it can be a program name with args.
25266set dummy $tool_basename; ac_word=$2
25267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25268$as_echo_n "checking for $ac_word... " >&6; }
25269if ${ac_cv_path_JAVAC+:} false; then :
25270  $as_echo_n "(cached) " >&6
25271else
25272  case $JAVAC in
25273  [\\/]* | ?:[\\/]*)
25274  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25275  ;;
25276  *)
25277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25278for as_dir in $PATH
25279do
25280  IFS=$as_save_IFS
25281  test -z "$as_dir" && as_dir=.
25282    for ac_exec_ext in '' $ac_executable_extensions; do
25283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25284    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25286    break 2
25287  fi
25288done
25289  done
25290IFS=$as_save_IFS
25291
25292  ;;
25293esac
25294fi
25295JAVAC=$ac_cv_path_JAVAC
25296if test -n "$JAVAC"; then
25297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25298$as_echo "$JAVAC" >&6; }
25299else
25300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25301$as_echo "no" >&6; }
25302fi
25303
25304
25305        if test "x$JAVAC" = x; then
25306          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25307        fi
25308      else
25309        # Otherwise we believe it is a complete path. Use it as it is.
25310        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25311$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25312        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25313$as_echo_n "checking for JAVAC... " >&6; }
25314        if test ! -x "$tool_specified"; then
25315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25316$as_echo "not found" >&6; }
25317          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25318        fi
25319        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25320$as_echo "$tool_specified" >&6; }
25321      fi
25322    fi
25323  fi
25324
25325
25326
25327  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25328
25329  # Publish this variable in the help.
25330
25331
25332  if test "x$JAVAH" = x; then
25333    # The variable is not set by user, try to locate tool using the code snippet
25334
25335      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25336$as_echo_n "checking for javah in Boot JDK... " >&6; }
25337      JAVAH=$BOOT_JDK/bin/javah
25338      if test ! -x $JAVAH; then
25339        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25340$as_echo "not found" >&6; }
25341        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25342$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25343        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25344      fi
25345      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25346$as_echo "ok" >&6; }
25347
25348
25349  else
25350    # The variable is set, but is it from the command line or the environment?
25351
25352    # Try to remove the string !JAVAH! from our list.
25353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25355      # If it failed, the variable was not from the command line. Ignore it,
25356      # but warn the user (except for BASH, which is always set by the calling BASH).
25357      if test "xJAVAH" != xBASH; then
25358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25359$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25360      fi
25361      # Try to locate tool using the code snippet
25362
25363      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25364$as_echo_n "checking for javah in Boot JDK... " >&6; }
25365      JAVAH=$BOOT_JDK/bin/javah
25366      if test ! -x $JAVAH; then
25367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25368$as_echo "not found" >&6; }
25369        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25370$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25371        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25372      fi
25373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25374$as_echo "ok" >&6; }
25375
25376
25377    else
25378      # If it succeeded, then it was overridden by the user. We will use it
25379      # for the tool.
25380
25381      # First remove it from the list of overridden variables, so we can test
25382      # for unknown variables in the end.
25383      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25384
25385      # Check if the provided tool contains a complete path.
25386      tool_specified="$JAVAH"
25387      tool_basename="${tool_specified##*/}"
25388      if test "x$tool_basename" = "x$tool_specified"; then
25389        # A command without a complete path is provided, search $PATH.
25390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25391$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25392        # Extract the first word of "$tool_basename", so it can be a program name with args.
25393set dummy $tool_basename; ac_word=$2
25394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25395$as_echo_n "checking for $ac_word... " >&6; }
25396if ${ac_cv_path_JAVAH+:} false; then :
25397  $as_echo_n "(cached) " >&6
25398else
25399  case $JAVAH in
25400  [\\/]* | ?:[\\/]*)
25401  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25402  ;;
25403  *)
25404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25405for as_dir in $PATH
25406do
25407  IFS=$as_save_IFS
25408  test -z "$as_dir" && as_dir=.
25409    for ac_exec_ext in '' $ac_executable_extensions; do
25410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25411    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25413    break 2
25414  fi
25415done
25416  done
25417IFS=$as_save_IFS
25418
25419  ;;
25420esac
25421fi
25422JAVAH=$ac_cv_path_JAVAH
25423if test -n "$JAVAH"; then
25424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25425$as_echo "$JAVAH" >&6; }
25426else
25427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25428$as_echo "no" >&6; }
25429fi
25430
25431
25432        if test "x$JAVAH" = x; then
25433          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25434        fi
25435      else
25436        # Otherwise we believe it is a complete path. Use it as it is.
25437        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25438$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25440$as_echo_n "checking for JAVAH... " >&6; }
25441        if test ! -x "$tool_specified"; then
25442          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25443$as_echo "not found" >&6; }
25444          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25445        fi
25446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25447$as_echo "$tool_specified" >&6; }
25448      fi
25449    fi
25450  fi
25451
25452
25453
25454  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25455
25456  # Publish this variable in the help.
25457
25458
25459  if test "x$JAR" = x; then
25460    # The variable is not set by user, try to locate tool using the code snippet
25461
25462      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25463$as_echo_n "checking for jar in Boot JDK... " >&6; }
25464      JAR=$BOOT_JDK/bin/jar
25465      if test ! -x $JAR; then
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25467$as_echo "not found" >&6; }
25468        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25469$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25470        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25471      fi
25472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25473$as_echo "ok" >&6; }
25474
25475
25476  else
25477    # The variable is set, but is it from the command line or the environment?
25478
25479    # Try to remove the string !JAR! from our list.
25480    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25481    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25482      # If it failed, the variable was not from the command line. Ignore it,
25483      # but warn the user (except for BASH, which is always set by the calling BASH).
25484      if test "xJAR" != xBASH; then
25485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25486$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25487      fi
25488      # Try to locate tool using the code snippet
25489
25490      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25491$as_echo_n "checking for jar in Boot JDK... " >&6; }
25492      JAR=$BOOT_JDK/bin/jar
25493      if test ! -x $JAR; then
25494        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25495$as_echo "not found" >&6; }
25496        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25497$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25498        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25499      fi
25500      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25501$as_echo "ok" >&6; }
25502
25503
25504    else
25505      # If it succeeded, then it was overridden by the user. We will use it
25506      # for the tool.
25507
25508      # First remove it from the list of overridden variables, so we can test
25509      # for unknown variables in the end.
25510      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25511
25512      # Check if the provided tool contains a complete path.
25513      tool_specified="$JAR"
25514      tool_basename="${tool_specified##*/}"
25515      if test "x$tool_basename" = "x$tool_specified"; then
25516        # A command without a complete path is provided, search $PATH.
25517        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25518$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25519        # Extract the first word of "$tool_basename", so it can be a program name with args.
25520set dummy $tool_basename; ac_word=$2
25521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25522$as_echo_n "checking for $ac_word... " >&6; }
25523if ${ac_cv_path_JAR+:} false; then :
25524  $as_echo_n "(cached) " >&6
25525else
25526  case $JAR in
25527  [\\/]* | ?:[\\/]*)
25528  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25529  ;;
25530  *)
25531  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25532for as_dir in $PATH
25533do
25534  IFS=$as_save_IFS
25535  test -z "$as_dir" && as_dir=.
25536    for ac_exec_ext in '' $ac_executable_extensions; do
25537  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25538    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25539    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25540    break 2
25541  fi
25542done
25543  done
25544IFS=$as_save_IFS
25545
25546  ;;
25547esac
25548fi
25549JAR=$ac_cv_path_JAR
25550if test -n "$JAR"; then
25551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25552$as_echo "$JAR" >&6; }
25553else
25554  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25555$as_echo "no" >&6; }
25556fi
25557
25558
25559        if test "x$JAR" = x; then
25560          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25561        fi
25562      else
25563        # Otherwise we believe it is a complete path. Use it as it is.
25564        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25565$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25567$as_echo_n "checking for JAR... " >&6; }
25568        if test ! -x "$tool_specified"; then
25569          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25570$as_echo "not found" >&6; }
25571          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25572        fi
25573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25574$as_echo "$tool_specified" >&6; }
25575      fi
25576    fi
25577  fi
25578
25579
25580
25581  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25582
25583  # Publish this variable in the help.
25584
25585
25586  if test "x$NATIVE2ASCII" = x; then
25587    # The variable is not set by user, try to locate tool using the code snippet
25588
25589      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25590$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25591      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25592      if test ! -x $NATIVE2ASCII; then
25593        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25594$as_echo "not found" >&6; }
25595        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25596$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25597        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25598      fi
25599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25600$as_echo "ok" >&6; }
25601
25602
25603  else
25604    # The variable is set, but is it from the command line or the environment?
25605
25606    # Try to remove the string !NATIVE2ASCII! from our list.
25607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25609      # If it failed, the variable was not from the command line. Ignore it,
25610      # but warn the user (except for BASH, which is always set by the calling BASH).
25611      if test "xNATIVE2ASCII" != xBASH; then
25612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25613$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25614      fi
25615      # Try to locate tool using the code snippet
25616
25617      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25618$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25619      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25620      if test ! -x $NATIVE2ASCII; then
25621        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25622$as_echo "not found" >&6; }
25623        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25624$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25625        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25626      fi
25627      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25628$as_echo "ok" >&6; }
25629
25630
25631    else
25632      # If it succeeded, then it was overridden by the user. We will use it
25633      # for the tool.
25634
25635      # First remove it from the list of overridden variables, so we can test
25636      # for unknown variables in the end.
25637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25638
25639      # Check if the provided tool contains a complete path.
25640      tool_specified="$NATIVE2ASCII"
25641      tool_basename="${tool_specified##*/}"
25642      if test "x$tool_basename" = "x$tool_specified"; then
25643        # A command without a complete path is provided, search $PATH.
25644        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25645$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25646        # Extract the first word of "$tool_basename", so it can be a program name with args.
25647set dummy $tool_basename; ac_word=$2
25648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25649$as_echo_n "checking for $ac_word... " >&6; }
25650if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25651  $as_echo_n "(cached) " >&6
25652else
25653  case $NATIVE2ASCII in
25654  [\\/]* | ?:[\\/]*)
25655  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25656  ;;
25657  *)
25658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25659for as_dir in $PATH
25660do
25661  IFS=$as_save_IFS
25662  test -z "$as_dir" && as_dir=.
25663    for ac_exec_ext in '' $ac_executable_extensions; do
25664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25665    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25667    break 2
25668  fi
25669done
25670  done
25671IFS=$as_save_IFS
25672
25673  ;;
25674esac
25675fi
25676NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25677if test -n "$NATIVE2ASCII"; then
25678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25679$as_echo "$NATIVE2ASCII" >&6; }
25680else
25681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25682$as_echo "no" >&6; }
25683fi
25684
25685
25686        if test "x$NATIVE2ASCII" = x; then
25687          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25688        fi
25689      else
25690        # Otherwise we believe it is a complete path. Use it as it is.
25691        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25692$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25694$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25695        if test ! -x "$tool_specified"; then
25696          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25697$as_echo "not found" >&6; }
25698          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25699        fi
25700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25701$as_echo "$tool_specified" >&6; }
25702      fi
25703    fi
25704  fi
25705
25706
25707
25708  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25709
25710  # Publish this variable in the help.
25711
25712
25713  if test "x$JARSIGNER" = x; then
25714    # The variable is not set by user, try to locate tool using the code snippet
25715
25716      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25717$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25718      JARSIGNER=$BOOT_JDK/bin/jarsigner
25719      if test ! -x $JARSIGNER; then
25720        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25721$as_echo "not found" >&6; }
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25723$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25724        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25725      fi
25726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25727$as_echo "ok" >&6; }
25728
25729
25730  else
25731    # The variable is set, but is it from the command line or the environment?
25732
25733    # Try to remove the string !JARSIGNER! from our list.
25734    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25735    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25736      # If it failed, the variable was not from the command line. Ignore it,
25737      # but warn the user (except for BASH, which is always set by the calling BASH).
25738      if test "xJARSIGNER" != xBASH; then
25739        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25740$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25741      fi
25742      # Try to locate tool using the code snippet
25743
25744      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25745$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25746      JARSIGNER=$BOOT_JDK/bin/jarsigner
25747      if test ! -x $JARSIGNER; then
25748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25749$as_echo "not found" >&6; }
25750        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25751$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25752        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25753      fi
25754      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25755$as_echo "ok" >&6; }
25756
25757
25758    else
25759      # If it succeeded, then it was overridden by the user. We will use it
25760      # for the tool.
25761
25762      # First remove it from the list of overridden variables, so we can test
25763      # for unknown variables in the end.
25764      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25765
25766      # Check if the provided tool contains a complete path.
25767      tool_specified="$JARSIGNER"
25768      tool_basename="${tool_specified##*/}"
25769      if test "x$tool_basename" = "x$tool_specified"; then
25770        # A command without a complete path is provided, search $PATH.
25771        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
25772$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
25773        # Extract the first word of "$tool_basename", so it can be a program name with args.
25774set dummy $tool_basename; ac_word=$2
25775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25776$as_echo_n "checking for $ac_word... " >&6; }
25777if ${ac_cv_path_JARSIGNER+:} false; then :
25778  $as_echo_n "(cached) " >&6
25779else
25780  case $JARSIGNER in
25781  [\\/]* | ?:[\\/]*)
25782  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
25783  ;;
25784  *)
25785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25786for as_dir in $PATH
25787do
25788  IFS=$as_save_IFS
25789  test -z "$as_dir" && as_dir=.
25790    for ac_exec_ext in '' $ac_executable_extensions; do
25791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25792    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
25793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25794    break 2
25795  fi
25796done
25797  done
25798IFS=$as_save_IFS
25799
25800  ;;
25801esac
25802fi
25803JARSIGNER=$ac_cv_path_JARSIGNER
25804if test -n "$JARSIGNER"; then
25805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
25806$as_echo "$JARSIGNER" >&6; }
25807else
25808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25809$as_echo "no" >&6; }
25810fi
25811
25812
25813        if test "x$JARSIGNER" = x; then
25814          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25815        fi
25816      else
25817        # Otherwise we believe it is a complete path. Use it as it is.
25818        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
25819$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
25821$as_echo_n "checking for JARSIGNER... " >&6; }
25822        if test ! -x "$tool_specified"; then
25823          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25824$as_echo "not found" >&6; }
25825          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
25826        fi
25827        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25828$as_echo "$tool_specified" >&6; }
25829      fi
25830    fi
25831  fi
25832
25833
25834
25835  # Finally, set some other options...
25836
25837  # When compiling code to be executed by the Boot JDK, force jdk7 compatibility.
25838  BOOT_JDK_SOURCETARGET="-source 7 -target 7"
25839
25840
25841
25842
25843  ##############################################################################
25844  #
25845  # Specify options for anything that is run with the Boot JDK.
25846  #
25847
25848# Check whether --with-boot-jdk-jvmargs was given.
25849if test "${with_boot_jdk_jvmargs+set}" = set; then :
25850  withval=$with_boot_jdk_jvmargs;
25851fi
25852
25853
25854  if test "x$with_boot_jdk_jvmargs" = x; then
25855    # Not all JVM:s accept the same arguments on the command line.
25856    # OpenJDK specific increase in thread stack for JDK build,
25857    # well more specifically, when running javac.
25858    if test "x$BUILD_NUM_BITS" = x32; then
25859      STACK_SIZE=768
25860    else
25861      # Running Javac on a JVM on a 64-bit machine, the stack takes more space
25862      # since 64-bit pointers are pushed on the stach. Apparently, we need
25863      # to increase the stack space when javacing the JDK....
25864      STACK_SIZE=1536
25865    fi
25866
25867    # Minimum amount of heap memory.
25868
25869  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
25870  $ECHO "Command: $JAVA -Xms64M -version" >&5
25871  OUTPUT=`$JAVA -Xms64M -version 2>&1`
25872  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25873  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25874  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25875    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xms64M"
25876    JVM_ARG_OK=true
25877  else
25878    $ECHO "Arg failed:" >&5
25879    $ECHO "$OUTPUT" >&5
25880    JVM_ARG_OK=false
25881  fi
25882
25883    if test "x$OPENJDK_TARGET_OS" = "xmacosx" || test "x$OPENJDK_TARGET_CPU" = "xppc64" ; then
25884      # Why does macosx need more heap? Its the huge JDK batch.
25885
25886  $ECHO "Check if jvm arg is ok: -Xmx1600M" >&5
25887  $ECHO "Command: $JAVA -Xmx1600M -version" >&5
25888  OUTPUT=`$JAVA -Xmx1600M -version 2>&1`
25889  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25890  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25891  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25892    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1600M"
25893    JVM_ARG_OK=true
25894  else
25895    $ECHO "Arg failed:" >&5
25896    $ECHO "$OUTPUT" >&5
25897    JVM_ARG_OK=false
25898  fi
25899
25900    else
25901
25902  $ECHO "Check if jvm arg is ok: -Xmx1100M" >&5
25903  $ECHO "Command: $JAVA -Xmx1100M -version" >&5
25904  OUTPUT=`$JAVA -Xmx1100M -version 2>&1`
25905  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25906  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25907  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25908    boot_jdk_jvmargs="$boot_jdk_jvmargs -Xmx1100M"
25909    JVM_ARG_OK=true
25910  else
25911    $ECHO "Arg failed:" >&5
25912    $ECHO "$OUTPUT" >&5
25913    JVM_ARG_OK=false
25914  fi
25915
25916    fi
25917    # When is adding -client something that speeds up the JVM?
25918    # ADD_JVM_ARG_IF_OK([-client],boot_jdk_jvmargs,[$JAVA])
25919
25920  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
25921  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
25922  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
25923  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25924  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25925  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25926    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:ThreadStackSize=$STACK_SIZE"
25927    JVM_ARG_OK=true
25928  else
25929    $ECHO "Arg failed:" >&5
25930    $ECHO "$OUTPUT" >&5
25931    JVM_ARG_OK=false
25932  fi
25933
25934    # Disable special log output when a debug build is used as Boot JDK...
25935
25936  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
25937  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
25938  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
25939  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
25940  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
25941  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
25942    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
25943    JVM_ARG_OK=true
25944  else
25945    $ECHO "Arg failed:" >&5
25946    $ECHO "$OUTPUT" >&5
25947    JVM_ARG_OK=false
25948  fi
25949
25950  fi
25951
25952  BOOT_JDK_JVMARGS=$boot_jdk_jvmargs
25953
25954
25955
25956###############################################################################
25957#
25958# Configure the sources to use. We can add or override individual directories.
25959#
25960###############################################################################
25961
25962
25963  # Where are the sources. Any of these can be overridden
25964  # using --with-override-corba and the likes.
25965  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
25966  CORBA_TOPDIR="$SRC_ROOT/corba"
25967  JAXP_TOPDIR="$SRC_ROOT/jaxp"
25968  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
25969  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
25970  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
25971  JDK_TOPDIR="$SRC_ROOT/jdk"
25972
25973
25974
25975
25976
25977
25978
25979
25980
25981
25982  ###############################################################################
25983  #
25984  # Pickup additional source for a component from outside of the source root
25985  # or override source for a component.
25986  #
25987
25988# Check whether --with-add-source-root was given.
25989if test "${with_add_source_root+set}" = set; then :
25990  withval=$with_add_source_root;
25991fi
25992
25993
25994
25995# Check whether --with-override-source-root was given.
25996if test "${with_override_source_root+set}" = set; then :
25997  withval=$with_override_source_root;
25998fi
25999
26000
26001
26002# Check whether --with-adds-and-overrides was given.
26003if test "${with_adds_and_overrides+set}" = set; then :
26004  withval=$with_adds_and_overrides;
26005fi
26006
26007
26008  if test "x$with_adds_and_overrides" != x; then
26009    with_add_source_root="$with_adds_and_overrides/adds"
26010    with_override_source_root="$with_adds_and_overrides/overrides"
26011  fi
26012
26013  if test "x$with_add_source_root" != x; then
26014    if ! test -d $with_add_source_root; then
26015      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26016    fi
26017    CURDIR="$PWD"
26018    cd "$with_add_source_root"
26019    ADD_SRC_ROOT="`pwd`"
26020    cd "$CURDIR"
26021    # Verify that the addon source root does not have any root makefiles.
26022    # If it does, then it is usually an error, prevent this.
26023    if test -f $with_add_source_root/langtools/make/Makefile; then
26024      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
26025    fi
26026    if test -f $with_add_source_root/corba/make/Makefile; then
26027      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
26028    fi
26029    if test -f $with_add_source_root/jaxp/make/Makefile; then
26030      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
26031    fi
26032    if test -f $with_add_source_root/jaxws/make/Makefile; then
26033      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
26034    fi
26035    if test -f $with_add_source_root/hotspot/make/Makefile; then
26036      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
26037    fi
26038    if test -f $with_add_source_root/nashorn/make/Makefile; then
26039      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
26040    fi
26041    if test -f $with_add_source_root/jdk/make/Makefile; then
26042      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
26043    fi
26044  fi
26045
26046
26047  if test "x$with_override_source_root" != x; then
26048    if ! test -d $with_override_source_root; then
26049      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26050    fi
26051    CURDIR="$PWD"
26052    cd "$with_override_source_root"
26053    OVERRIDE_SRC_ROOT="`pwd`"
26054    cd "$CURDIR"
26055    if test -f $with_override_source_root/langtools/make/Makefile; then
26056      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
26057    fi
26058    if test -f $with_override_source_root/corba/make/Makefile; then
26059      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
26060    fi
26061    if test -f $with_override_source_root/jaxp/make/Makefile; then
26062      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
26063    fi
26064    if test -f $with_override_source_root/jaxws/make/Makefile; then
26065      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
26066    fi
26067    if test -f $with_override_source_root/hotspot/make/Makefile; then
26068      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
26069    fi
26070    if test -f $with_override_source_root/nashorn/make/Makefile; then
26071      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
26072    fi
26073    if test -f $with_override_source_root/jdk/make/Makefile; then
26074      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
26075    fi
26076  fi
26077
26078
26079  ###############################################################################
26080  #
26081  # Override a repo completely, this is used for example when you have 3 small
26082  # development sandboxes of the langtools sources and want to avoid having 3 full
26083  # OpenJDK sources checked out on disk.
26084  #
26085  # Assuming that the 3 langtools sandboxes are located here:
26086  # /home/fredrik/sandbox1/langtools
26087  # /home/fredrik/sandbox2/langtools
26088  # /home/fredrik/sandbox3/langtools
26089  #
26090  # From the source root you create build subdirs manually:
26091  #     mkdir -p build1 build2 build3
26092  # in each build directory run:
26093  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26094  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26095  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26096  #
26097
26098
26099# Check whether --with-override-langtools was given.
26100if test "${with_override_langtools+set}" = set; then :
26101  withval=$with_override_langtools;
26102fi
26103
26104
26105
26106# Check whether --with-override-corba was given.
26107if test "${with_override_corba+set}" = set; then :
26108  withval=$with_override_corba;
26109fi
26110
26111
26112
26113# Check whether --with-override-jaxp was given.
26114if test "${with_override_jaxp+set}" = set; then :
26115  withval=$with_override_jaxp;
26116fi
26117
26118
26119
26120# Check whether --with-override-jaxws was given.
26121if test "${with_override_jaxws+set}" = set; then :
26122  withval=$with_override_jaxws;
26123fi
26124
26125
26126
26127# Check whether --with-override-hotspot was given.
26128if test "${with_override_hotspot+set}" = set; then :
26129  withval=$with_override_hotspot;
26130fi
26131
26132
26133
26134# Check whether --with-override-nashorn was given.
26135if test "${with_override_nashorn+set}" = set; then :
26136  withval=$with_override_nashorn;
26137fi
26138
26139
26140
26141# Check whether --with-override-jdk was given.
26142if test "${with_override_jdk+set}" = set; then :
26143  withval=$with_override_jdk;
26144fi
26145
26146
26147  if test "x$with_override_langtools" != x; then
26148    CURDIR="$PWD"
26149    cd "$with_override_langtools"
26150    LANGTOOLS_TOPDIR="`pwd`"
26151    cd "$CURDIR"
26152    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26153      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26154    fi
26155    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26156$as_echo_n "checking if langtools should be overridden... " >&6; }
26157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26158$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26159  fi
26160  if test "x$with_override_corba" != x; then
26161    CURDIR="$PWD"
26162    cd "$with_override_corba"
26163    CORBA_TOPDIR="`pwd`"
26164    cd "$CURDIR"
26165    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26166      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26167    fi
26168    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26169$as_echo_n "checking if corba should be overridden... " >&6; }
26170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26171$as_echo "yes with $CORBA_TOPDIR" >&6; }
26172  fi
26173  if test "x$with_override_jaxp" != x; then
26174    CURDIR="$PWD"
26175    cd "$with_override_jaxp"
26176    JAXP_TOPDIR="`pwd`"
26177    cd "$CURDIR"
26178    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26179      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26180    fi
26181    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26182$as_echo_n "checking if jaxp should be overridden... " >&6; }
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26184$as_echo "yes with $JAXP_TOPDIR" >&6; }
26185  fi
26186  if test "x$with_override_jaxws" != x; then
26187    CURDIR="$PWD"
26188    cd "$with_override_jaxws"
26189    JAXWS_TOPDIR="`pwd`"
26190    cd "$CURDIR"
26191    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26192      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26193    fi
26194    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26195$as_echo_n "checking if jaxws should be overridden... " >&6; }
26196    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26197$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26198  fi
26199  if test "x$with_override_hotspot" != x; then
26200    CURDIR="$PWD"
26201    cd "$with_override_hotspot"
26202    HOTSPOT_TOPDIR="`pwd`"
26203    cd "$CURDIR"
26204    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26205      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26206    fi
26207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26208$as_echo_n "checking if hotspot should be overridden... " >&6; }
26209    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26210$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26211  fi
26212  if test "x$with_override_nashorn" != x; then
26213    CURDIR="$PWD"
26214    cd "$with_override_nashorn"
26215    NASHORN_TOPDIR="`pwd`"
26216    cd "$CURDIR"
26217    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26218      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26219    fi
26220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26221$as_echo_n "checking if nashorn should be overridden... " >&6; }
26222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26223$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26224  fi
26225  if test "x$with_override_jdk" != x; then
26226    CURDIR="$PWD"
26227    cd "$with_override_jdk"
26228    JDK_TOPDIR="`pwd`"
26229    cd "$CURDIR"
26230    if ! test -f $JDK_TOPDIR/make/Makefile; then
26231      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26232    fi
26233    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26234$as_echo_n "checking if JDK should be overridden... " >&6; }
26235    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26236$as_echo "yes with $JDK_TOPDIR" >&6; }
26237  fi
26238
26239
26240  BUILD_OUTPUT="$OUTPUT_ROOT"
26241
26242
26243  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26244  BUILD_HOTSPOT=true
26245
26246
26247
26248# Check whether --with-import-hotspot was given.
26249if test "${with_import_hotspot+set}" = set; then :
26250  withval=$with_import_hotspot;
26251fi
26252
26253  if test "x$with_import_hotspot" != x; then
26254    CURDIR="$PWD"
26255    cd "$with_import_hotspot"
26256    HOTSPOT_DIST="`pwd`"
26257    cd "$CURDIR"
26258    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26259      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26260    fi
26261    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26262$as_echo_n "checking if hotspot should be imported... " >&6; }
26263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26264$as_echo "yes from $HOTSPOT_DIST" >&6; }
26265    BUILD_HOTSPOT=false
26266  fi
26267
26268  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26269
26270
26271###############################################################################
26272#
26273# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26274# native code.
26275#
26276###############################################################################
26277
26278# First determine the toolchain type (compiler family)
26279
26280
26281# Check whether --with-toolchain-type was given.
26282if test "${with_toolchain_type+set}" = set; then :
26283  withval=$with_toolchain_type;
26284fi
26285
26286
26287  # Use indirect variable referencing
26288  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26289  VALID_TOOLCHAINS=${!toolchain_var_name}
26290  # First toolchain type in the list is the default
26291  DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26292
26293  if test "x$with_toolchain_type" = xlist; then
26294    # List all toolchains
26295    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26296$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26297    for toolchain in $VALID_TOOLCHAINS; do
26298      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26299      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26300      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26301    done
26302
26303    exit 0
26304  elif test "x$with_toolchain_type" != x; then
26305    # User override; check that it is valid
26306    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26307      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26308$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26309      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26310$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26311      as_fn_error $? "Cannot continue." "$LINENO" 5
26312    fi
26313    TOOLCHAIN_TYPE=$with_toolchain_type
26314  else
26315    # No flag given, use default
26316    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26317  fi
26318
26319
26320  TOOLCHAIN_CC_BINARY_clang="clang"
26321  TOOLCHAIN_CC_BINARY_gcc="gcc"
26322  TOOLCHAIN_CC_BINARY_microsoft="cl"
26323  TOOLCHAIN_CC_BINARY_solstudio="cc"
26324  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26325
26326  TOOLCHAIN_CXX_BINARY_clang="clang++"
26327  TOOLCHAIN_CXX_BINARY_gcc="g++"
26328  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26329  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26330  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26331
26332  # Use indirect variable referencing
26333  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26334  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26335  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26336  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26337  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26338  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26339
26340
26341  # Define filename patterns
26342  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26343    LIBRARY_PREFIX=
26344    SHARED_LIBRARY_SUFFIX='.dll'
26345    STATIC_LIBRARY_SUFFIX='.lib'
26346    SHARED_LIBRARY='$1.dll'
26347    STATIC_LIBRARY='$1.lib'
26348    OBJ_SUFFIX='.obj'
26349    EXE_SUFFIX='.exe'
26350  else
26351    LIBRARY_PREFIX=lib
26352    SHARED_LIBRARY_SUFFIX='.so'
26353    STATIC_LIBRARY_SUFFIX='.a'
26354    SHARED_LIBRARY='lib$1.so'
26355    STATIC_LIBRARY='lib$1.a'
26356    OBJ_SUFFIX='.o'
26357    EXE_SUFFIX=''
26358    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26359      SHARED_LIBRARY='lib$1.dylib'
26360      SHARED_LIBRARY_SUFFIX='.dylib'
26361    fi
26362  fi
26363
26364
26365
26366
26367
26368
26369
26370
26371
26372
26373  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26374    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26375$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26376  else
26377    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26378$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26379  fi
26380
26381
26382# Then detect the actual binaries needed
26383
26384  # FIXME: Is this needed?
26385  ac_ext=cpp
26386ac_cpp='$CXXCPP $CPPFLAGS'
26387ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26388ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26389ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26390
26391
26392  # Store the CFLAGS etc passed to the configure script.
26393  ORG_CFLAGS="$CFLAGS"
26394  ORG_CXXFLAGS="$CXXFLAGS"
26395  ORG_OBJCFLAGS="$OBJCFLAGS"
26396
26397  # On Windows, we need to detect the visual studio installation first.
26398  # This will change the PATH, but we need to keep that new PATH even
26399  # after toolchain detection is done, since the compiler (on x86) uses
26400  # it for DLL resolution in runtime.
26401  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26402
26403  # Store path to cygwin link.exe to help excluding it when searching for
26404  # VS linker. This must be done before changing the PATH when looking for VS.
26405  # Extract the first word of "link", so it can be a program name with args.
26406set dummy link; ac_word=$2
26407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26408$as_echo_n "checking for $ac_word... " >&6; }
26409if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26410  $as_echo_n "(cached) " >&6
26411else
26412  case $CYGWIN_LINK in
26413  [\\/]* | ?:[\\/]*)
26414  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26415  ;;
26416  *)
26417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26418for as_dir in $PATH
26419do
26420  IFS=$as_save_IFS
26421  test -z "$as_dir" && as_dir=.
26422    for ac_exec_ext in '' $ac_executable_extensions; do
26423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26424    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26426    break 2
26427  fi
26428done
26429  done
26430IFS=$as_save_IFS
26431
26432  ;;
26433esac
26434fi
26435CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26436if test -n "$CYGWIN_LINK"; then
26437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26438$as_echo "$CYGWIN_LINK" >&6; }
26439else
26440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26441$as_echo "no" >&6; }
26442fi
26443
26444
26445  if test "x$CYGWIN_LINK" != x; then
26446    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26447$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26448    "$CYGWIN_LINK" --version > /dev/null
26449    if test $? -eq 0 ; then
26450      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26451$as_echo "yes" >&6; }
26452    else
26453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26454$as_echo "no" >&6; }
26455      # This might be the VS linker. Don't exclude it later on.
26456      CYGWIN_LINK=""
26457    fi
26458  fi
26459
26460  # First-hand choice is to locate and run the vsvars bat file.
26461
26462  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26463    VCVARSFILE="vc/bin/vcvars32.bat"
26464  else
26465    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26466  fi
26467
26468  VS_ENV_CMD=""
26469  VS_ENV_ARGS=""
26470  if test "x$with_toolsdir" != x; then
26471
26472  if test "x$VS_ENV_CMD" = x; then
26473    VS100BASE="$with_toolsdir/../.."
26474    METHOD="--with-tools-dir"
26475
26476  windows_path="$VS100BASE"
26477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26478    unix_path=`$CYGPATH -u "$windows_path"`
26479    VS100BASE="$unix_path"
26480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26482    VS100BASE="$unix_path"
26483  fi
26484
26485    if test -d "$VS100BASE"; then
26486      if test -f "$VS100BASE/$VCVARSFILE"; then
26487        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26488$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26489        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26490      else
26491        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26492$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26493        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26494$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26495      fi
26496    fi
26497  fi
26498
26499  fi
26500
26501  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26502    # Having specified an argument which is incorrect will produce an instant failure;
26503    # we should not go on looking
26504    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26505$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26506    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26507$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26508    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26509  fi
26510
26511  if test "x$VS100COMNTOOLS" != x; then
26512
26513  if test "x$VS_ENV_CMD" = x; then
26514    VS100BASE="$VS100COMNTOOLS/../.."
26515    METHOD="VS100COMNTOOLS variable"
26516
26517  windows_path="$VS100BASE"
26518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26519    unix_path=`$CYGPATH -u "$windows_path"`
26520    VS100BASE="$unix_path"
26521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26523    VS100BASE="$unix_path"
26524  fi
26525
26526    if test -d "$VS100BASE"; then
26527      if test -f "$VS100BASE/$VCVARSFILE"; then
26528        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26529$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26530        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26531      else
26532        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26533$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26534        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26535$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26536      fi
26537    fi
26538  fi
26539
26540  fi
26541  if test "x$PROGRAMFILES" != x; then
26542
26543  if test "x$VS_ENV_CMD" = x; then
26544    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26545    METHOD="well-known name"
26546
26547  windows_path="$VS100BASE"
26548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26549    unix_path=`$CYGPATH -u "$windows_path"`
26550    VS100BASE="$unix_path"
26551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26553    VS100BASE="$unix_path"
26554  fi
26555
26556    if test -d "$VS100BASE"; then
26557      if test -f "$VS100BASE/$VCVARSFILE"; then
26558        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26559$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26560        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26561      else
26562        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26563$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26564        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26565$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26566      fi
26567    fi
26568  fi
26569
26570  fi
26571
26572  if test "x$VS_ENV_CMD" = x; then
26573    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26574    METHOD="well-known name"
26575
26576  windows_path="$VS100BASE"
26577  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26578    unix_path=`$CYGPATH -u "$windows_path"`
26579    VS100BASE="$unix_path"
26580  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26581    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26582    VS100BASE="$unix_path"
26583  fi
26584
26585    if test -d "$VS100BASE"; then
26586      if test -f "$VS100BASE/$VCVARSFILE"; then
26587        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26588$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26589        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26590      else
26591        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26592$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26593        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26594$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26595      fi
26596    fi
26597  fi
26598
26599
26600  if test "x$VS_ENV_CMD" = x; then
26601    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26602    METHOD="well-known name"
26603
26604  windows_path="$VS100BASE"
26605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26606    unix_path=`$CYGPATH -u "$windows_path"`
26607    VS100BASE="$unix_path"
26608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26610    VS100BASE="$unix_path"
26611  fi
26612
26613    if test -d "$VS100BASE"; then
26614      if test -f "$VS100BASE/$VCVARSFILE"; then
26615        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26616$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26617        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26618      else
26619        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26620$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26621        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26622$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26623      fi
26624    fi
26625  fi
26626
26627
26628  if test "x$ProgramW6432" != x; then
26629
26630  if test "x$VS_ENV_CMD" = x; then
26631    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26632    METHOD="well-known name"
26633
26634  windows_path="$WIN_SDK_BASE"
26635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26636    unix_path=`$CYGPATH -u "$windows_path"`
26637    WIN_SDK_BASE="$unix_path"
26638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26640    WIN_SDK_BASE="$unix_path"
26641  fi
26642
26643    if test -d "$WIN_SDK_BASE"; then
26644      # There have been cases of partial or broken SDK installations. A missing
26645      # lib dir is not going to work.
26646      if test ! -d "$WIN_SDK_BASE/../lib"; then
26647        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26648$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26649        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26650$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26651      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26652        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26653$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26654        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26655        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26656          VS_ENV_ARGS="/x86"
26657        else
26658          VS_ENV_ARGS="/x64"
26659        fi
26660      else
26661        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26662$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26663        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26664$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26665      fi
26666    fi
26667  fi
26668
26669  fi
26670  if test "x$PROGRAMW6432" != x; then
26671
26672  if test "x$VS_ENV_CMD" = x; then
26673    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
26674    METHOD="well-known name"
26675
26676  windows_path="$WIN_SDK_BASE"
26677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26678    unix_path=`$CYGPATH -u "$windows_path"`
26679    WIN_SDK_BASE="$unix_path"
26680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26682    WIN_SDK_BASE="$unix_path"
26683  fi
26684
26685    if test -d "$WIN_SDK_BASE"; then
26686      # There have been cases of partial or broken SDK installations. A missing
26687      # lib dir is not going to work.
26688      if test ! -d "$WIN_SDK_BASE/../lib"; then
26689        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26690$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26691        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26692$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26693      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26695$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26696        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26697        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26698          VS_ENV_ARGS="/x86"
26699        else
26700          VS_ENV_ARGS="/x64"
26701        fi
26702      else
26703        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26704$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26705        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26706$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26707      fi
26708    fi
26709  fi
26710
26711  fi
26712  if test "x$PROGRAMFILES" != x; then
26713
26714  if test "x$VS_ENV_CMD" = x; then
26715    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
26716    METHOD="well-known name"
26717
26718  windows_path="$WIN_SDK_BASE"
26719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26720    unix_path=`$CYGPATH -u "$windows_path"`
26721    WIN_SDK_BASE="$unix_path"
26722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26724    WIN_SDK_BASE="$unix_path"
26725  fi
26726
26727    if test -d "$WIN_SDK_BASE"; then
26728      # There have been cases of partial or broken SDK installations. A missing
26729      # lib dir is not going to work.
26730      if test ! -d "$WIN_SDK_BASE/../lib"; then
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26732$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26733        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26734$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26735      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26736        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26737$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26738        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26739        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26740          VS_ENV_ARGS="/x86"
26741        else
26742          VS_ENV_ARGS="/x64"
26743        fi
26744      else
26745        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26746$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26747        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26748$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26749      fi
26750    fi
26751  fi
26752
26753  fi
26754
26755  if test "x$VS_ENV_CMD" = x; then
26756    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
26757    METHOD="well-known name"
26758
26759  windows_path="$WIN_SDK_BASE"
26760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26761    unix_path=`$CYGPATH -u "$windows_path"`
26762    WIN_SDK_BASE="$unix_path"
26763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26765    WIN_SDK_BASE="$unix_path"
26766  fi
26767
26768    if test -d "$WIN_SDK_BASE"; then
26769      # There have been cases of partial or broken SDK installations. A missing
26770      # lib dir is not going to work.
26771      if test ! -d "$WIN_SDK_BASE/../lib"; then
26772        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26773$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26774        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26775$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26776      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26777        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26778$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26779        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26780        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26781          VS_ENV_ARGS="/x86"
26782        else
26783          VS_ENV_ARGS="/x64"
26784        fi
26785      else
26786        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26787$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26788        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26789$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26790      fi
26791    fi
26792  fi
26793
26794
26795  if test "x$VS_ENV_CMD" = x; then
26796    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
26797    METHOD="well-known name"
26798
26799  windows_path="$WIN_SDK_BASE"
26800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26801    unix_path=`$CYGPATH -u "$windows_path"`
26802    WIN_SDK_BASE="$unix_path"
26803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26805    WIN_SDK_BASE="$unix_path"
26806  fi
26807
26808    if test -d "$WIN_SDK_BASE"; then
26809      # There have been cases of partial or broken SDK installations. A missing
26810      # lib dir is not going to work.
26811      if test ! -d "$WIN_SDK_BASE/../lib"; then
26812        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26813$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26815$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26816      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26817        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26818$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26819        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26820        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26821          VS_ENV_ARGS="/x86"
26822        else
26823          VS_ENV_ARGS="/x64"
26824        fi
26825      else
26826        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26827$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26828        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26829$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26830      fi
26831    fi
26832  fi
26833
26834
26835  if test "x$VS_ENV_CMD" != x; then
26836    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
26837
26838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26839
26840  # First separate the path from the arguments. This will split at the first
26841  # space.
26842  complete="$VS_ENV_CMD"
26843  path="${complete%% *}"
26844  tmp="$complete EOL"
26845  arguments="${tmp#* }"
26846
26847  # Input might be given as Windows format, start by converting to
26848  # unix format.
26849  new_path=`$CYGPATH -u "$path"`
26850
26851  # Now try to locate executable using which
26852  new_path=`$WHICH "$new_path" 2> /dev/null`
26853  # bat and cmd files are not always considered executable in cygwin causing which
26854  # to not find them
26855  if test "x$new_path" = x \
26856      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26857      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26858    new_path=`$CYGPATH -u "$path"`
26859  fi
26860  if test "x$new_path" = x; then
26861    # Oops. Which didn't find the executable.
26862    # The splitting of arguments from the executable at a space might have been incorrect,
26863    # since paths with space are more likely in Windows. Give it another try with the whole
26864    # argument.
26865    path="$complete"
26866    arguments="EOL"
26867    new_path=`$CYGPATH -u "$path"`
26868    new_path=`$WHICH "$new_path" 2> /dev/null`
26869    # bat and cmd files are not always considered executable in cygwin causing which
26870    # to not find them
26871    if test "x$new_path" = x \
26872        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
26873        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
26874      new_path=`$CYGPATH -u "$path"`
26875    fi
26876    if test "x$new_path" = x; then
26877      # It's still not found. Now this is an unrecoverable error.
26878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
26879$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
26880      has_space=`$ECHO "$complete" | $GREP " "`
26881      if test "x$has_space" != x; then
26882        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
26883$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
26884      fi
26885      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26886    fi
26887  fi
26888
26889  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26890  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26891  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26892  # "foo.exe" is OK but "foo" is an error.
26893  #
26894  # This test is therefore slightly more accurate than "test -f" to check for file presence.
26895  # It is also a way to make sure we got the proper file name for the real test later on.
26896  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26897  if test "x$test_shortpath" = x; then
26898    # Short path failed, file does not exist as specified.
26899    # Try adding .exe or .cmd
26900    if test -f "${new_path}.exe"; then
26901      input_to_shortpath="${new_path}.exe"
26902    elif test -f "${new_path}.cmd"; then
26903      input_to_shortpath="${new_path}.cmd"
26904    else
26905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
26906$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
26907      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
26908$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
26909      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
26910    fi
26911  else
26912    input_to_shortpath="$new_path"
26913  fi
26914
26915  # Call helper function which possibly converts this using DOS-style short mode.
26916  # If so, the updated path is stored in $new_path.
26917  new_path="$input_to_shortpath"
26918
26919  input_path="$input_to_shortpath"
26920  # Check if we need to convert this using DOS-style short mode. If the path
26921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26922  # take no chances and rewrite it.
26923  # Note: m4 eats our [], so we need to use [ and ] instead.
26924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26925  if test "x$has_forbidden_chars" != x; then
26926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26927    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26928    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26929    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26930      # Going to short mode and back again did indeed matter. Since short mode is
26931      # case insensitive, let's make it lowercase to improve readability.
26932      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26933      # Now convert it back to Unix-stile (cygpath)
26934      input_path=`$CYGPATH -u "$shortmode_path"`
26935      new_path="$input_path"
26936    fi
26937  fi
26938
26939  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26940  if test "x$test_cygdrive_prefix" = x; then
26941    # As a simple fix, exclude /usr/bin since it's not a real path.
26942    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
26943      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26944      # a path prefixed by /cygdrive for fixpath to work.
26945      new_path="$CYGWIN_ROOT_PATH$input_path"
26946    fi
26947  fi
26948
26949  # remove trailing .exe if any
26950  new_path="${new_path/%.exe/}"
26951
26952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26953
26954  # First separate the path from the arguments. This will split at the first
26955  # space.
26956  complete="$VS_ENV_CMD"
26957  path="${complete%% *}"
26958  tmp="$complete EOL"
26959  arguments="${tmp#* }"
26960
26961  # Input might be given as Windows format, start by converting to
26962  # unix format.
26963  new_path="$path"
26964
26965  windows_path="$new_path"
26966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26967    unix_path=`$CYGPATH -u "$windows_path"`
26968    new_path="$unix_path"
26969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26971    new_path="$unix_path"
26972  fi
26973
26974
26975  # Now try to locate executable using which
26976  new_path=`$WHICH "$new_path" 2> /dev/null`
26977
26978  if test "x$new_path" = x; then
26979    # Oops. Which didn't find the executable.
26980    # The splitting of arguments from the executable at a space might have been incorrect,
26981    # since paths with space are more likely in Windows. Give it another try with the whole
26982    # argument.
26983    path="$complete"
26984    arguments="EOL"
26985    new_path="$path"
26986
26987  windows_path="$new_path"
26988  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26989    unix_path=`$CYGPATH -u "$windows_path"`
26990    new_path="$unix_path"
26991  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26992    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26993    new_path="$unix_path"
26994  fi
26995
26996
26997    new_path=`$WHICH "$new_path" 2> /dev/null`
26998
26999    if test "x$new_path" = x; then
27000      # It's still not found. Now this is an unrecoverable error.
27001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27002$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27003      has_space=`$ECHO "$complete" | $GREP " "`
27004      if test "x$has_space" != x; then
27005        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27006$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27007      fi
27008      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27009    fi
27010  fi
27011
27012  # Now new_path has a complete unix path to the binary
27013  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27014    # Keep paths in /bin as-is, but remove trailing .exe if any
27015    new_path="${new_path/%.exe/}"
27016    # Do not save /bin paths to all_fixpath_prefixes!
27017  else
27018    # Not in mixed or Windows style, start by that.
27019    new_path=`cmd //c echo $new_path`
27020
27021  input_path="$new_path"
27022  # Check if we need to convert this using DOS-style short mode. If the path
27023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27024  # take no chances and rewrite it.
27025  # Note: m4 eats our [], so we need to use [ and ] instead.
27026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27027  if test "x$has_forbidden_chars" != x; then
27028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27029    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27030  fi
27031
27032    # Output is in $new_path
27033
27034  windows_path="$new_path"
27035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27036    unix_path=`$CYGPATH -u "$windows_path"`
27037    new_path="$unix_path"
27038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27040    new_path="$unix_path"
27041  fi
27042
27043    # remove trailing .exe if any
27044    new_path="${new_path/%.exe/}"
27045
27046    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27047    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27048  fi
27049
27050  else
27051    # We're on a posix platform. Hooray! :)
27052    # First separate the path from the arguments. This will split at the first
27053    # space.
27054    complete="$VS_ENV_CMD"
27055    path="${complete%% *}"
27056    tmp="$complete EOL"
27057    arguments="${tmp#* }"
27058
27059    # Cannot rely on the command "which" here since it doesn't always work.
27060    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27061    if test -z "$is_absolute_path"; then
27062      # Path to executable is not absolute. Find it.
27063      IFS_save="$IFS"
27064      IFS=:
27065      for p in $PATH; do
27066        if test -f "$p/$path" && test -x "$p/$path"; then
27067          new_path="$p/$path"
27068          break
27069        fi
27070      done
27071      IFS="$IFS_save"
27072    else
27073      # This is an absolute path, we can use it without further modifications.
27074      new_path="$path"
27075    fi
27076
27077    if test "x$new_path" = x; then
27078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27079$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27080      has_space=`$ECHO "$complete" | $GREP " "`
27081      if test "x$has_space" != x; then
27082        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27083$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27084      fi
27085      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27086    fi
27087  fi
27088
27089  # Now join together the path and the arguments once again
27090  if test "x$arguments" != xEOL; then
27091    new_complete="$new_path ${arguments% *}"
27092  else
27093    new_complete="$new_path"
27094  fi
27095
27096  if test "x$complete" != "x$new_complete"; then
27097    VS_ENV_CMD="$new_complete"
27098    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27099$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27100  fi
27101
27102
27103    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27104    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27105$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27106    cd $OUTPUT_ROOT
27107    # FIXME: The code betweeen ---- was inlined from a separate script and is not properly adapted
27108    # to autoconf standards.
27109
27110    #----
27111
27112    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment)
27113    # but calculate the difference in Cygwin environment before/after running it and then
27114    # apply the diff.
27115
27116    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
27117      _vs10varsall=`cygpath -a -m -s "$VS_ENV_CMD"`
27118      _dosvs10varsall=`cygpath -a -w -s $_vs10varsall`
27119      _dosbash=`cygpath -a -w -s \`which bash\`.*`
27120    else
27121      _dosvs10varsall=`cmd //c echo $VS_ENV_CMD`
27122      _dosbash=`cmd //c echo \`which bash\``
27123    fi
27124
27125    # generate the set of exported vars before/after the vs10 setup
27126    $ECHO "@echo off"                                           >  localdevenvtmp.bat
27127    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export0" >> localdevenvtmp.bat
27128    $ECHO "call $_dosvs10varsall $VS_ENV_ARGS"                  >> localdevenvtmp.bat
27129    $ECHO "$_dosbash -c \"export -p\" > localdevenvtmp.export1" >> localdevenvtmp.bat
27130
27131    # Now execute the newly created bat file.
27132    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys
27133    cmd /c localdevenvtmp.bat | cat
27134
27135    # apply the diff (less some non-vs10 vars named by "!")
27136    $SORT localdevenvtmp.export0 | $GREP -v "!" > localdevenvtmp.export0.sort
27137    $SORT localdevenvtmp.export1 | $GREP -v "!" > localdevenvtmp.export1.sort
27138    $COMM -1 -3 localdevenvtmp.export0.sort localdevenvtmp.export1.sort > localdevenv.sh
27139
27140    # cleanup
27141    $RM localdevenvtmp*
27142    #----
27143    cd $CURDIR
27144    if test ! -s $OUTPUT_ROOT/localdevenv.sh; then
27145      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27146$as_echo "no" >&6; }
27147      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27148$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27149      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27150$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27151      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27152$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27153      as_fn_error $? "Cannot continue" "$LINENO" 5
27154    fi
27155
27156    # Now set all paths and other env variables. This will allow the rest of
27157    # the configure script to find and run the compiler in the proper way.
27158    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27159$as_echo "$as_me: Setting extracted environment variables" >&6;}
27160    . $OUTPUT_ROOT/localdevenv.sh
27161  else
27162    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27163    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27164$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27165  fi
27166
27167  # At this point, we should have corrent variables in the environment, or we can't continue.
27168  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27169$as_echo_n "checking for Visual Studio variables... " >&6; }
27170
27171  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27172    if test "x$INCLUDE" = x || test "x$LIB" = x; then
27173      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27174$as_echo "present but broken" >&6; }
27175      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27176    else
27177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27178$as_echo "ok" >&6; }
27179      # Remove any trailing \ from INCLUDE and LIB to avoid trouble in spec.gmk.
27180      VS_INCLUDE=`$ECHO "$INCLUDE" | $SED 's/\\\\$//'`
27181      VS_LIB=`$ECHO "$LIB" | $SED 's/\\\\$//'`
27182      # Remove any paths containing # (typically F#) as that messes up make
27183      PATH=`$ECHO "$PATH" | $SED 's/[^:#]*#[^:]*://g'`
27184      VS_PATH="$PATH"
27185
27186
27187
27188    fi
27189  else
27190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27191$as_echo "not found" >&6; }
27192
27193    if test "x$VS_ENV_CMD" = x; then
27194      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27195$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27196      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27197$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27198    else
27199      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27200$as_echo "$as_me: Running the extraction script failed." >&6;}
27201    fi
27202    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27203$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27204    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27205$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27206    as_fn_error $? "Cannot continue" "$LINENO" 5
27207  fi
27208
27209  fi
27210
27211  # autoconf magic only relies on PATH, so update it if tools dir is specified
27212  OLD_PATH="$PATH"
27213
27214  # For solaris we really need solaris tools, and not the GNU equivalent.
27215  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27216  # so add that to path before starting to probe.
27217  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27218  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27219    PATH="/usr/ccs/bin:$PATH"
27220  fi
27221
27222  # Finally add TOOLS_DIR at the beginning, to allow --with-tools-dir to
27223  # override all other locations.
27224  if test "x$TOOLS_DIR" != x; then
27225    PATH=$TOOLS_DIR:$PATH
27226  fi
27227
27228  # If a devkit is found on the builddeps server, then prepend its path to the
27229  # PATH variable. If there are cross compilers available in the devkit, these
27230  # will be found by AC_PROG_CC et al.
27231  DEVKIT=
27232
27233
27234  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
27235    # Source the builddeps file again, to make sure it uses the latest variables!
27236    . $builddepsfile
27237    # Look for a target and build machine specific resource!
27238    eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
27239    if test "x$resource" = x; then
27240      # Ok, lets instead look for a target specific resource
27241      eval resource=\${builddep_devkit_TARGET_${rewritten_target_var}}
27242    fi
27243    if test "x$resource" = x; then
27244      # Ok, lets instead look for a build specific resource
27245      eval resource=\${builddep_devkit_BUILD_${rewritten_build_var}}
27246    fi
27247    if test "x$resource" = x; then
27248      # Ok, lets instead look for a generic resource
27249      # (The devkit comes from M4 and not the shell, thus no need for eval here.)
27250      resource=${builddep_devkit}
27251    fi
27252    if test "x$resource" != x; then
27253      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for devkit" >&5
27254$as_echo "$as_me: Using builddeps $resource for devkit" >&6;}
27255      # If the resource in the builddeps.conf file is an existing directory,
27256      # for example /java/linux/cups
27257      if test -d ${resource}; then
27258        depdir=${resource}
27259      else
27260
27261  # devkit is for example mymodule
27262  # $resource is for example libs/general/libmymod_1_2_3.zip
27263  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
27264  # $with_builddeps_dir is for example /localhome/builddeps
27265  # depdir is the name of the variable into which we store the depdir, eg MYMOD
27266  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
27267  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
27268  filename=`basename $resource`
27269  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
27270  filebase=${filename%%.*}
27271  extension=${filename#*.}
27272  installdir=$with_builddeps_dir/$filebase
27273  if test ! -f $installdir/$filename.unpacked; then
27274    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&5
27275$as_echo "$as_me: Downloading build dependency devkit from $with_builddeps_server/$resource and installing into $installdir" >&6;}
27276    if test ! -d $installdir; then
27277      mkdir -p $installdir
27278    fi
27279    if test ! -d $installdir; then
27280      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
27281    fi
27282    tmpfile=`mktemp $installdir/devkit.XXXXXXXXX`
27283    touch $tmpfile
27284    if test ! -f $tmpfile; then
27285      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
27286    fi
27287
27288  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
27289  # $tmpfile is the local file name for the downloaded file.
27290  VALID_TOOL=no
27291  if test "x$BDEPS_FTP" = xwget; then
27292    VALID_TOOL=yes
27293    wget -O $tmpfile $with_builddeps_server/$resource
27294  fi
27295  if test "x$BDEPS_FTP" = xlftp; then
27296    VALID_TOOL=yes
27297    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
27298  fi
27299  if test "x$BDEPS_FTP" = xftp; then
27300    VALID_TOOL=yes
27301    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
27302    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
27303    FTPUSERPWD=${FTPSERVER%%@*}
27304    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
27305      FTPUSER=${userpwd%%:*}
27306      FTPPWD=${userpwd#*@}
27307      FTPSERVER=${FTPSERVER#*@}
27308    else
27309      FTPUSER=ftp
27310      FTPPWD=ftp
27311    fi
27312    # the "pass" command does not work on some
27313    # ftp clients (read ftp.exe) but if it works,
27314    # passive mode is better!
27315    ( \
27316        echo "user $FTPUSER $FTPPWD"        ; \
27317        echo "pass"                         ; \
27318        echo "bin"                          ; \
27319        echo "get $FTPPATH $tmpfile"              ; \
27320    ) | ftp -in $FTPSERVER
27321  fi
27322  if test "x$VALID_TOOL" != xyes; then
27323    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
27324  fi
27325
27326    mv $tmpfile $installdir/$filename
27327    if test ! -s $installdir/$filename; then
27328      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
27329    fi
27330    case "$extension" in
27331      zip)  echo "Unzipping $installdir/$filename..."
27332        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
27333        ;;
27334      tar.gz) echo "Untaring $installdir/$filename..."
27335        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27336        ;;
27337      tgz) echo "Untaring $installdir/$filename..."
27338        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
27339        ;;
27340      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
27341        ;;
27342    esac
27343  fi
27344  if test -f $installdir/$filename.unpacked; then
27345    depdir=$installdir
27346  fi
27347
27348      fi
27349      # Source the builddeps file again, because in the previous command, the depdir
27350      # was updated to point at the current build dependency install directory.
27351      . $builddepsfile
27352      # Now extract variables from the builddeps.conf files.
27353      theroot=${builddep_devkit_ROOT}
27354      thecflags=${builddep_devkit_CFLAGS}
27355      thelibs=${builddep_devkit_LIBS}
27356      if test "x$depdir" = x; then
27357        as_fn_error $? "Could not download build dependency devkit" "$LINENO" 5
27358      fi
27359      DEVKIT=$depdir
27360      if test "x$theroot" != x; then
27361        DEVKIT="$theroot"
27362      fi
27363      if test "x$thecflags" != x; then
27364        DEVKIT_CFLAGS="$thecflags"
27365      fi
27366      if test "x$thelibs" != x; then
27367        DEVKIT_LIBS="$thelibs"
27368      fi
27369
27370        # Found devkit
27371        PATH="$DEVKIT/bin:$PATH"
27372        SYS_ROOT="$DEVKIT/${rewritten_target}/sys-root"
27373        if test "x$x_includes" = "xNONE"; then
27374          x_includes="$SYS_ROOT/usr/include/X11"
27375        fi
27376        if test "x$x_libraries" = "xNONE"; then
27377          x_libraries="$SYS_ROOT/usr/lib"
27378        fi
27379
27380
27381    fi
27382
27383  fi
27384
27385
27386
27387  #
27388  # Setup the compilers (CC and CXX)
27389  #
27390
27391  COMPILER_NAME=C
27392  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27393
27394  if test "x$CC" != x; then
27395    # User has supplied compiler name already, always let that override.
27396    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27397$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27398    if test "x`basename $CC`" = "x$CC"; then
27399      # A command without a complete path is provided, search $PATH.
27400
27401      for ac_prog in $CC
27402do
27403  # Extract the first word of "$ac_prog", so it can be a program name with args.
27404set dummy $ac_prog; ac_word=$2
27405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27406$as_echo_n "checking for $ac_word... " >&6; }
27407if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27408  $as_echo_n "(cached) " >&6
27409else
27410  case $POTENTIAL_CC in
27411  [\\/]* | ?:[\\/]*)
27412  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27413  ;;
27414  *)
27415  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27416for as_dir in $PATH
27417do
27418  IFS=$as_save_IFS
27419  test -z "$as_dir" && as_dir=.
27420    for ac_exec_ext in '' $ac_executable_extensions; do
27421  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27422    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27423    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27424    break 2
27425  fi
27426done
27427  done
27428IFS=$as_save_IFS
27429
27430  ;;
27431esac
27432fi
27433POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27434if test -n "$POTENTIAL_CC"; then
27435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27436$as_echo "$POTENTIAL_CC" >&6; }
27437else
27438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27439$as_echo "no" >&6; }
27440fi
27441
27442
27443  test -n "$POTENTIAL_CC" && break
27444done
27445
27446      if test "x$POTENTIAL_CC" != x; then
27447        CC=$POTENTIAL_CC
27448      else
27449        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27450      fi
27451    else
27452      # Otherwise it might already be a complete path
27453      if test ! -x "$CC"; then
27454        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27455      fi
27456    fi
27457  else
27458    # No user supplied value. Locate compiler ourselves.
27459
27460    # If we are cross compiling, assume cross compilation tools follows the
27461    # cross compilation standard where they are prefixed with the autoconf
27462    # standard name for the target. For example the binary
27463    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27464    # If we are not cross compiling, then the default compiler name will be
27465    # used.
27466
27467    CC=
27468    # If TOOLS_DIR is set, check for all compiler names in there first
27469    # before checking the rest of the PATH.
27470    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27471    # step, this should not be necessary.
27472    if test -n "$TOOLS_DIR"; then
27473      PATH_save="$PATH"
27474      PATH="$TOOLS_DIR"
27475      for ac_prog in $SEARCH_LIST
27476do
27477  # Extract the first word of "$ac_prog", so it can be a program name with args.
27478set dummy $ac_prog; ac_word=$2
27479{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27480$as_echo_n "checking for $ac_word... " >&6; }
27481if ${ac_cv_path_TOOLS_DIR_CC+:} false; then :
27482  $as_echo_n "(cached) " >&6
27483else
27484  case $TOOLS_DIR_CC in
27485  [\\/]* | ?:[\\/]*)
27486  ac_cv_path_TOOLS_DIR_CC="$TOOLS_DIR_CC" # Let the user override the test with a path.
27487  ;;
27488  *)
27489  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27490for as_dir in $PATH
27491do
27492  IFS=$as_save_IFS
27493  test -z "$as_dir" && as_dir=.
27494    for ac_exec_ext in '' $ac_executable_extensions; do
27495  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27496    ac_cv_path_TOOLS_DIR_CC="$as_dir/$ac_word$ac_exec_ext"
27497    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27498    break 2
27499  fi
27500done
27501  done
27502IFS=$as_save_IFS
27503
27504  ;;
27505esac
27506fi
27507TOOLS_DIR_CC=$ac_cv_path_TOOLS_DIR_CC
27508if test -n "$TOOLS_DIR_CC"; then
27509  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CC" >&5
27510$as_echo "$TOOLS_DIR_CC" >&6; }
27511else
27512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27513$as_echo "no" >&6; }
27514fi
27515
27516
27517  test -n "$TOOLS_DIR_CC" && break
27518done
27519
27520      CC=$TOOLS_DIR_CC
27521      PATH="$PATH_save"
27522    fi
27523
27524    # AC_PATH_PROGS can't be run multiple times with the same variable,
27525    # so create a new name for this run.
27526    if test "x$CC" = x; then
27527      for ac_prog in $SEARCH_LIST
27528do
27529  # Extract the first word of "$ac_prog", so it can be a program name with args.
27530set dummy $ac_prog; ac_word=$2
27531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27532$as_echo_n "checking for $ac_word... " >&6; }
27533if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27534  $as_echo_n "(cached) " >&6
27535else
27536  case $POTENTIAL_CC in
27537  [\\/]* | ?:[\\/]*)
27538  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27539  ;;
27540  *)
27541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27542for as_dir in $PATH
27543do
27544  IFS=$as_save_IFS
27545  test -z "$as_dir" && as_dir=.
27546    for ac_exec_ext in '' $ac_executable_extensions; do
27547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27548    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27550    break 2
27551  fi
27552done
27553  done
27554IFS=$as_save_IFS
27555
27556  ;;
27557esac
27558fi
27559POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27560if test -n "$POTENTIAL_CC"; then
27561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27562$as_echo "$POTENTIAL_CC" >&6; }
27563else
27564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27565$as_echo "no" >&6; }
27566fi
27567
27568
27569  test -n "$POTENTIAL_CC" && break
27570done
27571
27572      CC=$POTENTIAL_CC
27573    fi
27574
27575    if test "x$CC" = x; then
27576
27577  # Print a helpful message on how to acquire the necessary build dependency.
27578  # devkit is the help tag: freetype, cups, pulse, alsa etc
27579  MISSING_DEPENDENCY=devkit
27580
27581  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27582    cygwin_help $MISSING_DEPENDENCY
27583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584    msys_help $MISSING_DEPENDENCY
27585  else
27586    PKGHANDLER_COMMAND=
27587
27588    case $PKGHANDLER in
27589      apt-get)
27590        apt_help     $MISSING_DEPENDENCY ;;
27591      yum)
27592        yum_help     $MISSING_DEPENDENCY ;;
27593      port)
27594        port_help    $MISSING_DEPENDENCY ;;
27595      pkgutil)
27596        pkgutil_help $MISSING_DEPENDENCY ;;
27597      pkgadd)
27598        pkgadd_help  $MISSING_DEPENDENCY ;;
27599    esac
27600
27601    if test "x$PKGHANDLER_COMMAND" != x; then
27602      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27603    fi
27604  fi
27605
27606      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27607    fi
27608  fi
27609
27610  # Now we have a compiler binary in CC. Make sure it's okay.
27611
27612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27613
27614  # First separate the path from the arguments. This will split at the first
27615  # space.
27616  complete="$CC"
27617  path="${complete%% *}"
27618  tmp="$complete EOL"
27619  arguments="${tmp#* }"
27620
27621  # Input might be given as Windows format, start by converting to
27622  # unix format.
27623  new_path=`$CYGPATH -u "$path"`
27624
27625  # Now try to locate executable using which
27626  new_path=`$WHICH "$new_path" 2> /dev/null`
27627  # bat and cmd files are not always considered executable in cygwin causing which
27628  # to not find them
27629  if test "x$new_path" = x \
27630      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27631      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27632    new_path=`$CYGPATH -u "$path"`
27633  fi
27634  if test "x$new_path" = x; then
27635    # Oops. Which didn't find the executable.
27636    # The splitting of arguments from the executable at a space might have been incorrect,
27637    # since paths with space are more likely in Windows. Give it another try with the whole
27638    # argument.
27639    path="$complete"
27640    arguments="EOL"
27641    new_path=`$CYGPATH -u "$path"`
27642    new_path=`$WHICH "$new_path" 2> /dev/null`
27643    # bat and cmd files are not always considered executable in cygwin causing which
27644    # to not find them
27645    if test "x$new_path" = x \
27646        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27647        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27648      new_path=`$CYGPATH -u "$path"`
27649    fi
27650    if test "x$new_path" = x; then
27651      # It's still not found. Now this is an unrecoverable error.
27652      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27653$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27654      has_space=`$ECHO "$complete" | $GREP " "`
27655      if test "x$has_space" != x; then
27656        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27657$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27658      fi
27659      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27660    fi
27661  fi
27662
27663  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27664  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27665  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27666  # "foo.exe" is OK but "foo" is an error.
27667  #
27668  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27669  # It is also a way to make sure we got the proper file name for the real test later on.
27670  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27671  if test "x$test_shortpath" = x; then
27672    # Short path failed, file does not exist as specified.
27673    # Try adding .exe or .cmd
27674    if test -f "${new_path}.exe"; then
27675      input_to_shortpath="${new_path}.exe"
27676    elif test -f "${new_path}.cmd"; then
27677      input_to_shortpath="${new_path}.cmd"
27678    else
27679      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27680$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27681      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27682$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27683      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27684    fi
27685  else
27686    input_to_shortpath="$new_path"
27687  fi
27688
27689  # Call helper function which possibly converts this using DOS-style short mode.
27690  # If so, the updated path is stored in $new_path.
27691  new_path="$input_to_shortpath"
27692
27693  input_path="$input_to_shortpath"
27694  # Check if we need to convert this using DOS-style short mode. If the path
27695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27696  # take no chances and rewrite it.
27697  # Note: m4 eats our [], so we need to use [ and ] instead.
27698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27699  if test "x$has_forbidden_chars" != x; then
27700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27701    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27702    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27703    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27704      # Going to short mode and back again did indeed matter. Since short mode is
27705      # case insensitive, let's make it lowercase to improve readability.
27706      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27707      # Now convert it back to Unix-stile (cygpath)
27708      input_path=`$CYGPATH -u "$shortmode_path"`
27709      new_path="$input_path"
27710    fi
27711  fi
27712
27713  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27714  if test "x$test_cygdrive_prefix" = x; then
27715    # As a simple fix, exclude /usr/bin since it's not a real path.
27716    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27717      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27718      # a path prefixed by /cygdrive for fixpath to work.
27719      new_path="$CYGWIN_ROOT_PATH$input_path"
27720    fi
27721  fi
27722
27723  # remove trailing .exe if any
27724  new_path="${new_path/%.exe/}"
27725
27726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27727
27728  # First separate the path from the arguments. This will split at the first
27729  # space.
27730  complete="$CC"
27731  path="${complete%% *}"
27732  tmp="$complete EOL"
27733  arguments="${tmp#* }"
27734
27735  # Input might be given as Windows format, start by converting to
27736  # unix format.
27737  new_path="$path"
27738
27739  windows_path="$new_path"
27740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27741    unix_path=`$CYGPATH -u "$windows_path"`
27742    new_path="$unix_path"
27743  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27744    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27745    new_path="$unix_path"
27746  fi
27747
27748
27749  # Now try to locate executable using which
27750  new_path=`$WHICH "$new_path" 2> /dev/null`
27751
27752  if test "x$new_path" = x; then
27753    # Oops. Which didn't find the executable.
27754    # The splitting of arguments from the executable at a space might have been incorrect,
27755    # since paths with space are more likely in Windows. Give it another try with the whole
27756    # argument.
27757    path="$complete"
27758    arguments="EOL"
27759    new_path="$path"
27760
27761  windows_path="$new_path"
27762  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27763    unix_path=`$CYGPATH -u "$windows_path"`
27764    new_path="$unix_path"
27765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27766    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27767    new_path="$unix_path"
27768  fi
27769
27770
27771    new_path=`$WHICH "$new_path" 2> /dev/null`
27772
27773    if test "x$new_path" = x; then
27774      # It's still not found. Now this is an unrecoverable error.
27775      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27776$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27777      has_space=`$ECHO "$complete" | $GREP " "`
27778      if test "x$has_space" != x; then
27779        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27780$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27781      fi
27782      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27783    fi
27784  fi
27785
27786  # Now new_path has a complete unix path to the binary
27787  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27788    # Keep paths in /bin as-is, but remove trailing .exe if any
27789    new_path="${new_path/%.exe/}"
27790    # Do not save /bin paths to all_fixpath_prefixes!
27791  else
27792    # Not in mixed or Windows style, start by that.
27793    new_path=`cmd //c echo $new_path`
27794
27795  input_path="$new_path"
27796  # Check if we need to convert this using DOS-style short mode. If the path
27797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27798  # take no chances and rewrite it.
27799  # Note: m4 eats our [], so we need to use [ and ] instead.
27800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27801  if test "x$has_forbidden_chars" != x; then
27802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27804  fi
27805
27806    # Output is in $new_path
27807
27808  windows_path="$new_path"
27809  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27810    unix_path=`$CYGPATH -u "$windows_path"`
27811    new_path="$unix_path"
27812  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27813    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27814    new_path="$unix_path"
27815  fi
27816
27817    # remove trailing .exe if any
27818    new_path="${new_path/%.exe/}"
27819
27820    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27821    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27822  fi
27823
27824  else
27825    # We're on a posix platform. Hooray! :)
27826    # First separate the path from the arguments. This will split at the first
27827    # space.
27828    complete="$CC"
27829    path="${complete%% *}"
27830    tmp="$complete EOL"
27831    arguments="${tmp#* }"
27832
27833    # Cannot rely on the command "which" here since it doesn't always work.
27834    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27835    if test -z "$is_absolute_path"; then
27836      # Path to executable is not absolute. Find it.
27837      IFS_save="$IFS"
27838      IFS=:
27839      for p in $PATH; do
27840        if test -f "$p/$path" && test -x "$p/$path"; then
27841          new_path="$p/$path"
27842          break
27843        fi
27844      done
27845      IFS="$IFS_save"
27846    else
27847      # This is an absolute path, we can use it without further modifications.
27848      new_path="$path"
27849    fi
27850
27851    if test "x$new_path" = x; then
27852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27853$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27854      has_space=`$ECHO "$complete" | $GREP " "`
27855      if test "x$has_space" != x; then
27856        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27857$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27858      fi
27859      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27860    fi
27861  fi
27862
27863  # Now join together the path and the arguments once again
27864  if test "x$arguments" != xEOL; then
27865    new_complete="$new_path ${arguments% *}"
27866  else
27867    new_complete="$new_path"
27868  fi
27869
27870  if test "x$complete" != "x$new_complete"; then
27871    CC="$new_complete"
27872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
27873$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
27874  fi
27875
27876  TEST_COMPILER="$CC"
27877  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
27878  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
27879  if test "x$OPENJDK_BUILD_OS" != xaix; then
27880    # FIXME: This test should not be needed anymore; we don't do that for any platform.
27881    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
27882$as_echo_n "checking resolved symbolic links for CC... " >&6; }
27883
27884  if test "x$OPENJDK_BUILD_OS" != xwindows; then
27885    # Follow a chain of symbolic links. Use readlink
27886    # where it exists, else fall back to horribly
27887    # complicated shell code.
27888    if test "x$READLINK_TESTED" != yes; then
27889      # On MacOSX there is a readlink tool with a different
27890      # purpose than the GNU readlink tool. Check the found readlink.
27891      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
27892      if test "x$ISGNU" = x; then
27893        # A readlink that we do not know how to use.
27894        # Are there other non-GNU readlinks out there?
27895        READLINK_TESTED=yes
27896        READLINK=
27897      fi
27898    fi
27899
27900    if test "x$READLINK" != x; then
27901      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
27902    else
27903      # Save the current directory for restoring afterwards
27904      STARTDIR=$PWD
27905      COUNTER=0
27906      sym_link_dir=`$DIRNAME $TEST_COMPILER`
27907      sym_link_file=`$BASENAME $TEST_COMPILER`
27908      cd $sym_link_dir
27909      # Use -P flag to resolve symlinks in directories.
27910      cd `$THEPWDCMD -P`
27911      sym_link_dir=`$THEPWDCMD -P`
27912      # Resolve file symlinks
27913      while test $COUNTER -lt 20; do
27914        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
27915        if test "x$ISLINK" == x; then
27916          # This is not a symbolic link! We are done!
27917          break
27918        fi
27919        # Again resolve directory symlinks since the target of the just found
27920        # link could be in a different directory
27921        cd `$DIRNAME $ISLINK`
27922        sym_link_dir=`$THEPWDCMD -P`
27923        sym_link_file=`$BASENAME $ISLINK`
27924        let COUNTER=COUNTER+1
27925      done
27926      cd $STARTDIR
27927      TEST_COMPILER=$sym_link_dir/$sym_link_file
27928    fi
27929  fi
27930
27931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
27932$as_echo "$TEST_COMPILER" >&6; }
27933  fi
27934  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
27935$as_echo_n "checking if CC is disguised ccache... " >&6; }
27936
27937  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
27938  if test "x$COMPILER_BASENAME" = "xccache"; then
27939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
27940$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
27941    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
27942    # We want to control ccache invocation ourselves, so ignore this cc and try
27943    # searching again.
27944
27945    # Remove the path to the fake ccache cc from the PATH
27946    RETRY_COMPILER_SAVED_PATH="$PATH"
27947    COMPILER_DIRNAME=`$DIRNAME $CC`
27948    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
27949
27950    # Try again looking for our compiler
27951    if test -n "$ac_tool_prefix"; then
27952  for ac_prog in $TOOLCHAIN_CC_BINARY
27953  do
27954    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
27955set dummy $ac_tool_prefix$ac_prog; ac_word=$2
27956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27957$as_echo_n "checking for $ac_word... " >&6; }
27958if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
27959  $as_echo_n "(cached) " >&6
27960else
27961  if test -n "$PROPER_COMPILER_CC"; then
27962  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
27963else
27964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27965for as_dir in $PATH
27966do
27967  IFS=$as_save_IFS
27968  test -z "$as_dir" && as_dir=.
27969    for ac_exec_ext in '' $ac_executable_extensions; do
27970  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27971    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
27972    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27973    break 2
27974  fi
27975done
27976  done
27977IFS=$as_save_IFS
27978
27979fi
27980fi
27981PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
27982if test -n "$PROPER_COMPILER_CC"; then
27983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
27984$as_echo "$PROPER_COMPILER_CC" >&6; }
27985else
27986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27987$as_echo "no" >&6; }
27988fi
27989
27990
27991    test -n "$PROPER_COMPILER_CC" && break
27992  done
27993fi
27994if test -z "$PROPER_COMPILER_CC"; then
27995  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
27996  for ac_prog in $TOOLCHAIN_CC_BINARY
27997do
27998  # Extract the first word of "$ac_prog", so it can be a program name with args.
27999set dummy $ac_prog; ac_word=$2
28000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28001$as_echo_n "checking for $ac_word... " >&6; }
28002if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28003  $as_echo_n "(cached) " >&6
28004else
28005  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28006  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28007else
28008as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28009for as_dir in $PATH
28010do
28011  IFS=$as_save_IFS
28012  test -z "$as_dir" && as_dir=.
28013    for ac_exec_ext in '' $ac_executable_extensions; do
28014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28015    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28017    break 2
28018  fi
28019done
28020  done
28021IFS=$as_save_IFS
28022
28023fi
28024fi
28025ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28026if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28028$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28029else
28030  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28031$as_echo "no" >&6; }
28032fi
28033
28034
28035  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28036done
28037
28038  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28039    PROPER_COMPILER_CC=""
28040  else
28041    case $cross_compiling:$ac_tool_warned in
28042yes:)
28043{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28044$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28045ac_tool_warned=yes ;;
28046esac
28047    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28048  fi
28049fi
28050
28051
28052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28053
28054  # First separate the path from the arguments. This will split at the first
28055  # space.
28056  complete="$PROPER_COMPILER_CC"
28057  path="${complete%% *}"
28058  tmp="$complete EOL"
28059  arguments="${tmp#* }"
28060
28061  # Input might be given as Windows format, start by converting to
28062  # unix format.
28063  new_path=`$CYGPATH -u "$path"`
28064
28065  # Now try to locate executable using which
28066  new_path=`$WHICH "$new_path" 2> /dev/null`
28067  # bat and cmd files are not always considered executable in cygwin causing which
28068  # to not find them
28069  if test "x$new_path" = x \
28070      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28071      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28072    new_path=`$CYGPATH -u "$path"`
28073  fi
28074  if test "x$new_path" = x; then
28075    # Oops. Which didn't find the executable.
28076    # The splitting of arguments from the executable at a space might have been incorrect,
28077    # since paths with space are more likely in Windows. Give it another try with the whole
28078    # argument.
28079    path="$complete"
28080    arguments="EOL"
28081    new_path=`$CYGPATH -u "$path"`
28082    new_path=`$WHICH "$new_path" 2> /dev/null`
28083    # bat and cmd files are not always considered executable in cygwin causing which
28084    # to not find them
28085    if test "x$new_path" = x \
28086        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28087        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28088      new_path=`$CYGPATH -u "$path"`
28089    fi
28090    if test "x$new_path" = x; then
28091      # It's still not found. Now this is an unrecoverable error.
28092      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28093$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28094      has_space=`$ECHO "$complete" | $GREP " "`
28095      if test "x$has_space" != x; then
28096        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28097$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28098      fi
28099      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28100    fi
28101  fi
28102
28103  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28104  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28105  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28106  # "foo.exe" is OK but "foo" is an error.
28107  #
28108  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28109  # It is also a way to make sure we got the proper file name for the real test later on.
28110  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28111  if test "x$test_shortpath" = x; then
28112    # Short path failed, file does not exist as specified.
28113    # Try adding .exe or .cmd
28114    if test -f "${new_path}.exe"; then
28115      input_to_shortpath="${new_path}.exe"
28116    elif test -f "${new_path}.cmd"; then
28117      input_to_shortpath="${new_path}.cmd"
28118    else
28119      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28120$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28121      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28122$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28123      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28124    fi
28125  else
28126    input_to_shortpath="$new_path"
28127  fi
28128
28129  # Call helper function which possibly converts this using DOS-style short mode.
28130  # If so, the updated path is stored in $new_path.
28131  new_path="$input_to_shortpath"
28132
28133  input_path="$input_to_shortpath"
28134  # Check if we need to convert this using DOS-style short mode. If the path
28135  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28136  # take no chances and rewrite it.
28137  # Note: m4 eats our [], so we need to use [ and ] instead.
28138  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28139  if test "x$has_forbidden_chars" != x; then
28140    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28141    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28142    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28143    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28144      # Going to short mode and back again did indeed matter. Since short mode is
28145      # case insensitive, let's make it lowercase to improve readability.
28146      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28147      # Now convert it back to Unix-stile (cygpath)
28148      input_path=`$CYGPATH -u "$shortmode_path"`
28149      new_path="$input_path"
28150    fi
28151  fi
28152
28153  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28154  if test "x$test_cygdrive_prefix" = x; then
28155    # As a simple fix, exclude /usr/bin since it's not a real path.
28156    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28157      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28158      # a path prefixed by /cygdrive for fixpath to work.
28159      new_path="$CYGWIN_ROOT_PATH$input_path"
28160    fi
28161  fi
28162
28163  # remove trailing .exe if any
28164  new_path="${new_path/%.exe/}"
28165
28166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28167
28168  # First separate the path from the arguments. This will split at the first
28169  # space.
28170  complete="$PROPER_COMPILER_CC"
28171  path="${complete%% *}"
28172  tmp="$complete EOL"
28173  arguments="${tmp#* }"
28174
28175  # Input might be given as Windows format, start by converting to
28176  # unix format.
28177  new_path="$path"
28178
28179  windows_path="$new_path"
28180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28181    unix_path=`$CYGPATH -u "$windows_path"`
28182    new_path="$unix_path"
28183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28185    new_path="$unix_path"
28186  fi
28187
28188
28189  # Now try to locate executable using which
28190  new_path=`$WHICH "$new_path" 2> /dev/null`
28191
28192  if test "x$new_path" = x; then
28193    # Oops. Which didn't find the executable.
28194    # The splitting of arguments from the executable at a space might have been incorrect,
28195    # since paths with space are more likely in Windows. Give it another try with the whole
28196    # argument.
28197    path="$complete"
28198    arguments="EOL"
28199    new_path="$path"
28200
28201  windows_path="$new_path"
28202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28203    unix_path=`$CYGPATH -u "$windows_path"`
28204    new_path="$unix_path"
28205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28207    new_path="$unix_path"
28208  fi
28209
28210
28211    new_path=`$WHICH "$new_path" 2> /dev/null`
28212
28213    if test "x$new_path" = x; then
28214      # It's still not found. Now this is an unrecoverable error.
28215      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28216$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28217      has_space=`$ECHO "$complete" | $GREP " "`
28218      if test "x$has_space" != x; then
28219        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28220$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28221      fi
28222      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28223    fi
28224  fi
28225
28226  # Now new_path has a complete unix path to the binary
28227  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28228    # Keep paths in /bin as-is, but remove trailing .exe if any
28229    new_path="${new_path/%.exe/}"
28230    # Do not save /bin paths to all_fixpath_prefixes!
28231  else
28232    # Not in mixed or Windows style, start by that.
28233    new_path=`cmd //c echo $new_path`
28234
28235  input_path="$new_path"
28236  # Check if we need to convert this using DOS-style short mode. If the path
28237  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28238  # take no chances and rewrite it.
28239  # Note: m4 eats our [], so we need to use [ and ] instead.
28240  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28241  if test "x$has_forbidden_chars" != x; then
28242    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28243    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28244  fi
28245
28246    # Output is in $new_path
28247
28248  windows_path="$new_path"
28249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28250    unix_path=`$CYGPATH -u "$windows_path"`
28251    new_path="$unix_path"
28252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28254    new_path="$unix_path"
28255  fi
28256
28257    # remove trailing .exe if any
28258    new_path="${new_path/%.exe/}"
28259
28260    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28261    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28262  fi
28263
28264  else
28265    # We're on a posix platform. Hooray! :)
28266    # First separate the path from the arguments. This will split at the first
28267    # space.
28268    complete="$PROPER_COMPILER_CC"
28269    path="${complete%% *}"
28270    tmp="$complete EOL"
28271    arguments="${tmp#* }"
28272
28273    # Cannot rely on the command "which" here since it doesn't always work.
28274    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28275    if test -z "$is_absolute_path"; then
28276      # Path to executable is not absolute. Find it.
28277      IFS_save="$IFS"
28278      IFS=:
28279      for p in $PATH; do
28280        if test -f "$p/$path" && test -x "$p/$path"; then
28281          new_path="$p/$path"
28282          break
28283        fi
28284      done
28285      IFS="$IFS_save"
28286    else
28287      # This is an absolute path, we can use it without further modifications.
28288      new_path="$path"
28289    fi
28290
28291    if test "x$new_path" = x; then
28292      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28293$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28294      has_space=`$ECHO "$complete" | $GREP " "`
28295      if test "x$has_space" != x; then
28296        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28297$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28298      fi
28299      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28300    fi
28301  fi
28302
28303  # Now join together the path and the arguments once again
28304  if test "x$arguments" != xEOL; then
28305    new_complete="$new_path ${arguments% *}"
28306  else
28307    new_complete="$new_path"
28308  fi
28309
28310  if test "x$complete" != "x$new_complete"; then
28311    PROPER_COMPILER_CC="$new_complete"
28312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28313$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28314  fi
28315
28316    PATH="$RETRY_COMPILER_SAVED_PATH"
28317
28318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28319$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28320
28321  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28322    # Follow a chain of symbolic links. Use readlink
28323    # where it exists, else fall back to horribly
28324    # complicated shell code.
28325    if test "x$READLINK_TESTED" != yes; then
28326      # On MacOSX there is a readlink tool with a different
28327      # purpose than the GNU readlink tool. Check the found readlink.
28328      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28329      if test "x$ISGNU" = x; then
28330        # A readlink that we do not know how to use.
28331        # Are there other non-GNU readlinks out there?
28332        READLINK_TESTED=yes
28333        READLINK=
28334      fi
28335    fi
28336
28337    if test "x$READLINK" != x; then
28338      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28339    else
28340      # Save the current directory for restoring afterwards
28341      STARTDIR=$PWD
28342      COUNTER=0
28343      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28344      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28345      cd $sym_link_dir
28346      # Use -P flag to resolve symlinks in directories.
28347      cd `$THEPWDCMD -P`
28348      sym_link_dir=`$THEPWDCMD -P`
28349      # Resolve file symlinks
28350      while test $COUNTER -lt 20; do
28351        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28352        if test "x$ISLINK" == x; then
28353          # This is not a symbolic link! We are done!
28354          break
28355        fi
28356        # Again resolve directory symlinks since the target of the just found
28357        # link could be in a different directory
28358        cd `$DIRNAME $ISLINK`
28359        sym_link_dir=`$THEPWDCMD -P`
28360        sym_link_file=`$BASENAME $ISLINK`
28361        let COUNTER=COUNTER+1
28362      done
28363      cd $STARTDIR
28364      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28365    fi
28366  fi
28367
28368    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28369$as_echo "$PROPER_COMPILER_CC" >&6; }
28370    CC="$PROPER_COMPILER_CC"
28371  else
28372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28373$as_echo "no, keeping CC" >&6; }
28374  fi
28375
28376
28377  COMPILER=$CC
28378  COMPILER_NAME=$COMPILER_NAME
28379
28380  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28381    # cc -V output typically looks like
28382    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28383    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28384    # Check that this is likely to be the Solaris Studio cc.
28385    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28386    if test $? -ne 0; then
28387      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28388      { $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
28389$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28390      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28391$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28392      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28393$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28394      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28395    fi
28396    # Remove usage instructions (if present), and
28397    # collapse compiler output into a single line
28398    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28399        $SED -e 's/ *[Uu]sage:.*//'`
28400    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28401        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28402  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28403    # xlc -qversion output typically looks like
28404    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28405    #     Version: 11.01.0000.0015
28406    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28407    # Check that this is likely to be the IBM XL C compiler.
28408    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28409    if test $? -ne 0; then
28410      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28411      { $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
28412$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28413      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28414$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28415      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28416$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28417      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28418    fi
28419    # Collapse compiler output into a single line
28420    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28421    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28422        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28423  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28424    # There is no specific version flag, but all output starts with a version string.
28425    # First line typically looks something like:
28426    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28427    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28428    # Check that this is likely to be Microsoft CL.EXE.
28429    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28430    if test $? -ne 0; then
28431      { $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
28432$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28433      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28434$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28435      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28436    fi
28437    # Collapse compiler output into a single line
28438    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28440        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28441  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28442    # gcc --version output typically looks like
28443    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28444    #     Copyright (C) 2013 Free Software Foundation, Inc.
28445    #     This is free software; see the source for copying conditions.  There is NO
28446    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28447    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28448    # Check that this is likely to be GCC.
28449    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28450    if test $? -ne 0; then
28451      { $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
28452$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28453      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28454$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28455      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28456    fi
28457    # Remove Copyright and legalese from version string, and
28458    # collapse into a single line
28459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28460        $SED -e 's/ *Copyright .*//'`
28461    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28462        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28463  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28464    # clang --version output typically looks like
28465    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28466    #    clang version 3.3 (tags/RELEASE_33/final)
28467    # or
28468    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28469    #    Target: x86_64-pc-linux-gnu
28470    #    Thread model: posix
28471    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28472    # Check that this is likely to be clang
28473    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28474    if test $? -ne 0; then
28475      { $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
28476$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28477      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28478$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28479      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28480    fi
28481    # Collapse compiler output into a single line
28482    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28483    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28484        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28485  else
28486      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28487  fi
28488  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28489  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28490  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28491  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28492
28493  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28494$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28495
28496
28497  # Now that we have resolved CC ourself, let autoconf have its go at it
28498  ac_ext=c
28499ac_cpp='$CPP $CPPFLAGS'
28500ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28501ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28502ac_compiler_gnu=$ac_cv_c_compiler_gnu
28503if test -n "$ac_tool_prefix"; then
28504  for ac_prog in $CC
28505  do
28506    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28507set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28509$as_echo_n "checking for $ac_word... " >&6; }
28510if ${ac_cv_prog_CC+:} false; then :
28511  $as_echo_n "(cached) " >&6
28512else
28513  if test -n "$CC"; then
28514  ac_cv_prog_CC="$CC" # Let the user override the test.
28515else
28516as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28517for as_dir in $PATH
28518do
28519  IFS=$as_save_IFS
28520  test -z "$as_dir" && as_dir=.
28521    for ac_exec_ext in '' $ac_executable_extensions; do
28522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28523    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28525    break 2
28526  fi
28527done
28528  done
28529IFS=$as_save_IFS
28530
28531fi
28532fi
28533CC=$ac_cv_prog_CC
28534if test -n "$CC"; then
28535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28536$as_echo "$CC" >&6; }
28537else
28538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28539$as_echo "no" >&6; }
28540fi
28541
28542
28543    test -n "$CC" && break
28544  done
28545fi
28546if test -z "$CC"; then
28547  ac_ct_CC=$CC
28548  for ac_prog in $CC
28549do
28550  # Extract the first word of "$ac_prog", so it can be a program name with args.
28551set dummy $ac_prog; ac_word=$2
28552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28553$as_echo_n "checking for $ac_word... " >&6; }
28554if ${ac_cv_prog_ac_ct_CC+:} false; then :
28555  $as_echo_n "(cached) " >&6
28556else
28557  if test -n "$ac_ct_CC"; then
28558  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28559else
28560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28561for as_dir in $PATH
28562do
28563  IFS=$as_save_IFS
28564  test -z "$as_dir" && as_dir=.
28565    for ac_exec_ext in '' $ac_executable_extensions; do
28566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28567    ac_cv_prog_ac_ct_CC="$ac_prog"
28568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28569    break 2
28570  fi
28571done
28572  done
28573IFS=$as_save_IFS
28574
28575fi
28576fi
28577ac_ct_CC=$ac_cv_prog_ac_ct_CC
28578if test -n "$ac_ct_CC"; then
28579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28580$as_echo "$ac_ct_CC" >&6; }
28581else
28582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28583$as_echo "no" >&6; }
28584fi
28585
28586
28587  test -n "$ac_ct_CC" && break
28588done
28589
28590  if test "x$ac_ct_CC" = x; then
28591    CC=""
28592  else
28593    case $cross_compiling:$ac_tool_warned in
28594yes:)
28595{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28596$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28597ac_tool_warned=yes ;;
28598esac
28599    CC=$ac_ct_CC
28600  fi
28601fi
28602
28603
28604test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28605$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28606as_fn_error $? "no acceptable C compiler found in \$PATH
28607See \`config.log' for more details" "$LINENO" 5; }
28608
28609# Provide some information about the compiler.
28610$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28611set X $ac_compile
28612ac_compiler=$2
28613for ac_option in --version -v -V -qversion; do
28614  { { ac_try="$ac_compiler $ac_option >&5"
28615case "(($ac_try" in
28616  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28617  *) ac_try_echo=$ac_try;;
28618esac
28619eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28620$as_echo "$ac_try_echo"; } >&5
28621  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28622  ac_status=$?
28623  if test -s conftest.err; then
28624    sed '10a\
28625... rest of stderr output deleted ...
28626         10q' conftest.err >conftest.er1
28627    cat conftest.er1 >&5
28628  fi
28629  rm -f conftest.er1 conftest.err
28630  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28631  test $ac_status = 0; }
28632done
28633
28634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28635/* end confdefs.h.  */
28636
28637int
28638main ()
28639{
28640
28641  ;
28642  return 0;
28643}
28644_ACEOF
28645ac_clean_files_save=$ac_clean_files
28646ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28647# Try to create an executable without -o first, disregard a.out.
28648# It will help us diagnose broken compilers, and finding out an intuition
28649# of exeext.
28650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28651$as_echo_n "checking whether the C compiler works... " >&6; }
28652ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28653
28654# The possible output files:
28655ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28656
28657ac_rmfiles=
28658for ac_file in $ac_files
28659do
28660  case $ac_file in
28661    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28662    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28663  esac
28664done
28665rm -f $ac_rmfiles
28666
28667if { { ac_try="$ac_link_default"
28668case "(($ac_try" in
28669  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28670  *) ac_try_echo=$ac_try;;
28671esac
28672eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28673$as_echo "$ac_try_echo"; } >&5
28674  (eval "$ac_link_default") 2>&5
28675  ac_status=$?
28676  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28677  test $ac_status = 0; }; then :
28678  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28679# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28680# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28681# so that the user can short-circuit this test for compilers unknown to
28682# Autoconf.
28683for ac_file in $ac_files ''
28684do
28685  test -f "$ac_file" || continue
28686  case $ac_file in
28687    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28688	;;
28689    [ab].out )
28690	# We found the default executable, but exeext='' is most
28691	# certainly right.
28692	break;;
28693    *.* )
28694	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28695	then :; else
28696	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28697	fi
28698	# We set ac_cv_exeext here because the later test for it is not
28699	# safe: cross compilers may not add the suffix if given an `-o'
28700	# argument, so we may need to know it at that point already.
28701	# Even if this section looks crufty: it has the advantage of
28702	# actually working.
28703	break;;
28704    * )
28705	break;;
28706  esac
28707done
28708test "$ac_cv_exeext" = no && ac_cv_exeext=
28709
28710else
28711  ac_file=''
28712fi
28713if test -z "$ac_file"; then :
28714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28715$as_echo "no" >&6; }
28716$as_echo "$as_me: failed program was:" >&5
28717sed 's/^/| /' conftest.$ac_ext >&5
28718
28719{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28720$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28721as_fn_error 77 "C compiler cannot create executables
28722See \`config.log' for more details" "$LINENO" 5; }
28723else
28724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28725$as_echo "yes" >&6; }
28726fi
28727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28728$as_echo_n "checking for C compiler default output file name... " >&6; }
28729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28730$as_echo "$ac_file" >&6; }
28731ac_exeext=$ac_cv_exeext
28732
28733rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28734ac_clean_files=$ac_clean_files_save
28735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28736$as_echo_n "checking for suffix of executables... " >&6; }
28737if { { ac_try="$ac_link"
28738case "(($ac_try" in
28739  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28740  *) ac_try_echo=$ac_try;;
28741esac
28742eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28743$as_echo "$ac_try_echo"; } >&5
28744  (eval "$ac_link") 2>&5
28745  ac_status=$?
28746  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28747  test $ac_status = 0; }; then :
28748  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28749# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28750# work properly (i.e., refer to `conftest.exe'), while it won't with
28751# `rm'.
28752for ac_file in conftest.exe conftest conftest.*; do
28753  test -f "$ac_file" || continue
28754  case $ac_file in
28755    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28756    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28757	  break;;
28758    * ) break;;
28759  esac
28760done
28761else
28762  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28763$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28764as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28765See \`config.log' for more details" "$LINENO" 5; }
28766fi
28767rm -f conftest conftest$ac_cv_exeext
28768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28769$as_echo "$ac_cv_exeext" >&6; }
28770
28771rm -f conftest.$ac_ext
28772EXEEXT=$ac_cv_exeext
28773ac_exeext=$EXEEXT
28774cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28775/* end confdefs.h.  */
28776#include <stdio.h>
28777int
28778main ()
28779{
28780FILE *f = fopen ("conftest.out", "w");
28781 return ferror (f) || fclose (f) != 0;
28782
28783  ;
28784  return 0;
28785}
28786_ACEOF
28787ac_clean_files="$ac_clean_files conftest.out"
28788# Check that the compiler produces executables we can run.  If not, either
28789# the compiler is broken, or we cross compile.
28790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28791$as_echo_n "checking whether we are cross compiling... " >&6; }
28792if test "$cross_compiling" != yes; then
28793  { { ac_try="$ac_link"
28794case "(($ac_try" in
28795  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28796  *) ac_try_echo=$ac_try;;
28797esac
28798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28799$as_echo "$ac_try_echo"; } >&5
28800  (eval "$ac_link") 2>&5
28801  ac_status=$?
28802  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28803  test $ac_status = 0; }
28804  if { ac_try='./conftest$ac_cv_exeext'
28805  { { case "(($ac_try" in
28806  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28807  *) ac_try_echo=$ac_try;;
28808esac
28809eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28810$as_echo "$ac_try_echo"; } >&5
28811  (eval "$ac_try") 2>&5
28812  ac_status=$?
28813  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28814  test $ac_status = 0; }; }; then
28815    cross_compiling=no
28816  else
28817    if test "$cross_compiling" = maybe; then
28818	cross_compiling=yes
28819    else
28820	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28821$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28822as_fn_error $? "cannot run C compiled programs.
28823If you meant to cross compile, use \`--host'.
28824See \`config.log' for more details" "$LINENO" 5; }
28825    fi
28826  fi
28827fi
28828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
28829$as_echo "$cross_compiling" >&6; }
28830
28831rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
28832ac_clean_files=$ac_clean_files_save
28833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
28834$as_echo_n "checking for suffix of object files... " >&6; }
28835if ${ac_cv_objext+:} false; then :
28836  $as_echo_n "(cached) " >&6
28837else
28838  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28839/* end confdefs.h.  */
28840
28841int
28842main ()
28843{
28844
28845  ;
28846  return 0;
28847}
28848_ACEOF
28849rm -f conftest.o conftest.obj
28850if { { ac_try="$ac_compile"
28851case "(($ac_try" in
28852  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28853  *) ac_try_echo=$ac_try;;
28854esac
28855eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28856$as_echo "$ac_try_echo"; } >&5
28857  (eval "$ac_compile") 2>&5
28858  ac_status=$?
28859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28860  test $ac_status = 0; }; then :
28861  for ac_file in conftest.o conftest.obj conftest.*; do
28862  test -f "$ac_file" || continue;
28863  case $ac_file in
28864    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
28865    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
28866       break;;
28867  esac
28868done
28869else
28870  $as_echo "$as_me: failed program was:" >&5
28871sed 's/^/| /' conftest.$ac_ext >&5
28872
28873{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28874$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28875as_fn_error $? "cannot compute suffix of object files: cannot compile
28876See \`config.log' for more details" "$LINENO" 5; }
28877fi
28878rm -f conftest.$ac_cv_objext conftest.$ac_ext
28879fi
28880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
28881$as_echo "$ac_cv_objext" >&6; }
28882OBJEXT=$ac_cv_objext
28883ac_objext=$OBJEXT
28884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
28885$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
28886if ${ac_cv_c_compiler_gnu+:} false; then :
28887  $as_echo_n "(cached) " >&6
28888else
28889  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28890/* end confdefs.h.  */
28891
28892int
28893main ()
28894{
28895#ifndef __GNUC__
28896       choke me
28897#endif
28898
28899  ;
28900  return 0;
28901}
28902_ACEOF
28903if ac_fn_c_try_compile "$LINENO"; then :
28904  ac_compiler_gnu=yes
28905else
28906  ac_compiler_gnu=no
28907fi
28908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28909ac_cv_c_compiler_gnu=$ac_compiler_gnu
28910
28911fi
28912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
28913$as_echo "$ac_cv_c_compiler_gnu" >&6; }
28914if test $ac_compiler_gnu = yes; then
28915  GCC=yes
28916else
28917  GCC=
28918fi
28919ac_test_CFLAGS=${CFLAGS+set}
28920ac_save_CFLAGS=$CFLAGS
28921{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
28922$as_echo_n "checking whether $CC accepts -g... " >&6; }
28923if ${ac_cv_prog_cc_g+:} false; then :
28924  $as_echo_n "(cached) " >&6
28925else
28926  ac_save_c_werror_flag=$ac_c_werror_flag
28927   ac_c_werror_flag=yes
28928   ac_cv_prog_cc_g=no
28929   CFLAGS="-g"
28930   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28931/* end confdefs.h.  */
28932
28933int
28934main ()
28935{
28936
28937  ;
28938  return 0;
28939}
28940_ACEOF
28941if ac_fn_c_try_compile "$LINENO"; then :
28942  ac_cv_prog_cc_g=yes
28943else
28944  CFLAGS=""
28945      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28946/* end confdefs.h.  */
28947
28948int
28949main ()
28950{
28951
28952  ;
28953  return 0;
28954}
28955_ACEOF
28956if ac_fn_c_try_compile "$LINENO"; then :
28957
28958else
28959  ac_c_werror_flag=$ac_save_c_werror_flag
28960	 CFLAGS="-g"
28961	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28962/* end confdefs.h.  */
28963
28964int
28965main ()
28966{
28967
28968  ;
28969  return 0;
28970}
28971_ACEOF
28972if ac_fn_c_try_compile "$LINENO"; then :
28973  ac_cv_prog_cc_g=yes
28974fi
28975rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28976fi
28977rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28978fi
28979rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28980   ac_c_werror_flag=$ac_save_c_werror_flag
28981fi
28982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
28983$as_echo "$ac_cv_prog_cc_g" >&6; }
28984if test "$ac_test_CFLAGS" = set; then
28985  CFLAGS=$ac_save_CFLAGS
28986elif test $ac_cv_prog_cc_g = yes; then
28987  if test "$GCC" = yes; then
28988    CFLAGS="-g -O2"
28989  else
28990    CFLAGS="-g"
28991  fi
28992else
28993  if test "$GCC" = yes; then
28994    CFLAGS="-O2"
28995  else
28996    CFLAGS=
28997  fi
28998fi
28999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29000$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29001if ${ac_cv_prog_cc_c89+:} false; then :
29002  $as_echo_n "(cached) " >&6
29003else
29004  ac_cv_prog_cc_c89=no
29005ac_save_CC=$CC
29006cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29007/* end confdefs.h.  */
29008#include <stdarg.h>
29009#include <stdio.h>
29010struct stat;
29011/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29012struct buf { int x; };
29013FILE * (*rcsopen) (struct buf *, struct stat *, int);
29014static char *e (p, i)
29015     char **p;
29016     int i;
29017{
29018  return p[i];
29019}
29020static char *f (char * (*g) (char **, int), char **p, ...)
29021{
29022  char *s;
29023  va_list v;
29024  va_start (v,p);
29025  s = g (p, va_arg (v,int));
29026  va_end (v);
29027  return s;
29028}
29029
29030/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29031   function prototypes and stuff, but not '\xHH' hex character constants.
29032   These don't provoke an error unfortunately, instead are silently treated
29033   as 'x'.  The following induces an error, until -std is added to get
29034   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29035   array size at least.  It's necessary to write '\x00'==0 to get something
29036   that's true only with -std.  */
29037int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29038
29039/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29040   inside strings and character constants.  */
29041#define FOO(x) 'x'
29042int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29043
29044int test (int i, double x);
29045struct s1 {int (*f) (int a);};
29046struct s2 {int (*f) (double a);};
29047int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29048int argc;
29049char **argv;
29050int
29051main ()
29052{
29053return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29054  ;
29055  return 0;
29056}
29057_ACEOF
29058for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29059	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29060do
29061  CC="$ac_save_CC $ac_arg"
29062  if ac_fn_c_try_compile "$LINENO"; then :
29063  ac_cv_prog_cc_c89=$ac_arg
29064fi
29065rm -f core conftest.err conftest.$ac_objext
29066  test "x$ac_cv_prog_cc_c89" != "xno" && break
29067done
29068rm -f conftest.$ac_ext
29069CC=$ac_save_CC
29070
29071fi
29072# AC_CACHE_VAL
29073case "x$ac_cv_prog_cc_c89" in
29074  x)
29075    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29076$as_echo "none needed" >&6; } ;;
29077  xno)
29078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29079$as_echo "unsupported" >&6; } ;;
29080  *)
29081    CC="$CC $ac_cv_prog_cc_c89"
29082    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29083$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29084esac
29085if test "x$ac_cv_prog_cc_c89" != xno; then :
29086
29087fi
29088
29089ac_ext=cpp
29090ac_cpp='$CXXCPP $CPPFLAGS'
29091ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29092ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29093ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29094
29095
29096
29097  COMPILER_NAME=C++
29098  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29099
29100  if test "x$CXX" != x; then
29101    # User has supplied compiler name already, always let that override.
29102    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29103$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29104    if test "x`basename $CXX`" = "x$CXX"; then
29105      # A command without a complete path is provided, search $PATH.
29106
29107      for ac_prog in $CXX
29108do
29109  # Extract the first word of "$ac_prog", so it can be a program name with args.
29110set dummy $ac_prog; ac_word=$2
29111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29112$as_echo_n "checking for $ac_word... " >&6; }
29113if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29114  $as_echo_n "(cached) " >&6
29115else
29116  case $POTENTIAL_CXX in
29117  [\\/]* | ?:[\\/]*)
29118  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29119  ;;
29120  *)
29121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29122for as_dir in $PATH
29123do
29124  IFS=$as_save_IFS
29125  test -z "$as_dir" && as_dir=.
29126    for ac_exec_ext in '' $ac_executable_extensions; do
29127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29128    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29130    break 2
29131  fi
29132done
29133  done
29134IFS=$as_save_IFS
29135
29136  ;;
29137esac
29138fi
29139POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29140if test -n "$POTENTIAL_CXX"; then
29141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29142$as_echo "$POTENTIAL_CXX" >&6; }
29143else
29144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29145$as_echo "no" >&6; }
29146fi
29147
29148
29149  test -n "$POTENTIAL_CXX" && break
29150done
29151
29152      if test "x$POTENTIAL_CXX" != x; then
29153        CXX=$POTENTIAL_CXX
29154      else
29155        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29156      fi
29157    else
29158      # Otherwise it might already be a complete path
29159      if test ! -x "$CXX"; then
29160        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29161      fi
29162    fi
29163  else
29164    # No user supplied value. Locate compiler ourselves.
29165
29166    # If we are cross compiling, assume cross compilation tools follows the
29167    # cross compilation standard where they are prefixed with the autoconf
29168    # standard name for the target. For example the binary
29169    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29170    # If we are not cross compiling, then the default compiler name will be
29171    # used.
29172
29173    CXX=
29174    # If TOOLS_DIR is set, check for all compiler names in there first
29175    # before checking the rest of the PATH.
29176    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29177    # step, this should not be necessary.
29178    if test -n "$TOOLS_DIR"; then
29179      PATH_save="$PATH"
29180      PATH="$TOOLS_DIR"
29181      for ac_prog in $SEARCH_LIST
29182do
29183  # Extract the first word of "$ac_prog", so it can be a program name with args.
29184set dummy $ac_prog; ac_word=$2
29185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29186$as_echo_n "checking for $ac_word... " >&6; }
29187if ${ac_cv_path_TOOLS_DIR_CXX+:} false; then :
29188  $as_echo_n "(cached) " >&6
29189else
29190  case $TOOLS_DIR_CXX in
29191  [\\/]* | ?:[\\/]*)
29192  ac_cv_path_TOOLS_DIR_CXX="$TOOLS_DIR_CXX" # Let the user override the test with a path.
29193  ;;
29194  *)
29195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29196for as_dir in $PATH
29197do
29198  IFS=$as_save_IFS
29199  test -z "$as_dir" && as_dir=.
29200    for ac_exec_ext in '' $ac_executable_extensions; do
29201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29202    ac_cv_path_TOOLS_DIR_CXX="$as_dir/$ac_word$ac_exec_ext"
29203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29204    break 2
29205  fi
29206done
29207  done
29208IFS=$as_save_IFS
29209
29210  ;;
29211esac
29212fi
29213TOOLS_DIR_CXX=$ac_cv_path_TOOLS_DIR_CXX
29214if test -n "$TOOLS_DIR_CXX"; then
29215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLS_DIR_CXX" >&5
29216$as_echo "$TOOLS_DIR_CXX" >&6; }
29217else
29218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29219$as_echo "no" >&6; }
29220fi
29221
29222
29223  test -n "$TOOLS_DIR_CXX" && break
29224done
29225
29226      CXX=$TOOLS_DIR_CXX
29227      PATH="$PATH_save"
29228    fi
29229
29230    # AC_PATH_PROGS can't be run multiple times with the same variable,
29231    # so create a new name for this run.
29232    if test "x$CXX" = x; then
29233      for ac_prog in $SEARCH_LIST
29234do
29235  # Extract the first word of "$ac_prog", so it can be a program name with args.
29236set dummy $ac_prog; ac_word=$2
29237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29238$as_echo_n "checking for $ac_word... " >&6; }
29239if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29240  $as_echo_n "(cached) " >&6
29241else
29242  case $POTENTIAL_CXX in
29243  [\\/]* | ?:[\\/]*)
29244  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29245  ;;
29246  *)
29247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29248for as_dir in $PATH
29249do
29250  IFS=$as_save_IFS
29251  test -z "$as_dir" && as_dir=.
29252    for ac_exec_ext in '' $ac_executable_extensions; do
29253  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29254    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29255    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29256    break 2
29257  fi
29258done
29259  done
29260IFS=$as_save_IFS
29261
29262  ;;
29263esac
29264fi
29265POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29266if test -n "$POTENTIAL_CXX"; then
29267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29268$as_echo "$POTENTIAL_CXX" >&6; }
29269else
29270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29271$as_echo "no" >&6; }
29272fi
29273
29274
29275  test -n "$POTENTIAL_CXX" && break
29276done
29277
29278      CXX=$POTENTIAL_CXX
29279    fi
29280
29281    if test "x$CXX" = x; then
29282
29283  # Print a helpful message on how to acquire the necessary build dependency.
29284  # devkit is the help tag: freetype, cups, pulse, alsa etc
29285  MISSING_DEPENDENCY=devkit
29286
29287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29288    cygwin_help $MISSING_DEPENDENCY
29289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29290    msys_help $MISSING_DEPENDENCY
29291  else
29292    PKGHANDLER_COMMAND=
29293
29294    case $PKGHANDLER in
29295      apt-get)
29296        apt_help     $MISSING_DEPENDENCY ;;
29297      yum)
29298        yum_help     $MISSING_DEPENDENCY ;;
29299      port)
29300        port_help    $MISSING_DEPENDENCY ;;
29301      pkgutil)
29302        pkgutil_help $MISSING_DEPENDENCY ;;
29303      pkgadd)
29304        pkgadd_help  $MISSING_DEPENDENCY ;;
29305    esac
29306
29307    if test "x$PKGHANDLER_COMMAND" != x; then
29308      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29309    fi
29310  fi
29311
29312      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29313    fi
29314  fi
29315
29316  # Now we have a compiler binary in CXX. Make sure it's okay.
29317
29318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29319
29320  # First separate the path from the arguments. This will split at the first
29321  # space.
29322  complete="$CXX"
29323  path="${complete%% *}"
29324  tmp="$complete EOL"
29325  arguments="${tmp#* }"
29326
29327  # Input might be given as Windows format, start by converting to
29328  # unix format.
29329  new_path=`$CYGPATH -u "$path"`
29330
29331  # Now try to locate executable using which
29332  new_path=`$WHICH "$new_path" 2> /dev/null`
29333  # bat and cmd files are not always considered executable in cygwin causing which
29334  # to not find them
29335  if test "x$new_path" = x \
29336      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29337      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29338    new_path=`$CYGPATH -u "$path"`
29339  fi
29340  if test "x$new_path" = x; then
29341    # Oops. Which didn't find the executable.
29342    # The splitting of arguments from the executable at a space might have been incorrect,
29343    # since paths with space are more likely in Windows. Give it another try with the whole
29344    # argument.
29345    path="$complete"
29346    arguments="EOL"
29347    new_path=`$CYGPATH -u "$path"`
29348    new_path=`$WHICH "$new_path" 2> /dev/null`
29349    # bat and cmd files are not always considered executable in cygwin causing which
29350    # to not find them
29351    if test "x$new_path" = x \
29352        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29353        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29354      new_path=`$CYGPATH -u "$path"`
29355    fi
29356    if test "x$new_path" = x; then
29357      # It's still not found. Now this is an unrecoverable error.
29358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29359$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29360      has_space=`$ECHO "$complete" | $GREP " "`
29361      if test "x$has_space" != x; then
29362        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29363$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29364      fi
29365      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29366    fi
29367  fi
29368
29369  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29370  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29371  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29372  # "foo.exe" is OK but "foo" is an error.
29373  #
29374  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29375  # It is also a way to make sure we got the proper file name for the real test later on.
29376  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29377  if test "x$test_shortpath" = x; then
29378    # Short path failed, file does not exist as specified.
29379    # Try adding .exe or .cmd
29380    if test -f "${new_path}.exe"; then
29381      input_to_shortpath="${new_path}.exe"
29382    elif test -f "${new_path}.cmd"; then
29383      input_to_shortpath="${new_path}.cmd"
29384    else
29385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29386$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29387      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29388$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29389      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29390    fi
29391  else
29392    input_to_shortpath="$new_path"
29393  fi
29394
29395  # Call helper function which possibly converts this using DOS-style short mode.
29396  # If so, the updated path is stored in $new_path.
29397  new_path="$input_to_shortpath"
29398
29399  input_path="$input_to_shortpath"
29400  # Check if we need to convert this using DOS-style short mode. If the path
29401  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29402  # take no chances and rewrite it.
29403  # Note: m4 eats our [], so we need to use [ and ] instead.
29404  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29405  if test "x$has_forbidden_chars" != x; then
29406    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29407    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29408    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29409    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29410      # Going to short mode and back again did indeed matter. Since short mode is
29411      # case insensitive, let's make it lowercase to improve readability.
29412      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29413      # Now convert it back to Unix-stile (cygpath)
29414      input_path=`$CYGPATH -u "$shortmode_path"`
29415      new_path="$input_path"
29416    fi
29417  fi
29418
29419  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29420  if test "x$test_cygdrive_prefix" = x; then
29421    # As a simple fix, exclude /usr/bin since it's not a real path.
29422    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29423      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29424      # a path prefixed by /cygdrive for fixpath to work.
29425      new_path="$CYGWIN_ROOT_PATH$input_path"
29426    fi
29427  fi
29428
29429  # remove trailing .exe if any
29430  new_path="${new_path/%.exe/}"
29431
29432  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29433
29434  # First separate the path from the arguments. This will split at the first
29435  # space.
29436  complete="$CXX"
29437  path="${complete%% *}"
29438  tmp="$complete EOL"
29439  arguments="${tmp#* }"
29440
29441  # Input might be given as Windows format, start by converting to
29442  # unix format.
29443  new_path="$path"
29444
29445  windows_path="$new_path"
29446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29447    unix_path=`$CYGPATH -u "$windows_path"`
29448    new_path="$unix_path"
29449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29451    new_path="$unix_path"
29452  fi
29453
29454
29455  # Now try to locate executable using which
29456  new_path=`$WHICH "$new_path" 2> /dev/null`
29457
29458  if test "x$new_path" = x; then
29459    # Oops. Which didn't find the executable.
29460    # The splitting of arguments from the executable at a space might have been incorrect,
29461    # since paths with space are more likely in Windows. Give it another try with the whole
29462    # argument.
29463    path="$complete"
29464    arguments="EOL"
29465    new_path="$path"
29466
29467  windows_path="$new_path"
29468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29469    unix_path=`$CYGPATH -u "$windows_path"`
29470    new_path="$unix_path"
29471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29473    new_path="$unix_path"
29474  fi
29475
29476
29477    new_path=`$WHICH "$new_path" 2> /dev/null`
29478
29479    if test "x$new_path" = x; then
29480      # It's still not found. Now this is an unrecoverable error.
29481      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29482$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29483      has_space=`$ECHO "$complete" | $GREP " "`
29484      if test "x$has_space" != x; then
29485        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29486$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29487      fi
29488      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29489    fi
29490  fi
29491
29492  # Now new_path has a complete unix path to the binary
29493  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29494    # Keep paths in /bin as-is, but remove trailing .exe if any
29495    new_path="${new_path/%.exe/}"
29496    # Do not save /bin paths to all_fixpath_prefixes!
29497  else
29498    # Not in mixed or Windows style, start by that.
29499    new_path=`cmd //c echo $new_path`
29500
29501  input_path="$new_path"
29502  # Check if we need to convert this using DOS-style short mode. If the path
29503  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29504  # take no chances and rewrite it.
29505  # Note: m4 eats our [], so we need to use [ and ] instead.
29506  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29507  if test "x$has_forbidden_chars" != x; then
29508    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29509    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29510  fi
29511
29512    # Output is in $new_path
29513
29514  windows_path="$new_path"
29515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29516    unix_path=`$CYGPATH -u "$windows_path"`
29517    new_path="$unix_path"
29518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29520    new_path="$unix_path"
29521  fi
29522
29523    # remove trailing .exe if any
29524    new_path="${new_path/%.exe/}"
29525
29526    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29527    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29528  fi
29529
29530  else
29531    # We're on a posix platform. Hooray! :)
29532    # First separate the path from the arguments. This will split at the first
29533    # space.
29534    complete="$CXX"
29535    path="${complete%% *}"
29536    tmp="$complete EOL"
29537    arguments="${tmp#* }"
29538
29539    # Cannot rely on the command "which" here since it doesn't always work.
29540    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29541    if test -z "$is_absolute_path"; then
29542      # Path to executable is not absolute. Find it.
29543      IFS_save="$IFS"
29544      IFS=:
29545      for p in $PATH; do
29546        if test -f "$p/$path" && test -x "$p/$path"; then
29547          new_path="$p/$path"
29548          break
29549        fi
29550      done
29551      IFS="$IFS_save"
29552    else
29553      # This is an absolute path, we can use it without further modifications.
29554      new_path="$path"
29555    fi
29556
29557    if test "x$new_path" = x; then
29558      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29559$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29560      has_space=`$ECHO "$complete" | $GREP " "`
29561      if test "x$has_space" != x; then
29562        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29563$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29564      fi
29565      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29566    fi
29567  fi
29568
29569  # Now join together the path and the arguments once again
29570  if test "x$arguments" != xEOL; then
29571    new_complete="$new_path ${arguments% *}"
29572  else
29573    new_complete="$new_path"
29574  fi
29575
29576  if test "x$complete" != "x$new_complete"; then
29577    CXX="$new_complete"
29578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29579$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29580  fi
29581
29582  TEST_COMPILER="$CXX"
29583  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29584  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29585  if test "x$OPENJDK_BUILD_OS" != xaix; then
29586    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29587    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29588$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29589
29590  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29591    # Follow a chain of symbolic links. Use readlink
29592    # where it exists, else fall back to horribly
29593    # complicated shell code.
29594    if test "x$READLINK_TESTED" != yes; then
29595      # On MacOSX there is a readlink tool with a different
29596      # purpose than the GNU readlink tool. Check the found readlink.
29597      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29598      if test "x$ISGNU" = x; then
29599        # A readlink that we do not know how to use.
29600        # Are there other non-GNU readlinks out there?
29601        READLINK_TESTED=yes
29602        READLINK=
29603      fi
29604    fi
29605
29606    if test "x$READLINK" != x; then
29607      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29608    else
29609      # Save the current directory for restoring afterwards
29610      STARTDIR=$PWD
29611      COUNTER=0
29612      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29613      sym_link_file=`$BASENAME $TEST_COMPILER`
29614      cd $sym_link_dir
29615      # Use -P flag to resolve symlinks in directories.
29616      cd `$THEPWDCMD -P`
29617      sym_link_dir=`$THEPWDCMD -P`
29618      # Resolve file symlinks
29619      while test $COUNTER -lt 20; do
29620        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29621        if test "x$ISLINK" == x; then
29622          # This is not a symbolic link! We are done!
29623          break
29624        fi
29625        # Again resolve directory symlinks since the target of the just found
29626        # link could be in a different directory
29627        cd `$DIRNAME $ISLINK`
29628        sym_link_dir=`$THEPWDCMD -P`
29629        sym_link_file=`$BASENAME $ISLINK`
29630        let COUNTER=COUNTER+1
29631      done
29632      cd $STARTDIR
29633      TEST_COMPILER=$sym_link_dir/$sym_link_file
29634    fi
29635  fi
29636
29637    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29638$as_echo "$TEST_COMPILER" >&6; }
29639  fi
29640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29641$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29642
29643  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29644  if test "x$COMPILER_BASENAME" = "xccache"; then
29645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29646$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29647    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29648    # We want to control ccache invocation ourselves, so ignore this cc and try
29649    # searching again.
29650
29651    # Remove the path to the fake ccache cc from the PATH
29652    RETRY_COMPILER_SAVED_PATH="$PATH"
29653    COMPILER_DIRNAME=`$DIRNAME $CXX`
29654    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29655
29656    # Try again looking for our compiler
29657    if test -n "$ac_tool_prefix"; then
29658  for ac_prog in $TOOLCHAIN_CXX_BINARY
29659  do
29660    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29661set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29663$as_echo_n "checking for $ac_word... " >&6; }
29664if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29665  $as_echo_n "(cached) " >&6
29666else
29667  if test -n "$PROPER_COMPILER_CXX"; then
29668  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29669else
29670as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29671for as_dir in $PATH
29672do
29673  IFS=$as_save_IFS
29674  test -z "$as_dir" && as_dir=.
29675    for ac_exec_ext in '' $ac_executable_extensions; do
29676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29677    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29679    break 2
29680  fi
29681done
29682  done
29683IFS=$as_save_IFS
29684
29685fi
29686fi
29687PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29688if test -n "$PROPER_COMPILER_CXX"; then
29689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29690$as_echo "$PROPER_COMPILER_CXX" >&6; }
29691else
29692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29693$as_echo "no" >&6; }
29694fi
29695
29696
29697    test -n "$PROPER_COMPILER_CXX" && break
29698  done
29699fi
29700if test -z "$PROPER_COMPILER_CXX"; then
29701  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29702  for ac_prog in $TOOLCHAIN_CXX_BINARY
29703do
29704  # Extract the first word of "$ac_prog", so it can be a program name with args.
29705set dummy $ac_prog; ac_word=$2
29706{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29707$as_echo_n "checking for $ac_word... " >&6; }
29708if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29709  $as_echo_n "(cached) " >&6
29710else
29711  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29712  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29713else
29714as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29715for as_dir in $PATH
29716do
29717  IFS=$as_save_IFS
29718  test -z "$as_dir" && as_dir=.
29719    for ac_exec_ext in '' $ac_executable_extensions; do
29720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29721    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29723    break 2
29724  fi
29725done
29726  done
29727IFS=$as_save_IFS
29728
29729fi
29730fi
29731ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29732if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29734$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29735else
29736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29737$as_echo "no" >&6; }
29738fi
29739
29740
29741  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29742done
29743
29744  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29745    PROPER_COMPILER_CXX=""
29746  else
29747    case $cross_compiling:$ac_tool_warned in
29748yes:)
29749{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29750$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29751ac_tool_warned=yes ;;
29752esac
29753    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29754  fi
29755fi
29756
29757
29758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29759
29760  # First separate the path from the arguments. This will split at the first
29761  # space.
29762  complete="$PROPER_COMPILER_CXX"
29763  path="${complete%% *}"
29764  tmp="$complete EOL"
29765  arguments="${tmp#* }"
29766
29767  # Input might be given as Windows format, start by converting to
29768  # unix format.
29769  new_path=`$CYGPATH -u "$path"`
29770
29771  # Now try to locate executable using which
29772  new_path=`$WHICH "$new_path" 2> /dev/null`
29773  # bat and cmd files are not always considered executable in cygwin causing which
29774  # to not find them
29775  if test "x$new_path" = x \
29776      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29777      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29778    new_path=`$CYGPATH -u "$path"`
29779  fi
29780  if test "x$new_path" = x; then
29781    # Oops. Which didn't find the executable.
29782    # The splitting of arguments from the executable at a space might have been incorrect,
29783    # since paths with space are more likely in Windows. Give it another try with the whole
29784    # argument.
29785    path="$complete"
29786    arguments="EOL"
29787    new_path=`$CYGPATH -u "$path"`
29788    new_path=`$WHICH "$new_path" 2> /dev/null`
29789    # bat and cmd files are not always considered executable in cygwin causing which
29790    # to not find them
29791    if test "x$new_path" = x \
29792        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29793        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29794      new_path=`$CYGPATH -u "$path"`
29795    fi
29796    if test "x$new_path" = x; then
29797      # It's still not found. Now this is an unrecoverable error.
29798      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29799$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29800      has_space=`$ECHO "$complete" | $GREP " "`
29801      if test "x$has_space" != x; then
29802        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29803$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29804      fi
29805      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29806    fi
29807  fi
29808
29809  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29810  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29811  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29812  # "foo.exe" is OK but "foo" is an error.
29813  #
29814  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29815  # It is also a way to make sure we got the proper file name for the real test later on.
29816  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29817  if test "x$test_shortpath" = x; then
29818    # Short path failed, file does not exist as specified.
29819    # Try adding .exe or .cmd
29820    if test -f "${new_path}.exe"; then
29821      input_to_shortpath="${new_path}.exe"
29822    elif test -f "${new_path}.cmd"; then
29823      input_to_shortpath="${new_path}.cmd"
29824    else
29825      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
29826$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
29827      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29828$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29829      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29830    fi
29831  else
29832    input_to_shortpath="$new_path"
29833  fi
29834
29835  # Call helper function which possibly converts this using DOS-style short mode.
29836  # If so, the updated path is stored in $new_path.
29837  new_path="$input_to_shortpath"
29838
29839  input_path="$input_to_shortpath"
29840  # Check if we need to convert this using DOS-style short mode. If the path
29841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29842  # take no chances and rewrite it.
29843  # Note: m4 eats our [], so we need to use [ and ] instead.
29844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29845  if test "x$has_forbidden_chars" != x; then
29846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29850      # Going to short mode and back again did indeed matter. Since short mode is
29851      # case insensitive, let's make it lowercase to improve readability.
29852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29853      # Now convert it back to Unix-stile (cygpath)
29854      input_path=`$CYGPATH -u "$shortmode_path"`
29855      new_path="$input_path"
29856    fi
29857  fi
29858
29859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29860  if test "x$test_cygdrive_prefix" = x; then
29861    # As a simple fix, exclude /usr/bin since it's not a real path.
29862    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29864      # a path prefixed by /cygdrive for fixpath to work.
29865      new_path="$CYGWIN_ROOT_PATH$input_path"
29866    fi
29867  fi
29868
29869  # remove trailing .exe if any
29870  new_path="${new_path/%.exe/}"
29871
29872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29873
29874  # First separate the path from the arguments. This will split at the first
29875  # space.
29876  complete="$PROPER_COMPILER_CXX"
29877  path="${complete%% *}"
29878  tmp="$complete EOL"
29879  arguments="${tmp#* }"
29880
29881  # Input might be given as Windows format, start by converting to
29882  # unix format.
29883  new_path="$path"
29884
29885  windows_path="$new_path"
29886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29887    unix_path=`$CYGPATH -u "$windows_path"`
29888    new_path="$unix_path"
29889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29891    new_path="$unix_path"
29892  fi
29893
29894
29895  # Now try to locate executable using which
29896  new_path=`$WHICH "$new_path" 2> /dev/null`
29897
29898  if test "x$new_path" = x; then
29899    # Oops. Which didn't find the executable.
29900    # The splitting of arguments from the executable at a space might have been incorrect,
29901    # since paths with space are more likely in Windows. Give it another try with the whole
29902    # argument.
29903    path="$complete"
29904    arguments="EOL"
29905    new_path="$path"
29906
29907  windows_path="$new_path"
29908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29909    unix_path=`$CYGPATH -u "$windows_path"`
29910    new_path="$unix_path"
29911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29913    new_path="$unix_path"
29914  fi
29915
29916
29917    new_path=`$WHICH "$new_path" 2> /dev/null`
29918
29919    if test "x$new_path" = x; then
29920      # It's still not found. Now this is an unrecoverable error.
29921      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29922$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29923      has_space=`$ECHO "$complete" | $GREP " "`
29924      if test "x$has_space" != x; then
29925        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29926$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29927      fi
29928      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
29929    fi
29930  fi
29931
29932  # Now new_path has a complete unix path to the binary
29933  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29934    # Keep paths in /bin as-is, but remove trailing .exe if any
29935    new_path="${new_path/%.exe/}"
29936    # Do not save /bin paths to all_fixpath_prefixes!
29937  else
29938    # Not in mixed or Windows style, start by that.
29939    new_path=`cmd //c echo $new_path`
29940
29941  input_path="$new_path"
29942  # Check if we need to convert this using DOS-style short mode. If the path
29943  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29944  # take no chances and rewrite it.
29945  # Note: m4 eats our [], so we need to use [ and ] instead.
29946  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29947  if test "x$has_forbidden_chars" != x; then
29948    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29949    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29950  fi
29951
29952    # Output is in $new_path
29953
29954  windows_path="$new_path"
29955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29956    unix_path=`$CYGPATH -u "$windows_path"`
29957    new_path="$unix_path"
29958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29960    new_path="$unix_path"
29961  fi
29962
29963    # remove trailing .exe if any
29964    new_path="${new_path/%.exe/}"
29965
29966    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29967    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29968  fi
29969
29970  else
29971    # We're on a posix platform. Hooray! :)
29972    # First separate the path from the arguments. This will split at the first
29973    # space.
29974    complete="$PROPER_COMPILER_CXX"
29975    path="${complete%% *}"
29976    tmp="$complete EOL"
29977    arguments="${tmp#* }"
29978
29979    # Cannot rely on the command "which" here since it doesn't always work.
29980    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29981    if test -z "$is_absolute_path"; then
29982      # Path to executable is not absolute. Find it.
29983      IFS_save="$IFS"
29984      IFS=:
29985      for p in $PATH; do
29986        if test -f "$p/$path" && test -x "$p/$path"; then
29987          new_path="$p/$path"
29988          break
29989        fi
29990      done
29991      IFS="$IFS_save"
29992    else
29993      # This is an absolute path, we can use it without further modifications.
29994      new_path="$path"
29995    fi
29996
29997    if test "x$new_path" = x; then
29998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29999$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30000      has_space=`$ECHO "$complete" | $GREP " "`
30001      if test "x$has_space" != x; then
30002        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30003$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30004      fi
30005      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30006    fi
30007  fi
30008
30009  # Now join together the path and the arguments once again
30010  if test "x$arguments" != xEOL; then
30011    new_complete="$new_path ${arguments% *}"
30012  else
30013    new_complete="$new_path"
30014  fi
30015
30016  if test "x$complete" != "x$new_complete"; then
30017    PROPER_COMPILER_CXX="$new_complete"
30018    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30019$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30020  fi
30021
30022    PATH="$RETRY_COMPILER_SAVED_PATH"
30023
30024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30025$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30026
30027  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30028    # Follow a chain of symbolic links. Use readlink
30029    # where it exists, else fall back to horribly
30030    # complicated shell code.
30031    if test "x$READLINK_TESTED" != yes; then
30032      # On MacOSX there is a readlink tool with a different
30033      # purpose than the GNU readlink tool. Check the found readlink.
30034      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30035      if test "x$ISGNU" = x; then
30036        # A readlink that we do not know how to use.
30037        # Are there other non-GNU readlinks out there?
30038        READLINK_TESTED=yes
30039        READLINK=
30040      fi
30041    fi
30042
30043    if test "x$READLINK" != x; then
30044      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30045    else
30046      # Save the current directory for restoring afterwards
30047      STARTDIR=$PWD
30048      COUNTER=0
30049      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30050      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30051      cd $sym_link_dir
30052      # Use -P flag to resolve symlinks in directories.
30053      cd `$THEPWDCMD -P`
30054      sym_link_dir=`$THEPWDCMD -P`
30055      # Resolve file symlinks
30056      while test $COUNTER -lt 20; do
30057        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30058        if test "x$ISLINK" == x; then
30059          # This is not a symbolic link! We are done!
30060          break
30061        fi
30062        # Again resolve directory symlinks since the target of the just found
30063        # link could be in a different directory
30064        cd `$DIRNAME $ISLINK`
30065        sym_link_dir=`$THEPWDCMD -P`
30066        sym_link_file=`$BASENAME $ISLINK`
30067        let COUNTER=COUNTER+1
30068      done
30069      cd $STARTDIR
30070      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30071    fi
30072  fi
30073
30074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30075$as_echo "$PROPER_COMPILER_CXX" >&6; }
30076    CXX="$PROPER_COMPILER_CXX"
30077  else
30078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30079$as_echo "no, keeping CXX" >&6; }
30080  fi
30081
30082
30083  COMPILER=$CXX
30084  COMPILER_NAME=$COMPILER_NAME
30085
30086  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30087    # cc -V output typically looks like
30088    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30089    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30090    # Check that this is likely to be the Solaris Studio cc.
30091    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30092    if test $? -ne 0; then
30093      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30094      { $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
30095$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30096      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30097$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30098      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30099$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30100      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30101    fi
30102    # Remove usage instructions (if present), and
30103    # collapse compiler output into a single line
30104    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30105        $SED -e 's/ *[Uu]sage:.*//'`
30106    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30107        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30108  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30109    # xlc -qversion output typically looks like
30110    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30111    #     Version: 11.01.0000.0015
30112    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30113    # Check that this is likely to be the IBM XL C compiler.
30114    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30115    if test $? -ne 0; then
30116      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30117      { $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
30118$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30119      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30120$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30121      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30122$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30123      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30124    fi
30125    # Collapse compiler output into a single line
30126    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30127    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30128        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30129  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30130    # There is no specific version flag, but all output starts with a version string.
30131    # First line typically looks something like:
30132    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30133    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30134    # Check that this is likely to be Microsoft CL.EXE.
30135    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30136    if test $? -ne 0; then
30137      { $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
30138$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30140$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30141      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30142    fi
30143    # Collapse compiler output into a single line
30144    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30145    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30146        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30147  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30148    # gcc --version output typically looks like
30149    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30150    #     Copyright (C) 2013 Free Software Foundation, Inc.
30151    #     This is free software; see the source for copying conditions.  There is NO
30152    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30153    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30154    # Check that this is likely to be GCC.
30155    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30156    if test $? -ne 0; then
30157      { $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
30158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30160$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30161      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30162    fi
30163    # Remove Copyright and legalese from version string, and
30164    # collapse into a single line
30165    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30166        $SED -e 's/ *Copyright .*//'`
30167    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30168        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30169  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30170    # clang --version output typically looks like
30171    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30172    #    clang version 3.3 (tags/RELEASE_33/final)
30173    # or
30174    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30175    #    Target: x86_64-pc-linux-gnu
30176    #    Thread model: posix
30177    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30178    # Check that this is likely to be clang
30179    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30180    if test $? -ne 0; then
30181      { $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
30182$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30183      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30184$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30185      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30186    fi
30187    # Collapse compiler output into a single line
30188    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30189    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30190        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30191  else
30192      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30193  fi
30194  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30195  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30196  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30197  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30198
30199  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30200$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30201
30202
30203  # Now that we have resolved CXX ourself, let autoconf have its go at it
30204  ac_ext=cpp
30205ac_cpp='$CXXCPP $CPPFLAGS'
30206ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30207ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30208ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30209if test -z "$CXX"; then
30210  if test -n "$CCC"; then
30211    CXX=$CCC
30212  else
30213    if test -n "$ac_tool_prefix"; then
30214  for ac_prog in $CXX
30215  do
30216    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30217set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30219$as_echo_n "checking for $ac_word... " >&6; }
30220if ${ac_cv_prog_CXX+:} false; then :
30221  $as_echo_n "(cached) " >&6
30222else
30223  if test -n "$CXX"; then
30224  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30225else
30226as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30227for as_dir in $PATH
30228do
30229  IFS=$as_save_IFS
30230  test -z "$as_dir" && as_dir=.
30231    for ac_exec_ext in '' $ac_executable_extensions; do
30232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30233    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30235    break 2
30236  fi
30237done
30238  done
30239IFS=$as_save_IFS
30240
30241fi
30242fi
30243CXX=$ac_cv_prog_CXX
30244if test -n "$CXX"; then
30245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30246$as_echo "$CXX" >&6; }
30247else
30248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30249$as_echo "no" >&6; }
30250fi
30251
30252
30253    test -n "$CXX" && break
30254  done
30255fi
30256if test -z "$CXX"; then
30257  ac_ct_CXX=$CXX
30258  for ac_prog in $CXX
30259do
30260  # Extract the first word of "$ac_prog", so it can be a program name with args.
30261set dummy $ac_prog; ac_word=$2
30262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30263$as_echo_n "checking for $ac_word... " >&6; }
30264if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30265  $as_echo_n "(cached) " >&6
30266else
30267  if test -n "$ac_ct_CXX"; then
30268  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30269else
30270as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30271for as_dir in $PATH
30272do
30273  IFS=$as_save_IFS
30274  test -z "$as_dir" && as_dir=.
30275    for ac_exec_ext in '' $ac_executable_extensions; do
30276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30277    ac_cv_prog_ac_ct_CXX="$ac_prog"
30278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30279    break 2
30280  fi
30281done
30282  done
30283IFS=$as_save_IFS
30284
30285fi
30286fi
30287ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30288if test -n "$ac_ct_CXX"; then
30289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30290$as_echo "$ac_ct_CXX" >&6; }
30291else
30292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30293$as_echo "no" >&6; }
30294fi
30295
30296
30297  test -n "$ac_ct_CXX" && break
30298done
30299
30300  if test "x$ac_ct_CXX" = x; then
30301    CXX="g++"
30302  else
30303    case $cross_compiling:$ac_tool_warned in
30304yes:)
30305{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30306$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30307ac_tool_warned=yes ;;
30308esac
30309    CXX=$ac_ct_CXX
30310  fi
30311fi
30312
30313  fi
30314fi
30315# Provide some information about the compiler.
30316$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30317set X $ac_compile
30318ac_compiler=$2
30319for ac_option in --version -v -V -qversion; do
30320  { { ac_try="$ac_compiler $ac_option >&5"
30321case "(($ac_try" in
30322  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30323  *) ac_try_echo=$ac_try;;
30324esac
30325eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30326$as_echo "$ac_try_echo"; } >&5
30327  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30328  ac_status=$?
30329  if test -s conftest.err; then
30330    sed '10a\
30331... rest of stderr output deleted ...
30332         10q' conftest.err >conftest.er1
30333    cat conftest.er1 >&5
30334  fi
30335  rm -f conftest.er1 conftest.err
30336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30337  test $ac_status = 0; }
30338done
30339
30340{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30341$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30342if ${ac_cv_cxx_compiler_gnu+:} false; then :
30343  $as_echo_n "(cached) " >&6
30344else
30345  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30346/* end confdefs.h.  */
30347
30348int
30349main ()
30350{
30351#ifndef __GNUC__
30352       choke me
30353#endif
30354
30355  ;
30356  return 0;
30357}
30358_ACEOF
30359if ac_fn_cxx_try_compile "$LINENO"; then :
30360  ac_compiler_gnu=yes
30361else
30362  ac_compiler_gnu=no
30363fi
30364rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30365ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30366
30367fi
30368{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30369$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30370if test $ac_compiler_gnu = yes; then
30371  GXX=yes
30372else
30373  GXX=
30374fi
30375ac_test_CXXFLAGS=${CXXFLAGS+set}
30376ac_save_CXXFLAGS=$CXXFLAGS
30377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30378$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30379if ${ac_cv_prog_cxx_g+:} false; then :
30380  $as_echo_n "(cached) " >&6
30381else
30382  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30383   ac_cxx_werror_flag=yes
30384   ac_cv_prog_cxx_g=no
30385   CXXFLAGS="-g"
30386   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30387/* end confdefs.h.  */
30388
30389int
30390main ()
30391{
30392
30393  ;
30394  return 0;
30395}
30396_ACEOF
30397if ac_fn_cxx_try_compile "$LINENO"; then :
30398  ac_cv_prog_cxx_g=yes
30399else
30400  CXXFLAGS=""
30401      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30402/* end confdefs.h.  */
30403
30404int
30405main ()
30406{
30407
30408  ;
30409  return 0;
30410}
30411_ACEOF
30412if ac_fn_cxx_try_compile "$LINENO"; then :
30413
30414else
30415  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30416	 CXXFLAGS="-g"
30417	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30418/* end confdefs.h.  */
30419
30420int
30421main ()
30422{
30423
30424  ;
30425  return 0;
30426}
30427_ACEOF
30428if ac_fn_cxx_try_compile "$LINENO"; then :
30429  ac_cv_prog_cxx_g=yes
30430fi
30431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30432fi
30433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30434fi
30435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30436   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30437fi
30438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30439$as_echo "$ac_cv_prog_cxx_g" >&6; }
30440if test "$ac_test_CXXFLAGS" = set; then
30441  CXXFLAGS=$ac_save_CXXFLAGS
30442elif test $ac_cv_prog_cxx_g = yes; then
30443  if test "$GXX" = yes; then
30444    CXXFLAGS="-g -O2"
30445  else
30446    CXXFLAGS="-g"
30447  fi
30448else
30449  if test "$GXX" = yes; then
30450    CXXFLAGS="-O2"
30451  else
30452    CXXFLAGS=
30453  fi
30454fi
30455ac_ext=cpp
30456ac_cpp='$CXXCPP $CPPFLAGS'
30457ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30458ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30459ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30460
30461
30462  #
30463  # Setup the preprocessor (CPP and CXXCPP)
30464  #
30465  ac_ext=c
30466ac_cpp='$CPP $CPPFLAGS'
30467ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30468ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30469ac_compiler_gnu=$ac_cv_c_compiler_gnu
30470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30471$as_echo_n "checking how to run the C preprocessor... " >&6; }
30472# On Suns, sometimes $CPP names a directory.
30473if test -n "$CPP" && test -d "$CPP"; then
30474  CPP=
30475fi
30476if test -z "$CPP"; then
30477  if ${ac_cv_prog_CPP+:} false; then :
30478  $as_echo_n "(cached) " >&6
30479else
30480      # Double quotes because CPP needs to be expanded
30481    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30482    do
30483      ac_preproc_ok=false
30484for ac_c_preproc_warn_flag in '' yes
30485do
30486  # Use a header file that comes with gcc, so configuring glibc
30487  # with a fresh cross-compiler works.
30488  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30489  # <limits.h> exists even on freestanding compilers.
30490  # On the NeXT, cc -E runs the code through the compiler's parser,
30491  # not just through cpp. "Syntax error" is here to catch this case.
30492  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30493/* end confdefs.h.  */
30494#ifdef __STDC__
30495# include <limits.h>
30496#else
30497# include <assert.h>
30498#endif
30499		     Syntax error
30500_ACEOF
30501if ac_fn_c_try_cpp "$LINENO"; then :
30502
30503else
30504  # Broken: fails on valid input.
30505continue
30506fi
30507rm -f conftest.err conftest.i conftest.$ac_ext
30508
30509  # OK, works on sane cases.  Now check whether nonexistent headers
30510  # can be detected and how.
30511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30512/* end confdefs.h.  */
30513#include <ac_nonexistent.h>
30514_ACEOF
30515if ac_fn_c_try_cpp "$LINENO"; then :
30516  # Broken: success on invalid input.
30517continue
30518else
30519  # Passes both tests.
30520ac_preproc_ok=:
30521break
30522fi
30523rm -f conftest.err conftest.i conftest.$ac_ext
30524
30525done
30526# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30527rm -f conftest.i conftest.err conftest.$ac_ext
30528if $ac_preproc_ok; then :
30529  break
30530fi
30531
30532    done
30533    ac_cv_prog_CPP=$CPP
30534
30535fi
30536  CPP=$ac_cv_prog_CPP
30537else
30538  ac_cv_prog_CPP=$CPP
30539fi
30540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30541$as_echo "$CPP" >&6; }
30542ac_preproc_ok=false
30543for ac_c_preproc_warn_flag in '' yes
30544do
30545  # Use a header file that comes with gcc, so configuring glibc
30546  # with a fresh cross-compiler works.
30547  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30548  # <limits.h> exists even on freestanding compilers.
30549  # On the NeXT, cc -E runs the code through the compiler's parser,
30550  # not just through cpp. "Syntax error" is here to catch this case.
30551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30552/* end confdefs.h.  */
30553#ifdef __STDC__
30554# include <limits.h>
30555#else
30556# include <assert.h>
30557#endif
30558		     Syntax error
30559_ACEOF
30560if ac_fn_c_try_cpp "$LINENO"; then :
30561
30562else
30563  # Broken: fails on valid input.
30564continue
30565fi
30566rm -f conftest.err conftest.i conftest.$ac_ext
30567
30568  # OK, works on sane cases.  Now check whether nonexistent headers
30569  # can be detected and how.
30570  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30571/* end confdefs.h.  */
30572#include <ac_nonexistent.h>
30573_ACEOF
30574if ac_fn_c_try_cpp "$LINENO"; then :
30575  # Broken: success on invalid input.
30576continue
30577else
30578  # Passes both tests.
30579ac_preproc_ok=:
30580break
30581fi
30582rm -f conftest.err conftest.i conftest.$ac_ext
30583
30584done
30585# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30586rm -f conftest.i conftest.err conftest.$ac_ext
30587if $ac_preproc_ok; then :
30588
30589else
30590  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30591$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30592as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30593See \`config.log' for more details" "$LINENO" 5; }
30594fi
30595
30596ac_ext=cpp
30597ac_cpp='$CXXCPP $CPPFLAGS'
30598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30601
30602
30603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30604
30605  # First separate the path from the arguments. This will split at the first
30606  # space.
30607  complete="$CPP"
30608  path="${complete%% *}"
30609  tmp="$complete EOL"
30610  arguments="${tmp#* }"
30611
30612  # Input might be given as Windows format, start by converting to
30613  # unix format.
30614  new_path=`$CYGPATH -u "$path"`
30615
30616  # Now try to locate executable using which
30617  new_path=`$WHICH "$new_path" 2> /dev/null`
30618  # bat and cmd files are not always considered executable in cygwin causing which
30619  # to not find them
30620  if test "x$new_path" = x \
30621      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30622      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30623    new_path=`$CYGPATH -u "$path"`
30624  fi
30625  if test "x$new_path" = x; then
30626    # Oops. Which didn't find the executable.
30627    # The splitting of arguments from the executable at a space might have been incorrect,
30628    # since paths with space are more likely in Windows. Give it another try with the whole
30629    # argument.
30630    path="$complete"
30631    arguments="EOL"
30632    new_path=`$CYGPATH -u "$path"`
30633    new_path=`$WHICH "$new_path" 2> /dev/null`
30634    # bat and cmd files are not always considered executable in cygwin causing which
30635    # to not find them
30636    if test "x$new_path" = x \
30637        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30638        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30639      new_path=`$CYGPATH -u "$path"`
30640    fi
30641    if test "x$new_path" = x; then
30642      # It's still not found. Now this is an unrecoverable error.
30643      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30644$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30645      has_space=`$ECHO "$complete" | $GREP " "`
30646      if test "x$has_space" != x; then
30647        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30648$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30649      fi
30650      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30651    fi
30652  fi
30653
30654  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30655  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30656  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30657  # "foo.exe" is OK but "foo" is an error.
30658  #
30659  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30660  # It is also a way to make sure we got the proper file name for the real test later on.
30661  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30662  if test "x$test_shortpath" = x; then
30663    # Short path failed, file does not exist as specified.
30664    # Try adding .exe or .cmd
30665    if test -f "${new_path}.exe"; then
30666      input_to_shortpath="${new_path}.exe"
30667    elif test -f "${new_path}.cmd"; then
30668      input_to_shortpath="${new_path}.cmd"
30669    else
30670      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30671$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30672      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30673$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30674      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30675    fi
30676  else
30677    input_to_shortpath="$new_path"
30678  fi
30679
30680  # Call helper function which possibly converts this using DOS-style short mode.
30681  # If so, the updated path is stored in $new_path.
30682  new_path="$input_to_shortpath"
30683
30684  input_path="$input_to_shortpath"
30685  # Check if we need to convert this using DOS-style short mode. If the path
30686  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30687  # take no chances and rewrite it.
30688  # Note: m4 eats our [], so we need to use [ and ] instead.
30689  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30690  if test "x$has_forbidden_chars" != x; then
30691    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30692    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30693    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30694    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30695      # Going to short mode and back again did indeed matter. Since short mode is
30696      # case insensitive, let's make it lowercase to improve readability.
30697      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30698      # Now convert it back to Unix-stile (cygpath)
30699      input_path=`$CYGPATH -u "$shortmode_path"`
30700      new_path="$input_path"
30701    fi
30702  fi
30703
30704  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30705  if test "x$test_cygdrive_prefix" = x; then
30706    # As a simple fix, exclude /usr/bin since it's not a real path.
30707    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30708      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30709      # a path prefixed by /cygdrive for fixpath to work.
30710      new_path="$CYGWIN_ROOT_PATH$input_path"
30711    fi
30712  fi
30713
30714  # remove trailing .exe if any
30715  new_path="${new_path/%.exe/}"
30716
30717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30718
30719  # First separate the path from the arguments. This will split at the first
30720  # space.
30721  complete="$CPP"
30722  path="${complete%% *}"
30723  tmp="$complete EOL"
30724  arguments="${tmp#* }"
30725
30726  # Input might be given as Windows format, start by converting to
30727  # unix format.
30728  new_path="$path"
30729
30730  windows_path="$new_path"
30731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30732    unix_path=`$CYGPATH -u "$windows_path"`
30733    new_path="$unix_path"
30734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30736    new_path="$unix_path"
30737  fi
30738
30739
30740  # Now try to locate executable using which
30741  new_path=`$WHICH "$new_path" 2> /dev/null`
30742
30743  if test "x$new_path" = x; then
30744    # Oops. Which didn't find the executable.
30745    # The splitting of arguments from the executable at a space might have been incorrect,
30746    # since paths with space are more likely in Windows. Give it another try with the whole
30747    # argument.
30748    path="$complete"
30749    arguments="EOL"
30750    new_path="$path"
30751
30752  windows_path="$new_path"
30753  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30754    unix_path=`$CYGPATH -u "$windows_path"`
30755    new_path="$unix_path"
30756  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30757    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30758    new_path="$unix_path"
30759  fi
30760
30761
30762    new_path=`$WHICH "$new_path" 2> /dev/null`
30763
30764    if test "x$new_path" = x; then
30765      # It's still not found. Now this is an unrecoverable error.
30766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30767$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30768      has_space=`$ECHO "$complete" | $GREP " "`
30769      if test "x$has_space" != x; then
30770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30772      fi
30773      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30774    fi
30775  fi
30776
30777  # Now new_path has a complete unix path to the binary
30778  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30779    # Keep paths in /bin as-is, but remove trailing .exe if any
30780    new_path="${new_path/%.exe/}"
30781    # Do not save /bin paths to all_fixpath_prefixes!
30782  else
30783    # Not in mixed or Windows style, start by that.
30784    new_path=`cmd //c echo $new_path`
30785
30786  input_path="$new_path"
30787  # Check if we need to convert this using DOS-style short mode. If the path
30788  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30789  # take no chances and rewrite it.
30790  # Note: m4 eats our [], so we need to use [ and ] instead.
30791  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30792  if test "x$has_forbidden_chars" != x; then
30793    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30794    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30795  fi
30796
30797    # Output is in $new_path
30798
30799  windows_path="$new_path"
30800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30801    unix_path=`$CYGPATH -u "$windows_path"`
30802    new_path="$unix_path"
30803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30805    new_path="$unix_path"
30806  fi
30807
30808    # remove trailing .exe if any
30809    new_path="${new_path/%.exe/}"
30810
30811    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30812    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30813  fi
30814
30815  else
30816    # We're on a posix platform. Hooray! :)
30817    # First separate the path from the arguments. This will split at the first
30818    # space.
30819    complete="$CPP"
30820    path="${complete%% *}"
30821    tmp="$complete EOL"
30822    arguments="${tmp#* }"
30823
30824    # Cannot rely on the command "which" here since it doesn't always work.
30825    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30826    if test -z "$is_absolute_path"; then
30827      # Path to executable is not absolute. Find it.
30828      IFS_save="$IFS"
30829      IFS=:
30830      for p in $PATH; do
30831        if test -f "$p/$path" && test -x "$p/$path"; then
30832          new_path="$p/$path"
30833          break
30834        fi
30835      done
30836      IFS="$IFS_save"
30837    else
30838      # This is an absolute path, we can use it without further modifications.
30839      new_path="$path"
30840    fi
30841
30842    if test "x$new_path" = x; then
30843      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30844$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30845      has_space=`$ECHO "$complete" | $GREP " "`
30846      if test "x$has_space" != x; then
30847        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30848$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30849      fi
30850      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30851    fi
30852  fi
30853
30854  # Now join together the path and the arguments once again
30855  if test "x$arguments" != xEOL; then
30856    new_complete="$new_path ${arguments% *}"
30857  else
30858    new_complete="$new_path"
30859  fi
30860
30861  if test "x$complete" != "x$new_complete"; then
30862    CPP="$new_complete"
30863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
30864$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
30865  fi
30866
30867  ac_ext=cpp
30868ac_cpp='$CXXCPP $CPPFLAGS'
30869ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30870ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30871ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
30873$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
30874if test -z "$CXXCPP"; then
30875  if ${ac_cv_prog_CXXCPP+:} false; then :
30876  $as_echo_n "(cached) " >&6
30877else
30878      # Double quotes because CXXCPP needs to be expanded
30879    for CXXCPP in "$CXX -E" "/lib/cpp"
30880    do
30881      ac_preproc_ok=false
30882for ac_cxx_preproc_warn_flag in '' yes
30883do
30884  # Use a header file that comes with gcc, so configuring glibc
30885  # with a fresh cross-compiler works.
30886  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30887  # <limits.h> exists even on freestanding compilers.
30888  # On the NeXT, cc -E runs the code through the compiler's parser,
30889  # not just through cpp. "Syntax error" is here to catch this case.
30890  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30891/* end confdefs.h.  */
30892#ifdef __STDC__
30893# include <limits.h>
30894#else
30895# include <assert.h>
30896#endif
30897		     Syntax error
30898_ACEOF
30899if ac_fn_cxx_try_cpp "$LINENO"; then :
30900
30901else
30902  # Broken: fails on valid input.
30903continue
30904fi
30905rm -f conftest.err conftest.i conftest.$ac_ext
30906
30907  # OK, works on sane cases.  Now check whether nonexistent headers
30908  # can be detected and how.
30909  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30910/* end confdefs.h.  */
30911#include <ac_nonexistent.h>
30912_ACEOF
30913if ac_fn_cxx_try_cpp "$LINENO"; then :
30914  # Broken: success on invalid input.
30915continue
30916else
30917  # Passes both tests.
30918ac_preproc_ok=:
30919break
30920fi
30921rm -f conftest.err conftest.i conftest.$ac_ext
30922
30923done
30924# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30925rm -f conftest.i conftest.err conftest.$ac_ext
30926if $ac_preproc_ok; then :
30927  break
30928fi
30929
30930    done
30931    ac_cv_prog_CXXCPP=$CXXCPP
30932
30933fi
30934  CXXCPP=$ac_cv_prog_CXXCPP
30935else
30936  ac_cv_prog_CXXCPP=$CXXCPP
30937fi
30938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
30939$as_echo "$CXXCPP" >&6; }
30940ac_preproc_ok=false
30941for ac_cxx_preproc_warn_flag in '' yes
30942do
30943  # Use a header file that comes with gcc, so configuring glibc
30944  # with a fresh cross-compiler works.
30945  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30946  # <limits.h> exists even on freestanding compilers.
30947  # On the NeXT, cc -E runs the code through the compiler's parser,
30948  # not just through cpp. "Syntax error" is here to catch this case.
30949  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30950/* end confdefs.h.  */
30951#ifdef __STDC__
30952# include <limits.h>
30953#else
30954# include <assert.h>
30955#endif
30956		     Syntax error
30957_ACEOF
30958if ac_fn_cxx_try_cpp "$LINENO"; then :
30959
30960else
30961  # Broken: fails on valid input.
30962continue
30963fi
30964rm -f conftest.err conftest.i conftest.$ac_ext
30965
30966  # OK, works on sane cases.  Now check whether nonexistent headers
30967  # can be detected and how.
30968  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30969/* end confdefs.h.  */
30970#include <ac_nonexistent.h>
30971_ACEOF
30972if ac_fn_cxx_try_cpp "$LINENO"; then :
30973  # Broken: success on invalid input.
30974continue
30975else
30976  # Passes both tests.
30977ac_preproc_ok=:
30978break
30979fi
30980rm -f conftest.err conftest.i conftest.$ac_ext
30981
30982done
30983# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30984rm -f conftest.i conftest.err conftest.$ac_ext
30985if $ac_preproc_ok; then :
30986
30987else
30988  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30989$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30990as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
30991See \`config.log' for more details" "$LINENO" 5; }
30992fi
30993
30994ac_ext=cpp
30995ac_cpp='$CXXCPP $CPPFLAGS'
30996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30999
31000
31001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31002
31003  # First separate the path from the arguments. This will split at the first
31004  # space.
31005  complete="$CXXCPP"
31006  path="${complete%% *}"
31007  tmp="$complete EOL"
31008  arguments="${tmp#* }"
31009
31010  # Input might be given as Windows format, start by converting to
31011  # unix format.
31012  new_path=`$CYGPATH -u "$path"`
31013
31014  # Now try to locate executable using which
31015  new_path=`$WHICH "$new_path" 2> /dev/null`
31016  # bat and cmd files are not always considered executable in cygwin causing which
31017  # to not find them
31018  if test "x$new_path" = x \
31019      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31020      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31021    new_path=`$CYGPATH -u "$path"`
31022  fi
31023  if test "x$new_path" = x; then
31024    # Oops. Which didn't find the executable.
31025    # The splitting of arguments from the executable at a space might have been incorrect,
31026    # since paths with space are more likely in Windows. Give it another try with the whole
31027    # argument.
31028    path="$complete"
31029    arguments="EOL"
31030    new_path=`$CYGPATH -u "$path"`
31031    new_path=`$WHICH "$new_path" 2> /dev/null`
31032    # bat and cmd files are not always considered executable in cygwin causing which
31033    # to not find them
31034    if test "x$new_path" = x \
31035        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31036        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31037      new_path=`$CYGPATH -u "$path"`
31038    fi
31039    if test "x$new_path" = x; then
31040      # It's still not found. Now this is an unrecoverable error.
31041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31042$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31043      has_space=`$ECHO "$complete" | $GREP " "`
31044      if test "x$has_space" != x; then
31045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31047      fi
31048      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31049    fi
31050  fi
31051
31052  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31053  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31054  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31055  # "foo.exe" is OK but "foo" is an error.
31056  #
31057  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31058  # It is also a way to make sure we got the proper file name for the real test later on.
31059  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31060  if test "x$test_shortpath" = x; then
31061    # Short path failed, file does not exist as specified.
31062    # Try adding .exe or .cmd
31063    if test -f "${new_path}.exe"; then
31064      input_to_shortpath="${new_path}.exe"
31065    elif test -f "${new_path}.cmd"; then
31066      input_to_shortpath="${new_path}.cmd"
31067    else
31068      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31069$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31070      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31071$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31072      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31073    fi
31074  else
31075    input_to_shortpath="$new_path"
31076  fi
31077
31078  # Call helper function which possibly converts this using DOS-style short mode.
31079  # If so, the updated path is stored in $new_path.
31080  new_path="$input_to_shortpath"
31081
31082  input_path="$input_to_shortpath"
31083  # Check if we need to convert this using DOS-style short mode. If the path
31084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31085  # take no chances and rewrite it.
31086  # Note: m4 eats our [], so we need to use [ and ] instead.
31087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31088  if test "x$has_forbidden_chars" != x; then
31089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31090    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31091    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31092    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31093      # Going to short mode and back again did indeed matter. Since short mode is
31094      # case insensitive, let's make it lowercase to improve readability.
31095      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31096      # Now convert it back to Unix-stile (cygpath)
31097      input_path=`$CYGPATH -u "$shortmode_path"`
31098      new_path="$input_path"
31099    fi
31100  fi
31101
31102  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31103  if test "x$test_cygdrive_prefix" = x; then
31104    # As a simple fix, exclude /usr/bin since it's not a real path.
31105    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31106      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31107      # a path prefixed by /cygdrive for fixpath to work.
31108      new_path="$CYGWIN_ROOT_PATH$input_path"
31109    fi
31110  fi
31111
31112  # remove trailing .exe if any
31113  new_path="${new_path/%.exe/}"
31114
31115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31116
31117  # First separate the path from the arguments. This will split at the first
31118  # space.
31119  complete="$CXXCPP"
31120  path="${complete%% *}"
31121  tmp="$complete EOL"
31122  arguments="${tmp#* }"
31123
31124  # Input might be given as Windows format, start by converting to
31125  # unix format.
31126  new_path="$path"
31127
31128  windows_path="$new_path"
31129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31130    unix_path=`$CYGPATH -u "$windows_path"`
31131    new_path="$unix_path"
31132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31134    new_path="$unix_path"
31135  fi
31136
31137
31138  # Now try to locate executable using which
31139  new_path=`$WHICH "$new_path" 2> /dev/null`
31140
31141  if test "x$new_path" = x; then
31142    # Oops. Which didn't find the executable.
31143    # The splitting of arguments from the executable at a space might have been incorrect,
31144    # since paths with space are more likely in Windows. Give it another try with the whole
31145    # argument.
31146    path="$complete"
31147    arguments="EOL"
31148    new_path="$path"
31149
31150  windows_path="$new_path"
31151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31152    unix_path=`$CYGPATH -u "$windows_path"`
31153    new_path="$unix_path"
31154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31156    new_path="$unix_path"
31157  fi
31158
31159
31160    new_path=`$WHICH "$new_path" 2> /dev/null`
31161
31162    if test "x$new_path" = x; then
31163      # It's still not found. Now this is an unrecoverable error.
31164      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31165$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31166      has_space=`$ECHO "$complete" | $GREP " "`
31167      if test "x$has_space" != x; then
31168        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31169$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31170      fi
31171      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31172    fi
31173  fi
31174
31175  # Now new_path has a complete unix path to the binary
31176  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31177    # Keep paths in /bin as-is, but remove trailing .exe if any
31178    new_path="${new_path/%.exe/}"
31179    # Do not save /bin paths to all_fixpath_prefixes!
31180  else
31181    # Not in mixed or Windows style, start by that.
31182    new_path=`cmd //c echo $new_path`
31183
31184  input_path="$new_path"
31185  # Check if we need to convert this using DOS-style short mode. If the path
31186  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31187  # take no chances and rewrite it.
31188  # Note: m4 eats our [], so we need to use [ and ] instead.
31189  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31190  if test "x$has_forbidden_chars" != x; then
31191    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31192    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31193  fi
31194
31195    # Output is in $new_path
31196
31197  windows_path="$new_path"
31198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31199    unix_path=`$CYGPATH -u "$windows_path"`
31200    new_path="$unix_path"
31201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31203    new_path="$unix_path"
31204  fi
31205
31206    # remove trailing .exe if any
31207    new_path="${new_path/%.exe/}"
31208
31209    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31210    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31211  fi
31212
31213  else
31214    # We're on a posix platform. Hooray! :)
31215    # First separate the path from the arguments. This will split at the first
31216    # space.
31217    complete="$CXXCPP"
31218    path="${complete%% *}"
31219    tmp="$complete EOL"
31220    arguments="${tmp#* }"
31221
31222    # Cannot rely on the command "which" here since it doesn't always work.
31223    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31224    if test -z "$is_absolute_path"; then
31225      # Path to executable is not absolute. Find it.
31226      IFS_save="$IFS"
31227      IFS=:
31228      for p in $PATH; do
31229        if test -f "$p/$path" && test -x "$p/$path"; then
31230          new_path="$p/$path"
31231          break
31232        fi
31233      done
31234      IFS="$IFS_save"
31235    else
31236      # This is an absolute path, we can use it without further modifications.
31237      new_path="$path"
31238    fi
31239
31240    if test "x$new_path" = x; then
31241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31242$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31243      has_space=`$ECHO "$complete" | $GREP " "`
31244      if test "x$has_space" != x; then
31245        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31246$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31247      fi
31248      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31249    fi
31250  fi
31251
31252  # Now join together the path and the arguments once again
31253  if test "x$arguments" != xEOL; then
31254    new_complete="$new_path ${arguments% *}"
31255  else
31256    new_complete="$new_path"
31257  fi
31258
31259  if test "x$complete" != "x$new_complete"; then
31260    CXXCPP="$new_complete"
31261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31262$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31263  fi
31264
31265
31266  #
31267  # Setup the linker (LD)
31268  #
31269  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31270    # In the Microsoft toolchain we have a separate LD command "link".
31271    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31272    # a cygwin program for something completely different.
31273    # Extract the first word of "link", so it can be a program name with args.
31274set dummy link; ac_word=$2
31275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31276$as_echo_n "checking for $ac_word... " >&6; }
31277if ${ac_cv_prog_LD+:} false; then :
31278  $as_echo_n "(cached) " >&6
31279else
31280  if test -n "$LD"; then
31281  ac_cv_prog_LD="$LD" # Let the user override the test.
31282else
31283  ac_prog_rejected=no
31284as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31285for as_dir in $PATH
31286do
31287  IFS=$as_save_IFS
31288  test -z "$as_dir" && as_dir=.
31289    for ac_exec_ext in '' $ac_executable_extensions; do
31290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31291    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31292       ac_prog_rejected=yes
31293       continue
31294     fi
31295    ac_cv_prog_LD="link"
31296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31297    break 2
31298  fi
31299done
31300  done
31301IFS=$as_save_IFS
31302
31303if test $ac_prog_rejected = yes; then
31304  # We found a bogon in the path, so make sure we never use it.
31305  set dummy $ac_cv_prog_LD
31306  shift
31307  if test $# != 0; then
31308    # We chose a different compiler from the bogus one.
31309    # However, it has the same basename, so the bogon will be chosen
31310    # first if we set LD to just the basename; use the full file name.
31311    shift
31312    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31313  fi
31314fi
31315fi
31316fi
31317LD=$ac_cv_prog_LD
31318if test -n "$LD"; then
31319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31320$as_echo "$LD" >&6; }
31321else
31322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31323$as_echo "no" >&6; }
31324fi
31325
31326
31327
31328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31329
31330  # First separate the path from the arguments. This will split at the first
31331  # space.
31332  complete="$LD"
31333  path="${complete%% *}"
31334  tmp="$complete EOL"
31335  arguments="${tmp#* }"
31336
31337  # Input might be given as Windows format, start by converting to
31338  # unix format.
31339  new_path=`$CYGPATH -u "$path"`
31340
31341  # Now try to locate executable using which
31342  new_path=`$WHICH "$new_path" 2> /dev/null`
31343  # bat and cmd files are not always considered executable in cygwin causing which
31344  # to not find them
31345  if test "x$new_path" = x \
31346      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31347      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31348    new_path=`$CYGPATH -u "$path"`
31349  fi
31350  if test "x$new_path" = x; then
31351    # Oops. Which didn't find the executable.
31352    # The splitting of arguments from the executable at a space might have been incorrect,
31353    # since paths with space are more likely in Windows. Give it another try with the whole
31354    # argument.
31355    path="$complete"
31356    arguments="EOL"
31357    new_path=`$CYGPATH -u "$path"`
31358    new_path=`$WHICH "$new_path" 2> /dev/null`
31359    # bat and cmd files are not always considered executable in cygwin causing which
31360    # to not find them
31361    if test "x$new_path" = x \
31362        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31363        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31364      new_path=`$CYGPATH -u "$path"`
31365    fi
31366    if test "x$new_path" = x; then
31367      # It's still not found. Now this is an unrecoverable error.
31368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31369$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31370      has_space=`$ECHO "$complete" | $GREP " "`
31371      if test "x$has_space" != x; then
31372        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31373$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31374      fi
31375      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31376    fi
31377  fi
31378
31379  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31380  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31381  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31382  # "foo.exe" is OK but "foo" is an error.
31383  #
31384  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31385  # It is also a way to make sure we got the proper file name for the real test later on.
31386  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31387  if test "x$test_shortpath" = x; then
31388    # Short path failed, file does not exist as specified.
31389    # Try adding .exe or .cmd
31390    if test -f "${new_path}.exe"; then
31391      input_to_shortpath="${new_path}.exe"
31392    elif test -f "${new_path}.cmd"; then
31393      input_to_shortpath="${new_path}.cmd"
31394    else
31395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31396$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31397      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31398$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31399      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31400    fi
31401  else
31402    input_to_shortpath="$new_path"
31403  fi
31404
31405  # Call helper function which possibly converts this using DOS-style short mode.
31406  # If so, the updated path is stored in $new_path.
31407  new_path="$input_to_shortpath"
31408
31409  input_path="$input_to_shortpath"
31410  # Check if we need to convert this using DOS-style short mode. If the path
31411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31412  # take no chances and rewrite it.
31413  # Note: m4 eats our [], so we need to use [ and ] instead.
31414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31415  if test "x$has_forbidden_chars" != x; then
31416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31420      # Going to short mode and back again did indeed matter. Since short mode is
31421      # case insensitive, let's make it lowercase to improve readability.
31422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31423      # Now convert it back to Unix-stile (cygpath)
31424      input_path=`$CYGPATH -u "$shortmode_path"`
31425      new_path="$input_path"
31426    fi
31427  fi
31428
31429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31430  if test "x$test_cygdrive_prefix" = x; then
31431    # As a simple fix, exclude /usr/bin since it's not a real path.
31432    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31434      # a path prefixed by /cygdrive for fixpath to work.
31435      new_path="$CYGWIN_ROOT_PATH$input_path"
31436    fi
31437  fi
31438
31439  # remove trailing .exe if any
31440  new_path="${new_path/%.exe/}"
31441
31442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31443
31444  # First separate the path from the arguments. This will split at the first
31445  # space.
31446  complete="$LD"
31447  path="${complete%% *}"
31448  tmp="$complete EOL"
31449  arguments="${tmp#* }"
31450
31451  # Input might be given as Windows format, start by converting to
31452  # unix format.
31453  new_path="$path"
31454
31455  windows_path="$new_path"
31456  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31457    unix_path=`$CYGPATH -u "$windows_path"`
31458    new_path="$unix_path"
31459  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31460    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31461    new_path="$unix_path"
31462  fi
31463
31464
31465  # Now try to locate executable using which
31466  new_path=`$WHICH "$new_path" 2> /dev/null`
31467
31468  if test "x$new_path" = x; then
31469    # Oops. Which didn't find the executable.
31470    # The splitting of arguments from the executable at a space might have been incorrect,
31471    # since paths with space are more likely in Windows. Give it another try with the whole
31472    # argument.
31473    path="$complete"
31474    arguments="EOL"
31475    new_path="$path"
31476
31477  windows_path="$new_path"
31478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31479    unix_path=`$CYGPATH -u "$windows_path"`
31480    new_path="$unix_path"
31481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31483    new_path="$unix_path"
31484  fi
31485
31486
31487    new_path=`$WHICH "$new_path" 2> /dev/null`
31488
31489    if test "x$new_path" = x; then
31490      # It's still not found. Now this is an unrecoverable error.
31491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31492$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31493      has_space=`$ECHO "$complete" | $GREP " "`
31494      if test "x$has_space" != x; then
31495        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31496$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31497      fi
31498      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31499    fi
31500  fi
31501
31502  # Now new_path has a complete unix path to the binary
31503  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31504    # Keep paths in /bin as-is, but remove trailing .exe if any
31505    new_path="${new_path/%.exe/}"
31506    # Do not save /bin paths to all_fixpath_prefixes!
31507  else
31508    # Not in mixed or Windows style, start by that.
31509    new_path=`cmd //c echo $new_path`
31510
31511  input_path="$new_path"
31512  # Check if we need to convert this using DOS-style short mode. If the path
31513  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31514  # take no chances and rewrite it.
31515  # Note: m4 eats our [], so we need to use [ and ] instead.
31516  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31517  if test "x$has_forbidden_chars" != x; then
31518    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31519    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31520  fi
31521
31522    # Output is in $new_path
31523
31524  windows_path="$new_path"
31525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31526    unix_path=`$CYGPATH -u "$windows_path"`
31527    new_path="$unix_path"
31528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31530    new_path="$unix_path"
31531  fi
31532
31533    # remove trailing .exe if any
31534    new_path="${new_path/%.exe/}"
31535
31536    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31537    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31538  fi
31539
31540  else
31541    # We're on a posix platform. Hooray! :)
31542    # First separate the path from the arguments. This will split at the first
31543    # space.
31544    complete="$LD"
31545    path="${complete%% *}"
31546    tmp="$complete EOL"
31547    arguments="${tmp#* }"
31548
31549    # Cannot rely on the command "which" here since it doesn't always work.
31550    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31551    if test -z "$is_absolute_path"; then
31552      # Path to executable is not absolute. Find it.
31553      IFS_save="$IFS"
31554      IFS=:
31555      for p in $PATH; do
31556        if test -f "$p/$path" && test -x "$p/$path"; then
31557          new_path="$p/$path"
31558          break
31559        fi
31560      done
31561      IFS="$IFS_save"
31562    else
31563      # This is an absolute path, we can use it without further modifications.
31564      new_path="$path"
31565    fi
31566
31567    if test "x$new_path" = x; then
31568      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31569$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31570      has_space=`$ECHO "$complete" | $GREP " "`
31571      if test "x$has_space" != x; then
31572        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31573$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31574      fi
31575      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31576    fi
31577  fi
31578
31579  # Now join together the path and the arguments once again
31580  if test "x$arguments" != xEOL; then
31581    new_complete="$new_path ${arguments% *}"
31582  else
31583    new_complete="$new_path"
31584  fi
31585
31586  if test "x$complete" != "x$new_complete"; then
31587    LD="$new_complete"
31588    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31589$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31590  fi
31591
31592    # Verify that we indeed succeeded with this trick.
31593    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31594$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31595    "$LD" --version > /dev/null
31596    if test $? -eq 0 ; then
31597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31598$as_echo "no" >&6; }
31599      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31600    else
31601      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31602$as_echo "yes" >&6; }
31603    fi
31604    LDCXX="$LD"
31605  else
31606    # All other toolchains use the compiler to link.
31607    LD="$CC"
31608    LDCXX="$CXX"
31609  fi
31610
31611  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31612
31613
31614  #
31615  # Setup the assembler (AS)
31616  #
31617  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31618    # FIXME: should this really be solaris, or solstudio?
31619
31620
31621  # Publish this variable in the help.
31622
31623
31624  if test "x$AS" = x; then
31625    # The variable is not set by user, try to locate tool using the code snippet
31626    for ac_prog in as
31627do
31628  # Extract the first word of "$ac_prog", so it can be a program name with args.
31629set dummy $ac_prog; ac_word=$2
31630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31631$as_echo_n "checking for $ac_word... " >&6; }
31632if ${ac_cv_path_AS+:} false; then :
31633  $as_echo_n "(cached) " >&6
31634else
31635  case $AS in
31636  [\\/]* | ?:[\\/]*)
31637  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31638  ;;
31639  *)
31640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31641for as_dir in $PATH
31642do
31643  IFS=$as_save_IFS
31644  test -z "$as_dir" && as_dir=.
31645    for ac_exec_ext in '' $ac_executable_extensions; do
31646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31647    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31649    break 2
31650  fi
31651done
31652  done
31653IFS=$as_save_IFS
31654
31655  ;;
31656esac
31657fi
31658AS=$ac_cv_path_AS
31659if test -n "$AS"; then
31660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31661$as_echo "$AS" >&6; }
31662else
31663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31664$as_echo "no" >&6; }
31665fi
31666
31667
31668  test -n "$AS" && break
31669done
31670
31671  else
31672    # The variable is set, but is it from the command line or the environment?
31673
31674    # Try to remove the string !AS! from our list.
31675    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31676    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31677      # If it failed, the variable was not from the command line. Ignore it,
31678      # but warn the user (except for BASH, which is always set by the calling BASH).
31679      if test "xAS" != xBASH; then
31680        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31681$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31682      fi
31683      # Try to locate tool using the code snippet
31684      for ac_prog in as
31685do
31686  # Extract the first word of "$ac_prog", so it can be a program name with args.
31687set dummy $ac_prog; ac_word=$2
31688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31689$as_echo_n "checking for $ac_word... " >&6; }
31690if ${ac_cv_path_AS+:} false; then :
31691  $as_echo_n "(cached) " >&6
31692else
31693  case $AS in
31694  [\\/]* | ?:[\\/]*)
31695  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31696  ;;
31697  *)
31698  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31699for as_dir in $PATH
31700do
31701  IFS=$as_save_IFS
31702  test -z "$as_dir" && as_dir=.
31703    for ac_exec_ext in '' $ac_executable_extensions; do
31704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31705    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31707    break 2
31708  fi
31709done
31710  done
31711IFS=$as_save_IFS
31712
31713  ;;
31714esac
31715fi
31716AS=$ac_cv_path_AS
31717if test -n "$AS"; then
31718  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31719$as_echo "$AS" >&6; }
31720else
31721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31722$as_echo "no" >&6; }
31723fi
31724
31725
31726  test -n "$AS" && break
31727done
31728
31729    else
31730      # If it succeeded, then it was overridden by the user. We will use it
31731      # for the tool.
31732
31733      # First remove it from the list of overridden variables, so we can test
31734      # for unknown variables in the end.
31735      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31736
31737      # Check if the provided tool contains a complete path.
31738      tool_specified="$AS"
31739      tool_basename="${tool_specified##*/}"
31740      if test "x$tool_basename" = "x$tool_specified"; then
31741        # A command without a complete path is provided, search $PATH.
31742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31743$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31744        # Extract the first word of "$tool_basename", so it can be a program name with args.
31745set dummy $tool_basename; ac_word=$2
31746{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31747$as_echo_n "checking for $ac_word... " >&6; }
31748if ${ac_cv_path_AS+:} false; then :
31749  $as_echo_n "(cached) " >&6
31750else
31751  case $AS in
31752  [\\/]* | ?:[\\/]*)
31753  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31754  ;;
31755  *)
31756  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31757for as_dir in $PATH
31758do
31759  IFS=$as_save_IFS
31760  test -z "$as_dir" && as_dir=.
31761    for ac_exec_ext in '' $ac_executable_extensions; do
31762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31763    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31765    break 2
31766  fi
31767done
31768  done
31769IFS=$as_save_IFS
31770
31771  ;;
31772esac
31773fi
31774AS=$ac_cv_path_AS
31775if test -n "$AS"; then
31776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31777$as_echo "$AS" >&6; }
31778else
31779  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31780$as_echo "no" >&6; }
31781fi
31782
31783
31784        if test "x$AS" = x; then
31785          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31786        fi
31787      else
31788        # Otherwise we believe it is a complete path. Use it as it is.
31789        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31790$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31792$as_echo_n "checking for AS... " >&6; }
31793        if test ! -x "$tool_specified"; then
31794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31795$as_echo "not found" >&6; }
31796          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31797        fi
31798        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31799$as_echo "$tool_specified" >&6; }
31800      fi
31801    fi
31802  fi
31803
31804
31805
31806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31807
31808  # First separate the path from the arguments. This will split at the first
31809  # space.
31810  complete="$AS"
31811  path="${complete%% *}"
31812  tmp="$complete EOL"
31813  arguments="${tmp#* }"
31814
31815  # Input might be given as Windows format, start by converting to
31816  # unix format.
31817  new_path=`$CYGPATH -u "$path"`
31818
31819  # Now try to locate executable using which
31820  new_path=`$WHICH "$new_path" 2> /dev/null`
31821  # bat and cmd files are not always considered executable in cygwin causing which
31822  # to not find them
31823  if test "x$new_path" = x \
31824      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31825      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31826    new_path=`$CYGPATH -u "$path"`
31827  fi
31828  if test "x$new_path" = x; then
31829    # Oops. Which didn't find the executable.
31830    # The splitting of arguments from the executable at a space might have been incorrect,
31831    # since paths with space are more likely in Windows. Give it another try with the whole
31832    # argument.
31833    path="$complete"
31834    arguments="EOL"
31835    new_path=`$CYGPATH -u "$path"`
31836    new_path=`$WHICH "$new_path" 2> /dev/null`
31837    # bat and cmd files are not always considered executable in cygwin causing which
31838    # to not find them
31839    if test "x$new_path" = x \
31840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31842      new_path=`$CYGPATH -u "$path"`
31843    fi
31844    if test "x$new_path" = x; then
31845      # It's still not found. Now this is an unrecoverable error.
31846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31847$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31848      has_space=`$ECHO "$complete" | $GREP " "`
31849      if test "x$has_space" != x; then
31850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31852      fi
31853      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31854    fi
31855  fi
31856
31857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31860  # "foo.exe" is OK but "foo" is an error.
31861  #
31862  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31863  # It is also a way to make sure we got the proper file name for the real test later on.
31864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31865  if test "x$test_shortpath" = x; then
31866    # Short path failed, file does not exist as specified.
31867    # Try adding .exe or .cmd
31868    if test -f "${new_path}.exe"; then
31869      input_to_shortpath="${new_path}.exe"
31870    elif test -f "${new_path}.cmd"; then
31871      input_to_shortpath="${new_path}.cmd"
31872    else
31873      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
31874$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
31875      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31876$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31877      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31878    fi
31879  else
31880    input_to_shortpath="$new_path"
31881  fi
31882
31883  # Call helper function which possibly converts this using DOS-style short mode.
31884  # If so, the updated path is stored in $new_path.
31885  new_path="$input_to_shortpath"
31886
31887  input_path="$input_to_shortpath"
31888  # Check if we need to convert this using DOS-style short mode. If the path
31889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31890  # take no chances and rewrite it.
31891  # Note: m4 eats our [], so we need to use [ and ] instead.
31892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31893  if test "x$has_forbidden_chars" != x; then
31894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31895    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31896    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31897    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31898      # Going to short mode and back again did indeed matter. Since short mode is
31899      # case insensitive, let's make it lowercase to improve readability.
31900      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31901      # Now convert it back to Unix-stile (cygpath)
31902      input_path=`$CYGPATH -u "$shortmode_path"`
31903      new_path="$input_path"
31904    fi
31905  fi
31906
31907  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31908  if test "x$test_cygdrive_prefix" = x; then
31909    # As a simple fix, exclude /usr/bin since it's not a real path.
31910    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31911      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31912      # a path prefixed by /cygdrive for fixpath to work.
31913      new_path="$CYGWIN_ROOT_PATH$input_path"
31914    fi
31915  fi
31916
31917  # remove trailing .exe if any
31918  new_path="${new_path/%.exe/}"
31919
31920  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31921
31922  # First separate the path from the arguments. This will split at the first
31923  # space.
31924  complete="$AS"
31925  path="${complete%% *}"
31926  tmp="$complete EOL"
31927  arguments="${tmp#* }"
31928
31929  # Input might be given as Windows format, start by converting to
31930  # unix format.
31931  new_path="$path"
31932
31933  windows_path="$new_path"
31934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31935    unix_path=`$CYGPATH -u "$windows_path"`
31936    new_path="$unix_path"
31937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31939    new_path="$unix_path"
31940  fi
31941
31942
31943  # Now try to locate executable using which
31944  new_path=`$WHICH "$new_path" 2> /dev/null`
31945
31946  if test "x$new_path" = x; then
31947    # Oops. Which didn't find the executable.
31948    # The splitting of arguments from the executable at a space might have been incorrect,
31949    # since paths with space are more likely in Windows. Give it another try with the whole
31950    # argument.
31951    path="$complete"
31952    arguments="EOL"
31953    new_path="$path"
31954
31955  windows_path="$new_path"
31956  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31957    unix_path=`$CYGPATH -u "$windows_path"`
31958    new_path="$unix_path"
31959  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31960    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31961    new_path="$unix_path"
31962  fi
31963
31964
31965    new_path=`$WHICH "$new_path" 2> /dev/null`
31966
31967    if test "x$new_path" = x; then
31968      # It's still not found. Now this is an unrecoverable error.
31969      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
31970$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
31971      has_space=`$ECHO "$complete" | $GREP " "`
31972      if test "x$has_space" != x; then
31973        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31974$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31975      fi
31976      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
31977    fi
31978  fi
31979
31980  # Now new_path has a complete unix path to the binary
31981  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31982    # Keep paths in /bin as-is, but remove trailing .exe if any
31983    new_path="${new_path/%.exe/}"
31984    # Do not save /bin paths to all_fixpath_prefixes!
31985  else
31986    # Not in mixed or Windows style, start by that.
31987    new_path=`cmd //c echo $new_path`
31988
31989  input_path="$new_path"
31990  # Check if we need to convert this using DOS-style short mode. If the path
31991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31992  # take no chances and rewrite it.
31993  # Note: m4 eats our [], so we need to use [ and ] instead.
31994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31995  if test "x$has_forbidden_chars" != x; then
31996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31997    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31998  fi
31999
32000    # Output is in $new_path
32001
32002  windows_path="$new_path"
32003  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32004    unix_path=`$CYGPATH -u "$windows_path"`
32005    new_path="$unix_path"
32006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32007    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32008    new_path="$unix_path"
32009  fi
32010
32011    # remove trailing .exe if any
32012    new_path="${new_path/%.exe/}"
32013
32014    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32015    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32016  fi
32017
32018  else
32019    # We're on a posix platform. Hooray! :)
32020    # First separate the path from the arguments. This will split at the first
32021    # space.
32022    complete="$AS"
32023    path="${complete%% *}"
32024    tmp="$complete EOL"
32025    arguments="${tmp#* }"
32026
32027    # Cannot rely on the command "which" here since it doesn't always work.
32028    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32029    if test -z "$is_absolute_path"; then
32030      # Path to executable is not absolute. Find it.
32031      IFS_save="$IFS"
32032      IFS=:
32033      for p in $PATH; do
32034        if test -f "$p/$path" && test -x "$p/$path"; then
32035          new_path="$p/$path"
32036          break
32037        fi
32038      done
32039      IFS="$IFS_save"
32040    else
32041      # This is an absolute path, we can use it without further modifications.
32042      new_path="$path"
32043    fi
32044
32045    if test "x$new_path" = x; then
32046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32047$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32048      has_space=`$ECHO "$complete" | $GREP " "`
32049      if test "x$has_space" != x; then
32050        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32051$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32052      fi
32053      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32054    fi
32055  fi
32056
32057  # Now join together the path and the arguments once again
32058  if test "x$arguments" != xEOL; then
32059    new_complete="$new_path ${arguments% *}"
32060  else
32061    new_complete="$new_path"
32062  fi
32063
32064  if test "x$complete" != "x$new_complete"; then
32065    AS="$new_complete"
32066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32067$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32068  fi
32069
32070  else
32071    # FIXME: is this correct for microsoft?
32072    AS="$CC -c"
32073  fi
32074
32075
32076  #
32077  # Setup the archiver (AR)
32078  #
32079  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32080    # The corresponding ar tool is lib.exe (used to create static libraries)
32081    # Extract the first word of "lib", so it can be a program name with args.
32082set dummy lib; ac_word=$2
32083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32084$as_echo_n "checking for $ac_word... " >&6; }
32085if ${ac_cv_prog_AR+:} false; then :
32086  $as_echo_n "(cached) " >&6
32087else
32088  if test -n "$AR"; then
32089  ac_cv_prog_AR="$AR" # Let the user override the test.
32090else
32091as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32092for as_dir in $PATH
32093do
32094  IFS=$as_save_IFS
32095  test -z "$as_dir" && as_dir=.
32096    for ac_exec_ext in '' $ac_executable_extensions; do
32097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32098    ac_cv_prog_AR="lib"
32099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32100    break 2
32101  fi
32102done
32103  done
32104IFS=$as_save_IFS
32105
32106fi
32107fi
32108AR=$ac_cv_prog_AR
32109if test -n "$AR"; then
32110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32111$as_echo "$AR" >&6; }
32112else
32113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32114$as_echo "no" >&6; }
32115fi
32116
32117
32118  else
32119
32120
32121  # Publish this variable in the help.
32122
32123
32124  if test "x$AR" = x; then
32125    # The variable is not set by user, try to locate tool using the code snippet
32126    if test -n "$ac_tool_prefix"; then
32127  for ac_prog in ar
32128  do
32129    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32130set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32132$as_echo_n "checking for $ac_word... " >&6; }
32133if ${ac_cv_prog_AR+:} false; then :
32134  $as_echo_n "(cached) " >&6
32135else
32136  if test -n "$AR"; then
32137  ac_cv_prog_AR="$AR" # Let the user override the test.
32138else
32139as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32140for as_dir in $PATH
32141do
32142  IFS=$as_save_IFS
32143  test -z "$as_dir" && as_dir=.
32144    for ac_exec_ext in '' $ac_executable_extensions; do
32145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32146    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32148    break 2
32149  fi
32150done
32151  done
32152IFS=$as_save_IFS
32153
32154fi
32155fi
32156AR=$ac_cv_prog_AR
32157if test -n "$AR"; then
32158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32159$as_echo "$AR" >&6; }
32160else
32161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32162$as_echo "no" >&6; }
32163fi
32164
32165
32166    test -n "$AR" && break
32167  done
32168fi
32169if test -z "$AR"; then
32170  ac_ct_AR=$AR
32171  for ac_prog in ar
32172do
32173  # Extract the first word of "$ac_prog", so it can be a program name with args.
32174set dummy $ac_prog; ac_word=$2
32175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32176$as_echo_n "checking for $ac_word... " >&6; }
32177if ${ac_cv_prog_ac_ct_AR+:} false; then :
32178  $as_echo_n "(cached) " >&6
32179else
32180  if test -n "$ac_ct_AR"; then
32181  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32182else
32183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32184for as_dir in $PATH
32185do
32186  IFS=$as_save_IFS
32187  test -z "$as_dir" && as_dir=.
32188    for ac_exec_ext in '' $ac_executable_extensions; do
32189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32190    ac_cv_prog_ac_ct_AR="$ac_prog"
32191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32192    break 2
32193  fi
32194done
32195  done
32196IFS=$as_save_IFS
32197
32198fi
32199fi
32200ac_ct_AR=$ac_cv_prog_ac_ct_AR
32201if test -n "$ac_ct_AR"; then
32202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32203$as_echo "$ac_ct_AR" >&6; }
32204else
32205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32206$as_echo "no" >&6; }
32207fi
32208
32209
32210  test -n "$ac_ct_AR" && break
32211done
32212
32213  if test "x$ac_ct_AR" = x; then
32214    AR=""
32215  else
32216    case $cross_compiling:$ac_tool_warned in
32217yes:)
32218{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32219$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32220ac_tool_warned=yes ;;
32221esac
32222    AR=$ac_ct_AR
32223  fi
32224fi
32225
32226  else
32227    # The variable is set, but is it from the command line or the environment?
32228
32229    # Try to remove the string !AR! from our list.
32230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32232      # If it failed, the variable was not from the command line. Ignore it,
32233      # but warn the user (except for BASH, which is always set by the calling BASH).
32234      if test "xAR" != xBASH; then
32235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32236$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32237      fi
32238      # Try to locate tool using the code snippet
32239      if test -n "$ac_tool_prefix"; then
32240  for ac_prog in ar
32241  do
32242    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32243set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32245$as_echo_n "checking for $ac_word... " >&6; }
32246if ${ac_cv_prog_AR+:} false; then :
32247  $as_echo_n "(cached) " >&6
32248else
32249  if test -n "$AR"; then
32250  ac_cv_prog_AR="$AR" # Let the user override the test.
32251else
32252as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32253for as_dir in $PATH
32254do
32255  IFS=$as_save_IFS
32256  test -z "$as_dir" && as_dir=.
32257    for ac_exec_ext in '' $ac_executable_extensions; do
32258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32259    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32261    break 2
32262  fi
32263done
32264  done
32265IFS=$as_save_IFS
32266
32267fi
32268fi
32269AR=$ac_cv_prog_AR
32270if test -n "$AR"; then
32271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32272$as_echo "$AR" >&6; }
32273else
32274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32275$as_echo "no" >&6; }
32276fi
32277
32278
32279    test -n "$AR" && break
32280  done
32281fi
32282if test -z "$AR"; then
32283  ac_ct_AR=$AR
32284  for ac_prog in ar
32285do
32286  # Extract the first word of "$ac_prog", so it can be a program name with args.
32287set dummy $ac_prog; ac_word=$2
32288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32289$as_echo_n "checking for $ac_word... " >&6; }
32290if ${ac_cv_prog_ac_ct_AR+:} false; then :
32291  $as_echo_n "(cached) " >&6
32292else
32293  if test -n "$ac_ct_AR"; then
32294  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32295else
32296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32297for as_dir in $PATH
32298do
32299  IFS=$as_save_IFS
32300  test -z "$as_dir" && as_dir=.
32301    for ac_exec_ext in '' $ac_executable_extensions; do
32302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32303    ac_cv_prog_ac_ct_AR="$ac_prog"
32304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32305    break 2
32306  fi
32307done
32308  done
32309IFS=$as_save_IFS
32310
32311fi
32312fi
32313ac_ct_AR=$ac_cv_prog_ac_ct_AR
32314if test -n "$ac_ct_AR"; then
32315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32316$as_echo "$ac_ct_AR" >&6; }
32317else
32318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32319$as_echo "no" >&6; }
32320fi
32321
32322
32323  test -n "$ac_ct_AR" && break
32324done
32325
32326  if test "x$ac_ct_AR" = x; then
32327    AR=""
32328  else
32329    case $cross_compiling:$ac_tool_warned in
32330yes:)
32331{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32332$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32333ac_tool_warned=yes ;;
32334esac
32335    AR=$ac_ct_AR
32336  fi
32337fi
32338
32339    else
32340      # If it succeeded, then it was overridden by the user. We will use it
32341      # for the tool.
32342
32343      # First remove it from the list of overridden variables, so we can test
32344      # for unknown variables in the end.
32345      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32346
32347      # Check if the provided tool contains a complete path.
32348      tool_specified="$AR"
32349      tool_basename="${tool_specified##*/}"
32350      if test "x$tool_basename" = "x$tool_specified"; then
32351        # A command without a complete path is provided, search $PATH.
32352        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32353$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32354        # Extract the first word of "$tool_basename", so it can be a program name with args.
32355set dummy $tool_basename; ac_word=$2
32356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32357$as_echo_n "checking for $ac_word... " >&6; }
32358if ${ac_cv_path_AR+:} false; then :
32359  $as_echo_n "(cached) " >&6
32360else
32361  case $AR in
32362  [\\/]* | ?:[\\/]*)
32363  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32364  ;;
32365  *)
32366  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32367for as_dir in $PATH
32368do
32369  IFS=$as_save_IFS
32370  test -z "$as_dir" && as_dir=.
32371    for ac_exec_ext in '' $ac_executable_extensions; do
32372  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32373    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32374    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32375    break 2
32376  fi
32377done
32378  done
32379IFS=$as_save_IFS
32380
32381  ;;
32382esac
32383fi
32384AR=$ac_cv_path_AR
32385if test -n "$AR"; then
32386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32387$as_echo "$AR" >&6; }
32388else
32389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32390$as_echo "no" >&6; }
32391fi
32392
32393
32394        if test "x$AR" = x; then
32395          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32396        fi
32397      else
32398        # Otherwise we believe it is a complete path. Use it as it is.
32399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32400$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32402$as_echo_n "checking for AR... " >&6; }
32403        if test ! -x "$tool_specified"; then
32404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32405$as_echo "not found" >&6; }
32406          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32407        fi
32408        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32409$as_echo "$tool_specified" >&6; }
32410      fi
32411    fi
32412  fi
32413
32414
32415  fi
32416
32417  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32418
32419  # First separate the path from the arguments. This will split at the first
32420  # space.
32421  complete="$AR"
32422  path="${complete%% *}"
32423  tmp="$complete EOL"
32424  arguments="${tmp#* }"
32425
32426  # Input might be given as Windows format, start by converting to
32427  # unix format.
32428  new_path=`$CYGPATH -u "$path"`
32429
32430  # Now try to locate executable using which
32431  new_path=`$WHICH "$new_path" 2> /dev/null`
32432  # bat and cmd files are not always considered executable in cygwin causing which
32433  # to not find them
32434  if test "x$new_path" = x \
32435      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32436      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32437    new_path=`$CYGPATH -u "$path"`
32438  fi
32439  if test "x$new_path" = x; then
32440    # Oops. Which didn't find the executable.
32441    # The splitting of arguments from the executable at a space might have been incorrect,
32442    # since paths with space are more likely in Windows. Give it another try with the whole
32443    # argument.
32444    path="$complete"
32445    arguments="EOL"
32446    new_path=`$CYGPATH -u "$path"`
32447    new_path=`$WHICH "$new_path" 2> /dev/null`
32448    # bat and cmd files are not always considered executable in cygwin causing which
32449    # to not find them
32450    if test "x$new_path" = x \
32451        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32452        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32453      new_path=`$CYGPATH -u "$path"`
32454    fi
32455    if test "x$new_path" = x; then
32456      # It's still not found. Now this is an unrecoverable error.
32457      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32458$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32459      has_space=`$ECHO "$complete" | $GREP " "`
32460      if test "x$has_space" != x; then
32461        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32462$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32463      fi
32464      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32465    fi
32466  fi
32467
32468  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32469  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32470  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32471  # "foo.exe" is OK but "foo" is an error.
32472  #
32473  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32474  # It is also a way to make sure we got the proper file name for the real test later on.
32475  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32476  if test "x$test_shortpath" = x; then
32477    # Short path failed, file does not exist as specified.
32478    # Try adding .exe or .cmd
32479    if test -f "${new_path}.exe"; then
32480      input_to_shortpath="${new_path}.exe"
32481    elif test -f "${new_path}.cmd"; then
32482      input_to_shortpath="${new_path}.cmd"
32483    else
32484      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32485$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32486      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32487$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32488      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32489    fi
32490  else
32491    input_to_shortpath="$new_path"
32492  fi
32493
32494  # Call helper function which possibly converts this using DOS-style short mode.
32495  # If so, the updated path is stored in $new_path.
32496  new_path="$input_to_shortpath"
32497
32498  input_path="$input_to_shortpath"
32499  # Check if we need to convert this using DOS-style short mode. If the path
32500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32501  # take no chances and rewrite it.
32502  # Note: m4 eats our [], so we need to use [ and ] instead.
32503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32504  if test "x$has_forbidden_chars" != x; then
32505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32506    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32507    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32508    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32509      # Going to short mode and back again did indeed matter. Since short mode is
32510      # case insensitive, let's make it lowercase to improve readability.
32511      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32512      # Now convert it back to Unix-stile (cygpath)
32513      input_path=`$CYGPATH -u "$shortmode_path"`
32514      new_path="$input_path"
32515    fi
32516  fi
32517
32518  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32519  if test "x$test_cygdrive_prefix" = x; then
32520    # As a simple fix, exclude /usr/bin since it's not a real path.
32521    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32522      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32523      # a path prefixed by /cygdrive for fixpath to work.
32524      new_path="$CYGWIN_ROOT_PATH$input_path"
32525    fi
32526  fi
32527
32528  # remove trailing .exe if any
32529  new_path="${new_path/%.exe/}"
32530
32531  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32532
32533  # First separate the path from the arguments. This will split at the first
32534  # space.
32535  complete="$AR"
32536  path="${complete%% *}"
32537  tmp="$complete EOL"
32538  arguments="${tmp#* }"
32539
32540  # Input might be given as Windows format, start by converting to
32541  # unix format.
32542  new_path="$path"
32543
32544  windows_path="$new_path"
32545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32546    unix_path=`$CYGPATH -u "$windows_path"`
32547    new_path="$unix_path"
32548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32550    new_path="$unix_path"
32551  fi
32552
32553
32554  # Now try to locate executable using which
32555  new_path=`$WHICH "$new_path" 2> /dev/null`
32556
32557  if test "x$new_path" = x; then
32558    # Oops. Which didn't find the executable.
32559    # The splitting of arguments from the executable at a space might have been incorrect,
32560    # since paths with space are more likely in Windows. Give it another try with the whole
32561    # argument.
32562    path="$complete"
32563    arguments="EOL"
32564    new_path="$path"
32565
32566  windows_path="$new_path"
32567  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32568    unix_path=`$CYGPATH -u "$windows_path"`
32569    new_path="$unix_path"
32570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32571    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32572    new_path="$unix_path"
32573  fi
32574
32575
32576    new_path=`$WHICH "$new_path" 2> /dev/null`
32577
32578    if test "x$new_path" = x; then
32579      # It's still not found. Now this is an unrecoverable error.
32580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32581$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32582      has_space=`$ECHO "$complete" | $GREP " "`
32583      if test "x$has_space" != x; then
32584        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32585$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32586      fi
32587      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32588    fi
32589  fi
32590
32591  # Now new_path has a complete unix path to the binary
32592  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32593    # Keep paths in /bin as-is, but remove trailing .exe if any
32594    new_path="${new_path/%.exe/}"
32595    # Do not save /bin paths to all_fixpath_prefixes!
32596  else
32597    # Not in mixed or Windows style, start by that.
32598    new_path=`cmd //c echo $new_path`
32599
32600  input_path="$new_path"
32601  # Check if we need to convert this using DOS-style short mode. If the path
32602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32603  # take no chances and rewrite it.
32604  # Note: m4 eats our [], so we need to use [ and ] instead.
32605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32606  if test "x$has_forbidden_chars" != x; then
32607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32608    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32609  fi
32610
32611    # Output is in $new_path
32612
32613  windows_path="$new_path"
32614  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32615    unix_path=`$CYGPATH -u "$windows_path"`
32616    new_path="$unix_path"
32617  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32618    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32619    new_path="$unix_path"
32620  fi
32621
32622    # remove trailing .exe if any
32623    new_path="${new_path/%.exe/}"
32624
32625    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32626    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32627  fi
32628
32629  else
32630    # We're on a posix platform. Hooray! :)
32631    # First separate the path from the arguments. This will split at the first
32632    # space.
32633    complete="$AR"
32634    path="${complete%% *}"
32635    tmp="$complete EOL"
32636    arguments="${tmp#* }"
32637
32638    # Cannot rely on the command "which" here since it doesn't always work.
32639    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32640    if test -z "$is_absolute_path"; then
32641      # Path to executable is not absolute. Find it.
32642      IFS_save="$IFS"
32643      IFS=:
32644      for p in $PATH; do
32645        if test -f "$p/$path" && test -x "$p/$path"; then
32646          new_path="$p/$path"
32647          break
32648        fi
32649      done
32650      IFS="$IFS_save"
32651    else
32652      # This is an absolute path, we can use it without further modifications.
32653      new_path="$path"
32654    fi
32655
32656    if test "x$new_path" = x; then
32657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32658$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32659      has_space=`$ECHO "$complete" | $GREP " "`
32660      if test "x$has_space" != x; then
32661        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32662$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32663      fi
32664      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32665    fi
32666  fi
32667
32668  # Now join together the path and the arguments once again
32669  if test "x$arguments" != xEOL; then
32670    new_complete="$new_path ${arguments% *}"
32671  else
32672    new_complete="$new_path"
32673  fi
32674
32675  if test "x$complete" != "x$new_complete"; then
32676    AR="$new_complete"
32677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32678$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32679  fi
32680
32681
32682
32683  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32684    ac_ext=m
32685ac_cpp='$OBJCPP $CPPFLAGS'
32686ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32687ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32688ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32689if test -n "$ac_tool_prefix"; then
32690  for ac_prog in gcc objcc objc cc CC
32691  do
32692    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32693set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32695$as_echo_n "checking for $ac_word... " >&6; }
32696if ${ac_cv_prog_OBJC+:} false; then :
32697  $as_echo_n "(cached) " >&6
32698else
32699  if test -n "$OBJC"; then
32700  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32701else
32702as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32703for as_dir in $PATH
32704do
32705  IFS=$as_save_IFS
32706  test -z "$as_dir" && as_dir=.
32707    for ac_exec_ext in '' $ac_executable_extensions; do
32708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32709    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32711    break 2
32712  fi
32713done
32714  done
32715IFS=$as_save_IFS
32716
32717fi
32718fi
32719OBJC=$ac_cv_prog_OBJC
32720if test -n "$OBJC"; then
32721  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32722$as_echo "$OBJC" >&6; }
32723else
32724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32725$as_echo "no" >&6; }
32726fi
32727
32728
32729    test -n "$OBJC" && break
32730  done
32731fi
32732if test -z "$OBJC"; then
32733  ac_ct_OBJC=$OBJC
32734  for ac_prog in gcc objcc objc cc CC
32735do
32736  # Extract the first word of "$ac_prog", so it can be a program name with args.
32737set dummy $ac_prog; ac_word=$2
32738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32739$as_echo_n "checking for $ac_word... " >&6; }
32740if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32741  $as_echo_n "(cached) " >&6
32742else
32743  if test -n "$ac_ct_OBJC"; then
32744  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32745else
32746as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32747for as_dir in $PATH
32748do
32749  IFS=$as_save_IFS
32750  test -z "$as_dir" && as_dir=.
32751    for ac_exec_ext in '' $ac_executable_extensions; do
32752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32753    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32755    break 2
32756  fi
32757done
32758  done
32759IFS=$as_save_IFS
32760
32761fi
32762fi
32763ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32764if test -n "$ac_ct_OBJC"; then
32765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32766$as_echo "$ac_ct_OBJC" >&6; }
32767else
32768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32769$as_echo "no" >&6; }
32770fi
32771
32772
32773  test -n "$ac_ct_OBJC" && break
32774done
32775
32776  if test "x$ac_ct_OBJC" = x; then
32777    OBJC="gcc"
32778  else
32779    case $cross_compiling:$ac_tool_warned in
32780yes:)
32781{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32782$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32783ac_tool_warned=yes ;;
32784esac
32785    OBJC=$ac_ct_OBJC
32786  fi
32787fi
32788
32789# Provide some information about the compiler.
32790$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32791set X $ac_compile
32792ac_compiler=$2
32793for ac_option in --version -v -V -qversion; do
32794  { { ac_try="$ac_compiler $ac_option >&5"
32795case "(($ac_try" in
32796  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32797  *) ac_try_echo=$ac_try;;
32798esac
32799eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32800$as_echo "$ac_try_echo"; } >&5
32801  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32802  ac_status=$?
32803  if test -s conftest.err; then
32804    sed '10a\
32805... rest of stderr output deleted ...
32806         10q' conftest.err >conftest.er1
32807    cat conftest.er1 >&5
32808  fi
32809  rm -f conftest.er1 conftest.err
32810  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
32811  test $ac_status = 0; }
32812done
32813
32814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
32815$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
32816if ${ac_cv_objc_compiler_gnu+:} false; then :
32817  $as_echo_n "(cached) " >&6
32818else
32819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32820/* end confdefs.h.  */
32821
32822int
32823main ()
32824{
32825#ifndef __GNUC__
32826       choke me
32827#endif
32828
32829  ;
32830  return 0;
32831}
32832_ACEOF
32833if ac_fn_objc_try_compile "$LINENO"; then :
32834  ac_compiler_gnu=yes
32835else
32836  ac_compiler_gnu=no
32837fi
32838rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32839ac_cv_objc_compiler_gnu=$ac_compiler_gnu
32840
32841fi
32842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
32843$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
32844if test $ac_compiler_gnu = yes; then
32845  GOBJC=yes
32846else
32847  GOBJC=
32848fi
32849ac_test_OBJCFLAGS=${OBJCFLAGS+set}
32850ac_save_OBJCFLAGS=$OBJCFLAGS
32851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
32852$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
32853if ${ac_cv_prog_objc_g+:} false; then :
32854  $as_echo_n "(cached) " >&6
32855else
32856  ac_save_objc_werror_flag=$ac_objc_werror_flag
32857   ac_objc_werror_flag=yes
32858   ac_cv_prog_objc_g=no
32859   OBJCFLAGS="-g"
32860   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32861/* end confdefs.h.  */
32862
32863int
32864main ()
32865{
32866
32867  ;
32868  return 0;
32869}
32870_ACEOF
32871if ac_fn_objc_try_compile "$LINENO"; then :
32872  ac_cv_prog_objc_g=yes
32873else
32874  OBJCFLAGS=""
32875      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32876/* end confdefs.h.  */
32877
32878int
32879main ()
32880{
32881
32882  ;
32883  return 0;
32884}
32885_ACEOF
32886if ac_fn_objc_try_compile "$LINENO"; then :
32887
32888else
32889  ac_objc_werror_flag=$ac_save_objc_werror_flag
32890	 OBJCFLAGS="-g"
32891	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32892/* end confdefs.h.  */
32893
32894int
32895main ()
32896{
32897
32898  ;
32899  return 0;
32900}
32901_ACEOF
32902if ac_fn_objc_try_compile "$LINENO"; then :
32903  ac_cv_prog_objc_g=yes
32904fi
32905rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32906fi
32907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32908fi
32909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32910   ac_objc_werror_flag=$ac_save_objc_werror_flag
32911fi
32912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
32913$as_echo "$ac_cv_prog_objc_g" >&6; }
32914if test "$ac_test_OBJCFLAGS" = set; then
32915  OBJCFLAGS=$ac_save_OBJCFLAGS
32916elif test $ac_cv_prog_objc_g = yes; then
32917  if test "$GOBJC" = yes; then
32918    OBJCFLAGS="-g -O2"
32919  else
32920    OBJCFLAGS="-g"
32921  fi
32922else
32923  if test "$GOBJC" = yes; then
32924    OBJCFLAGS="-O2"
32925  else
32926    OBJCFLAGS=
32927  fi
32928fi
32929ac_ext=cpp
32930ac_cpp='$CXXCPP $CPPFLAGS'
32931ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32932ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32933ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
32934
32935
32936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32937
32938  # First separate the path from the arguments. This will split at the first
32939  # space.
32940  complete="$OBJC"
32941  path="${complete%% *}"
32942  tmp="$complete EOL"
32943  arguments="${tmp#* }"
32944
32945  # Input might be given as Windows format, start by converting to
32946  # unix format.
32947  new_path=`$CYGPATH -u "$path"`
32948
32949  # Now try to locate executable using which
32950  new_path=`$WHICH "$new_path" 2> /dev/null`
32951  # bat and cmd files are not always considered executable in cygwin causing which
32952  # to not find them
32953  if test "x$new_path" = x \
32954      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32955      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32956    new_path=`$CYGPATH -u "$path"`
32957  fi
32958  if test "x$new_path" = x; then
32959    # Oops. Which didn't find the executable.
32960    # The splitting of arguments from the executable at a space might have been incorrect,
32961    # since paths with space are more likely in Windows. Give it another try with the whole
32962    # argument.
32963    path="$complete"
32964    arguments="EOL"
32965    new_path=`$CYGPATH -u "$path"`
32966    new_path=`$WHICH "$new_path" 2> /dev/null`
32967    # bat and cmd files are not always considered executable in cygwin causing which
32968    # to not find them
32969    if test "x$new_path" = x \
32970        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32971        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32972      new_path=`$CYGPATH -u "$path"`
32973    fi
32974    if test "x$new_path" = x; then
32975      # It's still not found. Now this is an unrecoverable error.
32976      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
32977$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
32978      has_space=`$ECHO "$complete" | $GREP " "`
32979      if test "x$has_space" != x; then
32980        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32981$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32982      fi
32983      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
32984    fi
32985  fi
32986
32987  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32988  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32989  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32990  # "foo.exe" is OK but "foo" is an error.
32991  #
32992  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32993  # It is also a way to make sure we got the proper file name for the real test later on.
32994  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32995  if test "x$test_shortpath" = x; then
32996    # Short path failed, file does not exist as specified.
32997    # Try adding .exe or .cmd
32998    if test -f "${new_path}.exe"; then
32999      input_to_shortpath="${new_path}.exe"
33000    elif test -f "${new_path}.cmd"; then
33001      input_to_shortpath="${new_path}.cmd"
33002    else
33003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33004$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33005      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33006$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33007      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33008    fi
33009  else
33010    input_to_shortpath="$new_path"
33011  fi
33012
33013  # Call helper function which possibly converts this using DOS-style short mode.
33014  # If so, the updated path is stored in $new_path.
33015  new_path="$input_to_shortpath"
33016
33017  input_path="$input_to_shortpath"
33018  # Check if we need to convert this using DOS-style short mode. If the path
33019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33020  # take no chances and rewrite it.
33021  # Note: m4 eats our [], so we need to use [ and ] instead.
33022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33023  if test "x$has_forbidden_chars" != x; then
33024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33028      # Going to short mode and back again did indeed matter. Since short mode is
33029      # case insensitive, let's make it lowercase to improve readability.
33030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33031      # Now convert it back to Unix-stile (cygpath)
33032      input_path=`$CYGPATH -u "$shortmode_path"`
33033      new_path="$input_path"
33034    fi
33035  fi
33036
33037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33038  if test "x$test_cygdrive_prefix" = x; then
33039    # As a simple fix, exclude /usr/bin since it's not a real path.
33040    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33042      # a path prefixed by /cygdrive for fixpath to work.
33043      new_path="$CYGWIN_ROOT_PATH$input_path"
33044    fi
33045  fi
33046
33047  # remove trailing .exe if any
33048  new_path="${new_path/%.exe/}"
33049
33050  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33051
33052  # First separate the path from the arguments. This will split at the first
33053  # space.
33054  complete="$OBJC"
33055  path="${complete%% *}"
33056  tmp="$complete EOL"
33057  arguments="${tmp#* }"
33058
33059  # Input might be given as Windows format, start by converting to
33060  # unix format.
33061  new_path="$path"
33062
33063  windows_path="$new_path"
33064  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33065    unix_path=`$CYGPATH -u "$windows_path"`
33066    new_path="$unix_path"
33067  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33068    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33069    new_path="$unix_path"
33070  fi
33071
33072
33073  # Now try to locate executable using which
33074  new_path=`$WHICH "$new_path" 2> /dev/null`
33075
33076  if test "x$new_path" = x; then
33077    # Oops. Which didn't find the executable.
33078    # The splitting of arguments from the executable at a space might have been incorrect,
33079    # since paths with space are more likely in Windows. Give it another try with the whole
33080    # argument.
33081    path="$complete"
33082    arguments="EOL"
33083    new_path="$path"
33084
33085  windows_path="$new_path"
33086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33087    unix_path=`$CYGPATH -u "$windows_path"`
33088    new_path="$unix_path"
33089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33091    new_path="$unix_path"
33092  fi
33093
33094
33095    new_path=`$WHICH "$new_path" 2> /dev/null`
33096
33097    if test "x$new_path" = x; then
33098      # It's still not found. Now this is an unrecoverable error.
33099      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33100$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33101      has_space=`$ECHO "$complete" | $GREP " "`
33102      if test "x$has_space" != x; then
33103        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33104$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33105      fi
33106      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33107    fi
33108  fi
33109
33110  # Now new_path has a complete unix path to the binary
33111  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33112    # Keep paths in /bin as-is, but remove trailing .exe if any
33113    new_path="${new_path/%.exe/}"
33114    # Do not save /bin paths to all_fixpath_prefixes!
33115  else
33116    # Not in mixed or Windows style, start by that.
33117    new_path=`cmd //c echo $new_path`
33118
33119  input_path="$new_path"
33120  # Check if we need to convert this using DOS-style short mode. If the path
33121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33122  # take no chances and rewrite it.
33123  # Note: m4 eats our [], so we need to use [ and ] instead.
33124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33125  if test "x$has_forbidden_chars" != x; then
33126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33128  fi
33129
33130    # Output is in $new_path
33131
33132  windows_path="$new_path"
33133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33134    unix_path=`$CYGPATH -u "$windows_path"`
33135    new_path="$unix_path"
33136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33138    new_path="$unix_path"
33139  fi
33140
33141    # remove trailing .exe if any
33142    new_path="${new_path/%.exe/}"
33143
33144    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33145    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33146  fi
33147
33148  else
33149    # We're on a posix platform. Hooray! :)
33150    # First separate the path from the arguments. This will split at the first
33151    # space.
33152    complete="$OBJC"
33153    path="${complete%% *}"
33154    tmp="$complete EOL"
33155    arguments="${tmp#* }"
33156
33157    # Cannot rely on the command "which" here since it doesn't always work.
33158    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33159    if test -z "$is_absolute_path"; then
33160      # Path to executable is not absolute. Find it.
33161      IFS_save="$IFS"
33162      IFS=:
33163      for p in $PATH; do
33164        if test -f "$p/$path" && test -x "$p/$path"; then
33165          new_path="$p/$path"
33166          break
33167        fi
33168      done
33169      IFS="$IFS_save"
33170    else
33171      # This is an absolute path, we can use it without further modifications.
33172      new_path="$path"
33173    fi
33174
33175    if test "x$new_path" = x; then
33176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33177$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33178      has_space=`$ECHO "$complete" | $GREP " "`
33179      if test "x$has_space" != x; then
33180        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33181$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33182      fi
33183      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33184    fi
33185  fi
33186
33187  # Now join together the path and the arguments once again
33188  if test "x$arguments" != xEOL; then
33189    new_complete="$new_path ${arguments% *}"
33190  else
33191    new_complete="$new_path"
33192  fi
33193
33194  if test "x$complete" != "x$new_complete"; then
33195    OBJC="$new_complete"
33196    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33197$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33198  fi
33199
33200
33201
33202  # Publish this variable in the help.
33203
33204
33205  if test "x$LIPO" = x; then
33206    # The variable is not set by user, try to locate tool using the code snippet
33207    for ac_prog in lipo
33208do
33209  # Extract the first word of "$ac_prog", so it can be a program name with args.
33210set dummy $ac_prog; ac_word=$2
33211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33212$as_echo_n "checking for $ac_word... " >&6; }
33213if ${ac_cv_path_LIPO+:} false; then :
33214  $as_echo_n "(cached) " >&6
33215else
33216  case $LIPO in
33217  [\\/]* | ?:[\\/]*)
33218  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33219  ;;
33220  *)
33221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33222for as_dir in $PATH
33223do
33224  IFS=$as_save_IFS
33225  test -z "$as_dir" && as_dir=.
33226    for ac_exec_ext in '' $ac_executable_extensions; do
33227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33228    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33230    break 2
33231  fi
33232done
33233  done
33234IFS=$as_save_IFS
33235
33236  ;;
33237esac
33238fi
33239LIPO=$ac_cv_path_LIPO
33240if test -n "$LIPO"; then
33241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33242$as_echo "$LIPO" >&6; }
33243else
33244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33245$as_echo "no" >&6; }
33246fi
33247
33248
33249  test -n "$LIPO" && break
33250done
33251
33252  else
33253    # The variable is set, but is it from the command line or the environment?
33254
33255    # Try to remove the string !LIPO! from our list.
33256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33258      # If it failed, the variable was not from the command line. Ignore it,
33259      # but warn the user (except for BASH, which is always set by the calling BASH).
33260      if test "xLIPO" != xBASH; then
33261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33262$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33263      fi
33264      # Try to locate tool using the code snippet
33265      for ac_prog in lipo
33266do
33267  # Extract the first word of "$ac_prog", so it can be a program name with args.
33268set dummy $ac_prog; ac_word=$2
33269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33270$as_echo_n "checking for $ac_word... " >&6; }
33271if ${ac_cv_path_LIPO+:} false; then :
33272  $as_echo_n "(cached) " >&6
33273else
33274  case $LIPO in
33275  [\\/]* | ?:[\\/]*)
33276  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33277  ;;
33278  *)
33279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33280for as_dir in $PATH
33281do
33282  IFS=$as_save_IFS
33283  test -z "$as_dir" && as_dir=.
33284    for ac_exec_ext in '' $ac_executable_extensions; do
33285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33286    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33288    break 2
33289  fi
33290done
33291  done
33292IFS=$as_save_IFS
33293
33294  ;;
33295esac
33296fi
33297LIPO=$ac_cv_path_LIPO
33298if test -n "$LIPO"; then
33299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33300$as_echo "$LIPO" >&6; }
33301else
33302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33303$as_echo "no" >&6; }
33304fi
33305
33306
33307  test -n "$LIPO" && break
33308done
33309
33310    else
33311      # If it succeeded, then it was overridden by the user. We will use it
33312      # for the tool.
33313
33314      # First remove it from the list of overridden variables, so we can test
33315      # for unknown variables in the end.
33316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33317
33318      # Check if the provided tool contains a complete path.
33319      tool_specified="$LIPO"
33320      tool_basename="${tool_specified##*/}"
33321      if test "x$tool_basename" = "x$tool_specified"; then
33322        # A command without a complete path is provided, search $PATH.
33323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33324$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33325        # Extract the first word of "$tool_basename", so it can be a program name with args.
33326set dummy $tool_basename; ac_word=$2
33327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33328$as_echo_n "checking for $ac_word... " >&6; }
33329if ${ac_cv_path_LIPO+:} false; then :
33330  $as_echo_n "(cached) " >&6
33331else
33332  case $LIPO in
33333  [\\/]* | ?:[\\/]*)
33334  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33335  ;;
33336  *)
33337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33338for as_dir in $PATH
33339do
33340  IFS=$as_save_IFS
33341  test -z "$as_dir" && as_dir=.
33342    for ac_exec_ext in '' $ac_executable_extensions; do
33343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33344    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33346    break 2
33347  fi
33348done
33349  done
33350IFS=$as_save_IFS
33351
33352  ;;
33353esac
33354fi
33355LIPO=$ac_cv_path_LIPO
33356if test -n "$LIPO"; then
33357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33358$as_echo "$LIPO" >&6; }
33359else
33360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33361$as_echo "no" >&6; }
33362fi
33363
33364
33365        if test "x$LIPO" = x; then
33366          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33367        fi
33368      else
33369        # Otherwise we believe it is a complete path. Use it as it is.
33370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33371$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33373$as_echo_n "checking for LIPO... " >&6; }
33374        if test ! -x "$tool_specified"; then
33375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33376$as_echo "not found" >&6; }
33377          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33378        fi
33379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33380$as_echo "$tool_specified" >&6; }
33381      fi
33382    fi
33383  fi
33384
33385
33386
33387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33388
33389  # First separate the path from the arguments. This will split at the first
33390  # space.
33391  complete="$LIPO"
33392  path="${complete%% *}"
33393  tmp="$complete EOL"
33394  arguments="${tmp#* }"
33395
33396  # Input might be given as Windows format, start by converting to
33397  # unix format.
33398  new_path=`$CYGPATH -u "$path"`
33399
33400  # Now try to locate executable using which
33401  new_path=`$WHICH "$new_path" 2> /dev/null`
33402  # bat and cmd files are not always considered executable in cygwin causing which
33403  # to not find them
33404  if test "x$new_path" = x \
33405      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33406      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33407    new_path=`$CYGPATH -u "$path"`
33408  fi
33409  if test "x$new_path" = x; then
33410    # Oops. Which didn't find the executable.
33411    # The splitting of arguments from the executable at a space might have been incorrect,
33412    # since paths with space are more likely in Windows. Give it another try with the whole
33413    # argument.
33414    path="$complete"
33415    arguments="EOL"
33416    new_path=`$CYGPATH -u "$path"`
33417    new_path=`$WHICH "$new_path" 2> /dev/null`
33418    # bat and cmd files are not always considered executable in cygwin causing which
33419    # to not find them
33420    if test "x$new_path" = x \
33421        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33422        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33423      new_path=`$CYGPATH -u "$path"`
33424    fi
33425    if test "x$new_path" = x; then
33426      # It's still not found. Now this is an unrecoverable error.
33427      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33428$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33429      has_space=`$ECHO "$complete" | $GREP " "`
33430      if test "x$has_space" != x; then
33431        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33432$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33433      fi
33434      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33435    fi
33436  fi
33437
33438  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33439  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33440  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33441  # "foo.exe" is OK but "foo" is an error.
33442  #
33443  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33444  # It is also a way to make sure we got the proper file name for the real test later on.
33445  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33446  if test "x$test_shortpath" = x; then
33447    # Short path failed, file does not exist as specified.
33448    # Try adding .exe or .cmd
33449    if test -f "${new_path}.exe"; then
33450      input_to_shortpath="${new_path}.exe"
33451    elif test -f "${new_path}.cmd"; then
33452      input_to_shortpath="${new_path}.cmd"
33453    else
33454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33455$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33456      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33457$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33458      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33459    fi
33460  else
33461    input_to_shortpath="$new_path"
33462  fi
33463
33464  # Call helper function which possibly converts this using DOS-style short mode.
33465  # If so, the updated path is stored in $new_path.
33466  new_path="$input_to_shortpath"
33467
33468  input_path="$input_to_shortpath"
33469  # Check if we need to convert this using DOS-style short mode. If the path
33470  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33471  # take no chances and rewrite it.
33472  # Note: m4 eats our [], so we need to use [ and ] instead.
33473  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33474  if test "x$has_forbidden_chars" != x; then
33475    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33476    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33477    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33478    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33479      # Going to short mode and back again did indeed matter. Since short mode is
33480      # case insensitive, let's make it lowercase to improve readability.
33481      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33482      # Now convert it back to Unix-stile (cygpath)
33483      input_path=`$CYGPATH -u "$shortmode_path"`
33484      new_path="$input_path"
33485    fi
33486  fi
33487
33488  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33489  if test "x$test_cygdrive_prefix" = x; then
33490    # As a simple fix, exclude /usr/bin since it's not a real path.
33491    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33492      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33493      # a path prefixed by /cygdrive for fixpath to work.
33494      new_path="$CYGWIN_ROOT_PATH$input_path"
33495    fi
33496  fi
33497
33498  # remove trailing .exe if any
33499  new_path="${new_path/%.exe/}"
33500
33501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33502
33503  # First separate the path from the arguments. This will split at the first
33504  # space.
33505  complete="$LIPO"
33506  path="${complete%% *}"
33507  tmp="$complete EOL"
33508  arguments="${tmp#* }"
33509
33510  # Input might be given as Windows format, start by converting to
33511  # unix format.
33512  new_path="$path"
33513
33514  windows_path="$new_path"
33515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33516    unix_path=`$CYGPATH -u "$windows_path"`
33517    new_path="$unix_path"
33518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33520    new_path="$unix_path"
33521  fi
33522
33523
33524  # Now try to locate executable using which
33525  new_path=`$WHICH "$new_path" 2> /dev/null`
33526
33527  if test "x$new_path" = x; then
33528    # Oops. Which didn't find the executable.
33529    # The splitting of arguments from the executable at a space might have been incorrect,
33530    # since paths with space are more likely in Windows. Give it another try with the whole
33531    # argument.
33532    path="$complete"
33533    arguments="EOL"
33534    new_path="$path"
33535
33536  windows_path="$new_path"
33537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33538    unix_path=`$CYGPATH -u "$windows_path"`
33539    new_path="$unix_path"
33540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33541    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33542    new_path="$unix_path"
33543  fi
33544
33545
33546    new_path=`$WHICH "$new_path" 2> /dev/null`
33547
33548    if test "x$new_path" = x; then
33549      # It's still not found. Now this is an unrecoverable error.
33550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33551$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33552      has_space=`$ECHO "$complete" | $GREP " "`
33553      if test "x$has_space" != x; then
33554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33556      fi
33557      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33558    fi
33559  fi
33560
33561  # Now new_path has a complete unix path to the binary
33562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33563    # Keep paths in /bin as-is, but remove trailing .exe if any
33564    new_path="${new_path/%.exe/}"
33565    # Do not save /bin paths to all_fixpath_prefixes!
33566  else
33567    # Not in mixed or Windows style, start by that.
33568    new_path=`cmd //c echo $new_path`
33569
33570  input_path="$new_path"
33571  # Check if we need to convert this using DOS-style short mode. If the path
33572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33573  # take no chances and rewrite it.
33574  # Note: m4 eats our [], so we need to use [ and ] instead.
33575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33576  if test "x$has_forbidden_chars" != x; then
33577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33579  fi
33580
33581    # Output is in $new_path
33582
33583  windows_path="$new_path"
33584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33585    unix_path=`$CYGPATH -u "$windows_path"`
33586    new_path="$unix_path"
33587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33589    new_path="$unix_path"
33590  fi
33591
33592    # remove trailing .exe if any
33593    new_path="${new_path/%.exe/}"
33594
33595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33597  fi
33598
33599  else
33600    # We're on a posix platform. Hooray! :)
33601    # First separate the path from the arguments. This will split at the first
33602    # space.
33603    complete="$LIPO"
33604    path="${complete%% *}"
33605    tmp="$complete EOL"
33606    arguments="${tmp#* }"
33607
33608    # Cannot rely on the command "which" here since it doesn't always work.
33609    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33610    if test -z "$is_absolute_path"; then
33611      # Path to executable is not absolute. Find it.
33612      IFS_save="$IFS"
33613      IFS=:
33614      for p in $PATH; do
33615        if test -f "$p/$path" && test -x "$p/$path"; then
33616          new_path="$p/$path"
33617          break
33618        fi
33619      done
33620      IFS="$IFS_save"
33621    else
33622      # This is an absolute path, we can use it without further modifications.
33623      new_path="$path"
33624    fi
33625
33626    if test "x$new_path" = x; then
33627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33628$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33629      has_space=`$ECHO "$complete" | $GREP " "`
33630      if test "x$has_space" != x; then
33631        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33633      fi
33634      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33635    fi
33636  fi
33637
33638  # Now join together the path and the arguments once again
33639  if test "x$arguments" != xEOL; then
33640    new_complete="$new_path ${arguments% *}"
33641  else
33642    new_complete="$new_path"
33643  fi
33644
33645  if test "x$complete" != "x$new_complete"; then
33646    LIPO="$new_complete"
33647    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33648$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33649  fi
33650
33651  else
33652    OBJC=
33653  fi
33654
33655  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33656    # Extract the first word of "mt", so it can be a program name with args.
33657set dummy mt; ac_word=$2
33658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33659$as_echo_n "checking for $ac_word... " >&6; }
33660if ${ac_cv_prog_MT+:} false; then :
33661  $as_echo_n "(cached) " >&6
33662else
33663  if test -n "$MT"; then
33664  ac_cv_prog_MT="$MT" # Let the user override the test.
33665else
33666  ac_prog_rejected=no
33667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33668for as_dir in $PATH
33669do
33670  IFS=$as_save_IFS
33671  test -z "$as_dir" && as_dir=.
33672    for ac_exec_ext in '' $ac_executable_extensions; do
33673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33674    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33675       ac_prog_rejected=yes
33676       continue
33677     fi
33678    ac_cv_prog_MT="mt"
33679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33680    break 2
33681  fi
33682done
33683  done
33684IFS=$as_save_IFS
33685
33686if test $ac_prog_rejected = yes; then
33687  # We found a bogon in the path, so make sure we never use it.
33688  set dummy $ac_cv_prog_MT
33689  shift
33690  if test $# != 0; then
33691    # We chose a different compiler from the bogus one.
33692    # However, it has the same basename, so the bogon will be chosen
33693    # first if we set MT to just the basename; use the full file name.
33694    shift
33695    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33696  fi
33697fi
33698fi
33699fi
33700MT=$ac_cv_prog_MT
33701if test -n "$MT"; then
33702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33703$as_echo "$MT" >&6; }
33704else
33705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33706$as_echo "no" >&6; }
33707fi
33708
33709
33710
33711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33712
33713  # First separate the path from the arguments. This will split at the first
33714  # space.
33715  complete="$MT"
33716  path="${complete%% *}"
33717  tmp="$complete EOL"
33718  arguments="${tmp#* }"
33719
33720  # Input might be given as Windows format, start by converting to
33721  # unix format.
33722  new_path=`$CYGPATH -u "$path"`
33723
33724  # Now try to locate executable using which
33725  new_path=`$WHICH "$new_path" 2> /dev/null`
33726  # bat and cmd files are not always considered executable in cygwin causing which
33727  # to not find them
33728  if test "x$new_path" = x \
33729      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33730      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33731    new_path=`$CYGPATH -u "$path"`
33732  fi
33733  if test "x$new_path" = x; then
33734    # Oops. Which didn't find the executable.
33735    # The splitting of arguments from the executable at a space might have been incorrect,
33736    # since paths with space are more likely in Windows. Give it another try with the whole
33737    # argument.
33738    path="$complete"
33739    arguments="EOL"
33740    new_path=`$CYGPATH -u "$path"`
33741    new_path=`$WHICH "$new_path" 2> /dev/null`
33742    # bat and cmd files are not always considered executable in cygwin causing which
33743    # to not find them
33744    if test "x$new_path" = x \
33745        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33746        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33747      new_path=`$CYGPATH -u "$path"`
33748    fi
33749    if test "x$new_path" = x; then
33750      # It's still not found. Now this is an unrecoverable error.
33751      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33752$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33753      has_space=`$ECHO "$complete" | $GREP " "`
33754      if test "x$has_space" != x; then
33755        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33756$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33757      fi
33758      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33759    fi
33760  fi
33761
33762  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33763  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33764  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33765  # "foo.exe" is OK but "foo" is an error.
33766  #
33767  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33768  # It is also a way to make sure we got the proper file name for the real test later on.
33769  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33770  if test "x$test_shortpath" = x; then
33771    # Short path failed, file does not exist as specified.
33772    # Try adding .exe or .cmd
33773    if test -f "${new_path}.exe"; then
33774      input_to_shortpath="${new_path}.exe"
33775    elif test -f "${new_path}.cmd"; then
33776      input_to_shortpath="${new_path}.cmd"
33777    else
33778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33779$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33780      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33781$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33782      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33783    fi
33784  else
33785    input_to_shortpath="$new_path"
33786  fi
33787
33788  # Call helper function which possibly converts this using DOS-style short mode.
33789  # If so, the updated path is stored in $new_path.
33790  new_path="$input_to_shortpath"
33791
33792  input_path="$input_to_shortpath"
33793  # Check if we need to convert this using DOS-style short mode. If the path
33794  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33795  # take no chances and rewrite it.
33796  # Note: m4 eats our [], so we need to use [ and ] instead.
33797  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33798  if test "x$has_forbidden_chars" != x; then
33799    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33800    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33801    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33802    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33803      # Going to short mode and back again did indeed matter. Since short mode is
33804      # case insensitive, let's make it lowercase to improve readability.
33805      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33806      # Now convert it back to Unix-stile (cygpath)
33807      input_path=`$CYGPATH -u "$shortmode_path"`
33808      new_path="$input_path"
33809    fi
33810  fi
33811
33812  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33813  if test "x$test_cygdrive_prefix" = x; then
33814    # As a simple fix, exclude /usr/bin since it's not a real path.
33815    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33816      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33817      # a path prefixed by /cygdrive for fixpath to work.
33818      new_path="$CYGWIN_ROOT_PATH$input_path"
33819    fi
33820  fi
33821
33822  # remove trailing .exe if any
33823  new_path="${new_path/%.exe/}"
33824
33825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33826
33827  # First separate the path from the arguments. This will split at the first
33828  # space.
33829  complete="$MT"
33830  path="${complete%% *}"
33831  tmp="$complete EOL"
33832  arguments="${tmp#* }"
33833
33834  # Input might be given as Windows format, start by converting to
33835  # unix format.
33836  new_path="$path"
33837
33838  windows_path="$new_path"
33839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33840    unix_path=`$CYGPATH -u "$windows_path"`
33841    new_path="$unix_path"
33842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33844    new_path="$unix_path"
33845  fi
33846
33847
33848  # Now try to locate executable using which
33849  new_path=`$WHICH "$new_path" 2> /dev/null`
33850
33851  if test "x$new_path" = x; then
33852    # Oops. Which didn't find the executable.
33853    # The splitting of arguments from the executable at a space might have been incorrect,
33854    # since paths with space are more likely in Windows. Give it another try with the whole
33855    # argument.
33856    path="$complete"
33857    arguments="EOL"
33858    new_path="$path"
33859
33860  windows_path="$new_path"
33861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33862    unix_path=`$CYGPATH -u "$windows_path"`
33863    new_path="$unix_path"
33864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33866    new_path="$unix_path"
33867  fi
33868
33869
33870    new_path=`$WHICH "$new_path" 2> /dev/null`
33871
33872    if test "x$new_path" = x; then
33873      # It's still not found. Now this is an unrecoverable error.
33874      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33875$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33876      has_space=`$ECHO "$complete" | $GREP " "`
33877      if test "x$has_space" != x; then
33878        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33879$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33880      fi
33881      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33882    fi
33883  fi
33884
33885  # Now new_path has a complete unix path to the binary
33886  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33887    # Keep paths in /bin as-is, but remove trailing .exe if any
33888    new_path="${new_path/%.exe/}"
33889    # Do not save /bin paths to all_fixpath_prefixes!
33890  else
33891    # Not in mixed or Windows style, start by that.
33892    new_path=`cmd //c echo $new_path`
33893
33894  input_path="$new_path"
33895  # Check if we need to convert this using DOS-style short mode. If the path
33896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33897  # take no chances and rewrite it.
33898  # Note: m4 eats our [], so we need to use [ and ] instead.
33899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33900  if test "x$has_forbidden_chars" != x; then
33901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33903  fi
33904
33905    # Output is in $new_path
33906
33907  windows_path="$new_path"
33908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33909    unix_path=`$CYGPATH -u "$windows_path"`
33910    new_path="$unix_path"
33911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33913    new_path="$unix_path"
33914  fi
33915
33916    # remove trailing .exe if any
33917    new_path="${new_path/%.exe/}"
33918
33919    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33920    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33921  fi
33922
33923  else
33924    # We're on a posix platform. Hooray! :)
33925    # First separate the path from the arguments. This will split at the first
33926    # space.
33927    complete="$MT"
33928    path="${complete%% *}"
33929    tmp="$complete EOL"
33930    arguments="${tmp#* }"
33931
33932    # Cannot rely on the command "which" here since it doesn't always work.
33933    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33934    if test -z "$is_absolute_path"; then
33935      # Path to executable is not absolute. Find it.
33936      IFS_save="$IFS"
33937      IFS=:
33938      for p in $PATH; do
33939        if test -f "$p/$path" && test -x "$p/$path"; then
33940          new_path="$p/$path"
33941          break
33942        fi
33943      done
33944      IFS="$IFS_save"
33945    else
33946      # This is an absolute path, we can use it without further modifications.
33947      new_path="$path"
33948    fi
33949
33950    if test "x$new_path" = x; then
33951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33952$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33953      has_space=`$ECHO "$complete" | $GREP " "`
33954      if test "x$has_space" != x; then
33955        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33956$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33957      fi
33958      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33959    fi
33960  fi
33961
33962  # Now join together the path and the arguments once again
33963  if test "x$arguments" != xEOL; then
33964    new_complete="$new_path ${arguments% *}"
33965  else
33966    new_complete="$new_path"
33967  fi
33968
33969  if test "x$complete" != "x$new_complete"; then
33970    MT="$new_complete"
33971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
33972$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
33973  fi
33974
33975    # Setup the resource compiler (RC)
33976    # Extract the first word of "rc", so it can be a program name with args.
33977set dummy rc; ac_word=$2
33978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33979$as_echo_n "checking for $ac_word... " >&6; }
33980if ${ac_cv_prog_RC+:} false; then :
33981  $as_echo_n "(cached) " >&6
33982else
33983  if test -n "$RC"; then
33984  ac_cv_prog_RC="$RC" # Let the user override the test.
33985else
33986  ac_prog_rejected=no
33987as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33988for as_dir in $PATH
33989do
33990  IFS=$as_save_IFS
33991  test -z "$as_dir" && as_dir=.
33992    for ac_exec_ext in '' $ac_executable_extensions; do
33993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33994    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
33995       ac_prog_rejected=yes
33996       continue
33997     fi
33998    ac_cv_prog_RC="rc"
33999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34000    break 2
34001  fi
34002done
34003  done
34004IFS=$as_save_IFS
34005
34006if test $ac_prog_rejected = yes; then
34007  # We found a bogon in the path, so make sure we never use it.
34008  set dummy $ac_cv_prog_RC
34009  shift
34010  if test $# != 0; then
34011    # We chose a different compiler from the bogus one.
34012    # However, it has the same basename, so the bogon will be chosen
34013    # first if we set RC to just the basename; use the full file name.
34014    shift
34015    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34016  fi
34017fi
34018fi
34019fi
34020RC=$ac_cv_prog_RC
34021if test -n "$RC"; then
34022  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34023$as_echo "$RC" >&6; }
34024else
34025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34026$as_echo "no" >&6; }
34027fi
34028
34029
34030
34031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34032
34033  # First separate the path from the arguments. This will split at the first
34034  # space.
34035  complete="$RC"
34036  path="${complete%% *}"
34037  tmp="$complete EOL"
34038  arguments="${tmp#* }"
34039
34040  # Input might be given as Windows format, start by converting to
34041  # unix format.
34042  new_path=`$CYGPATH -u "$path"`
34043
34044  # Now try to locate executable using which
34045  new_path=`$WHICH "$new_path" 2> /dev/null`
34046  # bat and cmd files are not always considered executable in cygwin causing which
34047  # to not find them
34048  if test "x$new_path" = x \
34049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34051    new_path=`$CYGPATH -u "$path"`
34052  fi
34053  if test "x$new_path" = x; then
34054    # Oops. Which didn't find the executable.
34055    # The splitting of arguments from the executable at a space might have been incorrect,
34056    # since paths with space are more likely in Windows. Give it another try with the whole
34057    # argument.
34058    path="$complete"
34059    arguments="EOL"
34060    new_path=`$CYGPATH -u "$path"`
34061    new_path=`$WHICH "$new_path" 2> /dev/null`
34062    # bat and cmd files are not always considered executable in cygwin causing which
34063    # to not find them
34064    if test "x$new_path" = x \
34065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34067      new_path=`$CYGPATH -u "$path"`
34068    fi
34069    if test "x$new_path" = x; then
34070      # It's still not found. Now this is an unrecoverable error.
34071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34072$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34073      has_space=`$ECHO "$complete" | $GREP " "`
34074      if test "x$has_space" != x; then
34075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34077      fi
34078      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34079    fi
34080  fi
34081
34082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34085  # "foo.exe" is OK but "foo" is an error.
34086  #
34087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34088  # It is also a way to make sure we got the proper file name for the real test later on.
34089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34090  if test "x$test_shortpath" = x; then
34091    # Short path failed, file does not exist as specified.
34092    # Try adding .exe or .cmd
34093    if test -f "${new_path}.exe"; then
34094      input_to_shortpath="${new_path}.exe"
34095    elif test -f "${new_path}.cmd"; then
34096      input_to_shortpath="${new_path}.cmd"
34097    else
34098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34099$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34102      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34103    fi
34104  else
34105    input_to_shortpath="$new_path"
34106  fi
34107
34108  # Call helper function which possibly converts this using DOS-style short mode.
34109  # If so, the updated path is stored in $new_path.
34110  new_path="$input_to_shortpath"
34111
34112  input_path="$input_to_shortpath"
34113  # Check if we need to convert this using DOS-style short mode. If the path
34114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34115  # take no chances and rewrite it.
34116  # Note: m4 eats our [], so we need to use [ and ] instead.
34117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34118  if test "x$has_forbidden_chars" != x; then
34119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34123      # Going to short mode and back again did indeed matter. Since short mode is
34124      # case insensitive, let's make it lowercase to improve readability.
34125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34126      # Now convert it back to Unix-stile (cygpath)
34127      input_path=`$CYGPATH -u "$shortmode_path"`
34128      new_path="$input_path"
34129    fi
34130  fi
34131
34132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34133  if test "x$test_cygdrive_prefix" = x; then
34134    # As a simple fix, exclude /usr/bin since it's not a real path.
34135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34137      # a path prefixed by /cygdrive for fixpath to work.
34138      new_path="$CYGWIN_ROOT_PATH$input_path"
34139    fi
34140  fi
34141
34142  # remove trailing .exe if any
34143  new_path="${new_path/%.exe/}"
34144
34145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34146
34147  # First separate the path from the arguments. This will split at the first
34148  # space.
34149  complete="$RC"
34150  path="${complete%% *}"
34151  tmp="$complete EOL"
34152  arguments="${tmp#* }"
34153
34154  # Input might be given as Windows format, start by converting to
34155  # unix format.
34156  new_path="$path"
34157
34158  windows_path="$new_path"
34159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34160    unix_path=`$CYGPATH -u "$windows_path"`
34161    new_path="$unix_path"
34162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34164    new_path="$unix_path"
34165  fi
34166
34167
34168  # Now try to locate executable using which
34169  new_path=`$WHICH "$new_path" 2> /dev/null`
34170
34171  if test "x$new_path" = x; then
34172    # Oops. Which didn't find the executable.
34173    # The splitting of arguments from the executable at a space might have been incorrect,
34174    # since paths with space are more likely in Windows. Give it another try with the whole
34175    # argument.
34176    path="$complete"
34177    arguments="EOL"
34178    new_path="$path"
34179
34180  windows_path="$new_path"
34181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34182    unix_path=`$CYGPATH -u "$windows_path"`
34183    new_path="$unix_path"
34184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34186    new_path="$unix_path"
34187  fi
34188
34189
34190    new_path=`$WHICH "$new_path" 2> /dev/null`
34191
34192    if test "x$new_path" = x; then
34193      # It's still not found. Now this is an unrecoverable error.
34194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34195$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34196      has_space=`$ECHO "$complete" | $GREP " "`
34197      if test "x$has_space" != x; then
34198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34200      fi
34201      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34202    fi
34203  fi
34204
34205  # Now new_path has a complete unix path to the binary
34206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34207    # Keep paths in /bin as-is, but remove trailing .exe if any
34208    new_path="${new_path/%.exe/}"
34209    # Do not save /bin paths to all_fixpath_prefixes!
34210  else
34211    # Not in mixed or Windows style, start by that.
34212    new_path=`cmd //c echo $new_path`
34213
34214  input_path="$new_path"
34215  # Check if we need to convert this using DOS-style short mode. If the path
34216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34217  # take no chances and rewrite it.
34218  # Note: m4 eats our [], so we need to use [ and ] instead.
34219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34220  if test "x$has_forbidden_chars" != x; then
34221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34223  fi
34224
34225    # Output is in $new_path
34226
34227  windows_path="$new_path"
34228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34229    unix_path=`$CYGPATH -u "$windows_path"`
34230    new_path="$unix_path"
34231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34233    new_path="$unix_path"
34234  fi
34235
34236    # remove trailing .exe if any
34237    new_path="${new_path/%.exe/}"
34238
34239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34241  fi
34242
34243  else
34244    # We're on a posix platform. Hooray! :)
34245    # First separate the path from the arguments. This will split at the first
34246    # space.
34247    complete="$RC"
34248    path="${complete%% *}"
34249    tmp="$complete EOL"
34250    arguments="${tmp#* }"
34251
34252    # Cannot rely on the command "which" here since it doesn't always work.
34253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34254    if test -z "$is_absolute_path"; then
34255      # Path to executable is not absolute. Find it.
34256      IFS_save="$IFS"
34257      IFS=:
34258      for p in $PATH; do
34259        if test -f "$p/$path" && test -x "$p/$path"; then
34260          new_path="$p/$path"
34261          break
34262        fi
34263      done
34264      IFS="$IFS_save"
34265    else
34266      # This is an absolute path, we can use it without further modifications.
34267      new_path="$path"
34268    fi
34269
34270    if test "x$new_path" = x; then
34271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34272$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34273      has_space=`$ECHO "$complete" | $GREP " "`
34274      if test "x$has_space" != x; then
34275        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34277      fi
34278      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34279    fi
34280  fi
34281
34282  # Now join together the path and the arguments once again
34283  if test "x$arguments" != xEOL; then
34284    new_complete="$new_path ${arguments% *}"
34285  else
34286    new_complete="$new_path"
34287  fi
34288
34289  if test "x$complete" != "x$new_complete"; then
34290    RC="$new_complete"
34291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34292$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34293  fi
34294
34295    # Extract the first word of "dumpbin", so it can be a program name with args.
34296set dummy dumpbin; ac_word=$2
34297{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34298$as_echo_n "checking for $ac_word... " >&6; }
34299if ${ac_cv_prog_DUMPBIN+:} false; then :
34300  $as_echo_n "(cached) " >&6
34301else
34302  if test -n "$DUMPBIN"; then
34303  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34304else
34305as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34306for as_dir in $PATH
34307do
34308  IFS=$as_save_IFS
34309  test -z "$as_dir" && as_dir=.
34310    for ac_exec_ext in '' $ac_executable_extensions; do
34311  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34312    ac_cv_prog_DUMPBIN="dumpbin"
34313    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34314    break 2
34315  fi
34316done
34317  done
34318IFS=$as_save_IFS
34319
34320fi
34321fi
34322DUMPBIN=$ac_cv_prog_DUMPBIN
34323if test -n "$DUMPBIN"; then
34324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34325$as_echo "$DUMPBIN" >&6; }
34326else
34327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34328$as_echo "no" >&6; }
34329fi
34330
34331
34332
34333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34334
34335  # First separate the path from the arguments. This will split at the first
34336  # space.
34337  complete="$DUMPBIN"
34338  path="${complete%% *}"
34339  tmp="$complete EOL"
34340  arguments="${tmp#* }"
34341
34342  # Input might be given as Windows format, start by converting to
34343  # unix format.
34344  new_path=`$CYGPATH -u "$path"`
34345
34346  # Now try to locate executable using which
34347  new_path=`$WHICH "$new_path" 2> /dev/null`
34348  # bat and cmd files are not always considered executable in cygwin causing which
34349  # to not find them
34350  if test "x$new_path" = x \
34351      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34352      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34353    new_path=`$CYGPATH -u "$path"`
34354  fi
34355  if test "x$new_path" = x; then
34356    # Oops. Which didn't find the executable.
34357    # The splitting of arguments from the executable at a space might have been incorrect,
34358    # since paths with space are more likely in Windows. Give it another try with the whole
34359    # argument.
34360    path="$complete"
34361    arguments="EOL"
34362    new_path=`$CYGPATH -u "$path"`
34363    new_path=`$WHICH "$new_path" 2> /dev/null`
34364    # bat and cmd files are not always considered executable in cygwin causing which
34365    # to not find them
34366    if test "x$new_path" = x \
34367        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34368        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34369      new_path=`$CYGPATH -u "$path"`
34370    fi
34371    if test "x$new_path" = x; then
34372      # It's still not found. Now this is an unrecoverable error.
34373      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34374$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34375      has_space=`$ECHO "$complete" | $GREP " "`
34376      if test "x$has_space" != x; then
34377        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34378$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34379      fi
34380      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34381    fi
34382  fi
34383
34384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34387  # "foo.exe" is OK but "foo" is an error.
34388  #
34389  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34390  # It is also a way to make sure we got the proper file name for the real test later on.
34391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34392  if test "x$test_shortpath" = x; then
34393    # Short path failed, file does not exist as specified.
34394    # Try adding .exe or .cmd
34395    if test -f "${new_path}.exe"; then
34396      input_to_shortpath="${new_path}.exe"
34397    elif test -f "${new_path}.cmd"; then
34398      input_to_shortpath="${new_path}.cmd"
34399    else
34400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34401$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34402      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34403$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34404      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34405    fi
34406  else
34407    input_to_shortpath="$new_path"
34408  fi
34409
34410  # Call helper function which possibly converts this using DOS-style short mode.
34411  # If so, the updated path is stored in $new_path.
34412  new_path="$input_to_shortpath"
34413
34414  input_path="$input_to_shortpath"
34415  # Check if we need to convert this using DOS-style short mode. If the path
34416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34417  # take no chances and rewrite it.
34418  # Note: m4 eats our [], so we need to use [ and ] instead.
34419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34420  if test "x$has_forbidden_chars" != x; then
34421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34422    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34423    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34424    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34425      # Going to short mode and back again did indeed matter. Since short mode is
34426      # case insensitive, let's make it lowercase to improve readability.
34427      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34428      # Now convert it back to Unix-stile (cygpath)
34429      input_path=`$CYGPATH -u "$shortmode_path"`
34430      new_path="$input_path"
34431    fi
34432  fi
34433
34434  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34435  if test "x$test_cygdrive_prefix" = x; then
34436    # As a simple fix, exclude /usr/bin since it's not a real path.
34437    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34438      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34439      # a path prefixed by /cygdrive for fixpath to work.
34440      new_path="$CYGWIN_ROOT_PATH$input_path"
34441    fi
34442  fi
34443
34444  # remove trailing .exe if any
34445  new_path="${new_path/%.exe/}"
34446
34447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34448
34449  # First separate the path from the arguments. This will split at the first
34450  # space.
34451  complete="$DUMPBIN"
34452  path="${complete%% *}"
34453  tmp="$complete EOL"
34454  arguments="${tmp#* }"
34455
34456  # Input might be given as Windows format, start by converting to
34457  # unix format.
34458  new_path="$path"
34459
34460  windows_path="$new_path"
34461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34462    unix_path=`$CYGPATH -u "$windows_path"`
34463    new_path="$unix_path"
34464  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34465    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34466    new_path="$unix_path"
34467  fi
34468
34469
34470  # Now try to locate executable using which
34471  new_path=`$WHICH "$new_path" 2> /dev/null`
34472
34473  if test "x$new_path" = x; then
34474    # Oops. Which didn't find the executable.
34475    # The splitting of arguments from the executable at a space might have been incorrect,
34476    # since paths with space are more likely in Windows. Give it another try with the whole
34477    # argument.
34478    path="$complete"
34479    arguments="EOL"
34480    new_path="$path"
34481
34482  windows_path="$new_path"
34483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34484    unix_path=`$CYGPATH -u "$windows_path"`
34485    new_path="$unix_path"
34486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34488    new_path="$unix_path"
34489  fi
34490
34491
34492    new_path=`$WHICH "$new_path" 2> /dev/null`
34493
34494    if test "x$new_path" = x; then
34495      # It's still not found. Now this is an unrecoverable error.
34496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34497$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34498      has_space=`$ECHO "$complete" | $GREP " "`
34499      if test "x$has_space" != x; then
34500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34502      fi
34503      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34504    fi
34505  fi
34506
34507  # Now new_path has a complete unix path to the binary
34508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34509    # Keep paths in /bin as-is, but remove trailing .exe if any
34510    new_path="${new_path/%.exe/}"
34511    # Do not save /bin paths to all_fixpath_prefixes!
34512  else
34513    # Not in mixed or Windows style, start by that.
34514    new_path=`cmd //c echo $new_path`
34515
34516  input_path="$new_path"
34517  # Check if we need to convert this using DOS-style short mode. If the path
34518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34519  # take no chances and rewrite it.
34520  # Note: m4 eats our [], so we need to use [ and ] instead.
34521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34522  if test "x$has_forbidden_chars" != x; then
34523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34525  fi
34526
34527    # Output is in $new_path
34528
34529  windows_path="$new_path"
34530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34531    unix_path=`$CYGPATH -u "$windows_path"`
34532    new_path="$unix_path"
34533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34535    new_path="$unix_path"
34536  fi
34537
34538    # remove trailing .exe if any
34539    new_path="${new_path/%.exe/}"
34540
34541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34543  fi
34544
34545  else
34546    # We're on a posix platform. Hooray! :)
34547    # First separate the path from the arguments. This will split at the first
34548    # space.
34549    complete="$DUMPBIN"
34550    path="${complete%% *}"
34551    tmp="$complete EOL"
34552    arguments="${tmp#* }"
34553
34554    # Cannot rely on the command "which" here since it doesn't always work.
34555    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34556    if test -z "$is_absolute_path"; then
34557      # Path to executable is not absolute. Find it.
34558      IFS_save="$IFS"
34559      IFS=:
34560      for p in $PATH; do
34561        if test -f "$p/$path" && test -x "$p/$path"; then
34562          new_path="$p/$path"
34563          break
34564        fi
34565      done
34566      IFS="$IFS_save"
34567    else
34568      # This is an absolute path, we can use it without further modifications.
34569      new_path="$path"
34570    fi
34571
34572    if test "x$new_path" = x; then
34573      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34574$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34575      has_space=`$ECHO "$complete" | $GREP " "`
34576      if test "x$has_space" != x; then
34577        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34579      fi
34580      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34581    fi
34582  fi
34583
34584  # Now join together the path and the arguments once again
34585  if test "x$arguments" != xEOL; then
34586    new_complete="$new_path ${arguments% *}"
34587  else
34588    new_complete="$new_path"
34589  fi
34590
34591  if test "x$complete" != "x$new_complete"; then
34592    DUMPBIN="$new_complete"
34593    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34594$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34595  fi
34596
34597  fi
34598
34599  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34600
34601
34602  # Publish this variable in the help.
34603
34604
34605  if test "x$STRIP" = x; then
34606    # The variable is not set by user, try to locate tool using the code snippet
34607    for ac_prog in strip
34608do
34609  # Extract the first word of "$ac_prog", so it can be a program name with args.
34610set dummy $ac_prog; ac_word=$2
34611{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34612$as_echo_n "checking for $ac_word... " >&6; }
34613if ${ac_cv_path_STRIP+:} false; then :
34614  $as_echo_n "(cached) " >&6
34615else
34616  case $STRIP in
34617  [\\/]* | ?:[\\/]*)
34618  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34619  ;;
34620  *)
34621  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34622for as_dir in $PATH
34623do
34624  IFS=$as_save_IFS
34625  test -z "$as_dir" && as_dir=.
34626    for ac_exec_ext in '' $ac_executable_extensions; do
34627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34628    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34630    break 2
34631  fi
34632done
34633  done
34634IFS=$as_save_IFS
34635
34636  ;;
34637esac
34638fi
34639STRIP=$ac_cv_path_STRIP
34640if test -n "$STRIP"; then
34641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34642$as_echo "$STRIP" >&6; }
34643else
34644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34645$as_echo "no" >&6; }
34646fi
34647
34648
34649  test -n "$STRIP" && break
34650done
34651
34652  else
34653    # The variable is set, but is it from the command line or the environment?
34654
34655    # Try to remove the string !STRIP! from our list.
34656    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34657    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34658      # If it failed, the variable was not from the command line. Ignore it,
34659      # but warn the user (except for BASH, which is always set by the calling BASH).
34660      if test "xSTRIP" != xBASH; then
34661        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34662$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34663      fi
34664      # Try to locate tool using the code snippet
34665      for ac_prog in strip
34666do
34667  # Extract the first word of "$ac_prog", so it can be a program name with args.
34668set dummy $ac_prog; ac_word=$2
34669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34670$as_echo_n "checking for $ac_word... " >&6; }
34671if ${ac_cv_path_STRIP+:} false; then :
34672  $as_echo_n "(cached) " >&6
34673else
34674  case $STRIP in
34675  [\\/]* | ?:[\\/]*)
34676  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34677  ;;
34678  *)
34679  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34680for as_dir in $PATH
34681do
34682  IFS=$as_save_IFS
34683  test -z "$as_dir" && as_dir=.
34684    for ac_exec_ext in '' $ac_executable_extensions; do
34685  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34686    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34688    break 2
34689  fi
34690done
34691  done
34692IFS=$as_save_IFS
34693
34694  ;;
34695esac
34696fi
34697STRIP=$ac_cv_path_STRIP
34698if test -n "$STRIP"; then
34699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34700$as_echo "$STRIP" >&6; }
34701else
34702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34703$as_echo "no" >&6; }
34704fi
34705
34706
34707  test -n "$STRIP" && break
34708done
34709
34710    else
34711      # If it succeeded, then it was overridden by the user. We will use it
34712      # for the tool.
34713
34714      # First remove it from the list of overridden variables, so we can test
34715      # for unknown variables in the end.
34716      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34717
34718      # Check if the provided tool contains a complete path.
34719      tool_specified="$STRIP"
34720      tool_basename="${tool_specified##*/}"
34721      if test "x$tool_basename" = "x$tool_specified"; then
34722        # A command without a complete path is provided, search $PATH.
34723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34724$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34725        # Extract the first word of "$tool_basename", so it can be a program name with args.
34726set dummy $tool_basename; ac_word=$2
34727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34728$as_echo_n "checking for $ac_word... " >&6; }
34729if ${ac_cv_path_STRIP+:} false; then :
34730  $as_echo_n "(cached) " >&6
34731else
34732  case $STRIP in
34733  [\\/]* | ?:[\\/]*)
34734  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34735  ;;
34736  *)
34737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34738for as_dir in $PATH
34739do
34740  IFS=$as_save_IFS
34741  test -z "$as_dir" && as_dir=.
34742    for ac_exec_ext in '' $ac_executable_extensions; do
34743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34744    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34746    break 2
34747  fi
34748done
34749  done
34750IFS=$as_save_IFS
34751
34752  ;;
34753esac
34754fi
34755STRIP=$ac_cv_path_STRIP
34756if test -n "$STRIP"; then
34757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34758$as_echo "$STRIP" >&6; }
34759else
34760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34761$as_echo "no" >&6; }
34762fi
34763
34764
34765        if test "x$STRIP" = x; then
34766          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34767        fi
34768      else
34769        # Otherwise we believe it is a complete path. Use it as it is.
34770        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34771$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34773$as_echo_n "checking for STRIP... " >&6; }
34774        if test ! -x "$tool_specified"; then
34775          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34776$as_echo "not found" >&6; }
34777          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34778        fi
34779        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34780$as_echo "$tool_specified" >&6; }
34781      fi
34782    fi
34783  fi
34784
34785
34786
34787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34788
34789  # First separate the path from the arguments. This will split at the first
34790  # space.
34791  complete="$STRIP"
34792  path="${complete%% *}"
34793  tmp="$complete EOL"
34794  arguments="${tmp#* }"
34795
34796  # Input might be given as Windows format, start by converting to
34797  # unix format.
34798  new_path=`$CYGPATH -u "$path"`
34799
34800  # Now try to locate executable using which
34801  new_path=`$WHICH "$new_path" 2> /dev/null`
34802  # bat and cmd files are not always considered executable in cygwin causing which
34803  # to not find them
34804  if test "x$new_path" = x \
34805      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34806      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34807    new_path=`$CYGPATH -u "$path"`
34808  fi
34809  if test "x$new_path" = x; then
34810    # Oops. Which didn't find the executable.
34811    # The splitting of arguments from the executable at a space might have been incorrect,
34812    # since paths with space are more likely in Windows. Give it another try with the whole
34813    # argument.
34814    path="$complete"
34815    arguments="EOL"
34816    new_path=`$CYGPATH -u "$path"`
34817    new_path=`$WHICH "$new_path" 2> /dev/null`
34818    # bat and cmd files are not always considered executable in cygwin causing which
34819    # to not find them
34820    if test "x$new_path" = x \
34821        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34822        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34823      new_path=`$CYGPATH -u "$path"`
34824    fi
34825    if test "x$new_path" = x; then
34826      # It's still not found. Now this is an unrecoverable error.
34827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34828$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34829      has_space=`$ECHO "$complete" | $GREP " "`
34830      if test "x$has_space" != x; then
34831        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34832$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34833      fi
34834      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34835    fi
34836  fi
34837
34838  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34839  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34840  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34841  # "foo.exe" is OK but "foo" is an error.
34842  #
34843  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34844  # It is also a way to make sure we got the proper file name for the real test later on.
34845  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34846  if test "x$test_shortpath" = x; then
34847    # Short path failed, file does not exist as specified.
34848    # Try adding .exe or .cmd
34849    if test -f "${new_path}.exe"; then
34850      input_to_shortpath="${new_path}.exe"
34851    elif test -f "${new_path}.cmd"; then
34852      input_to_shortpath="${new_path}.cmd"
34853    else
34854      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
34855$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
34856      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34857$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34858      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34859    fi
34860  else
34861    input_to_shortpath="$new_path"
34862  fi
34863
34864  # Call helper function which possibly converts this using DOS-style short mode.
34865  # If so, the updated path is stored in $new_path.
34866  new_path="$input_to_shortpath"
34867
34868  input_path="$input_to_shortpath"
34869  # Check if we need to convert this using DOS-style short mode. If the path
34870  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34871  # take no chances and rewrite it.
34872  # Note: m4 eats our [], so we need to use [ and ] instead.
34873  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34874  if test "x$has_forbidden_chars" != x; then
34875    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34876    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34877    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34878    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34879      # Going to short mode and back again did indeed matter. Since short mode is
34880      # case insensitive, let's make it lowercase to improve readability.
34881      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34882      # Now convert it back to Unix-stile (cygpath)
34883      input_path=`$CYGPATH -u "$shortmode_path"`
34884      new_path="$input_path"
34885    fi
34886  fi
34887
34888  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34889  if test "x$test_cygdrive_prefix" = x; then
34890    # As a simple fix, exclude /usr/bin since it's not a real path.
34891    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34892      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34893      # a path prefixed by /cygdrive for fixpath to work.
34894      new_path="$CYGWIN_ROOT_PATH$input_path"
34895    fi
34896  fi
34897
34898  # remove trailing .exe if any
34899  new_path="${new_path/%.exe/}"
34900
34901  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34902
34903  # First separate the path from the arguments. This will split at the first
34904  # space.
34905  complete="$STRIP"
34906  path="${complete%% *}"
34907  tmp="$complete EOL"
34908  arguments="${tmp#* }"
34909
34910  # Input might be given as Windows format, start by converting to
34911  # unix format.
34912  new_path="$path"
34913
34914  windows_path="$new_path"
34915  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34916    unix_path=`$CYGPATH -u "$windows_path"`
34917    new_path="$unix_path"
34918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34919    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34920    new_path="$unix_path"
34921  fi
34922
34923
34924  # Now try to locate executable using which
34925  new_path=`$WHICH "$new_path" 2> /dev/null`
34926
34927  if test "x$new_path" = x; then
34928    # Oops. Which didn't find the executable.
34929    # The splitting of arguments from the executable at a space might have been incorrect,
34930    # since paths with space are more likely in Windows. Give it another try with the whole
34931    # argument.
34932    path="$complete"
34933    arguments="EOL"
34934    new_path="$path"
34935
34936  windows_path="$new_path"
34937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34938    unix_path=`$CYGPATH -u "$windows_path"`
34939    new_path="$unix_path"
34940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34942    new_path="$unix_path"
34943  fi
34944
34945
34946    new_path=`$WHICH "$new_path" 2> /dev/null`
34947
34948    if test "x$new_path" = x; then
34949      # It's still not found. Now this is an unrecoverable error.
34950      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
34951$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
34952      has_space=`$ECHO "$complete" | $GREP " "`
34953      if test "x$has_space" != x; then
34954        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34955$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34956      fi
34957      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
34958    fi
34959  fi
34960
34961  # Now new_path has a complete unix path to the binary
34962  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34963    # Keep paths in /bin as-is, but remove trailing .exe if any
34964    new_path="${new_path/%.exe/}"
34965    # Do not save /bin paths to all_fixpath_prefixes!
34966  else
34967    # Not in mixed or Windows style, start by that.
34968    new_path=`cmd //c echo $new_path`
34969
34970  input_path="$new_path"
34971  # Check if we need to convert this using DOS-style short mode. If the path
34972  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34973  # take no chances and rewrite it.
34974  # Note: m4 eats our [], so we need to use [ and ] instead.
34975  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34976  if test "x$has_forbidden_chars" != x; then
34977    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34978    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34979  fi
34980
34981    # Output is in $new_path
34982
34983  windows_path="$new_path"
34984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34985    unix_path=`$CYGPATH -u "$windows_path"`
34986    new_path="$unix_path"
34987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34989    new_path="$unix_path"
34990  fi
34991
34992    # remove trailing .exe if any
34993    new_path="${new_path/%.exe/}"
34994
34995    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34996    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34997  fi
34998
34999  else
35000    # We're on a posix platform. Hooray! :)
35001    # First separate the path from the arguments. This will split at the first
35002    # space.
35003    complete="$STRIP"
35004    path="${complete%% *}"
35005    tmp="$complete EOL"
35006    arguments="${tmp#* }"
35007
35008    # Cannot rely on the command "which" here since it doesn't always work.
35009    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35010    if test -z "$is_absolute_path"; then
35011      # Path to executable is not absolute. Find it.
35012      IFS_save="$IFS"
35013      IFS=:
35014      for p in $PATH; do
35015        if test -f "$p/$path" && test -x "$p/$path"; then
35016          new_path="$p/$path"
35017          break
35018        fi
35019      done
35020      IFS="$IFS_save"
35021    else
35022      # This is an absolute path, we can use it without further modifications.
35023      new_path="$path"
35024    fi
35025
35026    if test "x$new_path" = x; then
35027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35028$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35029      has_space=`$ECHO "$complete" | $GREP " "`
35030      if test "x$has_space" != x; then
35031        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35032$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35033      fi
35034      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35035    fi
35036  fi
35037
35038  # Now join together the path and the arguments once again
35039  if test "x$arguments" != xEOL; then
35040    new_complete="$new_path ${arguments% *}"
35041  else
35042    new_complete="$new_path"
35043  fi
35044
35045  if test "x$complete" != "x$new_complete"; then
35046    STRIP="$new_complete"
35047    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35048$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35049  fi
35050
35051
35052
35053  # Publish this variable in the help.
35054
35055
35056  if test "x$NM" = x; then
35057    # The variable is not set by user, try to locate tool using the code snippet
35058    for ac_prog in nm
35059do
35060  # Extract the first word of "$ac_prog", so it can be a program name with args.
35061set dummy $ac_prog; ac_word=$2
35062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35063$as_echo_n "checking for $ac_word... " >&6; }
35064if ${ac_cv_path_NM+:} false; then :
35065  $as_echo_n "(cached) " >&6
35066else
35067  case $NM in
35068  [\\/]* | ?:[\\/]*)
35069  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35070  ;;
35071  *)
35072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35073for as_dir in $PATH
35074do
35075  IFS=$as_save_IFS
35076  test -z "$as_dir" && as_dir=.
35077    for ac_exec_ext in '' $ac_executable_extensions; do
35078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35079    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35081    break 2
35082  fi
35083done
35084  done
35085IFS=$as_save_IFS
35086
35087  ;;
35088esac
35089fi
35090NM=$ac_cv_path_NM
35091if test -n "$NM"; then
35092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35093$as_echo "$NM" >&6; }
35094else
35095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35096$as_echo "no" >&6; }
35097fi
35098
35099
35100  test -n "$NM" && break
35101done
35102
35103  else
35104    # The variable is set, but is it from the command line or the environment?
35105
35106    # Try to remove the string !NM! from our list.
35107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35109      # If it failed, the variable was not from the command line. Ignore it,
35110      # but warn the user (except for BASH, which is always set by the calling BASH).
35111      if test "xNM" != xBASH; then
35112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35113$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35114      fi
35115      # Try to locate tool using the code snippet
35116      for ac_prog in nm
35117do
35118  # Extract the first word of "$ac_prog", so it can be a program name with args.
35119set dummy $ac_prog; ac_word=$2
35120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35121$as_echo_n "checking for $ac_word... " >&6; }
35122if ${ac_cv_path_NM+:} false; then :
35123  $as_echo_n "(cached) " >&6
35124else
35125  case $NM in
35126  [\\/]* | ?:[\\/]*)
35127  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35128  ;;
35129  *)
35130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35131for as_dir in $PATH
35132do
35133  IFS=$as_save_IFS
35134  test -z "$as_dir" && as_dir=.
35135    for ac_exec_ext in '' $ac_executable_extensions; do
35136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35137    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35139    break 2
35140  fi
35141done
35142  done
35143IFS=$as_save_IFS
35144
35145  ;;
35146esac
35147fi
35148NM=$ac_cv_path_NM
35149if test -n "$NM"; then
35150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35151$as_echo "$NM" >&6; }
35152else
35153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35154$as_echo "no" >&6; }
35155fi
35156
35157
35158  test -n "$NM" && break
35159done
35160
35161    else
35162      # If it succeeded, then it was overridden by the user. We will use it
35163      # for the tool.
35164
35165      # First remove it from the list of overridden variables, so we can test
35166      # for unknown variables in the end.
35167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35168
35169      # Check if the provided tool contains a complete path.
35170      tool_specified="$NM"
35171      tool_basename="${tool_specified##*/}"
35172      if test "x$tool_basename" = "x$tool_specified"; then
35173        # A command without a complete path is provided, search $PATH.
35174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35175$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35176        # Extract the first word of "$tool_basename", so it can be a program name with args.
35177set dummy $tool_basename; ac_word=$2
35178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35179$as_echo_n "checking for $ac_word... " >&6; }
35180if ${ac_cv_path_NM+:} false; then :
35181  $as_echo_n "(cached) " >&6
35182else
35183  case $NM in
35184  [\\/]* | ?:[\\/]*)
35185  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35186  ;;
35187  *)
35188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35189for as_dir in $PATH
35190do
35191  IFS=$as_save_IFS
35192  test -z "$as_dir" && as_dir=.
35193    for ac_exec_ext in '' $ac_executable_extensions; do
35194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35195    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35197    break 2
35198  fi
35199done
35200  done
35201IFS=$as_save_IFS
35202
35203  ;;
35204esac
35205fi
35206NM=$ac_cv_path_NM
35207if test -n "$NM"; then
35208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35209$as_echo "$NM" >&6; }
35210else
35211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35212$as_echo "no" >&6; }
35213fi
35214
35215
35216        if test "x$NM" = x; then
35217          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35218        fi
35219      else
35220        # Otherwise we believe it is a complete path. Use it as it is.
35221        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35222$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35223        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35224$as_echo_n "checking for NM... " >&6; }
35225        if test ! -x "$tool_specified"; then
35226          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35227$as_echo "not found" >&6; }
35228          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35229        fi
35230        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35231$as_echo "$tool_specified" >&6; }
35232      fi
35233    fi
35234  fi
35235
35236
35237
35238  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35239
35240  # First separate the path from the arguments. This will split at the first
35241  # space.
35242  complete="$NM"
35243  path="${complete%% *}"
35244  tmp="$complete EOL"
35245  arguments="${tmp#* }"
35246
35247  # Input might be given as Windows format, start by converting to
35248  # unix format.
35249  new_path=`$CYGPATH -u "$path"`
35250
35251  # Now try to locate executable using which
35252  new_path=`$WHICH "$new_path" 2> /dev/null`
35253  # bat and cmd files are not always considered executable in cygwin causing which
35254  # to not find them
35255  if test "x$new_path" = x \
35256      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35257      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35258    new_path=`$CYGPATH -u "$path"`
35259  fi
35260  if test "x$new_path" = x; then
35261    # Oops. Which didn't find the executable.
35262    # The splitting of arguments from the executable at a space might have been incorrect,
35263    # since paths with space are more likely in Windows. Give it another try with the whole
35264    # argument.
35265    path="$complete"
35266    arguments="EOL"
35267    new_path=`$CYGPATH -u "$path"`
35268    new_path=`$WHICH "$new_path" 2> /dev/null`
35269    # bat and cmd files are not always considered executable in cygwin causing which
35270    # to not find them
35271    if test "x$new_path" = x \
35272        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35273        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35274      new_path=`$CYGPATH -u "$path"`
35275    fi
35276    if test "x$new_path" = x; then
35277      # It's still not found. Now this is an unrecoverable error.
35278      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35279$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35280      has_space=`$ECHO "$complete" | $GREP " "`
35281      if test "x$has_space" != x; then
35282        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35283$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35284      fi
35285      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35286    fi
35287  fi
35288
35289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35292  # "foo.exe" is OK but "foo" is an error.
35293  #
35294  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35295  # It is also a way to make sure we got the proper file name for the real test later on.
35296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35297  if test "x$test_shortpath" = x; then
35298    # Short path failed, file does not exist as specified.
35299    # Try adding .exe or .cmd
35300    if test -f "${new_path}.exe"; then
35301      input_to_shortpath="${new_path}.exe"
35302    elif test -f "${new_path}.cmd"; then
35303      input_to_shortpath="${new_path}.cmd"
35304    else
35305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35306$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35307      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35308$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35309      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35310    fi
35311  else
35312    input_to_shortpath="$new_path"
35313  fi
35314
35315  # Call helper function which possibly converts this using DOS-style short mode.
35316  # If so, the updated path is stored in $new_path.
35317  new_path="$input_to_shortpath"
35318
35319  input_path="$input_to_shortpath"
35320  # Check if we need to convert this using DOS-style short mode. If the path
35321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35322  # take no chances and rewrite it.
35323  # Note: m4 eats our [], so we need to use [ and ] instead.
35324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35325  if test "x$has_forbidden_chars" != x; then
35326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35327    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35328    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35329    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35330      # Going to short mode and back again did indeed matter. Since short mode is
35331      # case insensitive, let's make it lowercase to improve readability.
35332      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35333      # Now convert it back to Unix-stile (cygpath)
35334      input_path=`$CYGPATH -u "$shortmode_path"`
35335      new_path="$input_path"
35336    fi
35337  fi
35338
35339  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35340  if test "x$test_cygdrive_prefix" = x; then
35341    # As a simple fix, exclude /usr/bin since it's not a real path.
35342    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35343      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35344      # a path prefixed by /cygdrive for fixpath to work.
35345      new_path="$CYGWIN_ROOT_PATH$input_path"
35346    fi
35347  fi
35348
35349  # remove trailing .exe if any
35350  new_path="${new_path/%.exe/}"
35351
35352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35353
35354  # First separate the path from the arguments. This will split at the first
35355  # space.
35356  complete="$NM"
35357  path="${complete%% *}"
35358  tmp="$complete EOL"
35359  arguments="${tmp#* }"
35360
35361  # Input might be given as Windows format, start by converting to
35362  # unix format.
35363  new_path="$path"
35364
35365  windows_path="$new_path"
35366  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35367    unix_path=`$CYGPATH -u "$windows_path"`
35368    new_path="$unix_path"
35369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35370    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35371    new_path="$unix_path"
35372  fi
35373
35374
35375  # Now try to locate executable using which
35376  new_path=`$WHICH "$new_path" 2> /dev/null`
35377
35378  if test "x$new_path" = x; then
35379    # Oops. Which didn't find the executable.
35380    # The splitting of arguments from the executable at a space might have been incorrect,
35381    # since paths with space are more likely in Windows. Give it another try with the whole
35382    # argument.
35383    path="$complete"
35384    arguments="EOL"
35385    new_path="$path"
35386
35387  windows_path="$new_path"
35388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35389    unix_path=`$CYGPATH -u "$windows_path"`
35390    new_path="$unix_path"
35391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35393    new_path="$unix_path"
35394  fi
35395
35396
35397    new_path=`$WHICH "$new_path" 2> /dev/null`
35398
35399    if test "x$new_path" = x; then
35400      # It's still not found. Now this is an unrecoverable error.
35401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35402$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35403      has_space=`$ECHO "$complete" | $GREP " "`
35404      if test "x$has_space" != x; then
35405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35407      fi
35408      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35409    fi
35410  fi
35411
35412  # Now new_path has a complete unix path to the binary
35413  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35414    # Keep paths in /bin as-is, but remove trailing .exe if any
35415    new_path="${new_path/%.exe/}"
35416    # Do not save /bin paths to all_fixpath_prefixes!
35417  else
35418    # Not in mixed or Windows style, start by that.
35419    new_path=`cmd //c echo $new_path`
35420
35421  input_path="$new_path"
35422  # Check if we need to convert this using DOS-style short mode. If the path
35423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35424  # take no chances and rewrite it.
35425  # Note: m4 eats our [], so we need to use [ and ] instead.
35426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35427  if test "x$has_forbidden_chars" != x; then
35428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35430  fi
35431
35432    # Output is in $new_path
35433
35434  windows_path="$new_path"
35435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35436    unix_path=`$CYGPATH -u "$windows_path"`
35437    new_path="$unix_path"
35438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35440    new_path="$unix_path"
35441  fi
35442
35443    # remove trailing .exe if any
35444    new_path="${new_path/%.exe/}"
35445
35446    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35447    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35448  fi
35449
35450  else
35451    # We're on a posix platform. Hooray! :)
35452    # First separate the path from the arguments. This will split at the first
35453    # space.
35454    complete="$NM"
35455    path="${complete%% *}"
35456    tmp="$complete EOL"
35457    arguments="${tmp#* }"
35458
35459    # Cannot rely on the command "which" here since it doesn't always work.
35460    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35461    if test -z "$is_absolute_path"; then
35462      # Path to executable is not absolute. Find it.
35463      IFS_save="$IFS"
35464      IFS=:
35465      for p in $PATH; do
35466        if test -f "$p/$path" && test -x "$p/$path"; then
35467          new_path="$p/$path"
35468          break
35469        fi
35470      done
35471      IFS="$IFS_save"
35472    else
35473      # This is an absolute path, we can use it without further modifications.
35474      new_path="$path"
35475    fi
35476
35477    if test "x$new_path" = x; then
35478      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35479$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35480      has_space=`$ECHO "$complete" | $GREP " "`
35481      if test "x$has_space" != x; then
35482        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35483$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35484      fi
35485      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35486    fi
35487  fi
35488
35489  # Now join together the path and the arguments once again
35490  if test "x$arguments" != xEOL; then
35491    new_complete="$new_path ${arguments% *}"
35492  else
35493    new_complete="$new_path"
35494  fi
35495
35496  if test "x$complete" != "x$new_complete"; then
35497    NM="$new_complete"
35498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35499$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35500  fi
35501
35502
35503
35504  # Publish this variable in the help.
35505
35506
35507  if test "x$GNM" = x; then
35508    # The variable is not set by user, try to locate tool using the code snippet
35509    for ac_prog in gnm
35510do
35511  # Extract the first word of "$ac_prog", so it can be a program name with args.
35512set dummy $ac_prog; ac_word=$2
35513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35514$as_echo_n "checking for $ac_word... " >&6; }
35515if ${ac_cv_path_GNM+:} false; then :
35516  $as_echo_n "(cached) " >&6
35517else
35518  case $GNM in
35519  [\\/]* | ?:[\\/]*)
35520  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35521  ;;
35522  *)
35523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35524for as_dir in $PATH
35525do
35526  IFS=$as_save_IFS
35527  test -z "$as_dir" && as_dir=.
35528    for ac_exec_ext in '' $ac_executable_extensions; do
35529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35530    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35532    break 2
35533  fi
35534done
35535  done
35536IFS=$as_save_IFS
35537
35538  ;;
35539esac
35540fi
35541GNM=$ac_cv_path_GNM
35542if test -n "$GNM"; then
35543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35544$as_echo "$GNM" >&6; }
35545else
35546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35547$as_echo "no" >&6; }
35548fi
35549
35550
35551  test -n "$GNM" && break
35552done
35553
35554  else
35555    # The variable is set, but is it from the command line or the environment?
35556
35557    # Try to remove the string !GNM! from our list.
35558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35560      # If it failed, the variable was not from the command line. Ignore it,
35561      # but warn the user (except for BASH, which is always set by the calling BASH).
35562      if test "xGNM" != xBASH; then
35563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35564$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35565      fi
35566      # Try to locate tool using the code snippet
35567      for ac_prog in gnm
35568do
35569  # Extract the first word of "$ac_prog", so it can be a program name with args.
35570set dummy $ac_prog; ac_word=$2
35571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35572$as_echo_n "checking for $ac_word... " >&6; }
35573if ${ac_cv_path_GNM+:} false; then :
35574  $as_echo_n "(cached) " >&6
35575else
35576  case $GNM in
35577  [\\/]* | ?:[\\/]*)
35578  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35579  ;;
35580  *)
35581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35582for as_dir in $PATH
35583do
35584  IFS=$as_save_IFS
35585  test -z "$as_dir" && as_dir=.
35586    for ac_exec_ext in '' $ac_executable_extensions; do
35587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35588    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35590    break 2
35591  fi
35592done
35593  done
35594IFS=$as_save_IFS
35595
35596  ;;
35597esac
35598fi
35599GNM=$ac_cv_path_GNM
35600if test -n "$GNM"; then
35601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35602$as_echo "$GNM" >&6; }
35603else
35604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35605$as_echo "no" >&6; }
35606fi
35607
35608
35609  test -n "$GNM" && break
35610done
35611
35612    else
35613      # If it succeeded, then it was overridden by the user. We will use it
35614      # for the tool.
35615
35616      # First remove it from the list of overridden variables, so we can test
35617      # for unknown variables in the end.
35618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35619
35620      # Check if the provided tool contains a complete path.
35621      tool_specified="$GNM"
35622      tool_basename="${tool_specified##*/}"
35623      if test "x$tool_basename" = "x$tool_specified"; then
35624        # A command without a complete path is provided, search $PATH.
35625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35626$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35627        # Extract the first word of "$tool_basename", so it can be a program name with args.
35628set dummy $tool_basename; ac_word=$2
35629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35630$as_echo_n "checking for $ac_word... " >&6; }
35631if ${ac_cv_path_GNM+:} false; then :
35632  $as_echo_n "(cached) " >&6
35633else
35634  case $GNM in
35635  [\\/]* | ?:[\\/]*)
35636  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35637  ;;
35638  *)
35639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35640for as_dir in $PATH
35641do
35642  IFS=$as_save_IFS
35643  test -z "$as_dir" && as_dir=.
35644    for ac_exec_ext in '' $ac_executable_extensions; do
35645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35646    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35648    break 2
35649  fi
35650done
35651  done
35652IFS=$as_save_IFS
35653
35654  ;;
35655esac
35656fi
35657GNM=$ac_cv_path_GNM
35658if test -n "$GNM"; then
35659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35660$as_echo "$GNM" >&6; }
35661else
35662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35663$as_echo "no" >&6; }
35664fi
35665
35666
35667        if test "x$GNM" = x; then
35668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35669        fi
35670      else
35671        # Otherwise we believe it is a complete path. Use it as it is.
35672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35673$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35675$as_echo_n "checking for GNM... " >&6; }
35676        if test ! -x "$tool_specified"; then
35677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35678$as_echo "not found" >&6; }
35679          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35680        fi
35681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35682$as_echo "$tool_specified" >&6; }
35683      fi
35684    fi
35685  fi
35686
35687
35688
35689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35690
35691  # First separate the path from the arguments. This will split at the first
35692  # space.
35693  complete="$GNM"
35694  path="${complete%% *}"
35695  tmp="$complete EOL"
35696  arguments="${tmp#* }"
35697
35698  # Input might be given as Windows format, start by converting to
35699  # unix format.
35700  new_path=`$CYGPATH -u "$path"`
35701
35702  # Now try to locate executable using which
35703  new_path=`$WHICH "$new_path" 2> /dev/null`
35704  # bat and cmd files are not always considered executable in cygwin causing which
35705  # to not find them
35706  if test "x$new_path" = x \
35707      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35708      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35709    new_path=`$CYGPATH -u "$path"`
35710  fi
35711  if test "x$new_path" = x; then
35712    # Oops. Which didn't find the executable.
35713    # The splitting of arguments from the executable at a space might have been incorrect,
35714    # since paths with space are more likely in Windows. Give it another try with the whole
35715    # argument.
35716    path="$complete"
35717    arguments="EOL"
35718    new_path=`$CYGPATH -u "$path"`
35719    new_path=`$WHICH "$new_path" 2> /dev/null`
35720    # bat and cmd files are not always considered executable in cygwin causing which
35721    # to not find them
35722    if test "x$new_path" = x \
35723        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35724        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35725      new_path=`$CYGPATH -u "$path"`
35726    fi
35727    if test "x$new_path" = x; then
35728      # It's still not found. Now this is an unrecoverable error.
35729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35730$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35731      has_space=`$ECHO "$complete" | $GREP " "`
35732      if test "x$has_space" != x; then
35733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35735      fi
35736      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35737    fi
35738  fi
35739
35740  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35741  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35742  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35743  # "foo.exe" is OK but "foo" is an error.
35744  #
35745  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35746  # It is also a way to make sure we got the proper file name for the real test later on.
35747  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35748  if test "x$test_shortpath" = x; then
35749    # Short path failed, file does not exist as specified.
35750    # Try adding .exe or .cmd
35751    if test -f "${new_path}.exe"; then
35752      input_to_shortpath="${new_path}.exe"
35753    elif test -f "${new_path}.cmd"; then
35754      input_to_shortpath="${new_path}.cmd"
35755    else
35756      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35757$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35758      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35759$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35760      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35761    fi
35762  else
35763    input_to_shortpath="$new_path"
35764  fi
35765
35766  # Call helper function which possibly converts this using DOS-style short mode.
35767  # If so, the updated path is stored in $new_path.
35768  new_path="$input_to_shortpath"
35769
35770  input_path="$input_to_shortpath"
35771  # Check if we need to convert this using DOS-style short mode. If the path
35772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35773  # take no chances and rewrite it.
35774  # Note: m4 eats our [], so we need to use [ and ] instead.
35775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35776  if test "x$has_forbidden_chars" != x; then
35777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35781      # Going to short mode and back again did indeed matter. Since short mode is
35782      # case insensitive, let's make it lowercase to improve readability.
35783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35784      # Now convert it back to Unix-stile (cygpath)
35785      input_path=`$CYGPATH -u "$shortmode_path"`
35786      new_path="$input_path"
35787    fi
35788  fi
35789
35790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35791  if test "x$test_cygdrive_prefix" = x; then
35792    # As a simple fix, exclude /usr/bin since it's not a real path.
35793    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35795      # a path prefixed by /cygdrive for fixpath to work.
35796      new_path="$CYGWIN_ROOT_PATH$input_path"
35797    fi
35798  fi
35799
35800  # remove trailing .exe if any
35801  new_path="${new_path/%.exe/}"
35802
35803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35804
35805  # First separate the path from the arguments. This will split at the first
35806  # space.
35807  complete="$GNM"
35808  path="${complete%% *}"
35809  tmp="$complete EOL"
35810  arguments="${tmp#* }"
35811
35812  # Input might be given as Windows format, start by converting to
35813  # unix format.
35814  new_path="$path"
35815
35816  windows_path="$new_path"
35817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35818    unix_path=`$CYGPATH -u "$windows_path"`
35819    new_path="$unix_path"
35820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35822    new_path="$unix_path"
35823  fi
35824
35825
35826  # Now try to locate executable using which
35827  new_path=`$WHICH "$new_path" 2> /dev/null`
35828
35829  if test "x$new_path" = x; then
35830    # Oops. Which didn't find the executable.
35831    # The splitting of arguments from the executable at a space might have been incorrect,
35832    # since paths with space are more likely in Windows. Give it another try with the whole
35833    # argument.
35834    path="$complete"
35835    arguments="EOL"
35836    new_path="$path"
35837
35838  windows_path="$new_path"
35839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35840    unix_path=`$CYGPATH -u "$windows_path"`
35841    new_path="$unix_path"
35842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35844    new_path="$unix_path"
35845  fi
35846
35847
35848    new_path=`$WHICH "$new_path" 2> /dev/null`
35849
35850    if test "x$new_path" = x; then
35851      # It's still not found. Now this is an unrecoverable error.
35852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35853$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35854      has_space=`$ECHO "$complete" | $GREP " "`
35855      if test "x$has_space" != x; then
35856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35858      fi
35859      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35860    fi
35861  fi
35862
35863  # Now new_path has a complete unix path to the binary
35864  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35865    # Keep paths in /bin as-is, but remove trailing .exe if any
35866    new_path="${new_path/%.exe/}"
35867    # Do not save /bin paths to all_fixpath_prefixes!
35868  else
35869    # Not in mixed or Windows style, start by that.
35870    new_path=`cmd //c echo $new_path`
35871
35872  input_path="$new_path"
35873  # Check if we need to convert this using DOS-style short mode. If the path
35874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35875  # take no chances and rewrite it.
35876  # Note: m4 eats our [], so we need to use [ and ] instead.
35877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35878  if test "x$has_forbidden_chars" != x; then
35879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35881  fi
35882
35883    # Output is in $new_path
35884
35885  windows_path="$new_path"
35886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35887    unix_path=`$CYGPATH -u "$windows_path"`
35888    new_path="$unix_path"
35889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35891    new_path="$unix_path"
35892  fi
35893
35894    # remove trailing .exe if any
35895    new_path="${new_path/%.exe/}"
35896
35897    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35898    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35899  fi
35900
35901  else
35902    # We're on a posix platform. Hooray! :)
35903    # First separate the path from the arguments. This will split at the first
35904    # space.
35905    complete="$GNM"
35906    path="${complete%% *}"
35907    tmp="$complete EOL"
35908    arguments="${tmp#* }"
35909
35910    # Cannot rely on the command "which" here since it doesn't always work.
35911    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35912    if test -z "$is_absolute_path"; then
35913      # Path to executable is not absolute. Find it.
35914      IFS_save="$IFS"
35915      IFS=:
35916      for p in $PATH; do
35917        if test -f "$p/$path" && test -x "$p/$path"; then
35918          new_path="$p/$path"
35919          break
35920        fi
35921      done
35922      IFS="$IFS_save"
35923    else
35924      # This is an absolute path, we can use it without further modifications.
35925      new_path="$path"
35926    fi
35927
35928    if test "x$new_path" = x; then
35929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35930$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35931      has_space=`$ECHO "$complete" | $GREP " "`
35932      if test "x$has_space" != x; then
35933        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35934$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35935      fi
35936      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35937    fi
35938  fi
35939
35940  # Now join together the path and the arguments once again
35941  if test "x$arguments" != xEOL; then
35942    new_complete="$new_path ${arguments% *}"
35943  else
35944    new_complete="$new_path"
35945  fi
35946
35947  if test "x$complete" != "x$new_complete"; then
35948    GNM="$new_complete"
35949    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
35950$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
35951  fi
35952
35953
35954
35955
35956  # Publish this variable in the help.
35957
35958
35959  if test "x$MCS" = x; then
35960    # The variable is not set by user, try to locate tool using the code snippet
35961    for ac_prog in mcs
35962do
35963  # Extract the first word of "$ac_prog", so it can be a program name with args.
35964set dummy $ac_prog; ac_word=$2
35965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35966$as_echo_n "checking for $ac_word... " >&6; }
35967if ${ac_cv_path_MCS+:} false; then :
35968  $as_echo_n "(cached) " >&6
35969else
35970  case $MCS in
35971  [\\/]* | ?:[\\/]*)
35972  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
35973  ;;
35974  *)
35975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35976for as_dir in $PATH
35977do
35978  IFS=$as_save_IFS
35979  test -z "$as_dir" && as_dir=.
35980    for ac_exec_ext in '' $ac_executable_extensions; do
35981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35982    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
35983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35984    break 2
35985  fi
35986done
35987  done
35988IFS=$as_save_IFS
35989
35990  ;;
35991esac
35992fi
35993MCS=$ac_cv_path_MCS
35994if test -n "$MCS"; then
35995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
35996$as_echo "$MCS" >&6; }
35997else
35998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35999$as_echo "no" >&6; }
36000fi
36001
36002
36003  test -n "$MCS" && break
36004done
36005
36006  else
36007    # The variable is set, but is it from the command line or the environment?
36008
36009    # Try to remove the string !MCS! from our list.
36010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36012      # If it failed, the variable was not from the command line. Ignore it,
36013      # but warn the user (except for BASH, which is always set by the calling BASH).
36014      if test "xMCS" != xBASH; then
36015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36016$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36017      fi
36018      # Try to locate tool using the code snippet
36019      for ac_prog in mcs
36020do
36021  # Extract the first word of "$ac_prog", so it can be a program name with args.
36022set dummy $ac_prog; ac_word=$2
36023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36024$as_echo_n "checking for $ac_word... " >&6; }
36025if ${ac_cv_path_MCS+:} false; then :
36026  $as_echo_n "(cached) " >&6
36027else
36028  case $MCS in
36029  [\\/]* | ?:[\\/]*)
36030  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36031  ;;
36032  *)
36033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36034for as_dir in $PATH
36035do
36036  IFS=$as_save_IFS
36037  test -z "$as_dir" && as_dir=.
36038    for ac_exec_ext in '' $ac_executable_extensions; do
36039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36040    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36042    break 2
36043  fi
36044done
36045  done
36046IFS=$as_save_IFS
36047
36048  ;;
36049esac
36050fi
36051MCS=$ac_cv_path_MCS
36052if test -n "$MCS"; then
36053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36054$as_echo "$MCS" >&6; }
36055else
36056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36057$as_echo "no" >&6; }
36058fi
36059
36060
36061  test -n "$MCS" && break
36062done
36063
36064    else
36065      # If it succeeded, then it was overridden by the user. We will use it
36066      # for the tool.
36067
36068      # First remove it from the list of overridden variables, so we can test
36069      # for unknown variables in the end.
36070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36071
36072      # Check if the provided tool contains a complete path.
36073      tool_specified="$MCS"
36074      tool_basename="${tool_specified##*/}"
36075      if test "x$tool_basename" = "x$tool_specified"; then
36076        # A command without a complete path is provided, search $PATH.
36077        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36078$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36079        # Extract the first word of "$tool_basename", so it can be a program name with args.
36080set dummy $tool_basename; ac_word=$2
36081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36082$as_echo_n "checking for $ac_word... " >&6; }
36083if ${ac_cv_path_MCS+:} false; then :
36084  $as_echo_n "(cached) " >&6
36085else
36086  case $MCS in
36087  [\\/]* | ?:[\\/]*)
36088  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36089  ;;
36090  *)
36091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36092for as_dir in $PATH
36093do
36094  IFS=$as_save_IFS
36095  test -z "$as_dir" && as_dir=.
36096    for ac_exec_ext in '' $ac_executable_extensions; do
36097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36098    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36100    break 2
36101  fi
36102done
36103  done
36104IFS=$as_save_IFS
36105
36106  ;;
36107esac
36108fi
36109MCS=$ac_cv_path_MCS
36110if test -n "$MCS"; then
36111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36112$as_echo "$MCS" >&6; }
36113else
36114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36115$as_echo "no" >&6; }
36116fi
36117
36118
36119        if test "x$MCS" = x; then
36120          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36121        fi
36122      else
36123        # Otherwise we believe it is a complete path. Use it as it is.
36124        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36125$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36126        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36127$as_echo_n "checking for MCS... " >&6; }
36128        if test ! -x "$tool_specified"; then
36129          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36130$as_echo "not found" >&6; }
36131          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36132        fi
36133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36134$as_echo "$tool_specified" >&6; }
36135      fi
36136    fi
36137  fi
36138
36139
36140
36141  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36142
36143  # First separate the path from the arguments. This will split at the first
36144  # space.
36145  complete="$MCS"
36146  path="${complete%% *}"
36147  tmp="$complete EOL"
36148  arguments="${tmp#* }"
36149
36150  # Input might be given as Windows format, start by converting to
36151  # unix format.
36152  new_path=`$CYGPATH -u "$path"`
36153
36154  # Now try to locate executable using which
36155  new_path=`$WHICH "$new_path" 2> /dev/null`
36156  # bat and cmd files are not always considered executable in cygwin causing which
36157  # to not find them
36158  if test "x$new_path" = x \
36159      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36160      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36161    new_path=`$CYGPATH -u "$path"`
36162  fi
36163  if test "x$new_path" = x; then
36164    # Oops. Which didn't find the executable.
36165    # The splitting of arguments from the executable at a space might have been incorrect,
36166    # since paths with space are more likely in Windows. Give it another try with the whole
36167    # argument.
36168    path="$complete"
36169    arguments="EOL"
36170    new_path=`$CYGPATH -u "$path"`
36171    new_path=`$WHICH "$new_path" 2> /dev/null`
36172    # bat and cmd files are not always considered executable in cygwin causing which
36173    # to not find them
36174    if test "x$new_path" = x \
36175        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36176        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36177      new_path=`$CYGPATH -u "$path"`
36178    fi
36179    if test "x$new_path" = x; then
36180      # It's still not found. Now this is an unrecoverable error.
36181      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36182$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36183      has_space=`$ECHO "$complete" | $GREP " "`
36184      if test "x$has_space" != x; then
36185        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36186$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36187      fi
36188      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36189    fi
36190  fi
36191
36192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36195  # "foo.exe" is OK but "foo" is an error.
36196  #
36197  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36198  # It is also a way to make sure we got the proper file name for the real test later on.
36199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36200  if test "x$test_shortpath" = x; then
36201    # Short path failed, file does not exist as specified.
36202    # Try adding .exe or .cmd
36203    if test -f "${new_path}.exe"; then
36204      input_to_shortpath="${new_path}.exe"
36205    elif test -f "${new_path}.cmd"; then
36206      input_to_shortpath="${new_path}.cmd"
36207    else
36208      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36209$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36210      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36211$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36212      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36213    fi
36214  else
36215    input_to_shortpath="$new_path"
36216  fi
36217
36218  # Call helper function which possibly converts this using DOS-style short mode.
36219  # If so, the updated path is stored in $new_path.
36220  new_path="$input_to_shortpath"
36221
36222  input_path="$input_to_shortpath"
36223  # Check if we need to convert this using DOS-style short mode. If the path
36224  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36225  # take no chances and rewrite it.
36226  # Note: m4 eats our [], so we need to use [ and ] instead.
36227  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36228  if test "x$has_forbidden_chars" != x; then
36229    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36230    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36231    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36232    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36233      # Going to short mode and back again did indeed matter. Since short mode is
36234      # case insensitive, let's make it lowercase to improve readability.
36235      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36236      # Now convert it back to Unix-stile (cygpath)
36237      input_path=`$CYGPATH -u "$shortmode_path"`
36238      new_path="$input_path"
36239    fi
36240  fi
36241
36242  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36243  if test "x$test_cygdrive_prefix" = x; then
36244    # As a simple fix, exclude /usr/bin since it's not a real path.
36245    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36246      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36247      # a path prefixed by /cygdrive for fixpath to work.
36248      new_path="$CYGWIN_ROOT_PATH$input_path"
36249    fi
36250  fi
36251
36252  # remove trailing .exe if any
36253  new_path="${new_path/%.exe/}"
36254
36255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36256
36257  # First separate the path from the arguments. This will split at the first
36258  # space.
36259  complete="$MCS"
36260  path="${complete%% *}"
36261  tmp="$complete EOL"
36262  arguments="${tmp#* }"
36263
36264  # Input might be given as Windows format, start by converting to
36265  # unix format.
36266  new_path="$path"
36267
36268  windows_path="$new_path"
36269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36270    unix_path=`$CYGPATH -u "$windows_path"`
36271    new_path="$unix_path"
36272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36274    new_path="$unix_path"
36275  fi
36276
36277
36278  # Now try to locate executable using which
36279  new_path=`$WHICH "$new_path" 2> /dev/null`
36280
36281  if test "x$new_path" = x; then
36282    # Oops. Which didn't find the executable.
36283    # The splitting of arguments from the executable at a space might have been incorrect,
36284    # since paths with space are more likely in Windows. Give it another try with the whole
36285    # argument.
36286    path="$complete"
36287    arguments="EOL"
36288    new_path="$path"
36289
36290  windows_path="$new_path"
36291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36292    unix_path=`$CYGPATH -u "$windows_path"`
36293    new_path="$unix_path"
36294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36296    new_path="$unix_path"
36297  fi
36298
36299
36300    new_path=`$WHICH "$new_path" 2> /dev/null`
36301
36302    if test "x$new_path" = x; then
36303      # It's still not found. Now this is an unrecoverable error.
36304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36305$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36306      has_space=`$ECHO "$complete" | $GREP " "`
36307      if test "x$has_space" != x; then
36308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36310      fi
36311      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36312    fi
36313  fi
36314
36315  # Now new_path has a complete unix path to the binary
36316  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36317    # Keep paths in /bin as-is, but remove trailing .exe if any
36318    new_path="${new_path/%.exe/}"
36319    # Do not save /bin paths to all_fixpath_prefixes!
36320  else
36321    # Not in mixed or Windows style, start by that.
36322    new_path=`cmd //c echo $new_path`
36323
36324  input_path="$new_path"
36325  # Check if we need to convert this using DOS-style short mode. If the path
36326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36327  # take no chances and rewrite it.
36328  # Note: m4 eats our [], so we need to use [ and ] instead.
36329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36330  if test "x$has_forbidden_chars" != x; then
36331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36333  fi
36334
36335    # Output is in $new_path
36336
36337  windows_path="$new_path"
36338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36339    unix_path=`$CYGPATH -u "$windows_path"`
36340    new_path="$unix_path"
36341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36342    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36343    new_path="$unix_path"
36344  fi
36345
36346    # remove trailing .exe if any
36347    new_path="${new_path/%.exe/}"
36348
36349    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36350    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36351  fi
36352
36353  else
36354    # We're on a posix platform. Hooray! :)
36355    # First separate the path from the arguments. This will split at the first
36356    # space.
36357    complete="$MCS"
36358    path="${complete%% *}"
36359    tmp="$complete EOL"
36360    arguments="${tmp#* }"
36361
36362    # Cannot rely on the command "which" here since it doesn't always work.
36363    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36364    if test -z "$is_absolute_path"; then
36365      # Path to executable is not absolute. Find it.
36366      IFS_save="$IFS"
36367      IFS=:
36368      for p in $PATH; do
36369        if test -f "$p/$path" && test -x "$p/$path"; then
36370          new_path="$p/$path"
36371          break
36372        fi
36373      done
36374      IFS="$IFS_save"
36375    else
36376      # This is an absolute path, we can use it without further modifications.
36377      new_path="$path"
36378    fi
36379
36380    if test "x$new_path" = x; then
36381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36382$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36383      has_space=`$ECHO "$complete" | $GREP " "`
36384      if test "x$has_space" != x; then
36385        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36386$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36387      fi
36388      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36389    fi
36390  fi
36391
36392  # Now join together the path and the arguments once again
36393  if test "x$arguments" != xEOL; then
36394    new_complete="$new_path ${arguments% *}"
36395  else
36396    new_complete="$new_path"
36397  fi
36398
36399  if test "x$complete" != "x$new_complete"; then
36400    MCS="$new_complete"
36401    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36402$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36403  fi
36404
36405  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36406    # FIXME: we should unify this with the solaris case above.
36407
36408
36409  # Publish this variable in the help.
36410
36411
36412  if test "x$STRIP" = x; then
36413    # The variable is not set by user, try to locate tool using the code snippet
36414    if test -n "$ac_tool_prefix"; then
36415  for ac_prog in strip
36416  do
36417    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36418set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36420$as_echo_n "checking for $ac_word... " >&6; }
36421if ${ac_cv_prog_STRIP+:} false; then :
36422  $as_echo_n "(cached) " >&6
36423else
36424  if test -n "$STRIP"; then
36425  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36426else
36427as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36428for as_dir in $PATH
36429do
36430  IFS=$as_save_IFS
36431  test -z "$as_dir" && as_dir=.
36432    for ac_exec_ext in '' $ac_executable_extensions; do
36433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36434    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36436    break 2
36437  fi
36438done
36439  done
36440IFS=$as_save_IFS
36441
36442fi
36443fi
36444STRIP=$ac_cv_prog_STRIP
36445if test -n "$STRIP"; then
36446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36447$as_echo "$STRIP" >&6; }
36448else
36449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36450$as_echo "no" >&6; }
36451fi
36452
36453
36454    test -n "$STRIP" && break
36455  done
36456fi
36457if test -z "$STRIP"; then
36458  ac_ct_STRIP=$STRIP
36459  for ac_prog in strip
36460do
36461  # Extract the first word of "$ac_prog", so it can be a program name with args.
36462set dummy $ac_prog; ac_word=$2
36463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36464$as_echo_n "checking for $ac_word... " >&6; }
36465if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36466  $as_echo_n "(cached) " >&6
36467else
36468  if test -n "$ac_ct_STRIP"; then
36469  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36470else
36471as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36472for as_dir in $PATH
36473do
36474  IFS=$as_save_IFS
36475  test -z "$as_dir" && as_dir=.
36476    for ac_exec_ext in '' $ac_executable_extensions; do
36477  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36478    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36479    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36480    break 2
36481  fi
36482done
36483  done
36484IFS=$as_save_IFS
36485
36486fi
36487fi
36488ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36489if test -n "$ac_ct_STRIP"; then
36490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36491$as_echo "$ac_ct_STRIP" >&6; }
36492else
36493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36494$as_echo "no" >&6; }
36495fi
36496
36497
36498  test -n "$ac_ct_STRIP" && break
36499done
36500
36501  if test "x$ac_ct_STRIP" = x; then
36502    STRIP=""
36503  else
36504    case $cross_compiling:$ac_tool_warned in
36505yes:)
36506{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36507$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36508ac_tool_warned=yes ;;
36509esac
36510    STRIP=$ac_ct_STRIP
36511  fi
36512fi
36513
36514  else
36515    # The variable is set, but is it from the command line or the environment?
36516
36517    # Try to remove the string !STRIP! from our list.
36518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36520      # If it failed, the variable was not from the command line. Ignore it,
36521      # but warn the user (except for BASH, which is always set by the calling BASH).
36522      if test "xSTRIP" != xBASH; then
36523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36524$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36525      fi
36526      # Try to locate tool using the code snippet
36527      if test -n "$ac_tool_prefix"; then
36528  for ac_prog in strip
36529  do
36530    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36531set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36533$as_echo_n "checking for $ac_word... " >&6; }
36534if ${ac_cv_prog_STRIP+:} false; then :
36535  $as_echo_n "(cached) " >&6
36536else
36537  if test -n "$STRIP"; then
36538  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36539else
36540as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36541for as_dir in $PATH
36542do
36543  IFS=$as_save_IFS
36544  test -z "$as_dir" && as_dir=.
36545    for ac_exec_ext in '' $ac_executable_extensions; do
36546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36547    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36549    break 2
36550  fi
36551done
36552  done
36553IFS=$as_save_IFS
36554
36555fi
36556fi
36557STRIP=$ac_cv_prog_STRIP
36558if test -n "$STRIP"; then
36559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36560$as_echo "$STRIP" >&6; }
36561else
36562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36563$as_echo "no" >&6; }
36564fi
36565
36566
36567    test -n "$STRIP" && break
36568  done
36569fi
36570if test -z "$STRIP"; then
36571  ac_ct_STRIP=$STRIP
36572  for ac_prog in strip
36573do
36574  # Extract the first word of "$ac_prog", so it can be a program name with args.
36575set dummy $ac_prog; ac_word=$2
36576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36577$as_echo_n "checking for $ac_word... " >&6; }
36578if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36579  $as_echo_n "(cached) " >&6
36580else
36581  if test -n "$ac_ct_STRIP"; then
36582  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36583else
36584as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36585for as_dir in $PATH
36586do
36587  IFS=$as_save_IFS
36588  test -z "$as_dir" && as_dir=.
36589    for ac_exec_ext in '' $ac_executable_extensions; do
36590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36591    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36593    break 2
36594  fi
36595done
36596  done
36597IFS=$as_save_IFS
36598
36599fi
36600fi
36601ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36602if test -n "$ac_ct_STRIP"; then
36603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36604$as_echo "$ac_ct_STRIP" >&6; }
36605else
36606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36607$as_echo "no" >&6; }
36608fi
36609
36610
36611  test -n "$ac_ct_STRIP" && break
36612done
36613
36614  if test "x$ac_ct_STRIP" = x; then
36615    STRIP=""
36616  else
36617    case $cross_compiling:$ac_tool_warned in
36618yes:)
36619{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36620$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36621ac_tool_warned=yes ;;
36622esac
36623    STRIP=$ac_ct_STRIP
36624  fi
36625fi
36626
36627    else
36628      # If it succeeded, then it was overridden by the user. We will use it
36629      # for the tool.
36630
36631      # First remove it from the list of overridden variables, so we can test
36632      # for unknown variables in the end.
36633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36634
36635      # Check if the provided tool contains a complete path.
36636      tool_specified="$STRIP"
36637      tool_basename="${tool_specified##*/}"
36638      if test "x$tool_basename" = "x$tool_specified"; then
36639        # A command without a complete path is provided, search $PATH.
36640        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36641$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36642        # Extract the first word of "$tool_basename", so it can be a program name with args.
36643set dummy $tool_basename; ac_word=$2
36644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36645$as_echo_n "checking for $ac_word... " >&6; }
36646if ${ac_cv_path_STRIP+:} false; then :
36647  $as_echo_n "(cached) " >&6
36648else
36649  case $STRIP in
36650  [\\/]* | ?:[\\/]*)
36651  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36652  ;;
36653  *)
36654  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36655for as_dir in $PATH
36656do
36657  IFS=$as_save_IFS
36658  test -z "$as_dir" && as_dir=.
36659    for ac_exec_ext in '' $ac_executable_extensions; do
36660  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36661    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36662    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36663    break 2
36664  fi
36665done
36666  done
36667IFS=$as_save_IFS
36668
36669  ;;
36670esac
36671fi
36672STRIP=$ac_cv_path_STRIP
36673if test -n "$STRIP"; then
36674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36675$as_echo "$STRIP" >&6; }
36676else
36677  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36678$as_echo "no" >&6; }
36679fi
36680
36681
36682        if test "x$STRIP" = x; then
36683          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36684        fi
36685      else
36686        # Otherwise we believe it is a complete path. Use it as it is.
36687        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36688$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36689        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36690$as_echo_n "checking for STRIP... " >&6; }
36691        if test ! -x "$tool_specified"; then
36692          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36693$as_echo "not found" >&6; }
36694          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36695        fi
36696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36697$as_echo "$tool_specified" >&6; }
36698      fi
36699    fi
36700  fi
36701
36702
36703
36704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36705
36706  # First separate the path from the arguments. This will split at the first
36707  # space.
36708  complete="$STRIP"
36709  path="${complete%% *}"
36710  tmp="$complete EOL"
36711  arguments="${tmp#* }"
36712
36713  # Input might be given as Windows format, start by converting to
36714  # unix format.
36715  new_path=`$CYGPATH -u "$path"`
36716
36717  # Now try to locate executable using which
36718  new_path=`$WHICH "$new_path" 2> /dev/null`
36719  # bat and cmd files are not always considered executable in cygwin causing which
36720  # to not find them
36721  if test "x$new_path" = x \
36722      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36723      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36724    new_path=`$CYGPATH -u "$path"`
36725  fi
36726  if test "x$new_path" = x; then
36727    # Oops. Which didn't find the executable.
36728    # The splitting of arguments from the executable at a space might have been incorrect,
36729    # since paths with space are more likely in Windows. Give it another try with the whole
36730    # argument.
36731    path="$complete"
36732    arguments="EOL"
36733    new_path=`$CYGPATH -u "$path"`
36734    new_path=`$WHICH "$new_path" 2> /dev/null`
36735    # bat and cmd files are not always considered executable in cygwin causing which
36736    # to not find them
36737    if test "x$new_path" = x \
36738        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36739        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36740      new_path=`$CYGPATH -u "$path"`
36741    fi
36742    if test "x$new_path" = x; then
36743      # It's still not found. Now this is an unrecoverable error.
36744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36745$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36746      has_space=`$ECHO "$complete" | $GREP " "`
36747      if test "x$has_space" != x; then
36748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36750      fi
36751      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36752    fi
36753  fi
36754
36755  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36756  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36757  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36758  # "foo.exe" is OK but "foo" is an error.
36759  #
36760  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36761  # It is also a way to make sure we got the proper file name for the real test later on.
36762  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36763  if test "x$test_shortpath" = x; then
36764    # Short path failed, file does not exist as specified.
36765    # Try adding .exe or .cmd
36766    if test -f "${new_path}.exe"; then
36767      input_to_shortpath="${new_path}.exe"
36768    elif test -f "${new_path}.cmd"; then
36769      input_to_shortpath="${new_path}.cmd"
36770    else
36771      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36772$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36773      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36774$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36775      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36776    fi
36777  else
36778    input_to_shortpath="$new_path"
36779  fi
36780
36781  # Call helper function which possibly converts this using DOS-style short mode.
36782  # If so, the updated path is stored in $new_path.
36783  new_path="$input_to_shortpath"
36784
36785  input_path="$input_to_shortpath"
36786  # Check if we need to convert this using DOS-style short mode. If the path
36787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36788  # take no chances and rewrite it.
36789  # Note: m4 eats our [], so we need to use [ and ] instead.
36790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36791  if test "x$has_forbidden_chars" != x; then
36792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36796      # Going to short mode and back again did indeed matter. Since short mode is
36797      # case insensitive, let's make it lowercase to improve readability.
36798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36799      # Now convert it back to Unix-stile (cygpath)
36800      input_path=`$CYGPATH -u "$shortmode_path"`
36801      new_path="$input_path"
36802    fi
36803  fi
36804
36805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36806  if test "x$test_cygdrive_prefix" = x; then
36807    # As a simple fix, exclude /usr/bin since it's not a real path.
36808    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36810      # a path prefixed by /cygdrive for fixpath to work.
36811      new_path="$CYGWIN_ROOT_PATH$input_path"
36812    fi
36813  fi
36814
36815  # remove trailing .exe if any
36816  new_path="${new_path/%.exe/}"
36817
36818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36819
36820  # First separate the path from the arguments. This will split at the first
36821  # space.
36822  complete="$STRIP"
36823  path="${complete%% *}"
36824  tmp="$complete EOL"
36825  arguments="${tmp#* }"
36826
36827  # Input might be given as Windows format, start by converting to
36828  # unix format.
36829  new_path="$path"
36830
36831  windows_path="$new_path"
36832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36833    unix_path=`$CYGPATH -u "$windows_path"`
36834    new_path="$unix_path"
36835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36837    new_path="$unix_path"
36838  fi
36839
36840
36841  # Now try to locate executable using which
36842  new_path=`$WHICH "$new_path" 2> /dev/null`
36843
36844  if test "x$new_path" = x; then
36845    # Oops. Which didn't find the executable.
36846    # The splitting of arguments from the executable at a space might have been incorrect,
36847    # since paths with space are more likely in Windows. Give it another try with the whole
36848    # argument.
36849    path="$complete"
36850    arguments="EOL"
36851    new_path="$path"
36852
36853  windows_path="$new_path"
36854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36855    unix_path=`$CYGPATH -u "$windows_path"`
36856    new_path="$unix_path"
36857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36859    new_path="$unix_path"
36860  fi
36861
36862
36863    new_path=`$WHICH "$new_path" 2> /dev/null`
36864
36865    if test "x$new_path" = x; then
36866      # It's still not found. Now this is an unrecoverable error.
36867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36868$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36869      has_space=`$ECHO "$complete" | $GREP " "`
36870      if test "x$has_space" != x; then
36871        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36872$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36873      fi
36874      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36875    fi
36876  fi
36877
36878  # Now new_path has a complete unix path to the binary
36879  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36880    # Keep paths in /bin as-is, but remove trailing .exe if any
36881    new_path="${new_path/%.exe/}"
36882    # Do not save /bin paths to all_fixpath_prefixes!
36883  else
36884    # Not in mixed or Windows style, start by that.
36885    new_path=`cmd //c echo $new_path`
36886
36887  input_path="$new_path"
36888  # Check if we need to convert this using DOS-style short mode. If the path
36889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36890  # take no chances and rewrite it.
36891  # Note: m4 eats our [], so we need to use [ and ] instead.
36892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36893  if test "x$has_forbidden_chars" != x; then
36894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36896  fi
36897
36898    # Output is in $new_path
36899
36900  windows_path="$new_path"
36901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36902    unix_path=`$CYGPATH -u "$windows_path"`
36903    new_path="$unix_path"
36904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36906    new_path="$unix_path"
36907  fi
36908
36909    # remove trailing .exe if any
36910    new_path="${new_path/%.exe/}"
36911
36912    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36913    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36914  fi
36915
36916  else
36917    # We're on a posix platform. Hooray! :)
36918    # First separate the path from the arguments. This will split at the first
36919    # space.
36920    complete="$STRIP"
36921    path="${complete%% *}"
36922    tmp="$complete EOL"
36923    arguments="${tmp#* }"
36924
36925    # Cannot rely on the command "which" here since it doesn't always work.
36926    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36927    if test -z "$is_absolute_path"; then
36928      # Path to executable is not absolute. Find it.
36929      IFS_save="$IFS"
36930      IFS=:
36931      for p in $PATH; do
36932        if test -f "$p/$path" && test -x "$p/$path"; then
36933          new_path="$p/$path"
36934          break
36935        fi
36936      done
36937      IFS="$IFS_save"
36938    else
36939      # This is an absolute path, we can use it without further modifications.
36940      new_path="$path"
36941    fi
36942
36943    if test "x$new_path" = x; then
36944      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36945$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36946      has_space=`$ECHO "$complete" | $GREP " "`
36947      if test "x$has_space" != x; then
36948        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36949$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36950      fi
36951      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36952    fi
36953  fi
36954
36955  # Now join together the path and the arguments once again
36956  if test "x$arguments" != xEOL; then
36957    new_complete="$new_path ${arguments% *}"
36958  else
36959    new_complete="$new_path"
36960  fi
36961
36962  if test "x$complete" != "x$new_complete"; then
36963    STRIP="$new_complete"
36964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
36965$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
36966  fi
36967
36968
36969
36970  # Publish this variable in the help.
36971
36972
36973  if test "x$NM" = x; then
36974    # The variable is not set by user, try to locate tool using the code snippet
36975    if test -n "$ac_tool_prefix"; then
36976  for ac_prog in nm
36977  do
36978    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36979set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36981$as_echo_n "checking for $ac_word... " >&6; }
36982if ${ac_cv_prog_NM+:} false; then :
36983  $as_echo_n "(cached) " >&6
36984else
36985  if test -n "$NM"; then
36986  ac_cv_prog_NM="$NM" # Let the user override the test.
36987else
36988as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36989for as_dir in $PATH
36990do
36991  IFS=$as_save_IFS
36992  test -z "$as_dir" && as_dir=.
36993    for ac_exec_ext in '' $ac_executable_extensions; do
36994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36995    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
36996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36997    break 2
36998  fi
36999done
37000  done
37001IFS=$as_save_IFS
37002
37003fi
37004fi
37005NM=$ac_cv_prog_NM
37006if test -n "$NM"; then
37007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37008$as_echo "$NM" >&6; }
37009else
37010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37011$as_echo "no" >&6; }
37012fi
37013
37014
37015    test -n "$NM" && break
37016  done
37017fi
37018if test -z "$NM"; then
37019  ac_ct_NM=$NM
37020  for ac_prog in nm
37021do
37022  # Extract the first word of "$ac_prog", so it can be a program name with args.
37023set dummy $ac_prog; ac_word=$2
37024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37025$as_echo_n "checking for $ac_word... " >&6; }
37026if ${ac_cv_prog_ac_ct_NM+:} false; then :
37027  $as_echo_n "(cached) " >&6
37028else
37029  if test -n "$ac_ct_NM"; then
37030  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37031else
37032as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37033for as_dir in $PATH
37034do
37035  IFS=$as_save_IFS
37036  test -z "$as_dir" && as_dir=.
37037    for ac_exec_ext in '' $ac_executable_extensions; do
37038  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37039    ac_cv_prog_ac_ct_NM="$ac_prog"
37040    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37041    break 2
37042  fi
37043done
37044  done
37045IFS=$as_save_IFS
37046
37047fi
37048fi
37049ac_ct_NM=$ac_cv_prog_ac_ct_NM
37050if test -n "$ac_ct_NM"; then
37051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37052$as_echo "$ac_ct_NM" >&6; }
37053else
37054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37055$as_echo "no" >&6; }
37056fi
37057
37058
37059  test -n "$ac_ct_NM" && break
37060done
37061
37062  if test "x$ac_ct_NM" = x; then
37063    NM=""
37064  else
37065    case $cross_compiling:$ac_tool_warned in
37066yes:)
37067{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37068$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37069ac_tool_warned=yes ;;
37070esac
37071    NM=$ac_ct_NM
37072  fi
37073fi
37074
37075  else
37076    # The variable is set, but is it from the command line or the environment?
37077
37078    # Try to remove the string !NM! from our list.
37079    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37080    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37081      # If it failed, the variable was not from the command line. Ignore it,
37082      # but warn the user (except for BASH, which is always set by the calling BASH).
37083      if test "xNM" != xBASH; then
37084        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37085$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37086      fi
37087      # Try to locate tool using the code snippet
37088      if test -n "$ac_tool_prefix"; then
37089  for ac_prog in nm
37090  do
37091    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37092set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37094$as_echo_n "checking for $ac_word... " >&6; }
37095if ${ac_cv_prog_NM+:} false; then :
37096  $as_echo_n "(cached) " >&6
37097else
37098  if test -n "$NM"; then
37099  ac_cv_prog_NM="$NM" # Let the user override the test.
37100else
37101as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37102for as_dir in $PATH
37103do
37104  IFS=$as_save_IFS
37105  test -z "$as_dir" && as_dir=.
37106    for ac_exec_ext in '' $ac_executable_extensions; do
37107  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37108    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37109    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37110    break 2
37111  fi
37112done
37113  done
37114IFS=$as_save_IFS
37115
37116fi
37117fi
37118NM=$ac_cv_prog_NM
37119if test -n "$NM"; then
37120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37121$as_echo "$NM" >&6; }
37122else
37123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37124$as_echo "no" >&6; }
37125fi
37126
37127
37128    test -n "$NM" && break
37129  done
37130fi
37131if test -z "$NM"; then
37132  ac_ct_NM=$NM
37133  for ac_prog in nm
37134do
37135  # Extract the first word of "$ac_prog", so it can be a program name with args.
37136set dummy $ac_prog; ac_word=$2
37137{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37138$as_echo_n "checking for $ac_word... " >&6; }
37139if ${ac_cv_prog_ac_ct_NM+:} false; then :
37140  $as_echo_n "(cached) " >&6
37141else
37142  if test -n "$ac_ct_NM"; then
37143  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37144else
37145as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37146for as_dir in $PATH
37147do
37148  IFS=$as_save_IFS
37149  test -z "$as_dir" && as_dir=.
37150    for ac_exec_ext in '' $ac_executable_extensions; do
37151  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37152    ac_cv_prog_ac_ct_NM="$ac_prog"
37153    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37154    break 2
37155  fi
37156done
37157  done
37158IFS=$as_save_IFS
37159
37160fi
37161fi
37162ac_ct_NM=$ac_cv_prog_ac_ct_NM
37163if test -n "$ac_ct_NM"; then
37164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37165$as_echo "$ac_ct_NM" >&6; }
37166else
37167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37168$as_echo "no" >&6; }
37169fi
37170
37171
37172  test -n "$ac_ct_NM" && break
37173done
37174
37175  if test "x$ac_ct_NM" = x; then
37176    NM=""
37177  else
37178    case $cross_compiling:$ac_tool_warned in
37179yes:)
37180{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37181$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37182ac_tool_warned=yes ;;
37183esac
37184    NM=$ac_ct_NM
37185  fi
37186fi
37187
37188    else
37189      # If it succeeded, then it was overridden by the user. We will use it
37190      # for the tool.
37191
37192      # First remove it from the list of overridden variables, so we can test
37193      # for unknown variables in the end.
37194      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37195
37196      # Check if the provided tool contains a complete path.
37197      tool_specified="$NM"
37198      tool_basename="${tool_specified##*/}"
37199      if test "x$tool_basename" = "x$tool_specified"; then
37200        # A command without a complete path is provided, search $PATH.
37201        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37202$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37203        # Extract the first word of "$tool_basename", so it can be a program name with args.
37204set dummy $tool_basename; ac_word=$2
37205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37206$as_echo_n "checking for $ac_word... " >&6; }
37207if ${ac_cv_path_NM+:} false; then :
37208  $as_echo_n "(cached) " >&6
37209else
37210  case $NM in
37211  [\\/]* | ?:[\\/]*)
37212  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37213  ;;
37214  *)
37215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37216for as_dir in $PATH
37217do
37218  IFS=$as_save_IFS
37219  test -z "$as_dir" && as_dir=.
37220    for ac_exec_ext in '' $ac_executable_extensions; do
37221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37222    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37224    break 2
37225  fi
37226done
37227  done
37228IFS=$as_save_IFS
37229
37230  ;;
37231esac
37232fi
37233NM=$ac_cv_path_NM
37234if test -n "$NM"; then
37235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37236$as_echo "$NM" >&6; }
37237else
37238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37239$as_echo "no" >&6; }
37240fi
37241
37242
37243        if test "x$NM" = x; then
37244          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37245        fi
37246      else
37247        # Otherwise we believe it is a complete path. Use it as it is.
37248        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37249$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37251$as_echo_n "checking for NM... " >&6; }
37252        if test ! -x "$tool_specified"; then
37253          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37254$as_echo "not found" >&6; }
37255          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37256        fi
37257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37258$as_echo "$tool_specified" >&6; }
37259      fi
37260    fi
37261  fi
37262
37263
37264
37265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37266
37267  # First separate the path from the arguments. This will split at the first
37268  # space.
37269  complete="$NM"
37270  path="${complete%% *}"
37271  tmp="$complete EOL"
37272  arguments="${tmp#* }"
37273
37274  # Input might be given as Windows format, start by converting to
37275  # unix format.
37276  new_path=`$CYGPATH -u "$path"`
37277
37278  # Now try to locate executable using which
37279  new_path=`$WHICH "$new_path" 2> /dev/null`
37280  # bat and cmd files are not always considered executable in cygwin causing which
37281  # to not find them
37282  if test "x$new_path" = x \
37283      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37284      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37285    new_path=`$CYGPATH -u "$path"`
37286  fi
37287  if test "x$new_path" = x; then
37288    # Oops. Which didn't find the executable.
37289    # The splitting of arguments from the executable at a space might have been incorrect,
37290    # since paths with space are more likely in Windows. Give it another try with the whole
37291    # argument.
37292    path="$complete"
37293    arguments="EOL"
37294    new_path=`$CYGPATH -u "$path"`
37295    new_path=`$WHICH "$new_path" 2> /dev/null`
37296    # bat and cmd files are not always considered executable in cygwin causing which
37297    # to not find them
37298    if test "x$new_path" = x \
37299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37301      new_path=`$CYGPATH -u "$path"`
37302    fi
37303    if test "x$new_path" = x; then
37304      # It's still not found. Now this is an unrecoverable error.
37305      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37306$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37307      has_space=`$ECHO "$complete" | $GREP " "`
37308      if test "x$has_space" != x; then
37309        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37310$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37311      fi
37312      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37313    fi
37314  fi
37315
37316  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37317  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37318  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37319  # "foo.exe" is OK but "foo" is an error.
37320  #
37321  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37322  # It is also a way to make sure we got the proper file name for the real test later on.
37323  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37324  if test "x$test_shortpath" = x; then
37325    # Short path failed, file does not exist as specified.
37326    # Try adding .exe or .cmd
37327    if test -f "${new_path}.exe"; then
37328      input_to_shortpath="${new_path}.exe"
37329    elif test -f "${new_path}.cmd"; then
37330      input_to_shortpath="${new_path}.cmd"
37331    else
37332      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37333$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37334      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37335$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37336      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37337    fi
37338  else
37339    input_to_shortpath="$new_path"
37340  fi
37341
37342  # Call helper function which possibly converts this using DOS-style short mode.
37343  # If so, the updated path is stored in $new_path.
37344  new_path="$input_to_shortpath"
37345
37346  input_path="$input_to_shortpath"
37347  # Check if we need to convert this using DOS-style short mode. If the path
37348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37349  # take no chances and rewrite it.
37350  # Note: m4 eats our [], so we need to use [ and ] instead.
37351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37352  if test "x$has_forbidden_chars" != x; then
37353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37354    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37355    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37356    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37357      # Going to short mode and back again did indeed matter. Since short mode is
37358      # case insensitive, let's make it lowercase to improve readability.
37359      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37360      # Now convert it back to Unix-stile (cygpath)
37361      input_path=`$CYGPATH -u "$shortmode_path"`
37362      new_path="$input_path"
37363    fi
37364  fi
37365
37366  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37367  if test "x$test_cygdrive_prefix" = x; then
37368    # As a simple fix, exclude /usr/bin since it's not a real path.
37369    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37370      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37371      # a path prefixed by /cygdrive for fixpath to work.
37372      new_path="$CYGWIN_ROOT_PATH$input_path"
37373    fi
37374  fi
37375
37376  # remove trailing .exe if any
37377  new_path="${new_path/%.exe/}"
37378
37379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37380
37381  # First separate the path from the arguments. This will split at the first
37382  # space.
37383  complete="$NM"
37384  path="${complete%% *}"
37385  tmp="$complete EOL"
37386  arguments="${tmp#* }"
37387
37388  # Input might be given as Windows format, start by converting to
37389  # unix format.
37390  new_path="$path"
37391
37392  windows_path="$new_path"
37393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37394    unix_path=`$CYGPATH -u "$windows_path"`
37395    new_path="$unix_path"
37396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37398    new_path="$unix_path"
37399  fi
37400
37401
37402  # Now try to locate executable using which
37403  new_path=`$WHICH "$new_path" 2> /dev/null`
37404
37405  if test "x$new_path" = x; then
37406    # Oops. Which didn't find the executable.
37407    # The splitting of arguments from the executable at a space might have been incorrect,
37408    # since paths with space are more likely in Windows. Give it another try with the whole
37409    # argument.
37410    path="$complete"
37411    arguments="EOL"
37412    new_path="$path"
37413
37414  windows_path="$new_path"
37415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37416    unix_path=`$CYGPATH -u "$windows_path"`
37417    new_path="$unix_path"
37418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37420    new_path="$unix_path"
37421  fi
37422
37423
37424    new_path=`$WHICH "$new_path" 2> /dev/null`
37425
37426    if test "x$new_path" = x; then
37427      # It's still not found. Now this is an unrecoverable error.
37428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37429$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37430      has_space=`$ECHO "$complete" | $GREP " "`
37431      if test "x$has_space" != x; then
37432        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37433$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37434      fi
37435      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37436    fi
37437  fi
37438
37439  # Now new_path has a complete unix path to the binary
37440  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37441    # Keep paths in /bin as-is, but remove trailing .exe if any
37442    new_path="${new_path/%.exe/}"
37443    # Do not save /bin paths to all_fixpath_prefixes!
37444  else
37445    # Not in mixed or Windows style, start by that.
37446    new_path=`cmd //c echo $new_path`
37447
37448  input_path="$new_path"
37449  # Check if we need to convert this using DOS-style short mode. If the path
37450  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37451  # take no chances and rewrite it.
37452  # Note: m4 eats our [], so we need to use [ and ] instead.
37453  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37454  if test "x$has_forbidden_chars" != x; then
37455    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37456    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37457  fi
37458
37459    # Output is in $new_path
37460
37461  windows_path="$new_path"
37462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37463    unix_path=`$CYGPATH -u "$windows_path"`
37464    new_path="$unix_path"
37465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37467    new_path="$unix_path"
37468  fi
37469
37470    # remove trailing .exe if any
37471    new_path="${new_path/%.exe/}"
37472
37473    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37474    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37475  fi
37476
37477  else
37478    # We're on a posix platform. Hooray! :)
37479    # First separate the path from the arguments. This will split at the first
37480    # space.
37481    complete="$NM"
37482    path="${complete%% *}"
37483    tmp="$complete EOL"
37484    arguments="${tmp#* }"
37485
37486    # Cannot rely on the command "which" here since it doesn't always work.
37487    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37488    if test -z "$is_absolute_path"; then
37489      # Path to executable is not absolute. Find it.
37490      IFS_save="$IFS"
37491      IFS=:
37492      for p in $PATH; do
37493        if test -f "$p/$path" && test -x "$p/$path"; then
37494          new_path="$p/$path"
37495          break
37496        fi
37497      done
37498      IFS="$IFS_save"
37499    else
37500      # This is an absolute path, we can use it without further modifications.
37501      new_path="$path"
37502    fi
37503
37504    if test "x$new_path" = x; then
37505      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37506$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37507      has_space=`$ECHO "$complete" | $GREP " "`
37508      if test "x$has_space" != x; then
37509        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37510$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37511      fi
37512      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37513    fi
37514  fi
37515
37516  # Now join together the path and the arguments once again
37517  if test "x$arguments" != xEOL; then
37518    new_complete="$new_path ${arguments% *}"
37519  else
37520    new_complete="$new_path"
37521  fi
37522
37523  if test "x$complete" != "x$new_complete"; then
37524    NM="$new_complete"
37525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37526$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37527  fi
37528
37529    GNM="$NM"
37530
37531  fi
37532
37533  # objcopy is used for moving debug symbols to separate files when
37534  # full debug symbols are enabled.
37535  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37536
37537
37538  # Publish this variable in the help.
37539
37540
37541  if test "x$OBJCOPY" = x; then
37542    # The variable is not set by user, try to locate tool using the code snippet
37543    if test -n "$ac_tool_prefix"; then
37544  for ac_prog in gobjcopy objcopy
37545  do
37546    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37547set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37548{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37549$as_echo_n "checking for $ac_word... " >&6; }
37550if ${ac_cv_prog_OBJCOPY+:} false; then :
37551  $as_echo_n "(cached) " >&6
37552else
37553  if test -n "$OBJCOPY"; then
37554  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37555else
37556as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37557for as_dir in $PATH
37558do
37559  IFS=$as_save_IFS
37560  test -z "$as_dir" && as_dir=.
37561    for ac_exec_ext in '' $ac_executable_extensions; do
37562  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37563    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37564    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37565    break 2
37566  fi
37567done
37568  done
37569IFS=$as_save_IFS
37570
37571fi
37572fi
37573OBJCOPY=$ac_cv_prog_OBJCOPY
37574if test -n "$OBJCOPY"; then
37575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37576$as_echo "$OBJCOPY" >&6; }
37577else
37578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37579$as_echo "no" >&6; }
37580fi
37581
37582
37583    test -n "$OBJCOPY" && break
37584  done
37585fi
37586if test -z "$OBJCOPY"; then
37587  ac_ct_OBJCOPY=$OBJCOPY
37588  for ac_prog in gobjcopy objcopy
37589do
37590  # Extract the first word of "$ac_prog", so it can be a program name with args.
37591set dummy $ac_prog; ac_word=$2
37592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37593$as_echo_n "checking for $ac_word... " >&6; }
37594if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37595  $as_echo_n "(cached) " >&6
37596else
37597  if test -n "$ac_ct_OBJCOPY"; then
37598  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37599else
37600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37601for as_dir in $PATH
37602do
37603  IFS=$as_save_IFS
37604  test -z "$as_dir" && as_dir=.
37605    for ac_exec_ext in '' $ac_executable_extensions; do
37606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37607    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37609    break 2
37610  fi
37611done
37612  done
37613IFS=$as_save_IFS
37614
37615fi
37616fi
37617ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37618if test -n "$ac_ct_OBJCOPY"; then
37619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37620$as_echo "$ac_ct_OBJCOPY" >&6; }
37621else
37622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37623$as_echo "no" >&6; }
37624fi
37625
37626
37627  test -n "$ac_ct_OBJCOPY" && break
37628done
37629
37630  if test "x$ac_ct_OBJCOPY" = x; then
37631    OBJCOPY=""
37632  else
37633    case $cross_compiling:$ac_tool_warned in
37634yes:)
37635{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37636$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37637ac_tool_warned=yes ;;
37638esac
37639    OBJCOPY=$ac_ct_OBJCOPY
37640  fi
37641fi
37642
37643  else
37644    # The variable is set, but is it from the command line or the environment?
37645
37646    # Try to remove the string !OBJCOPY! from our list.
37647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37649      # If it failed, the variable was not from the command line. Ignore it,
37650      # but warn the user (except for BASH, which is always set by the calling BASH).
37651      if test "xOBJCOPY" != xBASH; then
37652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37653$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37654      fi
37655      # Try to locate tool using the code snippet
37656      if test -n "$ac_tool_prefix"; then
37657  for ac_prog in gobjcopy objcopy
37658  do
37659    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37660set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37662$as_echo_n "checking for $ac_word... " >&6; }
37663if ${ac_cv_prog_OBJCOPY+:} false; then :
37664  $as_echo_n "(cached) " >&6
37665else
37666  if test -n "$OBJCOPY"; then
37667  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37668else
37669as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37670for as_dir in $PATH
37671do
37672  IFS=$as_save_IFS
37673  test -z "$as_dir" && as_dir=.
37674    for ac_exec_ext in '' $ac_executable_extensions; do
37675  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37676    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37677    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37678    break 2
37679  fi
37680done
37681  done
37682IFS=$as_save_IFS
37683
37684fi
37685fi
37686OBJCOPY=$ac_cv_prog_OBJCOPY
37687if test -n "$OBJCOPY"; then
37688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37689$as_echo "$OBJCOPY" >&6; }
37690else
37691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37692$as_echo "no" >&6; }
37693fi
37694
37695
37696    test -n "$OBJCOPY" && break
37697  done
37698fi
37699if test -z "$OBJCOPY"; then
37700  ac_ct_OBJCOPY=$OBJCOPY
37701  for ac_prog in gobjcopy objcopy
37702do
37703  # Extract the first word of "$ac_prog", so it can be a program name with args.
37704set dummy $ac_prog; ac_word=$2
37705{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37706$as_echo_n "checking for $ac_word... " >&6; }
37707if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37708  $as_echo_n "(cached) " >&6
37709else
37710  if test -n "$ac_ct_OBJCOPY"; then
37711  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37712else
37713as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37714for as_dir in $PATH
37715do
37716  IFS=$as_save_IFS
37717  test -z "$as_dir" && as_dir=.
37718    for ac_exec_ext in '' $ac_executable_extensions; do
37719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37720    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37722    break 2
37723  fi
37724done
37725  done
37726IFS=$as_save_IFS
37727
37728fi
37729fi
37730ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37731if test -n "$ac_ct_OBJCOPY"; then
37732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37733$as_echo "$ac_ct_OBJCOPY" >&6; }
37734else
37735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37736$as_echo "no" >&6; }
37737fi
37738
37739
37740  test -n "$ac_ct_OBJCOPY" && break
37741done
37742
37743  if test "x$ac_ct_OBJCOPY" = x; then
37744    OBJCOPY=""
37745  else
37746    case $cross_compiling:$ac_tool_warned in
37747yes:)
37748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37750ac_tool_warned=yes ;;
37751esac
37752    OBJCOPY=$ac_ct_OBJCOPY
37753  fi
37754fi
37755
37756    else
37757      # If it succeeded, then it was overridden by the user. We will use it
37758      # for the tool.
37759
37760      # First remove it from the list of overridden variables, so we can test
37761      # for unknown variables in the end.
37762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37763
37764      # Check if the provided tool contains a complete path.
37765      tool_specified="$OBJCOPY"
37766      tool_basename="${tool_specified##*/}"
37767      if test "x$tool_basename" = "x$tool_specified"; then
37768        # A command without a complete path is provided, search $PATH.
37769        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37770$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37771        # Extract the first word of "$tool_basename", so it can be a program name with args.
37772set dummy $tool_basename; ac_word=$2
37773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37774$as_echo_n "checking for $ac_word... " >&6; }
37775if ${ac_cv_path_OBJCOPY+:} false; then :
37776  $as_echo_n "(cached) " >&6
37777else
37778  case $OBJCOPY in
37779  [\\/]* | ?:[\\/]*)
37780  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37781  ;;
37782  *)
37783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37784for as_dir in $PATH
37785do
37786  IFS=$as_save_IFS
37787  test -z "$as_dir" && as_dir=.
37788    for ac_exec_ext in '' $ac_executable_extensions; do
37789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37790    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37792    break 2
37793  fi
37794done
37795  done
37796IFS=$as_save_IFS
37797
37798  ;;
37799esac
37800fi
37801OBJCOPY=$ac_cv_path_OBJCOPY
37802if test -n "$OBJCOPY"; then
37803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37804$as_echo "$OBJCOPY" >&6; }
37805else
37806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37807$as_echo "no" >&6; }
37808fi
37809
37810
37811        if test "x$OBJCOPY" = x; then
37812          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37813        fi
37814      else
37815        # Otherwise we believe it is a complete path. Use it as it is.
37816        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
37817$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
37818        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
37819$as_echo_n "checking for OBJCOPY... " >&6; }
37820        if test ! -x "$tool_specified"; then
37821          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37822$as_echo "not found" >&6; }
37823          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
37824        fi
37825        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37826$as_echo "$tool_specified" >&6; }
37827      fi
37828    fi
37829  fi
37830
37831
37832    # Only call fixup if objcopy was found.
37833    if test -n "$OBJCOPY"; then
37834
37835  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37836
37837  # First separate the path from the arguments. This will split at the first
37838  # space.
37839  complete="$OBJCOPY"
37840  path="${complete%% *}"
37841  tmp="$complete EOL"
37842  arguments="${tmp#* }"
37843
37844  # Input might be given as Windows format, start by converting to
37845  # unix format.
37846  new_path=`$CYGPATH -u "$path"`
37847
37848  # Now try to locate executable using which
37849  new_path=`$WHICH "$new_path" 2> /dev/null`
37850  # bat and cmd files are not always considered executable in cygwin causing which
37851  # to not find them
37852  if test "x$new_path" = x \
37853      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37854      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37855    new_path=`$CYGPATH -u "$path"`
37856  fi
37857  if test "x$new_path" = x; then
37858    # Oops. Which didn't find the executable.
37859    # The splitting of arguments from the executable at a space might have been incorrect,
37860    # since paths with space are more likely in Windows. Give it another try with the whole
37861    # argument.
37862    path="$complete"
37863    arguments="EOL"
37864    new_path=`$CYGPATH -u "$path"`
37865    new_path=`$WHICH "$new_path" 2> /dev/null`
37866    # bat and cmd files are not always considered executable in cygwin causing which
37867    # to not find them
37868    if test "x$new_path" = x \
37869        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37870        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37871      new_path=`$CYGPATH -u "$path"`
37872    fi
37873    if test "x$new_path" = x; then
37874      # It's still not found. Now this is an unrecoverable error.
37875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37876$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
37877      has_space=`$ECHO "$complete" | $GREP " "`
37878      if test "x$has_space" != x; then
37879        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37880$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37881      fi
37882      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37883    fi
37884  fi
37885
37886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37889  # "foo.exe" is OK but "foo" is an error.
37890  #
37891  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37892  # It is also a way to make sure we got the proper file name for the real test later on.
37893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37894  if test "x$test_shortpath" = x; then
37895    # Short path failed, file does not exist as specified.
37896    # Try adding .exe or .cmd
37897    if test -f "${new_path}.exe"; then
37898      input_to_shortpath="${new_path}.exe"
37899    elif test -f "${new_path}.cmd"; then
37900      input_to_shortpath="${new_path}.cmd"
37901    else
37902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
37903$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
37904      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37905$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37906      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
37907    fi
37908  else
37909    input_to_shortpath="$new_path"
37910  fi
37911
37912  # Call helper function which possibly converts this using DOS-style short mode.
37913  # If so, the updated path is stored in $new_path.
37914  new_path="$input_to_shortpath"
37915
37916  input_path="$input_to_shortpath"
37917  # Check if we need to convert this using DOS-style short mode. If the path
37918  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37919  # take no chances and rewrite it.
37920  # Note: m4 eats our [], so we need to use [ and ] instead.
37921  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37922  if test "x$has_forbidden_chars" != x; then
37923    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37924    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37925    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37926    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37927      # Going to short mode and back again did indeed matter. Since short mode is
37928      # case insensitive, let's make it lowercase to improve readability.
37929      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37930      # Now convert it back to Unix-stile (cygpath)
37931      input_path=`$CYGPATH -u "$shortmode_path"`
37932      new_path="$input_path"
37933    fi
37934  fi
37935
37936  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37937  if test "x$test_cygdrive_prefix" = x; then
37938    # As a simple fix, exclude /usr/bin since it's not a real path.
37939    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37940      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37941      # a path prefixed by /cygdrive for fixpath to work.
37942      new_path="$CYGWIN_ROOT_PATH$input_path"
37943    fi
37944  fi
37945
37946  # remove trailing .exe if any
37947  new_path="${new_path/%.exe/}"
37948
37949  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37950
37951  # First separate the path from the arguments. This will split at the first
37952  # space.
37953  complete="$OBJCOPY"
37954  path="${complete%% *}"
37955  tmp="$complete EOL"
37956  arguments="${tmp#* }"
37957
37958  # Input might be given as Windows format, start by converting to
37959  # unix format.
37960  new_path="$path"
37961
37962  windows_path="$new_path"
37963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37964    unix_path=`$CYGPATH -u "$windows_path"`
37965    new_path="$unix_path"
37966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37968    new_path="$unix_path"
37969  fi
37970
37971
37972  # Now try to locate executable using which
37973  new_path=`$WHICH "$new_path" 2> /dev/null`
37974
37975  if test "x$new_path" = x; then
37976    # Oops. Which didn't find the executable.
37977    # The splitting of arguments from the executable at a space might have been incorrect,
37978    # since paths with space are more likely in Windows. Give it another try with the whole
37979    # argument.
37980    path="$complete"
37981    arguments="EOL"
37982    new_path="$path"
37983
37984  windows_path="$new_path"
37985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37986    unix_path=`$CYGPATH -u "$windows_path"`
37987    new_path="$unix_path"
37988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37990    new_path="$unix_path"
37991  fi
37992
37993
37994    new_path=`$WHICH "$new_path" 2> /dev/null`
37995
37996    if test "x$new_path" = x; then
37997      # It's still not found. Now this is an unrecoverable error.
37998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
37999$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38000      has_space=`$ECHO "$complete" | $GREP " "`
38001      if test "x$has_space" != x; then
38002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38004      fi
38005      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38006    fi
38007  fi
38008
38009  # Now new_path has a complete unix path to the binary
38010  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38011    # Keep paths in /bin as-is, but remove trailing .exe if any
38012    new_path="${new_path/%.exe/}"
38013    # Do not save /bin paths to all_fixpath_prefixes!
38014  else
38015    # Not in mixed or Windows style, start by that.
38016    new_path=`cmd //c echo $new_path`
38017
38018  input_path="$new_path"
38019  # Check if we need to convert this using DOS-style short mode. If the path
38020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38021  # take no chances and rewrite it.
38022  # Note: m4 eats our [], so we need to use [ and ] instead.
38023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38024  if test "x$has_forbidden_chars" != x; then
38025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38027  fi
38028
38029    # Output is in $new_path
38030
38031  windows_path="$new_path"
38032  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38033    unix_path=`$CYGPATH -u "$windows_path"`
38034    new_path="$unix_path"
38035  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38036    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38037    new_path="$unix_path"
38038  fi
38039
38040    # remove trailing .exe if any
38041    new_path="${new_path/%.exe/}"
38042
38043    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38044    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38045  fi
38046
38047  else
38048    # We're on a posix platform. Hooray! :)
38049    # First separate the path from the arguments. This will split at the first
38050    # space.
38051    complete="$OBJCOPY"
38052    path="${complete%% *}"
38053    tmp="$complete EOL"
38054    arguments="${tmp#* }"
38055
38056    # Cannot rely on the command "which" here since it doesn't always work.
38057    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38058    if test -z "$is_absolute_path"; then
38059      # Path to executable is not absolute. Find it.
38060      IFS_save="$IFS"
38061      IFS=:
38062      for p in $PATH; do
38063        if test -f "$p/$path" && test -x "$p/$path"; then
38064          new_path="$p/$path"
38065          break
38066        fi
38067      done
38068      IFS="$IFS_save"
38069    else
38070      # This is an absolute path, we can use it without further modifications.
38071      new_path="$path"
38072    fi
38073
38074    if test "x$new_path" = x; then
38075      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38076$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38077      has_space=`$ECHO "$complete" | $GREP " "`
38078      if test "x$has_space" != x; then
38079        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38080$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38081      fi
38082      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38083    fi
38084  fi
38085
38086  # Now join together the path and the arguments once again
38087  if test "x$arguments" != xEOL; then
38088    new_complete="$new_path ${arguments% *}"
38089  else
38090    new_complete="$new_path"
38091  fi
38092
38093  if test "x$complete" != "x$new_complete"; then
38094    OBJCOPY="$new_complete"
38095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38096$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38097  fi
38098
38099    fi
38100  fi
38101
38102
38103
38104  # Publish this variable in the help.
38105
38106
38107  if test "x$OBJDUMP" = x; then
38108    # The variable is not set by user, try to locate tool using the code snippet
38109    if test -n "$ac_tool_prefix"; then
38110  for ac_prog in gobjdump objdump
38111  do
38112    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38113set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38115$as_echo_n "checking for $ac_word... " >&6; }
38116if ${ac_cv_prog_OBJDUMP+:} false; then :
38117  $as_echo_n "(cached) " >&6
38118else
38119  if test -n "$OBJDUMP"; then
38120  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38121else
38122as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38123for as_dir in $PATH
38124do
38125  IFS=$as_save_IFS
38126  test -z "$as_dir" && as_dir=.
38127    for ac_exec_ext in '' $ac_executable_extensions; do
38128  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38129    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38130    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38131    break 2
38132  fi
38133done
38134  done
38135IFS=$as_save_IFS
38136
38137fi
38138fi
38139OBJDUMP=$ac_cv_prog_OBJDUMP
38140if test -n "$OBJDUMP"; then
38141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38142$as_echo "$OBJDUMP" >&6; }
38143else
38144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38145$as_echo "no" >&6; }
38146fi
38147
38148
38149    test -n "$OBJDUMP" && break
38150  done
38151fi
38152if test -z "$OBJDUMP"; then
38153  ac_ct_OBJDUMP=$OBJDUMP
38154  for ac_prog in gobjdump objdump
38155do
38156  # Extract the first word of "$ac_prog", so it can be a program name with args.
38157set dummy $ac_prog; ac_word=$2
38158{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38159$as_echo_n "checking for $ac_word... " >&6; }
38160if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38161  $as_echo_n "(cached) " >&6
38162else
38163  if test -n "$ac_ct_OBJDUMP"; then
38164  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38165else
38166as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38167for as_dir in $PATH
38168do
38169  IFS=$as_save_IFS
38170  test -z "$as_dir" && as_dir=.
38171    for ac_exec_ext in '' $ac_executable_extensions; do
38172  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38173    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38174    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38175    break 2
38176  fi
38177done
38178  done
38179IFS=$as_save_IFS
38180
38181fi
38182fi
38183ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38184if test -n "$ac_ct_OBJDUMP"; then
38185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38186$as_echo "$ac_ct_OBJDUMP" >&6; }
38187else
38188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38189$as_echo "no" >&6; }
38190fi
38191
38192
38193  test -n "$ac_ct_OBJDUMP" && break
38194done
38195
38196  if test "x$ac_ct_OBJDUMP" = x; then
38197    OBJDUMP=""
38198  else
38199    case $cross_compiling:$ac_tool_warned in
38200yes:)
38201{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38202$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38203ac_tool_warned=yes ;;
38204esac
38205    OBJDUMP=$ac_ct_OBJDUMP
38206  fi
38207fi
38208
38209  else
38210    # The variable is set, but is it from the command line or the environment?
38211
38212    # Try to remove the string !OBJDUMP! from our list.
38213    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38214    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38215      # If it failed, the variable was not from the command line. Ignore it,
38216      # but warn the user (except for BASH, which is always set by the calling BASH).
38217      if test "xOBJDUMP" != xBASH; then
38218        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38219$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38220      fi
38221      # Try to locate tool using the code snippet
38222      if test -n "$ac_tool_prefix"; then
38223  for ac_prog in gobjdump objdump
38224  do
38225    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38226set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38228$as_echo_n "checking for $ac_word... " >&6; }
38229if ${ac_cv_prog_OBJDUMP+:} false; then :
38230  $as_echo_n "(cached) " >&6
38231else
38232  if test -n "$OBJDUMP"; then
38233  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38234else
38235as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38236for as_dir in $PATH
38237do
38238  IFS=$as_save_IFS
38239  test -z "$as_dir" && as_dir=.
38240    for ac_exec_ext in '' $ac_executable_extensions; do
38241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38242    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38244    break 2
38245  fi
38246done
38247  done
38248IFS=$as_save_IFS
38249
38250fi
38251fi
38252OBJDUMP=$ac_cv_prog_OBJDUMP
38253if test -n "$OBJDUMP"; then
38254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38255$as_echo "$OBJDUMP" >&6; }
38256else
38257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38258$as_echo "no" >&6; }
38259fi
38260
38261
38262    test -n "$OBJDUMP" && break
38263  done
38264fi
38265if test -z "$OBJDUMP"; then
38266  ac_ct_OBJDUMP=$OBJDUMP
38267  for ac_prog in gobjdump objdump
38268do
38269  # Extract the first word of "$ac_prog", so it can be a program name with args.
38270set dummy $ac_prog; ac_word=$2
38271{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38272$as_echo_n "checking for $ac_word... " >&6; }
38273if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38274  $as_echo_n "(cached) " >&6
38275else
38276  if test -n "$ac_ct_OBJDUMP"; then
38277  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38278else
38279as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38280for as_dir in $PATH
38281do
38282  IFS=$as_save_IFS
38283  test -z "$as_dir" && as_dir=.
38284    for ac_exec_ext in '' $ac_executable_extensions; do
38285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38286    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38288    break 2
38289  fi
38290done
38291  done
38292IFS=$as_save_IFS
38293
38294fi
38295fi
38296ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38297if test -n "$ac_ct_OBJDUMP"; then
38298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38299$as_echo "$ac_ct_OBJDUMP" >&6; }
38300else
38301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38302$as_echo "no" >&6; }
38303fi
38304
38305
38306  test -n "$ac_ct_OBJDUMP" && break
38307done
38308
38309  if test "x$ac_ct_OBJDUMP" = x; then
38310    OBJDUMP=""
38311  else
38312    case $cross_compiling:$ac_tool_warned in
38313yes:)
38314{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38315$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38316ac_tool_warned=yes ;;
38317esac
38318    OBJDUMP=$ac_ct_OBJDUMP
38319  fi
38320fi
38321
38322    else
38323      # If it succeeded, then it was overridden by the user. We will use it
38324      # for the tool.
38325
38326      # First remove it from the list of overridden variables, so we can test
38327      # for unknown variables in the end.
38328      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38329
38330      # Check if the provided tool contains a complete path.
38331      tool_specified="$OBJDUMP"
38332      tool_basename="${tool_specified##*/}"
38333      if test "x$tool_basename" = "x$tool_specified"; then
38334        # A command without a complete path is provided, search $PATH.
38335        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38336$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38337        # Extract the first word of "$tool_basename", so it can be a program name with args.
38338set dummy $tool_basename; ac_word=$2
38339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38340$as_echo_n "checking for $ac_word... " >&6; }
38341if ${ac_cv_path_OBJDUMP+:} false; then :
38342  $as_echo_n "(cached) " >&6
38343else
38344  case $OBJDUMP in
38345  [\\/]* | ?:[\\/]*)
38346  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38347  ;;
38348  *)
38349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38350for as_dir in $PATH
38351do
38352  IFS=$as_save_IFS
38353  test -z "$as_dir" && as_dir=.
38354    for ac_exec_ext in '' $ac_executable_extensions; do
38355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38356    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38358    break 2
38359  fi
38360done
38361  done
38362IFS=$as_save_IFS
38363
38364  ;;
38365esac
38366fi
38367OBJDUMP=$ac_cv_path_OBJDUMP
38368if test -n "$OBJDUMP"; then
38369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38370$as_echo "$OBJDUMP" >&6; }
38371else
38372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38373$as_echo "no" >&6; }
38374fi
38375
38376
38377        if test "x$OBJDUMP" = x; then
38378          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38379        fi
38380      else
38381        # Otherwise we believe it is a complete path. Use it as it is.
38382        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38383$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38384        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38385$as_echo_n "checking for OBJDUMP... " >&6; }
38386        if test ! -x "$tool_specified"; then
38387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38388$as_echo "not found" >&6; }
38389          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38390        fi
38391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38392$as_echo "$tool_specified" >&6; }
38393      fi
38394    fi
38395  fi
38396
38397
38398  if test "x$OBJDUMP" != x; then
38399    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38400    # bails if argument is missing.
38401
38402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38403
38404  # First separate the path from the arguments. This will split at the first
38405  # space.
38406  complete="$OBJDUMP"
38407  path="${complete%% *}"
38408  tmp="$complete EOL"
38409  arguments="${tmp#* }"
38410
38411  # Input might be given as Windows format, start by converting to
38412  # unix format.
38413  new_path=`$CYGPATH -u "$path"`
38414
38415  # Now try to locate executable using which
38416  new_path=`$WHICH "$new_path" 2> /dev/null`
38417  # bat and cmd files are not always considered executable in cygwin causing which
38418  # to not find them
38419  if test "x$new_path" = x \
38420      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38421      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38422    new_path=`$CYGPATH -u "$path"`
38423  fi
38424  if test "x$new_path" = x; then
38425    # Oops. Which didn't find the executable.
38426    # The splitting of arguments from the executable at a space might have been incorrect,
38427    # since paths with space are more likely in Windows. Give it another try with the whole
38428    # argument.
38429    path="$complete"
38430    arguments="EOL"
38431    new_path=`$CYGPATH -u "$path"`
38432    new_path=`$WHICH "$new_path" 2> /dev/null`
38433    # bat and cmd files are not always considered executable in cygwin causing which
38434    # to not find them
38435    if test "x$new_path" = x \
38436        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38437        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38438      new_path=`$CYGPATH -u "$path"`
38439    fi
38440    if test "x$new_path" = x; then
38441      # It's still not found. Now this is an unrecoverable error.
38442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38443$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38444      has_space=`$ECHO "$complete" | $GREP " "`
38445      if test "x$has_space" != x; then
38446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38448      fi
38449      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38450    fi
38451  fi
38452
38453  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38454  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38455  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38456  # "foo.exe" is OK but "foo" is an error.
38457  #
38458  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38459  # It is also a way to make sure we got the proper file name for the real test later on.
38460  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38461  if test "x$test_shortpath" = x; then
38462    # Short path failed, file does not exist as specified.
38463    # Try adding .exe or .cmd
38464    if test -f "${new_path}.exe"; then
38465      input_to_shortpath="${new_path}.exe"
38466    elif test -f "${new_path}.cmd"; then
38467      input_to_shortpath="${new_path}.cmd"
38468    else
38469      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38470$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38471      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38472$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38473      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38474    fi
38475  else
38476    input_to_shortpath="$new_path"
38477  fi
38478
38479  # Call helper function which possibly converts this using DOS-style short mode.
38480  # If so, the updated path is stored in $new_path.
38481  new_path="$input_to_shortpath"
38482
38483  input_path="$input_to_shortpath"
38484  # Check if we need to convert this using DOS-style short mode. If the path
38485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38486  # take no chances and rewrite it.
38487  # Note: m4 eats our [], so we need to use [ and ] instead.
38488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38489  if test "x$has_forbidden_chars" != x; then
38490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38494      # Going to short mode and back again did indeed matter. Since short mode is
38495      # case insensitive, let's make it lowercase to improve readability.
38496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38497      # Now convert it back to Unix-stile (cygpath)
38498      input_path=`$CYGPATH -u "$shortmode_path"`
38499      new_path="$input_path"
38500    fi
38501  fi
38502
38503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38504  if test "x$test_cygdrive_prefix" = x; then
38505    # As a simple fix, exclude /usr/bin since it's not a real path.
38506    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38508      # a path prefixed by /cygdrive for fixpath to work.
38509      new_path="$CYGWIN_ROOT_PATH$input_path"
38510    fi
38511  fi
38512
38513  # remove trailing .exe if any
38514  new_path="${new_path/%.exe/}"
38515
38516  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38517
38518  # First separate the path from the arguments. This will split at the first
38519  # space.
38520  complete="$OBJDUMP"
38521  path="${complete%% *}"
38522  tmp="$complete EOL"
38523  arguments="${tmp#* }"
38524
38525  # Input might be given as Windows format, start by converting to
38526  # unix format.
38527  new_path="$path"
38528
38529  windows_path="$new_path"
38530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38531    unix_path=`$CYGPATH -u "$windows_path"`
38532    new_path="$unix_path"
38533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38535    new_path="$unix_path"
38536  fi
38537
38538
38539  # Now try to locate executable using which
38540  new_path=`$WHICH "$new_path" 2> /dev/null`
38541
38542  if test "x$new_path" = x; then
38543    # Oops. Which didn't find the executable.
38544    # The splitting of arguments from the executable at a space might have been incorrect,
38545    # since paths with space are more likely in Windows. Give it another try with the whole
38546    # argument.
38547    path="$complete"
38548    arguments="EOL"
38549    new_path="$path"
38550
38551  windows_path="$new_path"
38552  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38553    unix_path=`$CYGPATH -u "$windows_path"`
38554    new_path="$unix_path"
38555  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38556    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38557    new_path="$unix_path"
38558  fi
38559
38560
38561    new_path=`$WHICH "$new_path" 2> /dev/null`
38562
38563    if test "x$new_path" = x; then
38564      # It's still not found. Now this is an unrecoverable error.
38565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38566$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38567      has_space=`$ECHO "$complete" | $GREP " "`
38568      if test "x$has_space" != x; then
38569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38571      fi
38572      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38573    fi
38574  fi
38575
38576  # Now new_path has a complete unix path to the binary
38577  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38578    # Keep paths in /bin as-is, but remove trailing .exe if any
38579    new_path="${new_path/%.exe/}"
38580    # Do not save /bin paths to all_fixpath_prefixes!
38581  else
38582    # Not in mixed or Windows style, start by that.
38583    new_path=`cmd //c echo $new_path`
38584
38585  input_path="$new_path"
38586  # Check if we need to convert this using DOS-style short mode. If the path
38587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38588  # take no chances and rewrite it.
38589  # Note: m4 eats our [], so we need to use [ and ] instead.
38590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38591  if test "x$has_forbidden_chars" != x; then
38592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38593    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38594  fi
38595
38596    # Output is in $new_path
38597
38598  windows_path="$new_path"
38599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38600    unix_path=`$CYGPATH -u "$windows_path"`
38601    new_path="$unix_path"
38602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38604    new_path="$unix_path"
38605  fi
38606
38607    # remove trailing .exe if any
38608    new_path="${new_path/%.exe/}"
38609
38610    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38611    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38612  fi
38613
38614  else
38615    # We're on a posix platform. Hooray! :)
38616    # First separate the path from the arguments. This will split at the first
38617    # space.
38618    complete="$OBJDUMP"
38619    path="${complete%% *}"
38620    tmp="$complete EOL"
38621    arguments="${tmp#* }"
38622
38623    # Cannot rely on the command "which" here since it doesn't always work.
38624    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38625    if test -z "$is_absolute_path"; then
38626      # Path to executable is not absolute. Find it.
38627      IFS_save="$IFS"
38628      IFS=:
38629      for p in $PATH; do
38630        if test -f "$p/$path" && test -x "$p/$path"; then
38631          new_path="$p/$path"
38632          break
38633        fi
38634      done
38635      IFS="$IFS_save"
38636    else
38637      # This is an absolute path, we can use it without further modifications.
38638      new_path="$path"
38639    fi
38640
38641    if test "x$new_path" = x; then
38642      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38643$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38644      has_space=`$ECHO "$complete" | $GREP " "`
38645      if test "x$has_space" != x; then
38646        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38647$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38648      fi
38649      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38650    fi
38651  fi
38652
38653  # Now join together the path and the arguments once again
38654  if test "x$arguments" != xEOL; then
38655    new_complete="$new_path ${arguments% *}"
38656  else
38657    new_complete="$new_path"
38658  fi
38659
38660  if test "x$complete" != "x$new_complete"; then
38661    OBJDUMP="$new_complete"
38662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38663$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38664  fi
38665
38666  fi
38667
38668
38669  # Restore old path.
38670  PATH="$OLD_PATH"
38671
38672  # Restore the flags to the user specified values.
38673  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38674  CFLAGS="$ORG_CFLAGS"
38675  CXXFLAGS="$ORG_CXXFLAGS"
38676  OBJCFLAGS="$ORG_OBJCFLAGS"
38677
38678
38679# Finally do some processing after the detection phase
38680
38681  if test "x$COMPILE_TYPE" = "xcross"; then
38682    # Now we need to find a C/C++ compiler that can build executables for the
38683    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38684    # used once. Also, we need to do this without adding a tools dir to the
38685    # path, otherwise we might pick up cross-compilers which don't use standard
38686    # naming.
38687
38688    # FIXME: we should list the discovered compilers as an exclude pattern!
38689    # If we do that, we can do this detection before POST_DETECTION, and still
38690    # find the build compilers in the tools dir, if needed.
38691
38692
38693  # Publish this variable in the help.
38694
38695
38696  if test "x$BUILD_CC" = x; then
38697    # The variable is not set by user, try to locate tool using the code snippet
38698    for ac_prog in cl cc gcc
38699do
38700  # Extract the first word of "$ac_prog", so it can be a program name with args.
38701set dummy $ac_prog; ac_word=$2
38702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38703$as_echo_n "checking for $ac_word... " >&6; }
38704if ${ac_cv_path_BUILD_CC+:} false; then :
38705  $as_echo_n "(cached) " >&6
38706else
38707  case $BUILD_CC in
38708  [\\/]* | ?:[\\/]*)
38709  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38710  ;;
38711  *)
38712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38713for as_dir in $PATH
38714do
38715  IFS=$as_save_IFS
38716  test -z "$as_dir" && as_dir=.
38717    for ac_exec_ext in '' $ac_executable_extensions; do
38718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38719    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38721    break 2
38722  fi
38723done
38724  done
38725IFS=$as_save_IFS
38726
38727  ;;
38728esac
38729fi
38730BUILD_CC=$ac_cv_path_BUILD_CC
38731if test -n "$BUILD_CC"; then
38732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38733$as_echo "$BUILD_CC" >&6; }
38734else
38735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38736$as_echo "no" >&6; }
38737fi
38738
38739
38740  test -n "$BUILD_CC" && break
38741done
38742
38743  else
38744    # The variable is set, but is it from the command line or the environment?
38745
38746    # Try to remove the string !BUILD_CC! from our list.
38747    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38748    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38749      # If it failed, the variable was not from the command line. Ignore it,
38750      # but warn the user (except for BASH, which is always set by the calling BASH).
38751      if test "xBUILD_CC" != xBASH; then
38752        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38753$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38754      fi
38755      # Try to locate tool using the code snippet
38756      for ac_prog in cl cc gcc
38757do
38758  # Extract the first word of "$ac_prog", so it can be a program name with args.
38759set dummy $ac_prog; ac_word=$2
38760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38761$as_echo_n "checking for $ac_word... " >&6; }
38762if ${ac_cv_path_BUILD_CC+:} false; then :
38763  $as_echo_n "(cached) " >&6
38764else
38765  case $BUILD_CC in
38766  [\\/]* | ?:[\\/]*)
38767  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38768  ;;
38769  *)
38770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38771for as_dir in $PATH
38772do
38773  IFS=$as_save_IFS
38774  test -z "$as_dir" && as_dir=.
38775    for ac_exec_ext in '' $ac_executable_extensions; do
38776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38777    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38779    break 2
38780  fi
38781done
38782  done
38783IFS=$as_save_IFS
38784
38785  ;;
38786esac
38787fi
38788BUILD_CC=$ac_cv_path_BUILD_CC
38789if test -n "$BUILD_CC"; then
38790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38791$as_echo "$BUILD_CC" >&6; }
38792else
38793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38794$as_echo "no" >&6; }
38795fi
38796
38797
38798  test -n "$BUILD_CC" && break
38799done
38800
38801    else
38802      # If it succeeded, then it was overridden by the user. We will use it
38803      # for the tool.
38804
38805      # First remove it from the list of overridden variables, so we can test
38806      # for unknown variables in the end.
38807      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38808
38809      # Check if the provided tool contains a complete path.
38810      tool_specified="$BUILD_CC"
38811      tool_basename="${tool_specified##*/}"
38812      if test "x$tool_basename" = "x$tool_specified"; then
38813        # A command without a complete path is provided, search $PATH.
38814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
38815$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
38816        # Extract the first word of "$tool_basename", so it can be a program name with args.
38817set dummy $tool_basename; ac_word=$2
38818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38819$as_echo_n "checking for $ac_word... " >&6; }
38820if ${ac_cv_path_BUILD_CC+:} false; then :
38821  $as_echo_n "(cached) " >&6
38822else
38823  case $BUILD_CC in
38824  [\\/]* | ?:[\\/]*)
38825  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38826  ;;
38827  *)
38828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38829for as_dir in $PATH
38830do
38831  IFS=$as_save_IFS
38832  test -z "$as_dir" && as_dir=.
38833    for ac_exec_ext in '' $ac_executable_extensions; do
38834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38835    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38837    break 2
38838  fi
38839done
38840  done
38841IFS=$as_save_IFS
38842
38843  ;;
38844esac
38845fi
38846BUILD_CC=$ac_cv_path_BUILD_CC
38847if test -n "$BUILD_CC"; then
38848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38849$as_echo "$BUILD_CC" >&6; }
38850else
38851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38852$as_echo "no" >&6; }
38853fi
38854
38855
38856        if test "x$BUILD_CC" = x; then
38857          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38858        fi
38859      else
38860        # Otherwise we believe it is a complete path. Use it as it is.
38861        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
38862$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
38863        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
38864$as_echo_n "checking for BUILD_CC... " >&6; }
38865        if test ! -x "$tool_specified"; then
38866          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38867$as_echo "not found" >&6; }
38868          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
38869        fi
38870        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38871$as_echo "$tool_specified" >&6; }
38872      fi
38873    fi
38874  fi
38875
38876
38877
38878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38879
38880  # First separate the path from the arguments. This will split at the first
38881  # space.
38882  complete="$BUILD_CC"
38883  path="${complete%% *}"
38884  tmp="$complete EOL"
38885  arguments="${tmp#* }"
38886
38887  # Input might be given as Windows format, start by converting to
38888  # unix format.
38889  new_path=`$CYGPATH -u "$path"`
38890
38891  # Now try to locate executable using which
38892  new_path=`$WHICH "$new_path" 2> /dev/null`
38893  # bat and cmd files are not always considered executable in cygwin causing which
38894  # to not find them
38895  if test "x$new_path" = x \
38896      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38897      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38898    new_path=`$CYGPATH -u "$path"`
38899  fi
38900  if test "x$new_path" = x; then
38901    # Oops. Which didn't find the executable.
38902    # The splitting of arguments from the executable at a space might have been incorrect,
38903    # since paths with space are more likely in Windows. Give it another try with the whole
38904    # argument.
38905    path="$complete"
38906    arguments="EOL"
38907    new_path=`$CYGPATH -u "$path"`
38908    new_path=`$WHICH "$new_path" 2> /dev/null`
38909    # bat and cmd files are not always considered executable in cygwin causing which
38910    # to not find them
38911    if test "x$new_path" = x \
38912        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38913        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38914      new_path=`$CYGPATH -u "$path"`
38915    fi
38916    if test "x$new_path" = x; then
38917      # It's still not found. Now this is an unrecoverable error.
38918      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
38919$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
38920      has_space=`$ECHO "$complete" | $GREP " "`
38921      if test "x$has_space" != x; then
38922        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38923$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38924      fi
38925      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38926    fi
38927  fi
38928
38929  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38930  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38931  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38932  # "foo.exe" is OK but "foo" is an error.
38933  #
38934  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38935  # It is also a way to make sure we got the proper file name for the real test later on.
38936  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38937  if test "x$test_shortpath" = x; then
38938    # Short path failed, file does not exist as specified.
38939    # Try adding .exe or .cmd
38940    if test -f "${new_path}.exe"; then
38941      input_to_shortpath="${new_path}.exe"
38942    elif test -f "${new_path}.cmd"; then
38943      input_to_shortpath="${new_path}.cmd"
38944    else
38945      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
38946$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
38947      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38948$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38949      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
38950    fi
38951  else
38952    input_to_shortpath="$new_path"
38953  fi
38954
38955  # Call helper function which possibly converts this using DOS-style short mode.
38956  # If so, the updated path is stored in $new_path.
38957  new_path="$input_to_shortpath"
38958
38959  input_path="$input_to_shortpath"
38960  # Check if we need to convert this using DOS-style short mode. If the path
38961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38962  # take no chances and rewrite it.
38963  # Note: m4 eats our [], so we need to use [ and ] instead.
38964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38965  if test "x$has_forbidden_chars" != x; then
38966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38970      # Going to short mode and back again did indeed matter. Since short mode is
38971      # case insensitive, let's make it lowercase to improve readability.
38972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38973      # Now convert it back to Unix-stile (cygpath)
38974      input_path=`$CYGPATH -u "$shortmode_path"`
38975      new_path="$input_path"
38976    fi
38977  fi
38978
38979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38980  if test "x$test_cygdrive_prefix" = x; then
38981    # As a simple fix, exclude /usr/bin since it's not a real path.
38982    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38984      # a path prefixed by /cygdrive for fixpath to work.
38985      new_path="$CYGWIN_ROOT_PATH$input_path"
38986    fi
38987  fi
38988
38989  # remove trailing .exe if any
38990  new_path="${new_path/%.exe/}"
38991
38992  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38993
38994  # First separate the path from the arguments. This will split at the first
38995  # space.
38996  complete="$BUILD_CC"
38997  path="${complete%% *}"
38998  tmp="$complete EOL"
38999  arguments="${tmp#* }"
39000
39001  # Input might be given as Windows format, start by converting to
39002  # unix format.
39003  new_path="$path"
39004
39005  windows_path="$new_path"
39006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39007    unix_path=`$CYGPATH -u "$windows_path"`
39008    new_path="$unix_path"
39009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39011    new_path="$unix_path"
39012  fi
39013
39014
39015  # Now try to locate executable using which
39016  new_path=`$WHICH "$new_path" 2> /dev/null`
39017
39018  if test "x$new_path" = x; then
39019    # Oops. Which didn't find the executable.
39020    # The splitting of arguments from the executable at a space might have been incorrect,
39021    # since paths with space are more likely in Windows. Give it another try with the whole
39022    # argument.
39023    path="$complete"
39024    arguments="EOL"
39025    new_path="$path"
39026
39027  windows_path="$new_path"
39028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39029    unix_path=`$CYGPATH -u "$windows_path"`
39030    new_path="$unix_path"
39031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39033    new_path="$unix_path"
39034  fi
39035
39036
39037    new_path=`$WHICH "$new_path" 2> /dev/null`
39038
39039    if test "x$new_path" = x; then
39040      # It's still not found. Now this is an unrecoverable error.
39041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39042$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39043      has_space=`$ECHO "$complete" | $GREP " "`
39044      if test "x$has_space" != x; then
39045        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39046$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39047      fi
39048      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39049    fi
39050  fi
39051
39052  # Now new_path has a complete unix path to the binary
39053  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39054    # Keep paths in /bin as-is, but remove trailing .exe if any
39055    new_path="${new_path/%.exe/}"
39056    # Do not save /bin paths to all_fixpath_prefixes!
39057  else
39058    # Not in mixed or Windows style, start by that.
39059    new_path=`cmd //c echo $new_path`
39060
39061  input_path="$new_path"
39062  # Check if we need to convert this using DOS-style short mode. If the path
39063  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39064  # take no chances and rewrite it.
39065  # Note: m4 eats our [], so we need to use [ and ] instead.
39066  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39067  if test "x$has_forbidden_chars" != x; then
39068    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39069    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39070  fi
39071
39072    # Output is in $new_path
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083    # remove trailing .exe if any
39084    new_path="${new_path/%.exe/}"
39085
39086    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39087    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39088  fi
39089
39090  else
39091    # We're on a posix platform. Hooray! :)
39092    # First separate the path from the arguments. This will split at the first
39093    # space.
39094    complete="$BUILD_CC"
39095    path="${complete%% *}"
39096    tmp="$complete EOL"
39097    arguments="${tmp#* }"
39098
39099    # Cannot rely on the command "which" here since it doesn't always work.
39100    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39101    if test -z "$is_absolute_path"; then
39102      # Path to executable is not absolute. Find it.
39103      IFS_save="$IFS"
39104      IFS=:
39105      for p in $PATH; do
39106        if test -f "$p/$path" && test -x "$p/$path"; then
39107          new_path="$p/$path"
39108          break
39109        fi
39110      done
39111      IFS="$IFS_save"
39112    else
39113      # This is an absolute path, we can use it without further modifications.
39114      new_path="$path"
39115    fi
39116
39117    if test "x$new_path" = x; then
39118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39119$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39120      has_space=`$ECHO "$complete" | $GREP " "`
39121      if test "x$has_space" != x; then
39122        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39123$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39124      fi
39125      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39126    fi
39127  fi
39128
39129  # Now join together the path and the arguments once again
39130  if test "x$arguments" != xEOL; then
39131    new_complete="$new_path ${arguments% *}"
39132  else
39133    new_complete="$new_path"
39134  fi
39135
39136  if test "x$complete" != "x$new_complete"; then
39137    BUILD_CC="$new_complete"
39138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39139$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39140  fi
39141
39142
39143
39144  # Publish this variable in the help.
39145
39146
39147  if test "x$BUILD_CXX" = x; then
39148    # The variable is not set by user, try to locate tool using the code snippet
39149    for ac_prog in cl CC g++
39150do
39151  # Extract the first word of "$ac_prog", so it can be a program name with args.
39152set dummy $ac_prog; ac_word=$2
39153{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39154$as_echo_n "checking for $ac_word... " >&6; }
39155if ${ac_cv_path_BUILD_CXX+:} false; then :
39156  $as_echo_n "(cached) " >&6
39157else
39158  case $BUILD_CXX in
39159  [\\/]* | ?:[\\/]*)
39160  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39161  ;;
39162  *)
39163  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39164for as_dir in $PATH
39165do
39166  IFS=$as_save_IFS
39167  test -z "$as_dir" && as_dir=.
39168    for ac_exec_ext in '' $ac_executable_extensions; do
39169  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39170    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39171    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39172    break 2
39173  fi
39174done
39175  done
39176IFS=$as_save_IFS
39177
39178  ;;
39179esac
39180fi
39181BUILD_CXX=$ac_cv_path_BUILD_CXX
39182if test -n "$BUILD_CXX"; then
39183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39184$as_echo "$BUILD_CXX" >&6; }
39185else
39186  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39187$as_echo "no" >&6; }
39188fi
39189
39190
39191  test -n "$BUILD_CXX" && break
39192done
39193
39194  else
39195    # The variable is set, but is it from the command line or the environment?
39196
39197    # Try to remove the string !BUILD_CXX! from our list.
39198    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39199    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39200      # If it failed, the variable was not from the command line. Ignore it,
39201      # but warn the user (except for BASH, which is always set by the calling BASH).
39202      if test "xBUILD_CXX" != xBASH; then
39203        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39204$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39205      fi
39206      # Try to locate tool using the code snippet
39207      for ac_prog in cl CC g++
39208do
39209  # Extract the first word of "$ac_prog", so it can be a program name with args.
39210set dummy $ac_prog; ac_word=$2
39211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39212$as_echo_n "checking for $ac_word... " >&6; }
39213if ${ac_cv_path_BUILD_CXX+:} false; then :
39214  $as_echo_n "(cached) " >&6
39215else
39216  case $BUILD_CXX in
39217  [\\/]* | ?:[\\/]*)
39218  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39219  ;;
39220  *)
39221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39222for as_dir in $PATH
39223do
39224  IFS=$as_save_IFS
39225  test -z "$as_dir" && as_dir=.
39226    for ac_exec_ext in '' $ac_executable_extensions; do
39227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39228    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39230    break 2
39231  fi
39232done
39233  done
39234IFS=$as_save_IFS
39235
39236  ;;
39237esac
39238fi
39239BUILD_CXX=$ac_cv_path_BUILD_CXX
39240if test -n "$BUILD_CXX"; then
39241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39242$as_echo "$BUILD_CXX" >&6; }
39243else
39244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39245$as_echo "no" >&6; }
39246fi
39247
39248
39249  test -n "$BUILD_CXX" && break
39250done
39251
39252    else
39253      # If it succeeded, then it was overridden by the user. We will use it
39254      # for the tool.
39255
39256      # First remove it from the list of overridden variables, so we can test
39257      # for unknown variables in the end.
39258      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39259
39260      # Check if the provided tool contains a complete path.
39261      tool_specified="$BUILD_CXX"
39262      tool_basename="${tool_specified##*/}"
39263      if test "x$tool_basename" = "x$tool_specified"; then
39264        # A command without a complete path is provided, search $PATH.
39265        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39266$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39267        # Extract the first word of "$tool_basename", so it can be a program name with args.
39268set dummy $tool_basename; ac_word=$2
39269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39270$as_echo_n "checking for $ac_word... " >&6; }
39271if ${ac_cv_path_BUILD_CXX+:} false; then :
39272  $as_echo_n "(cached) " >&6
39273else
39274  case $BUILD_CXX in
39275  [\\/]* | ?:[\\/]*)
39276  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39277  ;;
39278  *)
39279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39280for as_dir in $PATH
39281do
39282  IFS=$as_save_IFS
39283  test -z "$as_dir" && as_dir=.
39284    for ac_exec_ext in '' $ac_executable_extensions; do
39285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39286    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39288    break 2
39289  fi
39290done
39291  done
39292IFS=$as_save_IFS
39293
39294  ;;
39295esac
39296fi
39297BUILD_CXX=$ac_cv_path_BUILD_CXX
39298if test -n "$BUILD_CXX"; then
39299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39300$as_echo "$BUILD_CXX" >&6; }
39301else
39302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39303$as_echo "no" >&6; }
39304fi
39305
39306
39307        if test "x$BUILD_CXX" = x; then
39308          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39309        fi
39310      else
39311        # Otherwise we believe it is a complete path. Use it as it is.
39312        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39313$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39314        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39315$as_echo_n "checking for BUILD_CXX... " >&6; }
39316        if test ! -x "$tool_specified"; then
39317          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39318$as_echo "not found" >&6; }
39319          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39320        fi
39321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39322$as_echo "$tool_specified" >&6; }
39323      fi
39324    fi
39325  fi
39326
39327
39328
39329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39330
39331  # First separate the path from the arguments. This will split at the first
39332  # space.
39333  complete="$BUILD_CXX"
39334  path="${complete%% *}"
39335  tmp="$complete EOL"
39336  arguments="${tmp#* }"
39337
39338  # Input might be given as Windows format, start by converting to
39339  # unix format.
39340  new_path=`$CYGPATH -u "$path"`
39341
39342  # Now try to locate executable using which
39343  new_path=`$WHICH "$new_path" 2> /dev/null`
39344  # bat and cmd files are not always considered executable in cygwin causing which
39345  # to not find them
39346  if test "x$new_path" = x \
39347      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39348      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39349    new_path=`$CYGPATH -u "$path"`
39350  fi
39351  if test "x$new_path" = x; then
39352    # Oops. Which didn't find the executable.
39353    # The splitting of arguments from the executable at a space might have been incorrect,
39354    # since paths with space are more likely in Windows. Give it another try with the whole
39355    # argument.
39356    path="$complete"
39357    arguments="EOL"
39358    new_path=`$CYGPATH -u "$path"`
39359    new_path=`$WHICH "$new_path" 2> /dev/null`
39360    # bat and cmd files are not always considered executable in cygwin causing which
39361    # to not find them
39362    if test "x$new_path" = x \
39363        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39364        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39365      new_path=`$CYGPATH -u "$path"`
39366    fi
39367    if test "x$new_path" = x; then
39368      # It's still not found. Now this is an unrecoverable error.
39369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39370$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39371      has_space=`$ECHO "$complete" | $GREP " "`
39372      if test "x$has_space" != x; then
39373        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39374$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39375      fi
39376      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39377    fi
39378  fi
39379
39380  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39381  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39382  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39383  # "foo.exe" is OK but "foo" is an error.
39384  #
39385  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39386  # It is also a way to make sure we got the proper file name for the real test later on.
39387  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39388  if test "x$test_shortpath" = x; then
39389    # Short path failed, file does not exist as specified.
39390    # Try adding .exe or .cmd
39391    if test -f "${new_path}.exe"; then
39392      input_to_shortpath="${new_path}.exe"
39393    elif test -f "${new_path}.cmd"; then
39394      input_to_shortpath="${new_path}.cmd"
39395    else
39396      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39397$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39398      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39399$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39400      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39401    fi
39402  else
39403    input_to_shortpath="$new_path"
39404  fi
39405
39406  # Call helper function which possibly converts this using DOS-style short mode.
39407  # If so, the updated path is stored in $new_path.
39408  new_path="$input_to_shortpath"
39409
39410  input_path="$input_to_shortpath"
39411  # Check if we need to convert this using DOS-style short mode. If the path
39412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39413  # take no chances and rewrite it.
39414  # Note: m4 eats our [], so we need to use [ and ] instead.
39415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39416  if test "x$has_forbidden_chars" != x; then
39417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39418    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39419    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39420    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39421      # Going to short mode and back again did indeed matter. Since short mode is
39422      # case insensitive, let's make it lowercase to improve readability.
39423      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39424      # Now convert it back to Unix-stile (cygpath)
39425      input_path=`$CYGPATH -u "$shortmode_path"`
39426      new_path="$input_path"
39427    fi
39428  fi
39429
39430  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39431  if test "x$test_cygdrive_prefix" = x; then
39432    # As a simple fix, exclude /usr/bin since it's not a real path.
39433    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39434      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39435      # a path prefixed by /cygdrive for fixpath to work.
39436      new_path="$CYGWIN_ROOT_PATH$input_path"
39437    fi
39438  fi
39439
39440  # remove trailing .exe if any
39441  new_path="${new_path/%.exe/}"
39442
39443  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39444
39445  # First separate the path from the arguments. This will split at the first
39446  # space.
39447  complete="$BUILD_CXX"
39448  path="${complete%% *}"
39449  tmp="$complete EOL"
39450  arguments="${tmp#* }"
39451
39452  # Input might be given as Windows format, start by converting to
39453  # unix format.
39454  new_path="$path"
39455
39456  windows_path="$new_path"
39457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39458    unix_path=`$CYGPATH -u "$windows_path"`
39459    new_path="$unix_path"
39460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39462    new_path="$unix_path"
39463  fi
39464
39465
39466  # Now try to locate executable using which
39467  new_path=`$WHICH "$new_path" 2> /dev/null`
39468
39469  if test "x$new_path" = x; then
39470    # Oops. Which didn't find the executable.
39471    # The splitting of arguments from the executable at a space might have been incorrect,
39472    # since paths with space are more likely in Windows. Give it another try with the whole
39473    # argument.
39474    path="$complete"
39475    arguments="EOL"
39476    new_path="$path"
39477
39478  windows_path="$new_path"
39479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39480    unix_path=`$CYGPATH -u "$windows_path"`
39481    new_path="$unix_path"
39482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39484    new_path="$unix_path"
39485  fi
39486
39487
39488    new_path=`$WHICH "$new_path" 2> /dev/null`
39489
39490    if test "x$new_path" = x; then
39491      # It's still not found. Now this is an unrecoverable error.
39492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39493$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39494      has_space=`$ECHO "$complete" | $GREP " "`
39495      if test "x$has_space" != x; then
39496        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39497$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39498      fi
39499      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39500    fi
39501  fi
39502
39503  # Now new_path has a complete unix path to the binary
39504  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39505    # Keep paths in /bin as-is, but remove trailing .exe if any
39506    new_path="${new_path/%.exe/}"
39507    # Do not save /bin paths to all_fixpath_prefixes!
39508  else
39509    # Not in mixed or Windows style, start by that.
39510    new_path=`cmd //c echo $new_path`
39511
39512  input_path="$new_path"
39513  # Check if we need to convert this using DOS-style short mode. If the path
39514  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39515  # take no chances and rewrite it.
39516  # Note: m4 eats our [], so we need to use [ and ] instead.
39517  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39518  if test "x$has_forbidden_chars" != x; then
39519    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39520    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39521  fi
39522
39523    # Output is in $new_path
39524
39525  windows_path="$new_path"
39526  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39527    unix_path=`$CYGPATH -u "$windows_path"`
39528    new_path="$unix_path"
39529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39530    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39531    new_path="$unix_path"
39532  fi
39533
39534    # remove trailing .exe if any
39535    new_path="${new_path/%.exe/}"
39536
39537    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39538    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39539  fi
39540
39541  else
39542    # We're on a posix platform. Hooray! :)
39543    # First separate the path from the arguments. This will split at the first
39544    # space.
39545    complete="$BUILD_CXX"
39546    path="${complete%% *}"
39547    tmp="$complete EOL"
39548    arguments="${tmp#* }"
39549
39550    # Cannot rely on the command "which" here since it doesn't always work.
39551    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39552    if test -z "$is_absolute_path"; then
39553      # Path to executable is not absolute. Find it.
39554      IFS_save="$IFS"
39555      IFS=:
39556      for p in $PATH; do
39557        if test -f "$p/$path" && test -x "$p/$path"; then
39558          new_path="$p/$path"
39559          break
39560        fi
39561      done
39562      IFS="$IFS_save"
39563    else
39564      # This is an absolute path, we can use it without further modifications.
39565      new_path="$path"
39566    fi
39567
39568    if test "x$new_path" = x; then
39569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39570$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39571      has_space=`$ECHO "$complete" | $GREP " "`
39572      if test "x$has_space" != x; then
39573        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39574$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39575      fi
39576      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39577    fi
39578  fi
39579
39580  # Now join together the path and the arguments once again
39581  if test "x$arguments" != xEOL; then
39582    new_complete="$new_path ${arguments% *}"
39583  else
39584    new_complete="$new_path"
39585  fi
39586
39587  if test "x$complete" != "x$new_complete"; then
39588    BUILD_CXX="$new_complete"
39589    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39590$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39591  fi
39592
39593
39594
39595  # Publish this variable in the help.
39596
39597
39598  if test "x$BUILD_LD" = x; then
39599    # The variable is not set by user, try to locate tool using the code snippet
39600    for ac_prog in ld
39601do
39602  # Extract the first word of "$ac_prog", so it can be a program name with args.
39603set dummy $ac_prog; ac_word=$2
39604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39605$as_echo_n "checking for $ac_word... " >&6; }
39606if ${ac_cv_path_BUILD_LD+:} false; then :
39607  $as_echo_n "(cached) " >&6
39608else
39609  case $BUILD_LD in
39610  [\\/]* | ?:[\\/]*)
39611  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39612  ;;
39613  *)
39614  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39615for as_dir in $PATH
39616do
39617  IFS=$as_save_IFS
39618  test -z "$as_dir" && as_dir=.
39619    for ac_exec_ext in '' $ac_executable_extensions; do
39620  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39621    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39622    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39623    break 2
39624  fi
39625done
39626  done
39627IFS=$as_save_IFS
39628
39629  ;;
39630esac
39631fi
39632BUILD_LD=$ac_cv_path_BUILD_LD
39633if test -n "$BUILD_LD"; then
39634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39635$as_echo "$BUILD_LD" >&6; }
39636else
39637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39638$as_echo "no" >&6; }
39639fi
39640
39641
39642  test -n "$BUILD_LD" && break
39643done
39644
39645  else
39646    # The variable is set, but is it from the command line or the environment?
39647
39648    # Try to remove the string !BUILD_LD! from our list.
39649    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39650    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39651      # If it failed, the variable was not from the command line. Ignore it,
39652      # but warn the user (except for BASH, which is always set by the calling BASH).
39653      if test "xBUILD_LD" != xBASH; then
39654        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39655$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39656      fi
39657      # Try to locate tool using the code snippet
39658      for ac_prog in ld
39659do
39660  # Extract the first word of "$ac_prog", so it can be a program name with args.
39661set dummy $ac_prog; ac_word=$2
39662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39663$as_echo_n "checking for $ac_word... " >&6; }
39664if ${ac_cv_path_BUILD_LD+:} false; then :
39665  $as_echo_n "(cached) " >&6
39666else
39667  case $BUILD_LD in
39668  [\\/]* | ?:[\\/]*)
39669  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39670  ;;
39671  *)
39672  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39673for as_dir in $PATH
39674do
39675  IFS=$as_save_IFS
39676  test -z "$as_dir" && as_dir=.
39677    for ac_exec_ext in '' $ac_executable_extensions; do
39678  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39679    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39680    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39681    break 2
39682  fi
39683done
39684  done
39685IFS=$as_save_IFS
39686
39687  ;;
39688esac
39689fi
39690BUILD_LD=$ac_cv_path_BUILD_LD
39691if test -n "$BUILD_LD"; then
39692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39693$as_echo "$BUILD_LD" >&6; }
39694else
39695  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39696$as_echo "no" >&6; }
39697fi
39698
39699
39700  test -n "$BUILD_LD" && break
39701done
39702
39703    else
39704      # If it succeeded, then it was overridden by the user. We will use it
39705      # for the tool.
39706
39707      # First remove it from the list of overridden variables, so we can test
39708      # for unknown variables in the end.
39709      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39710
39711      # Check if the provided tool contains a complete path.
39712      tool_specified="$BUILD_LD"
39713      tool_basename="${tool_specified##*/}"
39714      if test "x$tool_basename" = "x$tool_specified"; then
39715        # A command without a complete path is provided, search $PATH.
39716        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39717$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39718        # Extract the first word of "$tool_basename", so it can be a program name with args.
39719set dummy $tool_basename; ac_word=$2
39720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39721$as_echo_n "checking for $ac_word... " >&6; }
39722if ${ac_cv_path_BUILD_LD+:} false; then :
39723  $as_echo_n "(cached) " >&6
39724else
39725  case $BUILD_LD in
39726  [\\/]* | ?:[\\/]*)
39727  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39728  ;;
39729  *)
39730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39731for as_dir in $PATH
39732do
39733  IFS=$as_save_IFS
39734  test -z "$as_dir" && as_dir=.
39735    for ac_exec_ext in '' $ac_executable_extensions; do
39736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39737    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39739    break 2
39740  fi
39741done
39742  done
39743IFS=$as_save_IFS
39744
39745  ;;
39746esac
39747fi
39748BUILD_LD=$ac_cv_path_BUILD_LD
39749if test -n "$BUILD_LD"; then
39750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39751$as_echo "$BUILD_LD" >&6; }
39752else
39753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39754$as_echo "no" >&6; }
39755fi
39756
39757
39758        if test "x$BUILD_LD" = x; then
39759          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39760        fi
39761      else
39762        # Otherwise we believe it is a complete path. Use it as it is.
39763        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39764$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39765        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39766$as_echo_n "checking for BUILD_LD... " >&6; }
39767        if test ! -x "$tool_specified"; then
39768          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39769$as_echo "not found" >&6; }
39770          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39771        fi
39772        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39773$as_echo "$tool_specified" >&6; }
39774      fi
39775    fi
39776  fi
39777
39778
39779
39780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39781
39782  # First separate the path from the arguments. This will split at the first
39783  # space.
39784  complete="$BUILD_LD"
39785  path="${complete%% *}"
39786  tmp="$complete EOL"
39787  arguments="${tmp#* }"
39788
39789  # Input might be given as Windows format, start by converting to
39790  # unix format.
39791  new_path=`$CYGPATH -u "$path"`
39792
39793  # Now try to locate executable using which
39794  new_path=`$WHICH "$new_path" 2> /dev/null`
39795  # bat and cmd files are not always considered executable in cygwin causing which
39796  # to not find them
39797  if test "x$new_path" = x \
39798      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39799      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39800    new_path=`$CYGPATH -u "$path"`
39801  fi
39802  if test "x$new_path" = x; then
39803    # Oops. Which didn't find the executable.
39804    # The splitting of arguments from the executable at a space might have been incorrect,
39805    # since paths with space are more likely in Windows. Give it another try with the whole
39806    # argument.
39807    path="$complete"
39808    arguments="EOL"
39809    new_path=`$CYGPATH -u "$path"`
39810    new_path=`$WHICH "$new_path" 2> /dev/null`
39811    # bat and cmd files are not always considered executable in cygwin causing which
39812    # to not find them
39813    if test "x$new_path" = x \
39814        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39815        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39816      new_path=`$CYGPATH -u "$path"`
39817    fi
39818    if test "x$new_path" = x; then
39819      # It's still not found. Now this is an unrecoverable error.
39820      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39821$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39822      has_space=`$ECHO "$complete" | $GREP " "`
39823      if test "x$has_space" != x; then
39824        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39825$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39826      fi
39827      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39828    fi
39829  fi
39830
39831  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39832  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39833  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39834  # "foo.exe" is OK but "foo" is an error.
39835  #
39836  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39837  # It is also a way to make sure we got the proper file name for the real test later on.
39838  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39839  if test "x$test_shortpath" = x; then
39840    # Short path failed, file does not exist as specified.
39841    # Try adding .exe or .cmd
39842    if test -f "${new_path}.exe"; then
39843      input_to_shortpath="${new_path}.exe"
39844    elif test -f "${new_path}.cmd"; then
39845      input_to_shortpath="${new_path}.cmd"
39846    else
39847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
39848$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
39849      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39850$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39851      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39852    fi
39853  else
39854    input_to_shortpath="$new_path"
39855  fi
39856
39857  # Call helper function which possibly converts this using DOS-style short mode.
39858  # If so, the updated path is stored in $new_path.
39859  new_path="$input_to_shortpath"
39860
39861  input_path="$input_to_shortpath"
39862  # Check if we need to convert this using DOS-style short mode. If the path
39863  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39864  # take no chances and rewrite it.
39865  # Note: m4 eats our [], so we need to use [ and ] instead.
39866  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39867  if test "x$has_forbidden_chars" != x; then
39868    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39869    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39870    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39871    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39872      # Going to short mode and back again did indeed matter. Since short mode is
39873      # case insensitive, let's make it lowercase to improve readability.
39874      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39875      # Now convert it back to Unix-stile (cygpath)
39876      input_path=`$CYGPATH -u "$shortmode_path"`
39877      new_path="$input_path"
39878    fi
39879  fi
39880
39881  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39882  if test "x$test_cygdrive_prefix" = x; then
39883    # As a simple fix, exclude /usr/bin since it's not a real path.
39884    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39885      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39886      # a path prefixed by /cygdrive for fixpath to work.
39887      new_path="$CYGWIN_ROOT_PATH$input_path"
39888    fi
39889  fi
39890
39891  # remove trailing .exe if any
39892  new_path="${new_path/%.exe/}"
39893
39894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39895
39896  # First separate the path from the arguments. This will split at the first
39897  # space.
39898  complete="$BUILD_LD"
39899  path="${complete%% *}"
39900  tmp="$complete EOL"
39901  arguments="${tmp#* }"
39902
39903  # Input might be given as Windows format, start by converting to
39904  # unix format.
39905  new_path="$path"
39906
39907  windows_path="$new_path"
39908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39909    unix_path=`$CYGPATH -u "$windows_path"`
39910    new_path="$unix_path"
39911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39912    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39913    new_path="$unix_path"
39914  fi
39915
39916
39917  # Now try to locate executable using which
39918  new_path=`$WHICH "$new_path" 2> /dev/null`
39919
39920  if test "x$new_path" = x; then
39921    # Oops. Which didn't find the executable.
39922    # The splitting of arguments from the executable at a space might have been incorrect,
39923    # since paths with space are more likely in Windows. Give it another try with the whole
39924    # argument.
39925    path="$complete"
39926    arguments="EOL"
39927    new_path="$path"
39928
39929  windows_path="$new_path"
39930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39931    unix_path=`$CYGPATH -u "$windows_path"`
39932    new_path="$unix_path"
39933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39935    new_path="$unix_path"
39936  fi
39937
39938
39939    new_path=`$WHICH "$new_path" 2> /dev/null`
39940
39941    if test "x$new_path" = x; then
39942      # It's still not found. Now this is an unrecoverable error.
39943      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
39944$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
39945      has_space=`$ECHO "$complete" | $GREP " "`
39946      if test "x$has_space" != x; then
39947        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39948$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39949      fi
39950      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
39951    fi
39952  fi
39953
39954  # Now new_path has a complete unix path to the binary
39955  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39956    # Keep paths in /bin as-is, but remove trailing .exe if any
39957    new_path="${new_path/%.exe/}"
39958    # Do not save /bin paths to all_fixpath_prefixes!
39959  else
39960    # Not in mixed or Windows style, start by that.
39961    new_path=`cmd //c echo $new_path`
39962
39963  input_path="$new_path"
39964  # Check if we need to convert this using DOS-style short mode. If the path
39965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39966  # take no chances and rewrite it.
39967  # Note: m4 eats our [], so we need to use [ and ] instead.
39968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39969  if test "x$has_forbidden_chars" != x; then
39970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39971    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39972  fi
39973
39974    # Output is in $new_path
39975
39976  windows_path="$new_path"
39977  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39978    unix_path=`$CYGPATH -u "$windows_path"`
39979    new_path="$unix_path"
39980  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39981    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39982    new_path="$unix_path"
39983  fi
39984
39985    # remove trailing .exe if any
39986    new_path="${new_path/%.exe/}"
39987
39988    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39989    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39990  fi
39991
39992  else
39993    # We're on a posix platform. Hooray! :)
39994    # First separate the path from the arguments. This will split at the first
39995    # space.
39996    complete="$BUILD_LD"
39997    path="${complete%% *}"
39998    tmp="$complete EOL"
39999    arguments="${tmp#* }"
40000
40001    # Cannot rely on the command "which" here since it doesn't always work.
40002    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40003    if test -z "$is_absolute_path"; then
40004      # Path to executable is not absolute. Find it.
40005      IFS_save="$IFS"
40006      IFS=:
40007      for p in $PATH; do
40008        if test -f "$p/$path" && test -x "$p/$path"; then
40009          new_path="$p/$path"
40010          break
40011        fi
40012      done
40013      IFS="$IFS_save"
40014    else
40015      # This is an absolute path, we can use it without further modifications.
40016      new_path="$path"
40017    fi
40018
40019    if test "x$new_path" = x; then
40020      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40021$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40022      has_space=`$ECHO "$complete" | $GREP " "`
40023      if test "x$has_space" != x; then
40024        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40025$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40026      fi
40027      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40028    fi
40029  fi
40030
40031  # Now join together the path and the arguments once again
40032  if test "x$arguments" != xEOL; then
40033    new_complete="$new_path ${arguments% *}"
40034  else
40035    new_complete="$new_path"
40036  fi
40037
40038  if test "x$complete" != "x$new_complete"; then
40039    BUILD_LD="$new_complete"
40040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40041$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40042  fi
40043
40044  else
40045    # If we are not cross compiling, use the normal target compilers for
40046    # building the build platform executables.
40047    BUILD_CC="$CC"
40048    BUILD_CXX="$CXX"
40049    BUILD_LD="$LD"
40050  fi
40051
40052
40053
40054
40055
40056
40057  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40058    # For hotspot, we need these in Windows mixed path,
40059    # so rewrite them all. Need added .exe suffix.
40060    HOTSPOT_CXX="$CXX.exe"
40061    HOTSPOT_LD="$LD.exe"
40062    HOTSPOT_MT="$MT.exe"
40063    HOTSPOT_RC="$RC.exe"
40064
40065  unix_path="$HOTSPOT_CXX"
40066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40067    windows_path=`$CYGPATH -m "$unix_path"`
40068    HOTSPOT_CXX="$windows_path"
40069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40070    windows_path=`cmd //c echo $unix_path`
40071    HOTSPOT_CXX="$windows_path"
40072  fi
40073
40074
40075  unix_path="$HOTSPOT_LD"
40076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40077    windows_path=`$CYGPATH -m "$unix_path"`
40078    HOTSPOT_LD="$windows_path"
40079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40080    windows_path=`cmd //c echo $unix_path`
40081    HOTSPOT_LD="$windows_path"
40082  fi
40083
40084
40085  unix_path="$HOTSPOT_MT"
40086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40087    windows_path=`$CYGPATH -m "$unix_path"`
40088    HOTSPOT_MT="$windows_path"
40089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40090    windows_path=`cmd //c echo $unix_path`
40091    HOTSPOT_MT="$windows_path"
40092  fi
40093
40094
40095  unix_path="$HOTSPOT_RC"
40096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40097    windows_path=`$CYGPATH -m "$unix_path"`
40098    HOTSPOT_RC="$windows_path"
40099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40100    windows_path=`cmd //c echo $unix_path`
40101    HOTSPOT_RC="$windows_path"
40102  fi
40103
40104
40105
40106  else
40107    HOTSPOT_CXX="$CXX"
40108    HOTSPOT_LD="$LD"
40109  fi
40110
40111
40112
40113  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40114    USE_CLANG=true
40115  fi
40116
40117
40118  # LDEXE is the linker to use, when creating executables. Not really used.
40119  # FIXME: These should just be removed!
40120  LDEXE="$LD"
40121  LDEXECXX="$LDCXX"
40122
40123
40124
40125
40126  # The package path is used only on macosx?
40127  # FIXME: clean this up, and/or move it elsewhere.
40128  PACKAGE_PATH=/opt/local
40129
40130
40131  # Check for extra potential brokenness.
40132  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40133    # On Windows, double-check that we got the right compiler.
40134    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40135    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40136    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40137      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40138        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40139      fi
40140    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40141      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40142        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40143      fi
40144    fi
40145  fi
40146
40147  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40148    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40149    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40150    # This is later checked when setting flags.
40151  fi
40152
40153  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40154  # in executable.'
40155  USING_BROKEN_SUSE_LD=no
40156  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40157    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40158$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40159    echo "SUNWprivate_1.1 { local: *; };" > version-script.map
40160    echo "int main() { }" > main.c
40161    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40163$as_echo "no" >&6; }
40164      USING_BROKEN_SUSE_LD=no
40165    else
40166      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40167$as_echo "yes" >&6; }
40168      USING_BROKEN_SUSE_LD=yes
40169    fi
40170    rm -rf version-script.map main.c a.out
40171  fi
40172
40173
40174
40175# Setup the JTReg Regression Test Harness.
40176
40177
40178# Check whether --with-jtreg was given.
40179if test "${with_jtreg+set}" = set; then :
40180  withval=$with_jtreg;
40181else
40182  with_jtreg=no
40183fi
40184
40185
40186  if test "x$with_jtreg" = xno; then
40187    # jtreg disabled
40188    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40189$as_echo_n "checking for jtreg... " >&6; }
40190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40191$as_echo "no" >&6; }
40192  else
40193    if test "x$with_jtreg" != xyes; then
40194      # with path specified.
40195      JT_HOME="$with_jtreg"
40196    fi
40197
40198    if test "x$JT_HOME" != x; then
40199      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40200$as_echo_n "checking for jtreg... " >&6; }
40201
40202      # use JT_HOME enviroment var.
40203
40204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40205
40206  # Input might be given as Windows format, start by converting to
40207  # unix format.
40208  path="$JT_HOME"
40209  new_path=`$CYGPATH -u "$path"`
40210
40211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40214  # "foo.exe" is OK but "foo" is an error.
40215  #
40216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40217  # It is also a way to make sure we got the proper file name for the real test later on.
40218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40219  if test "x$test_shortpath" = x; then
40220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40221$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40222    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40223  fi
40224
40225  # Call helper function which possibly converts this using DOS-style short mode.
40226  # If so, the updated path is stored in $new_path.
40227
40228  input_path="$new_path"
40229  # Check if we need to convert this using DOS-style short mode. If the path
40230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40231  # take no chances and rewrite it.
40232  # Note: m4 eats our [], so we need to use [ and ] instead.
40233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40234  if test "x$has_forbidden_chars" != x; then
40235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40239      # Going to short mode and back again did indeed matter. Since short mode is
40240      # case insensitive, let's make it lowercase to improve readability.
40241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40242      # Now convert it back to Unix-stile (cygpath)
40243      input_path=`$CYGPATH -u "$shortmode_path"`
40244      new_path="$input_path"
40245    fi
40246  fi
40247
40248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40249  if test "x$test_cygdrive_prefix" = x; then
40250    # As a simple fix, exclude /usr/bin since it's not a real path.
40251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40253      # a path prefixed by /cygdrive for fixpath to work.
40254      new_path="$CYGWIN_ROOT_PATH$input_path"
40255    fi
40256  fi
40257
40258
40259  if test "x$path" != "x$new_path"; then
40260    JT_HOME="$new_path"
40261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40262$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40263  fi
40264
40265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40266
40267  path="$JT_HOME"
40268  has_colon=`$ECHO $path | $GREP ^.:`
40269  new_path="$path"
40270  if test "x$has_colon" = x; then
40271    # Not in mixed or Windows style, start by that.
40272    new_path=`cmd //c echo $path`
40273  fi
40274
40275
40276  input_path="$new_path"
40277  # Check if we need to convert this using DOS-style short mode. If the path
40278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40279  # take no chances and rewrite it.
40280  # Note: m4 eats our [], so we need to use [ and ] instead.
40281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40282  if test "x$has_forbidden_chars" != x; then
40283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40285  fi
40286
40287
40288  windows_path="$new_path"
40289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40290    unix_path=`$CYGPATH -u "$windows_path"`
40291    new_path="$unix_path"
40292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40294    new_path="$unix_path"
40295  fi
40296
40297  if test "x$path" != "x$new_path"; then
40298    JT_HOME="$new_path"
40299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40300$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40301  fi
40302
40303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40305
40306  else
40307    # We're on a posix platform. Hooray! :)
40308    path="$JT_HOME"
40309    has_space=`$ECHO "$path" | $GREP " "`
40310    if test "x$has_space" != x; then
40311      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40312$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40313      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40314    fi
40315
40316    # Use eval to expand a potential ~
40317    eval path="$path"
40318    if test ! -f "$path" && test ! -d "$path"; then
40319      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40320    fi
40321
40322    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40323  fi
40324
40325
40326      # jtreg win32 script works for everybody
40327      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40328
40329      if test ! -f "$JTREGEXE"; then
40330        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40331      fi
40332
40333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40334$as_echo "$JTREGEXE" >&6; }
40335    else
40336      # try to find jtreg on path
40337
40338
40339
40340  # Publish this variable in the help.
40341
40342
40343  if test "x$JTREGEXE" = x; then
40344    # The variable is not set by user, try to locate tool using the code snippet
40345    for ac_prog in jtreg
40346do
40347  # Extract the first word of "$ac_prog", so it can be a program name with args.
40348set dummy $ac_prog; ac_word=$2
40349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40350$as_echo_n "checking for $ac_word... " >&6; }
40351if ${ac_cv_path_JTREGEXE+:} false; then :
40352  $as_echo_n "(cached) " >&6
40353else
40354  case $JTREGEXE in
40355  [\\/]* | ?:[\\/]*)
40356  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40357  ;;
40358  *)
40359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40360for as_dir in $PATH
40361do
40362  IFS=$as_save_IFS
40363  test -z "$as_dir" && as_dir=.
40364    for ac_exec_ext in '' $ac_executable_extensions; do
40365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40366    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40368    break 2
40369  fi
40370done
40371  done
40372IFS=$as_save_IFS
40373
40374  ;;
40375esac
40376fi
40377JTREGEXE=$ac_cv_path_JTREGEXE
40378if test -n "$JTREGEXE"; then
40379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40380$as_echo "$JTREGEXE" >&6; }
40381else
40382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40383$as_echo "no" >&6; }
40384fi
40385
40386
40387  test -n "$JTREGEXE" && break
40388done
40389
40390  else
40391    # The variable is set, but is it from the command line or the environment?
40392
40393    # Try to remove the string !JTREGEXE! from our list.
40394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40396      # If it failed, the variable was not from the command line. Ignore it,
40397      # but warn the user (except for BASH, which is always set by the calling BASH).
40398      if test "xJTREGEXE" != xBASH; then
40399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40400$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40401      fi
40402      # Try to locate tool using the code snippet
40403      for ac_prog in jtreg
40404do
40405  # Extract the first word of "$ac_prog", so it can be a program name with args.
40406set dummy $ac_prog; ac_word=$2
40407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40408$as_echo_n "checking for $ac_word... " >&6; }
40409if ${ac_cv_path_JTREGEXE+:} false; then :
40410  $as_echo_n "(cached) " >&6
40411else
40412  case $JTREGEXE in
40413  [\\/]* | ?:[\\/]*)
40414  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40415  ;;
40416  *)
40417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40418for as_dir in $PATH
40419do
40420  IFS=$as_save_IFS
40421  test -z "$as_dir" && as_dir=.
40422    for ac_exec_ext in '' $ac_executable_extensions; do
40423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40424    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40426    break 2
40427  fi
40428done
40429  done
40430IFS=$as_save_IFS
40431
40432  ;;
40433esac
40434fi
40435JTREGEXE=$ac_cv_path_JTREGEXE
40436if test -n "$JTREGEXE"; then
40437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40438$as_echo "$JTREGEXE" >&6; }
40439else
40440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40441$as_echo "no" >&6; }
40442fi
40443
40444
40445  test -n "$JTREGEXE" && break
40446done
40447
40448    else
40449      # If it succeeded, then it was overridden by the user. We will use it
40450      # for the tool.
40451
40452      # First remove it from the list of overridden variables, so we can test
40453      # for unknown variables in the end.
40454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40455
40456      # Check if the provided tool contains a complete path.
40457      tool_specified="$JTREGEXE"
40458      tool_basename="${tool_specified##*/}"
40459      if test "x$tool_basename" = "x$tool_specified"; then
40460        # A command without a complete path is provided, search $PATH.
40461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40462$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40463        # Extract the first word of "$tool_basename", so it can be a program name with args.
40464set dummy $tool_basename; ac_word=$2
40465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40466$as_echo_n "checking for $ac_word... " >&6; }
40467if ${ac_cv_path_JTREGEXE+:} false; then :
40468  $as_echo_n "(cached) " >&6
40469else
40470  case $JTREGEXE in
40471  [\\/]* | ?:[\\/]*)
40472  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40473  ;;
40474  *)
40475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40476for as_dir in $PATH
40477do
40478  IFS=$as_save_IFS
40479  test -z "$as_dir" && as_dir=.
40480    for ac_exec_ext in '' $ac_executable_extensions; do
40481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40482    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40484    break 2
40485  fi
40486done
40487  done
40488IFS=$as_save_IFS
40489
40490  ;;
40491esac
40492fi
40493JTREGEXE=$ac_cv_path_JTREGEXE
40494if test -n "$JTREGEXE"; then
40495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40496$as_echo "$JTREGEXE" >&6; }
40497else
40498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40499$as_echo "no" >&6; }
40500fi
40501
40502
40503        if test "x$JTREGEXE" = x; then
40504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40505        fi
40506      else
40507        # Otherwise we believe it is a complete path. Use it as it is.
40508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40509$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40511$as_echo_n "checking for JTREGEXE... " >&6; }
40512        if test ! -x "$tool_specified"; then
40513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40514$as_echo "not found" >&6; }
40515          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40516        fi
40517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40518$as_echo "$tool_specified" >&6; }
40519      fi
40520    fi
40521  fi
40522
40523
40524
40525  if test "x$JTREGEXE" = x; then
40526    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40527  fi
40528
40529
40530      JT_HOME="`$DIRNAME $JTREGEXE`"
40531    fi
40532  fi
40533
40534
40535
40536
40537
40538
40539  # Option used to tell the compiler whether to create 32- or 64-bit executables
40540  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40541    COMPILER_TARGET_BITS_FLAG="-q"
40542  else
40543    COMPILER_TARGET_BITS_FLAG="-m"
40544  fi
40545
40546
40547  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40548  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40549    ARFLAGS="-r"
40550  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40551    ARFLAGS="-X64"
40552  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40553    # lib.exe is used as AR to create static libraries.
40554    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40555  else
40556    ARFLAGS=""
40557  fi
40558
40559
40560  ## Setup strip.
40561  # FIXME: should this really be per platform, or should it be per toolchain type?
40562  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40563  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40564  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40565    STRIPFLAGS="-g"
40566  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
40567    STRIPFLAGS="-x"
40568  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
40569    STRIPFLAGS="-S"
40570  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40571    STRIPFLAGS="-X32_64"
40572  fi
40573
40574  if test "x$OPENJDK_TARGET_OS" != xwindows; then
40575    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
40576  fi
40577
40578
40579  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40580    # FIXME: break out into MCSFLAGS
40581    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
40582  fi
40583
40584
40585  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40586    CC_OUT_OPTION=-Fo
40587    EXE_OUT_OPTION=-out:
40588    LD_OUT_OPTION=-out:
40589    AR_OUT_OPTION=-out:
40590  else
40591    # The option used to specify the target .o,.a or .so file.
40592    # When compiling, how to specify the to be created object file.
40593    CC_OUT_OPTION='-o$(SPACE)'
40594    # When linking, how to specify the to be created executable.
40595    EXE_OUT_OPTION='-o$(SPACE)'
40596    # When linking, how to specify the to be created dynamically linkable library.
40597    LD_OUT_OPTION='-o$(SPACE)'
40598    # When archiving, how to specify the to be create static archive for object files.
40599    AR_OUT_OPTION='rcs$(SPACE)'
40600  fi
40601
40602
40603
40604
40605
40606  # On Windows, we need to set RC flags.
40607  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40608    RC_FLAGS="-nologo -l 0x409 -r"
40609    if test "x$VARIANT" = xOPT; then
40610      RC_FLAGS="$RC_FLAGS -d NDEBUG"
40611    fi
40612
40613    # The version variables used to create RC_FLAGS may be overridden
40614    # in a custom configure script, or possibly the command line.
40615    # Let those variables be expanded at make time in spec.gmk.
40616    # The \$ are escaped to the shell, and the $(...) variables
40617    # are evaluated by make.
40618    RC_FLAGS="$RC_FLAGS \
40619        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
40620        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
40621        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
40622        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
40623        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
40624        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
40625        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
40626  fi
40627
40628
40629  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40630    # FIXME: likely bug, should be CCXXFLAGS_JDK? or one for C or CXX.
40631    CCXXFLAGS="$CCXXFLAGS -nologo"
40632  fi
40633
40634
40635# FIXME: Currently we must test this after toolchain but before flags. Fix!
40636
40637# Now we can test some aspects on the target using configure macros.
40638
40639
40640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
40641$as_echo_n "checking for ANSI C header files... " >&6; }
40642if ${ac_cv_header_stdc+:} false; then :
40643  $as_echo_n "(cached) " >&6
40644else
40645  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40646/* end confdefs.h.  */
40647#include <stdlib.h>
40648#include <stdarg.h>
40649#include <string.h>
40650#include <float.h>
40651
40652int
40653main ()
40654{
40655
40656  ;
40657  return 0;
40658}
40659_ACEOF
40660if ac_fn_cxx_try_compile "$LINENO"; then :
40661  ac_cv_header_stdc=yes
40662else
40663  ac_cv_header_stdc=no
40664fi
40665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40666
40667if test $ac_cv_header_stdc = yes; then
40668  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
40669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40670/* end confdefs.h.  */
40671#include <string.h>
40672
40673_ACEOF
40674if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40675  $EGREP "memchr" >/dev/null 2>&1; then :
40676
40677else
40678  ac_cv_header_stdc=no
40679fi
40680rm -f conftest*
40681
40682fi
40683
40684if test $ac_cv_header_stdc = yes; then
40685  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
40686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40687/* end confdefs.h.  */
40688#include <stdlib.h>
40689
40690_ACEOF
40691if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
40692  $EGREP "free" >/dev/null 2>&1; then :
40693
40694else
40695  ac_cv_header_stdc=no
40696fi
40697rm -f conftest*
40698
40699fi
40700
40701if test $ac_cv_header_stdc = yes; then
40702  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
40703  if test "$cross_compiling" = yes; then :
40704  :
40705else
40706  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40707/* end confdefs.h.  */
40708#include <ctype.h>
40709#include <stdlib.h>
40710#if ((' ' & 0x0FF) == 0x020)
40711# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
40712# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
40713#else
40714# define ISLOWER(c) \
40715		   (('a' <= (c) && (c) <= 'i') \
40716		     || ('j' <= (c) && (c) <= 'r') \
40717		     || ('s' <= (c) && (c) <= 'z'))
40718# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
40719#endif
40720
40721#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
40722int
40723main ()
40724{
40725  int i;
40726  for (i = 0; i < 256; i++)
40727    if (XOR (islower (i), ISLOWER (i))
40728	|| toupper (i) != TOUPPER (i))
40729      return 2;
40730  return 0;
40731}
40732_ACEOF
40733if ac_fn_cxx_try_run "$LINENO"; then :
40734
40735else
40736  ac_cv_header_stdc=no
40737fi
40738rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
40739  conftest.$ac_objext conftest.beam conftest.$ac_ext
40740fi
40741
40742fi
40743fi
40744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
40745$as_echo "$ac_cv_header_stdc" >&6; }
40746if test $ac_cv_header_stdc = yes; then
40747
40748$as_echo "#define STDC_HEADERS 1" >>confdefs.h
40749
40750fi
40751
40752# On IRIX 5.3, sys/types and inttypes.h are conflicting.
40753for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
40754		  inttypes.h stdint.h unistd.h
40755do :
40756  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
40757ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
40758"
40759if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
40760  cat >>confdefs.h <<_ACEOF
40761#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
40762_ACEOF
40763
40764fi
40765
40766done
40767
40768
40769
40770  ###############################################################################
40771  #
40772  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
40773  # (The JVM can use 32 or 64 bit Java pointers but that decision
40774  # is made at runtime.)
40775  #
40776
40777  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
40778    # Always specify -m flag on Solaris
40779    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
40780
40781  # When we add flags to the "official" CFLAGS etc, we need to
40782  # keep track of these additions in ADDED_CFLAGS etc. These
40783  # will later be checked to make sure only controlled additions
40784  # have been made to CFLAGS etc.
40785  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40786  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40787  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40788
40789  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40790  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40791  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40792
40793  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40794  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40795  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40796
40797  elif test "x$COMPILE_TYPE" = xreduced; then
40798    if test "x$OPENJDK_TARGET_OS" != xwindows; then
40799      # Specify -m if running reduced on other Posix platforms
40800
40801  # When we add flags to the "official" CFLAGS etc, we need to
40802  # keep track of these additions in ADDED_CFLAGS etc. These
40803  # will later be checked to make sure only controlled additions
40804  # have been made to CFLAGS etc.
40805  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40806  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40807  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40808
40809  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40810  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40811  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40812
40813  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40814  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40815  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40816
40817    fi
40818  fi
40819
40820  # Make compilation sanity check
40821  for ac_header in stdio.h
40822do :
40823  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
40824if test "x$ac_cv_header_stdio_h" = xyes; then :
40825  cat >>confdefs.h <<_ACEOF
40826#define HAVE_STDIO_H 1
40827_ACEOF
40828
40829else
40830
40831    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
40832$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
40833    if test "x$COMPILE_TYPE" = xreduced; then
40834      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
40835$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
40836    elif test "x$COMPILE_TYPE" = xcross; then
40837      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
40838$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
40839    fi
40840    as_fn_error $? "Cannot continue." "$LINENO" 5
40841
40842fi
40843
40844done
40845
40846
40847  # The cast to long int works around a bug in the HP C Compiler
40848# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40849# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40850# This bug is HP SR number 8606223364.
40851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40852$as_echo_n "checking size of int *... " >&6; }
40853if ${ac_cv_sizeof_int_p+:} false; then :
40854  $as_echo_n "(cached) " >&6
40855else
40856  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40857
40858else
40859  if test "$ac_cv_type_int_p" = yes; then
40860     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40861$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40862as_fn_error 77 "cannot compute sizeof (int *)
40863See \`config.log' for more details" "$LINENO" 5; }
40864   else
40865     ac_cv_sizeof_int_p=0
40866   fi
40867fi
40868
40869fi
40870{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40871$as_echo "$ac_cv_sizeof_int_p" >&6; }
40872
40873
40874
40875cat >>confdefs.h <<_ACEOF
40876#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40877_ACEOF
40878
40879
40880
40881  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
40882  if test "x$ac_cv_sizeof_int_p" = x; then
40883    # The test failed, lets stick to the assumed value.
40884    { $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
40885$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
40886  else
40887    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40888
40889    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40890      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
40891      # Let's try to implicitely set the compilers target architecture and retry the test
40892      { $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
40893$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;}
40894      { $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
40895$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;}
40896
40897  # When we add flags to the "official" CFLAGS etc, we need to
40898  # keep track of these additions in ADDED_CFLAGS etc. These
40899  # will later be checked to make sure only controlled additions
40900  # have been made to CFLAGS etc.
40901  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40902  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40903  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
40904
40905  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
40906  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
40907  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
40908
40909  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
40910  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
40911  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
40912
40913
40914      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
40915      unset ac_cv_sizeof_int_p
40916      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
40917      cat >>confdefs.h <<_ACEOF
40918#undef SIZEOF_INT_P
40919_ACEOF
40920
40921      # The cast to long int works around a bug in the HP C Compiler
40922# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
40923# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
40924# This bug is HP SR number 8606223364.
40925{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
40926$as_echo_n "checking size of int *... " >&6; }
40927if ${ac_cv_sizeof_int_p+:} false; then :
40928  $as_echo_n "(cached) " >&6
40929else
40930  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
40931
40932else
40933  if test "$ac_cv_type_int_p" = yes; then
40934     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
40935$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
40936as_fn_error 77 "cannot compute sizeof (int *)
40937See \`config.log' for more details" "$LINENO" 5; }
40938   else
40939     ac_cv_sizeof_int_p=0
40940   fi
40941fi
40942
40943fi
40944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
40945$as_echo "$ac_cv_sizeof_int_p" >&6; }
40946
40947
40948
40949cat >>confdefs.h <<_ACEOF
40950#define SIZEOF_INT_P $ac_cv_sizeof_int_p
40951_ACEOF
40952
40953
40954
40955      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
40956
40957      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
40958        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
40959      fi
40960    fi
40961  fi
40962
40963  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
40964$as_echo_n "checking for target address size... " >&6; }
40965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
40966$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
40967
40968
40969  ###############################################################################
40970  #
40971  # Is the target little of big endian?
40972  #
40973   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
40974$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
40975if ${ac_cv_c_bigendian+:} false; then :
40976  $as_echo_n "(cached) " >&6
40977else
40978  ac_cv_c_bigendian=unknown
40979    # See if we're dealing with a universal compiler.
40980    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40981/* end confdefs.h.  */
40982#ifndef __APPLE_CC__
40983	       not a universal capable compiler
40984	     #endif
40985	     typedef int dummy;
40986
40987_ACEOF
40988if ac_fn_cxx_try_compile "$LINENO"; then :
40989
40990	# Check for potential -arch flags.  It is not universal unless
40991	# there are at least two -arch flags with different values.
40992	ac_arch=
40993	ac_prev=
40994	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
40995	 if test -n "$ac_prev"; then
40996	   case $ac_word in
40997	     i?86 | x86_64 | ppc | ppc64)
40998	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
40999		 ac_arch=$ac_word
41000	       else
41001		 ac_cv_c_bigendian=universal
41002		 break
41003	       fi
41004	       ;;
41005	   esac
41006	   ac_prev=
41007	 elif test "x$ac_word" = "x-arch"; then
41008	   ac_prev=arch
41009	 fi
41010       done
41011fi
41012rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41013    if test $ac_cv_c_bigendian = unknown; then
41014      # See if sys/param.h defines the BYTE_ORDER macro.
41015      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41016/* end confdefs.h.  */
41017#include <sys/types.h>
41018	     #include <sys/param.h>
41019
41020int
41021main ()
41022{
41023#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41024		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41025		     && LITTLE_ENDIAN)
41026	      bogus endian macros
41027	     #endif
41028
41029  ;
41030  return 0;
41031}
41032_ACEOF
41033if ac_fn_cxx_try_compile "$LINENO"; then :
41034  # It does; now see whether it defined to BIG_ENDIAN or not.
41035	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41036/* end confdefs.h.  */
41037#include <sys/types.h>
41038		#include <sys/param.h>
41039
41040int
41041main ()
41042{
41043#if BYTE_ORDER != BIG_ENDIAN
41044		 not big endian
41045		#endif
41046
41047  ;
41048  return 0;
41049}
41050_ACEOF
41051if ac_fn_cxx_try_compile "$LINENO"; then :
41052  ac_cv_c_bigendian=yes
41053else
41054  ac_cv_c_bigendian=no
41055fi
41056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41057fi
41058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41059    fi
41060    if test $ac_cv_c_bigendian = unknown; then
41061      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41062      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41063/* end confdefs.h.  */
41064#include <limits.h>
41065
41066int
41067main ()
41068{
41069#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41070	      bogus endian macros
41071	     #endif
41072
41073  ;
41074  return 0;
41075}
41076_ACEOF
41077if ac_fn_cxx_try_compile "$LINENO"; then :
41078  # It does; now see whether it defined to _BIG_ENDIAN or not.
41079	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41080/* end confdefs.h.  */
41081#include <limits.h>
41082
41083int
41084main ()
41085{
41086#ifndef _BIG_ENDIAN
41087		 not big endian
41088		#endif
41089
41090  ;
41091  return 0;
41092}
41093_ACEOF
41094if ac_fn_cxx_try_compile "$LINENO"; then :
41095  ac_cv_c_bigendian=yes
41096else
41097  ac_cv_c_bigendian=no
41098fi
41099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41100fi
41101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41102    fi
41103    if test $ac_cv_c_bigendian = unknown; then
41104      # Compile a test program.
41105      if test "$cross_compiling" = yes; then :
41106  # Try to guess by grepping values from an object file.
41107	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41108/* end confdefs.h.  */
41109short int ascii_mm[] =
41110		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41111		short int ascii_ii[] =
41112		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41113		int use_ascii (int i) {
41114		  return ascii_mm[i] + ascii_ii[i];
41115		}
41116		short int ebcdic_ii[] =
41117		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41118		short int ebcdic_mm[] =
41119		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41120		int use_ebcdic (int i) {
41121		  return ebcdic_mm[i] + ebcdic_ii[i];
41122		}
41123		extern int foo;
41124
41125int
41126main ()
41127{
41128return use_ascii (foo) == use_ebcdic (foo);
41129  ;
41130  return 0;
41131}
41132_ACEOF
41133if ac_fn_cxx_try_compile "$LINENO"; then :
41134  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41135	      ac_cv_c_bigendian=yes
41136	    fi
41137	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41138	      if test "$ac_cv_c_bigendian" = unknown; then
41139		ac_cv_c_bigendian=no
41140	      else
41141		# finding both strings is unlikely to happen, but who knows?
41142		ac_cv_c_bigendian=unknown
41143	      fi
41144	    fi
41145fi
41146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41147else
41148  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41149/* end confdefs.h.  */
41150$ac_includes_default
41151int
41152main ()
41153{
41154
41155	     /* Are we little or big endian?  From Harbison&Steele.  */
41156	     union
41157	     {
41158	       long int l;
41159	       char c[sizeof (long int)];
41160	     } u;
41161	     u.l = 1;
41162	     return u.c[sizeof (long int) - 1] == 1;
41163
41164  ;
41165  return 0;
41166}
41167_ACEOF
41168if ac_fn_cxx_try_run "$LINENO"; then :
41169  ac_cv_c_bigendian=no
41170else
41171  ac_cv_c_bigendian=yes
41172fi
41173rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41174  conftest.$ac_objext conftest.beam conftest.$ac_ext
41175fi
41176
41177    fi
41178fi
41179{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41180$as_echo "$ac_cv_c_bigendian" >&6; }
41181 case $ac_cv_c_bigendian in #(
41182   yes)
41183     ENDIAN="big";; #(
41184   no)
41185     ENDIAN="little" ;; #(
41186   universal)
41187     ENDIAN="universal_endianness"
41188     ;; #(
41189   *)
41190     ENDIAN="unknown" ;;
41191 esac
41192
41193
41194  if test "x$ENDIAN" = xuniversal_endianness; then
41195    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41196  fi
41197  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41198    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
41199  fi
41200
41201
41202# Configure flags for the tools
41203
41204  ###############################################################################
41205  #
41206  # How to compile shared libraries.
41207  #
41208
41209  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41210    PICFLAG="-fPIC"
41211    C_FLAG_REORDER=''
41212    CXX_FLAG_REORDER=''
41213
41214    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41215      # Linking is different on MacOSX
41216      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41217      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41218      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41219      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41220      SET_SHARED_LIBRARY_MAPFILE=''
41221    else
41222      # Default works for linux, might work on other platforms as well.
41223      SHARED_LIBRARY_FLAGS='-shared'
41224      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41225      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41226      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41227      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41228    fi
41229  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41230    PICFLAG="-KPIC"
41231    C_FLAG_REORDER='-xF'
41232    CXX_FLAG_REORDER='-xF'
41233    SHARED_LIBRARY_FLAGS="-G"
41234    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41235    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41236    SET_SHARED_LIBRARY_NAME=''
41237    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41238  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41239    PICFLAG="-qpic=large"
41240    C_FLAG_REORDER=''
41241    CXX_FLAG_REORDER=''
41242    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41243    SET_EXECUTABLE_ORIGIN=""
41244    SET_SHARED_LIBRARY_ORIGIN=''
41245    SET_SHARED_LIBRARY_NAME=''
41246    SET_SHARED_LIBRARY_MAPFILE=''
41247  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41248    PICFLAG=""
41249    C_FLAG_REORDER=''
41250    CXX_FLAG_REORDER=''
41251    SHARED_LIBRARY_FLAGS="-LD"
41252    SET_EXECUTABLE_ORIGIN=''
41253    SET_SHARED_LIBRARY_ORIGIN=''
41254    SET_SHARED_LIBRARY_NAME=''
41255    SET_SHARED_LIBRARY_MAPFILE=''
41256  fi
41257
41258
41259
41260
41261
41262
41263
41264
41265
41266  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41267    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41268    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41269    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41270  fi
41271  # The (cross) compiler is now configured, we can now test capabilities
41272  # of the target platform.
41273
41274
41275
41276  ###############################################################################
41277  #
41278  # Setup the opt flags for different compilers
41279  # and different operating systems.
41280  #
41281
41282  # FIXME: this was indirectly the old default, but just inherited.
41283  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41284  #   C_FLAG_DEPS="-MMD -MF"
41285  # fi
41286
41287  # Generate make dependency files
41288  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41289    C_FLAG_DEPS="-MMD -MF"
41290  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41291    C_FLAG_DEPS="-xMMD -xMF"
41292  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41293    C_FLAG_DEPS="-qmakedep=gcc -MF"
41294  fi
41295  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41296
41297
41298
41299  # Debug symbols
41300  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41301    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41302      CFLAGS_DEBUG_SYMBOLS="-g1"
41303      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41304    else
41305      CFLAGS_DEBUG_SYMBOLS="-g"
41306      CXXFLAGS_DEBUG_SYMBOLS="-g"
41307    fi
41308  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41309    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41310    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41311  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41312    CFLAGS_DEBUG_SYMBOLS="-g"
41313    CXXFLAGS_DEBUG_SYMBOLS="-g"
41314  fi
41315
41316
41317
41318  # Optimization levels
41319  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41320    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xalias_level=basic -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41321
41322    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41323      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41324      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xregs=no%frameptr"
41325      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41326      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41327      C_O_FLAG_NONE="-xregs=no%frameptr"
41328      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41329      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41330      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41331      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41332      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41333        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41334        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41335      fi
41336    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41337      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41338      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41339      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41340      C_O_FLAG_NONE=""
41341      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41342      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41343      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41344      CXX_O_FLAG_NONE=""
41345    fi
41346  else
41347    # The remaining toolchains share opt flags between CC and CXX;
41348    # setup for C and duplicate afterwards.
41349    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41350      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41351        # On MacOSX we optimize for size, something
41352        # we should do for all platforms?
41353        C_O_FLAG_HIGHEST="-Os"
41354        C_O_FLAG_HI="-Os"
41355        C_O_FLAG_NORM="-Os"
41356        C_O_FLAG_NONE=""
41357      else
41358        C_O_FLAG_HIGHEST="-O3"
41359        C_O_FLAG_HI="-O3"
41360        C_O_FLAG_NORM="-O2"
41361        C_O_FLAG_NONE="-O0"
41362      fi
41363    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41364      C_O_FLAG_HIGHEST="-O3"
41365      C_O_FLAG_HI="-O3 -qstrict"
41366      C_O_FLAG_NORM="-O2"
41367      C_O_FLAG_NONE=""
41368    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41369      C_O_FLAG_HIGHEST="-O2"
41370      C_O_FLAG_HI="-O1"
41371      C_O_FLAG_NORM="-O1"
41372      C_O_FLAG_NONE="-Od"
41373    fi
41374    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41375    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41376    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41377    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41378  fi
41379
41380
41381
41382
41383
41384
41385
41386
41387
41388
41389
41390  # Special extras...
41391  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41392    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41393      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41394      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41395    fi
41396  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41397    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41398    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41399    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41400  fi
41401
41402  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41403    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41404$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41405  fi
41406
41407  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41408    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41409$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41410  fi
41411
41412  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41413    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41414$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41415  fi
41416
41417
41418# Check whether --with-extra-cflags was given.
41419if test "${with_extra_cflags+set}" = set; then :
41420  withval=$with_extra_cflags;
41421fi
41422
41423
41424
41425# Check whether --with-extra-cxxflags was given.
41426if test "${with_extra_cxxflags+set}" = set; then :
41427  withval=$with_extra_cxxflags;
41428fi
41429
41430
41431
41432# Check whether --with-extra-ldflags was given.
41433if test "${with_extra_ldflags+set}" = set; then :
41434  withval=$with_extra_ldflags;
41435fi
41436
41437
41438  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41439  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41440  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
41441
41442  # Hotspot needs these set in their legacy form
41443  LEGACY_EXTRA_CFLAGS=$with_extra_cflags
41444  LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
41445  LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
41446
41447
41448
41449
41450
41451  ###############################################################################
41452  #
41453  # Now setup the CFLAGS and LDFLAGS for the JDK build.
41454  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
41455  #
41456
41457  # Setup compiler/platform specific flags to CFLAGS_JDK,
41458  # CXXFLAGS_JDK and CCXXFLAGS_JDK (common to C and CXX?)
41459  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41460    # these options are used for both C and C++ compiles
41461    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
41462        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
41463    case $OPENJDK_TARGET_CPU_ARCH in
41464      arm )
41465        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
41466        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41467        ;;
41468      ppc )
41469        # on ppc we don't prevent gcc to omit frame pointer nor strict-aliasing
41470        ;;
41471      * )
41472        CCXXFLAGS_JDK="$CCXXFLAGS_JDK -fno-omit-frame-pointer"
41473        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
41474        ;;
41475    esac
41476  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41477    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
41478    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
41479      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
41480      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
41481    fi
41482
41483    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
41484    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
41485  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41486    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41487    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
41488  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41489    CCXXFLAGS_JDK="$CCXXFLAGS $CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
41490    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
41491    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
41492    -DWIN32 -DIAL"
41493    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
41494      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_AMD64_ -Damd64"
41495    else
41496      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_X86_ -Dx86"
41497    fi
41498  fi
41499
41500  ###############################################################################
41501
41502  # Adjust flags according to debug level.
41503  case $DEBUG_LEVEL in
41504    fastdebug )
41505      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41506      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41507      C_O_FLAG_HI="$C_O_FLAG_NORM"
41508      C_O_FLAG_NORM="$C_O_FLAG_NORM"
41509      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41510      CXX_O_FLAG_NORM="$CXX_O_FLAG_NORM"
41511      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41512      ;;
41513    slowdebug )
41514      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS"
41515      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS"
41516      C_O_FLAG_HI="$C_O_FLAG_NONE"
41517      C_O_FLAG_NORM="$C_O_FLAG_NONE"
41518      CXX_O_FLAG_HI="$CXX_O_FLAG_NONE"
41519      CXX_O_FLAG_NORM="$CXX_O_FLAG_NONE"
41520      JAVAC_FLAGS="$JAVAC_FLAGS -g"
41521      ;;
41522  esac
41523
41524  # Setup LP64
41525  CCXXFLAGS_JDK="$CCXXFLAGS_JDK $ADD_LP64"
41526
41527  # Set some common defines. These works for all compilers, but assume
41528  # -D is universally accepted.
41529
41530  # Setup endianness
41531  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
41532    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
41533    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
41534    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
41535    #   Note: -Dmacro         is the same as    #define macro 1
41536    #         -Dmacro=        is the same as    #define macro
41537    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41538      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
41539    else
41540      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
41541    fi
41542  else
41543    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_BIG_ENDIAN"
41544  fi
41545
41546  # Setup target OS define. Use OS target name but in upper case.
41547  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
41548  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
41549
41550  # Setup target CPU
41551  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
41552
41553  # Setup debug/release defines
41554  if test "x$DEBUG_LEVEL" = xrelease; then
41555    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DNDEBUG"
41556    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41557      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DTRIMMED"
41558    fi
41559  else
41560    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DDEBUG"
41561  fi
41562
41563  # Setup release name
41564  CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
41565
41566
41567  # Set some additional per-OS defines.
41568  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41569    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
41570  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41571    # FIXME: PPC64 should not be here.
41572    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DPPC64"
41573  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
41574    CCXXFLAGS_JDK="$CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
41575  fi
41576
41577  # Additional macosx handling
41578  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41579    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41580      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
41581      # FIXME: clean this up, and/or move it elsewhere.
41582
41583      # Setting these parameters makes it an error to link to macosx APIs that are
41584      # newer than the given OS version and makes the linked binaries compatible
41585      # even if built on a newer version of the OS.
41586      # The expected format is X.Y.Z
41587      MACOSX_VERSION_MIN=10.7.0
41588
41589
41590      # The macro takes the version with no dots, ex: 1070
41591      # Let the flags variables get resolved in make for easier override on make
41592      # command line.
41593      CCXXFLAGS_JDK="$CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41594      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
41595    fi
41596  fi
41597
41598  # Setup some hard coded includes
41599  CCXXFLAGS_JDK="$CCXXFLAGS_JDK \
41600      -I${JDK_OUTPUTDIR}/include \
41601      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
41602      -I${JDK_TOPDIR}/src/share/javavm/export \
41603      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
41604      -I${JDK_TOPDIR}/src/share/native/common \
41605      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
41606
41607  # The shared libraries are compiled using the picflag.
41608  CFLAGS_JDKLIB="$CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
41609  CXXFLAGS_JDKLIB="$CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
41610
41611  # Executable flags
41612  CFLAGS_JDKEXE="$CCXXFLAGS_JDK $CFLAGS_JDK"
41613  CXXFLAGS_JDKEXE="$CCXXFLAGS_JDK $CXXFLAGS_JDK"
41614
41615
41616
41617
41618
41619
41620  # Setup LDFLAGS et al.
41621  #
41622  # Now this is odd. The JDK native libraries have to link against libjvm.so
41623  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
41624  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
41625  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
41626  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
41627  # libraries will link to whatever is in memory. Yuck.
41628  #
41629  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
41630  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41631    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
41632    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41633      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
41634    fi
41635    # TODO: make -debug optional "--disable-full-debug-symbols"
41636    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
41637    LDFLAGS_JDKLIB="${LDFLAGS_JDK} -dll -libpath:${JDK_OUTPUTDIR}/lib"
41638    LDFLAGS_JDKLIB_SUFFIX=""
41639    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
41640      LDFLAGS_STACK_SIZE=1048576
41641    else
41642      LDFLAGS_STACK_SIZE=327680
41643    fi
41644    LDFLAGS_JDKEXE="${LDFLAGS_JDK} /STACK:$LDFLAGS_STACK_SIZE"
41645  else
41646    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41647      # If this is a --hash-style=gnu system, use --hash-style=both, why?
41648      # We have previously set HAS_GNU_HASH if this is the case
41649      if test -n "$HAS_GNU_HASH"; then
41650        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both "
41651      fi
41652      if test "x$OPENJDK_TARGET_OS" = xlinux; then
41653        # And since we now know that the linker is gnu, then add -z defs, to forbid
41654        # undefined symbols in object files.
41655        LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
41656        if test "x$DEBUG_LEVEL" = "xrelease"; then
41657          # When building release libraries, tell the linker optimize them.
41658          # Should this be supplied to the OSS linker as well?
41659          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
41660        fi
41661      fi
41662    fi
41663
41664    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41665      LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
41666      LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
41667    fi
41668
41669    LDFLAGS_JDKLIB="${LDFLAGS_JDK} $SHARED_LIBRARY_FLAGS \
41670        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
41671
41672    # On some platforms (mac) the linker warns about non existing -L dirs.
41673    # Add server first if available. Linking aginst client does not always produce the same results.
41674    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
41675    # Default to server for other variants.
41676    if test "x$JVM_VARIANT_SERVER" = xtrue; then
41677      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41678    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
41679      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
41680    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
41681      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
41682    else
41683      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
41684    fi
41685
41686    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
41687    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41688      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
41689    fi
41690
41691    LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
41692    if test "x$OPENJDK_TARGET_OS" = xlinux; then
41693      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
41694    fi
41695  fi
41696
41697
41698
41699
41700
41701
41702
41703
41704  # Some Zero and Shark settings.
41705  # ZERO_ARCHFLAG tells the compiler which mode to build for
41706  case "${OPENJDK_TARGET_CPU}" in
41707    s390)
41708      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
41709      ;;
41710    *)
41711      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41712  esac
41713
41714  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
41715$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
41716  supports=yes
41717
41718  saved_cflags="$CFLAGS"
41719  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
41720  ac_ext=c
41721ac_cpp='$CPP $CPPFLAGS'
41722ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41723ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41724ac_compiler_gnu=$ac_cv_c_compiler_gnu
41725
41726  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41727/* end confdefs.h.  */
41728int i;
41729_ACEOF
41730if ac_fn_c_try_compile "$LINENO"; then :
41731
41732else
41733  supports=no
41734fi
41735rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41736  ac_ext=cpp
41737ac_cpp='$CXXCPP $CPPFLAGS'
41738ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41739ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41740ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41741
41742  CFLAGS="$saved_cflags"
41743
41744  saved_cxxflags="$CXXFLAGS"
41745  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41753/* end confdefs.h.  */
41754int i;
41755_ACEOF
41756if ac_fn_cxx_try_compile "$LINENO"; then :
41757
41758else
41759  supports=no
41760fi
41761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41762  ac_ext=cpp
41763ac_cpp='$CXXCPP $CPPFLAGS'
41764ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41765ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41766ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41767
41768  CXXFLAGS="$saved_cxxflags"
41769
41770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41771$as_echo "$supports" >&6; }
41772  if test "x$supports" = "xyes" ; then
41773    :
41774  else
41775    ZERO_ARCHFLAG=""
41776  fi
41777
41778
41779
41780  # Check that the compiler supports -mX (or -qX on AIX) flags
41781  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
41782
41783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
41784$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
41785  supports=yes
41786
41787  saved_cflags="$CFLAGS"
41788  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41789  ac_ext=c
41790ac_cpp='$CPP $CPPFLAGS'
41791ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41792ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41793ac_compiler_gnu=$ac_cv_c_compiler_gnu
41794
41795  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41796/* end confdefs.h.  */
41797int i;
41798_ACEOF
41799if ac_fn_c_try_compile "$LINENO"; then :
41800
41801else
41802  supports=no
41803fi
41804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41805  ac_ext=cpp
41806ac_cpp='$CXXCPP $CPPFLAGS'
41807ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41808ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41809ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41810
41811  CFLAGS="$saved_cflags"
41812
41813  saved_cxxflags="$CXXFLAGS"
41814  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
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  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41822/* end confdefs.h.  */
41823int i;
41824_ACEOF
41825if ac_fn_cxx_try_compile "$LINENO"; then :
41826
41827else
41828  supports=no
41829fi
41830rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41831  ac_ext=cpp
41832ac_cpp='$CXXCPP $CPPFLAGS'
41833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
41834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
41835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
41836
41837  CXXFLAGS="$saved_cxxflags"
41838
41839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
41840$as_echo "$supports" >&6; }
41841  if test "x$supports" = "xyes" ; then
41842    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
41843  else
41844    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
41845  fi
41846
41847
41848
41849
41850# Setup debug symbols (need objcopy from the toolchain for that)
41851
41852  #
41853  # ENABLE_DEBUG_SYMBOLS
41854  # This must be done after the toolchain is setup, since we're looking at objcopy.
41855  #
41856  # Check whether --enable-debug-symbols was given.
41857if test "${enable_debug_symbols+set}" = set; then :
41858  enableval=$enable_debug_symbols;
41859fi
41860
41861
41862  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
41863$as_echo_n "checking if we should generate debug symbols... " >&6; }
41864
41865  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
41866    # explicit enabling of enable-debug-symbols and can't find objcopy
41867    #   this is an error
41868    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
41869  fi
41870
41871  if test "x$enable_debug_symbols" = "xyes"; then
41872    ENABLE_DEBUG_SYMBOLS=true
41873  elif test "x$enable_debug_symbols" = "xno"; then
41874    ENABLE_DEBUG_SYMBOLS=false
41875  else
41876    # Default is on if objcopy is found
41877    if test "x$OBJCOPY" != x; then
41878      ENABLE_DEBUG_SYMBOLS=true
41879    # MacOS X and Windows don't use objcopy but default is on for those OSes
41880    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
41881      ENABLE_DEBUG_SYMBOLS=true
41882    else
41883      ENABLE_DEBUG_SYMBOLS=false
41884    fi
41885  fi
41886
41887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
41888$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
41889
41890  #
41891  # ZIP_DEBUGINFO_FILES
41892  #
41893  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
41894$as_echo_n "checking if we should zip debug-info files... " >&6; }
41895  # Check whether --enable-zip-debug-info was given.
41896if test "${enable_zip_debug_info+set}" = set; then :
41897  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
41898else
41899  enable_zip_debug_info="yes"
41900fi
41901
41902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
41903$as_echo "${enable_zip_debug_info}" >&6; }
41904
41905  if test "x${enable_zip_debug_info}" = "xno"; then
41906    ZIP_DEBUGINFO_FILES=false
41907  else
41908    ZIP_DEBUGINFO_FILES=true
41909  fi
41910
41911
41912
41913
41914
41915###############################################################################
41916#
41917# Check dependencies for external and internal libraries.
41918#
41919###############################################################################
41920
41921# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
41922
41923  # When using cygwin or msys, we need a wrapper binary that renames
41924  # /cygdrive/c/ arguments into c:/ arguments and peeks into
41925  # @files and rewrites these too! This wrapper binary is
41926  # called fixpath.
41927  FIXPATH=
41928  if test "x$OPENJDK_BUILD_OS" = xwindows; then
41929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
41930$as_echo_n "checking if fixpath can be created... " >&6; }
41931    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
41932    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
41933    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
41934      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
41935      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
41936      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
41937      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
41938    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
41939      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
41940      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
41941
41942      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
41943      # @ was chosen as separator to minimize risk of other tools messing around with it
41944      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
41945      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
41946
41947      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
41948    fi
41949    rm -f $OUTPUT_ROOT/fixpath*
41950    cd $OUTPUT_ROOT
41951    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
41952    cd $CURDIR
41953
41954    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
41955      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41956$as_echo "no" >&6; }
41957      cat $OUTPUT_ROOT/fixpath1.log
41958      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
41959    fi
41960    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41961$as_echo "yes" >&6; }
41962    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
41963$as_echo_n "checking if fixpath.exe works... " >&6; }
41964    cd $OUTPUT_ROOT
41965    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
41966    cd $CURDIR
41967    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
41968      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41969$as_echo "no" >&6; }
41970      cat $OUTPUT_ROOT/fixpath2.log
41971      as_fn_error $? "fixpath did not work!" "$LINENO" 5
41972    fi
41973    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
41974$as_echo "yes" >&6; }
41975    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
41976  fi
41977
41978
41979
41980
41981
41982
41983  ###############################################################################
41984  #
41985  # OS specific settings that we never will need to probe.
41986  #
41987  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41988    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
41989$as_echo_n "checking what is not needed on Linux?... " >&6; }
41990    PULSE_NOT_NEEDED=yes
41991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
41992$as_echo "pulse" >&6; }
41993  fi
41994
41995  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41996    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
41997$as_echo_n "checking what is not needed on Solaris?... " >&6; }
41998    ALSA_NOT_NEEDED=yes
41999    PULSE_NOT_NEEDED=yes
42000    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42001$as_echo "alsa pulse" >&6; }
42002  fi
42003
42004  if test "x$OPENJDK_TARGET_OS" = xaix; then
42005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42006$as_echo_n "checking what is not needed on AIX?... " >&6; }
42007    ALSA_NOT_NEEDED=yes
42008    PULSE_NOT_NEEDED=yes
42009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42010$as_echo "alsa pulse" >&6; }
42011  fi
42012
42013
42014  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42016$as_echo_n "checking what is not needed on Windows?... " >&6; }
42017    CUPS_NOT_NEEDED=yes
42018    ALSA_NOT_NEEDED=yes
42019    PULSE_NOT_NEEDED=yes
42020    X11_NOT_NEEDED=yes
42021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42022$as_echo "alsa cups pulse x11" >&6; }
42023  fi
42024
42025  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42026    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42027$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42028    ALSA_NOT_NEEDED=yes
42029    PULSE_NOT_NEEDED=yes
42030    X11_NOT_NEEDED=yes
42031    # If the java runtime framework is disabled, then we need X11.
42032    # This will be adjusted below.
42033    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42034$as_echo "alsa pulse x11" >&6; }
42035  fi
42036
42037  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42038    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42039$as_echo_n "checking what is not needed on bsd?... " >&6; }
42040    ALSA_NOT_NEEDED=yes
42041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42042$as_echo "alsa" >&6; }
42043  fi
42044
42045  if test "x$OPENJDK" = "xfalse"; then
42046    FREETYPE_NOT_NEEDED=yes
42047  fi
42048
42049  if test "x$SUPPORT_HEADFUL" = xno; then
42050    X11_NOT_NEEDED=yes
42051  fi
42052
42053  ###############################################################################
42054  #
42055  # Check for MacOSX support for OpenJDK.
42056  #
42057
42058
42059  # Check whether --enable-macosx-runtime-support was given.
42060if test "${enable_macosx_runtime_support+set}" = set; then :
42061  enableval=$enable_macosx_runtime_support;
42062fi
42063
42064  if test "x$enable_macosx_runtime_support" != x; then
42065    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42066$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42067  fi
42068
42069
42070  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42071$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42072  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42073    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42074$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42075  else
42076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42077$as_echo "no" >&6; }
42078  fi
42079
42080
42081
42082  ###############################################################################
42083  #
42084  # Check for X Windows
42085  #
42086
42087  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42088  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42089  # --x-libraries for the sysroot, if that seems to be correct.
42090  if test "x$SYS_ROOT" != "x/"; then
42091    if test "x$x_includes" = xNONE; then
42092      if test -f "$SYS_ROOT/usr/X11R6/include/X11/Xlib.h"; then
42093        x_includes="$SYS_ROOT/usr/X11R6/include"
42094      elif test -f "$SYS_ROOT/usr/include/X11/Xlib.h"; then
42095        x_includes="$SYS_ROOT/usr/include"
42096      fi
42097    fi
42098    if test "x$x_libraries" = xNONE; then
42099      if test -f "$SYS_ROOT/usr/X11R6/lib/libX11.so"; then
42100        x_libraries="$SYS_ROOT/usr/X11R6/lib"
42101      elif test "$SYS_ROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42102        x_libraries="$SYS_ROOT/usr/lib64"
42103      elif test -f "$SYS_ROOT/usr/lib/libX11.so"; then
42104        x_libraries="$SYS_ROOT/usr/lib"
42105      fi
42106    fi
42107  fi
42108
42109  # Now let autoconf do it's magic
42110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42111$as_echo_n "checking for X... " >&6; }
42112
42113
42114# Check whether --with-x was given.
42115if test "${with_x+set}" = set; then :
42116  withval=$with_x;
42117fi
42118
42119# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42120if test "x$with_x" = xno; then
42121  # The user explicitly disabled X.
42122  have_x=disabled
42123else
42124  case $x_includes,$x_libraries in #(
42125    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42126    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42127  $as_echo_n "(cached) " >&6
42128else
42129  # One or both of the vars are not set, and there is no cached value.
42130ac_x_includes=no ac_x_libraries=no
42131rm -f -r conftest.dir
42132if mkdir conftest.dir; then
42133  cd conftest.dir
42134  cat >Imakefile <<'_ACEOF'
42135incroot:
42136	@echo incroot='${INCROOT}'
42137usrlibdir:
42138	@echo usrlibdir='${USRLIBDIR}'
42139libdir:
42140	@echo libdir='${LIBDIR}'
42141_ACEOF
42142  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42143    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42144    for ac_var in incroot usrlibdir libdir; do
42145      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42146    done
42147    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42148    for ac_extension in a so sl dylib la dll; do
42149      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42150	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42151	ac_im_usrlibdir=$ac_im_libdir; break
42152      fi
42153    done
42154    # Screen out bogus values from the imake configuration.  They are
42155    # bogus both because they are the default anyway, and because
42156    # using them would break gcc on systems where it needs fixed includes.
42157    case $ac_im_incroot in
42158	/usr/include) ac_x_includes= ;;
42159	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42160    esac
42161    case $ac_im_usrlibdir in
42162	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42163	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42164    esac
42165  fi
42166  cd ..
42167  rm -f -r conftest.dir
42168fi
42169
42170# Standard set of common directories for X headers.
42171# Check X11 before X11Rn because it is often a symlink to the current release.
42172ac_x_header_dirs='
42173/usr/X11/include
42174/usr/X11R7/include
42175/usr/X11R6/include
42176/usr/X11R5/include
42177/usr/X11R4/include
42178
42179/usr/include/X11
42180/usr/include/X11R7
42181/usr/include/X11R6
42182/usr/include/X11R5
42183/usr/include/X11R4
42184
42185/usr/local/X11/include
42186/usr/local/X11R7/include
42187/usr/local/X11R6/include
42188/usr/local/X11R5/include
42189/usr/local/X11R4/include
42190
42191/usr/local/include/X11
42192/usr/local/include/X11R7
42193/usr/local/include/X11R6
42194/usr/local/include/X11R5
42195/usr/local/include/X11R4
42196
42197/usr/X386/include
42198/usr/x386/include
42199/usr/XFree86/include/X11
42200
42201/usr/include
42202/usr/local/include
42203/usr/unsupported/include
42204/usr/athena/include
42205/usr/local/x11r5/include
42206/usr/lpp/Xamples/include
42207
42208/usr/openwin/include
42209/usr/openwin/share/include'
42210
42211if test "$ac_x_includes" = no; then
42212  # Guess where to find include files, by looking for Xlib.h.
42213  # First, try using that file with no special directory specified.
42214  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42215/* end confdefs.h.  */
42216#include <X11/Xlib.h>
42217_ACEOF
42218if ac_fn_cxx_try_cpp "$LINENO"; then :
42219  # We can compile using X headers with no special include directory.
42220ac_x_includes=
42221else
42222  for ac_dir in $ac_x_header_dirs; do
42223  if test -r "$ac_dir/X11/Xlib.h"; then
42224    ac_x_includes=$ac_dir
42225    break
42226  fi
42227done
42228fi
42229rm -f conftest.err conftest.i conftest.$ac_ext
42230fi # $ac_x_includes = no
42231
42232if test "$ac_x_libraries" = no; then
42233  # Check for the libraries.
42234  # See if we find them without any special options.
42235  # Don't add to $LIBS permanently.
42236  ac_save_LIBS=$LIBS
42237  LIBS="-lX11 $LIBS"
42238  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42239/* end confdefs.h.  */
42240#include <X11/Xlib.h>
42241int
42242main ()
42243{
42244XrmInitialize ()
42245  ;
42246  return 0;
42247}
42248_ACEOF
42249if ac_fn_cxx_try_link "$LINENO"; then :
42250  LIBS=$ac_save_LIBS
42251# We can link X programs with no special library path.
42252ac_x_libraries=
42253else
42254  LIBS=$ac_save_LIBS
42255for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42256do
42257  # Don't even attempt the hair of trying to link an X program!
42258  for ac_extension in a so sl dylib la dll; do
42259    if test -r "$ac_dir/libX11.$ac_extension"; then
42260      ac_x_libraries=$ac_dir
42261      break 2
42262    fi
42263  done
42264done
42265fi
42266rm -f core conftest.err conftest.$ac_objext \
42267    conftest$ac_exeext conftest.$ac_ext
42268fi # $ac_x_libraries = no
42269
42270case $ac_x_includes,$ac_x_libraries in #(
42271  no,* | *,no | *\'*)
42272    # Didn't find X, or a directory has "'" in its name.
42273    ac_cv_have_x="have_x=no";; #(
42274  *)
42275    # Record where we found X for the cache.
42276    ac_cv_have_x="have_x=yes\
42277	ac_x_includes='$ac_x_includes'\
42278	ac_x_libraries='$ac_x_libraries'"
42279esac
42280fi
42281;; #(
42282    *) have_x=yes;;
42283  esac
42284  eval "$ac_cv_have_x"
42285fi # $with_x != no
42286
42287if test "$have_x" != yes; then
42288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42289$as_echo "$have_x" >&6; }
42290  no_x=yes
42291else
42292  # If each of the values was on the command line, it overrides each guess.
42293  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42294  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42295  # Update the cache value to reflect the command line values.
42296  ac_cv_have_x="have_x=yes\
42297	ac_x_includes='$x_includes'\
42298	ac_x_libraries='$x_libraries'"
42299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42300$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42301fi
42302
42303  if test "$no_x" = yes; then
42304  # Not all programs may use this symbol, but it does not hurt to define it.
42305
42306$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42307
42308  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42309else
42310  if test -n "$x_includes"; then
42311    X_CFLAGS="$X_CFLAGS -I$x_includes"
42312  fi
42313
42314  # It would also be nice to do this for all -L options, not just this one.
42315  if test -n "$x_libraries"; then
42316    X_LIBS="$X_LIBS -L$x_libraries"
42317    # For Solaris; some versions of Sun CC require a space after -R and
42318    # others require no space.  Words are not sufficient . . . .
42319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42320$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42321    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42322    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42323    ac_cxx_werror_flag=yes
42324    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42325/* end confdefs.h.  */
42326
42327int
42328main ()
42329{
42330
42331  ;
42332  return 0;
42333}
42334_ACEOF
42335if ac_fn_cxx_try_link "$LINENO"; then :
42336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42337$as_echo "no" >&6; }
42338       X_LIBS="$X_LIBS -R$x_libraries"
42339else
42340  LIBS="$ac_xsave_LIBS -R $x_libraries"
42341       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42342/* end confdefs.h.  */
42343
42344int
42345main ()
42346{
42347
42348  ;
42349  return 0;
42350}
42351_ACEOF
42352if ac_fn_cxx_try_link "$LINENO"; then :
42353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42354$as_echo "yes" >&6; }
42355	  X_LIBS="$X_LIBS -R $x_libraries"
42356else
42357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42358$as_echo "neither works" >&6; }
42359fi
42360rm -f core conftest.err conftest.$ac_objext \
42361    conftest$ac_exeext conftest.$ac_ext
42362fi
42363rm -f core conftest.err conftest.$ac_objext \
42364    conftest$ac_exeext conftest.$ac_ext
42365    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42366    LIBS=$ac_xsave_LIBS
42367  fi
42368
42369  # Check for system-dependent libraries X programs must link with.
42370  # Do this before checking for the system-independent R6 libraries
42371  # (-lICE), since we may need -lsocket or whatever for X linking.
42372
42373  if test "$ISC" = yes; then
42374    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
42375  else
42376    # Martyn Johnson says this is needed for Ultrix, if the X
42377    # libraries were built with DECnet support.  And Karl Berry says
42378    # the Alpha needs dnet_stub (dnet does not exist).
42379    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
42380    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42381/* end confdefs.h.  */
42382
42383/* Override any GCC internal prototype to avoid an error.
42384   Use char because int might match the return type of a GCC
42385   builtin and then its argument prototype would still apply.  */
42386#ifdef __cplusplus
42387extern "C"
42388#endif
42389char XOpenDisplay ();
42390int
42391main ()
42392{
42393return XOpenDisplay ();
42394  ;
42395  return 0;
42396}
42397_ACEOF
42398if ac_fn_cxx_try_link "$LINENO"; then :
42399
42400else
42401  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
42402$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
42403if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
42404  $as_echo_n "(cached) " >&6
42405else
42406  ac_check_lib_save_LIBS=$LIBS
42407LIBS="-ldnet  $LIBS"
42408cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42409/* end confdefs.h.  */
42410
42411/* Override any GCC internal prototype to avoid an error.
42412   Use char because int might match the return type of a GCC
42413   builtin and then its argument prototype would still apply.  */
42414#ifdef __cplusplus
42415extern "C"
42416#endif
42417char dnet_ntoa ();
42418int
42419main ()
42420{
42421return dnet_ntoa ();
42422  ;
42423  return 0;
42424}
42425_ACEOF
42426if ac_fn_cxx_try_link "$LINENO"; then :
42427  ac_cv_lib_dnet_dnet_ntoa=yes
42428else
42429  ac_cv_lib_dnet_dnet_ntoa=no
42430fi
42431rm -f core conftest.err conftest.$ac_objext \
42432    conftest$ac_exeext conftest.$ac_ext
42433LIBS=$ac_check_lib_save_LIBS
42434fi
42435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
42436$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
42437if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
42438  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
42439fi
42440
42441    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
42442      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
42443$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
42444if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
42445  $as_echo_n "(cached) " >&6
42446else
42447  ac_check_lib_save_LIBS=$LIBS
42448LIBS="-ldnet_stub  $LIBS"
42449cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42450/* end confdefs.h.  */
42451
42452/* Override any GCC internal prototype to avoid an error.
42453   Use char because int might match the return type of a GCC
42454   builtin and then its argument prototype would still apply.  */
42455#ifdef __cplusplus
42456extern "C"
42457#endif
42458char dnet_ntoa ();
42459int
42460main ()
42461{
42462return dnet_ntoa ();
42463  ;
42464  return 0;
42465}
42466_ACEOF
42467if ac_fn_cxx_try_link "$LINENO"; then :
42468  ac_cv_lib_dnet_stub_dnet_ntoa=yes
42469else
42470  ac_cv_lib_dnet_stub_dnet_ntoa=no
42471fi
42472rm -f core conftest.err conftest.$ac_objext \
42473    conftest$ac_exeext conftest.$ac_ext
42474LIBS=$ac_check_lib_save_LIBS
42475fi
42476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
42477$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
42478if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
42479  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
42480fi
42481
42482    fi
42483fi
42484rm -f core conftest.err conftest.$ac_objext \
42485    conftest$ac_exeext conftest.$ac_ext
42486    LIBS="$ac_xsave_LIBS"
42487
42488    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
42489    # to get the SysV transport functions.
42490    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
42491    # needs -lnsl.
42492    # The nsl library prevents programs from opening the X display
42493    # on Irix 5.2, according to T.E. Dickey.
42494    # The functions gethostbyname, getservbyname, and inet_addr are
42495    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
42496    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
42497if test "x$ac_cv_func_gethostbyname" = xyes; then :
42498
42499fi
42500
42501    if test $ac_cv_func_gethostbyname = no; then
42502      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
42503$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
42504if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
42505  $as_echo_n "(cached) " >&6
42506else
42507  ac_check_lib_save_LIBS=$LIBS
42508LIBS="-lnsl  $LIBS"
42509cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42510/* end confdefs.h.  */
42511
42512/* Override any GCC internal prototype to avoid an error.
42513   Use char because int might match the return type of a GCC
42514   builtin and then its argument prototype would still apply.  */
42515#ifdef __cplusplus
42516extern "C"
42517#endif
42518char gethostbyname ();
42519int
42520main ()
42521{
42522return gethostbyname ();
42523  ;
42524  return 0;
42525}
42526_ACEOF
42527if ac_fn_cxx_try_link "$LINENO"; then :
42528  ac_cv_lib_nsl_gethostbyname=yes
42529else
42530  ac_cv_lib_nsl_gethostbyname=no
42531fi
42532rm -f core conftest.err conftest.$ac_objext \
42533    conftest$ac_exeext conftest.$ac_ext
42534LIBS=$ac_check_lib_save_LIBS
42535fi
42536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
42537$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
42538if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
42539  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
42540fi
42541
42542      if test $ac_cv_lib_nsl_gethostbyname = no; then
42543	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
42544$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
42545if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
42546  $as_echo_n "(cached) " >&6
42547else
42548  ac_check_lib_save_LIBS=$LIBS
42549LIBS="-lbsd  $LIBS"
42550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42551/* end confdefs.h.  */
42552
42553/* Override any GCC internal prototype to avoid an error.
42554   Use char because int might match the return type of a GCC
42555   builtin and then its argument prototype would still apply.  */
42556#ifdef __cplusplus
42557extern "C"
42558#endif
42559char gethostbyname ();
42560int
42561main ()
42562{
42563return gethostbyname ();
42564  ;
42565  return 0;
42566}
42567_ACEOF
42568if ac_fn_cxx_try_link "$LINENO"; then :
42569  ac_cv_lib_bsd_gethostbyname=yes
42570else
42571  ac_cv_lib_bsd_gethostbyname=no
42572fi
42573rm -f core conftest.err conftest.$ac_objext \
42574    conftest$ac_exeext conftest.$ac_ext
42575LIBS=$ac_check_lib_save_LIBS
42576fi
42577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
42578$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
42579if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
42580  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
42581fi
42582
42583      fi
42584    fi
42585
42586    # lieder@skyler.mavd.honeywell.com says without -lsocket,
42587    # socket/setsockopt and other routines are undefined under SCO ODT
42588    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
42589    # on later versions), says Simon Leinen: it contains gethostby*
42590    # variants that don't use the name server (or something).  -lsocket
42591    # must be given before -lnsl if both are needed.  We assume that
42592    # if connect needs -lnsl, so does gethostbyname.
42593    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
42594if test "x$ac_cv_func_connect" = xyes; then :
42595
42596fi
42597
42598    if test $ac_cv_func_connect = no; then
42599      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
42600$as_echo_n "checking for connect in -lsocket... " >&6; }
42601if ${ac_cv_lib_socket_connect+:} false; then :
42602  $as_echo_n "(cached) " >&6
42603else
42604  ac_check_lib_save_LIBS=$LIBS
42605LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
42606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42607/* end confdefs.h.  */
42608
42609/* Override any GCC internal prototype to avoid an error.
42610   Use char because int might match the return type of a GCC
42611   builtin and then its argument prototype would still apply.  */
42612#ifdef __cplusplus
42613extern "C"
42614#endif
42615char connect ();
42616int
42617main ()
42618{
42619return connect ();
42620  ;
42621  return 0;
42622}
42623_ACEOF
42624if ac_fn_cxx_try_link "$LINENO"; then :
42625  ac_cv_lib_socket_connect=yes
42626else
42627  ac_cv_lib_socket_connect=no
42628fi
42629rm -f core conftest.err conftest.$ac_objext \
42630    conftest$ac_exeext conftest.$ac_ext
42631LIBS=$ac_check_lib_save_LIBS
42632fi
42633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
42634$as_echo "$ac_cv_lib_socket_connect" >&6; }
42635if test "x$ac_cv_lib_socket_connect" = xyes; then :
42636  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
42637fi
42638
42639    fi
42640
42641    # Guillermo Gomez says -lposix is necessary on A/UX.
42642    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
42643if test "x$ac_cv_func_remove" = xyes; then :
42644
42645fi
42646
42647    if test $ac_cv_func_remove = no; then
42648      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
42649$as_echo_n "checking for remove in -lposix... " >&6; }
42650if ${ac_cv_lib_posix_remove+:} false; then :
42651  $as_echo_n "(cached) " >&6
42652else
42653  ac_check_lib_save_LIBS=$LIBS
42654LIBS="-lposix  $LIBS"
42655cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42656/* end confdefs.h.  */
42657
42658/* Override any GCC internal prototype to avoid an error.
42659   Use char because int might match the return type of a GCC
42660   builtin and then its argument prototype would still apply.  */
42661#ifdef __cplusplus
42662extern "C"
42663#endif
42664char remove ();
42665int
42666main ()
42667{
42668return remove ();
42669  ;
42670  return 0;
42671}
42672_ACEOF
42673if ac_fn_cxx_try_link "$LINENO"; then :
42674  ac_cv_lib_posix_remove=yes
42675else
42676  ac_cv_lib_posix_remove=no
42677fi
42678rm -f core conftest.err conftest.$ac_objext \
42679    conftest$ac_exeext conftest.$ac_ext
42680LIBS=$ac_check_lib_save_LIBS
42681fi
42682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
42683$as_echo "$ac_cv_lib_posix_remove" >&6; }
42684if test "x$ac_cv_lib_posix_remove" = xyes; then :
42685  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
42686fi
42687
42688    fi
42689
42690    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
42691    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
42692if test "x$ac_cv_func_shmat" = xyes; then :
42693
42694fi
42695
42696    if test $ac_cv_func_shmat = no; then
42697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
42698$as_echo_n "checking for shmat in -lipc... " >&6; }
42699if ${ac_cv_lib_ipc_shmat+:} false; then :
42700  $as_echo_n "(cached) " >&6
42701else
42702  ac_check_lib_save_LIBS=$LIBS
42703LIBS="-lipc  $LIBS"
42704cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42705/* end confdefs.h.  */
42706
42707/* Override any GCC internal prototype to avoid an error.
42708   Use char because int might match the return type of a GCC
42709   builtin and then its argument prototype would still apply.  */
42710#ifdef __cplusplus
42711extern "C"
42712#endif
42713char shmat ();
42714int
42715main ()
42716{
42717return shmat ();
42718  ;
42719  return 0;
42720}
42721_ACEOF
42722if ac_fn_cxx_try_link "$LINENO"; then :
42723  ac_cv_lib_ipc_shmat=yes
42724else
42725  ac_cv_lib_ipc_shmat=no
42726fi
42727rm -f core conftest.err conftest.$ac_objext \
42728    conftest$ac_exeext conftest.$ac_ext
42729LIBS=$ac_check_lib_save_LIBS
42730fi
42731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
42732$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
42733if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
42734  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
42735fi
42736
42737    fi
42738  fi
42739
42740  # Check for libraries that X11R6 Xt/Xaw programs need.
42741  ac_save_LDFLAGS=$LDFLAGS
42742  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
42743  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
42744  # check for ICE first), but we must link in the order -lSM -lICE or
42745  # we get undefined symbols.  So assume we have SM if we have ICE.
42746  # These have to be linked with before -lX11, unlike the other
42747  # libraries we check for below, so use a different variable.
42748  # John Interrante, Karl Berry
42749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
42750$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
42751if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
42752  $as_echo_n "(cached) " >&6
42753else
42754  ac_check_lib_save_LIBS=$LIBS
42755LIBS="-lICE $X_EXTRA_LIBS $LIBS"
42756cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42757/* end confdefs.h.  */
42758
42759/* Override any GCC internal prototype to avoid an error.
42760   Use char because int might match the return type of a GCC
42761   builtin and then its argument prototype would still apply.  */
42762#ifdef __cplusplus
42763extern "C"
42764#endif
42765char IceConnectionNumber ();
42766int
42767main ()
42768{
42769return IceConnectionNumber ();
42770  ;
42771  return 0;
42772}
42773_ACEOF
42774if ac_fn_cxx_try_link "$LINENO"; then :
42775  ac_cv_lib_ICE_IceConnectionNumber=yes
42776else
42777  ac_cv_lib_ICE_IceConnectionNumber=no
42778fi
42779rm -f core conftest.err conftest.$ac_objext \
42780    conftest$ac_exeext conftest.$ac_ext
42781LIBS=$ac_check_lib_save_LIBS
42782fi
42783{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
42784$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
42785if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
42786  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
42787fi
42788
42789  LDFLAGS=$ac_save_LDFLAGS
42790
42791fi
42792
42793
42794  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
42795  # this doesn't make sense so we remove it.
42796  if test "x$COMPILE_TYPE" = xcross; then
42797    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
42798  fi
42799
42800  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
42801
42802  # Print a helpful message on how to acquire the necessary build dependency.
42803  # x11 is the help tag: freetype, cups, pulse, alsa etc
42804  MISSING_DEPENDENCY=x11
42805
42806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42807    cygwin_help $MISSING_DEPENDENCY
42808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42809    msys_help $MISSING_DEPENDENCY
42810  else
42811    PKGHANDLER_COMMAND=
42812
42813    case $PKGHANDLER in
42814      apt-get)
42815        apt_help     $MISSING_DEPENDENCY ;;
42816      yum)
42817        yum_help     $MISSING_DEPENDENCY ;;
42818      port)
42819        port_help    $MISSING_DEPENDENCY ;;
42820      pkgutil)
42821        pkgutil_help $MISSING_DEPENDENCY ;;
42822      pkgadd)
42823        pkgadd_help  $MISSING_DEPENDENCY ;;
42824    esac
42825
42826    if test "x$PKGHANDLER_COMMAND" != x; then
42827      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42828    fi
42829  fi
42830
42831    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
42832  fi
42833
42834  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42835    OPENWIN_HOME="/usr/openwin"
42836  fi
42837
42838
42839
42840  #
42841  # Weird Sol10 something check...TODO change to try compile
42842  #
42843  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
42844    if test "`uname -r`" = "5.10"; then
42845      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
42846        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
42847      fi
42848    fi
42849  fi
42850
42851  ac_ext=c
42852ac_cpp='$CPP $CPPFLAGS'
42853ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42854ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42855ac_compiler_gnu=$ac_cv_c_compiler_gnu
42856
42857  OLD_CFLAGS="$CFLAGS"
42858  CFLAGS="$CFLAGS $X_CFLAGS"
42859
42860  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
42861  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
42862do :
42863  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
42864ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
42865        # include <X11/Xlib.h>
42866        # include <X11/Xutil.h>
42867
42868
42869"
42870if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
42871  cat >>confdefs.h <<_ACEOF
42872#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
42873_ACEOF
42874 X11_A_OK=yes
42875else
42876  X11_A_OK=no; break
42877fi
42878
42879done
42880
42881
42882  CFLAGS="$OLD_CFLAGS"
42883  ac_ext=cpp
42884ac_cpp='$CXXCPP $CPPFLAGS'
42885ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42886ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42887ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42888
42889
42890  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
42891
42892  # Print a helpful message on how to acquire the necessary build dependency.
42893  # x11 is the help tag: freetype, cups, pulse, alsa etc
42894  MISSING_DEPENDENCY=x11
42895
42896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42897    cygwin_help $MISSING_DEPENDENCY
42898  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42899    msys_help $MISSING_DEPENDENCY
42900  else
42901    PKGHANDLER_COMMAND=
42902
42903    case $PKGHANDLER in
42904      apt-get)
42905        apt_help     $MISSING_DEPENDENCY ;;
42906      yum)
42907        yum_help     $MISSING_DEPENDENCY ;;
42908      port)
42909        port_help    $MISSING_DEPENDENCY ;;
42910      pkgutil)
42911        pkgutil_help $MISSING_DEPENDENCY ;;
42912      pkgadd)
42913        pkgadd_help  $MISSING_DEPENDENCY ;;
42914    esac
42915
42916    if test "x$PKGHANDLER_COMMAND" != x; then
42917      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
42918    fi
42919  fi
42920
42921    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
42922  fi
42923
42924
42925
42926
42927
42928
42929  ###############################################################################
42930  #
42931  # The common unix printing system cups is used to print from java.
42932  #
42933
42934# Check whether --with-cups was given.
42935if test "${with_cups+set}" = set; then :
42936  withval=$with_cups;
42937fi
42938
42939
42940# Check whether --with-cups-include was given.
42941if test "${with_cups_include+set}" = set; then :
42942  withval=$with_cups_include;
42943fi
42944
42945
42946  if test "x$CUPS_NOT_NEEDED" = xyes; then
42947    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
42948      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
42949$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
42950    fi
42951    CUPS_CFLAGS=
42952  else
42953    CUPS_FOUND=no
42954
42955    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
42956      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
42957    fi
42958
42959    if test "x${with_cups}" != x; then
42960      CUPS_CFLAGS="-I${with_cups}/include"
42961      CUPS_FOUND=yes
42962    fi
42963    if test "x${with_cups_include}" != x; then
42964      CUPS_CFLAGS="-I${with_cups_include}"
42965      CUPS_FOUND=yes
42966    fi
42967    if test "x$CUPS_FOUND" = xno; then
42968
42969
42970  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
42971    # Source the builddeps file again, to make sure it uses the latest variables!
42972    . $builddepsfile
42973    # Look for a target and build machine specific resource!
42974    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
42975    if test "x$resource" = x; then
42976      # Ok, lets instead look for a target specific resource
42977      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
42978    fi
42979    if test "x$resource" = x; then
42980      # Ok, lets instead look for a build specific resource
42981      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
42982    fi
42983    if test "x$resource" = x; then
42984      # Ok, lets instead look for a generic resource
42985      # (The cups comes from M4 and not the shell, thus no need for eval here.)
42986      resource=${builddep_cups}
42987    fi
42988    if test "x$resource" != x; then
42989      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
42990$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
42991      # If the resource in the builddeps.conf file is an existing directory,
42992      # for example /java/linux/cups
42993      if test -d ${resource}; then
42994        depdir=${resource}
42995      else
42996
42997  # cups is for example mymodule
42998  # $resource is for example libs/general/libmymod_1_2_3.zip
42999  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43000  # $with_builddeps_dir is for example /localhome/builddeps
43001  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43002  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43003  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43004  filename=`basename $resource`
43005  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43006  filebase=${filename%%.*}
43007  extension=${filename#*.}
43008  installdir=$with_builddeps_dir/$filebase
43009  if test ! -f $installdir/$filename.unpacked; then
43010    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43011$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43012    if test ! -d $installdir; then
43013      mkdir -p $installdir
43014    fi
43015    if test ! -d $installdir; then
43016      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43017    fi
43018    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43019    touch $tmpfile
43020    if test ! -f $tmpfile; then
43021      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43022    fi
43023
43024  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43025  # $tmpfile is the local file name for the downloaded file.
43026  VALID_TOOL=no
43027  if test "x$BDEPS_FTP" = xwget; then
43028    VALID_TOOL=yes
43029    wget -O $tmpfile $with_builddeps_server/$resource
43030  fi
43031  if test "x$BDEPS_FTP" = xlftp; then
43032    VALID_TOOL=yes
43033    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43034  fi
43035  if test "x$BDEPS_FTP" = xftp; then
43036    VALID_TOOL=yes
43037    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43038    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43039    FTPUSERPWD=${FTPSERVER%%@*}
43040    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43041      FTPUSER=${userpwd%%:*}
43042      FTPPWD=${userpwd#*@}
43043      FTPSERVER=${FTPSERVER#*@}
43044    else
43045      FTPUSER=ftp
43046      FTPPWD=ftp
43047    fi
43048    # the "pass" command does not work on some
43049    # ftp clients (read ftp.exe) but if it works,
43050    # passive mode is better!
43051    ( \
43052        echo "user $FTPUSER $FTPPWD"        ; \
43053        echo "pass"                         ; \
43054        echo "bin"                          ; \
43055        echo "get $FTPPATH $tmpfile"              ; \
43056    ) | ftp -in $FTPSERVER
43057  fi
43058  if test "x$VALID_TOOL" != xyes; then
43059    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43060  fi
43061
43062    mv $tmpfile $installdir/$filename
43063    if test ! -s $installdir/$filename; then
43064      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43065    fi
43066    case "$extension" in
43067      zip)  echo "Unzipping $installdir/$filename..."
43068        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43069        ;;
43070      tar.gz) echo "Untaring $installdir/$filename..."
43071        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43072        ;;
43073      tgz) echo "Untaring $installdir/$filename..."
43074        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43075        ;;
43076      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43077        ;;
43078    esac
43079  fi
43080  if test -f $installdir/$filename.unpacked; then
43081    depdir=$installdir
43082  fi
43083
43084      fi
43085      # Source the builddeps file again, because in the previous command, the depdir
43086      # was updated to point at the current build dependency install directory.
43087      . $builddepsfile
43088      # Now extract variables from the builddeps.conf files.
43089      theroot=${builddep_cups_ROOT}
43090      thecflags=${builddep_cups_CFLAGS}
43091      thelibs=${builddep_cups_LIBS}
43092      if test "x$depdir" = x; then
43093        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43094      fi
43095      CUPS=$depdir
43096      if test "x$theroot" != x; then
43097        CUPS="$theroot"
43098      fi
43099      if test "x$thecflags" != x; then
43100        CUPS_CFLAGS="$thecflags"
43101      fi
43102      if test "x$thelibs" != x; then
43103        CUPS_LIBS="$thelibs"
43104      fi
43105      CUPS_FOUND=yes
43106
43107    fi
43108
43109  fi
43110
43111    fi
43112    if test "x$CUPS_FOUND" = xno; then
43113      # Are the cups headers installed in the default /usr/include location?
43114      for ac_header in cups/cups.h cups/ppd.h
43115do :
43116  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43117ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43118if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43119  cat >>confdefs.h <<_ACEOF
43120#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43121_ACEOF
43122
43123            CUPS_FOUND=yes
43124            CUPS_CFLAGS=
43125            DEFAULT_CUPS=yes
43126
43127
43128fi
43129
43130done
43131
43132    fi
43133    if test "x$CUPS_FOUND" = xno; then
43134      # Getting nervous now? Lets poke around for standard Solaris third-party
43135      # package installation locations.
43136      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43137$as_echo_n "checking for cups headers... " >&6; }
43138      if test -s /opt/sfw/cups/include/cups/cups.h; then
43139        # An SFW package seems to be installed!
43140        CUPS_FOUND=yes
43141        CUPS_CFLAGS="-I/opt/sfw/cups/include"
43142      elif test -s /opt/csw/include/cups/cups.h; then
43143        # A CSW package seems to be installed!
43144        CUPS_FOUND=yes
43145        CUPS_CFLAGS="-I/opt/csw/include"
43146      fi
43147      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43148$as_echo "$CUPS_FOUND" >&6; }
43149    fi
43150    if test "x$CUPS_FOUND" = xno; then
43151
43152  # Print a helpful message on how to acquire the necessary build dependency.
43153  # cups is the help tag: freetype, cups, pulse, alsa etc
43154  MISSING_DEPENDENCY=cups
43155
43156  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43157    cygwin_help $MISSING_DEPENDENCY
43158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43159    msys_help $MISSING_DEPENDENCY
43160  else
43161    PKGHANDLER_COMMAND=
43162
43163    case $PKGHANDLER in
43164      apt-get)
43165        apt_help     $MISSING_DEPENDENCY ;;
43166      yum)
43167        yum_help     $MISSING_DEPENDENCY ;;
43168      port)
43169        port_help    $MISSING_DEPENDENCY ;;
43170      pkgutil)
43171        pkgutil_help $MISSING_DEPENDENCY ;;
43172      pkgadd)
43173        pkgadd_help  $MISSING_DEPENDENCY ;;
43174    esac
43175
43176    if test "x$PKGHANDLER_COMMAND" != x; then
43177      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43178    fi
43179  fi
43180
43181      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43182    fi
43183  fi
43184
43185
43186
43187
43188
43189
43190  ###############################################################################
43191  #
43192  # The ubiquitous freetype library is used to render fonts.
43193  #
43194
43195# Check whether --with-freetype was given.
43196if test "${with_freetype+set}" = set; then :
43197  withval=$with_freetype;
43198fi
43199
43200
43201# Check whether --with-freetype-include was given.
43202if test "${with_freetype_include+set}" = set; then :
43203  withval=$with_freetype_include;
43204fi
43205
43206
43207# Check whether --with-freetype-lib was given.
43208if test "${with_freetype_lib+set}" = set; then :
43209  withval=$with_freetype_lib;
43210fi
43211
43212  # Check whether --enable-freetype-bundling was given.
43213if test "${enable_freetype_bundling+set}" = set; then :
43214  enableval=$enable_freetype_bundling;
43215fi
43216
43217
43218  FREETYPE_CFLAGS=
43219  FREETYPE_LIBS=
43220  FREETYPE_BUNDLE_LIB_PATH=
43221
43222  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43223    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43224      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43225$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43226    fi
43227    if test "x$enable_freetype_bundling" != x; then
43228      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43229$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43230    fi
43231  else
43232    # freetype is needed to build; go get it!
43233
43234    BUNDLE_FREETYPE="$enable_freetype_bundling"
43235
43236    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43237      # User has specified settings
43238
43239      if test "x$BUNDLE_FREETYPE" = x; then
43240        # If not specified, default is to bundle freetype
43241        BUNDLE_FREETYPE=yes
43242      fi
43243
43244      if test "x$with_freetype" != x; then
43245        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43246        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43247      fi
43248
43249      # Allow --with-freetype-lib and --with-freetype-include to override
43250      if test "x$with_freetype_include" != x; then
43251        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43252      fi
43253      if test "x$with_freetype_lib" != x; then
43254        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43255      fi
43256
43257      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43258        # Okay, we got it. Check that it works.
43259
43260  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43261  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43262  METHOD="--with-freetype"
43263
43264  # First check if the files exists.
43265  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43266    # We found an arbitrary include file. That's a good sign.
43267    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43268$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43269    FOUND_FREETYPE=yes
43270
43271    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43272    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43273      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43274$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43275      FOUND_FREETYPE=no
43276    else
43277      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43278        # On Windows, we will need both .lib and .dll file.
43279        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43280          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43281$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43282          FOUND_FREETYPE=no
43283        fi
43284      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
43285        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43286        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43287      fi
43288    fi
43289  fi
43290
43291  if test "x$FOUND_FREETYPE" = xyes; then
43292
43293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43294
43295  # Input might be given as Windows format, start by converting to
43296  # unix format.
43297  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43298  new_path=`$CYGPATH -u "$path"`
43299
43300  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43301  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43302  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43303  # "foo.exe" is OK but "foo" is an error.
43304  #
43305  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43306  # It is also a way to make sure we got the proper file name for the real test later on.
43307  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43308  if test "x$test_shortpath" = x; then
43309    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43310$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43311    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43312  fi
43313
43314  # Call helper function which possibly converts this using DOS-style short mode.
43315  # If so, the updated path is stored in $new_path.
43316
43317  input_path="$new_path"
43318  # Check if we need to convert this using DOS-style short mode. If the path
43319  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43320  # take no chances and rewrite it.
43321  # Note: m4 eats our [], so we need to use [ and ] instead.
43322  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43323  if test "x$has_forbidden_chars" != x; then
43324    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43325    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43326    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43327    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43328      # Going to short mode and back again did indeed matter. Since short mode is
43329      # case insensitive, let's make it lowercase to improve readability.
43330      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43331      # Now convert it back to Unix-stile (cygpath)
43332      input_path=`$CYGPATH -u "$shortmode_path"`
43333      new_path="$input_path"
43334    fi
43335  fi
43336
43337  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43338  if test "x$test_cygdrive_prefix" = x; then
43339    # As a simple fix, exclude /usr/bin since it's not a real path.
43340    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43341      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43342      # a path prefixed by /cygdrive for fixpath to work.
43343      new_path="$CYGWIN_ROOT_PATH$input_path"
43344    fi
43345  fi
43346
43347
43348  if test "x$path" != "x$new_path"; then
43349    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43350    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43351$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43352  fi
43353
43354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43355
43356  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43357  has_colon=`$ECHO $path | $GREP ^.:`
43358  new_path="$path"
43359  if test "x$has_colon" = x; then
43360    # Not in mixed or Windows style, start by that.
43361    new_path=`cmd //c echo $path`
43362  fi
43363
43364
43365  input_path="$new_path"
43366  # Check if we need to convert this using DOS-style short mode. If the path
43367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43368  # take no chances and rewrite it.
43369  # Note: m4 eats our [], so we need to use [ and ] instead.
43370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43371  if test "x$has_forbidden_chars" != x; then
43372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43373    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43374  fi
43375
43376
43377  windows_path="$new_path"
43378  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43379    unix_path=`$CYGPATH -u "$windows_path"`
43380    new_path="$unix_path"
43381  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43382    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43383    new_path="$unix_path"
43384  fi
43385
43386  if test "x$path" != "x$new_path"; then
43387    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43389$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43390  fi
43391
43392  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43393  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43394
43395  else
43396    # We're on a posix platform. Hooray! :)
43397    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43398    has_space=`$ECHO "$path" | $GREP " "`
43399    if test "x$has_space" != x; then
43400      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43401$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43402      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43403    fi
43404
43405    # Use eval to expand a potential ~
43406    eval path="$path"
43407    if test ! -f "$path" && test ! -d "$path"; then
43408      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43409    fi
43410
43411    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43412  fi
43413
43414
43415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43416
43417  # Input might be given as Windows format, start by converting to
43418  # unix format.
43419  path="$POTENTIAL_FREETYPE_LIB_PATH"
43420  new_path=`$CYGPATH -u "$path"`
43421
43422  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43423  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43424  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43425  # "foo.exe" is OK but "foo" is an error.
43426  #
43427  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43428  # It is also a way to make sure we got the proper file name for the real test later on.
43429  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43430  if test "x$test_shortpath" = x; then
43431    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43432$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43433    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
43434  fi
43435
43436  # Call helper function which possibly converts this using DOS-style short mode.
43437  # If so, the updated path is stored in $new_path.
43438
43439  input_path="$new_path"
43440  # Check if we need to convert this using DOS-style short mode. If the path
43441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43442  # take no chances and rewrite it.
43443  # Note: m4 eats our [], so we need to use [ and ] instead.
43444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43445  if test "x$has_forbidden_chars" != x; then
43446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43447    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43448    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43449    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43450      # Going to short mode and back again did indeed matter. Since short mode is
43451      # case insensitive, let's make it lowercase to improve readability.
43452      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43453      # Now convert it back to Unix-stile (cygpath)
43454      input_path=`$CYGPATH -u "$shortmode_path"`
43455      new_path="$input_path"
43456    fi
43457  fi
43458
43459  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43460  if test "x$test_cygdrive_prefix" = x; then
43461    # As a simple fix, exclude /usr/bin since it's not a real path.
43462    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43463      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43464      # a path prefixed by /cygdrive for fixpath to work.
43465      new_path="$CYGWIN_ROOT_PATH$input_path"
43466    fi
43467  fi
43468
43469
43470  if test "x$path" != "x$new_path"; then
43471    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43473$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43474  fi
43475
43476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43477
43478  path="$POTENTIAL_FREETYPE_LIB_PATH"
43479  has_colon=`$ECHO $path | $GREP ^.:`
43480  new_path="$path"
43481  if test "x$has_colon" = x; then
43482    # Not in mixed or Windows style, start by that.
43483    new_path=`cmd //c echo $path`
43484  fi
43485
43486
43487  input_path="$new_path"
43488  # Check if we need to convert this using DOS-style short mode. If the path
43489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43490  # take no chances and rewrite it.
43491  # Note: m4 eats our [], so we need to use [ and ] instead.
43492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43493  if test "x$has_forbidden_chars" != x; then
43494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43495    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43496  fi
43497
43498
43499  windows_path="$new_path"
43500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43501    unix_path=`$CYGPATH -u "$windows_path"`
43502    new_path="$unix_path"
43503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43505    new_path="$unix_path"
43506  fi
43507
43508  if test "x$path" != "x$new_path"; then
43509    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
43510    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
43511$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
43512  fi
43513
43514  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43515  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43516
43517  else
43518    # We're on a posix platform. Hooray! :)
43519    path="$POTENTIAL_FREETYPE_LIB_PATH"
43520    has_space=`$ECHO "$path" | $GREP " "`
43521    if test "x$has_space" != x; then
43522      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
43523$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
43524      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43525    fi
43526
43527    # Use eval to expand a potential ~
43528    eval path="$path"
43529    if test ! -f "$path" && test ! -d "$path"; then
43530      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43531    fi
43532
43533    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
43534  fi
43535
43536
43537    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
43539$as_echo_n "checking for freetype includes... " >&6; }
43540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
43541$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
43542    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43543    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
43544$as_echo_n "checking for freetype libraries... " >&6; }
43545    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
43546$as_echo "$FREETYPE_LIB_PATH" >&6; }
43547  fi
43548
43549        if test "x$FOUND_FREETYPE" != xyes; then
43550          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
43551        fi
43552      else
43553        # User specified only one of lib or include. This is an error.
43554        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
43555          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
43556$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
43557          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43558        else
43559          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
43560$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
43561          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
43562        fi
43563      fi
43564    else
43565      # User did not specify settings, but we need freetype. Try to locate it.
43566
43567      if test "x$BUNDLE_FREETYPE" = x; then
43568        # If not specified, default is to bundle freetype only on windows
43569        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43570          BUNDLE_FREETYPE=yes
43571        else
43572          BUNDLE_FREETYPE=no
43573        fi
43574      fi
43575
43576      if test "x$FOUND_FREETYPE" != xyes; then
43577        # Check builddeps
43578
43579
43580  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43581    # Source the builddeps file again, to make sure it uses the latest variables!
43582    . $builddepsfile
43583    # Look for a target and build machine specific resource!
43584    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43585    if test "x$resource" = x; then
43586      # Ok, lets instead look for a target specific resource
43587      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
43588    fi
43589    if test "x$resource" = x; then
43590      # Ok, lets instead look for a build specific resource
43591      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
43592    fi
43593    if test "x$resource" = x; then
43594      # Ok, lets instead look for a generic resource
43595      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
43596      resource=${builddep_freetype2}
43597    fi
43598    if test "x$resource" != x; then
43599      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
43600$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
43601      # If the resource in the builddeps.conf file is an existing directory,
43602      # for example /java/linux/cups
43603      if test -d ${resource}; then
43604        depdir=${resource}
43605      else
43606
43607  # freetype2 is for example mymodule
43608  # $resource is for example libs/general/libmymod_1_2_3.zip
43609  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43610  # $with_builddeps_dir is for example /localhome/builddeps
43611  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43612  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43613  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43614  filename=`basename $resource`
43615  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43616  filebase=${filename%%.*}
43617  extension=${filename#*.}
43618  installdir=$with_builddeps_dir/$filebase
43619  if test ! -f $installdir/$filename.unpacked; then
43620    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
43621$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43622    if test ! -d $installdir; then
43623      mkdir -p $installdir
43624    fi
43625    if test ! -d $installdir; then
43626      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43627    fi
43628    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
43629    touch $tmpfile
43630    if test ! -f $tmpfile; then
43631      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43632    fi
43633
43634  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43635  # $tmpfile is the local file name for the downloaded file.
43636  VALID_TOOL=no
43637  if test "x$BDEPS_FTP" = xwget; then
43638    VALID_TOOL=yes
43639    wget -O $tmpfile $with_builddeps_server/$resource
43640  fi
43641  if test "x$BDEPS_FTP" = xlftp; then
43642    VALID_TOOL=yes
43643    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43644  fi
43645  if test "x$BDEPS_FTP" = xftp; then
43646    VALID_TOOL=yes
43647    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43648    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43649    FTPUSERPWD=${FTPSERVER%%@*}
43650    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43651      FTPUSER=${userpwd%%:*}
43652      FTPPWD=${userpwd#*@}
43653      FTPSERVER=${FTPSERVER#*@}
43654    else
43655      FTPUSER=ftp
43656      FTPPWD=ftp
43657    fi
43658    # the "pass" command does not work on some
43659    # ftp clients (read ftp.exe) but if it works,
43660    # passive mode is better!
43661    ( \
43662        echo "user $FTPUSER $FTPPWD"        ; \
43663        echo "pass"                         ; \
43664        echo "bin"                          ; \
43665        echo "get $FTPPATH $tmpfile"              ; \
43666    ) | ftp -in $FTPSERVER
43667  fi
43668  if test "x$VALID_TOOL" != xyes; then
43669    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43670  fi
43671
43672    mv $tmpfile $installdir/$filename
43673    if test ! -s $installdir/$filename; then
43674      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43675    fi
43676    case "$extension" in
43677      zip)  echo "Unzipping $installdir/$filename..."
43678        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43679        ;;
43680      tar.gz) echo "Untaring $installdir/$filename..."
43681        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43682        ;;
43683      tgz) echo "Untaring $installdir/$filename..."
43684        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43685        ;;
43686      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43687        ;;
43688    esac
43689  fi
43690  if test -f $installdir/$filename.unpacked; then
43691    depdir=$installdir
43692  fi
43693
43694      fi
43695      # Source the builddeps file again, because in the previous command, the depdir
43696      # was updated to point at the current build dependency install directory.
43697      . $builddepsfile
43698      # Now extract variables from the builddeps.conf files.
43699      theroot=${builddep_freetype2_ROOT}
43700      thecflags=${builddep_freetype2_CFLAGS}
43701      thelibs=${builddep_freetype2_LIBS}
43702      if test "x$depdir" = x; then
43703        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
43704      fi
43705      FREETYPE=$depdir
43706      if test "x$theroot" != x; then
43707        FREETYPE="$theroot"
43708      fi
43709      if test "x$thecflags" != x; then
43710        FREETYPE_CFLAGS="$thecflags"
43711      fi
43712      if test "x$thelibs" != x; then
43713        FREETYPE_LIBS="$thelibs"
43714      fi
43715      FOUND_FREETYPE=yes
43716      else FOUND_FREETYPE=no
43717
43718    fi
43719    else FOUND_FREETYPE=no
43720
43721  fi
43722
43723        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43724        if test "x$FOUND_FREETYPE" = xyes; then
43725          if test "x$BUNDLE_FREETYPE" = xyes; then
43726            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
43727$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
43728            FOUND_FREETYPE=no
43729          else
43730            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43731$as_echo_n "checking for freetype... " >&6; }
43732            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
43733$as_echo "yes (using builddeps)" >&6; }
43734          fi
43735        fi
43736      fi
43737
43738      if test "x$FOUND_FREETYPE" != xyes; then
43739        # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
43740        if test "x$PKG_CONFIG" != x; then
43741
43742pkg_failed=no
43743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
43744$as_echo_n "checking for FREETYPE... " >&6; }
43745
43746if test -n "$FREETYPE_CFLAGS"; then
43747    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
43748 elif test -n "$PKG_CONFIG"; then
43749    if test -n "$PKG_CONFIG" && \
43750    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43751  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43752  ac_status=$?
43753  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43754  test $ac_status = 0; }; then
43755  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
43756else
43757  pkg_failed=yes
43758fi
43759 else
43760    pkg_failed=untried
43761fi
43762if test -n "$FREETYPE_LIBS"; then
43763    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
43764 elif test -n "$PKG_CONFIG"; then
43765    if test -n "$PKG_CONFIG" && \
43766    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
43767  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
43768  ac_status=$?
43769  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
43770  test $ac_status = 0; }; then
43771  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
43772else
43773  pkg_failed=yes
43774fi
43775 else
43776    pkg_failed=untried
43777fi
43778
43779
43780
43781if test $pkg_failed = yes; then
43782
43783if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
43784        _pkg_short_errors_supported=yes
43785else
43786        _pkg_short_errors_supported=no
43787fi
43788        if test $_pkg_short_errors_supported = yes; then
43789	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
43790        else
43791	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
43792        fi
43793	# Put the nasty error message in config.log where it belongs
43794	echo "$FREETYPE_PKG_ERRORS" >&5
43795
43796	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43797$as_echo "no" >&6; }
43798                FOUND_FREETYPE=no
43799elif test $pkg_failed = untried; then
43800	FOUND_FREETYPE=no
43801else
43802	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
43803	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
43804        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43805$as_echo "yes" >&6; }
43806	FOUND_FREETYPE=yes
43807fi
43808          if test "x$FOUND_FREETYPE" = xyes; then
43809            # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
43810            FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
43811            # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
43812            if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
43813              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
43814            fi
43815            # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
43816            if test "x$BUNDLE_FREETYPE" = xyes; then
43817              { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
43818$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
43819              FOUND_FREETYPE=no
43820            else
43821              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
43822$as_echo_n "checking for freetype... " >&6; }
43823              { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
43824$as_echo "yes (using pkg-config)" >&6; }
43825            fi
43826          fi
43827        fi
43828      fi
43829
43830      if test "x$FOUND_FREETYPE" != xyes; then
43831        # Check in well-known locations
43832        if test "x$OPENJDK_TARGET_OS" = xwindows; then
43833          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
43834
43835  windows_path="$FREETYPE_BASE_DIR"
43836  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43837    unix_path=`$CYGPATH -u "$windows_path"`
43838    FREETYPE_BASE_DIR="$unix_path"
43839  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43840    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43841    FREETYPE_BASE_DIR="$unix_path"
43842  fi
43843
43844
43845  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
43846  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
43847  METHOD="well-known location"
43848
43849  # First check if the files exists.
43850  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43851    # We found an arbitrary include file. That's a good sign.
43852    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43853$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43854    FOUND_FREETYPE=yes
43855
43856    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43857    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43858      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43859$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43860      FOUND_FREETYPE=no
43861    else
43862      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43863        # On Windows, we will need both .lib and .dll file.
43864        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43865          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43866$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43867          FOUND_FREETYPE=no
43868        fi
43869      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
43870        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
43871        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
43872      fi
43873    fi
43874  fi
43875
43876  if test "x$FOUND_FREETYPE" = xyes; then
43877
43878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43879
43880  # Input might be given as Windows format, start by converting to
43881  # unix format.
43882  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43883  new_path=`$CYGPATH -u "$path"`
43884
43885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43888  # "foo.exe" is OK but "foo" is an error.
43889  #
43890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43891  # It is also a way to make sure we got the proper file name for the real test later on.
43892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43893  if test "x$test_shortpath" = x; then
43894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43895$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43896    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43897  fi
43898
43899  # Call helper function which possibly converts this using DOS-style short mode.
43900  # If so, the updated path is stored in $new_path.
43901
43902  input_path="$new_path"
43903  # Check if we need to convert this using DOS-style short mode. If the path
43904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43905  # take no chances and rewrite it.
43906  # Note: m4 eats our [], so we need to use [ and ] instead.
43907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43908  if test "x$has_forbidden_chars" != x; then
43909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43913      # Going to short mode and back again did indeed matter. Since short mode is
43914      # case insensitive, let's make it lowercase to improve readability.
43915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43916      # Now convert it back to Unix-stile (cygpath)
43917      input_path=`$CYGPATH -u "$shortmode_path"`
43918      new_path="$input_path"
43919    fi
43920  fi
43921
43922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43923  if test "x$test_cygdrive_prefix" = x; then
43924    # As a simple fix, exclude /usr/bin since it's not a real path.
43925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43927      # a path prefixed by /cygdrive for fixpath to work.
43928      new_path="$CYGWIN_ROOT_PATH$input_path"
43929    fi
43930  fi
43931
43932
43933  if test "x$path" != "x$new_path"; then
43934    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43936$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43937  fi
43938
43939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43940
43941  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43942  has_colon=`$ECHO $path | $GREP ^.:`
43943  new_path="$path"
43944  if test "x$has_colon" = x; then
43945    # Not in mixed or Windows style, start by that.
43946    new_path=`cmd //c echo $path`
43947  fi
43948
43949
43950  input_path="$new_path"
43951  # Check if we need to convert this using DOS-style short mode. If the path
43952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43953  # take no chances and rewrite it.
43954  # Note: m4 eats our [], so we need to use [ and ] instead.
43955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43956  if test "x$has_forbidden_chars" != x; then
43957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43959  fi
43960
43961
43962  windows_path="$new_path"
43963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43964    unix_path=`$CYGPATH -u "$windows_path"`
43965    new_path="$unix_path"
43966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43968    new_path="$unix_path"
43969  fi
43970
43971  if test "x$path" != "x$new_path"; then
43972    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43974$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43975  fi
43976
43977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43979
43980  else
43981    # We're on a posix platform. Hooray! :)
43982    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43983    has_space=`$ECHO "$path" | $GREP " "`
43984    if test "x$has_space" != x; then
43985      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43986$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43987      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43988    fi
43989
43990    # Use eval to expand a potential ~
43991    eval path="$path"
43992    if test ! -f "$path" && test ! -d "$path"; then
43993      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
43994    fi
43995
43996    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
43997  fi
43998
43999
44000  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44001
44002  # Input might be given as Windows format, start by converting to
44003  # unix format.
44004  path="$POTENTIAL_FREETYPE_LIB_PATH"
44005  new_path=`$CYGPATH -u "$path"`
44006
44007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44010  # "foo.exe" is OK but "foo" is an error.
44011  #
44012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44013  # It is also a way to make sure we got the proper file name for the real test later on.
44014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44015  if test "x$test_shortpath" = x; then
44016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44017$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44018    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44019  fi
44020
44021  # Call helper function which possibly converts this using DOS-style short mode.
44022  # If so, the updated path is stored in $new_path.
44023
44024  input_path="$new_path"
44025  # Check if we need to convert this using DOS-style short mode. If the path
44026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44027  # take no chances and rewrite it.
44028  # Note: m4 eats our [], so we need to use [ and ] instead.
44029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44030  if test "x$has_forbidden_chars" != x; then
44031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44035      # Going to short mode and back again did indeed matter. Since short mode is
44036      # case insensitive, let's make it lowercase to improve readability.
44037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44038      # Now convert it back to Unix-stile (cygpath)
44039      input_path=`$CYGPATH -u "$shortmode_path"`
44040      new_path="$input_path"
44041    fi
44042  fi
44043
44044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44045  if test "x$test_cygdrive_prefix" = x; then
44046    # As a simple fix, exclude /usr/bin since it's not a real path.
44047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44049      # a path prefixed by /cygdrive for fixpath to work.
44050      new_path="$CYGWIN_ROOT_PATH$input_path"
44051    fi
44052  fi
44053
44054
44055  if test "x$path" != "x$new_path"; then
44056    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44058$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44059  fi
44060
44061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44062
44063  path="$POTENTIAL_FREETYPE_LIB_PATH"
44064  has_colon=`$ECHO $path | $GREP ^.:`
44065  new_path="$path"
44066  if test "x$has_colon" = x; then
44067    # Not in mixed or Windows style, start by that.
44068    new_path=`cmd //c echo $path`
44069  fi
44070
44071
44072  input_path="$new_path"
44073  # Check if we need to convert this using DOS-style short mode. If the path
44074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44075  # take no chances and rewrite it.
44076  # Note: m4 eats our [], so we need to use [ and ] instead.
44077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44078  if test "x$has_forbidden_chars" != x; then
44079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44081  fi
44082
44083
44084  windows_path="$new_path"
44085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44086    unix_path=`$CYGPATH -u "$windows_path"`
44087    new_path="$unix_path"
44088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44090    new_path="$unix_path"
44091  fi
44092
44093  if test "x$path" != "x$new_path"; then
44094    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44096$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44097  fi
44098
44099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44101
44102  else
44103    # We're on a posix platform. Hooray! :)
44104    path="$POTENTIAL_FREETYPE_LIB_PATH"
44105    has_space=`$ECHO "$path" | $GREP " "`
44106    if test "x$has_space" != x; then
44107      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44108$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44109      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44110    fi
44111
44112    # Use eval to expand a potential ~
44113    eval path="$path"
44114    if test ! -f "$path" && test ! -d "$path"; then
44115      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44116    fi
44117
44118    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44119  fi
44120
44121
44122    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44123    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44124$as_echo_n "checking for freetype includes... " >&6; }
44125    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44126$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44127    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44129$as_echo_n "checking for freetype libraries... " >&6; }
44130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44131$as_echo "$FREETYPE_LIB_PATH" >&6; }
44132  fi
44133
44134          if test "x$FOUND_FREETYPE" != xyes; then
44135            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44136
44137  windows_path="$FREETYPE_BASE_DIR"
44138  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44139    unix_path=`$CYGPATH -u "$windows_path"`
44140    FREETYPE_BASE_DIR="$unix_path"
44141  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44142    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44143    FREETYPE_BASE_DIR="$unix_path"
44144  fi
44145
44146
44147  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44148  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44149  METHOD="well-known location"
44150
44151  # First check if the files exists.
44152  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44153    # We found an arbitrary include file. That's a good sign.
44154    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44155$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44156    FOUND_FREETYPE=yes
44157
44158    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44159    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44160      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44161$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44162      FOUND_FREETYPE=no
44163    else
44164      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44165        # On Windows, we will need both .lib and .dll file.
44166        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44167          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44168$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44169          FOUND_FREETYPE=no
44170        fi
44171      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
44172        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44173        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44174      fi
44175    fi
44176  fi
44177
44178  if test "x$FOUND_FREETYPE" = xyes; then
44179
44180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44181
44182  # Input might be given as Windows format, start by converting to
44183  # unix format.
44184  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44185  new_path=`$CYGPATH -u "$path"`
44186
44187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44190  # "foo.exe" is OK but "foo" is an error.
44191  #
44192  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44193  # It is also a way to make sure we got the proper file name for the real test later on.
44194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44195  if test "x$test_shortpath" = x; then
44196    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44197$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44198    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44199  fi
44200
44201  # Call helper function which possibly converts this using DOS-style short mode.
44202  # If so, the updated path is stored in $new_path.
44203
44204  input_path="$new_path"
44205  # Check if we need to convert this using DOS-style short mode. If the path
44206  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44207  # take no chances and rewrite it.
44208  # Note: m4 eats our [], so we need to use [ and ] instead.
44209  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44210  if test "x$has_forbidden_chars" != x; then
44211    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44212    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44213    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44214    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44215      # Going to short mode and back again did indeed matter. Since short mode is
44216      # case insensitive, let's make it lowercase to improve readability.
44217      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44218      # Now convert it back to Unix-stile (cygpath)
44219      input_path=`$CYGPATH -u "$shortmode_path"`
44220      new_path="$input_path"
44221    fi
44222  fi
44223
44224  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44225  if test "x$test_cygdrive_prefix" = x; then
44226    # As a simple fix, exclude /usr/bin since it's not a real path.
44227    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44228      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44229      # a path prefixed by /cygdrive for fixpath to work.
44230      new_path="$CYGWIN_ROOT_PATH$input_path"
44231    fi
44232  fi
44233
44234
44235  if test "x$path" != "x$new_path"; then
44236    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44237    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44238$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44239  fi
44240
44241  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44242
44243  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44244  has_colon=`$ECHO $path | $GREP ^.:`
44245  new_path="$path"
44246  if test "x$has_colon" = x; then
44247    # Not in mixed or Windows style, start by that.
44248    new_path=`cmd //c echo $path`
44249  fi
44250
44251
44252  input_path="$new_path"
44253  # Check if we need to convert this using DOS-style short mode. If the path
44254  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44255  # take no chances and rewrite it.
44256  # Note: m4 eats our [], so we need to use [ and ] instead.
44257  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44258  if test "x$has_forbidden_chars" != x; then
44259    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44260    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44261  fi
44262
44263
44264  windows_path="$new_path"
44265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44266    unix_path=`$CYGPATH -u "$windows_path"`
44267    new_path="$unix_path"
44268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44270    new_path="$unix_path"
44271  fi
44272
44273  if test "x$path" != "x$new_path"; then
44274    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44277  fi
44278
44279  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44280  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44281
44282  else
44283    # We're on a posix platform. Hooray! :)
44284    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44285    has_space=`$ECHO "$path" | $GREP " "`
44286    if test "x$has_space" != x; then
44287      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44289      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44290    fi
44291
44292    # Use eval to expand a potential ~
44293    eval path="$path"
44294    if test ! -f "$path" && test ! -d "$path"; then
44295      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44296    fi
44297
44298    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44299  fi
44300
44301
44302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44303
44304  # Input might be given as Windows format, start by converting to
44305  # unix format.
44306  path="$POTENTIAL_FREETYPE_LIB_PATH"
44307  new_path=`$CYGPATH -u "$path"`
44308
44309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44312  # "foo.exe" is OK but "foo" is an error.
44313  #
44314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44315  # It is also a way to make sure we got the proper file name for the real test later on.
44316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44317  if test "x$test_shortpath" = x; then
44318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44321  fi
44322
44323  # Call helper function which possibly converts this using DOS-style short mode.
44324  # If so, the updated path is stored in $new_path.
44325
44326  input_path="$new_path"
44327  # Check if we need to convert this using DOS-style short mode. If the path
44328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44329  # take no chances and rewrite it.
44330  # Note: m4 eats our [], so we need to use [ and ] instead.
44331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44332  if test "x$has_forbidden_chars" != x; then
44333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44337      # Going to short mode and back again did indeed matter. Since short mode is
44338      # case insensitive, let's make it lowercase to improve readability.
44339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44340      # Now convert it back to Unix-stile (cygpath)
44341      input_path=`$CYGPATH -u "$shortmode_path"`
44342      new_path="$input_path"
44343    fi
44344  fi
44345
44346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44347  if test "x$test_cygdrive_prefix" = x; then
44348    # As a simple fix, exclude /usr/bin since it's not a real path.
44349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44351      # a path prefixed by /cygdrive for fixpath to work.
44352      new_path="$CYGWIN_ROOT_PATH$input_path"
44353    fi
44354  fi
44355
44356
44357  if test "x$path" != "x$new_path"; then
44358    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44361  fi
44362
44363  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44364
44365  path="$POTENTIAL_FREETYPE_LIB_PATH"
44366  has_colon=`$ECHO $path | $GREP ^.:`
44367  new_path="$path"
44368  if test "x$has_colon" = x; then
44369    # Not in mixed or Windows style, start by that.
44370    new_path=`cmd //c echo $path`
44371  fi
44372
44373
44374  input_path="$new_path"
44375  # Check if we need to convert this using DOS-style short mode. If the path
44376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44377  # take no chances and rewrite it.
44378  # Note: m4 eats our [], so we need to use [ and ] instead.
44379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44380  if test "x$has_forbidden_chars" != x; then
44381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44383  fi
44384
44385
44386  windows_path="$new_path"
44387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44388    unix_path=`$CYGPATH -u "$windows_path"`
44389    new_path="$unix_path"
44390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44392    new_path="$unix_path"
44393  fi
44394
44395  if test "x$path" != "x$new_path"; then
44396    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44399  fi
44400
44401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44403
44404  else
44405    # We're on a posix platform. Hooray! :)
44406    path="$POTENTIAL_FREETYPE_LIB_PATH"
44407    has_space=`$ECHO "$path" | $GREP " "`
44408    if test "x$has_space" != x; then
44409      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44411      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44412    fi
44413
44414    # Use eval to expand a potential ~
44415    eval path="$path"
44416    if test ! -f "$path" && test ! -d "$path"; then
44417      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44418    fi
44419
44420    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44421  fi
44422
44423
44424    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44425    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44426$as_echo_n "checking for freetype includes... " >&6; }
44427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44428$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44429    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44430    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44431$as_echo_n "checking for freetype libraries... " >&6; }
44432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44433$as_echo "$FREETYPE_LIB_PATH" >&6; }
44434  fi
44435
44436          fi
44437        else
44438          if test "x$SYS_ROOT" = "x/"; then
44439            FREETYPE_ROOT=
44440          else
44441            FREETYPE_ROOT="$SYS_ROOT"
44442          fi
44443          FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
44444
44445  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44446  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44447  METHOD="well-known location"
44448
44449  # First check if the files exists.
44450  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44451    # We found an arbitrary include file. That's a good sign.
44452    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44453$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44454    FOUND_FREETYPE=yes
44455
44456    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44457    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44458      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44459$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44460      FOUND_FREETYPE=no
44461    else
44462      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44463        # On Windows, we will need both .lib and .dll file.
44464        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44465          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44466$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44467          FOUND_FREETYPE=no
44468        fi
44469      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
44470        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44471        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44472      fi
44473    fi
44474  fi
44475
44476  if test "x$FOUND_FREETYPE" = xyes; then
44477
44478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44479
44480  # Input might be given as Windows format, start by converting to
44481  # unix format.
44482  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44483  new_path=`$CYGPATH -u "$path"`
44484
44485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44488  # "foo.exe" is OK but "foo" is an error.
44489  #
44490  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44491  # It is also a way to make sure we got the proper file name for the real test later on.
44492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44493  if test "x$test_shortpath" = x; then
44494    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44495$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44496    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44497  fi
44498
44499  # Call helper function which possibly converts this using DOS-style short mode.
44500  # If so, the updated path is stored in $new_path.
44501
44502  input_path="$new_path"
44503  # Check if we need to convert this using DOS-style short mode. If the path
44504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44505  # take no chances and rewrite it.
44506  # Note: m4 eats our [], so we need to use [ and ] instead.
44507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44508  if test "x$has_forbidden_chars" != x; then
44509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44510    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44511    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44512    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44513      # Going to short mode and back again did indeed matter. Since short mode is
44514      # case insensitive, let's make it lowercase to improve readability.
44515      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44516      # Now convert it back to Unix-stile (cygpath)
44517      input_path=`$CYGPATH -u "$shortmode_path"`
44518      new_path="$input_path"
44519    fi
44520  fi
44521
44522  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44523  if test "x$test_cygdrive_prefix" = x; then
44524    # As a simple fix, exclude /usr/bin since it's not a real path.
44525    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44526      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44527      # a path prefixed by /cygdrive for fixpath to work.
44528      new_path="$CYGWIN_ROOT_PATH$input_path"
44529    fi
44530  fi
44531
44532
44533  if test "x$path" != "x$new_path"; then
44534    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44535    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44536$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44537  fi
44538
44539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44540
44541  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44542  has_colon=`$ECHO $path | $GREP ^.:`
44543  new_path="$path"
44544  if test "x$has_colon" = x; then
44545    # Not in mixed or Windows style, start by that.
44546    new_path=`cmd //c echo $path`
44547  fi
44548
44549
44550  input_path="$new_path"
44551  # Check if we need to convert this using DOS-style short mode. If the path
44552  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44553  # take no chances and rewrite it.
44554  # Note: m4 eats our [], so we need to use [ and ] instead.
44555  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44556  if test "x$has_forbidden_chars" != x; then
44557    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44558    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44559  fi
44560
44561
44562  windows_path="$new_path"
44563  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44564    unix_path=`$CYGPATH -u "$windows_path"`
44565    new_path="$unix_path"
44566  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44567    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44568    new_path="$unix_path"
44569  fi
44570
44571  if test "x$path" != "x$new_path"; then
44572    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44573    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44574$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44575  fi
44576
44577  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44578  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44579
44580  else
44581    # We're on a posix platform. Hooray! :)
44582    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44583    has_space=`$ECHO "$path" | $GREP " "`
44584    if test "x$has_space" != x; then
44585      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44586$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44587      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44588    fi
44589
44590    # Use eval to expand a potential ~
44591    eval path="$path"
44592    if test ! -f "$path" && test ! -d "$path"; then
44593      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44594    fi
44595
44596    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44597  fi
44598
44599
44600  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44601
44602  # Input might be given as Windows format, start by converting to
44603  # unix format.
44604  path="$POTENTIAL_FREETYPE_LIB_PATH"
44605  new_path=`$CYGPATH -u "$path"`
44606
44607  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44608  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44609  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44610  # "foo.exe" is OK but "foo" is an error.
44611  #
44612  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44613  # It is also a way to make sure we got the proper file name for the real test later on.
44614  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44615  if test "x$test_shortpath" = x; then
44616    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44618    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44619  fi
44620
44621  # Call helper function which possibly converts this using DOS-style short mode.
44622  # If so, the updated path is stored in $new_path.
44623
44624  input_path="$new_path"
44625  # Check if we need to convert this using DOS-style short mode. If the path
44626  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44627  # take no chances and rewrite it.
44628  # Note: m4 eats our [], so we need to use [ and ] instead.
44629  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44630  if test "x$has_forbidden_chars" != x; then
44631    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44632    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44633    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44634    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44635      # Going to short mode and back again did indeed matter. Since short mode is
44636      # case insensitive, let's make it lowercase to improve readability.
44637      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44638      # Now convert it back to Unix-stile (cygpath)
44639      input_path=`$CYGPATH -u "$shortmode_path"`
44640      new_path="$input_path"
44641    fi
44642  fi
44643
44644  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44645  if test "x$test_cygdrive_prefix" = x; then
44646    # As a simple fix, exclude /usr/bin since it's not a real path.
44647    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44648      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44649      # a path prefixed by /cygdrive for fixpath to work.
44650      new_path="$CYGWIN_ROOT_PATH$input_path"
44651    fi
44652  fi
44653
44654
44655  if test "x$path" != "x$new_path"; then
44656    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44659  fi
44660
44661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44662
44663  path="$POTENTIAL_FREETYPE_LIB_PATH"
44664  has_colon=`$ECHO $path | $GREP ^.:`
44665  new_path="$path"
44666  if test "x$has_colon" = x; then
44667    # Not in mixed or Windows style, start by that.
44668    new_path=`cmd //c echo $path`
44669  fi
44670
44671
44672  input_path="$new_path"
44673  # Check if we need to convert this using DOS-style short mode. If the path
44674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44675  # take no chances and rewrite it.
44676  # Note: m4 eats our [], so we need to use [ and ] instead.
44677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44678  if test "x$has_forbidden_chars" != x; then
44679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44680    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44681  fi
44682
44683
44684  windows_path="$new_path"
44685  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44686    unix_path=`$CYGPATH -u "$windows_path"`
44687    new_path="$unix_path"
44688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44689    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44690    new_path="$unix_path"
44691  fi
44692
44693  if test "x$path" != "x$new_path"; then
44694    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44696$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44697  fi
44698
44699  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44700  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44701
44702  else
44703    # We're on a posix platform. Hooray! :)
44704    path="$POTENTIAL_FREETYPE_LIB_PATH"
44705    has_space=`$ECHO "$path" | $GREP " "`
44706    if test "x$has_space" != x; then
44707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44709      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44710    fi
44711
44712    # Use eval to expand a potential ~
44713    eval path="$path"
44714    if test ! -f "$path" && test ! -d "$path"; then
44715      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44716    fi
44717
44718    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44719  fi
44720
44721
44722    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44723    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44724$as_echo_n "checking for freetype includes... " >&6; }
44725    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44726$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44727    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44729$as_echo_n "checking for freetype libraries... " >&6; }
44730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44731$as_echo "$FREETYPE_LIB_PATH" >&6; }
44732  fi
44733
44734
44735          if test "x$FOUND_FREETYPE" != xyes; then
44736            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr/X11"
44737
44738  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44739  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44740  METHOD="well-known location"
44741
44742  # First check if the files exists.
44743  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44744    # We found an arbitrary include file. That's a good sign.
44745    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44746$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44747    FOUND_FREETYPE=yes
44748
44749    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44750    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44751      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44752$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44753      FOUND_FREETYPE=no
44754    else
44755      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44756        # On Windows, we will need both .lib and .dll file.
44757        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44758          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44759$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44760          FOUND_FREETYPE=no
44761        fi
44762      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
44763        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
44764        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
44765      fi
44766    fi
44767  fi
44768
44769  if test "x$FOUND_FREETYPE" = xyes; then
44770
44771  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44772
44773  # Input might be given as Windows format, start by converting to
44774  # unix format.
44775  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44776  new_path=`$CYGPATH -u "$path"`
44777
44778  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44779  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44780  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44781  # "foo.exe" is OK but "foo" is an error.
44782  #
44783  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44784  # It is also a way to make sure we got the proper file name for the real test later on.
44785  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44786  if test "x$test_shortpath" = x; then
44787    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44788$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44789    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44790  fi
44791
44792  # Call helper function which possibly converts this using DOS-style short mode.
44793  # If so, the updated path is stored in $new_path.
44794
44795  input_path="$new_path"
44796  # Check if we need to convert this using DOS-style short mode. If the path
44797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44798  # take no chances and rewrite it.
44799  # Note: m4 eats our [], so we need to use [ and ] instead.
44800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44801  if test "x$has_forbidden_chars" != x; then
44802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44803    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44804    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44805    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44806      # Going to short mode and back again did indeed matter. Since short mode is
44807      # case insensitive, let's make it lowercase to improve readability.
44808      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44809      # Now convert it back to Unix-stile (cygpath)
44810      input_path=`$CYGPATH -u "$shortmode_path"`
44811      new_path="$input_path"
44812    fi
44813  fi
44814
44815  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44816  if test "x$test_cygdrive_prefix" = x; then
44817    # As a simple fix, exclude /usr/bin since it's not a real path.
44818    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44819      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44820      # a path prefixed by /cygdrive for fixpath to work.
44821      new_path="$CYGWIN_ROOT_PATH$input_path"
44822    fi
44823  fi
44824
44825
44826  if test "x$path" != "x$new_path"; then
44827    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44828    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44829$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44830  fi
44831
44832  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44833
44834  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44835  has_colon=`$ECHO $path | $GREP ^.:`
44836  new_path="$path"
44837  if test "x$has_colon" = x; then
44838    # Not in mixed or Windows style, start by that.
44839    new_path=`cmd //c echo $path`
44840  fi
44841
44842
44843  input_path="$new_path"
44844  # Check if we need to convert this using DOS-style short mode. If the path
44845  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44846  # take no chances and rewrite it.
44847  # Note: m4 eats our [], so we need to use [ and ] instead.
44848  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44849  if test "x$has_forbidden_chars" != x; then
44850    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44851    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44852  fi
44853
44854
44855  windows_path="$new_path"
44856  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44857    unix_path=`$CYGPATH -u "$windows_path"`
44858    new_path="$unix_path"
44859  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44860    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44861    new_path="$unix_path"
44862  fi
44863
44864  if test "x$path" != "x$new_path"; then
44865    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44866    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44867$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44868  fi
44869
44870  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44871  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44872
44873  else
44874    # We're on a posix platform. Hooray! :)
44875    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44876    has_space=`$ECHO "$path" | $GREP " "`
44877    if test "x$has_space" != x; then
44878      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44880      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44881    fi
44882
44883    # Use eval to expand a potential ~
44884    eval path="$path"
44885    if test ! -f "$path" && test ! -d "$path"; then
44886      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44887    fi
44888
44889    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44890  fi
44891
44892
44893  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44894
44895  # Input might be given as Windows format, start by converting to
44896  # unix format.
44897  path="$POTENTIAL_FREETYPE_LIB_PATH"
44898  new_path=`$CYGPATH -u "$path"`
44899
44900  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44901  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44902  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44903  # "foo.exe" is OK but "foo" is an error.
44904  #
44905  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44906  # It is also a way to make sure we got the proper file name for the real test later on.
44907  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44908  if test "x$test_shortpath" = x; then
44909    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44910$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44911    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44912  fi
44913
44914  # Call helper function which possibly converts this using DOS-style short mode.
44915  # If so, the updated path is stored in $new_path.
44916
44917  input_path="$new_path"
44918  # Check if we need to convert this using DOS-style short mode. If the path
44919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44920  # take no chances and rewrite it.
44921  # Note: m4 eats our [], so we need to use [ and ] instead.
44922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44923  if test "x$has_forbidden_chars" != x; then
44924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44925    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44926    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44927    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44928      # Going to short mode and back again did indeed matter. Since short mode is
44929      # case insensitive, let's make it lowercase to improve readability.
44930      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44931      # Now convert it back to Unix-stile (cygpath)
44932      input_path=`$CYGPATH -u "$shortmode_path"`
44933      new_path="$input_path"
44934    fi
44935  fi
44936
44937  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44938  if test "x$test_cygdrive_prefix" = x; then
44939    # As a simple fix, exclude /usr/bin since it's not a real path.
44940    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44941      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44942      # a path prefixed by /cygdrive for fixpath to work.
44943      new_path="$CYGWIN_ROOT_PATH$input_path"
44944    fi
44945  fi
44946
44947
44948  if test "x$path" != "x$new_path"; then
44949    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44952  fi
44953
44954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44955
44956  path="$POTENTIAL_FREETYPE_LIB_PATH"
44957  has_colon=`$ECHO $path | $GREP ^.:`
44958  new_path="$path"
44959  if test "x$has_colon" = x; then
44960    # Not in mixed or Windows style, start by that.
44961    new_path=`cmd //c echo $path`
44962  fi
44963
44964
44965  input_path="$new_path"
44966  # Check if we need to convert this using DOS-style short mode. If the path
44967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44968  # take no chances and rewrite it.
44969  # Note: m4 eats our [], so we need to use [ and ] instead.
44970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44971  if test "x$has_forbidden_chars" != x; then
44972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44973    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44974  fi
44975
44976
44977  windows_path="$new_path"
44978  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44979    unix_path=`$CYGPATH -u "$windows_path"`
44980    new_path="$unix_path"
44981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44982    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44983    new_path="$unix_path"
44984  fi
44985
44986  if test "x$path" != "x$new_path"; then
44987    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44988    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44989$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44990  fi
44991
44992  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44993  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44994
44995  else
44996    # We're on a posix platform. Hooray! :)
44997    path="$POTENTIAL_FREETYPE_LIB_PATH"
44998    has_space=`$ECHO "$path" | $GREP " "`
44999    if test "x$has_space" != x; then
45000      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45001$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45002      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45003    fi
45004
45005    # Use eval to expand a potential ~
45006    eval path="$path"
45007    if test ! -f "$path" && test ! -d "$path"; then
45008      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45009    fi
45010
45011    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45012  fi
45013
45014
45015    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45017$as_echo_n "checking for freetype includes... " >&6; }
45018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45019$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45020    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45021    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45022$as_echo_n "checking for freetype libraries... " >&6; }
45023    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45024$as_echo "$FREETYPE_LIB_PATH" >&6; }
45025  fi
45026
45027          fi
45028
45029          if test "x$FOUND_FREETYPE" != xyes; then
45030            FREETYPE_BASE_DIR="$FREETYPE_ROOT/usr"
45031            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45032
45033  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45034  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45035  METHOD="well-known location"
45036
45037  # First check if the files exists.
45038  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45039    # We found an arbitrary include file. That's a good sign.
45040    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45041$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45042    FOUND_FREETYPE=yes
45043
45044    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45045    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45046      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45048      FOUND_FREETYPE=no
45049    else
45050      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45051        # On Windows, we will need both .lib and .dll file.
45052        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45053          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45054$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45055          FOUND_FREETYPE=no
45056        fi
45057      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
45058        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45059        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45060      fi
45061    fi
45062  fi
45063
45064  if test "x$FOUND_FREETYPE" = xyes; then
45065
45066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45067
45068  # Input might be given as Windows format, start by converting to
45069  # unix format.
45070  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45071  new_path=`$CYGPATH -u "$path"`
45072
45073  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45074  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45075  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45076  # "foo.exe" is OK but "foo" is an error.
45077  #
45078  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45079  # It is also a way to make sure we got the proper file name for the real test later on.
45080  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45081  if test "x$test_shortpath" = x; then
45082    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45083$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45084    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45085  fi
45086
45087  # Call helper function which possibly converts this using DOS-style short mode.
45088  # If so, the updated path is stored in $new_path.
45089
45090  input_path="$new_path"
45091  # Check if we need to convert this using DOS-style short mode. If the path
45092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45093  # take no chances and rewrite it.
45094  # Note: m4 eats our [], so we need to use [ and ] instead.
45095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45096  if test "x$has_forbidden_chars" != x; then
45097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45098    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45099    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45100    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45101      # Going to short mode and back again did indeed matter. Since short mode is
45102      # case insensitive, let's make it lowercase to improve readability.
45103      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45104      # Now convert it back to Unix-stile (cygpath)
45105      input_path=`$CYGPATH -u "$shortmode_path"`
45106      new_path="$input_path"
45107    fi
45108  fi
45109
45110  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45111  if test "x$test_cygdrive_prefix" = x; then
45112    # As a simple fix, exclude /usr/bin since it's not a real path.
45113    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45114      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45115      # a path prefixed by /cygdrive for fixpath to work.
45116      new_path="$CYGWIN_ROOT_PATH$input_path"
45117    fi
45118  fi
45119
45120
45121  if test "x$path" != "x$new_path"; then
45122    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45124$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45125  fi
45126
45127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45128
45129  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45130  has_colon=`$ECHO $path | $GREP ^.:`
45131  new_path="$path"
45132  if test "x$has_colon" = x; then
45133    # Not in mixed or Windows style, start by that.
45134    new_path=`cmd //c echo $path`
45135  fi
45136
45137
45138  input_path="$new_path"
45139  # Check if we need to convert this using DOS-style short mode. If the path
45140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45141  # take no chances and rewrite it.
45142  # Note: m4 eats our [], so we need to use [ and ] instead.
45143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45144  if test "x$has_forbidden_chars" != x; then
45145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45146    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45147  fi
45148
45149
45150  windows_path="$new_path"
45151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45152    unix_path=`$CYGPATH -u "$windows_path"`
45153    new_path="$unix_path"
45154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45156    new_path="$unix_path"
45157  fi
45158
45159  if test "x$path" != "x$new_path"; then
45160    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45161    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45162$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45163  fi
45164
45165  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45166  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45167
45168  else
45169    # We're on a posix platform. Hooray! :)
45170    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45171    has_space=`$ECHO "$path" | $GREP " "`
45172    if test "x$has_space" != x; then
45173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45174$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45175      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45176    fi
45177
45178    # Use eval to expand a potential ~
45179    eval path="$path"
45180    if test ! -f "$path" && test ! -d "$path"; then
45181      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45182    fi
45183
45184    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45185  fi
45186
45187
45188  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45189
45190  # Input might be given as Windows format, start by converting to
45191  # unix format.
45192  path="$POTENTIAL_FREETYPE_LIB_PATH"
45193  new_path=`$CYGPATH -u "$path"`
45194
45195  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45196  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45197  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45198  # "foo.exe" is OK but "foo" is an error.
45199  #
45200  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45201  # It is also a way to make sure we got the proper file name for the real test later on.
45202  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45203  if test "x$test_shortpath" = x; then
45204    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45205$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45206    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45207  fi
45208
45209  # Call helper function which possibly converts this using DOS-style short mode.
45210  # If so, the updated path is stored in $new_path.
45211
45212  input_path="$new_path"
45213  # Check if we need to convert this using DOS-style short mode. If the path
45214  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45215  # take no chances and rewrite it.
45216  # Note: m4 eats our [], so we need to use [ and ] instead.
45217  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45218  if test "x$has_forbidden_chars" != x; then
45219    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45220    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45221    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45222    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45223      # Going to short mode and back again did indeed matter. Since short mode is
45224      # case insensitive, let's make it lowercase to improve readability.
45225      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45226      # Now convert it back to Unix-stile (cygpath)
45227      input_path=`$CYGPATH -u "$shortmode_path"`
45228      new_path="$input_path"
45229    fi
45230  fi
45231
45232  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45233  if test "x$test_cygdrive_prefix" = x; then
45234    # As a simple fix, exclude /usr/bin since it's not a real path.
45235    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45236      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45237      # a path prefixed by /cygdrive for fixpath to work.
45238      new_path="$CYGWIN_ROOT_PATH$input_path"
45239    fi
45240  fi
45241
45242
45243  if test "x$path" != "x$new_path"; then
45244    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45245    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45246$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45247  fi
45248
45249  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45250
45251  path="$POTENTIAL_FREETYPE_LIB_PATH"
45252  has_colon=`$ECHO $path | $GREP ^.:`
45253  new_path="$path"
45254  if test "x$has_colon" = x; then
45255    # Not in mixed or Windows style, start by that.
45256    new_path=`cmd //c echo $path`
45257  fi
45258
45259
45260  input_path="$new_path"
45261  # Check if we need to convert this using DOS-style short mode. If the path
45262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45263  # take no chances and rewrite it.
45264  # Note: m4 eats our [], so we need to use [ and ] instead.
45265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45266  if test "x$has_forbidden_chars" != x; then
45267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45268    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45269  fi
45270
45271
45272  windows_path="$new_path"
45273  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45274    unix_path=`$CYGPATH -u "$windows_path"`
45275    new_path="$unix_path"
45276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45277    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45278    new_path="$unix_path"
45279  fi
45280
45281  if test "x$path" != "x$new_path"; then
45282    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45283    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45284$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45285  fi
45286
45287  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45288  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45289
45290  else
45291    # We're on a posix platform. Hooray! :)
45292    path="$POTENTIAL_FREETYPE_LIB_PATH"
45293    has_space=`$ECHO "$path" | $GREP " "`
45294    if test "x$has_space" != x; then
45295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45296$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45297      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45298    fi
45299
45300    # Use eval to expand a potential ~
45301    eval path="$path"
45302    if test ! -f "$path" && test ! -d "$path"; then
45303      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45304    fi
45305
45306    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45307  fi
45308
45309
45310    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45311    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45312$as_echo_n "checking for freetype includes... " >&6; }
45313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45314$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45315    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45317$as_echo_n "checking for freetype libraries... " >&6; }
45318    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45319$as_echo "$FREETYPE_LIB_PATH" >&6; }
45320  fi
45321
45322            else
45323
45324  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45325  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
45326  METHOD="well-known location"
45327
45328  # First check if the files exists.
45329  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45330    # We found an arbitrary include file. That's a good sign.
45331    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45332$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45333    FOUND_FREETYPE=yes
45334
45335    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45336    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45337      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45338$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45339      FOUND_FREETYPE=no
45340    else
45341      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45342        # On Windows, we will need both .lib and .dll file.
45343        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45344          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45345$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45346          FOUND_FREETYPE=no
45347        fi
45348      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
45349        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45350        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45351      fi
45352    fi
45353  fi
45354
45355  if test "x$FOUND_FREETYPE" = xyes; then
45356
45357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45358
45359  # Input might be given as Windows format, start by converting to
45360  # unix format.
45361  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45362  new_path=`$CYGPATH -u "$path"`
45363
45364  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45365  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45366  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45367  # "foo.exe" is OK but "foo" is an error.
45368  #
45369  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45370  # It is also a way to make sure we got the proper file name for the real test later on.
45371  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45372  if test "x$test_shortpath" = x; then
45373    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45374$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45375    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45376  fi
45377
45378  # Call helper function which possibly converts this using DOS-style short mode.
45379  # If so, the updated path is stored in $new_path.
45380
45381  input_path="$new_path"
45382  # Check if we need to convert this using DOS-style short mode. If the path
45383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45384  # take no chances and rewrite it.
45385  # Note: m4 eats our [], so we need to use [ and ] instead.
45386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45387  if test "x$has_forbidden_chars" != x; then
45388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45389    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45390    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45391    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45392      # Going to short mode and back again did indeed matter. Since short mode is
45393      # case insensitive, let's make it lowercase to improve readability.
45394      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45395      # Now convert it back to Unix-stile (cygpath)
45396      input_path=`$CYGPATH -u "$shortmode_path"`
45397      new_path="$input_path"
45398    fi
45399  fi
45400
45401  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45402  if test "x$test_cygdrive_prefix" = x; then
45403    # As a simple fix, exclude /usr/bin since it's not a real path.
45404    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45405      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45406      # a path prefixed by /cygdrive for fixpath to work.
45407      new_path="$CYGWIN_ROOT_PATH$input_path"
45408    fi
45409  fi
45410
45411
45412  if test "x$path" != "x$new_path"; then
45413    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45414    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45415$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45416  fi
45417
45418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45419
45420  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45421  has_colon=`$ECHO $path | $GREP ^.:`
45422  new_path="$path"
45423  if test "x$has_colon" = x; then
45424    # Not in mixed or Windows style, start by that.
45425    new_path=`cmd //c echo $path`
45426  fi
45427
45428
45429  input_path="$new_path"
45430  # Check if we need to convert this using DOS-style short mode. If the path
45431  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45432  # take no chances and rewrite it.
45433  # Note: m4 eats our [], so we need to use [ and ] instead.
45434  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45435  if test "x$has_forbidden_chars" != x; then
45436    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45437    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45438  fi
45439
45440
45441  windows_path="$new_path"
45442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45443    unix_path=`$CYGPATH -u "$windows_path"`
45444    new_path="$unix_path"
45445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45447    new_path="$unix_path"
45448  fi
45449
45450  if test "x$path" != "x$new_path"; then
45451    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45452    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45453$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45454  fi
45455
45456  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45457  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45458
45459  else
45460    # We're on a posix platform. Hooray! :)
45461    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45462    has_space=`$ECHO "$path" | $GREP " "`
45463    if test "x$has_space" != x; then
45464      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45465$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45466      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45467    fi
45468
45469    # Use eval to expand a potential ~
45470    eval path="$path"
45471    if test ! -f "$path" && test ! -d "$path"; then
45472      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45473    fi
45474
45475    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45476  fi
45477
45478
45479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45480
45481  # Input might be given as Windows format, start by converting to
45482  # unix format.
45483  path="$POTENTIAL_FREETYPE_LIB_PATH"
45484  new_path=`$CYGPATH -u "$path"`
45485
45486  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45487  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45488  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45489  # "foo.exe" is OK but "foo" is an error.
45490  #
45491  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45492  # It is also a way to make sure we got the proper file name for the real test later on.
45493  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45494  if test "x$test_shortpath" = x; then
45495    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45496$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45497    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45498  fi
45499
45500  # Call helper function which possibly converts this using DOS-style short mode.
45501  # If so, the updated path is stored in $new_path.
45502
45503  input_path="$new_path"
45504  # Check if we need to convert this using DOS-style short mode. If the path
45505  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45506  # take no chances and rewrite it.
45507  # Note: m4 eats our [], so we need to use [ and ] instead.
45508  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45509  if test "x$has_forbidden_chars" != x; then
45510    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45511    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45512    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45513    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45514      # Going to short mode and back again did indeed matter. Since short mode is
45515      # case insensitive, let's make it lowercase to improve readability.
45516      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45517      # Now convert it back to Unix-stile (cygpath)
45518      input_path=`$CYGPATH -u "$shortmode_path"`
45519      new_path="$input_path"
45520    fi
45521  fi
45522
45523  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45524  if test "x$test_cygdrive_prefix" = x; then
45525    # As a simple fix, exclude /usr/bin since it's not a real path.
45526    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45527      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45528      # a path prefixed by /cygdrive for fixpath to work.
45529      new_path="$CYGWIN_ROOT_PATH$input_path"
45530    fi
45531  fi
45532
45533
45534  if test "x$path" != "x$new_path"; then
45535    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45536    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45537$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45538  fi
45539
45540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45541
45542  path="$POTENTIAL_FREETYPE_LIB_PATH"
45543  has_colon=`$ECHO $path | $GREP ^.:`
45544  new_path="$path"
45545  if test "x$has_colon" = x; then
45546    # Not in mixed or Windows style, start by that.
45547    new_path=`cmd //c echo $path`
45548  fi
45549
45550
45551  input_path="$new_path"
45552  # Check if we need to convert this using DOS-style short mode. If the path
45553  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45554  # take no chances and rewrite it.
45555  # Note: m4 eats our [], so we need to use [ and ] instead.
45556  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45557  if test "x$has_forbidden_chars" != x; then
45558    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45559    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45560  fi
45561
45562
45563  windows_path="$new_path"
45564  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45565    unix_path=`$CYGPATH -u "$windows_path"`
45566    new_path="$unix_path"
45567  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45568    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45569    new_path="$unix_path"
45570  fi
45571
45572  if test "x$path" != "x$new_path"; then
45573    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45574    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45575$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45576  fi
45577
45578  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45579  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45580
45581  else
45582    # We're on a posix platform. Hooray! :)
45583    path="$POTENTIAL_FREETYPE_LIB_PATH"
45584    has_space=`$ECHO "$path" | $GREP " "`
45585    if test "x$has_space" != x; then
45586      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45587$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45588      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45589    fi
45590
45591    # Use eval to expand a potential ~
45592    eval path="$path"
45593    if test ! -f "$path" && test ! -d "$path"; then
45594      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45595    fi
45596
45597    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45598  fi
45599
45600
45601    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45602    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45603$as_echo_n "checking for freetype includes... " >&6; }
45604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45605$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45606    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45608$as_echo_n "checking for freetype libraries... " >&6; }
45609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45610$as_echo "$FREETYPE_LIB_PATH" >&6; }
45611  fi
45612
45613              if test "x$FOUND_FREETYPE" != xyes; then
45614
45615  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45616  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
45617  METHOD="well-known location"
45618
45619  # First check if the files exists.
45620  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45621    # We found an arbitrary include file. That's a good sign.
45622    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45623$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45624    FOUND_FREETYPE=yes
45625
45626    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45627    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45628      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45629$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45630      FOUND_FREETYPE=no
45631    else
45632      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45633        # On Windows, we will need both .lib and .dll file.
45634        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45635          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45636$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45637          FOUND_FREETYPE=no
45638        fi
45639      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
45640        # On solaris-x86_86, default is (normally) PATH/lib/amd64. Update our guess!
45641        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH/amd64"
45642      fi
45643    fi
45644  fi
45645
45646  if test "x$FOUND_FREETYPE" = xyes; then
45647
45648  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45649
45650  # Input might be given as Windows format, start by converting to
45651  # unix format.
45652  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45653  new_path=`$CYGPATH -u "$path"`
45654
45655  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45656  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45657  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45658  # "foo.exe" is OK but "foo" is an error.
45659  #
45660  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45661  # It is also a way to make sure we got the proper file name for the real test later on.
45662  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45663  if test "x$test_shortpath" = x; then
45664    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45665$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45666    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45667  fi
45668
45669  # Call helper function which possibly converts this using DOS-style short mode.
45670  # If so, the updated path is stored in $new_path.
45671
45672  input_path="$new_path"
45673  # Check if we need to convert this using DOS-style short mode. If the path
45674  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45675  # take no chances and rewrite it.
45676  # Note: m4 eats our [], so we need to use [ and ] instead.
45677  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45678  if test "x$has_forbidden_chars" != x; then
45679    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45680    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45681    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45682    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45683      # Going to short mode and back again did indeed matter. Since short mode is
45684      # case insensitive, let's make it lowercase to improve readability.
45685      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45686      # Now convert it back to Unix-stile (cygpath)
45687      input_path=`$CYGPATH -u "$shortmode_path"`
45688      new_path="$input_path"
45689    fi
45690  fi
45691
45692  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45693  if test "x$test_cygdrive_prefix" = x; then
45694    # As a simple fix, exclude /usr/bin since it's not a real path.
45695    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45696      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45697      # a path prefixed by /cygdrive for fixpath to work.
45698      new_path="$CYGWIN_ROOT_PATH$input_path"
45699    fi
45700  fi
45701
45702
45703  if test "x$path" != "x$new_path"; then
45704    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45705    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45706$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45707  fi
45708
45709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45710
45711  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45712  has_colon=`$ECHO $path | $GREP ^.:`
45713  new_path="$path"
45714  if test "x$has_colon" = x; then
45715    # Not in mixed or Windows style, start by that.
45716    new_path=`cmd //c echo $path`
45717  fi
45718
45719
45720  input_path="$new_path"
45721  # Check if we need to convert this using DOS-style short mode. If the path
45722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45723  # take no chances and rewrite it.
45724  # Note: m4 eats our [], so we need to use [ and ] instead.
45725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45726  if test "x$has_forbidden_chars" != x; then
45727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45728    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45729  fi
45730
45731
45732  windows_path="$new_path"
45733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45734    unix_path=`$CYGPATH -u "$windows_path"`
45735    new_path="$unix_path"
45736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45738    new_path="$unix_path"
45739  fi
45740
45741  if test "x$path" != "x$new_path"; then
45742    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45743    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45744$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45745  fi
45746
45747  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45748  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45749
45750  else
45751    # We're on a posix platform. Hooray! :)
45752    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45753    has_space=`$ECHO "$path" | $GREP " "`
45754    if test "x$has_space" != x; then
45755      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45756$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45757      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45758    fi
45759
45760    # Use eval to expand a potential ~
45761    eval path="$path"
45762    if test ! -f "$path" && test ! -d "$path"; then
45763      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45764    fi
45765
45766    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45767  fi
45768
45769
45770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45771
45772  # Input might be given as Windows format, start by converting to
45773  # unix format.
45774  path="$POTENTIAL_FREETYPE_LIB_PATH"
45775  new_path=`$CYGPATH -u "$path"`
45776
45777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45780  # "foo.exe" is OK but "foo" is an error.
45781  #
45782  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45783  # It is also a way to make sure we got the proper file name for the real test later on.
45784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45785  if test "x$test_shortpath" = x; then
45786    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45787$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45788    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45789  fi
45790
45791  # Call helper function which possibly converts this using DOS-style short mode.
45792  # If so, the updated path is stored in $new_path.
45793
45794  input_path="$new_path"
45795  # Check if we need to convert this using DOS-style short mode. If the path
45796  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45797  # take no chances and rewrite it.
45798  # Note: m4 eats our [], so we need to use [ and ] instead.
45799  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45800  if test "x$has_forbidden_chars" != x; then
45801    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45802    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45803    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45804    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45805      # Going to short mode and back again did indeed matter. Since short mode is
45806      # case insensitive, let's make it lowercase to improve readability.
45807      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45808      # Now convert it back to Unix-stile (cygpath)
45809      input_path=`$CYGPATH -u "$shortmode_path"`
45810      new_path="$input_path"
45811    fi
45812  fi
45813
45814  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45815  if test "x$test_cygdrive_prefix" = x; then
45816    # As a simple fix, exclude /usr/bin since it's not a real path.
45817    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45818      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45819      # a path prefixed by /cygdrive for fixpath to work.
45820      new_path="$CYGWIN_ROOT_PATH$input_path"
45821    fi
45822  fi
45823
45824
45825  if test "x$path" != "x$new_path"; then
45826    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45827    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45828$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45829  fi
45830
45831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45832
45833  path="$POTENTIAL_FREETYPE_LIB_PATH"
45834  has_colon=`$ECHO $path | $GREP ^.:`
45835  new_path="$path"
45836  if test "x$has_colon" = x; then
45837    # Not in mixed or Windows style, start by that.
45838    new_path=`cmd //c echo $path`
45839  fi
45840
45841
45842  input_path="$new_path"
45843  # Check if we need to convert this using DOS-style short mode. If the path
45844  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45845  # take no chances and rewrite it.
45846  # Note: m4 eats our [], so we need to use [ and ] instead.
45847  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45848  if test "x$has_forbidden_chars" != x; then
45849    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45850    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45851  fi
45852
45853
45854  windows_path="$new_path"
45855  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45856    unix_path=`$CYGPATH -u "$windows_path"`
45857    new_path="$unix_path"
45858  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45859    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45860    new_path="$unix_path"
45861  fi
45862
45863  if test "x$path" != "x$new_path"; then
45864    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45865    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45866$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45867  fi
45868
45869  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45870  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45871
45872  else
45873    # We're on a posix platform. Hooray! :)
45874    path="$POTENTIAL_FREETYPE_LIB_PATH"
45875    has_space=`$ECHO "$path" | $GREP " "`
45876    if test "x$has_space" != x; then
45877      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45878$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45879      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45880    fi
45881
45882    # Use eval to expand a potential ~
45883    eval path="$path"
45884    if test ! -f "$path" && test ! -d "$path"; then
45885      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45886    fi
45887
45888    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45889  fi
45890
45891
45892    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45893    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45894$as_echo_n "checking for freetype includes... " >&6; }
45895    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45896$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45897    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45898    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45899$as_echo_n "checking for freetype libraries... " >&6; }
45900    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45901$as_echo "$FREETYPE_LIB_PATH" >&6; }
45902  fi
45903
45904              fi
45905            fi
45906          fi
45907        fi
45908      fi # end check in well-known locations
45909
45910      if test "x$FOUND_FREETYPE" != xyes; then
45911
45912  # Print a helpful message on how to acquire the necessary build dependency.
45913  # freetype is the help tag: freetype, cups, pulse, alsa etc
45914  MISSING_DEPENDENCY=freetype
45915
45916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45917    cygwin_help $MISSING_DEPENDENCY
45918  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45919    msys_help $MISSING_DEPENDENCY
45920  else
45921    PKGHANDLER_COMMAND=
45922
45923    case $PKGHANDLER in
45924      apt-get)
45925        apt_help     $MISSING_DEPENDENCY ;;
45926      yum)
45927        yum_help     $MISSING_DEPENDENCY ;;
45928      port)
45929        port_help    $MISSING_DEPENDENCY ;;
45930      pkgutil)
45931        pkgutil_help $MISSING_DEPENDENCY ;;
45932      pkgadd)
45933        pkgadd_help  $MISSING_DEPENDENCY ;;
45934    esac
45935
45936    if test "x$PKGHANDLER_COMMAND" != x; then
45937      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
45938    fi
45939  fi
45940
45941        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
45942      fi
45943    fi # end user specified settings
45944
45945    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
45946    if test "x$FREETYPE_CFLAGS" = x; then
45947
45948  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45949
45950  # Input might be given as Windows format, start by converting to
45951  # unix format.
45952  path="$FREETYPE_INCLUDE_PATH"
45953  new_path=`$CYGPATH -u "$path"`
45954
45955  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45956  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45957  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45958  # "foo.exe" is OK but "foo" is an error.
45959  #
45960  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45961  # It is also a way to make sure we got the proper file name for the real test later on.
45962  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45963  if test "x$test_shortpath" = x; then
45964    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45965$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45966    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
45967  fi
45968
45969  # Call helper function which possibly converts this using DOS-style short mode.
45970  # If so, the updated path is stored in $new_path.
45971
45972  input_path="$new_path"
45973  # Check if we need to convert this using DOS-style short mode. If the path
45974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45975  # take no chances and rewrite it.
45976  # Note: m4 eats our [], so we need to use [ and ] instead.
45977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45978  if test "x$has_forbidden_chars" != x; then
45979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45980    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45981    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45982    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45983      # Going to short mode and back again did indeed matter. Since short mode is
45984      # case insensitive, let's make it lowercase to improve readability.
45985      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45986      # Now convert it back to Unix-stile (cygpath)
45987      input_path=`$CYGPATH -u "$shortmode_path"`
45988      new_path="$input_path"
45989    fi
45990  fi
45991
45992  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45993  if test "x$test_cygdrive_prefix" = x; then
45994    # As a simple fix, exclude /usr/bin since it's not a real path.
45995    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45996      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45997      # a path prefixed by /cygdrive for fixpath to work.
45998      new_path="$CYGWIN_ROOT_PATH$input_path"
45999    fi
46000  fi
46001
46002
46003  if test "x$path" != "x$new_path"; then
46004    FREETYPE_INCLUDE_PATH="$new_path"
46005    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46006$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46007  fi
46008
46009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46010
46011  path="$FREETYPE_INCLUDE_PATH"
46012  has_colon=`$ECHO $path | $GREP ^.:`
46013  new_path="$path"
46014  if test "x$has_colon" = x; then
46015    # Not in mixed or Windows style, start by that.
46016    new_path=`cmd //c echo $path`
46017  fi
46018
46019
46020  input_path="$new_path"
46021  # Check if we need to convert this using DOS-style short mode. If the path
46022  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46023  # take no chances and rewrite it.
46024  # Note: m4 eats our [], so we need to use [ and ] instead.
46025  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46026  if test "x$has_forbidden_chars" != x; then
46027    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46028    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46029  fi
46030
46031
46032  windows_path="$new_path"
46033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46034    unix_path=`$CYGPATH -u "$windows_path"`
46035    new_path="$unix_path"
46036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46038    new_path="$unix_path"
46039  fi
46040
46041  if test "x$path" != "x$new_path"; then
46042    FREETYPE_INCLUDE_PATH="$new_path"
46043    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46044$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46045  fi
46046
46047  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46048  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46049
46050  else
46051    # We're on a posix platform. Hooray! :)
46052    path="$FREETYPE_INCLUDE_PATH"
46053    has_space=`$ECHO "$path" | $GREP " "`
46054    if test "x$has_space" != x; then
46055      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46056$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46057      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46058    fi
46059
46060    # Use eval to expand a potential ~
46061    eval path="$path"
46062    if test ! -f "$path" && test ! -d "$path"; then
46063      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46064    fi
46065
46066    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46067  fi
46068
46069      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
46070        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
46071      else
46072        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
46073      fi
46074    fi
46075
46076    if test "x$FREETYPE_LIBS" = x; then
46077
46078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46079
46080  # Input might be given as Windows format, start by converting to
46081  # unix format.
46082  path="$FREETYPE_LIB_PATH"
46083  new_path=`$CYGPATH -u "$path"`
46084
46085  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46086  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46087  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46088  # "foo.exe" is OK but "foo" is an error.
46089  #
46090  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46091  # It is also a way to make sure we got the proper file name for the real test later on.
46092  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46093  if test "x$test_shortpath" = x; then
46094    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46095$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46096    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
46097  fi
46098
46099  # Call helper function which possibly converts this using DOS-style short mode.
46100  # If so, the updated path is stored in $new_path.
46101
46102  input_path="$new_path"
46103  # Check if we need to convert this using DOS-style short mode. If the path
46104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46105  # take no chances and rewrite it.
46106  # Note: m4 eats our [], so we need to use [ and ] instead.
46107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46108  if test "x$has_forbidden_chars" != x; then
46109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46110    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46111    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46112    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46113      # Going to short mode and back again did indeed matter. Since short mode is
46114      # case insensitive, let's make it lowercase to improve readability.
46115      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46116      # Now convert it back to Unix-stile (cygpath)
46117      input_path=`$CYGPATH -u "$shortmode_path"`
46118      new_path="$input_path"
46119    fi
46120  fi
46121
46122  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46123  if test "x$test_cygdrive_prefix" = x; then
46124    # As a simple fix, exclude /usr/bin since it's not a real path.
46125    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46126      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46127      # a path prefixed by /cygdrive for fixpath to work.
46128      new_path="$CYGWIN_ROOT_PATH$input_path"
46129    fi
46130  fi
46131
46132
46133  if test "x$path" != "x$new_path"; then
46134    FREETYPE_LIB_PATH="$new_path"
46135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46136$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46137  fi
46138
46139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46140
46141  path="$FREETYPE_LIB_PATH"
46142  has_colon=`$ECHO $path | $GREP ^.:`
46143  new_path="$path"
46144  if test "x$has_colon" = x; then
46145    # Not in mixed or Windows style, start by that.
46146    new_path=`cmd //c echo $path`
46147  fi
46148
46149
46150  input_path="$new_path"
46151  # Check if we need to convert this using DOS-style short mode. If the path
46152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46153  # take no chances and rewrite it.
46154  # Note: m4 eats our [], so we need to use [ and ] instead.
46155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46156  if test "x$has_forbidden_chars" != x; then
46157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46158    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46159  fi
46160
46161
46162  windows_path="$new_path"
46163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46164    unix_path=`$CYGPATH -u "$windows_path"`
46165    new_path="$unix_path"
46166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46168    new_path="$unix_path"
46169  fi
46170
46171  if test "x$path" != "x$new_path"; then
46172    FREETYPE_LIB_PATH="$new_path"
46173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
46174$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46175  fi
46176
46177  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46178  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46179
46180  else
46181    # We're on a posix platform. Hooray! :)
46182    path="$FREETYPE_LIB_PATH"
46183    has_space=`$ECHO "$path" | $GREP " "`
46184    if test "x$has_space" != x; then
46185      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46186$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46187      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46188    fi
46189
46190    # Use eval to expand a potential ~
46191    eval path="$path"
46192    if test ! -f "$path" && test ! -d "$path"; then
46193      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46194    fi
46195
46196    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46197  fi
46198
46199      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46200        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
46201      else
46202        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
46203      fi
46204    fi
46205
46206    # Try to compile it
46207    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
46208$as_echo_n "checking if we can compile and link with freetype... " >&6; }
46209    ac_ext=cpp
46210ac_cpp='$CXXCPP $CPPFLAGS'
46211ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46212ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46213ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46214
46215    PREV_CXXCFLAGS="$CXXFLAGS"
46216    PREV_LIBS="$LIBS"
46217    PREV_CXX="$CXX"
46218    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
46219    LIBS="$LIBS $FREETYPE_LIBS"
46220    CXX="$FIXPATH $CXX"
46221    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46222/* end confdefs.h.  */
46223
46224          #include<ft2build.h>
46225          #include FT_FREETYPE_H
46226          int main () {
46227            FT_Init_FreeType(NULL);
46228            return 0;
46229          }
46230
46231_ACEOF
46232if ac_fn_cxx_try_link "$LINENO"; then :
46233
46234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46235$as_echo "yes" >&6; }
46236
46237else
46238
46239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46240$as_echo "no" >&6; }
46241          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
46242$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
46243          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
46244$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
46245
46246
46247  # Print a helpful message on how to acquire the necessary build dependency.
46248  # freetype is the help tag: freetype, cups, pulse, alsa etc
46249  MISSING_DEPENDENCY=freetype
46250
46251  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46252    cygwin_help $MISSING_DEPENDENCY
46253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46254    msys_help $MISSING_DEPENDENCY
46255  else
46256    PKGHANDLER_COMMAND=
46257
46258    case $PKGHANDLER in
46259      apt-get)
46260        apt_help     $MISSING_DEPENDENCY ;;
46261      yum)
46262        yum_help     $MISSING_DEPENDENCY ;;
46263      port)
46264        port_help    $MISSING_DEPENDENCY ;;
46265      pkgutil)
46266        pkgutil_help $MISSING_DEPENDENCY ;;
46267      pkgadd)
46268        pkgadd_help  $MISSING_DEPENDENCY ;;
46269    esac
46270
46271    if test "x$PKGHANDLER_COMMAND" != x; then
46272      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46273    fi
46274  fi
46275
46276
46277          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
46278
46279
46280fi
46281rm -f core conftest.err conftest.$ac_objext \
46282    conftest$ac_exeext conftest.$ac_ext
46283    CXXCFLAGS="$PREV_CXXFLAGS"
46284    LIBS="$PREV_LIBS"
46285    CXX="$PREV_CXX"
46286    ac_ext=cpp
46287ac_cpp='$CXXCPP $CPPFLAGS'
46288ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46289ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46290ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46291
46292
46293    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
46294$as_echo_n "checking if we should bundle freetype... " >&6; }
46295    if test "x$BUNDLE_FREETYPE" = xyes; then
46296      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
46297    fi
46298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
46299$as_echo "$BUNDLE_FREETYPE" >&6; }
46300
46301  fi # end freetype needed
46302
46303
46304
46305
46306
46307
46308
46309  ###############################################################################
46310  #
46311  # Check for alsa headers and libraries. Used on Linux/GNU systems.
46312  #
46313
46314# Check whether --with-alsa was given.
46315if test "${with_alsa+set}" = set; then :
46316  withval=$with_alsa;
46317fi
46318
46319
46320# Check whether --with-alsa-include was given.
46321if test "${with_alsa_include+set}" = set; then :
46322  withval=$with_alsa_include;
46323fi
46324
46325
46326# Check whether --with-alsa-lib was given.
46327if test "${with_alsa_lib+set}" = set; then :
46328  withval=$with_alsa_lib;
46329fi
46330
46331
46332  if test "x$ALSA_NOT_NEEDED" = xyes; then
46333    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
46334      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
46335$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
46336    fi
46337    ALSA_CFLAGS=
46338    ALSA_LIBS=
46339  else
46340    ALSA_FOUND=no
46341
46342    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
46343      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
46344    fi
46345
46346    if test "x${with_alsa}" != x; then
46347      ALSA_LIBS="-L${with_alsa}/lib -lasound"
46348      ALSA_CFLAGS="-I${with_alsa}/include"
46349      ALSA_FOUND=yes
46350    fi
46351    if test "x${with_alsa_include}" != x; then
46352      ALSA_CFLAGS="-I${with_alsa_include}"
46353      ALSA_FOUND=yes
46354    fi
46355    if test "x${with_alsa_lib}" != x; then
46356      ALSA_LIBS="-L${with_alsa_lib} -lasound"
46357      ALSA_FOUND=yes
46358    fi
46359    if test "x$ALSA_FOUND" = xno; then
46360
46361
46362  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
46363    # Source the builddeps file again, to make sure it uses the latest variables!
46364    . $builddepsfile
46365    # Look for a target and build machine specific resource!
46366    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
46367    if test "x$resource" = x; then
46368      # Ok, lets instead look for a target specific resource
46369      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
46370    fi
46371    if test "x$resource" = x; then
46372      # Ok, lets instead look for a build specific resource
46373      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
46374    fi
46375    if test "x$resource" = x; then
46376      # Ok, lets instead look for a generic resource
46377      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
46378      resource=${builddep_alsa}
46379    fi
46380    if test "x$resource" != x; then
46381      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
46382$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
46383      # If the resource in the builddeps.conf file is an existing directory,
46384      # for example /java/linux/cups
46385      if test -d ${resource}; then
46386        depdir=${resource}
46387      else
46388
46389  # alsa is for example mymodule
46390  # $resource is for example libs/general/libmymod_1_2_3.zip
46391  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
46392  # $with_builddeps_dir is for example /localhome/builddeps
46393  # depdir is the name of the variable into which we store the depdir, eg MYMOD
46394  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
46395  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
46396  filename=`basename $resource`
46397  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
46398  filebase=${filename%%.*}
46399  extension=${filename#*.}
46400  installdir=$with_builddeps_dir/$filebase
46401  if test ! -f $installdir/$filename.unpacked; then
46402    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
46403$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
46404    if test ! -d $installdir; then
46405      mkdir -p $installdir
46406    fi
46407    if test ! -d $installdir; then
46408      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
46409    fi
46410    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
46411    touch $tmpfile
46412    if test ! -f $tmpfile; then
46413      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
46414    fi
46415
46416  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
46417  # $tmpfile is the local file name for the downloaded file.
46418  VALID_TOOL=no
46419  if test "x$BDEPS_FTP" = xwget; then
46420    VALID_TOOL=yes
46421    wget -O $tmpfile $with_builddeps_server/$resource
46422  fi
46423  if test "x$BDEPS_FTP" = xlftp; then
46424    VALID_TOOL=yes
46425    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
46426  fi
46427  if test "x$BDEPS_FTP" = xftp; then
46428    VALID_TOOL=yes
46429    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
46430    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
46431    FTPUSERPWD=${FTPSERVER%%@*}
46432    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
46433      FTPUSER=${userpwd%%:*}
46434      FTPPWD=${userpwd#*@}
46435      FTPSERVER=${FTPSERVER#*@}
46436    else
46437      FTPUSER=ftp
46438      FTPPWD=ftp
46439    fi
46440    # the "pass" command does not work on some
46441    # ftp clients (read ftp.exe) but if it works,
46442    # passive mode is better!
46443    ( \
46444        echo "user $FTPUSER $FTPPWD"        ; \
46445        echo "pass"                         ; \
46446        echo "bin"                          ; \
46447        echo "get $FTPPATH $tmpfile"              ; \
46448    ) | ftp -in $FTPSERVER
46449  fi
46450  if test "x$VALID_TOOL" != xyes; then
46451    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
46452  fi
46453
46454    mv $tmpfile $installdir/$filename
46455    if test ! -s $installdir/$filename; then
46456      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
46457    fi
46458    case "$extension" in
46459      zip)  echo "Unzipping $installdir/$filename..."
46460        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
46461        ;;
46462      tar.gz) echo "Untaring $installdir/$filename..."
46463        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46464        ;;
46465      tgz) echo "Untaring $installdir/$filename..."
46466        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
46467        ;;
46468      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
46469        ;;
46470    esac
46471  fi
46472  if test -f $installdir/$filename.unpacked; then
46473    depdir=$installdir
46474  fi
46475
46476      fi
46477      # Source the builddeps file again, because in the previous command, the depdir
46478      # was updated to point at the current build dependency install directory.
46479      . $builddepsfile
46480      # Now extract variables from the builddeps.conf files.
46481      theroot=${builddep_alsa_ROOT}
46482      thecflags=${builddep_alsa_CFLAGS}
46483      thelibs=${builddep_alsa_LIBS}
46484      if test "x$depdir" = x; then
46485        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
46486      fi
46487      ALSA=$depdir
46488      if test "x$theroot" != x; then
46489        ALSA="$theroot"
46490      fi
46491      if test "x$thecflags" != x; then
46492        ALSA_CFLAGS="$thecflags"
46493      fi
46494      if test "x$thelibs" != x; then
46495        ALSA_LIBS="$thelibs"
46496      fi
46497      ALSA_FOUND=yes
46498      else ALSA_FOUND=no
46499
46500    fi
46501    else ALSA_FOUND=no
46502
46503  fi
46504
46505    fi
46506    if test "x$ALSA_FOUND" = xno; then
46507
46508pkg_failed=no
46509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
46510$as_echo_n "checking for ALSA... " >&6; }
46511
46512if test -n "$ALSA_CFLAGS"; then
46513    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
46514 elif test -n "$PKG_CONFIG"; then
46515    if test -n "$PKG_CONFIG" && \
46516    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46517  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46518  ac_status=$?
46519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46520  test $ac_status = 0; }; then
46521  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
46522else
46523  pkg_failed=yes
46524fi
46525 else
46526    pkg_failed=untried
46527fi
46528if test -n "$ALSA_LIBS"; then
46529    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
46530 elif test -n "$PKG_CONFIG"; then
46531    if test -n "$PKG_CONFIG" && \
46532    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
46533  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
46534  ac_status=$?
46535  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
46536  test $ac_status = 0; }; then
46537  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
46538else
46539  pkg_failed=yes
46540fi
46541 else
46542    pkg_failed=untried
46543fi
46544
46545
46546
46547if test $pkg_failed = yes; then
46548
46549if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
46550        _pkg_short_errors_supported=yes
46551else
46552        _pkg_short_errors_supported=no
46553fi
46554        if test $_pkg_short_errors_supported = yes; then
46555	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
46556        else
46557	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
46558        fi
46559	# Put the nasty error message in config.log where it belongs
46560	echo "$ALSA_PKG_ERRORS" >&5
46561
46562	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46563$as_echo "no" >&6; }
46564                ALSA_FOUND=no
46565elif test $pkg_failed = untried; then
46566	ALSA_FOUND=no
46567else
46568	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
46569	ALSA_LIBS=$pkg_cv_ALSA_LIBS
46570        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
46571$as_echo "yes" >&6; }
46572	ALSA_FOUND=yes
46573fi
46574    fi
46575    if test "x$ALSA_FOUND" = xno; then
46576      for ac_header in alsa/asoundlib.h
46577do :
46578  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
46579if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
46580  cat >>confdefs.h <<_ACEOF
46581#define HAVE_ALSA_ASOUNDLIB_H 1
46582_ACEOF
46583
46584            ALSA_FOUND=yes
46585            ALSA_CFLAGS=-Iignoreme
46586            ALSA_LIBS=-lasound
46587            DEFAULT_ALSA=yes
46588
46589else
46590  ALSA_FOUND=no
46591fi
46592
46593done
46594
46595    fi
46596    if test "x$ALSA_FOUND" = xno; then
46597
46598  # Print a helpful message on how to acquire the necessary build dependency.
46599  # alsa is the help tag: freetype, cups, pulse, alsa etc
46600  MISSING_DEPENDENCY=alsa
46601
46602  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46603    cygwin_help $MISSING_DEPENDENCY
46604  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46605    msys_help $MISSING_DEPENDENCY
46606  else
46607    PKGHANDLER_COMMAND=
46608
46609    case $PKGHANDLER in
46610      apt-get)
46611        apt_help     $MISSING_DEPENDENCY ;;
46612      yum)
46613        yum_help     $MISSING_DEPENDENCY ;;
46614      port)
46615        port_help    $MISSING_DEPENDENCY ;;
46616      pkgutil)
46617        pkgutil_help $MISSING_DEPENDENCY ;;
46618      pkgadd)
46619        pkgadd_help  $MISSING_DEPENDENCY ;;
46620    esac
46621
46622    if test "x$PKGHANDLER_COMMAND" != x; then
46623      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46624    fi
46625  fi
46626
46627      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
46628    fi
46629  fi
46630
46631
46632
46633
46634
46635
46636  ###############################################################################
46637  #
46638  # Check for the jpeg library
46639  #
46640
46641  USE_EXTERNAL_LIBJPEG=true
46642  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
46643$as_echo_n "checking for main in -ljpeg... " >&6; }
46644if ${ac_cv_lib_jpeg_main+:} false; then :
46645  $as_echo_n "(cached) " >&6
46646else
46647  ac_check_lib_save_LIBS=$LIBS
46648LIBS="-ljpeg  $LIBS"
46649cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46650/* end confdefs.h.  */
46651
46652
46653int
46654main ()
46655{
46656return main ();
46657  ;
46658  return 0;
46659}
46660_ACEOF
46661if ac_fn_cxx_try_link "$LINENO"; then :
46662  ac_cv_lib_jpeg_main=yes
46663else
46664  ac_cv_lib_jpeg_main=no
46665fi
46666rm -f core conftest.err conftest.$ac_objext \
46667    conftest$ac_exeext conftest.$ac_ext
46668LIBS=$ac_check_lib_save_LIBS
46669fi
46670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
46671$as_echo "$ac_cv_lib_jpeg_main" >&6; }
46672if test "x$ac_cv_lib_jpeg_main" = xyes; then :
46673  cat >>confdefs.h <<_ACEOF
46674#define HAVE_LIBJPEG 1
46675_ACEOF
46676
46677  LIBS="-ljpeg $LIBS"
46678
46679else
46680   USE_EXTERNAL_LIBJPEG=false
46681      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
46682$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
46683
46684fi
46685
46686
46687
46688  ###############################################################################
46689  #
46690  # Check for the gif library
46691  #
46692
46693
46694# Check whether --with-giflib was given.
46695if test "${with_giflib+set}" = set; then :
46696  withval=$with_giflib;
46697fi
46698
46699
46700
46701  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
46702$as_echo_n "checking for which giflib to use... " >&6; }
46703
46704  # default is bundled
46705  DEFAULT_GIFLIB=bundled
46706
46707  #
46708  # if user didn't specify, use DEFAULT_GIFLIB
46709  #
46710  if test "x${with_giflib}" = "x"; then
46711    with_giflib=${DEFAULT_GIFLIB}
46712  fi
46713
46714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
46715$as_echo "${with_giflib}" >&6; }
46716
46717  if test "x${with_giflib}" = "xbundled"; then
46718    USE_EXTERNAL_LIBGIF=false
46719  elif test "x${with_giflib}" = "xsystem"; then
46720    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
46721if test "x$ac_cv_header_gif_lib_h" = xyes; then :
46722
46723else
46724   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
46725fi
46726
46727
46728    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
46729$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
46730if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
46731  $as_echo_n "(cached) " >&6
46732else
46733  ac_check_lib_save_LIBS=$LIBS
46734LIBS="-lgif  $LIBS"
46735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46736/* end confdefs.h.  */
46737
46738/* Override any GCC internal prototype to avoid an error.
46739   Use char because int might match the return type of a GCC
46740   builtin and then its argument prototype would still apply.  */
46741#ifdef __cplusplus
46742extern "C"
46743#endif
46744char DGifGetCode ();
46745int
46746main ()
46747{
46748return DGifGetCode ();
46749  ;
46750  return 0;
46751}
46752_ACEOF
46753if ac_fn_cxx_try_link "$LINENO"; then :
46754  ac_cv_lib_gif_DGifGetCode=yes
46755else
46756  ac_cv_lib_gif_DGifGetCode=no
46757fi
46758rm -f core conftest.err conftest.$ac_objext \
46759    conftest$ac_exeext conftest.$ac_ext
46760LIBS=$ac_check_lib_save_LIBS
46761fi
46762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
46763$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
46764if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
46765  cat >>confdefs.h <<_ACEOF
46766#define HAVE_LIBGIF 1
46767_ACEOF
46768
46769  LIBS="-lgif $LIBS"
46770
46771else
46772   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
46773fi
46774
46775
46776    USE_EXTERNAL_LIBGIF=true
46777  else
46778    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
46779  fi
46780
46781
46782  ###############################################################################
46783  #
46784  # Check for the zlib library
46785  #
46786
46787
46788# Check whether --with-zlib was given.
46789if test "${with_zlib+set}" = set; then :
46790  withval=$with_zlib;
46791fi
46792
46793
46794  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
46795$as_echo_n "checking for compress in -lz... " >&6; }
46796if ${ac_cv_lib_z_compress+:} false; then :
46797  $as_echo_n "(cached) " >&6
46798else
46799  ac_check_lib_save_LIBS=$LIBS
46800LIBS="-lz  $LIBS"
46801cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46802/* end confdefs.h.  */
46803
46804/* Override any GCC internal prototype to avoid an error.
46805   Use char because int might match the return type of a GCC
46806   builtin and then its argument prototype would still apply.  */
46807#ifdef __cplusplus
46808extern "C"
46809#endif
46810char compress ();
46811int
46812main ()
46813{
46814return compress ();
46815  ;
46816  return 0;
46817}
46818_ACEOF
46819if ac_fn_cxx_try_link "$LINENO"; then :
46820  ac_cv_lib_z_compress=yes
46821else
46822  ac_cv_lib_z_compress=no
46823fi
46824rm -f core conftest.err conftest.$ac_objext \
46825    conftest$ac_exeext conftest.$ac_ext
46826LIBS=$ac_check_lib_save_LIBS
46827fi
46828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
46829$as_echo "$ac_cv_lib_z_compress" >&6; }
46830if test "x$ac_cv_lib_z_compress" = xyes; then :
46831   ZLIB_FOUND=yes
46832else
46833   ZLIB_FOUND=no
46834fi
46835
46836
46837  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
46838$as_echo_n "checking for which zlib to use... " >&6; }
46839
46840  DEFAULT_ZLIB=bundled
46841  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
46842    #
46843    # On macosx default is system...on others default is
46844    #
46845    DEFAULT_ZLIB=system
46846  fi
46847
46848  if test "x${ZLIB_FOUND}" != "xyes"; then
46849    #
46850    # If we don't find any system...set default to bundled
46851    #
46852    DEFAULT_ZLIB=bundled
46853  fi
46854
46855  #
46856  # If user didn't specify, use DEFAULT_ZLIB
46857  #
46858  if test "x${with_zlib}" = "x"; then
46859    with_zlib=${DEFAULT_ZLIB}
46860  fi
46861
46862  if test "x${with_zlib}" = "xbundled"; then
46863    USE_EXTERNAL_LIBZ=false
46864    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
46865$as_echo "bundled" >&6; }
46866  elif test "x${with_zlib}" = "xsystem"; then
46867    if test "x${ZLIB_FOUND}" = "xyes"; then
46868      USE_EXTERNAL_LIBZ=true
46869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
46870$as_echo "system" >&6; }
46871    else
46872      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
46873$as_echo "system not found" >&6; }
46874      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
46875    fi
46876  else
46877    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
46878  fi
46879
46880
46881
46882  ###############################################################################
46883  LIBZIP_CAN_USE_MMAP=true
46884
46885
46886
46887  ###############################################################################
46888  #
46889  # Check if altzone exists in time.h
46890  #
46891
46892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46893/* end confdefs.h.  */
46894#include <time.h>
46895int
46896main ()
46897{
46898return (int)altzone;
46899  ;
46900  return 0;
46901}
46902_ACEOF
46903if ac_fn_cxx_try_link "$LINENO"; then :
46904  has_altzone=yes
46905else
46906  has_altzone=no
46907fi
46908rm -f core conftest.err conftest.$ac_objext \
46909    conftest$ac_exeext conftest.$ac_ext
46910  if test "x$has_altzone" = xyes; then
46911
46912$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
46913
46914  fi
46915
46916  ###############################################################################
46917  #
46918  # Check the maths library
46919  #
46920
46921  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
46922$as_echo_n "checking for cos in -lm... " >&6; }
46923if ${ac_cv_lib_m_cos+:} false; then :
46924  $as_echo_n "(cached) " >&6
46925else
46926  ac_check_lib_save_LIBS=$LIBS
46927LIBS="-lm  $LIBS"
46928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46929/* end confdefs.h.  */
46930
46931/* Override any GCC internal prototype to avoid an error.
46932   Use char because int might match the return type of a GCC
46933   builtin and then its argument prototype would still apply.  */
46934#ifdef __cplusplus
46935extern "C"
46936#endif
46937char cos ();
46938int
46939main ()
46940{
46941return cos ();
46942  ;
46943  return 0;
46944}
46945_ACEOF
46946if ac_fn_cxx_try_link "$LINENO"; then :
46947  ac_cv_lib_m_cos=yes
46948else
46949  ac_cv_lib_m_cos=no
46950fi
46951rm -f core conftest.err conftest.$ac_objext \
46952    conftest$ac_exeext conftest.$ac_ext
46953LIBS=$ac_check_lib_save_LIBS
46954fi
46955{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
46956$as_echo "$ac_cv_lib_m_cos" >&6; }
46957if test "x$ac_cv_lib_m_cos" = xyes; then :
46958  cat >>confdefs.h <<_ACEOF
46959#define HAVE_LIBM 1
46960_ACEOF
46961
46962  LIBS="-lm $LIBS"
46963
46964else
46965
46966        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
46967$as_echo "$as_me: Maths library was not found" >&6;}
46968
46969
46970fi
46971
46972
46973
46974  ###############################################################################
46975  #
46976  # Check for libdl.so
46977
46978  save_LIBS="$LIBS"
46979  LIBS=""
46980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
46981$as_echo_n "checking for dlopen in -ldl... " >&6; }
46982if ${ac_cv_lib_dl_dlopen+:} false; then :
46983  $as_echo_n "(cached) " >&6
46984else
46985  ac_check_lib_save_LIBS=$LIBS
46986LIBS="-ldl  $LIBS"
46987cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46988/* end confdefs.h.  */
46989
46990/* Override any GCC internal prototype to avoid an error.
46991   Use char because int might match the return type of a GCC
46992   builtin and then its argument prototype would still apply.  */
46993#ifdef __cplusplus
46994extern "C"
46995#endif
46996char dlopen ();
46997int
46998main ()
46999{
47000return dlopen ();
47001  ;
47002  return 0;
47003}
47004_ACEOF
47005if ac_fn_cxx_try_link "$LINENO"; then :
47006  ac_cv_lib_dl_dlopen=yes
47007else
47008  ac_cv_lib_dl_dlopen=no
47009fi
47010rm -f core conftest.err conftest.$ac_objext \
47011    conftest$ac_exeext conftest.$ac_ext
47012LIBS=$ac_check_lib_save_LIBS
47013fi
47014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
47015$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
47016if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
47017  cat >>confdefs.h <<_ACEOF
47018#define HAVE_LIBDL 1
47019_ACEOF
47020
47021  LIBS="-ldl $LIBS"
47022
47023fi
47024
47025  LIBDL="$LIBS"
47026
47027  LIBS="$save_LIBS"
47028
47029
47030  ###############################################################################
47031  #
47032  # statically link libstdc++ before C++ ABI is stablized on Linux unless
47033  # dynamic build is configured on command line.
47034  #
47035
47036# Check whether --with-stdc++lib was given.
47037if test "${with_stdc__lib+set}" = set; then :
47038  withval=$with_stdc__lib;
47039        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
47040                && test "x$with_stdc__lib" != xdefault; then
47041          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
47042        fi
47043
47044else
47045  with_stdc__lib=default
47046
47047fi
47048
47049
47050  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47051    # Test if -lstdc++ works.
47052    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
47053$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
47054    ac_ext=cpp
47055ac_cpp='$CXXCPP $CPPFLAGS'
47056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47059
47060    OLD_CXXFLAGS="$CXXFLAGS"
47061    CXXFLAGS="$CXXFLAGS -lstdc++"
47062    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47063/* end confdefs.h.  */
47064
47065int
47066main ()
47067{
47068return 0;
47069  ;
47070  return 0;
47071}
47072_ACEOF
47073if ac_fn_cxx_try_link "$LINENO"; then :
47074  has_dynamic_libstdcxx=yes
47075else
47076  has_dynamic_libstdcxx=no
47077fi
47078rm -f core conftest.err conftest.$ac_objext \
47079    conftest$ac_exeext conftest.$ac_ext
47080    CXXFLAGS="$OLD_CXXFLAGS"
47081    ac_ext=cpp
47082ac_cpp='$CXXCPP $CPPFLAGS'
47083ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47084ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47085ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47086
47087    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
47088$as_echo "$has_dynamic_libstdcxx" >&6; }
47089
47090    # Test if stdc++ can be linked statically.
47091    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
47092$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
47093    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
47094    ac_ext=cpp
47095ac_cpp='$CXXCPP $CPPFLAGS'
47096ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47097ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47098ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47099
47100    OLD_LIBS="$LIBS"
47101    OLD_CXX="$CXX"
47102    LIBS="$STATIC_STDCXX_FLAGS"
47103    CXX="$CC"
47104    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47105/* end confdefs.h.  */
47106
47107int
47108main ()
47109{
47110return 0;
47111  ;
47112  return 0;
47113}
47114_ACEOF
47115if ac_fn_cxx_try_link "$LINENO"; then :
47116  has_static_libstdcxx=yes
47117else
47118  has_static_libstdcxx=no
47119fi
47120rm -f core conftest.err conftest.$ac_objext \
47121    conftest$ac_exeext conftest.$ac_ext
47122    LIBS="$OLD_LIBS"
47123    CXX="$OLD_CXX"
47124    ac_ext=cpp
47125ac_cpp='$CXXCPP $CPPFLAGS'
47126ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47127ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47128ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47129
47130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
47131$as_echo "$has_static_libstdcxx" >&6; }
47132
47133    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
47134      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
47135    fi
47136
47137    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
47138      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
47139    fi
47140
47141    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
47142      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
47143    fi
47144
47145    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
47146$as_echo_n "checking how to link with libstdc++... " >&6; }
47147    # If dynamic was requested, it's available since it would fail above otherwise.
47148    # If dynamic wasn't requested, go with static unless it isn't available.
47149    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47150      LIBCXX="$LIBCXX -lstdc++"
47151      LDCXX="$CXX"
47152      STATIC_CXX_SETTING="STATIC_CXX=false"
47153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
47154$as_echo "dynamic" >&6; }
47155    else
47156      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
47157      LDCXX="$CC"
47158      STATIC_CXX_SETTING="STATIC_CXX=true"
47159      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
47160$as_echo "static" >&6; }
47161    fi
47162  fi
47163
47164
47165  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47166    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
47167
47168pkg_failed=no
47169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
47170$as_echo_n "checking for LIBFFI... " >&6; }
47171
47172if test -n "$LIBFFI_CFLAGS"; then
47173    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
47174 elif test -n "$PKG_CONFIG"; then
47175    if test -n "$PKG_CONFIG" && \
47176    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47177  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47178  ac_status=$?
47179  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47180  test $ac_status = 0; }; then
47181  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
47182else
47183  pkg_failed=yes
47184fi
47185 else
47186    pkg_failed=untried
47187fi
47188if test -n "$LIBFFI_LIBS"; then
47189    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
47190 elif test -n "$PKG_CONFIG"; then
47191    if test -n "$PKG_CONFIG" && \
47192    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
47193  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
47194  ac_status=$?
47195  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47196  test $ac_status = 0; }; then
47197  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
47198else
47199  pkg_failed=yes
47200fi
47201 else
47202    pkg_failed=untried
47203fi
47204
47205
47206
47207if test $pkg_failed = yes; then
47208
47209if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47210        _pkg_short_errors_supported=yes
47211else
47212        _pkg_short_errors_supported=no
47213fi
47214        if test $_pkg_short_errors_supported = yes; then
47215	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
47216        else
47217	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
47218        fi
47219	# Put the nasty error message in config.log where it belongs
47220	echo "$LIBFFI_PKG_ERRORS" >&5
47221
47222	as_fn_error $? "Package requirements (libffi) were not met:
47223
47224$LIBFFI_PKG_ERRORS
47225
47226Consider adjusting the PKG_CONFIG_PATH environment variable if you
47227installed software in a non-standard prefix.
47228
47229Alternatively, you may set the environment variables LIBFFI_CFLAGS
47230and LIBFFI_LIBS to avoid the need to call pkg-config.
47231See the pkg-config man page for more details.
47232" "$LINENO" 5
47233elif test $pkg_failed = untried; then
47234	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
47235$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
47236as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
47237is in your PATH or set the PKG_CONFIG environment variable to the full
47238path to pkg-config.
47239
47240Alternatively, you may set the environment variables LIBFFI_CFLAGS
47241and LIBFFI_LIBS to avoid the need to call pkg-config.
47242See the pkg-config man page for more details.
47243
47244To get pkg-config, see <http://pkg-config.freedesktop.org/>.
47245See \`config.log' for more details" "$LINENO" 5; }
47246else
47247	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
47248	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
47249        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47250$as_echo "yes" >&6; }
47251	:
47252fi
47253
47254  fi
47255
47256  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
47257    # Extract the first word of "llvm-config", so it can be a program name with args.
47258set dummy llvm-config; ac_word=$2
47259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47260$as_echo_n "checking for $ac_word... " >&6; }
47261if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
47262  $as_echo_n "(cached) " >&6
47263else
47264  if test -n "$LLVM_CONFIG"; then
47265  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
47266else
47267as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47268for as_dir in $PATH
47269do
47270  IFS=$as_save_IFS
47271  test -z "$as_dir" && as_dir=.
47272    for ac_exec_ext in '' $ac_executable_extensions; do
47273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47274    ac_cv_prog_LLVM_CONFIG="llvm-config"
47275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47276    break 2
47277  fi
47278done
47279  done
47280IFS=$as_save_IFS
47281
47282fi
47283fi
47284LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
47285if test -n "$LLVM_CONFIG"; then
47286  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
47287$as_echo "$LLVM_CONFIG" >&6; }
47288else
47289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47290$as_echo "no" >&6; }
47291fi
47292
47293
47294
47295    if test "x$LLVM_CONFIG" != xllvm-config; then
47296      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
47297    fi
47298
47299    llvm_components="jit mcjit engine nativecodegen native"
47300    unset LLVM_CFLAGS
47301    for flag in $("$LLVM_CONFIG" --cxxflags); do
47302      if echo "${flag}" | grep -q '^-[ID]'; then
47303        if test "${flag}" != "-D_DEBUG" ; then
47304          if test "${LLVM_CFLAGS}" != "" ; then
47305            LLVM_CFLAGS="${LLVM_CFLAGS} "
47306          fi
47307          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
47308        fi
47309      fi
47310    done
47311    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
47312    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
47313
47314    unset LLVM_LDFLAGS
47315    for flag in $("${LLVM_CONFIG}" --ldflags); do
47316      if echo "${flag}" | grep -q '^-L'; then
47317        if test "${LLVM_LDFLAGS}" != ""; then
47318          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
47319        fi
47320        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
47321      fi
47322    done
47323
47324    unset LLVM_LIBS
47325    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
47326      if echo "${flag}" | grep -q '^-l'; then
47327        if test "${LLVM_LIBS}" != ""; then
47328          LLVM_LIBS="${LLVM_LIBS} "
47329        fi
47330        LLVM_LIBS="${LLVM_LIBS}${flag}"
47331      fi
47332    done
47333
47334
47335
47336
47337  fi
47338
47339  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
47340  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
47341    LIBCXX="/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
47342  fi
47343
47344  # TODO better (platform agnostic) test
47345  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
47346    LIBCXX="-lstdc++"
47347  fi
47348
47349
47350
47351
47352  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47353
47354
47355# Check whether --with-msvcr-dll was given.
47356if test "${with_msvcr_dll+set}" = set; then :
47357  withval=$with_msvcr_dll;
47358fi
47359
47360
47361  if test "x$with_msvcr_dll" != x; then
47362    # If given explicitely by user, do not probe. If not present, fail directly.
47363
47364  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
47365  METHOD="--with-msvcr-dll"
47366  if test -e "$POSSIBLE_MSVCR_DLL"; then
47367    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47368$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47369
47370    # Need to check if the found msvcr is correct architecture
47371    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47372$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47373    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47374    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47375      CORRECT_MSVCR_ARCH=386
47376    else
47377      CORRECT_MSVCR_ARCH=x86-64
47378    fi
47379    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47380      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47381$as_echo "ok" >&6; }
47382      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47383      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47384$as_echo_n "checking for msvcr100.dll... " >&6; }
47385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47386$as_echo "$MSVCR_DLL" >&6; }
47387    else
47388      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47389$as_echo "incorrect, ignoring" >&6; }
47390      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47391$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47392    fi
47393  fi
47394
47395    if test "x$MSVCR_DLL" = x; then
47396      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
47397    fi
47398  fi
47399
47400  if test "x$MSVCR_DLL" = x; then
47401    # Probe: Using well-known location from Visual Studio 10.0
47402    if test "x$VCINSTALLDIR" != x; then
47403      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
47404
47405  windows_path="$CYGWIN_VC_INSTALL_DIR"
47406  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47407    unix_path=`$CYGPATH -u "$windows_path"`
47408    CYGWIN_VC_INSTALL_DIR="$unix_path"
47409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47410    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47411    CYGWIN_VC_INSTALL_DIR="$unix_path"
47412  fi
47413
47414      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47415        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
47416      else
47417        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
47418      fi
47419
47420  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47421  METHOD="well-known location in VCINSTALLDIR"
47422  if test -e "$POSSIBLE_MSVCR_DLL"; then
47423    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47424$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47425
47426    # Need to check if the found msvcr is correct architecture
47427    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47428$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47429    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47430    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47431      CORRECT_MSVCR_ARCH=386
47432    else
47433      CORRECT_MSVCR_ARCH=x86-64
47434    fi
47435    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47436      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47437$as_echo "ok" >&6; }
47438      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47439      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47440$as_echo_n "checking for msvcr100.dll... " >&6; }
47441      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47442$as_echo "$MSVCR_DLL" >&6; }
47443    else
47444      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47445$as_echo "incorrect, ignoring" >&6; }
47446      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47447$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47448    fi
47449  fi
47450
47451    fi
47452  fi
47453
47454  if test "x$MSVCR_DLL" = x; then
47455    # Probe: Check in the Boot JDK directory.
47456    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
47457
47458  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47459  METHOD="well-known location in Boot JDK"
47460  if test -e "$POSSIBLE_MSVCR_DLL"; then
47461    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47462$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47463
47464    # Need to check if the found msvcr is correct architecture
47465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47466$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47467    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47468    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47469      CORRECT_MSVCR_ARCH=386
47470    else
47471      CORRECT_MSVCR_ARCH=x86-64
47472    fi
47473    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47475$as_echo "ok" >&6; }
47476      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47478$as_echo_n "checking for msvcr100.dll... " >&6; }
47479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47480$as_echo "$MSVCR_DLL" >&6; }
47481    else
47482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47483$as_echo "incorrect, ignoring" >&6; }
47484      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47485$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47486    fi
47487  fi
47488
47489  fi
47490
47491  if test "x$MSVCR_DLL" = x; then
47492    # Probe: Look in the Windows system32 directory
47493    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
47494
47495  windows_path="$CYGWIN_SYSTEMROOT"
47496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47497    unix_path=`$CYGPATH -u "$windows_path"`
47498    CYGWIN_SYSTEMROOT="$unix_path"
47499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47501    CYGWIN_SYSTEMROOT="$unix_path"
47502  fi
47503
47504    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
47505
47506  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47507  METHOD="well-known location in SYSTEMROOT"
47508  if test -e "$POSSIBLE_MSVCR_DLL"; then
47509    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47510$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47511
47512    # Need to check if the found msvcr is correct architecture
47513    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47514$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47515    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47516    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47517      CORRECT_MSVCR_ARCH=386
47518    else
47519      CORRECT_MSVCR_ARCH=x86-64
47520    fi
47521    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47522      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47523$as_echo "ok" >&6; }
47524      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47525      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47526$as_echo_n "checking for msvcr100.dll... " >&6; }
47527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47528$as_echo "$MSVCR_DLL" >&6; }
47529    else
47530      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47531$as_echo "incorrect, ignoring" >&6; }
47532      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47533$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47534    fi
47535  fi
47536
47537  fi
47538
47539  if test "x$MSVCR_DLL" = x; then
47540    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
47541    if test "x$VS100COMNTOOLS" != x; then
47542      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
47543
47544  windows_path="$CYGWIN_VS_TOOLS_DIR"
47545  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47546    unix_path=`$CYGPATH -u "$windows_path"`
47547    CYGWIN_VS_TOOLS_DIR="$unix_path"
47548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47549    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47550    CYGWIN_VS_TOOLS_DIR="$unix_path"
47551  fi
47552
47553      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47554        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
47555      else
47556        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
47557      fi
47558
47559  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47560  METHOD="search of VS100COMNTOOLS"
47561  if test -e "$POSSIBLE_MSVCR_DLL"; then
47562    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47563$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47564
47565    # Need to check if the found msvcr is correct architecture
47566    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47567$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47568    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47569    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47570      CORRECT_MSVCR_ARCH=386
47571    else
47572      CORRECT_MSVCR_ARCH=x86-64
47573    fi
47574    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47575      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47576$as_echo "ok" >&6; }
47577      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47579$as_echo_n "checking for msvcr100.dll... " >&6; }
47580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47581$as_echo "$MSVCR_DLL" >&6; }
47582    else
47583      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47584$as_echo "incorrect, ignoring" >&6; }
47585      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47586$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47587    fi
47588  fi
47589
47590    fi
47591  fi
47592
47593  if test "x$MSVCR_DLL" = x; then
47594    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
47595    # (This was the original behaviour; kept since it might turn up something)
47596    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
47597      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
47598        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
47599      else
47600        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
47601        if test "x$POSSIBLE_MSVCR_DLL" = x; then
47602          # We're grasping at straws now...
47603          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
47604        fi
47605      fi
47606
47607
47608  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47609  METHOD="search of VCINSTALLDIR"
47610  if test -e "$POSSIBLE_MSVCR_DLL"; then
47611    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
47612$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
47613
47614    # Need to check if the found msvcr is correct architecture
47615    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
47616$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
47617    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
47618    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
47619      CORRECT_MSVCR_ARCH=386
47620    else
47621      CORRECT_MSVCR_ARCH=x86-64
47622    fi
47623    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
47624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
47625$as_echo "ok" >&6; }
47626      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
47627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47628$as_echo_n "checking for msvcr100.dll... " >&6; }
47629      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
47630$as_echo "$MSVCR_DLL" >&6; }
47631    else
47632      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
47633$as_echo "incorrect, ignoring" >&6; }
47634      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
47635$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
47636    fi
47637  fi
47638
47639    fi
47640  fi
47641
47642  if test "x$MSVCR_DLL" = x; then
47643    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
47644$as_echo_n "checking for msvcr100.dll... " >&6; }
47645    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47646$as_echo "no" >&6; }
47647    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
47648  fi
47649
47650
47651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47652
47653  # Input might be given as Windows format, start by converting to
47654  # unix format.
47655  path="$MSVCR_DLL"
47656  new_path=`$CYGPATH -u "$path"`
47657
47658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47661  # "foo.exe" is OK but "foo" is an error.
47662  #
47663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47664  # It is also a way to make sure we got the proper file name for the real test later on.
47665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47666  if test "x$test_shortpath" = x; then
47667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47668$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47669    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
47670  fi
47671
47672  # Call helper function which possibly converts this using DOS-style short mode.
47673  # If so, the updated path is stored in $new_path.
47674
47675  input_path="$new_path"
47676  # Check if we need to convert this using DOS-style short mode. If the path
47677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47678  # take no chances and rewrite it.
47679  # Note: m4 eats our [], so we need to use [ and ] instead.
47680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47681  if test "x$has_forbidden_chars" != x; then
47682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47686      # Going to short mode and back again did indeed matter. Since short mode is
47687      # case insensitive, let's make it lowercase to improve readability.
47688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47689      # Now convert it back to Unix-stile (cygpath)
47690      input_path=`$CYGPATH -u "$shortmode_path"`
47691      new_path="$input_path"
47692    fi
47693  fi
47694
47695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47696  if test "x$test_cygdrive_prefix" = x; then
47697    # As a simple fix, exclude /usr/bin since it's not a real path.
47698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47700      # a path prefixed by /cygdrive for fixpath to work.
47701      new_path="$CYGWIN_ROOT_PATH$input_path"
47702    fi
47703  fi
47704
47705
47706  if test "x$path" != "x$new_path"; then
47707    MSVCR_DLL="$new_path"
47708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47709$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47710  fi
47711
47712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47713
47714  path="$MSVCR_DLL"
47715  has_colon=`$ECHO $path | $GREP ^.:`
47716  new_path="$path"
47717  if test "x$has_colon" = x; then
47718    # Not in mixed or Windows style, start by that.
47719    new_path=`cmd //c echo $path`
47720  fi
47721
47722
47723  input_path="$new_path"
47724  # Check if we need to convert this using DOS-style short mode. If the path
47725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47726  # take no chances and rewrite it.
47727  # Note: m4 eats our [], so we need to use [ and ] instead.
47728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47729  if test "x$has_forbidden_chars" != x; then
47730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47732  fi
47733
47734
47735  windows_path="$new_path"
47736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47737    unix_path=`$CYGPATH -u "$windows_path"`
47738    new_path="$unix_path"
47739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47741    new_path="$unix_path"
47742  fi
47743
47744  if test "x$path" != "x$new_path"; then
47745    MSVCR_DLL="$new_path"
47746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
47747$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
47748  fi
47749
47750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47752
47753  else
47754    # We're on a posix platform. Hooray! :)
47755    path="$MSVCR_DLL"
47756    has_space=`$ECHO "$path" | $GREP " "`
47757    if test "x$has_space" != x; then
47758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
47759$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
47760      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47761    fi
47762
47763    # Use eval to expand a potential ~
47764    eval path="$path"
47765    if test ! -f "$path" && test ! -d "$path"; then
47766      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
47767    fi
47768
47769    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
47770  fi
47771
47772
47773
47774
47775# Check whether --with-dxsdk was given.
47776if test "${with_dxsdk+set}" = set; then :
47777  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
47778$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
47779fi
47780
47781
47782
47783
47784# Check whether --with-dxsdk-lib was given.
47785if test "${with_dxsdk_lib+set}" = set; then :
47786  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
47787$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
47788fi
47789
47790
47791
47792
47793# Check whether --with-dxsdk-include was given.
47794if test "${with_dxsdk_include+set}" = set; then :
47795  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
47796$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
47797fi
47798
47799
47800  fi
47801
47802
47803
47804###############################################################################
47805#
47806# We need to do some final tweaking, when everything else is done.
47807#
47808###############################################################################
47809
47810
47811  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
47812
47813
47814  # The name of the Service Agent jar.
47815  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
47816  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
47817    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
47818  fi
47819
47820
47821
47822    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
47823$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
47824
47825    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
47826      ENABLE_INTREE_EC=yes
47827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47828$as_echo "yes" >&6; }
47829    else
47830      ENABLE_INTREE_EC=no
47831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47832$as_echo "no" >&6; }
47833    fi
47834
47835
47836
47837
47838###############################################################################
47839#
47840# Configure parts of the build that only affect the build performance,
47841# not the result.
47842#
47843###############################################################################
47844
47845
47846  # How many cores do we have on this build system?
47847
47848# Check whether --with-num-cores was given.
47849if test "${with_num_cores+set}" = set; then :
47850  withval=$with_num_cores;
47851fi
47852
47853  if test "x$with_num_cores" = x; then
47854    # The number of cores were not specified, try to probe them.
47855
47856  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
47857$as_echo_n "checking for number of cores... " >&6; }
47858  NUM_CORES=1
47859  FOUND_CORES=no
47860
47861  if test -f /proc/cpuinfo; then
47862    # Looks like a Linux (or cygwin) system
47863    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
47864    FOUND_CORES=yes
47865  elif test -x /usr/sbin/psrinfo; then
47866    # Looks like a Solaris system
47867    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
47868    FOUND_CORES=yes
47869  elif test -x /usr/sbin/system_profiler; then
47870    # Looks like a MacOSX system
47871    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
47872    FOUND_CORES=yes
47873  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
47874    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
47875    FOUND_CORES=yes
47876  elif test -n "$NUMBER_OF_PROCESSORS"; then
47877    # On windows, look in the env
47878    NUM_CORES=$NUMBER_OF_PROCESSORS
47879    FOUND_CORES=yes
47880  fi
47881
47882  if test "x$FOUND_CORES" = xyes; then
47883    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
47884$as_echo "$NUM_CORES" >&6; }
47885  else
47886    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
47887$as_echo "could not detect number of cores, defaulting to 1" >&6; }
47888    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
47889$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
47890  fi
47891
47892  else
47893    NUM_CORES=$with_num_cores
47894  fi
47895
47896
47897
47898  # How much memory do we have on this build system?
47899
47900# Check whether --with-memory-size was given.
47901if test "${with_memory_size+set}" = set; then :
47902  withval=$with_memory_size;
47903fi
47904
47905  if test "x$with_memory_size" = x; then
47906    # The memory size was not specified, try to probe it.
47907
47908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
47909$as_echo_n "checking for memory size... " >&6; }
47910  # Default to 1024 MB
47911  MEMORY_SIZE=1024
47912  FOUND_MEM=no
47913
47914  if test -f /proc/meminfo; then
47915    # Looks like a Linux (or cygwin) system
47916    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
47917    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
47918    FOUND_MEM=yes
47919  elif test -x /usr/sbin/prtconf; then
47920    # Looks like a Solaris or AIX system
47921    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
47922    FOUND_MEM=yes
47923  elif test -x /usr/sbin/system_profiler; then
47924    # Looks like a MacOSX system
47925    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
47926    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
47927    FOUND_MEM=yes
47928  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
47929    # Windows, but without cygwin
47930    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
47931    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
47932    FOUND_MEM=yes
47933  fi
47934
47935  if test "x$FOUND_MEM" = xyes; then
47936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
47937$as_echo "$MEMORY_SIZE MB" >&6; }
47938  else
47939    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to 1024 MB" >&5
47940$as_echo "could not detect memory size, defaulting to 1024 MB" >&6; }
47941    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
47942$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
47943  fi
47944
47945  else
47946    MEMORY_SIZE=$with_memory_size
47947  fi
47948
47949
47950
47951  # Provide a decent default number of parallel jobs for make depending on
47952  # number of cores, amount of memory and machine architecture.
47953
47954# Check whether --with-jobs was given.
47955if test "${with_jobs+set}" = set; then :
47956  withval=$with_jobs;
47957fi
47958
47959  if test "x$with_jobs" = x; then
47960    # Number of jobs was not specified, calculate.
47961    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
47962$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
47963    # Approximate memory in GB, rounding up a bit.
47964    memory_gb=`expr $MEMORY_SIZE / 1100`
47965    # Pick the lowest of memory in gb and number of cores.
47966    if test "$memory_gb" -lt "$NUM_CORES"; then
47967      JOBS="$memory_gb"
47968    else
47969      JOBS="$NUM_CORES"
47970      # On bigger machines, leave some room for other processes to run
47971      if test "$JOBS" -gt "4"; then
47972        JOBS=`expr $JOBS '*' 90 / 100`
47973      fi
47974    fi
47975    # Cap number of jobs to 16
47976    if test "$JOBS" -gt "16"; then
47977      JOBS=16
47978    fi
47979    if test "$JOBS" -eq "0"; then
47980      JOBS=1
47981    fi
47982    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
47983$as_echo "$JOBS" >&6; }
47984  else
47985    JOBS=$with_jobs
47986  fi
47987
47988
47989
47990# Setup smart javac (after cores and memory have been setup)
47991
47992
47993# Check whether --with-sjavac-server-java was given.
47994if test "${with_sjavac_server_java+set}" = set; then :
47995  withval=$with_sjavac_server_java;
47996fi
47997
47998
47999  if test "x$with_sjavac_server_java" != x; then
48000    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
48001    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
48002    if test "x$FOUND_VERSION" = x; then
48003      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
48004    fi
48005  else
48006    SJAVAC_SERVER_JAVA=""
48007    # Hotspot specific options.
48008
48009  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
48010  $ECHO "Command: $JAVA -verbosegc -version" >&5
48011  OUTPUT=`$JAVA -verbosegc -version 2>&1`
48012  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48013  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48014  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48015    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
48016    JVM_ARG_OK=true
48017  else
48018    $ECHO "Arg failed:" >&5
48019    $ECHO "$OUTPUT" >&5
48020    JVM_ARG_OK=false
48021  fi
48022
48023    # JRockit specific options.
48024
48025  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
48026  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
48027  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
48028  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48029  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48030  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48031    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
48032    JVM_ARG_OK=true
48033  else
48034    $ECHO "Arg failed:" >&5
48035    $ECHO "$OUTPUT" >&5
48036    JVM_ARG_OK=false
48037  fi
48038
48039    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
48040  fi
48041
48042
48043  if test "$MEMORY_SIZE" -gt "2500"; then
48044
48045  $ECHO "Check if jvm arg is ok: -d64" >&5
48046  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
48047  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
48048  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48049  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48050  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48051    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
48052    JVM_ARG_OK=true
48053  else
48054    $ECHO "Arg failed:" >&5
48055    $ECHO "$OUTPUT" >&5
48056    JVM_ARG_OK=false
48057  fi
48058
48059    if test "$JVM_ARG_OK" = true; then
48060      JVM_64BIT=true
48061      JVM_ARG_OK=false
48062    fi
48063  fi
48064
48065  if test "$JVM_64BIT" = true; then
48066    if test "$MEMORY_SIZE" -gt "17000"; then
48067
48068  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
48069  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
48070  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
48071  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48072  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48073  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48074    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
48075    JVM_ARG_OK=true
48076  else
48077    $ECHO "Arg failed:" >&5
48078    $ECHO "$OUTPUT" >&5
48079    JVM_ARG_OK=false
48080  fi
48081
48082    fi
48083    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
48084
48085  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
48086  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
48087  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
48088  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48089  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48090  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48091    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
48092    JVM_ARG_OK=true
48093  else
48094    $ECHO "Arg failed:" >&5
48095    $ECHO "$OUTPUT" >&5
48096    JVM_ARG_OK=false
48097  fi
48098
48099    fi
48100    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
48101
48102  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
48103  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
48104  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
48105  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48106  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48107  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48108    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
48109    JVM_ARG_OK=true
48110  else
48111    $ECHO "Arg failed:" >&5
48112    $ECHO "$OUTPUT" >&5
48113    JVM_ARG_OK=false
48114  fi
48115
48116    fi
48117    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
48118
48119  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
48120  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
48121  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
48122  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48123  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48124  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48125    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
48126    JVM_ARG_OK=true
48127  else
48128    $ECHO "Arg failed:" >&5
48129    $ECHO "$OUTPUT" >&5
48130    JVM_ARG_OK=false
48131  fi
48132
48133    fi
48134  fi
48135  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
48136
48137  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
48138  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
48139  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
48140  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48141  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48142  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48143    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
48144    JVM_ARG_OK=true
48145  else
48146    $ECHO "Arg failed:" >&5
48147    $ECHO "$OUTPUT" >&5
48148    JVM_ARG_OK=false
48149  fi
48150
48151  fi
48152  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
48153
48154  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
48155  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
48156  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
48157  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48158  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48159  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48160    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
48161    JVM_ARG_OK=true
48162  else
48163    $ECHO "Arg failed:" >&5
48164    $ECHO "$OUTPUT" >&5
48165    JVM_ARG_OK=false
48166  fi
48167
48168  fi
48169  if test "$JVM_ARG_OK" = false; then
48170
48171  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
48172  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
48173  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
48174  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
48175  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
48176  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
48177    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
48178    JVM_ARG_OK=true
48179  else
48180    $ECHO "Arg failed:" >&5
48181    $ECHO "$OUTPUT" >&5
48182    JVM_ARG_OK=false
48183  fi
48184
48185  fi
48186
48187  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
48188$as_echo_n "checking whether to use sjavac... " >&6; }
48189  # Check whether --enable-sjavac was given.
48190if test "${enable_sjavac+set}" = set; then :
48191  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
48192else
48193  ENABLE_SJAVAC='no'
48194fi
48195
48196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
48197$as_echo "$ENABLE_SJAVAC" >&6; }
48198
48199
48200  if test "x$ENABLE_SJAVAC" = xyes; then
48201    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
48202  else
48203    SJAVAC_SERVER_DIR=
48204  fi
48205
48206
48207
48208# Can the C/C++ compiler use precompiled headers?
48209
48210
48211  ###############################################################################
48212  #
48213  # Can the C/C++ compiler use precompiled headers?
48214  #
48215  # Check whether --enable-precompiled-headers was given.
48216if test "${enable_precompiled_headers+set}" = set; then :
48217  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
48218else
48219  ENABLE_PRECOMPH=yes
48220fi
48221
48222
48223  USE_PRECOMPILED_HEADER=1
48224  if test "x$ENABLE_PRECOMPH" = xno; then
48225    USE_PRECOMPILED_HEADER=0
48226  fi
48227
48228  if test "x$ENABLE_PRECOMPH" = xyes; then
48229    # Check that the compiler actually supports precomp headers.
48230    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48231      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
48232$as_echo_n "checking that precompiled headers work... " >&6; }
48233      echo "int alfa();" > conftest.h
48234      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
48235      if test ! -f conftest.hpp.gch; then
48236        USE_PRECOMPILED_HEADER=0
48237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48238$as_echo "no" >&6; }
48239      else
48240        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48241$as_echo "yes" >&6; }
48242      fi
48243      rm -f conftest.h conftest.hpp.gch
48244    fi
48245  fi
48246
48247
48248
48249
48250# Setup use of ccache, if available
48251
48252  # Check whether --enable-ccache was given.
48253if test "${enable_ccache+set}" = set; then :
48254  enableval=$enable_ccache;
48255fi
48256
48257
48258  CCACHE=
48259  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
48260$as_echo_n "checking is ccache enabled... " >&6; }
48261  ENABLE_CCACHE=$enable_ccache
48262  if test "x$enable_ccache" = xyes; then
48263    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48264$as_echo "yes" >&6; }
48265    OLD_PATH="$PATH"
48266    if test "x$TOOLS_DIR" != x; then
48267      PATH=$TOOLS_DIR:$PATH
48268    fi
48269
48270
48271
48272  # Publish this variable in the help.
48273
48274
48275  if test "x$CCACHE" = x; then
48276    # The variable is not set by user, try to locate tool using the code snippet
48277    for ac_prog in ccache
48278do
48279  # Extract the first word of "$ac_prog", so it can be a program name with args.
48280set dummy $ac_prog; ac_word=$2
48281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48282$as_echo_n "checking for $ac_word... " >&6; }
48283if ${ac_cv_path_CCACHE+:} false; then :
48284  $as_echo_n "(cached) " >&6
48285else
48286  case $CCACHE in
48287  [\\/]* | ?:[\\/]*)
48288  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48289  ;;
48290  *)
48291  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48292for as_dir in $PATH
48293do
48294  IFS=$as_save_IFS
48295  test -z "$as_dir" && as_dir=.
48296    for ac_exec_ext in '' $ac_executable_extensions; do
48297  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48298    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48299    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48300    break 2
48301  fi
48302done
48303  done
48304IFS=$as_save_IFS
48305
48306  ;;
48307esac
48308fi
48309CCACHE=$ac_cv_path_CCACHE
48310if test -n "$CCACHE"; then
48311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48312$as_echo "$CCACHE" >&6; }
48313else
48314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48315$as_echo "no" >&6; }
48316fi
48317
48318
48319  test -n "$CCACHE" && break
48320done
48321
48322  else
48323    # The variable is set, but is it from the command line or the environment?
48324
48325    # Try to remove the string !CCACHE! from our list.
48326    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
48327    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48328      # If it failed, the variable was not from the command line. Ignore it,
48329      # but warn the user (except for BASH, which is always set by the calling BASH).
48330      if test "xCCACHE" != xBASH; then
48331        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
48332$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
48333      fi
48334      # Try to locate tool using the code snippet
48335      for ac_prog in ccache
48336do
48337  # Extract the first word of "$ac_prog", so it can be a program name with args.
48338set dummy $ac_prog; ac_word=$2
48339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48340$as_echo_n "checking for $ac_word... " >&6; }
48341if ${ac_cv_path_CCACHE+:} false; then :
48342  $as_echo_n "(cached) " >&6
48343else
48344  case $CCACHE in
48345  [\\/]* | ?:[\\/]*)
48346  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48347  ;;
48348  *)
48349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48350for as_dir in $PATH
48351do
48352  IFS=$as_save_IFS
48353  test -z "$as_dir" && as_dir=.
48354    for ac_exec_ext in '' $ac_executable_extensions; do
48355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48356    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48358    break 2
48359  fi
48360done
48361  done
48362IFS=$as_save_IFS
48363
48364  ;;
48365esac
48366fi
48367CCACHE=$ac_cv_path_CCACHE
48368if test -n "$CCACHE"; then
48369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48370$as_echo "$CCACHE" >&6; }
48371else
48372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48373$as_echo "no" >&6; }
48374fi
48375
48376
48377  test -n "$CCACHE" && break
48378done
48379
48380    else
48381      # If it succeeded, then it was overridden by the user. We will use it
48382      # for the tool.
48383
48384      # First remove it from the list of overridden variables, so we can test
48385      # for unknown variables in the end.
48386      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48387
48388      # Check if the provided tool contains a complete path.
48389      tool_specified="$CCACHE"
48390      tool_basename="${tool_specified##*/}"
48391      if test "x$tool_basename" = "x$tool_specified"; then
48392        # A command without a complete path is provided, search $PATH.
48393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
48394$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
48395        # Extract the first word of "$tool_basename", so it can be a program name with args.
48396set dummy $tool_basename; ac_word=$2
48397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48398$as_echo_n "checking for $ac_word... " >&6; }
48399if ${ac_cv_path_CCACHE+:} false; then :
48400  $as_echo_n "(cached) " >&6
48401else
48402  case $CCACHE in
48403  [\\/]* | ?:[\\/]*)
48404  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
48405  ;;
48406  *)
48407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48408for as_dir in $PATH
48409do
48410  IFS=$as_save_IFS
48411  test -z "$as_dir" && as_dir=.
48412    for ac_exec_ext in '' $ac_executable_extensions; do
48413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48414    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
48415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48416    break 2
48417  fi
48418done
48419  done
48420IFS=$as_save_IFS
48421
48422  ;;
48423esac
48424fi
48425CCACHE=$ac_cv_path_CCACHE
48426if test -n "$CCACHE"; then
48427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
48428$as_echo "$CCACHE" >&6; }
48429else
48430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48431$as_echo "no" >&6; }
48432fi
48433
48434
48435        if test "x$CCACHE" = x; then
48436          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48437        fi
48438      else
48439        # Otherwise we believe it is a complete path. Use it as it is.
48440        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
48441$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
48442        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
48443$as_echo_n "checking for CCACHE... " >&6; }
48444        if test ! -x "$tool_specified"; then
48445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48446$as_echo "not found" >&6; }
48447          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
48448        fi
48449        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48450$as_echo "$tool_specified" >&6; }
48451      fi
48452    fi
48453  fi
48454
48455
48456
48457  if test "x$CCACHE" = x; then
48458    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
48459  fi
48460
48461
48462    CCACHE_STATUS="enabled"
48463    PATH="$OLD_PATH"
48464  elif test "x$enable_ccache" = xno; then
48465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
48466$as_echo "no, explicitly disabled" >&6; }
48467  elif test "x$enable_ccache" = x; then
48468    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48469$as_echo "no" >&6; }
48470  else
48471    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
48472$as_echo "unknown" >&6; }
48473    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
48474  fi
48475
48476
48477
48478# Check whether --with-ccache-dir was given.
48479if test "${with_ccache_dir+set}" = set; then :
48480  withval=$with_ccache_dir;
48481fi
48482
48483
48484  if test "x$with_ccache_dir" != x; then
48485    # When using a non home ccache directory, assume the use is to share ccache files
48486    # with other users. Thus change the umask.
48487    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
48488    if test "x$CCACHE" = x; then
48489      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
48490$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
48491    fi
48492  fi
48493
48494  if test "x$CCACHE" != x; then
48495
48496  if test "x$CCACHE" != x; then
48497    # Only use ccache if it is 3.1.4 or later, which supports
48498    # precompiled headers.
48499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
48500$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
48501    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
48502    if test "x$HAS_GOOD_CCACHE" = x; then
48503      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
48504$as_echo "no, disabling ccache" >&6; }
48505      CCACHE=
48506      CCACHE_STATUS="disabled"
48507    else
48508      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48509$as_echo "yes" >&6; }
48510      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
48511$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
48512      PUSHED_FLAGS="$CXXFLAGS"
48513      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
48514      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48515/* end confdefs.h.  */
48516
48517int
48518main ()
48519{
48520
48521  ;
48522  return 0;
48523}
48524_ACEOF
48525if ac_fn_cxx_try_compile "$LINENO"; then :
48526  CC_KNOWS_CCACHE_TRICK=yes
48527else
48528  CC_KNOWS_CCACHE_TRICK=no
48529fi
48530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48531      CXXFLAGS="$PUSHED_FLAGS"
48532      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
48533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48534$as_echo "yes" >&6; }
48535      else
48536        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
48537$as_echo "no, disabling ccaching of precompiled headers" >&6; }
48538        CCACHE=
48539        CCACHE_STATUS="disabled"
48540      fi
48541    fi
48542  fi
48543
48544  if test "x$CCACHE" != x; then
48545    CCACHE_SLOPPINESS=time_macros
48546    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
48547    CCACHE_FLAGS=-fpch-preprocess
48548
48549    if test "x$SET_CCACHE_DIR" != x; then
48550      mkdir -p $CCACHE_DIR > /dev/null 2>&1
48551      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
48552    fi
48553  fi
48554
48555  fi
48556
48557
48558###############################################################################
48559#
48560# And now the finish...
48561#
48562###############################################################################
48563
48564# Check for some common pitfalls
48565
48566  if test x"$OPENJDK_BUILD_OS" = xwindows; then
48567    file_to_test="$SRC_ROOT/LICENSE"
48568    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
48569      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
48570    fi
48571  fi
48572
48573
48574  # Did user specify any unknown variables?
48575
48576  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
48577    # Replace the separating ! with spaces before presenting for end user.
48578    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
48579    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
48580$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
48581  fi
48582
48583
48584  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
48585$as_echo_n "checking if build directory is on local disk... " >&6; }
48586
48587  # df -l lists only local disks; if the given directory is not found then
48588  # a non-zero exit code is given
48589  if test "x$DF" = x; then
48590    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48591      # msys does not have df; use Windows "net use" instead.
48592      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
48593      if test "x$IS_NETWORK_DISK" = x; then
48594        OUTPUT_DIR_IS_LOCAL="yes"
48595      else
48596        OUTPUT_DIR_IS_LOCAL="no"
48597      fi
48598    else
48599      # No df here, say it's local
48600      OUTPUT_DIR_IS_LOCAL="yes"
48601    fi
48602  else
48603    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
48604      OUTPUT_DIR_IS_LOCAL="yes"
48605    else
48606      OUTPUT_DIR_IS_LOCAL="no"
48607    fi
48608  fi
48609
48610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
48611$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
48612
48613
48614
48615  # Check if the user has any old-style ALT_ variables set.
48616  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
48617
48618  # Before generating output files, test if they exist. If they do, this is a reconfigure.
48619  # Since we can't properly handle the dependencies for this, warn the user about the situation
48620  if test -e $OUTPUT_ROOT/spec.gmk; then
48621    IS_RECONFIGURE=yes
48622  else
48623    IS_RECONFIGURE=no
48624  fi
48625
48626
48627# At the end, call the custom hook. (Dummy macro if no custom sources available)
48628
48629
48630# We're messing a bit with internal autoconf variables to put the config.status
48631# in the output directory instead of the current directory.
48632CONFIG_STATUS="$OUTPUT_ROOT/config.status"
48633
48634# Create the actual output files. Now the main work of configure is done.
48635cat >confcache <<\_ACEOF
48636# This file is a shell script that caches the results of configure
48637# tests run on this system so they can be shared between configure
48638# scripts and configure runs, see configure's option --config-cache.
48639# It is not useful on other systems.  If it contains results you don't
48640# want to keep, you may remove or edit it.
48641#
48642# config.status only pays attention to the cache file if you give it
48643# the --recheck option to rerun configure.
48644#
48645# `ac_cv_env_foo' variables (set or unset) will be overridden when
48646# loading this file, other *unset* `ac_cv_foo' will be assigned the
48647# following values.
48648
48649_ACEOF
48650
48651# The following way of writing the cache mishandles newlines in values,
48652# but we know of no workaround that is simple, portable, and efficient.
48653# So, we kill variables containing newlines.
48654# Ultrix sh set writes to stderr and can't be redirected directly,
48655# and sets the high bit in the cache file unless we assign to the vars.
48656(
48657  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
48658    eval ac_val=\$$ac_var
48659    case $ac_val in #(
48660    *${as_nl}*)
48661      case $ac_var in #(
48662      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
48663$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
48664      esac
48665      case $ac_var in #(
48666      _ | IFS | as_nl) ;; #(
48667      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
48668      *) { eval $ac_var=; unset $ac_var;} ;;
48669      esac ;;
48670    esac
48671  done
48672
48673  (set) 2>&1 |
48674    case $as_nl`(ac_space=' '; set) 2>&1` in #(
48675    *${as_nl}ac_space=\ *)
48676      # `set' does not quote correctly, so add quotes: double-quote
48677      # substitution turns \\\\ into \\, and sed turns \\ into \.
48678      sed -n \
48679	"s/'/'\\\\''/g;
48680	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
48681      ;; #(
48682    *)
48683      # `set' quotes correctly as required by POSIX, so do not add quotes.
48684      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
48685      ;;
48686    esac |
48687    sort
48688) |
48689  sed '
48690     /^ac_cv_env_/b end
48691     t clear
48692     :clear
48693     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
48694     t end
48695     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
48696     :end' >>confcache
48697if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
48698  if test -w "$cache_file"; then
48699    if test "x$cache_file" != "x/dev/null"; then
48700      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
48701$as_echo "$as_me: updating cache $cache_file" >&6;}
48702      if test ! -f "$cache_file" || test -h "$cache_file"; then
48703	cat confcache >"$cache_file"
48704      else
48705        case $cache_file in #(
48706        */* | ?:*)
48707	  mv -f confcache "$cache_file"$$ &&
48708	  mv -f "$cache_file"$$ "$cache_file" ;; #(
48709        *)
48710	  mv -f confcache "$cache_file" ;;
48711	esac
48712      fi
48713    fi
48714  else
48715    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
48716$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
48717  fi
48718fi
48719rm -f confcache
48720
48721test "x$prefix" = xNONE && prefix=$ac_default_prefix
48722# Let make expand exec_prefix.
48723test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
48724
48725DEFS=-DHAVE_CONFIG_H
48726
48727ac_libobjs=
48728ac_ltlibobjs=
48729U=
48730for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
48731  # 1. Remove the extension, and $U if already installed.
48732  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
48733  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
48734  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
48735  #    will be set to the directory where LIBOBJS objects are built.
48736  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
48737  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
48738done
48739LIBOBJS=$ac_libobjs
48740
48741LTLIBOBJS=$ac_ltlibobjs
48742
48743
48744
48745: "${CONFIG_STATUS=./config.status}"
48746ac_write_fail=0
48747ac_clean_files_save=$ac_clean_files
48748ac_clean_files="$ac_clean_files $CONFIG_STATUS"
48749{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
48750$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
48751as_write_fail=0
48752cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
48753#! $SHELL
48754# Generated by $as_me.
48755# Run this file to recreate the current configuration.
48756# Compiler output produced by configure, useful for debugging
48757# configure, is in config.log if it exists.
48758
48759debug=false
48760ac_cs_recheck=false
48761ac_cs_silent=false
48762
48763SHELL=\${CONFIG_SHELL-$SHELL}
48764export SHELL
48765_ASEOF
48766cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
48767## -------------------- ##
48768## M4sh Initialization. ##
48769## -------------------- ##
48770
48771# Be more Bourne compatible
48772DUALCASE=1; export DUALCASE # for MKS sh
48773if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
48774  emulate sh
48775  NULLCMD=:
48776  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
48777  # is contrary to our usage.  Disable this feature.
48778  alias -g '${1+"$@"}'='"$@"'
48779  setopt NO_GLOB_SUBST
48780else
48781  case `(set -o) 2>/dev/null` in #(
48782  *posix*) :
48783    set -o posix ;; #(
48784  *) :
48785     ;;
48786esac
48787fi
48788
48789
48790as_nl='
48791'
48792export as_nl
48793# Printing a long string crashes Solaris 7 /usr/bin/printf.
48794as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
48795as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48796as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
48797# Prefer a ksh shell builtin over an external printf program on Solaris,
48798# but without wasting forks for bash or zsh.
48799if test -z "$BASH_VERSION$ZSH_VERSION" \
48800    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48801  as_echo='print -r --'
48802  as_echo_n='print -rn --'
48803elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
48804  as_echo='printf %s\n'
48805  as_echo_n='printf %s'
48806else
48807  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
48808    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
48809    as_echo_n='/usr/ucb/echo -n'
48810  else
48811    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
48812    as_echo_n_body='eval
48813      arg=$1;
48814      case $arg in #(
48815      *"$as_nl"*)
48816	expr "X$arg" : "X\\(.*\\)$as_nl";
48817	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
48818      esac;
48819      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
48820    '
48821    export as_echo_n_body
48822    as_echo_n='sh -c $as_echo_n_body as_echo'
48823  fi
48824  export as_echo_body
48825  as_echo='sh -c $as_echo_body as_echo'
48826fi
48827
48828# The user is always right.
48829if test "${PATH_SEPARATOR+set}" != set; then
48830  PATH_SEPARATOR=:
48831  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
48832    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
48833      PATH_SEPARATOR=';'
48834  }
48835fi
48836
48837
48838# IFS
48839# We need space, tab and new line, in precisely that order.  Quoting is
48840# there to prevent editors from complaining about space-tab.
48841# (If _AS_PATH_WALK were called with IFS unset, it would disable word
48842# splitting by setting IFS to empty value.)
48843IFS=" ""	$as_nl"
48844
48845# Find who we are.  Look in the path if we contain no directory separator.
48846as_myself=
48847case $0 in #((
48848  *[\\/]* ) as_myself=$0 ;;
48849  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48850for as_dir in $PATH
48851do
48852  IFS=$as_save_IFS
48853  test -z "$as_dir" && as_dir=.
48854    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
48855  done
48856IFS=$as_save_IFS
48857
48858     ;;
48859esac
48860# We did not find ourselves, most probably we were run as `sh COMMAND'
48861# in which case we are not to be found in the path.
48862if test "x$as_myself" = x; then
48863  as_myself=$0
48864fi
48865if test ! -f "$as_myself"; then
48866  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
48867  exit 1
48868fi
48869
48870# Unset variables that we do not need and which cause bugs (e.g. in
48871# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
48872# suppresses any "Segmentation fault" message there.  '((' could
48873# trigger a bug in pdksh 5.2.14.
48874for as_var in BASH_ENV ENV MAIL MAILPATH
48875do eval test x\${$as_var+set} = xset \
48876  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
48877done
48878PS1='$ '
48879PS2='> '
48880PS4='+ '
48881
48882# NLS nuisances.
48883LC_ALL=C
48884export LC_ALL
48885LANGUAGE=C
48886export LANGUAGE
48887
48888# CDPATH.
48889(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
48890
48891
48892# as_fn_error STATUS ERROR [LINENO LOG_FD]
48893# ----------------------------------------
48894# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
48895# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
48896# script with STATUS, using 1 if that was 0.
48897as_fn_error ()
48898{
48899  as_status=$1; test $as_status -eq 0 && as_status=1
48900  if test "$4"; then
48901    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
48902    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
48903  fi
48904  $as_echo "$as_me: error: $2" >&2
48905  as_fn_exit $as_status
48906} # as_fn_error
48907
48908
48909# as_fn_set_status STATUS
48910# -----------------------
48911# Set $? to STATUS, without forking.
48912as_fn_set_status ()
48913{
48914  return $1
48915} # as_fn_set_status
48916
48917# as_fn_exit STATUS
48918# -----------------
48919# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
48920as_fn_exit ()
48921{
48922  set +e
48923  as_fn_set_status $1
48924  exit $1
48925} # as_fn_exit
48926
48927# as_fn_unset VAR
48928# ---------------
48929# Portably unset VAR.
48930as_fn_unset ()
48931{
48932  { eval $1=; unset $1;}
48933}
48934as_unset=as_fn_unset
48935# as_fn_append VAR VALUE
48936# ----------------------
48937# Append the text in VALUE to the end of the definition contained in VAR. Take
48938# advantage of any shell optimizations that allow amortized linear growth over
48939# repeated appends, instead of the typical quadratic growth present in naive
48940# implementations.
48941if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
48942  eval 'as_fn_append ()
48943  {
48944    eval $1+=\$2
48945  }'
48946else
48947  as_fn_append ()
48948  {
48949    eval $1=\$$1\$2
48950  }
48951fi # as_fn_append
48952
48953# as_fn_arith ARG...
48954# ------------------
48955# Perform arithmetic evaluation on the ARGs, and store the result in the
48956# global $as_val. Take advantage of shells that can avoid forks. The arguments
48957# must be portable across $(()) and expr.
48958if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
48959  eval 'as_fn_arith ()
48960  {
48961    as_val=$(( $* ))
48962  }'
48963else
48964  as_fn_arith ()
48965  {
48966    as_val=`expr "$@" || test $? -eq 1`
48967  }
48968fi # as_fn_arith
48969
48970
48971if expr a : '\(a\)' >/dev/null 2>&1 &&
48972   test "X`expr 00001 : '.*\(...\)'`" = X001; then
48973  as_expr=expr
48974else
48975  as_expr=false
48976fi
48977
48978if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
48979  as_basename=basename
48980else
48981  as_basename=false
48982fi
48983
48984if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
48985  as_dirname=dirname
48986else
48987  as_dirname=false
48988fi
48989
48990as_me=`$as_basename -- "$0" ||
48991$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
48992	 X"$0" : 'X\(//\)$' \| \
48993	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
48994$as_echo X/"$0" |
48995    sed '/^.*\/\([^/][^/]*\)\/*$/{
48996	    s//\1/
48997	    q
48998	  }
48999	  /^X\/\(\/\/\)$/{
49000	    s//\1/
49001	    q
49002	  }
49003	  /^X\/\(\/\).*/{
49004	    s//\1/
49005	    q
49006	  }
49007	  s/.*/./; q'`
49008
49009# Avoid depending upon Character Ranges.
49010as_cr_letters='abcdefghijklmnopqrstuvwxyz'
49011as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
49012as_cr_Letters=$as_cr_letters$as_cr_LETTERS
49013as_cr_digits='0123456789'
49014as_cr_alnum=$as_cr_Letters$as_cr_digits
49015
49016ECHO_C= ECHO_N= ECHO_T=
49017case `echo -n x` in #(((((
49018-n*)
49019  case `echo 'xy\c'` in
49020  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
49021  xy)  ECHO_C='\c';;
49022  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
49023       ECHO_T='	';;
49024  esac;;
49025*)
49026  ECHO_N='-n';;
49027esac
49028
49029rm -f conf$$ conf$$.exe conf$$.file
49030if test -d conf$$.dir; then
49031  rm -f conf$$.dir/conf$$.file
49032else
49033  rm -f conf$$.dir
49034  mkdir conf$$.dir 2>/dev/null
49035fi
49036if (echo >conf$$.file) 2>/dev/null; then
49037  if ln -s conf$$.file conf$$ 2>/dev/null; then
49038    as_ln_s='ln -s'
49039    # ... but there are two gotchas:
49040    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
49041    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
49042    # In both cases, we have to default to `cp -pR'.
49043    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
49044      as_ln_s='cp -pR'
49045  elif ln conf$$.file conf$$ 2>/dev/null; then
49046    as_ln_s=ln
49047  else
49048    as_ln_s='cp -pR'
49049  fi
49050else
49051  as_ln_s='cp -pR'
49052fi
49053rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
49054rmdir conf$$.dir 2>/dev/null
49055
49056
49057# as_fn_mkdir_p
49058# -------------
49059# Create "$as_dir" as a directory, including parents if necessary.
49060as_fn_mkdir_p ()
49061{
49062
49063  case $as_dir in #(
49064  -*) as_dir=./$as_dir;;
49065  esac
49066  test -d "$as_dir" || eval $as_mkdir_p || {
49067    as_dirs=
49068    while :; do
49069      case $as_dir in #(
49070      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
49071      *) as_qdir=$as_dir;;
49072      esac
49073      as_dirs="'$as_qdir' $as_dirs"
49074      as_dir=`$as_dirname -- "$as_dir" ||
49075$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49076	 X"$as_dir" : 'X\(//\)[^/]' \| \
49077	 X"$as_dir" : 'X\(//\)$' \| \
49078	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
49079$as_echo X"$as_dir" |
49080    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49081	    s//\1/
49082	    q
49083	  }
49084	  /^X\(\/\/\)[^/].*/{
49085	    s//\1/
49086	    q
49087	  }
49088	  /^X\(\/\/\)$/{
49089	    s//\1/
49090	    q
49091	  }
49092	  /^X\(\/\).*/{
49093	    s//\1/
49094	    q
49095	  }
49096	  s/.*/./; q'`
49097      test -d "$as_dir" && break
49098    done
49099    test -z "$as_dirs" || eval "mkdir $as_dirs"
49100  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
49101
49102
49103} # as_fn_mkdir_p
49104if mkdir -p . 2>/dev/null; then
49105  as_mkdir_p='mkdir -p "$as_dir"'
49106else
49107  test -d ./-p && rmdir ./-p
49108  as_mkdir_p=false
49109fi
49110
49111
49112# as_fn_executable_p FILE
49113# -----------------------
49114# Test if FILE is an executable regular file.
49115as_fn_executable_p ()
49116{
49117  test -f "$1" && test -x "$1"
49118} # as_fn_executable_p
49119as_test_x='test -x'
49120as_executable_p=as_fn_executable_p
49121
49122# Sed expression to map a string onto a valid CPP name.
49123as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
49124
49125# Sed expression to map a string onto a valid variable name.
49126as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
49127
49128
49129exec 6>&1
49130## ----------------------------------- ##
49131## Main body of $CONFIG_STATUS script. ##
49132## ----------------------------------- ##
49133_ASEOF
49134test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
49135
49136cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49137# Save the log message, to keep $0 and so on meaningful, and to
49138# report actual input values of CONFIG_FILES etc. instead of their
49139# values after options handling.
49140ac_log="
49141This file was extended by OpenJDK $as_me jdk8, which was
49142generated by GNU Autoconf 2.69.  Invocation command line was
49143
49144  CONFIG_FILES    = $CONFIG_FILES
49145  CONFIG_HEADERS  = $CONFIG_HEADERS
49146  CONFIG_LINKS    = $CONFIG_LINKS
49147  CONFIG_COMMANDS = $CONFIG_COMMANDS
49148  $ $0 $@
49149
49150on `(hostname || uname -n) 2>/dev/null | sed 1q`
49151"
49152
49153_ACEOF
49154
49155case $ac_config_files in *"
49156"*) set x $ac_config_files; shift; ac_config_files=$*;;
49157esac
49158
49159case $ac_config_headers in *"
49160"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
49161esac
49162
49163
49164cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49165# Files that config.status was made for.
49166config_files="$ac_config_files"
49167config_headers="$ac_config_headers"
49168
49169_ACEOF
49170
49171cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49172ac_cs_usage="\
49173\`$as_me' instantiates files and other configuration actions
49174from templates according to the current configuration.  Unless the files
49175and actions are specified as TAGs, all are instantiated by default.
49176
49177Usage: $0 [OPTION]... [TAG]...
49178
49179  -h, --help       print this help, then exit
49180  -V, --version    print version number and configuration settings, then exit
49181      --config     print configuration, then exit
49182  -q, --quiet, --silent
49183                   do not print progress messages
49184  -d, --debug      don't remove temporary files
49185      --recheck    update $as_me by reconfiguring in the same conditions
49186      --file=FILE[:TEMPLATE]
49187                   instantiate the configuration file FILE
49188      --header=FILE[:TEMPLATE]
49189                   instantiate the configuration header FILE
49190
49191Configuration files:
49192$config_files
49193
49194Configuration headers:
49195$config_headers
49196
49197Report bugs to <build-dev@openjdk.java.net>.
49198OpenJDK home page: <http://openjdk.java.net>."
49199
49200_ACEOF
49201cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49202ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
49203ac_cs_version="\\
49204OpenJDK config.status jdk8
49205configured by $0, generated by GNU Autoconf 2.69,
49206  with options \\"\$ac_cs_config\\"
49207
49208Copyright (C) 2012 Free Software Foundation, Inc.
49209This config.status script is free software; the Free Software Foundation
49210gives unlimited permission to copy, distribute and modify it."
49211
49212ac_pwd='$ac_pwd'
49213srcdir='$srcdir'
49214AWK='$AWK'
49215test -n "\$AWK" || AWK=awk
49216_ACEOF
49217
49218cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49219# The default lists apply if the user does not specify any file.
49220ac_need_defaults=:
49221while test $# != 0
49222do
49223  case $1 in
49224  --*=?*)
49225    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49226    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
49227    ac_shift=:
49228    ;;
49229  --*=)
49230    ac_option=`expr "X$1" : 'X\([^=]*\)='`
49231    ac_optarg=
49232    ac_shift=:
49233    ;;
49234  *)
49235    ac_option=$1
49236    ac_optarg=$2
49237    ac_shift=shift
49238    ;;
49239  esac
49240
49241  case $ac_option in
49242  # Handling of the options.
49243  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49244    ac_cs_recheck=: ;;
49245  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
49246    $as_echo "$ac_cs_version"; exit ;;
49247  --config | --confi | --conf | --con | --co | --c )
49248    $as_echo "$ac_cs_config"; exit ;;
49249  --debug | --debu | --deb | --de | --d | -d )
49250    debug=: ;;
49251  --file | --fil | --fi | --f )
49252    $ac_shift
49253    case $ac_optarg in
49254    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49255    '') as_fn_error $? "missing file argument" ;;
49256    esac
49257    as_fn_append CONFIG_FILES " '$ac_optarg'"
49258    ac_need_defaults=false;;
49259  --header | --heade | --head | --hea )
49260    $ac_shift
49261    case $ac_optarg in
49262    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
49263    esac
49264    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
49265    ac_need_defaults=false;;
49266  --he | --h)
49267    # Conflict between --help and --header
49268    as_fn_error $? "ambiguous option: \`$1'
49269Try \`$0 --help' for more information.";;
49270  --help | --hel | -h )
49271    $as_echo "$ac_cs_usage"; exit ;;
49272  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
49273  | -silent | --silent | --silen | --sile | --sil | --si | --s)
49274    ac_cs_silent=: ;;
49275
49276  # This is an error.
49277  -*) as_fn_error $? "unrecognized option: \`$1'
49278Try \`$0 --help' for more information." ;;
49279
49280  *) as_fn_append ac_config_targets " $1"
49281     ac_need_defaults=false ;;
49282
49283  esac
49284  shift
49285done
49286
49287ac_configure_extra_args=
49288
49289if $ac_cs_silent; then
49290  exec 6>/dev/null
49291  ac_configure_extra_args="$ac_configure_extra_args --silent"
49292fi
49293
49294_ACEOF
49295cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49296if \$ac_cs_recheck; then
49297  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
49298  shift
49299  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
49300  CONFIG_SHELL='$SHELL'
49301  export CONFIG_SHELL
49302  exec "\$@"
49303fi
49304
49305_ACEOF
49306cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49307exec 5>>config.log
49308{
49309  echo
49310  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
49311## Running $as_me. ##
49312_ASBOX
49313  $as_echo "$ac_log"
49314} >&5
49315
49316_ACEOF
49317cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49318_ACEOF
49319
49320cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49321
49322# Handling of arguments.
49323for ac_config_target in $ac_config_targets
49324do
49325  case $ac_config_target in
49326    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
49327    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
49328    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
49329    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
49330    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
49331    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
49332    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
49333
49334  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
49335  esac
49336done
49337
49338
49339# If the user did not use the arguments to specify the items to instantiate,
49340# then the envvar interface is used.  Set only those that are not.
49341# We use the long form for the default assignment because of an extremely
49342# bizarre bug on SunOS 4.1.3.
49343if $ac_need_defaults; then
49344  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49345  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49346fi
49347
49348# Have a temporary directory for convenience.  Make it in the build tree
49349# simply because there is no reason against having it here, and in addition,
49350# creating and moving files from /tmp can sometimes cause problems.
49351# Hook for its removal unless debugging.
49352# Note that there is a small window in which the directory will not be cleaned:
49353# after its creation but before its name has been assigned to `$tmp'.
49354$debug ||
49355{
49356  tmp= ac_tmp=
49357  trap 'exit_status=$?
49358  : "${ac_tmp:=$tmp}"
49359  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
49360' 0
49361  trap 'as_fn_exit 1' 1 2 13 15
49362}
49363# Create a (secure) tmp directory for tmp files.
49364
49365{
49366  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
49367  test -d "$tmp"
49368}  ||
49369{
49370  tmp=./conf$$-$RANDOM
49371  (umask 077 && mkdir "$tmp")
49372} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
49373ac_tmp=$tmp
49374
49375# Set up the scripts for CONFIG_FILES section.
49376# No need to generate them if there are no CONFIG_FILES.
49377# This happens for instance with `./config.status config.h'.
49378if test -n "$CONFIG_FILES"; then
49379
49380
49381ac_cr=`echo X | tr X '\015'`
49382# On cygwin, bash can eat \r inside `` if the user requested igncr.
49383# But we know of no other shell where ac_cr would be empty at this
49384# point, so we can use a bashism as a fallback.
49385if test "x$ac_cr" = x; then
49386  eval ac_cr=\$\'\\r\'
49387fi
49388ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
49389if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
49390  ac_cs_awk_cr='\\r'
49391else
49392  ac_cs_awk_cr=$ac_cr
49393fi
49394
49395echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
49396_ACEOF
49397
49398
49399{
49400  echo "cat >conf$$subs.awk <<_ACEOF" &&
49401  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
49402  echo "_ACEOF"
49403} >conf$$subs.sh ||
49404  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49405ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
49406ac_delim='%!_!# '
49407for ac_last_try in false false false false false :; do
49408  . ./conf$$subs.sh ||
49409    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49410
49411  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
49412  if test $ac_delim_n = $ac_delim_num; then
49413    break
49414  elif $ac_last_try; then
49415    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
49416  else
49417    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49418  fi
49419done
49420rm -f conf$$subs.sh
49421
49422cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49423cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
49424_ACEOF
49425sed -n '
49426h
49427s/^/S["/; s/!.*/"]=/
49428p
49429g
49430s/^[^!]*!//
49431:repl
49432t repl
49433s/'"$ac_delim"'$//
49434t delim
49435:nl
49436h
49437s/\(.\{148\}\)..*/\1/
49438t more1
49439s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
49440p
49441n
49442b repl
49443:more1
49444s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49445p
49446g
49447s/.\{148\}//
49448t nl
49449:delim
49450h
49451s/\(.\{148\}\)..*/\1/
49452t more2
49453s/["\\]/\\&/g; s/^/"/; s/$/"/
49454p
49455b
49456:more2
49457s/["\\]/\\&/g; s/^/"/; s/$/"\\/
49458p
49459g
49460s/.\{148\}//
49461t delim
49462' <conf$$subs.awk | sed '
49463/^[^""]/{
49464  N
49465  s/\n//
49466}
49467' >>$CONFIG_STATUS || ac_write_fail=1
49468rm -f conf$$subs.awk
49469cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49470_ACAWK
49471cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
49472  for (key in S) S_is_set[key] = 1
49473  FS = ""
49474
49475}
49476{
49477  line = $ 0
49478  nfields = split(line, field, "@")
49479  substed = 0
49480  len = length(field[1])
49481  for (i = 2; i < nfields; i++) {
49482    key = field[i]
49483    keylen = length(key)
49484    if (S_is_set[key]) {
49485      value = S[key]
49486      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
49487      len += length(value) + length(field[++i])
49488      substed = 1
49489    } else
49490      len += 1 + keylen
49491  }
49492
49493  print line
49494}
49495
49496_ACAWK
49497_ACEOF
49498cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49499if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
49500  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
49501else
49502  cat
49503fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
49504  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
49505_ACEOF
49506
49507# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
49508# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
49509# trailing colons and then remove the whole line if VPATH becomes empty
49510# (actually we leave an empty line to preserve line numbers).
49511if test "x$srcdir" = x.; then
49512  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
49513h
49514s///
49515s/^/:/
49516s/[	 ]*$/:/
49517s/:\$(srcdir):/:/g
49518s/:\${srcdir}:/:/g
49519s/:@srcdir@:/:/g
49520s/^:*//
49521s/:*$//
49522x
49523s/\(=[	 ]*\).*/\1/
49524G
49525s/\n//
49526s/^[^=]*=[	 ]*$//
49527}'
49528fi
49529
49530cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49531fi # test -n "$CONFIG_FILES"
49532
49533# Set up the scripts for CONFIG_HEADERS section.
49534# No need to generate them if there are no CONFIG_HEADERS.
49535# This happens for instance with `./config.status Makefile'.
49536if test -n "$CONFIG_HEADERS"; then
49537cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
49538BEGIN {
49539_ACEOF
49540
49541# Transform confdefs.h into an awk script `defines.awk', embedded as
49542# here-document in config.status, that substitutes the proper values into
49543# config.h.in to produce config.h.
49544
49545# Create a delimiter string that does not exist in confdefs.h, to ease
49546# handling of long lines.
49547ac_delim='%!_!# '
49548for ac_last_try in false false :; do
49549  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
49550  if test -z "$ac_tt"; then
49551    break
49552  elif $ac_last_try; then
49553    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
49554  else
49555    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
49556  fi
49557done
49558
49559# For the awk script, D is an array of macro values keyed by name,
49560# likewise P contains macro parameters if any.  Preserve backslash
49561# newline sequences.
49562
49563ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
49564sed -n '
49565s/.\{148\}/&'"$ac_delim"'/g
49566t rset
49567:rset
49568s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
49569t def
49570d
49571:def
49572s/\\$//
49573t bsnl
49574s/["\\]/\\&/g
49575s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49576D["\1"]=" \3"/p
49577s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
49578d
49579:bsnl
49580s/["\\]/\\&/g
49581s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
49582D["\1"]=" \3\\\\\\n"\\/p
49583t cont
49584s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
49585t cont
49586d
49587:cont
49588n
49589s/.\{148\}/&'"$ac_delim"'/g
49590t clear
49591:clear
49592s/\\$//
49593t bsnlc
49594s/["\\]/\\&/g; s/^/"/; s/$/"/p
49595d
49596:bsnlc
49597s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
49598b cont
49599' <confdefs.h | sed '
49600s/'"$ac_delim"'/"\\\
49601"/g' >>$CONFIG_STATUS || ac_write_fail=1
49602
49603cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49604  for (key in D) D_is_set[key] = 1
49605  FS = ""
49606}
49607/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
49608  line = \$ 0
49609  split(line, arg, " ")
49610  if (arg[1] == "#") {
49611    defundef = arg[2]
49612    mac1 = arg[3]
49613  } else {
49614    defundef = substr(arg[1], 2)
49615    mac1 = arg[2]
49616  }
49617  split(mac1, mac2, "(") #)
49618  macro = mac2[1]
49619  prefix = substr(line, 1, index(line, defundef) - 1)
49620  if (D_is_set[macro]) {
49621    # Preserve the white space surrounding the "#".
49622    print prefix "define", macro P[macro] D[macro]
49623    next
49624  } else {
49625    # Replace #undef with comments.  This is necessary, for example,
49626    # in the case of _POSIX_SOURCE, which is predefined and required
49627    # on some systems where configure will not decide to define it.
49628    if (defundef == "undef") {
49629      print "/*", prefix defundef, macro, "*/"
49630      next
49631    }
49632  }
49633}
49634{ print }
49635_ACAWK
49636_ACEOF
49637cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49638  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
49639fi # test -n "$CONFIG_HEADERS"
49640
49641
49642eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
49643shift
49644for ac_tag
49645do
49646  case $ac_tag in
49647  :[FHLC]) ac_mode=$ac_tag; continue;;
49648  esac
49649  case $ac_mode$ac_tag in
49650  :[FHL]*:*);;
49651  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
49652  :[FH]-) ac_tag=-:-;;
49653  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
49654  esac
49655  ac_save_IFS=$IFS
49656  IFS=:
49657  set x $ac_tag
49658  IFS=$ac_save_IFS
49659  shift
49660  ac_file=$1
49661  shift
49662
49663  case $ac_mode in
49664  :L) ac_source=$1;;
49665  :[FH])
49666    ac_file_inputs=
49667    for ac_f
49668    do
49669      case $ac_f in
49670      -) ac_f="$ac_tmp/stdin";;
49671      *) # Look for the file first in the build tree, then in the source tree
49672	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
49673	 # because $ac_f cannot contain `:'.
49674	 test -f "$ac_f" ||
49675	   case $ac_f in
49676	   [\\/$]*) false;;
49677	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
49678	   esac ||
49679	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
49680      esac
49681      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
49682      as_fn_append ac_file_inputs " '$ac_f'"
49683    done
49684
49685    # Let's still pretend it is `configure' which instantiates (i.e., don't
49686    # use $as_me), people would be surprised to read:
49687    #    /* config.h.  Generated by config.status.  */
49688    configure_input='Generated from '`
49689	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
49690	`' by configure.'
49691    if test x"$ac_file" != x-; then
49692      configure_input="$ac_file.  $configure_input"
49693      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
49694$as_echo "$as_me: creating $ac_file" >&6;}
49695    fi
49696    # Neutralize special characters interpreted by sed in replacement strings.
49697    case $configure_input in #(
49698    *\&* | *\|* | *\\* )
49699       ac_sed_conf_input=`$as_echo "$configure_input" |
49700       sed 's/[\\\\&|]/\\\\&/g'`;; #(
49701    *) ac_sed_conf_input=$configure_input;;
49702    esac
49703
49704    case $ac_tag in
49705    *:-:* | *:-) cat >"$ac_tmp/stdin" \
49706      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
49707    esac
49708    ;;
49709  esac
49710
49711  ac_dir=`$as_dirname -- "$ac_file" ||
49712$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49713	 X"$ac_file" : 'X\(//\)[^/]' \| \
49714	 X"$ac_file" : 'X\(//\)$' \| \
49715	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
49716$as_echo X"$ac_file" |
49717    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
49718	    s//\1/
49719	    q
49720	  }
49721	  /^X\(\/\/\)[^/].*/{
49722	    s//\1/
49723	    q
49724	  }
49725	  /^X\(\/\/\)$/{
49726	    s//\1/
49727	    q
49728	  }
49729	  /^X\(\/\).*/{
49730	    s//\1/
49731	    q
49732	  }
49733	  s/.*/./; q'`
49734  as_dir="$ac_dir"; as_fn_mkdir_p
49735  ac_builddir=.
49736
49737case "$ac_dir" in
49738.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
49739*)
49740  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
49741  # A ".." for each directory in $ac_dir_suffix.
49742  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
49743  case $ac_top_builddir_sub in
49744  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
49745  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
49746  esac ;;
49747esac
49748ac_abs_top_builddir=$ac_pwd
49749ac_abs_builddir=$ac_pwd$ac_dir_suffix
49750# for backward compatibility:
49751ac_top_builddir=$ac_top_build_prefix
49752
49753case $srcdir in
49754  .)  # We are building in place.
49755    ac_srcdir=.
49756    ac_top_srcdir=$ac_top_builddir_sub
49757    ac_abs_top_srcdir=$ac_pwd ;;
49758  [\\/]* | ?:[\\/]* )  # Absolute name.
49759    ac_srcdir=$srcdir$ac_dir_suffix;
49760    ac_top_srcdir=$srcdir
49761    ac_abs_top_srcdir=$srcdir ;;
49762  *) # Relative name.
49763    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
49764    ac_top_srcdir=$ac_top_build_prefix$srcdir
49765    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
49766esac
49767ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
49768
49769
49770  case $ac_mode in
49771  :F)
49772  #
49773  # CONFIG_FILE
49774  #
49775
49776_ACEOF
49777
49778cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49779# If the template does not know about datarootdir, expand it.
49780# FIXME: This hack should be removed a few years after 2.60.
49781ac_datarootdir_hack=; ac_datarootdir_seen=
49782ac_sed_dataroot='
49783/datarootdir/ {
49784  p
49785  q
49786}
49787/@datadir@/p
49788/@docdir@/p
49789/@infodir@/p
49790/@localedir@/p
49791/@mandir@/p'
49792case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
49793*datarootdir*) ac_datarootdir_seen=yes;;
49794*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
49795  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
49796$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
49797_ACEOF
49798cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49799  ac_datarootdir_hack='
49800  s&@datadir@&$datadir&g
49801  s&@docdir@&$docdir&g
49802  s&@infodir@&$infodir&g
49803  s&@localedir@&$localedir&g
49804  s&@mandir@&$mandir&g
49805  s&\\\${datarootdir}&$datarootdir&g' ;;
49806esac
49807_ACEOF
49808
49809# Neutralize VPATH when `$srcdir' = `.'.
49810# Shell code in configure.ac might set extrasub.
49811# FIXME: do we really want to maintain this feature?
49812cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
49813ac_sed_extra="$ac_vpsub
49814$extrasub
49815_ACEOF
49816cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
49817:t
49818/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49819s|@configure_input@|$ac_sed_conf_input|;t t
49820s&@top_builddir@&$ac_top_builddir_sub&;t t
49821s&@top_build_prefix@&$ac_top_build_prefix&;t t
49822s&@srcdir@&$ac_srcdir&;t t
49823s&@abs_srcdir@&$ac_abs_srcdir&;t t
49824s&@top_srcdir@&$ac_top_srcdir&;t t
49825s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
49826s&@builddir@&$ac_builddir&;t t
49827s&@abs_builddir@&$ac_abs_builddir&;t t
49828s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
49829$ac_datarootdir_hack
49830"
49831eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
49832  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49833
49834test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
49835  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
49836  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
49837      "$ac_tmp/out"`; test -z "$ac_out"; } &&
49838  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49839which seems to be undefined.  Please make sure it is defined" >&5
49840$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
49841which seems to be undefined.  Please make sure it is defined" >&2;}
49842
49843  rm -f "$ac_tmp/stdin"
49844  case $ac_file in
49845  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
49846  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
49847  esac \
49848  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49849 ;;
49850  :H)
49851  #
49852  # CONFIG_HEADER
49853  #
49854  if test x"$ac_file" != x-; then
49855    {
49856      $as_echo "/* $configure_input  */" \
49857      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
49858    } >"$ac_tmp/config.h" \
49859      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
49860    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
49861      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
49862$as_echo "$as_me: $ac_file is unchanged" >&6;}
49863    else
49864      rm -f "$ac_file"
49865      mv "$ac_tmp/config.h" "$ac_file" \
49866	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
49867    fi
49868  else
49869    $as_echo "/* $configure_input  */" \
49870      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
49871      || as_fn_error $? "could not create -" "$LINENO" 5
49872  fi
49873 ;;
49874
49875
49876  esac
49877
49878done # for ac_tag
49879
49880
49881as_fn_exit 0
49882_ACEOF
49883ac_clean_files=$ac_clean_files_save
49884
49885test $ac_write_fail = 0 ||
49886  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
49887
49888
49889# configure is writing to config.log, and then calls config.status.
49890# config.status does its own redirection, appending to config.log.
49891# Unfortunately, on DOS this fails, as config.log is still kept open
49892# by configure, so config.status won't be able to write to it; its
49893# output is simply discarded.  So we exec the FD to /dev/null,
49894# effectively closing config.log, so it can be properly (re)opened and
49895# appended to by config.status.  When coming back to configure, we
49896# need to make the FD available again.
49897if test "$no_create" != yes; then
49898  ac_cs_success=:
49899  ac_config_status_args=
49900  test "$silent" = yes &&
49901    ac_config_status_args="$ac_config_status_args --quiet"
49902  exec 5>/dev/null
49903  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
49904  exec 5>>config.log
49905  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
49906  # would make configure fail if this is the last instruction.
49907  $ac_cs_success || as_fn_exit 1
49908fi
49909if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
49910  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
49911$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
49912fi
49913
49914
49915# Try to move the config.log file to the output directory.
49916if test -e ./config.log; then
49917  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
49918fi
49919
49920# Make the compare script executable
49921$CHMOD +x $OUTPUT_ROOT/compare.sh
49922
49923# Finally output some useful information to the user
49924
49925  # Finally output some useful information to the user
49926
49927  printf "\n"
49928  printf "====================================================\n"
49929  if test "x$no_create" != "xyes"; then
49930    if test "x$IS_RECONFIGURE" != "xyes"; then
49931      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
49932    else
49933      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
49934    fi
49935  else
49936    if test "x$IS_RECONFIGURE" != "xyes"; then
49937      printf "A configuration has been successfully checked but not created\n"
49938    else
49939      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
49940    fi
49941  fi
49942  if test "x$CONFIGURE_COMMAND_LINE" != x; then
49943    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
49944  else
49945    printf "using default settings.\n"
49946  fi
49947
49948  printf "\n"
49949  printf "Configuration summary:\n"
49950  printf "* Debug level:    $DEBUG_LEVEL\n"
49951  printf "* JDK variant:    $JDK_VARIANT\n"
49952  printf "* JVM variants:   $with_jvm_variants\n"
49953  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
49954
49955  printf "\n"
49956  printf "Tools summary:\n"
49957  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
49958    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
49959  fi
49960  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
49961  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
49962  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
49963  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
49964
49965  printf "\n"
49966  printf "Build performance summary:\n"
49967  printf "* Cores to use:   $JOBS\n"
49968  printf "* Memory limit:   $MEMORY_SIZE MB\n"
49969  if test "x$CCACHE_STATUS" != "x"; then
49970    printf "* ccache status:  $CCACHE_STATUS\n"
49971  fi
49972  printf "\n"
49973
49974  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
49975    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
49976    printf "will result in longer build times.\n"
49977    printf "\n"
49978  fi
49979
49980  if test "x$FOUND_ALT_VARIABLES" != "x"; then
49981    printf "WARNING: You have old-style ALT_ environment variables set.\n"
49982    printf "These are not respected, and will be ignored. It is recommended\n"
49983    printf "that you clean your environment. The following variables are set:\n"
49984    printf "$FOUND_ALT_VARIABLES\n"
49985    printf "\n"
49986  fi
49987
49988  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
49989    printf "WARNING: Your build output directory is not on a local disk.\n"
49990    printf "This will severely degrade build performance!\n"
49991    printf "It is recommended that you create an output directory on a local disk,\n"
49992    printf "and run the configure script again from that directory.\n"
49993    printf "\n"
49994  fi
49995
49996  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
49997    printf "WARNING: The result of this configuration has overridden an older\n"
49998    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
49999    printf "proper build. Failure to do so might result in strange build problems.\n"
50000    printf "\n"
50001  fi
50002
50003  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
50004    printf "WARNING: The result of this configuration was not saved.\n"
50005    printf "You should run without '--no-create | -n' to create the configuration.\n"
50006    printf "\n"
50007  fi
50008
50009