generated-configure.sh revision 1070:77ee6827e0b2
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 jdk9.
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='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CCACHE
633USE_PRECOMPILED_HEADER
634SJAVAC_SERVER_DIR
635ENABLE_SJAVAC
636SJAVAC_SERVER_JAVA
637JOBS
638MEMORY_SIZE
639NUM_CORES
640ENABLE_INTREE_EC
641SALIB_NAME
642HOTSPOT_MAKE_ARGS
643MSVCR_DLL
644LIBCXX
645LLVM_LIBS
646LLVM_LDFLAGS
647LLVM_CFLAGS
648LLVM_CONFIG
649LIBFFI_LIBS
650LIBFFI_CFLAGS
651STATIC_CXX_SETTING
652LIBDL
653LIBM
654LIBZIP_CAN_USE_MMAP
655USE_EXTERNAL_LIBZ
656USE_EXTERNAL_LIBPNG
657PNG_LIBS
658PNG_CFLAGS
659USE_EXTERNAL_LCMS
660LCMS_LIBS
661LCMS_CFLAGS
662USE_EXTERNAL_LIBGIF
663USE_EXTERNAL_LIBJPEG
664ALSA_LIBS
665ALSA_CFLAGS
666FREETYPE_BUNDLE_LIB_PATH
667FREETYPE_LIBS
668FREETYPE_CFLAGS
669CUPS_CFLAGS
670X_EXTRA_LIBS
671X_LIBS
672X_PRE_LIBS
673X_CFLAGS
674XMKMF
675FIXPATH
676ZIP_DEBUGINFO_FILES
677ENABLE_DEBUG_SYMBOLS
678CFLAGS_WARNINGS_ARE_ERRORS
679COMPILER_SUPPORTS_TARGET_BITS_FLAG
680ZERO_ARCHFLAG
681LDFLAGS_CXX_JDK
682LDFLAGS_JDKEXE_SUFFIX
683LDFLAGS_JDKLIB_SUFFIX
684LDFLAGS_JDKEXE
685LDFLAGS_JDKLIB
686CXXFLAGS_JDKEXE
687CXXFLAGS_JDKLIB
688CFLAGS_JDKEXE
689CFLAGS_JDKLIB
690MACOSX_VERSION_MIN
691LEGACY_EXTRA_LDFLAGS
692LEGACY_EXTRA_CXXFLAGS
693LEGACY_EXTRA_CFLAGS
694CXX_O_FLAG_NONE
695CXX_O_FLAG_DEBUG
696CXX_O_FLAG_NORM
697CXX_O_FLAG_HI
698CXX_O_FLAG_HIGHEST
699C_O_FLAG_NONE
700C_O_FLAG_DEBUG
701C_O_FLAG_NORM
702C_O_FLAG_HI
703C_O_FLAG_HIGHEST
704CXXFLAGS_DEBUG_OPTIONS
705CFLAGS_DEBUG_OPTIONS
706CXXFLAGS_DEBUG_SYMBOLS
707CFLAGS_DEBUG_SYMBOLS
708CXX_FLAG_DEPS
709C_FLAG_DEPS
710SET_SHARED_LIBRARY_MAPFILE
711SET_SHARED_LIBRARY_NAME
712SET_SHARED_LIBRARY_ORIGIN
713SET_EXECUTABLE_ORIGIN
714SHARED_LIBRARY_FLAGS
715CXX_FLAG_REORDER
716C_FLAG_REORDER
717SYSROOT_LDFLAGS
718SYSROOT_CFLAGS
719RC_FLAGS
720AR_OUT_OPTION
721LD_OUT_OPTION
722EXE_OUT_OPTION
723CC_OUT_OPTION
724POST_MCS_CMD
725POST_STRIP_CMD
726ARFLAGS
727COMPILER_TARGET_BITS_FLAG
728JT_HOME
729JTREGEXE
730USING_BROKEN_SUSE_LD
731PACKAGE_PATH
732LDEXECXX
733LDEXE
734USE_CLANG
735HOTSPOT_LD
736HOTSPOT_CXX
737HOTSPOT_RC
738HOTSPOT_MT
739BUILD_LD
740BUILD_CXX
741BUILD_CC
742ac_ct_OBJDUMP
743OBJDUMP
744ac_ct_OBJCOPY
745OBJCOPY
746ac_ct_NM
747ac_ct_STRIP
748MCS
749GNM
750NM
751STRIP
752DUMPBIN
753RC
754MT
755LIPO
756ac_ct_OBJC
757OBJCFLAGS
758OBJC
759ac_ct_AR
760AR
761AS
762LDCXX
763LD
764CXXCPP
765CPP
766ac_ct_CXX
767CXXFLAGS
768CXX
769ac_ct_PROPER_COMPILER_CXX
770PROPER_COMPILER_CXX
771TOOLCHAIN_PATH_CXX
772POTENTIAL_CXX
773OBJEXT
774EXEEXT
775ac_ct_CC
776CPPFLAGS
777LDFLAGS
778CFLAGS
779CC
780ac_ct_PROPER_COMPILER_CC
781PROPER_COMPILER_CC
782TOOLCHAIN_PATH_CC
783POTENTIAL_CC
784VS_LIB
785VS_INCLUDE
786VS_PATH
787CYGWIN_LINK
788EXE_SUFFIX
789OBJ_SUFFIX
790STATIC_LIBRARY
791SHARED_LIBRARY
792STATIC_LIBRARY_SUFFIX
793SHARED_LIBRARY_SUFFIX
794LIBRARY_PREFIX
795TOOLCHAIN_TYPE
796BUILD_HOTSPOT
797HOTSPOT_DIST
798BUILD_OUTPUT
799OVERRIDE_SRC_ROOT
800ADD_SRC_ROOT
801JDK_TOPDIR
802NASHORN_TOPDIR
803HOTSPOT_TOPDIR
804JAXWS_TOPDIR
805JAXP_TOPDIR
806CORBA_TOPDIR
807LANGTOOLS_TOPDIR
808JAVA_FLAGS_SMALL
809JAVA_FLAGS_BIG
810JAVA_FLAGS
811JAVAC_FLAGS
812BOOT_JDK_SOURCETARGET
813JARSIGNER
814NATIVE2ASCII
815JAR
816JAVAH
817JAVAC
818JAVA
819BOOT_JDK
820BOOT_TOOLSJAR
821BOOT_RTJAR
822JAVA_CHECK
823JAVAC_CHECK
824COOKED_BUILD_NUMBER
825JDK_VERSION
826COPYRIGHT_YEAR
827MACOSX_BUNDLE_ID_BASE
828MACOSX_BUNDLE_NAME_BASE
829COMPANY_NAME
830JDK_RC_PLATFORM_NAME
831PRODUCT_SUFFIX
832PRODUCT_NAME
833LAUNCHER_NAME
834MILESTONE
835JDK_BUILD_NUMBER
836JDK_UPDATE_VERSION
837JDK_MICRO_VERSION
838JDK_MINOR_VERSION
839JDK_MAJOR_VERSION
840USER_RELEASE_SUFFIX
841COMPRESS_JARS
842RMICONNECTOR_IIOP
843UNLIMITED_CRYPTO
844CACERTS_FILE
845TEST_IN_BUILD
846BUILD_HEADLESS
847SUPPORT_HEADFUL
848SUPPORT_HEADLESS
849BDEPS_FTP
850BDEPS_UNZIP
851OS_VERSION_MICRO
852OS_VERSION_MINOR
853OS_VERSION_MAJOR
854PKG_CONFIG
855CODESIGN
856XATTR
857DSYMUTIL
858IS_GNU_TIME
859TIME
860STAT
861HG
862READELF
863OTOOL
864LDD
865ZIP
866UNZIP
867FIND_DELETE
868MAKE
869CHECK_TOOLSDIR_MAKE
870CHECK_TOOLSDIR_GMAKE
871CHECK_MAKE
872CHECK_GMAKE
873PKGHANDLER
874OUTPUT_ROOT
875CONF_NAME
876SPEC
877BUILD_VARIANT_RELEASE
878DEBUG_CLASSFILES
879FASTDEBUG
880VARIANT
881DEBUG_LEVEL
882MACOSX_UNIVERSAL
883INCLUDE_SA
884JVM_VARIANT_CORE
885JVM_VARIANT_ZEROSHARK
886JVM_VARIANT_ZERO
887JVM_VARIANT_KERNEL
888JVM_VARIANT_MINIMAL1
889JVM_VARIANT_CLIENT
890JVM_VARIANT_SERVER
891JVM_VARIANTS
892JVM_INTERPRETER
893JDK_VARIANT
894SET_OPENJDK
895BUILD_LOG_WRAPPER
896BUILD_LOG_PREVIOUS
897BUILD_LOG
898TOPDIR
899PATH_SEP
900ZERO_ARCHDEF
901DEFINE_CROSS_COMPILE_ARCH
902LP64
903OPENJDK_TARGET_OS_EXPORT_DIR
904OPENJDK_TARGET_OS_API_DIR
905OPENJDK_TARGET_CPU_JLI_CFLAGS
906OPENJDK_TARGET_CPU_OSARCH
907OPENJDK_TARGET_CPU_ISADIR
908OPENJDK_TARGET_CPU_LIBDIR
909OPENJDK_TARGET_CPU_LEGACY_LIB
910OPENJDK_TARGET_CPU_LEGACY
911REQUIRED_OS_VERSION
912REQUIRED_OS_NAME
913COMPILE_TYPE
914OPENJDK_TARGET_CPU_ENDIAN
915OPENJDK_TARGET_CPU_BITS
916OPENJDK_TARGET_CPU_ARCH
917OPENJDK_TARGET_CPU
918OPENJDK_TARGET_OS_API
919OPENJDK_TARGET_OS
920OPENJDK_BUILD_CPU_ENDIAN
921OPENJDK_BUILD_CPU_BITS
922OPENJDK_BUILD_CPU_ARCH
923OPENJDK_BUILD_CPU
924OPENJDK_BUILD_OS_API
925OPENJDK_BUILD_OS
926OPENJDK_BUILD_AUTOCONF_NAME
927OPENJDK_TARGET_AUTOCONF_NAME
928target_os
929target_vendor
930target_cpu
931target
932host_os
933host_vendor
934host_cpu
935host
936build_os
937build_vendor
938build_cpu
939build
940SETFILE
941DF
942READLINK
943CYGPATH
944SED
945FGREP
946EGREP
947GREP
948AWK
949XARGS
950WHICH
951WC
952UNIQ
953UNAME
954TR
955TOUCH
956TEE
957TAR
958TAIL
959SORT
960SH
961RM
962PRINTF
963NAWK
964MV
965MKTEMP
966MKDIR
967LS
968LN
969HEAD
970FIND
971FILE
972EXPR
973ECHO
974DIRNAME
975DIFF
976DATE
977CUT
978CPIO
979CP
980COMM
981CMP
982CHMOD
983CAT
984BASH
985BASENAME
986DATE_WHEN_CONFIGURED
987CONFIGURE_COMMAND_LINE
988target_alias
989host_alias
990build_alias
991LIBS
992ECHO_T
993ECHO_N
994ECHO_C
995DEFS
996mandir
997localedir
998libdir
999psdir
1000pdfdir
1001dvidir
1002htmldir
1003infodir
1004docdir
1005oldincludedir
1006includedir
1007localstatedir
1008sharedstatedir
1009sysconfdir
1010datadir
1011datarootdir
1012libexecdir
1013sbindir
1014bindir
1015program_transform_name
1016prefix
1017exec_prefix
1018PACKAGE_URL
1019PACKAGE_BUGREPORT
1020PACKAGE_STRING
1021PACKAGE_VERSION
1022PACKAGE_TARNAME
1023PACKAGE_NAME
1024PATH_SEPARATOR
1025SHELL'
1026ac_subst_files=''
1027ac_user_opts='
1028enable_option_checking
1029with_target_bits
1030enable_openjdk_only
1031with_custom_make_dir
1032with_jdk_variant
1033with_jvm_interpreter
1034with_jvm_variants
1035enable_debug
1036with_debug_level
1037with_devkit
1038with_sys_root
1039with_sysroot
1040with_tools_dir
1041with_toolchain_path
1042with_extra_path
1043with_conf_name
1044with_builddeps_conf
1045with_builddeps_server
1046with_builddeps_dir
1047with_builddeps_group
1048enable_headful
1049enable_hotspot_test_in_build
1050with_cacerts_file
1051enable_unlimited_crypto
1052enable_rmiconnector_iiop
1053with_milestone
1054with_update_version
1055with_user_release_suffix
1056with_build_number
1057with_boot_jdk
1058with_boot_jdk_jvmargs
1059with_add_source_root
1060with_override_source_root
1061with_adds_and_overrides
1062with_override_langtools
1063with_override_corba
1064with_override_jaxp
1065with_override_jaxws
1066with_override_hotspot
1067with_override_nashorn
1068with_override_jdk
1069with_import_hotspot
1070with_toolchain_type
1071with_jtreg
1072with_extra_cflags
1073with_extra_cxxflags
1074with_extra_ldflags
1075enable_debug_symbols
1076enable_zip_debug_info
1077enable_macosx_runtime_support
1078with_x
1079with_cups
1080with_cups_include
1081with_freetype
1082with_freetype_include
1083with_freetype_lib
1084enable_freetype_bundling
1085with_alsa
1086with_alsa_include
1087with_alsa_lib
1088with_giflib
1089with_lcms
1090with_libpng
1091with_zlib
1092with_stdc__lib
1093with_msvcr_dll
1094with_dxsdk
1095with_dxsdk_lib
1096with_dxsdk_include
1097with_num_cores
1098with_memory_size
1099with_jobs
1100with_sjavac_server_java
1101enable_sjavac
1102enable_precompiled_headers
1103enable_ccache
1104with_ccache_dir
1105'
1106      ac_precious_vars='build_alias
1107host_alias
1108target_alias
1109BASENAME
1110BASH
1111CAT
1112CHMOD
1113CMP
1114COMM
1115CP
1116CPIO
1117CUT
1118DATE
1119DIFF
1120DIRNAME
1121ECHO
1122EXPR
1123FILE
1124FIND
1125HEAD
1126LN
1127LS
1128MKDIR
1129MKTEMP
1130MV
1131NAWK
1132PRINTF
1133RM
1134SH
1135SORT
1136TAIL
1137TAR
1138TEE
1139TOUCH
1140TR
1141UNAME
1142UNIQ
1143WC
1144WHICH
1145XARGS
1146AWK
1147GREP
1148EGREP
1149FGREP
1150SED
1151CYGPATH
1152READLINK
1153DF
1154SETFILE
1155UNZIP
1156ZIP
1157LDD
1158OTOOL
1159READELF
1160HG
1161STAT
1162TIME
1163DSYMUTIL
1164XATTR
1165CODESIGN
1166PKG_CONFIG
1167JAVA
1168JAVAC
1169JAVAH
1170JAR
1171NATIVE2ASCII
1172JARSIGNER
1173CC
1174CFLAGS
1175LDFLAGS
1176LIBS
1177CPPFLAGS
1178CXX
1179CXXFLAGS
1180CCC
1181CPP
1182CXXCPP
1183AS
1184AR
1185OBJC
1186OBJCFLAGS
1187LIPO
1188STRIP
1189NM
1190GNM
1191MCS
1192OBJCOPY
1193OBJDUMP
1194BUILD_CC
1195BUILD_CXX
1196BUILD_LD
1197JTREGEXE
1198XMKMF
1199FREETYPE_CFLAGS
1200FREETYPE_LIBS
1201ALSA_CFLAGS
1202ALSA_LIBS
1203LCMS_CFLAGS
1204LCMS_LIBS
1205PNG_CFLAGS
1206PNG_LIBS
1207LIBFFI_CFLAGS
1208LIBFFI_LIBS
1209CCACHE'
1210
1211
1212# Initialize some variables set by options.
1213ac_init_help=
1214ac_init_version=false
1215ac_unrecognized_opts=
1216ac_unrecognized_sep=
1217# The variables have the same names as the options, with
1218# dashes changed to underlines.
1219cache_file=/dev/null
1220exec_prefix=NONE
1221no_create=
1222no_recursion=
1223prefix=NONE
1224program_prefix=NONE
1225program_suffix=NONE
1226program_transform_name=s,x,x,
1227silent=
1228site=
1229srcdir=
1230verbose=
1231x_includes=NONE
1232x_libraries=NONE
1233
1234# Installation directory options.
1235# These are left unexpanded so users can "make install exec_prefix=/foo"
1236# and all the variables that are supposed to be based on exec_prefix
1237# by default will actually change.
1238# Use braces instead of parens because sh, perl, etc. also accept them.
1239# (The list follows the same order as the GNU Coding Standards.)
1240bindir='${exec_prefix}/bin'
1241sbindir='${exec_prefix}/sbin'
1242libexecdir='${exec_prefix}/libexec'
1243datarootdir='${prefix}/share'
1244datadir='${datarootdir}'
1245sysconfdir='${prefix}/etc'
1246sharedstatedir='${prefix}/com'
1247localstatedir='${prefix}/var'
1248includedir='${prefix}/include'
1249oldincludedir='/usr/include'
1250docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1251infodir='${datarootdir}/info'
1252htmldir='${docdir}'
1253dvidir='${docdir}'
1254pdfdir='${docdir}'
1255psdir='${docdir}'
1256libdir='${exec_prefix}/lib'
1257localedir='${datarootdir}/locale'
1258mandir='${datarootdir}/man'
1259
1260ac_prev=
1261ac_dashdash=
1262for ac_option
1263do
1264  # If the previous option needs an argument, assign it.
1265  if test -n "$ac_prev"; then
1266    eval $ac_prev=\$ac_option
1267    ac_prev=
1268    continue
1269  fi
1270
1271  case $ac_option in
1272  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1273  *=)   ac_optarg= ;;
1274  *)    ac_optarg=yes ;;
1275  esac
1276
1277  # Accept the important Cygnus configure options, so we can diagnose typos.
1278
1279  case $ac_dashdash$ac_option in
1280  --)
1281    ac_dashdash=yes ;;
1282
1283  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1284    ac_prev=bindir ;;
1285  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1286    bindir=$ac_optarg ;;
1287
1288  -build | --build | --buil | --bui | --bu)
1289    ac_prev=build_alias ;;
1290  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1291    build_alias=$ac_optarg ;;
1292
1293  -cache-file | --cache-file | --cache-fil | --cache-fi \
1294  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1295    ac_prev=cache_file ;;
1296  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1297  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1298    cache_file=$ac_optarg ;;
1299
1300  --config-cache | -C)
1301    cache_file=config.cache ;;
1302
1303  -datadir | --datadir | --datadi | --datad)
1304    ac_prev=datadir ;;
1305  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1306    datadir=$ac_optarg ;;
1307
1308  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1309  | --dataroo | --dataro | --datar)
1310    ac_prev=datarootdir ;;
1311  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1312  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1313    datarootdir=$ac_optarg ;;
1314
1315  -disable-* | --disable-*)
1316    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1317    # Reject names that are not valid shell variable names.
1318    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1319      as_fn_error $? "invalid feature name: $ac_useropt"
1320    ac_useropt_orig=$ac_useropt
1321    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1322    case $ac_user_opts in
1323      *"
1324"enable_$ac_useropt"
1325"*) ;;
1326      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1327	 ac_unrecognized_sep=', ';;
1328    esac
1329    eval enable_$ac_useropt=no ;;
1330
1331  -docdir | --docdir | --docdi | --doc | --do)
1332    ac_prev=docdir ;;
1333  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1334    docdir=$ac_optarg ;;
1335
1336  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1337    ac_prev=dvidir ;;
1338  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1339    dvidir=$ac_optarg ;;
1340
1341  -enable-* | --enable-*)
1342    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1343    # Reject names that are not valid shell variable names.
1344    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1345      as_fn_error $? "invalid feature name: $ac_useropt"
1346    ac_useropt_orig=$ac_useropt
1347    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1348    case $ac_user_opts in
1349      *"
1350"enable_$ac_useropt"
1351"*) ;;
1352      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1353	 ac_unrecognized_sep=', ';;
1354    esac
1355    eval enable_$ac_useropt=\$ac_optarg ;;
1356
1357  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1358  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1359  | --exec | --exe | --ex)
1360    ac_prev=exec_prefix ;;
1361  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1362  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1363  | --exec=* | --exe=* | --ex=*)
1364    exec_prefix=$ac_optarg ;;
1365
1366  -gas | --gas | --ga | --g)
1367    # Obsolete; use --with-gas.
1368    with_gas=yes ;;
1369
1370  -help | --help | --hel | --he | -h)
1371    ac_init_help=long ;;
1372  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1373    ac_init_help=recursive ;;
1374  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1375    ac_init_help=short ;;
1376
1377  -host | --host | --hos | --ho)
1378    ac_prev=host_alias ;;
1379  -host=* | --host=* | --hos=* | --ho=*)
1380    host_alias=$ac_optarg ;;
1381
1382  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1383    ac_prev=htmldir ;;
1384  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1385  | --ht=*)
1386    htmldir=$ac_optarg ;;
1387
1388  -includedir | --includedir | --includedi | --included | --include \
1389  | --includ | --inclu | --incl | --inc)
1390    ac_prev=includedir ;;
1391  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1392  | --includ=* | --inclu=* | --incl=* | --inc=*)
1393    includedir=$ac_optarg ;;
1394
1395  -infodir | --infodir | --infodi | --infod | --info | --inf)
1396    ac_prev=infodir ;;
1397  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1398    infodir=$ac_optarg ;;
1399
1400  -libdir | --libdir | --libdi | --libd)
1401    ac_prev=libdir ;;
1402  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1403    libdir=$ac_optarg ;;
1404
1405  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1406  | --libexe | --libex | --libe)
1407    ac_prev=libexecdir ;;
1408  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1409  | --libexe=* | --libex=* | --libe=*)
1410    libexecdir=$ac_optarg ;;
1411
1412  -localedir | --localedir | --localedi | --localed | --locale)
1413    ac_prev=localedir ;;
1414  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1415    localedir=$ac_optarg ;;
1416
1417  -localstatedir | --localstatedir | --localstatedi | --localstated \
1418  | --localstate | --localstat | --localsta | --localst | --locals)
1419    ac_prev=localstatedir ;;
1420  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1421  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1422    localstatedir=$ac_optarg ;;
1423
1424  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1425    ac_prev=mandir ;;
1426  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1427    mandir=$ac_optarg ;;
1428
1429  -nfp | --nfp | --nf)
1430    # Obsolete; use --without-fp.
1431    with_fp=no ;;
1432
1433  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1434  | --no-cr | --no-c | -n)
1435    no_create=yes ;;
1436
1437  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1438  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1439    no_recursion=yes ;;
1440
1441  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1442  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1443  | --oldin | --oldi | --old | --ol | --o)
1444    ac_prev=oldincludedir ;;
1445  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1446  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1447  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1448    oldincludedir=$ac_optarg ;;
1449
1450  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1451    ac_prev=prefix ;;
1452  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1453    prefix=$ac_optarg ;;
1454
1455  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1456  | --program-pre | --program-pr | --program-p)
1457    ac_prev=program_prefix ;;
1458  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1459  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1460    program_prefix=$ac_optarg ;;
1461
1462  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1463  | --program-suf | --program-su | --program-s)
1464    ac_prev=program_suffix ;;
1465  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1466  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1467    program_suffix=$ac_optarg ;;
1468
1469  -program-transform-name | --program-transform-name \
1470  | --program-transform-nam | --program-transform-na \
1471  | --program-transform-n | --program-transform- \
1472  | --program-transform | --program-transfor \
1473  | --program-transfo | --program-transf \
1474  | --program-trans | --program-tran \
1475  | --progr-tra | --program-tr | --program-t)
1476    ac_prev=program_transform_name ;;
1477  -program-transform-name=* | --program-transform-name=* \
1478  | --program-transform-nam=* | --program-transform-na=* \
1479  | --program-transform-n=* | --program-transform-=* \
1480  | --program-transform=* | --program-transfor=* \
1481  | --program-transfo=* | --program-transf=* \
1482  | --program-trans=* | --program-tran=* \
1483  | --progr-tra=* | --program-tr=* | --program-t=*)
1484    program_transform_name=$ac_optarg ;;
1485
1486  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1487    ac_prev=pdfdir ;;
1488  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1489    pdfdir=$ac_optarg ;;
1490
1491  -psdir | --psdir | --psdi | --psd | --ps)
1492    ac_prev=psdir ;;
1493  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1494    psdir=$ac_optarg ;;
1495
1496  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1497  | -silent | --silent | --silen | --sile | --sil)
1498    silent=yes ;;
1499
1500  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1501    ac_prev=sbindir ;;
1502  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1503  | --sbi=* | --sb=*)
1504    sbindir=$ac_optarg ;;
1505
1506  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1507  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1508  | --sharedst | --shareds | --shared | --share | --shar \
1509  | --sha | --sh)
1510    ac_prev=sharedstatedir ;;
1511  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1512  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1513  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1514  | --sha=* | --sh=*)
1515    sharedstatedir=$ac_optarg ;;
1516
1517  -site | --site | --sit)
1518    ac_prev=site ;;
1519  -site=* | --site=* | --sit=*)
1520    site=$ac_optarg ;;
1521
1522  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1523    ac_prev=srcdir ;;
1524  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1525    srcdir=$ac_optarg ;;
1526
1527  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1528  | --syscon | --sysco | --sysc | --sys | --sy)
1529    ac_prev=sysconfdir ;;
1530  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1531  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1532    sysconfdir=$ac_optarg ;;
1533
1534  -target | --target | --targe | --targ | --tar | --ta | --t)
1535    ac_prev=target_alias ;;
1536  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1537    target_alias=$ac_optarg ;;
1538
1539  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1540    verbose=yes ;;
1541
1542  -version | --version | --versio | --versi | --vers | -V)
1543    ac_init_version=: ;;
1544
1545  -with-* | --with-*)
1546    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1547    # Reject names that are not valid shell variable names.
1548    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1549      as_fn_error $? "invalid package name: $ac_useropt"
1550    ac_useropt_orig=$ac_useropt
1551    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1552    case $ac_user_opts in
1553      *"
1554"with_$ac_useropt"
1555"*) ;;
1556      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1557	 ac_unrecognized_sep=', ';;
1558    esac
1559    eval with_$ac_useropt=\$ac_optarg ;;
1560
1561  -without-* | --without-*)
1562    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1563    # Reject names that are not valid shell variable names.
1564    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1565      as_fn_error $? "invalid package name: $ac_useropt"
1566    ac_useropt_orig=$ac_useropt
1567    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1568    case $ac_user_opts in
1569      *"
1570"with_$ac_useropt"
1571"*) ;;
1572      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1573	 ac_unrecognized_sep=', ';;
1574    esac
1575    eval with_$ac_useropt=no ;;
1576
1577  --x)
1578    # Obsolete; use --with-x.
1579    with_x=yes ;;
1580
1581  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1582  | --x-incl | --x-inc | --x-in | --x-i)
1583    ac_prev=x_includes ;;
1584  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1585  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1586    x_includes=$ac_optarg ;;
1587
1588  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1589  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1590    ac_prev=x_libraries ;;
1591  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1592  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1593    x_libraries=$ac_optarg ;;
1594
1595  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1596Try \`$0 --help' for more information"
1597    ;;
1598
1599  *=*)
1600    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1601    # Reject names that are not valid shell variable names.
1602    case $ac_envvar in #(
1603      '' | [0-9]* | *[!_$as_cr_alnum]* )
1604      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1605    esac
1606    eval $ac_envvar=\$ac_optarg
1607    export $ac_envvar ;;
1608
1609  *)
1610    # FIXME: should be removed in autoconf 3.0.
1611    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1612    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1613      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1614    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1615    ;;
1616
1617  esac
1618done
1619
1620if test -n "$ac_prev"; then
1621  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1622  as_fn_error $? "missing argument to $ac_option"
1623fi
1624
1625if test -n "$ac_unrecognized_opts"; then
1626  case $enable_option_checking in
1627    no) ;;
1628    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1629    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1630  esac
1631fi
1632
1633# Check all directory arguments for consistency.
1634for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1635		datadir sysconfdir sharedstatedir localstatedir includedir \
1636		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1637		libdir localedir mandir
1638do
1639  eval ac_val=\$$ac_var
1640  # Remove trailing slashes.
1641  case $ac_val in
1642    */ )
1643      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1644      eval $ac_var=\$ac_val;;
1645  esac
1646  # Be sure to have absolute directory names.
1647  case $ac_val in
1648    [\\/$]* | ?:[\\/]* )  continue;;
1649    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1650  esac
1651  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1652done
1653
1654# There might be people who depend on the old broken behavior: `$host'
1655# used to hold the argument of --host etc.
1656# FIXME: To remove some day.
1657build=$build_alias
1658host=$host_alias
1659target=$target_alias
1660
1661# FIXME: To remove some day.
1662if test "x$host_alias" != x; then
1663  if test "x$build_alias" = x; then
1664    cross_compiling=maybe
1665  elif test "x$build_alias" != "x$host_alias"; then
1666    cross_compiling=yes
1667  fi
1668fi
1669
1670ac_tool_prefix=
1671test -n "$host_alias" && ac_tool_prefix=$host_alias-
1672
1673test "$silent" = yes && exec 6>/dev/null
1674
1675
1676ac_pwd=`pwd` && test -n "$ac_pwd" &&
1677ac_ls_di=`ls -di .` &&
1678ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1679  as_fn_error $? "working directory cannot be determined"
1680test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1681  as_fn_error $? "pwd does not report name of working directory"
1682
1683
1684# Find the source files, if location was not specified.
1685if test -z "$srcdir"; then
1686  ac_srcdir_defaulted=yes
1687  # Try the directory containing this script, then the parent directory.
1688  ac_confdir=`$as_dirname -- "$as_myself" ||
1689$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1690	 X"$as_myself" : 'X\(//\)[^/]' \| \
1691	 X"$as_myself" : 'X\(//\)$' \| \
1692	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1693$as_echo X"$as_myself" |
1694    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1695	    s//\1/
1696	    q
1697	  }
1698	  /^X\(\/\/\)[^/].*/{
1699	    s//\1/
1700	    q
1701	  }
1702	  /^X\(\/\/\)$/{
1703	    s//\1/
1704	    q
1705	  }
1706	  /^X\(\/\).*/{
1707	    s//\1/
1708	    q
1709	  }
1710	  s/.*/./; q'`
1711  srcdir=$ac_confdir
1712  if test ! -r "$srcdir/$ac_unique_file"; then
1713    srcdir=..
1714  fi
1715else
1716  ac_srcdir_defaulted=no
1717fi
1718if test ! -r "$srcdir/$ac_unique_file"; then
1719  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1720  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1721fi
1722ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1723ac_abs_confdir=`(
1724	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1725	pwd)`
1726# When building in place, set srcdir=.
1727if test "$ac_abs_confdir" = "$ac_pwd"; then
1728  srcdir=.
1729fi
1730# Remove unnecessary trailing slashes from srcdir.
1731# Double slashes in file names in object file debugging info
1732# mess up M-x gdb in Emacs.
1733case $srcdir in
1734*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1735esac
1736for ac_var in $ac_precious_vars; do
1737  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1738  eval ac_env_${ac_var}_value=\$${ac_var}
1739  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1740  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1741done
1742
1743#
1744# Report the --help message.
1745#
1746if test "$ac_init_help" = "long"; then
1747  # Omit some internal or obsolete options to make the list less imposing.
1748  # This message is too long to be a string in the A/UX 3.1 sh.
1749  cat <<_ACEOF
1750\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1751
1752Usage: $0 [OPTION]... [VAR=VALUE]...
1753
1754To assign environment variables (e.g., CC, CFLAGS...), specify them as
1755VAR=VALUE.  See below for descriptions of some of the useful variables.
1756
1757Defaults for the options are specified in brackets.
1758
1759Configuration:
1760  -h, --help              display this help and exit
1761      --help=short        display options specific to this package
1762      --help=recursive    display the short help of all the included packages
1763  -V, --version           display version information and exit
1764  -q, --quiet, --silent   do not print \`checking ...' messages
1765      --cache-file=FILE   cache test results in FILE [disabled]
1766  -C, --config-cache      alias for \`--cache-file=config.cache'
1767  -n, --no-create         do not create output files
1768      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1769
1770Installation directories:
1771  --prefix=PREFIX         install architecture-independent files in PREFIX
1772                          [$ac_default_prefix]
1773  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1774                          [PREFIX]
1775
1776By default, \`make install' will install all the files in
1777\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1778an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1779for instance \`--prefix=\$HOME'.
1780
1781For better control, use the options below.
1782
1783Fine tuning of the installation directories:
1784  --bindir=DIR            user executables [EPREFIX/bin]
1785  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1786  --libexecdir=DIR        program executables [EPREFIX/libexec]
1787  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1788  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1789  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1790  --libdir=DIR            object code libraries [EPREFIX/lib]
1791  --includedir=DIR        C header files [PREFIX/include]
1792  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1793  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1794  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1795  --infodir=DIR           info documentation [DATAROOTDIR/info]
1796  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1797  --mandir=DIR            man documentation [DATAROOTDIR/man]
1798  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1799  --htmldir=DIR           html documentation [DOCDIR]
1800  --dvidir=DIR            dvi documentation [DOCDIR]
1801  --pdfdir=DIR            pdf documentation [DOCDIR]
1802  --psdir=DIR             ps documentation [DOCDIR]
1803_ACEOF
1804
1805  cat <<\_ACEOF
1806
1807X features:
1808  --x-includes=DIR    X include files are in DIR
1809  --x-libraries=DIR   X library files are in DIR
1810
1811System types:
1812  --build=BUILD     configure for building on BUILD [guessed]
1813  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1814  --target=TARGET   configure for building compilers for TARGET [HOST]
1815_ACEOF
1816fi
1817
1818if test -n "$ac_init_help"; then
1819  case $ac_init_help in
1820     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1821   esac
1822  cat <<\_ACEOF
1823
1824Optional Features:
1825  --disable-option-checking  ignore unrecognized --enable/--with options
1826  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1827  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1828  --enable-openjdk-only   suppress building custom source even if present
1829                          [disabled]
1830  --enable-debug          set the debug level to fastdebug (shorthand for
1831                          --with-debug-level=fastdebug) [disabled]
1832  --disable-headful       disable building headful support (graphical UI
1833                          support) [enabled]
1834  --enable-hotspot-test-in-build
1835                          run the Queens test after Hotspot build [disabled]
1836  --enable-unlimited-crypto
1837                          Enable unlimited crypto policy [disabled]
1838  --enable-rmiconnector-iiop
1839                          enable the JMX RMIConnector iiop transport
1840                          [disabled]
1841  --disable-debug-symbols disable generation of debug symbols [enabled]
1842  --disable-zip-debug-info
1843                          disable zipping of debug-info files [enabled]
1844  --enable-macosx-runtime-support
1845                          Deprecated. Option is kept for backwards
1846                          compatibility and is ignored
1847  --disable-freetype-bundling
1848                          disable bundling of the freetype library with the
1849                          build result [enabled on Windows or when using
1850                          --with-freetype, disabled otherwise]
1851  --enable-sjavac         use sjavac to do fast incremental compiles
1852                          [disabled]
1853  --disable-precompiled-headers
1854                          disable using precompiled headers when compiling C++
1855                          [enabled]
1856  --enable-ccache         enable using ccache to speed up recompilations
1857                          [disabled]
1858
1859Optional Packages:
1860  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1861  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1862  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
1863                          support it), e.g. --with-target-bits=32 [guessed]
1864  --with-custom-make-dir  Deprecated. Option is kept for backwards
1865                          compatibility and is ignored
1866  --with-jdk-variant      JDK variant to build (normal) [normal]
1867  --with-jvm-interpreter  JVM interpreter to build (template, cpp) [template]
1868  --with-jvm-variants     JVM variants (separated by commas) to build (server,
1869                          client, minimal1, kernel, zero, zeroshark, core)
1870                          [server]
1871  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
1872                          optimized (HotSpot build only)) [release]
1873  --with-devkit           use this devkit for compilers, tools and resources
1874  --with-sys-root         alias for --with-sysroot for backwards compatability
1875  --with-sysroot          use this directory as sysroot)
1876  --with-tools-dir        alias for --with-toolchain-path for backwards
1877                          compatibility
1878  --with-toolchain-path   prepend these directories when searching for
1879                          toolchain binaries (compilers etc)
1880  --with-extra-path       prepend these directories to the default path
1881  --with-conf-name        use this as the name of the configuration [generated
1882                          from important configuration options]
1883  --with-builddeps-conf   use this configuration file for the builddeps
1884  --with-builddeps-server download and use build dependencies from this server
1885                          url
1886  --with-builddeps-dir    store downloaded build dependencies here
1887                          [/localhome/builddeps]
1888  --with-builddeps-group  chgrp the downloaded build dependencies to this
1889                          group
1890  --with-cacerts-file     specify alternative cacerts file
1891  --with-milestone        Set milestone value for build [internal]
1892  --with-update-version   Set update version value for build [b00]
1893  --with-user-release-suffix
1894                          Add a custom string to the version string if build
1895                          number is not set.[username_builddateb00]
1896  --with-build-number     Set build number value for build [b00]
1897  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1898  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1899                          invocations of boot JDK, overriding the default
1900                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1901                          -enableassertions"
1902  --with-add-source-root  for each and every source directory, look in this
1903                          additional source root for the same directory; if it
1904                          exists and have files in it, include it in the build
1905  --with-override-source-root
1906                          for each and every source directory, look in this
1907                          override source root for the same directory; if it
1908                          exists, use that directory instead and ignore the
1909                          directory in the original source root
1910  --with-adds-and-overrides
1911                          use the subdirs 'adds' and 'overrides' in the
1912                          specified directory as add-source-root and
1913                          override-source-root
1914  --with-override-langtools
1915                          use this langtools dir for the build
1916  --with-override-corba   use this corba dir for the build
1917  --with-override-jaxp    use this jaxp dir for the build
1918  --with-override-jaxws   use this jaxws dir for the build
1919  --with-override-hotspot use this hotspot dir for the build
1920  --with-override-nashorn use this nashorn dir for the build
1921  --with-override-jdk     use this jdk dir for the build
1922  --with-import-hotspot   import hotspot binaries from this jdk image or
1923                          hotspot build dist dir instead of building from
1924                          source
1925  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1926                          to show possible values [platform dependent]
1927  --with-jtreg            Regression Test Harness [probed]
1928  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1929  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1930  --with-extra-ldflags    extra flags to be used when linking jdk
1931  --with-x                use the X Window System
1932  --with-cups             specify prefix directory for the cups package
1933                          (expecting the headers under PATH/include)
1934  --with-cups-include     specify directory for the cups include files
1935  --with-freetype         specify prefix directory for the freetype package
1936                          (expecting the libraries under PATH/lib and the
1937                          headers under PATH/include)
1938  --with-freetype-include specify directory for the freetype include files
1939  --with-freetype-lib     specify directory for the freetype library
1940  --with-alsa             specify prefix directory for the alsa package
1941                          (expecting the libraries under PATH/lib and the
1942                          headers under PATH/include)
1943  --with-alsa-include     specify directory for the alsa include files
1944  --with-alsa-lib         specify directory for the alsa library
1945  --with-giflib           use giflib from build system or OpenJDK source
1946                          (system, bundled) [bundled]
1947  --with-lcms             use lcms2 from build system or OpenJDK source
1948                          (system, bundled) [bundled]
1949  --with-libpng           use libpng from build system or OpenJDK source
1950                          (system, bundled) [bundled]
1951  --with-zlib             use zlib from build system or OpenJDK source
1952                          (system, bundled) [bundled]
1953  --with-stdc++lib=<static>,<dynamic>,<default>
1954                          force linking of the C++ runtime on Linux to either
1955                          static or dynamic, default is static with dynamic as
1956                          fallback
1957  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1958                          only) [probed]
1959  --with-dxsdk            Deprecated. Option is kept for backwards
1960                          compatibility and is ignored
1961  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1962                          compatibility and is ignored
1963  --with-dxsdk-include    Deprecated. Option is kept for backwards
1964                          compatibility and is ignored
1965  --with-num-cores        number of cores in the build system, e.g.
1966                          --with-num-cores=8 [probed]
1967  --with-memory-size      memory (in MB) available in the build system, e.g.
1968                          --with-memory-size=1024 [probed]
1969  --with-jobs             number of parallel jobs to let make run [calculated
1970                          based on cores and memory]
1971  --with-sjavac-server-java
1972                          use this java binary for running the sjavac
1973                          background server [Boot JDK java]
1974  --with-ccache-dir       where to store ccache files [~/.ccache]
1975
1976Some influential environment variables:
1977  BASENAME    Override default value for BASENAME
1978  BASH        Override default value for BASH
1979  CAT         Override default value for CAT
1980  CHMOD       Override default value for CHMOD
1981  CMP         Override default value for CMP
1982  COMM        Override default value for COMM
1983  CP          Override default value for CP
1984  CPIO        Override default value for CPIO
1985  CUT         Override default value for CUT
1986  DATE        Override default value for DATE
1987  DIFF        Override default value for DIFF
1988  DIRNAME     Override default value for DIRNAME
1989  ECHO        Override default value for ECHO
1990  EXPR        Override default value for EXPR
1991  FILE        Override default value for FILE
1992  FIND        Override default value for FIND
1993  HEAD        Override default value for HEAD
1994  LN          Override default value for LN
1995  LS          Override default value for LS
1996  MKDIR       Override default value for MKDIR
1997  MKTEMP      Override default value for MKTEMP
1998  MV          Override default value for MV
1999  NAWK        Override default value for NAWK
2000  PRINTF      Override default value for PRINTF
2001  RM          Override default value for RM
2002  SH          Override default value for SH
2003  SORT        Override default value for SORT
2004  TAIL        Override default value for TAIL
2005  TAR         Override default value for TAR
2006  TEE         Override default value for TEE
2007  TOUCH       Override default value for TOUCH
2008  TR          Override default value for TR
2009  UNAME       Override default value for UNAME
2010  UNIQ        Override default value for UNIQ
2011  WC          Override default value for WC
2012  WHICH       Override default value for WHICH
2013  XARGS       Override default value for XARGS
2014  AWK         Override default value for AWK
2015  GREP        Override default value for GREP
2016  EGREP       Override default value for EGREP
2017  FGREP       Override default value for FGREP
2018  SED         Override default value for SED
2019  CYGPATH     Override default value for CYGPATH
2020  READLINK    Override default value for READLINK
2021  DF          Override default value for DF
2022  SETFILE     Override default value for SETFILE
2023  UNZIP       Override default value for UNZIP
2024  ZIP         Override default value for ZIP
2025  LDD         Override default value for LDD
2026  OTOOL       Override default value for OTOOL
2027  READELF     Override default value for READELF
2028  HG          Override default value for HG
2029  STAT        Override default value for STAT
2030  TIME        Override default value for TIME
2031  DSYMUTIL    Override default value for DSYMUTIL
2032  XATTR       Override default value for XATTR
2033  CODESIGN    Override default value for CODESIGN
2034  PKG_CONFIG  path to pkg-config utility
2035  JAVA        Override default value for JAVA
2036  JAVAC       Override default value for JAVAC
2037  JAVAH       Override default value for JAVAH
2038  JAR         Override default value for JAR
2039  NATIVE2ASCII
2040              Override default value for NATIVE2ASCII
2041  JARSIGNER   Override default value for JARSIGNER
2042  CC          C compiler command
2043  CFLAGS      C compiler flags
2044  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2045              nonstandard directory <lib dir>
2046  LIBS        libraries to pass to the linker, e.g. -l<library>
2047  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2048              you have headers in a nonstandard directory <include dir>
2049  CXX         C++ compiler command
2050  CXXFLAGS    C++ compiler flags
2051  CPP         C preprocessor
2052  CXXCPP      C++ preprocessor
2053  AS          Override default value for AS
2054  AR          Override default value for AR
2055  OBJC        Objective C compiler command
2056  OBJCFLAGS   Objective C compiler flags
2057  LIPO        Override default value for LIPO
2058  STRIP       Override default value for STRIP
2059  NM          Override default value for NM
2060  GNM         Override default value for GNM
2061  MCS         Override default value for MCS
2062  OBJCOPY     Override default value for OBJCOPY
2063  OBJDUMP     Override default value for OBJDUMP
2064  BUILD_CC    Override default value for BUILD_CC
2065  BUILD_CXX   Override default value for BUILD_CXX
2066  BUILD_LD    Override default value for BUILD_LD
2067  JTREGEXE    Override default value for JTREGEXE
2068  XMKMF       Path to xmkmf, Makefile generator for X Window System
2069  FREETYPE_CFLAGS
2070              C compiler flags for FREETYPE, overriding pkg-config
2071  FREETYPE_LIBS
2072              linker flags for FREETYPE, overriding pkg-config
2073  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2074  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2075  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2076  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2077  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2078  PNG_LIBS    linker flags for PNG, overriding pkg-config
2079  LIBFFI_CFLAGS
2080              C compiler flags for LIBFFI, overriding pkg-config
2081  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2082  CCACHE      Override default value for CCACHE
2083
2084Use these variables to override the choices made by `configure' or to help
2085it to find libraries and programs with nonstandard names/locations.
2086
2087Report bugs to <build-dev@openjdk.java.net>.
2088OpenJDK home page: <http://openjdk.java.net>.
2089_ACEOF
2090ac_status=$?
2091fi
2092
2093if test "$ac_init_help" = "recursive"; then
2094  # If there are subdirs, report their specific --help.
2095  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2096    test -d "$ac_dir" ||
2097      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2098      continue
2099    ac_builddir=.
2100
2101case "$ac_dir" in
2102.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2103*)
2104  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2105  # A ".." for each directory in $ac_dir_suffix.
2106  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2107  case $ac_top_builddir_sub in
2108  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2109  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2110  esac ;;
2111esac
2112ac_abs_top_builddir=$ac_pwd
2113ac_abs_builddir=$ac_pwd$ac_dir_suffix
2114# for backward compatibility:
2115ac_top_builddir=$ac_top_build_prefix
2116
2117case $srcdir in
2118  .)  # We are building in place.
2119    ac_srcdir=.
2120    ac_top_srcdir=$ac_top_builddir_sub
2121    ac_abs_top_srcdir=$ac_pwd ;;
2122  [\\/]* | ?:[\\/]* )  # Absolute name.
2123    ac_srcdir=$srcdir$ac_dir_suffix;
2124    ac_top_srcdir=$srcdir
2125    ac_abs_top_srcdir=$srcdir ;;
2126  *) # Relative name.
2127    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2128    ac_top_srcdir=$ac_top_build_prefix$srcdir
2129    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2130esac
2131ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2132
2133    cd "$ac_dir" || { ac_status=$?; continue; }
2134    # Check for guested configure.
2135    if test -f "$ac_srcdir/configure.gnu"; then
2136      echo &&
2137      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2138    elif test -f "$ac_srcdir/configure"; then
2139      echo &&
2140      $SHELL "$ac_srcdir/configure" --help=recursive
2141    else
2142      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2143    fi || ac_status=$?
2144    cd "$ac_pwd" || { ac_status=$?; break; }
2145  done
2146fi
2147
2148test -n "$ac_init_help" && exit $ac_status
2149if $ac_init_version; then
2150  cat <<\_ACEOF
2151OpenJDK configure jdk9
2152generated by GNU Autoconf 2.69
2153
2154Copyright (C) 2012 Free Software Foundation, Inc.
2155This configure script is free software; the Free Software Foundation
2156gives unlimited permission to copy, distribute and modify it.
2157_ACEOF
2158  exit
2159fi
2160
2161## ------------------------ ##
2162## Autoconf initialization. ##
2163## ------------------------ ##
2164
2165# ac_fn_c_try_compile LINENO
2166# --------------------------
2167# Try to compile conftest.$ac_ext, and return whether this succeeded.
2168ac_fn_c_try_compile ()
2169{
2170  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171  rm -f conftest.$ac_objext
2172  if { { ac_try="$ac_compile"
2173case "(($ac_try" in
2174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2175  *) ac_try_echo=$ac_try;;
2176esac
2177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2178$as_echo "$ac_try_echo"; } >&5
2179  (eval "$ac_compile") 2>conftest.err
2180  ac_status=$?
2181  if test -s conftest.err; then
2182    grep -v '^ *+' conftest.err >conftest.er1
2183    cat conftest.er1 >&5
2184    mv -f conftest.er1 conftest.err
2185  fi
2186  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2187  test $ac_status = 0; } && {
2188	 test -z "$ac_c_werror_flag" ||
2189	 test ! -s conftest.err
2190       } && test -s conftest.$ac_objext; then :
2191  ac_retval=0
2192else
2193  $as_echo "$as_me: failed program was:" >&5
2194sed 's/^/| /' conftest.$ac_ext >&5
2195
2196	ac_retval=1
2197fi
2198  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199  as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_try_compile
2202
2203# ac_fn_cxx_try_compile LINENO
2204# ----------------------------
2205# Try to compile conftest.$ac_ext, and return whether this succeeded.
2206ac_fn_cxx_try_compile ()
2207{
2208  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209  rm -f conftest.$ac_objext
2210  if { { ac_try="$ac_compile"
2211case "(($ac_try" in
2212  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2213  *) ac_try_echo=$ac_try;;
2214esac
2215eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2216$as_echo "$ac_try_echo"; } >&5
2217  (eval "$ac_compile") 2>conftest.err
2218  ac_status=$?
2219  if test -s conftest.err; then
2220    grep -v '^ *+' conftest.err >conftest.er1
2221    cat conftest.er1 >&5
2222    mv -f conftest.er1 conftest.err
2223  fi
2224  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2225  test $ac_status = 0; } && {
2226	 test -z "$ac_cxx_werror_flag" ||
2227	 test ! -s conftest.err
2228       } && test -s conftest.$ac_objext; then :
2229  ac_retval=0
2230else
2231  $as_echo "$as_me: failed program was:" >&5
2232sed 's/^/| /' conftest.$ac_ext >&5
2233
2234	ac_retval=1
2235fi
2236  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2237  as_fn_set_status $ac_retval
2238
2239} # ac_fn_cxx_try_compile
2240
2241# ac_fn_c_try_cpp LINENO
2242# ----------------------
2243# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2244ac_fn_c_try_cpp ()
2245{
2246  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2247  if { { ac_try="$ac_cpp conftest.$ac_ext"
2248case "(($ac_try" in
2249  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2250  *) ac_try_echo=$ac_try;;
2251esac
2252eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2253$as_echo "$ac_try_echo"; } >&5
2254  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2255  ac_status=$?
2256  if test -s conftest.err; then
2257    grep -v '^ *+' conftest.err >conftest.er1
2258    cat conftest.er1 >&5
2259    mv -f conftest.er1 conftest.err
2260  fi
2261  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2262  test $ac_status = 0; } > conftest.i && {
2263	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2264	 test ! -s conftest.err
2265       }; then :
2266  ac_retval=0
2267else
2268  $as_echo "$as_me: failed program was:" >&5
2269sed 's/^/| /' conftest.$ac_ext >&5
2270
2271    ac_retval=1
2272fi
2273  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2274  as_fn_set_status $ac_retval
2275
2276} # ac_fn_c_try_cpp
2277
2278# ac_fn_cxx_try_cpp LINENO
2279# ------------------------
2280# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2281ac_fn_cxx_try_cpp ()
2282{
2283  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2284  if { { ac_try="$ac_cpp conftest.$ac_ext"
2285case "(($ac_try" in
2286  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2287  *) ac_try_echo=$ac_try;;
2288esac
2289eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2290$as_echo "$ac_try_echo"; } >&5
2291  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2292  ac_status=$?
2293  if test -s conftest.err; then
2294    grep -v '^ *+' conftest.err >conftest.er1
2295    cat conftest.er1 >&5
2296    mv -f conftest.er1 conftest.err
2297  fi
2298  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2299  test $ac_status = 0; } > conftest.i && {
2300	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2301	 test ! -s conftest.err
2302       }; then :
2303  ac_retval=0
2304else
2305  $as_echo "$as_me: failed program was:" >&5
2306sed 's/^/| /' conftest.$ac_ext >&5
2307
2308    ac_retval=1
2309fi
2310  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2311  as_fn_set_status $ac_retval
2312
2313} # ac_fn_cxx_try_cpp
2314
2315# ac_fn_objc_try_compile LINENO
2316# -----------------------------
2317# Try to compile conftest.$ac_ext, and return whether this succeeded.
2318ac_fn_objc_try_compile ()
2319{
2320  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2321  rm -f conftest.$ac_objext
2322  if { { ac_try="$ac_compile"
2323case "(($ac_try" in
2324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2325  *) ac_try_echo=$ac_try;;
2326esac
2327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2328$as_echo "$ac_try_echo"; } >&5
2329  (eval "$ac_compile") 2>conftest.err
2330  ac_status=$?
2331  if test -s conftest.err; then
2332    grep -v '^ *+' conftest.err >conftest.er1
2333    cat conftest.er1 >&5
2334    mv -f conftest.er1 conftest.err
2335  fi
2336  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2337  test $ac_status = 0; } && {
2338	 test -z "$ac_objc_werror_flag" ||
2339	 test ! -s conftest.err
2340       } && test -s conftest.$ac_objext; then :
2341  ac_retval=0
2342else
2343  $as_echo "$as_me: failed program was:" >&5
2344sed 's/^/| /' conftest.$ac_ext >&5
2345
2346	ac_retval=1
2347fi
2348  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2349  as_fn_set_status $ac_retval
2350
2351} # ac_fn_objc_try_compile
2352
2353# ac_fn_c_try_link LINENO
2354# -----------------------
2355# Try to link conftest.$ac_ext, and return whether this succeeded.
2356ac_fn_c_try_link ()
2357{
2358  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2359  rm -f conftest.$ac_objext conftest$ac_exeext
2360  if { { ac_try="$ac_link"
2361case "(($ac_try" in
2362  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2363  *) ac_try_echo=$ac_try;;
2364esac
2365eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2366$as_echo "$ac_try_echo"; } >&5
2367  (eval "$ac_link") 2>conftest.err
2368  ac_status=$?
2369  if test -s conftest.err; then
2370    grep -v '^ *+' conftest.err >conftest.er1
2371    cat conftest.er1 >&5
2372    mv -f conftest.er1 conftest.err
2373  fi
2374  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2375  test $ac_status = 0; } && {
2376	 test -z "$ac_c_werror_flag" ||
2377	 test ! -s conftest.err
2378       } && test -s conftest$ac_exeext && {
2379	 test "$cross_compiling" = yes ||
2380	 test -x conftest$ac_exeext
2381       }; then :
2382  ac_retval=0
2383else
2384  $as_echo "$as_me: failed program was:" >&5
2385sed 's/^/| /' conftest.$ac_ext >&5
2386
2387	ac_retval=1
2388fi
2389  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2390  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2391  # interfere with the next link command; also delete a directory that is
2392  # left behind by Apple's compiler.  We do this before executing the actions.
2393  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2394  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2395  as_fn_set_status $ac_retval
2396
2397} # ac_fn_c_try_link
2398
2399# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2400# ---------------------------------------------------------
2401# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2402# the include files in INCLUDES and setting the cache variable VAR
2403# accordingly.
2404ac_fn_cxx_check_header_mongrel ()
2405{
2406  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2407  if eval \${$3+:} false; then :
2408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2409$as_echo_n "checking for $2... " >&6; }
2410if eval \${$3+:} false; then :
2411  $as_echo_n "(cached) " >&6
2412fi
2413eval ac_res=\$$3
2414	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2415$as_echo "$ac_res" >&6; }
2416else
2417  # Is the header compilable?
2418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2419$as_echo_n "checking $2 usability... " >&6; }
2420cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2421/* end confdefs.h.  */
2422$4
2423#include <$2>
2424_ACEOF
2425if ac_fn_cxx_try_compile "$LINENO"; then :
2426  ac_header_compiler=yes
2427else
2428  ac_header_compiler=no
2429fi
2430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2432$as_echo "$ac_header_compiler" >&6; }
2433
2434# Is the header present?
2435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2436$as_echo_n "checking $2 presence... " >&6; }
2437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2438/* end confdefs.h.  */
2439#include <$2>
2440_ACEOF
2441if ac_fn_cxx_try_cpp "$LINENO"; then :
2442  ac_header_preproc=yes
2443else
2444  ac_header_preproc=no
2445fi
2446rm -f conftest.err conftest.i conftest.$ac_ext
2447{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2448$as_echo "$ac_header_preproc" >&6; }
2449
2450# So?  What about this header?
2451case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2452  yes:no: )
2453    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2454$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2455    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2456$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2457    ;;
2458  no:yes:* )
2459    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2460$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2461    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2462$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2463    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2464$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2465    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2466$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2467    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2468$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2469( $as_echo "## ----------------------------------------- ##
2470## Report this to build-dev@openjdk.java.net ##
2471## ----------------------------------------- ##"
2472     ) | sed "s/^/$as_me: WARNING:     /" >&2
2473    ;;
2474esac
2475  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2476$as_echo_n "checking for $2... " >&6; }
2477if eval \${$3+:} false; then :
2478  $as_echo_n "(cached) " >&6
2479else
2480  eval "$3=\$ac_header_compiler"
2481fi
2482eval ac_res=\$$3
2483	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2484$as_echo "$ac_res" >&6; }
2485fi
2486  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2487
2488} # ac_fn_cxx_check_header_mongrel
2489
2490# ac_fn_cxx_try_run LINENO
2491# ------------------------
2492# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2493# that executables *can* be run.
2494ac_fn_cxx_try_run ()
2495{
2496  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2497  if { { ac_try="$ac_link"
2498case "(($ac_try" in
2499  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2500  *) ac_try_echo=$ac_try;;
2501esac
2502eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2503$as_echo "$ac_try_echo"; } >&5
2504  (eval "$ac_link") 2>&5
2505  ac_status=$?
2506  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2507  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2508  { { case "(($ac_try" in
2509  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2510  *) ac_try_echo=$ac_try;;
2511esac
2512eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2513$as_echo "$ac_try_echo"; } >&5
2514  (eval "$ac_try") 2>&5
2515  ac_status=$?
2516  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2517  test $ac_status = 0; }; }; then :
2518  ac_retval=0
2519else
2520  $as_echo "$as_me: program exited with status $ac_status" >&5
2521       $as_echo "$as_me: failed program was:" >&5
2522sed 's/^/| /' conftest.$ac_ext >&5
2523
2524       ac_retval=$ac_status
2525fi
2526  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2527  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2528  as_fn_set_status $ac_retval
2529
2530} # ac_fn_cxx_try_run
2531
2532# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2533# ---------------------------------------------------------
2534# Tests whether HEADER exists and can be compiled using the include files in
2535# INCLUDES, setting the cache variable VAR accordingly.
2536ac_fn_cxx_check_header_compile ()
2537{
2538  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2540$as_echo_n "checking for $2... " >&6; }
2541if eval \${$3+:} false; then :
2542  $as_echo_n "(cached) " >&6
2543else
2544  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2545/* end confdefs.h.  */
2546$4
2547#include <$2>
2548_ACEOF
2549if ac_fn_cxx_try_compile "$LINENO"; then :
2550  eval "$3=yes"
2551else
2552  eval "$3=no"
2553fi
2554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2555fi
2556eval ac_res=\$$3
2557	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2558$as_echo "$ac_res" >&6; }
2559  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2560
2561} # ac_fn_cxx_check_header_compile
2562
2563# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2564# ----------------------------------------------
2565# Tries to find the compile-time value of EXPR in a program that includes
2566# INCLUDES, setting VAR accordingly. Returns whether the value could be
2567# computed
2568ac_fn_cxx_compute_int ()
2569{
2570  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2571  if test "$cross_compiling" = yes; then
2572    # Depending upon the size, compute the lo and hi bounds.
2573cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2574/* end confdefs.h.  */
2575$4
2576int
2577main ()
2578{
2579static int test_array [1 - 2 * !(($2) >= 0)];
2580test_array [0] = 0;
2581return test_array [0];
2582
2583  ;
2584  return 0;
2585}
2586_ACEOF
2587if ac_fn_cxx_try_compile "$LINENO"; then :
2588  ac_lo=0 ac_mid=0
2589  while :; do
2590    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2591/* end confdefs.h.  */
2592$4
2593int
2594main ()
2595{
2596static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2597test_array [0] = 0;
2598return test_array [0];
2599
2600  ;
2601  return 0;
2602}
2603_ACEOF
2604if ac_fn_cxx_try_compile "$LINENO"; then :
2605  ac_hi=$ac_mid; break
2606else
2607  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2608			if test $ac_lo -le $ac_mid; then
2609			  ac_lo= ac_hi=
2610			  break
2611			fi
2612			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2613fi
2614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2615  done
2616else
2617  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2618/* end confdefs.h.  */
2619$4
2620int
2621main ()
2622{
2623static int test_array [1 - 2 * !(($2) < 0)];
2624test_array [0] = 0;
2625return test_array [0];
2626
2627  ;
2628  return 0;
2629}
2630_ACEOF
2631if ac_fn_cxx_try_compile "$LINENO"; then :
2632  ac_hi=-1 ac_mid=-1
2633  while :; do
2634    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2635/* end confdefs.h.  */
2636$4
2637int
2638main ()
2639{
2640static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2641test_array [0] = 0;
2642return test_array [0];
2643
2644  ;
2645  return 0;
2646}
2647_ACEOF
2648if ac_fn_cxx_try_compile "$LINENO"; then :
2649  ac_lo=$ac_mid; break
2650else
2651  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2652			if test $ac_mid -le $ac_hi; then
2653			  ac_lo= ac_hi=
2654			  break
2655			fi
2656			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2657fi
2658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2659  done
2660else
2661  ac_lo= ac_hi=
2662fi
2663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2664fi
2665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2666# Binary search between lo and hi bounds.
2667while test "x$ac_lo" != "x$ac_hi"; do
2668  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2669  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2670/* end confdefs.h.  */
2671$4
2672int
2673main ()
2674{
2675static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2676test_array [0] = 0;
2677return test_array [0];
2678
2679  ;
2680  return 0;
2681}
2682_ACEOF
2683if ac_fn_cxx_try_compile "$LINENO"; then :
2684  ac_hi=$ac_mid
2685else
2686  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2687fi
2688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689done
2690case $ac_lo in #((
2691?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2692'') ac_retval=1 ;;
2693esac
2694  else
2695    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2696/* end confdefs.h.  */
2697$4
2698static long int longval () { return $2; }
2699static unsigned long int ulongval () { return $2; }
2700#include <stdio.h>
2701#include <stdlib.h>
2702int
2703main ()
2704{
2705
2706  FILE *f = fopen ("conftest.val", "w");
2707  if (! f)
2708    return 1;
2709  if (($2) < 0)
2710    {
2711      long int i = longval ();
2712      if (i != ($2))
2713	return 1;
2714      fprintf (f, "%ld", i);
2715    }
2716  else
2717    {
2718      unsigned long int i = ulongval ();
2719      if (i != ($2))
2720	return 1;
2721      fprintf (f, "%lu", i);
2722    }
2723  /* Do not output a trailing newline, as this causes \r\n confusion
2724     on some platforms.  */
2725  return ferror (f) || fclose (f) != 0;
2726
2727  ;
2728  return 0;
2729}
2730_ACEOF
2731if ac_fn_cxx_try_run "$LINENO"; then :
2732  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2733else
2734  ac_retval=1
2735fi
2736rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2737  conftest.$ac_objext conftest.beam conftest.$ac_ext
2738rm -f conftest.val
2739
2740  fi
2741  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2742  as_fn_set_status $ac_retval
2743
2744} # ac_fn_cxx_compute_int
2745
2746# ac_fn_cxx_try_link LINENO
2747# -------------------------
2748# Try to link conftest.$ac_ext, and return whether this succeeded.
2749ac_fn_cxx_try_link ()
2750{
2751  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2752  rm -f conftest.$ac_objext conftest$ac_exeext
2753  if { { ac_try="$ac_link"
2754case "(($ac_try" in
2755  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2756  *) ac_try_echo=$ac_try;;
2757esac
2758eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2759$as_echo "$ac_try_echo"; } >&5
2760  (eval "$ac_link") 2>conftest.err
2761  ac_status=$?
2762  if test -s conftest.err; then
2763    grep -v '^ *+' conftest.err >conftest.er1
2764    cat conftest.er1 >&5
2765    mv -f conftest.er1 conftest.err
2766  fi
2767  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2768  test $ac_status = 0; } && {
2769	 test -z "$ac_cxx_werror_flag" ||
2770	 test ! -s conftest.err
2771       } && test -s conftest$ac_exeext && {
2772	 test "$cross_compiling" = yes ||
2773	 test -x conftest$ac_exeext
2774       }; then :
2775  ac_retval=0
2776else
2777  $as_echo "$as_me: failed program was:" >&5
2778sed 's/^/| /' conftest.$ac_ext >&5
2779
2780	ac_retval=1
2781fi
2782  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2783  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2784  # interfere with the next link command; also delete a directory that is
2785  # left behind by Apple's compiler.  We do this before executing the actions.
2786  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2787  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2788  as_fn_set_status $ac_retval
2789
2790} # ac_fn_cxx_try_link
2791
2792# ac_fn_cxx_check_func LINENO FUNC VAR
2793# ------------------------------------
2794# Tests whether FUNC exists, setting the cache variable VAR accordingly
2795ac_fn_cxx_check_func ()
2796{
2797  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2798  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2799$as_echo_n "checking for $2... " >&6; }
2800if eval \${$3+:} false; then :
2801  $as_echo_n "(cached) " >&6
2802else
2803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804/* end confdefs.h.  */
2805/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2806   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2807#define $2 innocuous_$2
2808
2809/* System header to define __stub macros and hopefully few prototypes,
2810    which can conflict with char $2 (); below.
2811    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2812    <limits.h> exists even on freestanding compilers.  */
2813
2814#ifdef __STDC__
2815# include <limits.h>
2816#else
2817# include <assert.h>
2818#endif
2819
2820#undef $2
2821
2822/* Override any GCC internal prototype to avoid an error.
2823   Use char because int might match the return type of a GCC
2824   builtin and then its argument prototype would still apply.  */
2825#ifdef __cplusplus
2826extern "C"
2827#endif
2828char $2 ();
2829/* The GNU C library defines this for functions which it implements
2830    to always fail with ENOSYS.  Some functions are actually named
2831    something starting with __ and the normal name is an alias.  */
2832#if defined __stub_$2 || defined __stub___$2
2833choke me
2834#endif
2835
2836int
2837main ()
2838{
2839return $2 ();
2840  ;
2841  return 0;
2842}
2843_ACEOF
2844if ac_fn_cxx_try_link "$LINENO"; then :
2845  eval "$3=yes"
2846else
2847  eval "$3=no"
2848fi
2849rm -f core conftest.err conftest.$ac_objext \
2850    conftest$ac_exeext conftest.$ac_ext
2851fi
2852eval ac_res=\$$3
2853	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2854$as_echo "$ac_res" >&6; }
2855  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2856
2857} # ac_fn_cxx_check_func
2858
2859# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2860# -------------------------------------------------------
2861# Tests whether HEADER exists and can be compiled using the include files in
2862# INCLUDES, setting the cache variable VAR accordingly.
2863ac_fn_c_check_header_compile ()
2864{
2865  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2866  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2867$as_echo_n "checking for $2... " >&6; }
2868if eval \${$3+:} false; then :
2869  $as_echo_n "(cached) " >&6
2870else
2871  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2872/* end confdefs.h.  */
2873$4
2874#include <$2>
2875_ACEOF
2876if ac_fn_c_try_compile "$LINENO"; then :
2877  eval "$3=yes"
2878else
2879  eval "$3=no"
2880fi
2881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2882fi
2883eval ac_res=\$$3
2884	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2885$as_echo "$ac_res" >&6; }
2886  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2887
2888} # ac_fn_c_check_header_compile
2889cat >config.log <<_ACEOF
2890This file contains any messages produced by compilers while
2891running configure, to aid debugging if configure makes a mistake.
2892
2893It was created by OpenJDK $as_me jdk9, which was
2894generated by GNU Autoconf 2.69.  Invocation command line was
2895
2896  $ $0 $@
2897
2898_ACEOF
2899exec 5>>config.log
2900{
2901cat <<_ASUNAME
2902## --------- ##
2903## Platform. ##
2904## --------- ##
2905
2906hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2907uname -m = `(uname -m) 2>/dev/null || echo unknown`
2908uname -r = `(uname -r) 2>/dev/null || echo unknown`
2909uname -s = `(uname -s) 2>/dev/null || echo unknown`
2910uname -v = `(uname -v) 2>/dev/null || echo unknown`
2911
2912/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2913/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2914
2915/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2916/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2917/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2918/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2919/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2920/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2921/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2922
2923_ASUNAME
2924
2925as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2926for as_dir in $PATH
2927do
2928  IFS=$as_save_IFS
2929  test -z "$as_dir" && as_dir=.
2930    $as_echo "PATH: $as_dir"
2931  done
2932IFS=$as_save_IFS
2933
2934} >&5
2935
2936cat >&5 <<_ACEOF
2937
2938
2939## ----------- ##
2940## Core tests. ##
2941## ----------- ##
2942
2943_ACEOF
2944
2945
2946# Keep a trace of the command line.
2947# Strip out --no-create and --no-recursion so they do not pile up.
2948# Strip out --silent because we don't want to record it for future runs.
2949# Also quote any args containing shell meta-characters.
2950# Make two passes to allow for proper duplicate-argument suppression.
2951ac_configure_args=
2952ac_configure_args0=
2953ac_configure_args1=
2954ac_must_keep_next=false
2955for ac_pass in 1 2
2956do
2957  for ac_arg
2958  do
2959    case $ac_arg in
2960    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2961    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2962    | -silent | --silent | --silen | --sile | --sil)
2963      continue ;;
2964    *\'*)
2965      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2966    esac
2967    case $ac_pass in
2968    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2969    2)
2970      as_fn_append ac_configure_args1 " '$ac_arg'"
2971      if test $ac_must_keep_next = true; then
2972	ac_must_keep_next=false # Got value, back to normal.
2973      else
2974	case $ac_arg in
2975	  *=* | --config-cache | -C | -disable-* | --disable-* \
2976	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2977	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2978	  | -with-* | --with-* | -without-* | --without-* | --x)
2979	    case "$ac_configure_args0 " in
2980	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2981	    esac
2982	    ;;
2983	  -* ) ac_must_keep_next=true ;;
2984	esac
2985      fi
2986      as_fn_append ac_configure_args " '$ac_arg'"
2987      ;;
2988    esac
2989  done
2990done
2991{ ac_configure_args0=; unset ac_configure_args0;}
2992{ ac_configure_args1=; unset ac_configure_args1;}
2993
2994# When interrupted or exit'd, cleanup temporary files, and complete
2995# config.log.  We remove comments because anyway the quotes in there
2996# would cause problems or look ugly.
2997# WARNING: Use '\'' to represent an apostrophe within the trap.
2998# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2999trap 'exit_status=$?
3000  # Save into config.log some information that might help in debugging.
3001  {
3002    echo
3003
3004    $as_echo "## ---------------- ##
3005## Cache variables. ##
3006## ---------------- ##"
3007    echo
3008    # The following way of writing the cache mishandles newlines in values,
3009(
3010  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3011    eval ac_val=\$$ac_var
3012    case $ac_val in #(
3013    *${as_nl}*)
3014      case $ac_var in #(
3015      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3016$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3017      esac
3018      case $ac_var in #(
3019      _ | IFS | as_nl) ;; #(
3020      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3021      *) { eval $ac_var=; unset $ac_var;} ;;
3022      esac ;;
3023    esac
3024  done
3025  (set) 2>&1 |
3026    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3027    *${as_nl}ac_space=\ *)
3028      sed -n \
3029	"s/'\''/'\''\\\\'\'''\''/g;
3030	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3031      ;; #(
3032    *)
3033      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3034      ;;
3035    esac |
3036    sort
3037)
3038    echo
3039
3040    $as_echo "## ----------------- ##
3041## Output variables. ##
3042## ----------------- ##"
3043    echo
3044    for ac_var in $ac_subst_vars
3045    do
3046      eval ac_val=\$$ac_var
3047      case $ac_val in
3048      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3049      esac
3050      $as_echo "$ac_var='\''$ac_val'\''"
3051    done | sort
3052    echo
3053
3054    if test -n "$ac_subst_files"; then
3055      $as_echo "## ------------------- ##
3056## File substitutions. ##
3057## ------------------- ##"
3058      echo
3059      for ac_var in $ac_subst_files
3060      do
3061	eval ac_val=\$$ac_var
3062	case $ac_val in
3063	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3064	esac
3065	$as_echo "$ac_var='\''$ac_val'\''"
3066      done | sort
3067      echo
3068    fi
3069
3070    if test -s confdefs.h; then
3071      $as_echo "## ----------- ##
3072## confdefs.h. ##
3073## ----------- ##"
3074      echo
3075      cat confdefs.h
3076      echo
3077    fi
3078    test "$ac_signal" != 0 &&
3079      $as_echo "$as_me: caught signal $ac_signal"
3080    $as_echo "$as_me: exit $exit_status"
3081  } >&5
3082  rm -f core *.core core.conftest.* &&
3083    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3084    exit $exit_status
3085' 0
3086for ac_signal in 1 2 13 15; do
3087  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3088done
3089ac_signal=0
3090
3091# confdefs.h avoids OS command line length limits that DEFS can exceed.
3092rm -f -r conftest* confdefs.h
3093
3094$as_echo "/* confdefs.h */" > confdefs.h
3095
3096# Predefined preprocessor variables.
3097
3098cat >>confdefs.h <<_ACEOF
3099#define PACKAGE_NAME "$PACKAGE_NAME"
3100_ACEOF
3101
3102cat >>confdefs.h <<_ACEOF
3103#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3104_ACEOF
3105
3106cat >>confdefs.h <<_ACEOF
3107#define PACKAGE_VERSION "$PACKAGE_VERSION"
3108_ACEOF
3109
3110cat >>confdefs.h <<_ACEOF
3111#define PACKAGE_STRING "$PACKAGE_STRING"
3112_ACEOF
3113
3114cat >>confdefs.h <<_ACEOF
3115#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3116_ACEOF
3117
3118cat >>confdefs.h <<_ACEOF
3119#define PACKAGE_URL "$PACKAGE_URL"
3120_ACEOF
3121
3122
3123# Let the site file select an alternate cache file if it wants to.
3124# Prefer an explicitly selected file to automatically selected ones.
3125ac_site_file1=NONE
3126ac_site_file2=NONE
3127if test -n "$CONFIG_SITE"; then
3128  # We do not want a PATH search for config.site.
3129  case $CONFIG_SITE in #((
3130    -*)  ac_site_file1=./$CONFIG_SITE;;
3131    */*) ac_site_file1=$CONFIG_SITE;;
3132    *)   ac_site_file1=./$CONFIG_SITE;;
3133  esac
3134elif test "x$prefix" != xNONE; then
3135  ac_site_file1=$prefix/share/config.site
3136  ac_site_file2=$prefix/etc/config.site
3137else
3138  ac_site_file1=$ac_default_prefix/share/config.site
3139  ac_site_file2=$ac_default_prefix/etc/config.site
3140fi
3141for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3142do
3143  test "x$ac_site_file" = xNONE && continue
3144  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3145    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3146$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3147    sed 's/^/| /' "$ac_site_file" >&5
3148    . "$ac_site_file" \
3149      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3150$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3151as_fn_error $? "failed to load site script $ac_site_file
3152See \`config.log' for more details" "$LINENO" 5; }
3153  fi
3154done
3155
3156if test -r "$cache_file"; then
3157  # Some versions of bash will fail to source /dev/null (special files
3158  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3159  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3160    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3161$as_echo "$as_me: loading cache $cache_file" >&6;}
3162    case $cache_file in
3163      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3164      *)                      . "./$cache_file";;
3165    esac
3166  fi
3167else
3168  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3169$as_echo "$as_me: creating cache $cache_file" >&6;}
3170  >$cache_file
3171fi
3172
3173# Check that the precious variables saved in the cache have kept the same
3174# value.
3175ac_cache_corrupted=false
3176for ac_var in $ac_precious_vars; do
3177  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3178  eval ac_new_set=\$ac_env_${ac_var}_set
3179  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3180  eval ac_new_val=\$ac_env_${ac_var}_value
3181  case $ac_old_set,$ac_new_set in
3182    set,)
3183      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3184$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3185      ac_cache_corrupted=: ;;
3186    ,set)
3187      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3188$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3189      ac_cache_corrupted=: ;;
3190    ,);;
3191    *)
3192      if test "x$ac_old_val" != "x$ac_new_val"; then
3193	# differences in whitespace do not lead to failure.
3194	ac_old_val_w=`echo x $ac_old_val`
3195	ac_new_val_w=`echo x $ac_new_val`
3196	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3197	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3198$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3199	  ac_cache_corrupted=:
3200	else
3201	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3202$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3203	  eval $ac_var=\$ac_old_val
3204	fi
3205	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3206$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3207	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3208$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3209      fi;;
3210  esac
3211  # Pass precious variables to config.status.
3212  if test "$ac_new_set" = set; then
3213    case $ac_new_val in
3214    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3215    *) ac_arg=$ac_var=$ac_new_val ;;
3216    esac
3217    case " $ac_configure_args " in
3218      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3219      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3220    esac
3221  fi
3222done
3223if $ac_cache_corrupted; then
3224  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3225$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3226  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3227$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3228  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3229fi
3230## -------------------- ##
3231## Main body of script. ##
3232## -------------------- ##
3233
3234ac_ext=c
3235ac_cpp='$CPP $CPPFLAGS'
3236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3238ac_compiler_gnu=$ac_cv_c_compiler_gnu
3239
3240
3241
3242ac_aux_dir=
3243for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3244  if test -f "$ac_dir/install-sh"; then
3245    ac_aux_dir=$ac_dir
3246    ac_install_sh="$ac_aux_dir/install-sh -c"
3247    break
3248  elif test -f "$ac_dir/install.sh"; then
3249    ac_aux_dir=$ac_dir
3250    ac_install_sh="$ac_aux_dir/install.sh -c"
3251    break
3252  elif test -f "$ac_dir/shtool"; then
3253    ac_aux_dir=$ac_dir
3254    ac_install_sh="$ac_aux_dir/shtool install -c"
3255    break
3256  fi
3257done
3258if test -z "$ac_aux_dir"; then
3259  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
3260fi
3261
3262# These three variables are undocumented and unsupported,
3263# and are intended to be withdrawn in a future Autoconf release.
3264# They can cause serious problems if a builder's source tree is in a directory
3265# whose full name contains unusual characters.
3266ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3267ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3268ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3269
3270
3271# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3272
3273#
3274# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3275# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3276#
3277# This code is free software; you can redistribute it and/or modify it
3278# under the terms of the GNU General Public License version 2 only, as
3279# published by the Free Software Foundation.  Oracle designates this
3280# particular file as subject to the "Classpath" exception as provided
3281# by Oracle in the LICENSE file that accompanied this code.
3282#
3283# This code is distributed in the hope that it will be useful, but WITHOUT
3284# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3285# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3286# version 2 for more details (a copy is included in the LICENSE file that
3287# accompanied this code).
3288#
3289# You should have received a copy of the GNU General Public License version
3290# 2 along with this work; if not, write to the Free Software Foundation,
3291# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3292#
3293# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3294# or visit www.oracle.com if you need additional information or have any
3295# questions.
3296#
3297
3298#
3299# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3300#
3301# This program is free software; you can redistribute it and/or modify
3302# it under the terms of the GNU General Public License as published by
3303# the Free Software Foundation; either version 2 of the License, or
3304# (at your option) any later version.
3305#
3306# This program is distributed in the hope that it will be useful, but
3307# WITHOUT ANY WARRANTY; without even the implied warranty of
3308# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3309# General Public License for more details.
3310#
3311# You should have received a copy of the GNU General Public License
3312# along with this program; if not, write to the Free Software
3313# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3314#
3315# As a special exception to the GNU General Public License, if you
3316# distribute this file as part of a program that contains a
3317# configuration script generated by Autoconf, you may include it under
3318# the same distribution terms that you use for the rest of that program.
3319
3320# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3321# ----------------------------------
3322# PKG_PROG_PKG_CONFIG
3323
3324# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3325#
3326# Check to see whether a particular set of modules exists.  Similar
3327# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3328#
3329#
3330# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3331# this or PKG_CHECK_MODULES is called, or make sure to call
3332# PKG_CHECK_EXISTS manually
3333# --------------------------------------------------------------
3334
3335
3336
3337# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3338# ---------------------------------------------
3339# _PKG_CONFIG
3340
3341# _PKG_SHORT_ERRORS_SUPPORTED
3342# -----------------------------
3343# _PKG_SHORT_ERRORS_SUPPORTED
3344
3345
3346# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3347# [ACTION-IF-NOT-FOUND])
3348#
3349#
3350# Note that if there is a possibility the first call to
3351# PKG_CHECK_MODULES might not happen, you should be sure to include an
3352# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3353#
3354#
3355# --------------------------------------------------------------
3356# PKG_CHECK_MODULES
3357
3358
3359# Include these first...
3360#
3361# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3362# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3363#
3364# This code is free software; you can redistribute it and/or modify it
3365# under the terms of the GNU General Public License version 2 only, as
3366# published by the Free Software Foundation.  Oracle designates this
3367# particular file as subject to the "Classpath" exception as provided
3368# by Oracle in the LICENSE file that accompanied this code.
3369#
3370# This code is distributed in the hope that it will be useful, but WITHOUT
3371# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3372# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3373# version 2 for more details (a copy is included in the LICENSE file that
3374# accompanied this code).
3375#
3376# You should have received a copy of the GNU General Public License version
3377# 2 along with this work; if not, write to the Free Software Foundation,
3378# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3379#
3380# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3381# or visit www.oracle.com if you need additional information or have any
3382# questions.
3383#
3384
3385# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3386# If so, then append $1 to $2 \
3387# Also set JVM_ARG_OK to true/false depending on outcome.
3388
3389
3390# Appends a string to a path variable, only adding the : when needed.
3391
3392
3393# Prepends a string to a path variable, only adding the : when needed.
3394
3395
3396# This will make sure the given variable points to a full and proper
3397# path. This means:
3398# 1) There will be no spaces in the path. On posix platforms,
3399#    spaces in the path will result in an error. On Windows,
3400#    the path will be rewritten using short-style to be space-free.
3401# 2) The path will be absolute, and it will be in unix-style (on
3402#     cygwin).
3403# $1: The name of the variable to fix
3404
3405
3406# This will make sure the given variable points to a executable
3407# with a full and proper path. This means:
3408# 1) There will be no spaces in the path. On posix platforms,
3409#    spaces in the path will result in an error. On Windows,
3410#    the path will be rewritten using short-style to be space-free.
3411# 2) The path will be absolute, and it will be in unix-style (on
3412#     cygwin).
3413# Any arguments given to the executable is preserved.
3414# If the input variable does not have a directory specification, then
3415# it need to be in the PATH.
3416# $1: The name of the variable to fix
3417
3418
3419
3420
3421# Register a --with argument but mark it as deprecated
3422# $1: The name of the with argument to deprecate, not including --with-
3423
3424
3425# Register a --enable argument but mark it as deprecated
3426# $1: The name of the with argument to deprecate, not including --enable-
3427# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3428
3429
3430
3431
3432# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3433# $1: variable to check
3434
3435
3436# Check that there are no unprocessed overridden variables left.
3437# If so, they are an incorrect argument and we will exit with an error.
3438
3439
3440# Setup a tool for the given variable. If correctly specified by the user,
3441# use that value, otherwise search for the tool using the supplied code snippet.
3442# $1: variable to set
3443# $2: code snippet to call to look for the tool
3444
3445
3446# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3447# $1: variable to set
3448# $2: executable name (or list of names) to look for
3449
3450
3451# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3452# $1: variable to set
3453# $2: executable name (or list of names) to look for
3454
3455
3456# Like BASIC_PATH_PROGS but fails if no tool was found.
3457# $1: variable to set
3458# $2: executable name (or list of names) to look for
3459
3460
3461# Like BASIC_SETUP_TOOL but fails if no tool was found.
3462# $1: variable to set
3463# $2: autoconf macro to call to look for the special tool
3464
3465
3466# Setup the most fundamental tools that relies on not much else to set up,
3467# but is used by much of the early bootstrap code.
3468
3469
3470# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480#%%% Simple tools %%%
3481
3482# Check if we have found a usable version of make
3483# $1: the path to a potential make binary (or empty)
3484# $2: the description on how we found this
3485
3486
3487# Goes looking for a usable version of GNU make.
3488
3489
3490
3491
3492
3493
3494# Check if build directory is on local disk. If not possible to determine,
3495# we prefer to claim it's local.
3496# Argument 1: directory to test
3497# Argument 2: what to do if it is on local disk
3498# Argument 3: what to do otherwise (remote disk or failure)
3499
3500
3501# Check that source files have basic read permissions set. This might
3502# not be the case in cygwin in certain conditions.
3503
3504
3505
3506
3507#
3508# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3509# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3510#
3511# This code is free software; you can redistribute it and/or modify it
3512# under the terms of the GNU General Public License version 2 only, as
3513# published by the Free Software Foundation.  Oracle designates this
3514# particular file as subject to the "Classpath" exception as provided
3515# by Oracle in the LICENSE file that accompanied this code.
3516#
3517# This code is distributed in the hope that it will be useful, but WITHOUT
3518# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3519# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3520# version 2 for more details (a copy is included in the LICENSE file that
3521# accompanied this code).
3522#
3523# You should have received a copy of the GNU General Public License version
3524# 2 along with this work; if not, write to the Free Software Foundation,
3525# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3526#
3527# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3528# or visit www.oracle.com if you need additional information or have any
3529# questions.
3530#
3531
3532
3533
3534
3535
3536# Helper function which possibly converts a path using DOS-style short mode.
3537# If so, the updated path is stored in $new_path.
3538# $1: The path to check
3539
3540
3541# Helper function which possibly converts a path using DOS-style short mode.
3542# If so, the updated path is stored in $new_path.
3543# $1: The path to check
3544
3545
3546# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3547# and could probably be heavily simplified. However, all changes in this
3548# area tend to need lot of testing in different scenarios, and in lack of
3549# proper unit testing, cleaning this up has not been deemed worth the effort
3550# at the moment.
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3561
3562
3563
3564
3565#
3566# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3567# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3568#
3569# This code is free software; you can redistribute it and/or modify it
3570# under the terms of the GNU General Public License version 2 only, as
3571# published by the Free Software Foundation.  Oracle designates this
3572# particular file as subject to the "Classpath" exception as provided
3573# by Oracle in the LICENSE file that accompanied this code.
3574#
3575# This code is distributed in the hope that it will be useful, but WITHOUT
3576# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3577# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3578# version 2 for more details (a copy is included in the LICENSE file that
3579# accompanied this code).
3580#
3581# You should have received a copy of the GNU General Public License version
3582# 2 along with this work; if not, write to the Free Software Foundation,
3583# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3584#
3585# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3586# or visit www.oracle.com if you need additional information or have any
3587# questions.
3588#
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600# ... then the rest
3601#
3602# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3603# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3604#
3605# This code is free software; you can redistribute it and/or modify it
3606# under the terms of the GNU General Public License version 2 only, as
3607# published by the Free Software Foundation.  Oracle designates this
3608# particular file as subject to the "Classpath" exception as provided
3609# by Oracle in the LICENSE file that accompanied this code.
3610#
3611# This code is distributed in the hope that it will be useful, but WITHOUT
3612# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3613# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3614# version 2 for more details (a copy is included in the LICENSE file that
3615# accompanied this code).
3616#
3617# You should have received a copy of the GNU General Public License version
3618# 2 along with this work; if not, write to the Free Software Foundation,
3619# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3620#
3621# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3622# or visit www.oracle.com if you need additional information or have any
3623# questions.
3624#
3625
3626########################################################################
3627# This file handles detection of the Boot JDK. The Boot JDK detection
3628# process has been developed as a response to solve a complex real-world
3629# problem. Initially, it was simple, but it has grown as platform after
3630# platform, idiosyncracy after idiosyncracy has been supported.
3631#
3632# The basic idea is this:
3633# 1) You need an acceptable *) JDK to use as a Boot JDK
3634# 2) There are several ways to locate a JDK, that are mostly platform
3635#    dependent **)
3636# 3) You can have multiple JDKs installed
3637# 4) If possible, configure should try to dig out an acceptable JDK
3638#    automatically, without having to resort to command-line options
3639#
3640# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3641#     javac) and not a JRE, etc.
3642#
3643# **) On Windows we typically use a well-known path.
3644#     On MacOSX we typically use the tool java_home.
3645#     On Linux we typically find javac in the $PATH, and then follow a
3646#     chain of symlinks that often ends up in a real JDK.
3647#
3648# This leads to the code where we check in different ways to locate a
3649# JDK, and if one is found, check if it is acceptable. If not, we print
3650# our reasons for rejecting it (useful when debugging non-working
3651# configure situations) and continue checking the next one.
3652########################################################################
3653
3654# Execute the check given as argument, and verify the result
3655# If the Boot JDK was previously found, do nothing
3656# $1 A command line (typically autoconf macro) to execute
3657
3658
3659# Test: Is bootjdk explicitely set by command line arguments?
3660
3661
3662# Test: Is bootjdk available from builddeps?
3663
3664
3665# Test: Is $JAVA_HOME set?
3666
3667
3668# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3669
3670
3671# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3672# $1: Argument to the java_home binary (optional)
3673
3674
3675# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3676
3677
3678# Look for a jdk in the given path. If there are multiple, try to select the newest.
3679# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3680# $1 = Path to directory containing jdk installations.
3681# $2 = String to append to the found JDK directory to get the proper JDK home
3682
3683
3684# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3685# environmental variable as base for where to look.
3686# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3687
3688
3689# Test: Is there a JDK installed in default, well-known locations?
3690
3691
3692# Check that a command-line tool in the Boot JDK is correct
3693# $1 = name of variable to assign
3694# $2 = name of binary
3695
3696
3697###############################################################################
3698#
3699# We need a Boot JDK to bootstrap the build.
3700#
3701
3702
3703
3704
3705
3706#
3707# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3708# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3709#
3710# This code is free software; you can redistribute it and/or modify it
3711# under the terms of the GNU General Public License version 2 only, as
3712# published by the Free Software Foundation.  Oracle designates this
3713# particular file as subject to the "Classpath" exception as provided
3714# by Oracle in the LICENSE file that accompanied this code.
3715#
3716# This code is distributed in the hope that it will be useful, but WITHOUT
3717# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3718# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3719# version 2 for more details (a copy is included in the LICENSE file that
3720# accompanied this code).
3721#
3722# You should have received a copy of the GNU General Public License version
3723# 2 along with this work; if not, write to the Free Software Foundation,
3724# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3725#
3726# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3727# or visit www.oracle.com if you need additional information or have any
3728# questions.
3729#
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750#
3751# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3752# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3753#
3754# This code is free software; you can redistribute it and/or modify it
3755# under the terms of the GNU General Public License version 2 only, as
3756# published by the Free Software Foundation.  Oracle designates this
3757# particular file as subject to the "Classpath" exception as provided
3758# by Oracle in the LICENSE file that accompanied this code.
3759#
3760# This code is distributed in the hope that it will be useful, but WITHOUT
3761# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3762# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3763# version 2 for more details (a copy is included in the LICENSE file that
3764# accompanied this code).
3765#
3766# You should have received a copy of the GNU General Public License version
3767# 2 along with this work; if not, write to the Free Software Foundation,
3768# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3769#
3770# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3771# or visit www.oracle.com if you need additional information or have any
3772# questions.
3773#
3774
3775
3776
3777
3778
3779# Documentation on common flags used for solstudio in HIGHEST.
3780#
3781# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3782#          done with care, there are some assumptions below that need to
3783#          be understood about the use of pointers, and IEEE behavior.
3784#
3785# -fns: Use non-standard floating point mode (not IEEE 754)
3786# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3787# -fsingle: Use single precision floating point with 'float'
3788# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3789#   (Source with excessing pointer casting and data access with mixed
3790#    pointer types are not recommended)
3791# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3792#   (If you expect perfect errno behavior, do not use this)
3793# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3794# -xrestrict: Pointer parameters to functions do not overlap
3795#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3796#    If you pass in multiple pointers to the same data, do not use this)
3797# -xlibmil: Inline some library routines
3798#   (If you expect perfect errno behavior, do not use this)
3799# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3800#   (If you expect perfect errno behavior, do not use this)
3801#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3802
3803    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3804    # Bug?
3805    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3806    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3807    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3808    #fi
3809
3810
3811
3812
3813
3814# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3815#                                   [RUN-IF-FALSE])
3816# ------------------------------------------------------------
3817# Check that the c and c++ compilers support an argument
3818
3819
3820# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3821#                                    [RUN-IF-FALSE])
3822# ------------------------------------------------------------
3823# Check that the linker support an argument
3824
3825
3826
3827
3828#
3829# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3830# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3831#
3832# This code is free software; you can redistribute it and/or modify it
3833# under the terms of the GNU General Public License version 2 only, as
3834# published by the Free Software Foundation.  Oracle designates this
3835# particular file as subject to the "Classpath" exception as provided
3836# by Oracle in the LICENSE file that accompanied this code.
3837#
3838# This code is distributed in the hope that it will be useful, but WITHOUT
3839# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3840# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3841# version 2 for more details (a copy is included in the LICENSE file that
3842# accompanied this code).
3843#
3844# You should have received a copy of the GNU General Public License version
3845# 2 along with this work; if not, write to the Free Software Foundation,
3846# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3847#
3848# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3849# or visit www.oracle.com if you need additional information or have any
3850# questions.
3851#
3852
3853
3854
3855
3856
3857cygwin_help() {
3858  case $1 in
3859    unzip)
3860      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3861      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3862      ;;
3863    zip)
3864      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3865      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3866      ;;
3867    make)
3868      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3869      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3870      ;;
3871    freetype)
3872      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3873        HELP_MSG="To install freetype, run:
3874wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3875chmod +x /tmp/freetype-setup.exe
3876/tmp/freetype-setup.exe
3877Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3878After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3879      else
3880        HELP_MSG="You need to build a 64-bit version of freetype.
3881This is not readily available.
3882You can find source code and build instructions on
3883http://www.freetype.org/
3884If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3885      fi
3886      ;;
3887  esac
3888}
3889
3890msys_help() {
3891  PKGHANDLER_COMMAND=""
3892}
3893
3894apt_help() {
3895  case $1 in
3896    devkit)
3897      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3898    openjdk)
3899      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3900    alsa)
3901      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3902    cups)
3903      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3904    freetype)
3905      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3906    pulse)
3907      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3908    x11)
3909      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3910    ccache)
3911      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3912  esac
3913}
3914
3915yum_help() {
3916  case $1 in
3917    devkit)
3918      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3919    openjdk)
3920      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3921    alsa)
3922      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3923    cups)
3924      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3925    freetype)
3926      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3927    pulse)
3928      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3929    x11)
3930      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3931    ccache)
3932      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3933  esac
3934}
3935
3936port_help() {
3937  PKGHANDLER_COMMAND=""
3938}
3939
3940pkgutil_help() {
3941  PKGHANDLER_COMMAND=""
3942}
3943
3944pkgadd_help() {
3945  PKGHANDLER_COMMAND=""
3946}
3947
3948# This function will check if we're called from the "configure" wrapper while
3949# printing --help. If so, we will print out additional information that can
3950# only be extracted within the autoconf script, and then exit. This must be
3951# called at the very beginning in configure.ac.
3952
3953
3954
3955
3956#
3957# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3958# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3959#
3960# This code is free software; you can redistribute it and/or modify it
3961# under the terms of the GNU General Public License version 2 only, as
3962# published by the Free Software Foundation.  Oracle designates this
3963# particular file as subject to the "Classpath" exception as provided
3964# by Oracle in the LICENSE file that accompanied this code.
3965#
3966# This code is distributed in the hope that it will be useful, but WITHOUT
3967# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3968# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3969# version 2 for more details (a copy is included in the LICENSE file that
3970# accompanied this code).
3971#
3972# You should have received a copy of the GNU General Public License version
3973# 2 along with this work; if not, write to the Free Software Foundation,
3974# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3975#
3976# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3977# or visit www.oracle.com if you need additional information or have any
3978# questions.
3979#
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990###############################################################################
3991#
3992# Should we build only OpenJDK even if closed sources are present?
3993#
3994
3995
3996
3997
3998###############################################################################
3999#
4000# Setup version numbers
4001#
4002
4003
4004
4005
4006
4007
4008#
4009# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4010# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4011#
4012# This code is free software; you can redistribute it and/or modify it
4013# under the terms of the GNU General Public License version 2 only, as
4014# published by the Free Software Foundation.  Oracle designates this
4015# particular file as subject to the "Classpath" exception as provided
4016# by Oracle in the LICENSE file that accompanied this code.
4017#
4018# This code is distributed in the hope that it will be useful, but WITHOUT
4019# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4020# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4021# version 2 for more details (a copy is included in the LICENSE file that
4022# accompanied this code).
4023#
4024# You should have received a copy of the GNU General Public License version
4025# 2 along with this work; if not, write to the Free Software Foundation,
4026# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4027#
4028# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4029# or visit www.oracle.com if you need additional information or have any
4030# questions.
4031#
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051#
4052# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4053# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4054#
4055# This code is free software; you can redistribute it and/or modify it
4056# under the terms of the GNU General Public License version 2 only, as
4057# published by the Free Software Foundation.  Oracle designates this
4058# particular file as subject to the "Classpath" exception as provided
4059# by Oracle in the LICENSE file that accompanied this code.
4060#
4061# This code is distributed in the hope that it will be useful, but WITHOUT
4062# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4063# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4064# version 2 for more details (a copy is included in the LICENSE file that
4065# accompanied this code).
4066#
4067# You should have received a copy of the GNU General Public License version
4068# 2 along with this work; if not, write to the Free Software Foundation,
4069# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4070#
4071# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4072# or visit www.oracle.com if you need additional information or have any
4073# questions.
4074#
4075
4076# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4077# Converts autoconf style CPU name to OpenJDK style, into
4078# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4079
4080
4081# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4082# Converts autoconf style OS name to OpenJDK style, into
4083# VAR_OS and VAR_OS_API.
4084
4085
4086# Expects $host_os $host_cpu $build_os and $build_cpu
4087# and $with_target_bits to have been setup!
4088#
4089# Translate the standard triplet(quadruplet) definition
4090# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4091# OPENJDK_BUILD_OS, etc.
4092
4093
4094# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4095# accordingly. Must be done after setting up build and target system, but before
4096# doing anything else with these values.
4097
4098
4099# Setup the legacy variables, for controlling the old makefiles.
4100#
4101
4102
4103
4104
4105#%%% Build and target systems %%%
4106
4107
4108
4109
4110# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4111# Add -mX to various FLAGS variables.
4112
4113
4114
4115
4116
4117
4118#
4119# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4120# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4121#
4122# This code is free software; you can redistribute it and/or modify it
4123# under the terms of the GNU General Public License version 2 only, as
4124# published by the Free Software Foundation.  Oracle designates this
4125# particular file as subject to the "Classpath" exception as provided
4126# by Oracle in the LICENSE file that accompanied this code.
4127#
4128# This code is distributed in the hope that it will be useful, but WITHOUT
4129# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4130# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4131# version 2 for more details (a copy is included in the LICENSE file that
4132# accompanied this code).
4133#
4134# You should have received a copy of the GNU General Public License version
4135# 2 along with this work; if not, write to the Free Software Foundation,
4136# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4137#
4138# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4139# or visit www.oracle.com if you need additional information or have any
4140# questions.
4141#
4142
4143
4144
4145
4146
4147
4148
4149
4150#
4151# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4152# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4153#
4154# This code is free software; you can redistribute it and/or modify it
4155# under the terms of the GNU General Public License version 2 only, as
4156# published by the Free Software Foundation.  Oracle designates this
4157# particular file as subject to the "Classpath" exception as provided
4158# by Oracle in the LICENSE file that accompanied this code.
4159#
4160# This code is distributed in the hope that it will be useful, but WITHOUT
4161# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4162# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4163# version 2 for more details (a copy is included in the LICENSE file that
4164# accompanied this code).
4165#
4166# You should have received a copy of the GNU General Public License version
4167# 2 along with this work; if not, write to the Free Software Foundation,
4168# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4169#
4170# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4171# or visit www.oracle.com if you need additional information or have any
4172# questions.
4173#
4174
4175########################################################################
4176# This file is responsible for detecting, verifying and setting up the
4177# toolchain, i.e. the compiler, linker and related utilities. It will setup
4178# proper paths to the binaries, but it will not setup any flags.
4179#
4180# The binaries used is determined by the toolchain type, which is the family of
4181# compilers and related tools that are used.
4182########################################################################
4183
4184
4185# All valid toolchains, regardless of platform (used by help.m4)
4186VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4187
4188# These toolchains are valid on different platforms
4189VALID_TOOLCHAINS_linux="gcc clang"
4190VALID_TOOLCHAINS_solaris="solstudio"
4191VALID_TOOLCHAINS_macosx="gcc clang"
4192VALID_TOOLCHAINS_aix="xlc"
4193VALID_TOOLCHAINS_windows="microsoft"
4194
4195# Toolchain descriptions
4196TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4197TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4198TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4199TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4200TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4201
4202# Setup a number of variables describing how native output files are
4203# named on this platform/toolchain.
4204
4205
4206# Determine which toolchain type to use, and make sure it is valid for this
4207# platform. Setup various information about the selected toolchain.
4208
4209
4210# Before we start detecting the toolchain executables, we might need some
4211# special setup, e.g. additional paths etc.
4212
4213
4214# Restore path, etc
4215
4216
4217# Check if a compiler is of the toolchain type we expect, and save the version
4218# information from it. If the compiler does not match the expected type,
4219# this function will abort using AC_MSG_ERROR. If it matches, the version will
4220# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4221# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4222#
4223# $1 = compiler to test (CC or CXX)
4224# $2 = human readable name of compiler (C or C++)
4225
4226
4227# Try to locate the given C or C++ compiler in the path, or otherwise.
4228#
4229# $1 = compiler to test (CC or CXX)
4230# $2 = human readable name of compiler (C or C++)
4231# $3 = list of compiler names to search for
4232
4233
4234# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4235# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4236# archiver (AR). Verify that the compilers are correct according to the
4237# toolchain type.
4238
4239
4240# Setup additional tools that is considered a part of the toolchain, but not the
4241# core part. Many of these are highly platform-specific and do not exist,
4242# and/or are not needed on all platforms.
4243
4244
4245# Setup the build tools (i.e, the compiler and linker used to build programs
4246# that should be run on the build platform, not the target platform, as a build
4247# helper). Since the non-cross-compile case uses the normal, target compilers
4248# for this, we can only do this after these have been setup.
4249
4250
4251# Setup legacy variables that are still needed as alternative ways to refer to
4252# parts of the toolchain.
4253
4254
4255# Do some additional checks on the detected tools.
4256
4257
4258# Setup the JTReg Regression Test Harness.
4259
4260
4261#
4262# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4263# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4264#
4265# This code is free software; you can redistribute it and/or modify it
4266# under the terms of the GNU General Public License version 2 only, as
4267# published by the Free Software Foundation.  Oracle designates this
4268# particular file as subject to the "Classpath" exception as provided
4269# by Oracle in the LICENSE file that accompanied this code.
4270#
4271# This code is distributed in the hope that it will be useful, but WITHOUT
4272# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4273# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4274# version 2 for more details (a copy is included in the LICENSE file that
4275# accompanied this code).
4276#
4277# You should have received a copy of the GNU General Public License version
4278# 2 along with this work; if not, write to the Free Software Foundation,
4279# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4280#
4281# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4282# or visit www.oracle.com if you need additional information or have any
4283# questions.
4284#
4285
4286
4287
4288
4289
4290
4291
4292# Check if the VS env variables were setup prior to running configure.
4293# If not, then find vcvarsall.bat and run it automatically, and integrate
4294# the set env variables into the spec file.
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305# This line needs to be here, verbatim, after all includes and the dummy hook
4306# definitions. It is replaced with custom functionality when building
4307# custom sources.
4308#CUSTOM_AUTOCONF_INCLUDE
4309
4310# Do not change or remove the following line, it is needed for consistency checks:
4311DATE_WHEN_GENERATED=1402614845
4312
4313###############################################################################
4314#
4315# Initialization / Boot-strapping
4316#
4317# The bootstrapping process needs to solve the "chicken or the egg" problem,
4318# thus it jumps back and forth, each time gaining something needed later on.
4319#
4320###############################################################################
4321
4322# If we are requested to print additional help, do that and then exit.
4323# This must be the very first call.
4324
4325  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4326    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4327    $PRINTF "Which are valid to use depends on the build platform.\n"
4328    for toolchain in $VALID_TOOLCHAINS_all; do
4329      # Use indirect variable referencing
4330      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4331      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4332      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4333    done
4334
4335    # And now exit directly
4336    exit 0
4337  fi
4338
4339
4340# Basic initialization that must happen first of all in the normal process.
4341
4342  # Save the original command line. This is passed to us by the wrapper configure script.
4343
4344  DATE_WHEN_CONFIGURED=`LANG=C date`
4345
4346  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4347$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4348  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4349$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4350
4351
4352  # Start with tools that do not need have cross compilation support
4353  # and can be expected to be found in the default PATH. These tools are
4354  # used by configure. Nor are these tools expected to be found in the
4355  # devkit from the builddeps server either, since they are
4356  # needed to download the devkit.
4357
4358  # First are all the simple required tools.
4359
4360
4361
4362  # Publish this variable in the help.
4363
4364
4365  if test "x$BASENAME" = x; then
4366    # The variable is not set by user, try to locate tool using the code snippet
4367    for ac_prog in basename
4368do
4369  # Extract the first word of "$ac_prog", so it can be a program name with args.
4370set dummy $ac_prog; ac_word=$2
4371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4372$as_echo_n "checking for $ac_word... " >&6; }
4373if ${ac_cv_path_BASENAME+:} false; then :
4374  $as_echo_n "(cached) " >&6
4375else
4376  case $BASENAME in
4377  [\\/]* | ?:[\\/]*)
4378  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4379  ;;
4380  *)
4381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4382for as_dir in $PATH
4383do
4384  IFS=$as_save_IFS
4385  test -z "$as_dir" && as_dir=.
4386    for ac_exec_ext in '' $ac_executable_extensions; do
4387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4388    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4390    break 2
4391  fi
4392done
4393  done
4394IFS=$as_save_IFS
4395
4396  ;;
4397esac
4398fi
4399BASENAME=$ac_cv_path_BASENAME
4400if test -n "$BASENAME"; then
4401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4402$as_echo "$BASENAME" >&6; }
4403else
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4405$as_echo "no" >&6; }
4406fi
4407
4408
4409  test -n "$BASENAME" && break
4410done
4411
4412  else
4413    # The variable is set, but is it from the command line or the environment?
4414
4415    # Try to remove the string !BASENAME! from our list.
4416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4418      # If it failed, the variable was not from the command line. Ignore it,
4419      # but warn the user (except for BASH, which is always set by the calling BASH).
4420      if test "xBASENAME" != xBASH; then
4421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4422$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4423      fi
4424      # Try to locate tool using the code snippet
4425      for ac_prog in basename
4426do
4427  # Extract the first word of "$ac_prog", so it can be a program name with args.
4428set dummy $ac_prog; ac_word=$2
4429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4430$as_echo_n "checking for $ac_word... " >&6; }
4431if ${ac_cv_path_BASENAME+:} false; then :
4432  $as_echo_n "(cached) " >&6
4433else
4434  case $BASENAME in
4435  [\\/]* | ?:[\\/]*)
4436  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4437  ;;
4438  *)
4439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4440for as_dir in $PATH
4441do
4442  IFS=$as_save_IFS
4443  test -z "$as_dir" && as_dir=.
4444    for ac_exec_ext in '' $ac_executable_extensions; do
4445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4446    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4448    break 2
4449  fi
4450done
4451  done
4452IFS=$as_save_IFS
4453
4454  ;;
4455esac
4456fi
4457BASENAME=$ac_cv_path_BASENAME
4458if test -n "$BASENAME"; then
4459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4460$as_echo "$BASENAME" >&6; }
4461else
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4463$as_echo "no" >&6; }
4464fi
4465
4466
4467  test -n "$BASENAME" && break
4468done
4469
4470    else
4471      # If it succeeded, then it was overridden by the user. We will use it
4472      # for the tool.
4473
4474      # First remove it from the list of overridden variables, so we can test
4475      # for unknown variables in the end.
4476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4477
4478      # Check if the provided tool contains a complete path.
4479      tool_specified="$BASENAME"
4480      tool_basename="${tool_specified##*/}"
4481      if test "x$tool_basename" = "x$tool_specified"; then
4482        # A command without a complete path is provided, search $PATH.
4483        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4484$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4485        # Extract the first word of "$tool_basename", so it can be a program name with args.
4486set dummy $tool_basename; ac_word=$2
4487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4488$as_echo_n "checking for $ac_word... " >&6; }
4489if ${ac_cv_path_BASENAME+:} false; then :
4490  $as_echo_n "(cached) " >&6
4491else
4492  case $BASENAME in
4493  [\\/]* | ?:[\\/]*)
4494  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4495  ;;
4496  *)
4497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4498for as_dir in $PATH
4499do
4500  IFS=$as_save_IFS
4501  test -z "$as_dir" && as_dir=.
4502    for ac_exec_ext in '' $ac_executable_extensions; do
4503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4504    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4506    break 2
4507  fi
4508done
4509  done
4510IFS=$as_save_IFS
4511
4512  ;;
4513esac
4514fi
4515BASENAME=$ac_cv_path_BASENAME
4516if test -n "$BASENAME"; then
4517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4518$as_echo "$BASENAME" >&6; }
4519else
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4521$as_echo "no" >&6; }
4522fi
4523
4524
4525        if test "x$BASENAME" = x; then
4526          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4527        fi
4528      else
4529        # Otherwise we believe it is a complete path. Use it as it is.
4530        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4531$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4532        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4533$as_echo_n "checking for BASENAME... " >&6; }
4534        if test ! -x "$tool_specified"; then
4535          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4536$as_echo "not found" >&6; }
4537          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4538        fi
4539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4540$as_echo "$tool_specified" >&6; }
4541      fi
4542    fi
4543  fi
4544
4545
4546
4547  if test "x$BASENAME" = x; then
4548    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4549  fi
4550
4551
4552
4553
4554
4555  # Publish this variable in the help.
4556
4557
4558  if test "x$BASH" = x; then
4559    # The variable is not set by user, try to locate tool using the code snippet
4560    for ac_prog in bash
4561do
4562  # Extract the first word of "$ac_prog", so it can be a program name with args.
4563set dummy $ac_prog; ac_word=$2
4564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4565$as_echo_n "checking for $ac_word... " >&6; }
4566if ${ac_cv_path_BASH+:} false; then :
4567  $as_echo_n "(cached) " >&6
4568else
4569  case $BASH in
4570  [\\/]* | ?:[\\/]*)
4571  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4572  ;;
4573  *)
4574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575for as_dir in $PATH
4576do
4577  IFS=$as_save_IFS
4578  test -z "$as_dir" && as_dir=.
4579    for ac_exec_ext in '' $ac_executable_extensions; do
4580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4581    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4583    break 2
4584  fi
4585done
4586  done
4587IFS=$as_save_IFS
4588
4589  ;;
4590esac
4591fi
4592BASH=$ac_cv_path_BASH
4593if test -n "$BASH"; then
4594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4595$as_echo "$BASH" >&6; }
4596else
4597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4598$as_echo "no" >&6; }
4599fi
4600
4601
4602  test -n "$BASH" && break
4603done
4604
4605  else
4606    # The variable is set, but is it from the command line or the environment?
4607
4608    # Try to remove the string !BASH! from our list.
4609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4611      # If it failed, the variable was not from the command line. Ignore it,
4612      # but warn the user (except for BASH, which is always set by the calling BASH).
4613      if test "xBASH" != xBASH; then
4614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4615$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4616      fi
4617      # Try to locate tool using the code snippet
4618      for ac_prog in bash
4619do
4620  # Extract the first word of "$ac_prog", so it can be a program name with args.
4621set dummy $ac_prog; ac_word=$2
4622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4623$as_echo_n "checking for $ac_word... " >&6; }
4624if ${ac_cv_path_BASH+:} false; then :
4625  $as_echo_n "(cached) " >&6
4626else
4627  case $BASH in
4628  [\\/]* | ?:[\\/]*)
4629  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4630  ;;
4631  *)
4632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4633for as_dir in $PATH
4634do
4635  IFS=$as_save_IFS
4636  test -z "$as_dir" && as_dir=.
4637    for ac_exec_ext in '' $ac_executable_extensions; do
4638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4639    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4641    break 2
4642  fi
4643done
4644  done
4645IFS=$as_save_IFS
4646
4647  ;;
4648esac
4649fi
4650BASH=$ac_cv_path_BASH
4651if test -n "$BASH"; then
4652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4653$as_echo "$BASH" >&6; }
4654else
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4656$as_echo "no" >&6; }
4657fi
4658
4659
4660  test -n "$BASH" && break
4661done
4662
4663    else
4664      # If it succeeded, then it was overridden by the user. We will use it
4665      # for the tool.
4666
4667      # First remove it from the list of overridden variables, so we can test
4668      # for unknown variables in the end.
4669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4670
4671      # Check if the provided tool contains a complete path.
4672      tool_specified="$BASH"
4673      tool_basename="${tool_specified##*/}"
4674      if test "x$tool_basename" = "x$tool_specified"; then
4675        # A command without a complete path is provided, search $PATH.
4676        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4677$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4678        # Extract the first word of "$tool_basename", so it can be a program name with args.
4679set dummy $tool_basename; ac_word=$2
4680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4681$as_echo_n "checking for $ac_word... " >&6; }
4682if ${ac_cv_path_BASH+:} false; then :
4683  $as_echo_n "(cached) " >&6
4684else
4685  case $BASH in
4686  [\\/]* | ?:[\\/]*)
4687  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4688  ;;
4689  *)
4690  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4691for as_dir in $PATH
4692do
4693  IFS=$as_save_IFS
4694  test -z "$as_dir" && as_dir=.
4695    for ac_exec_ext in '' $ac_executable_extensions; do
4696  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4697    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4698    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4699    break 2
4700  fi
4701done
4702  done
4703IFS=$as_save_IFS
4704
4705  ;;
4706esac
4707fi
4708BASH=$ac_cv_path_BASH
4709if test -n "$BASH"; then
4710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4711$as_echo "$BASH" >&6; }
4712else
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4714$as_echo "no" >&6; }
4715fi
4716
4717
4718        if test "x$BASH" = x; then
4719          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4720        fi
4721      else
4722        # Otherwise we believe it is a complete path. Use it as it is.
4723        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4724$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4726$as_echo_n "checking for BASH... " >&6; }
4727        if test ! -x "$tool_specified"; then
4728          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4729$as_echo "not found" >&6; }
4730          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4731        fi
4732        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4733$as_echo "$tool_specified" >&6; }
4734      fi
4735    fi
4736  fi
4737
4738
4739
4740  if test "x$BASH" = x; then
4741    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4742  fi
4743
4744
4745
4746
4747
4748  # Publish this variable in the help.
4749
4750
4751  if test "x$CAT" = x; then
4752    # The variable is not set by user, try to locate tool using the code snippet
4753    for ac_prog in cat
4754do
4755  # Extract the first word of "$ac_prog", so it can be a program name with args.
4756set dummy $ac_prog; ac_word=$2
4757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4758$as_echo_n "checking for $ac_word... " >&6; }
4759if ${ac_cv_path_CAT+:} false; then :
4760  $as_echo_n "(cached) " >&6
4761else
4762  case $CAT in
4763  [\\/]* | ?:[\\/]*)
4764  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4765  ;;
4766  *)
4767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4768for as_dir in $PATH
4769do
4770  IFS=$as_save_IFS
4771  test -z "$as_dir" && as_dir=.
4772    for ac_exec_ext in '' $ac_executable_extensions; do
4773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4774    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4776    break 2
4777  fi
4778done
4779  done
4780IFS=$as_save_IFS
4781
4782  ;;
4783esac
4784fi
4785CAT=$ac_cv_path_CAT
4786if test -n "$CAT"; then
4787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4788$as_echo "$CAT" >&6; }
4789else
4790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4791$as_echo "no" >&6; }
4792fi
4793
4794
4795  test -n "$CAT" && break
4796done
4797
4798  else
4799    # The variable is set, but is it from the command line or the environment?
4800
4801    # Try to remove the string !CAT! from our list.
4802    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4803    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4804      # If it failed, the variable was not from the command line. Ignore it,
4805      # but warn the user (except for BASH, which is always set by the calling BASH).
4806      if test "xCAT" != xBASH; then
4807        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4808$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4809      fi
4810      # Try to locate tool using the code snippet
4811      for ac_prog in cat
4812do
4813  # Extract the first word of "$ac_prog", so it can be a program name with args.
4814set dummy $ac_prog; ac_word=$2
4815{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4816$as_echo_n "checking for $ac_word... " >&6; }
4817if ${ac_cv_path_CAT+:} false; then :
4818  $as_echo_n "(cached) " >&6
4819else
4820  case $CAT in
4821  [\\/]* | ?:[\\/]*)
4822  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4823  ;;
4824  *)
4825  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4826for as_dir in $PATH
4827do
4828  IFS=$as_save_IFS
4829  test -z "$as_dir" && as_dir=.
4830    for ac_exec_ext in '' $ac_executable_extensions; do
4831  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4832    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4833    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4834    break 2
4835  fi
4836done
4837  done
4838IFS=$as_save_IFS
4839
4840  ;;
4841esac
4842fi
4843CAT=$ac_cv_path_CAT
4844if test -n "$CAT"; then
4845  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4846$as_echo "$CAT" >&6; }
4847else
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4849$as_echo "no" >&6; }
4850fi
4851
4852
4853  test -n "$CAT" && break
4854done
4855
4856    else
4857      # If it succeeded, then it was overridden by the user. We will use it
4858      # for the tool.
4859
4860      # First remove it from the list of overridden variables, so we can test
4861      # for unknown variables in the end.
4862      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4863
4864      # Check if the provided tool contains a complete path.
4865      tool_specified="$CAT"
4866      tool_basename="${tool_specified##*/}"
4867      if test "x$tool_basename" = "x$tool_specified"; then
4868        # A command without a complete path is provided, search $PATH.
4869        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4870$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4871        # Extract the first word of "$tool_basename", so it can be a program name with args.
4872set dummy $tool_basename; ac_word=$2
4873{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874$as_echo_n "checking for $ac_word... " >&6; }
4875if ${ac_cv_path_CAT+:} false; then :
4876  $as_echo_n "(cached) " >&6
4877else
4878  case $CAT in
4879  [\\/]* | ?:[\\/]*)
4880  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4881  ;;
4882  *)
4883  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884for as_dir in $PATH
4885do
4886  IFS=$as_save_IFS
4887  test -z "$as_dir" && as_dir=.
4888    for ac_exec_ext in '' $ac_executable_extensions; do
4889  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4890    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4891    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892    break 2
4893  fi
4894done
4895  done
4896IFS=$as_save_IFS
4897
4898  ;;
4899esac
4900fi
4901CAT=$ac_cv_path_CAT
4902if test -n "$CAT"; then
4903  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4904$as_echo "$CAT" >&6; }
4905else
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907$as_echo "no" >&6; }
4908fi
4909
4910
4911        if test "x$CAT" = x; then
4912          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4913        fi
4914      else
4915        # Otherwise we believe it is a complete path. Use it as it is.
4916        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4917$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4918        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4919$as_echo_n "checking for CAT... " >&6; }
4920        if test ! -x "$tool_specified"; then
4921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4922$as_echo "not found" >&6; }
4923          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4924        fi
4925        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4926$as_echo "$tool_specified" >&6; }
4927      fi
4928    fi
4929  fi
4930
4931
4932
4933  if test "x$CAT" = x; then
4934    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4935  fi
4936
4937
4938
4939
4940
4941  # Publish this variable in the help.
4942
4943
4944  if test "x$CHMOD" = x; then
4945    # The variable is not set by user, try to locate tool using the code snippet
4946    for ac_prog in chmod
4947do
4948  # Extract the first word of "$ac_prog", so it can be a program name with args.
4949set dummy $ac_prog; ac_word=$2
4950{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4951$as_echo_n "checking for $ac_word... " >&6; }
4952if ${ac_cv_path_CHMOD+:} false; then :
4953  $as_echo_n "(cached) " >&6
4954else
4955  case $CHMOD in
4956  [\\/]* | ?:[\\/]*)
4957  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4958  ;;
4959  *)
4960  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4961for as_dir in $PATH
4962do
4963  IFS=$as_save_IFS
4964  test -z "$as_dir" && as_dir=.
4965    for ac_exec_ext in '' $ac_executable_extensions; do
4966  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4967    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4968    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4969    break 2
4970  fi
4971done
4972  done
4973IFS=$as_save_IFS
4974
4975  ;;
4976esac
4977fi
4978CHMOD=$ac_cv_path_CHMOD
4979if test -n "$CHMOD"; then
4980  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4981$as_echo "$CHMOD" >&6; }
4982else
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4984$as_echo "no" >&6; }
4985fi
4986
4987
4988  test -n "$CHMOD" && break
4989done
4990
4991  else
4992    # The variable is set, but is it from the command line or the environment?
4993
4994    # Try to remove the string !CHMOD! from our list.
4995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4997      # If it failed, the variable was not from the command line. Ignore it,
4998      # but warn the user (except for BASH, which is always set by the calling BASH).
4999      if test "xCHMOD" != xBASH; then
5000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5001$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5002      fi
5003      # Try to locate tool using the code snippet
5004      for ac_prog in chmod
5005do
5006  # Extract the first word of "$ac_prog", so it can be a program name with args.
5007set dummy $ac_prog; ac_word=$2
5008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5009$as_echo_n "checking for $ac_word... " >&6; }
5010if ${ac_cv_path_CHMOD+:} false; then :
5011  $as_echo_n "(cached) " >&6
5012else
5013  case $CHMOD in
5014  [\\/]* | ?:[\\/]*)
5015  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5016  ;;
5017  *)
5018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5019for as_dir in $PATH
5020do
5021  IFS=$as_save_IFS
5022  test -z "$as_dir" && as_dir=.
5023    for ac_exec_ext in '' $ac_executable_extensions; do
5024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5025    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5027    break 2
5028  fi
5029done
5030  done
5031IFS=$as_save_IFS
5032
5033  ;;
5034esac
5035fi
5036CHMOD=$ac_cv_path_CHMOD
5037if test -n "$CHMOD"; then
5038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5039$as_echo "$CHMOD" >&6; }
5040else
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5042$as_echo "no" >&6; }
5043fi
5044
5045
5046  test -n "$CHMOD" && break
5047done
5048
5049    else
5050      # If it succeeded, then it was overridden by the user. We will use it
5051      # for the tool.
5052
5053      # First remove it from the list of overridden variables, so we can test
5054      # for unknown variables in the end.
5055      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5056
5057      # Check if the provided tool contains a complete path.
5058      tool_specified="$CHMOD"
5059      tool_basename="${tool_specified##*/}"
5060      if test "x$tool_basename" = "x$tool_specified"; then
5061        # A command without a complete path is provided, search $PATH.
5062        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5063$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5064        # Extract the first word of "$tool_basename", so it can be a program name with args.
5065set dummy $tool_basename; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_path_CHMOD+:} false; then :
5069  $as_echo_n "(cached) " >&6
5070else
5071  case $CHMOD in
5072  [\\/]* | ?:[\\/]*)
5073  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5074  ;;
5075  *)
5076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5077for as_dir in $PATH
5078do
5079  IFS=$as_save_IFS
5080  test -z "$as_dir" && as_dir=.
5081    for ac_exec_ext in '' $ac_executable_extensions; do
5082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5083    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5085    break 2
5086  fi
5087done
5088  done
5089IFS=$as_save_IFS
5090
5091  ;;
5092esac
5093fi
5094CHMOD=$ac_cv_path_CHMOD
5095if test -n "$CHMOD"; then
5096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5097$as_echo "$CHMOD" >&6; }
5098else
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5100$as_echo "no" >&6; }
5101fi
5102
5103
5104        if test "x$CHMOD" = x; then
5105          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5106        fi
5107      else
5108        # Otherwise we believe it is a complete path. Use it as it is.
5109        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5110$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5111        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5112$as_echo_n "checking for CHMOD... " >&6; }
5113        if test ! -x "$tool_specified"; then
5114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5115$as_echo "not found" >&6; }
5116          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5117        fi
5118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5119$as_echo "$tool_specified" >&6; }
5120      fi
5121    fi
5122  fi
5123
5124
5125
5126  if test "x$CHMOD" = x; then
5127    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5128  fi
5129
5130
5131
5132
5133
5134  # Publish this variable in the help.
5135
5136
5137  if test "x$CMP" = x; then
5138    # The variable is not set by user, try to locate tool using the code snippet
5139    for ac_prog in cmp
5140do
5141  # Extract the first word of "$ac_prog", so it can be a program name with args.
5142set dummy $ac_prog; ac_word=$2
5143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5144$as_echo_n "checking for $ac_word... " >&6; }
5145if ${ac_cv_path_CMP+:} false; then :
5146  $as_echo_n "(cached) " >&6
5147else
5148  case $CMP in
5149  [\\/]* | ?:[\\/]*)
5150  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5151  ;;
5152  *)
5153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5154for as_dir in $PATH
5155do
5156  IFS=$as_save_IFS
5157  test -z "$as_dir" && as_dir=.
5158    for ac_exec_ext in '' $ac_executable_extensions; do
5159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5160    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5162    break 2
5163  fi
5164done
5165  done
5166IFS=$as_save_IFS
5167
5168  ;;
5169esac
5170fi
5171CMP=$ac_cv_path_CMP
5172if test -n "$CMP"; then
5173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5174$as_echo "$CMP" >&6; }
5175else
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5177$as_echo "no" >&6; }
5178fi
5179
5180
5181  test -n "$CMP" && break
5182done
5183
5184  else
5185    # The variable is set, but is it from the command line or the environment?
5186
5187    # Try to remove the string !CMP! from our list.
5188    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5189    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5190      # If it failed, the variable was not from the command line. Ignore it,
5191      # but warn the user (except for BASH, which is always set by the calling BASH).
5192      if test "xCMP" != xBASH; then
5193        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5194$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5195      fi
5196      # Try to locate tool using the code snippet
5197      for ac_prog in cmp
5198do
5199  # Extract the first word of "$ac_prog", so it can be a program name with args.
5200set dummy $ac_prog; ac_word=$2
5201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5202$as_echo_n "checking for $ac_word... " >&6; }
5203if ${ac_cv_path_CMP+:} false; then :
5204  $as_echo_n "(cached) " >&6
5205else
5206  case $CMP in
5207  [\\/]* | ?:[\\/]*)
5208  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5209  ;;
5210  *)
5211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5212for as_dir in $PATH
5213do
5214  IFS=$as_save_IFS
5215  test -z "$as_dir" && as_dir=.
5216    for ac_exec_ext in '' $ac_executable_extensions; do
5217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5218    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5220    break 2
5221  fi
5222done
5223  done
5224IFS=$as_save_IFS
5225
5226  ;;
5227esac
5228fi
5229CMP=$ac_cv_path_CMP
5230if test -n "$CMP"; then
5231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5232$as_echo "$CMP" >&6; }
5233else
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5235$as_echo "no" >&6; }
5236fi
5237
5238
5239  test -n "$CMP" && break
5240done
5241
5242    else
5243      # If it succeeded, then it was overridden by the user. We will use it
5244      # for the tool.
5245
5246      # First remove it from the list of overridden variables, so we can test
5247      # for unknown variables in the end.
5248      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5249
5250      # Check if the provided tool contains a complete path.
5251      tool_specified="$CMP"
5252      tool_basename="${tool_specified##*/}"
5253      if test "x$tool_basename" = "x$tool_specified"; then
5254        # A command without a complete path is provided, search $PATH.
5255        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5256$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5257        # Extract the first word of "$tool_basename", so it can be a program name with args.
5258set dummy $tool_basename; ac_word=$2
5259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5260$as_echo_n "checking for $ac_word... " >&6; }
5261if ${ac_cv_path_CMP+:} false; then :
5262  $as_echo_n "(cached) " >&6
5263else
5264  case $CMP in
5265  [\\/]* | ?:[\\/]*)
5266  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5267  ;;
5268  *)
5269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5270for as_dir in $PATH
5271do
5272  IFS=$as_save_IFS
5273  test -z "$as_dir" && as_dir=.
5274    for ac_exec_ext in '' $ac_executable_extensions; do
5275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5276    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5278    break 2
5279  fi
5280done
5281  done
5282IFS=$as_save_IFS
5283
5284  ;;
5285esac
5286fi
5287CMP=$ac_cv_path_CMP
5288if test -n "$CMP"; then
5289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5290$as_echo "$CMP" >&6; }
5291else
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5293$as_echo "no" >&6; }
5294fi
5295
5296
5297        if test "x$CMP" = x; then
5298          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5299        fi
5300      else
5301        # Otherwise we believe it is a complete path. Use it as it is.
5302        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5303$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5304        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5305$as_echo_n "checking for CMP... " >&6; }
5306        if test ! -x "$tool_specified"; then
5307          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5308$as_echo "not found" >&6; }
5309          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5310        fi
5311        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5312$as_echo "$tool_specified" >&6; }
5313      fi
5314    fi
5315  fi
5316
5317
5318
5319  if test "x$CMP" = x; then
5320    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5321  fi
5322
5323
5324
5325
5326
5327  # Publish this variable in the help.
5328
5329
5330  if test "x$COMM" = x; then
5331    # The variable is not set by user, try to locate tool using the code snippet
5332    for ac_prog in comm
5333do
5334  # Extract the first word of "$ac_prog", so it can be a program name with args.
5335set dummy $ac_prog; ac_word=$2
5336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5337$as_echo_n "checking for $ac_word... " >&6; }
5338if ${ac_cv_path_COMM+:} false; then :
5339  $as_echo_n "(cached) " >&6
5340else
5341  case $COMM in
5342  [\\/]* | ?:[\\/]*)
5343  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5344  ;;
5345  *)
5346  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5347for as_dir in $PATH
5348do
5349  IFS=$as_save_IFS
5350  test -z "$as_dir" && as_dir=.
5351    for ac_exec_ext in '' $ac_executable_extensions; do
5352  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5353    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5354    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5355    break 2
5356  fi
5357done
5358  done
5359IFS=$as_save_IFS
5360
5361  ;;
5362esac
5363fi
5364COMM=$ac_cv_path_COMM
5365if test -n "$COMM"; then
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5367$as_echo "$COMM" >&6; }
5368else
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5370$as_echo "no" >&6; }
5371fi
5372
5373
5374  test -n "$COMM" && break
5375done
5376
5377  else
5378    # The variable is set, but is it from the command line or the environment?
5379
5380    # Try to remove the string !COMM! from our list.
5381    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5382    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5383      # If it failed, the variable was not from the command line. Ignore it,
5384      # but warn the user (except for BASH, which is always set by the calling BASH).
5385      if test "xCOMM" != xBASH; then
5386        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5387$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5388      fi
5389      # Try to locate tool using the code snippet
5390      for ac_prog in comm
5391do
5392  # Extract the first word of "$ac_prog", so it can be a program name with args.
5393set dummy $ac_prog; ac_word=$2
5394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5395$as_echo_n "checking for $ac_word... " >&6; }
5396if ${ac_cv_path_COMM+:} false; then :
5397  $as_echo_n "(cached) " >&6
5398else
5399  case $COMM in
5400  [\\/]* | ?:[\\/]*)
5401  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5402  ;;
5403  *)
5404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5405for as_dir in $PATH
5406do
5407  IFS=$as_save_IFS
5408  test -z "$as_dir" && as_dir=.
5409    for ac_exec_ext in '' $ac_executable_extensions; do
5410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5411    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5413    break 2
5414  fi
5415done
5416  done
5417IFS=$as_save_IFS
5418
5419  ;;
5420esac
5421fi
5422COMM=$ac_cv_path_COMM
5423if test -n "$COMM"; then
5424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5425$as_echo "$COMM" >&6; }
5426else
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5428$as_echo "no" >&6; }
5429fi
5430
5431
5432  test -n "$COMM" && break
5433done
5434
5435    else
5436      # If it succeeded, then it was overridden by the user. We will use it
5437      # for the tool.
5438
5439      # First remove it from the list of overridden variables, so we can test
5440      # for unknown variables in the end.
5441      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5442
5443      # Check if the provided tool contains a complete path.
5444      tool_specified="$COMM"
5445      tool_basename="${tool_specified##*/}"
5446      if test "x$tool_basename" = "x$tool_specified"; then
5447        # A command without a complete path is provided, search $PATH.
5448        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5449$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5450        # Extract the first word of "$tool_basename", so it can be a program name with args.
5451set dummy $tool_basename; ac_word=$2
5452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5453$as_echo_n "checking for $ac_word... " >&6; }
5454if ${ac_cv_path_COMM+:} false; then :
5455  $as_echo_n "(cached) " >&6
5456else
5457  case $COMM in
5458  [\\/]* | ?:[\\/]*)
5459  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5460  ;;
5461  *)
5462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5463for as_dir in $PATH
5464do
5465  IFS=$as_save_IFS
5466  test -z "$as_dir" && as_dir=.
5467    for ac_exec_ext in '' $ac_executable_extensions; do
5468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5469    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471    break 2
5472  fi
5473done
5474  done
5475IFS=$as_save_IFS
5476
5477  ;;
5478esac
5479fi
5480COMM=$ac_cv_path_COMM
5481if test -n "$COMM"; then
5482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5483$as_echo "$COMM" >&6; }
5484else
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5486$as_echo "no" >&6; }
5487fi
5488
5489
5490        if test "x$COMM" = x; then
5491          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5492        fi
5493      else
5494        # Otherwise we believe it is a complete path. Use it as it is.
5495        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5496$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5498$as_echo_n "checking for COMM... " >&6; }
5499        if test ! -x "$tool_specified"; then
5500          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5501$as_echo "not found" >&6; }
5502          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5503        fi
5504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5505$as_echo "$tool_specified" >&6; }
5506      fi
5507    fi
5508  fi
5509
5510
5511
5512  if test "x$COMM" = x; then
5513    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5514  fi
5515
5516
5517
5518
5519
5520  # Publish this variable in the help.
5521
5522
5523  if test "x$CP" = x; then
5524    # The variable is not set by user, try to locate tool using the code snippet
5525    for ac_prog in cp
5526do
5527  # Extract the first word of "$ac_prog", so it can be a program name with args.
5528set dummy $ac_prog; ac_word=$2
5529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5530$as_echo_n "checking for $ac_word... " >&6; }
5531if ${ac_cv_path_CP+:} false; then :
5532  $as_echo_n "(cached) " >&6
5533else
5534  case $CP in
5535  [\\/]* | ?:[\\/]*)
5536  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5537  ;;
5538  *)
5539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5540for as_dir in $PATH
5541do
5542  IFS=$as_save_IFS
5543  test -z "$as_dir" && as_dir=.
5544    for ac_exec_ext in '' $ac_executable_extensions; do
5545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5546    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5548    break 2
5549  fi
5550done
5551  done
5552IFS=$as_save_IFS
5553
5554  ;;
5555esac
5556fi
5557CP=$ac_cv_path_CP
5558if test -n "$CP"; then
5559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5560$as_echo "$CP" >&6; }
5561else
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5563$as_echo "no" >&6; }
5564fi
5565
5566
5567  test -n "$CP" && break
5568done
5569
5570  else
5571    # The variable is set, but is it from the command line or the environment?
5572
5573    # Try to remove the string !CP! from our list.
5574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5576      # If it failed, the variable was not from the command line. Ignore it,
5577      # but warn the user (except for BASH, which is always set by the calling BASH).
5578      if test "xCP" != xBASH; then
5579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5580$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5581      fi
5582      # Try to locate tool using the code snippet
5583      for ac_prog in cp
5584do
5585  # Extract the first word of "$ac_prog", so it can be a program name with args.
5586set dummy $ac_prog; ac_word=$2
5587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5588$as_echo_n "checking for $ac_word... " >&6; }
5589if ${ac_cv_path_CP+:} false; then :
5590  $as_echo_n "(cached) " >&6
5591else
5592  case $CP in
5593  [\\/]* | ?:[\\/]*)
5594  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5595  ;;
5596  *)
5597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5598for as_dir in $PATH
5599do
5600  IFS=$as_save_IFS
5601  test -z "$as_dir" && as_dir=.
5602    for ac_exec_ext in '' $ac_executable_extensions; do
5603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5604    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5606    break 2
5607  fi
5608done
5609  done
5610IFS=$as_save_IFS
5611
5612  ;;
5613esac
5614fi
5615CP=$ac_cv_path_CP
5616if test -n "$CP"; then
5617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5618$as_echo "$CP" >&6; }
5619else
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5621$as_echo "no" >&6; }
5622fi
5623
5624
5625  test -n "$CP" && break
5626done
5627
5628    else
5629      # If it succeeded, then it was overridden by the user. We will use it
5630      # for the tool.
5631
5632      # First remove it from the list of overridden variables, so we can test
5633      # for unknown variables in the end.
5634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5635
5636      # Check if the provided tool contains a complete path.
5637      tool_specified="$CP"
5638      tool_basename="${tool_specified##*/}"
5639      if test "x$tool_basename" = "x$tool_specified"; then
5640        # A command without a complete path is provided, search $PATH.
5641        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5642$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5643        # Extract the first word of "$tool_basename", so it can be a program name with args.
5644set dummy $tool_basename; ac_word=$2
5645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5646$as_echo_n "checking for $ac_word... " >&6; }
5647if ${ac_cv_path_CP+:} false; then :
5648  $as_echo_n "(cached) " >&6
5649else
5650  case $CP in
5651  [\\/]* | ?:[\\/]*)
5652  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5653  ;;
5654  *)
5655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5656for as_dir in $PATH
5657do
5658  IFS=$as_save_IFS
5659  test -z "$as_dir" && as_dir=.
5660    for ac_exec_ext in '' $ac_executable_extensions; do
5661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5662    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5664    break 2
5665  fi
5666done
5667  done
5668IFS=$as_save_IFS
5669
5670  ;;
5671esac
5672fi
5673CP=$ac_cv_path_CP
5674if test -n "$CP"; then
5675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5676$as_echo "$CP" >&6; }
5677else
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5679$as_echo "no" >&6; }
5680fi
5681
5682
5683        if test "x$CP" = x; then
5684          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5685        fi
5686      else
5687        # Otherwise we believe it is a complete path. Use it as it is.
5688        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5689$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5691$as_echo_n "checking for CP... " >&6; }
5692        if test ! -x "$tool_specified"; then
5693          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5694$as_echo "not found" >&6; }
5695          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5696        fi
5697        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5698$as_echo "$tool_specified" >&6; }
5699      fi
5700    fi
5701  fi
5702
5703
5704
5705  if test "x$CP" = x; then
5706    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5707  fi
5708
5709
5710
5711
5712
5713  # Publish this variable in the help.
5714
5715
5716  if test "x$CPIO" = x; then
5717    # The variable is not set by user, try to locate tool using the code snippet
5718    for ac_prog in cpio
5719do
5720  # Extract the first word of "$ac_prog", so it can be a program name with args.
5721set dummy $ac_prog; ac_word=$2
5722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5723$as_echo_n "checking for $ac_word... " >&6; }
5724if ${ac_cv_path_CPIO+:} false; then :
5725  $as_echo_n "(cached) " >&6
5726else
5727  case $CPIO in
5728  [\\/]* | ?:[\\/]*)
5729  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5730  ;;
5731  *)
5732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5733for as_dir in $PATH
5734do
5735  IFS=$as_save_IFS
5736  test -z "$as_dir" && as_dir=.
5737    for ac_exec_ext in '' $ac_executable_extensions; do
5738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5739    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5741    break 2
5742  fi
5743done
5744  done
5745IFS=$as_save_IFS
5746
5747  ;;
5748esac
5749fi
5750CPIO=$ac_cv_path_CPIO
5751if test -n "$CPIO"; then
5752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5753$as_echo "$CPIO" >&6; }
5754else
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5756$as_echo "no" >&6; }
5757fi
5758
5759
5760  test -n "$CPIO" && break
5761done
5762
5763  else
5764    # The variable is set, but is it from the command line or the environment?
5765
5766    # Try to remove the string !CPIO! from our list.
5767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5769      # If it failed, the variable was not from the command line. Ignore it,
5770      # but warn the user (except for BASH, which is always set by the calling BASH).
5771      if test "xCPIO" != xBASH; then
5772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5773$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5774      fi
5775      # Try to locate tool using the code snippet
5776      for ac_prog in cpio
5777do
5778  # Extract the first word of "$ac_prog", so it can be a program name with args.
5779set dummy $ac_prog; ac_word=$2
5780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5781$as_echo_n "checking for $ac_word... " >&6; }
5782if ${ac_cv_path_CPIO+:} false; then :
5783  $as_echo_n "(cached) " >&6
5784else
5785  case $CPIO in
5786  [\\/]* | ?:[\\/]*)
5787  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5788  ;;
5789  *)
5790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5791for as_dir in $PATH
5792do
5793  IFS=$as_save_IFS
5794  test -z "$as_dir" && as_dir=.
5795    for ac_exec_ext in '' $ac_executable_extensions; do
5796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5797    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5799    break 2
5800  fi
5801done
5802  done
5803IFS=$as_save_IFS
5804
5805  ;;
5806esac
5807fi
5808CPIO=$ac_cv_path_CPIO
5809if test -n "$CPIO"; then
5810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5811$as_echo "$CPIO" >&6; }
5812else
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5814$as_echo "no" >&6; }
5815fi
5816
5817
5818  test -n "$CPIO" && break
5819done
5820
5821    else
5822      # If it succeeded, then it was overridden by the user. We will use it
5823      # for the tool.
5824
5825      # First remove it from the list of overridden variables, so we can test
5826      # for unknown variables in the end.
5827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5828
5829      # Check if the provided tool contains a complete path.
5830      tool_specified="$CPIO"
5831      tool_basename="${tool_specified##*/}"
5832      if test "x$tool_basename" = "x$tool_specified"; then
5833        # A command without a complete path is provided, search $PATH.
5834        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5835$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5836        # Extract the first word of "$tool_basename", so it can be a program name with args.
5837set dummy $tool_basename; ac_word=$2
5838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5839$as_echo_n "checking for $ac_word... " >&6; }
5840if ${ac_cv_path_CPIO+:} false; then :
5841  $as_echo_n "(cached) " >&6
5842else
5843  case $CPIO in
5844  [\\/]* | ?:[\\/]*)
5845  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5846  ;;
5847  *)
5848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5849for as_dir in $PATH
5850do
5851  IFS=$as_save_IFS
5852  test -z "$as_dir" && as_dir=.
5853    for ac_exec_ext in '' $ac_executable_extensions; do
5854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5855    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5857    break 2
5858  fi
5859done
5860  done
5861IFS=$as_save_IFS
5862
5863  ;;
5864esac
5865fi
5866CPIO=$ac_cv_path_CPIO
5867if test -n "$CPIO"; then
5868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5869$as_echo "$CPIO" >&6; }
5870else
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5872$as_echo "no" >&6; }
5873fi
5874
5875
5876        if test "x$CPIO" = x; then
5877          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5878        fi
5879      else
5880        # Otherwise we believe it is a complete path. Use it as it is.
5881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5882$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5883        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5884$as_echo_n "checking for CPIO... " >&6; }
5885        if test ! -x "$tool_specified"; then
5886          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5887$as_echo "not found" >&6; }
5888          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5889        fi
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5891$as_echo "$tool_specified" >&6; }
5892      fi
5893    fi
5894  fi
5895
5896
5897
5898  if test "x$CPIO" = x; then
5899    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5900  fi
5901
5902
5903
5904
5905
5906  # Publish this variable in the help.
5907
5908
5909  if test "x$CUT" = x; then
5910    # The variable is not set by user, try to locate tool using the code snippet
5911    for ac_prog in cut
5912do
5913  # Extract the first word of "$ac_prog", so it can be a program name with args.
5914set dummy $ac_prog; ac_word=$2
5915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5916$as_echo_n "checking for $ac_word... " >&6; }
5917if ${ac_cv_path_CUT+:} false; then :
5918  $as_echo_n "(cached) " >&6
5919else
5920  case $CUT in
5921  [\\/]* | ?:[\\/]*)
5922  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5923  ;;
5924  *)
5925  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5926for as_dir in $PATH
5927do
5928  IFS=$as_save_IFS
5929  test -z "$as_dir" && as_dir=.
5930    for ac_exec_ext in '' $ac_executable_extensions; do
5931  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5932    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5933    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5934    break 2
5935  fi
5936done
5937  done
5938IFS=$as_save_IFS
5939
5940  ;;
5941esac
5942fi
5943CUT=$ac_cv_path_CUT
5944if test -n "$CUT"; then
5945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5946$as_echo "$CUT" >&6; }
5947else
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5949$as_echo "no" >&6; }
5950fi
5951
5952
5953  test -n "$CUT" && break
5954done
5955
5956  else
5957    # The variable is set, but is it from the command line or the environment?
5958
5959    # Try to remove the string !CUT! from our list.
5960    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5961    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5962      # If it failed, the variable was not from the command line. Ignore it,
5963      # but warn the user (except for BASH, which is always set by the calling BASH).
5964      if test "xCUT" != xBASH; then
5965        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5966$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5967      fi
5968      # Try to locate tool using the code snippet
5969      for ac_prog in cut
5970do
5971  # Extract the first word of "$ac_prog", so it can be a program name with args.
5972set dummy $ac_prog; ac_word=$2
5973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5974$as_echo_n "checking for $ac_word... " >&6; }
5975if ${ac_cv_path_CUT+:} false; then :
5976  $as_echo_n "(cached) " >&6
5977else
5978  case $CUT in
5979  [\\/]* | ?:[\\/]*)
5980  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5981  ;;
5982  *)
5983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5984for as_dir in $PATH
5985do
5986  IFS=$as_save_IFS
5987  test -z "$as_dir" && as_dir=.
5988    for ac_exec_ext in '' $ac_executable_extensions; do
5989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5990    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5992    break 2
5993  fi
5994done
5995  done
5996IFS=$as_save_IFS
5997
5998  ;;
5999esac
6000fi
6001CUT=$ac_cv_path_CUT
6002if test -n "$CUT"; then
6003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6004$as_echo "$CUT" >&6; }
6005else
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6007$as_echo "no" >&6; }
6008fi
6009
6010
6011  test -n "$CUT" && break
6012done
6013
6014    else
6015      # If it succeeded, then it was overridden by the user. We will use it
6016      # for the tool.
6017
6018      # First remove it from the list of overridden variables, so we can test
6019      # for unknown variables in the end.
6020      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6021
6022      # Check if the provided tool contains a complete path.
6023      tool_specified="$CUT"
6024      tool_basename="${tool_specified##*/}"
6025      if test "x$tool_basename" = "x$tool_specified"; then
6026        # A command without a complete path is provided, search $PATH.
6027        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6028$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6029        # Extract the first word of "$tool_basename", so it can be a program name with args.
6030set dummy $tool_basename; ac_word=$2
6031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6032$as_echo_n "checking for $ac_word... " >&6; }
6033if ${ac_cv_path_CUT+:} false; then :
6034  $as_echo_n "(cached) " >&6
6035else
6036  case $CUT in
6037  [\\/]* | ?:[\\/]*)
6038  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6039  ;;
6040  *)
6041  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6042for as_dir in $PATH
6043do
6044  IFS=$as_save_IFS
6045  test -z "$as_dir" && as_dir=.
6046    for ac_exec_ext in '' $ac_executable_extensions; do
6047  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6048    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6049    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6050    break 2
6051  fi
6052done
6053  done
6054IFS=$as_save_IFS
6055
6056  ;;
6057esac
6058fi
6059CUT=$ac_cv_path_CUT
6060if test -n "$CUT"; then
6061  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6062$as_echo "$CUT" >&6; }
6063else
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6065$as_echo "no" >&6; }
6066fi
6067
6068
6069        if test "x$CUT" = x; then
6070          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6071        fi
6072      else
6073        # Otherwise we believe it is a complete path. Use it as it is.
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6075$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6077$as_echo_n "checking for CUT... " >&6; }
6078        if test ! -x "$tool_specified"; then
6079          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6080$as_echo "not found" >&6; }
6081          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6082        fi
6083        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6084$as_echo "$tool_specified" >&6; }
6085      fi
6086    fi
6087  fi
6088
6089
6090
6091  if test "x$CUT" = x; then
6092    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6093  fi
6094
6095
6096
6097
6098
6099  # Publish this variable in the help.
6100
6101
6102  if test "x$DATE" = x; then
6103    # The variable is not set by user, try to locate tool using the code snippet
6104    for ac_prog in date
6105do
6106  # Extract the first word of "$ac_prog", so it can be a program name with args.
6107set dummy $ac_prog; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_DATE+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $DATE in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136DATE=$ac_cv_path_DATE
6137if test -n "$DATE"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6139$as_echo "$DATE" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146  test -n "$DATE" && break
6147done
6148
6149  else
6150    # The variable is set, but is it from the command line or the environment?
6151
6152    # Try to remove the string !DATE! from our list.
6153    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6154    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6155      # If it failed, the variable was not from the command line. Ignore it,
6156      # but warn the user (except for BASH, which is always set by the calling BASH).
6157      if test "xDATE" != xBASH; then
6158        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6159$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6160      fi
6161      # Try to locate tool using the code snippet
6162      for ac_prog in date
6163do
6164  # Extract the first word of "$ac_prog", so it can be a program name with args.
6165set dummy $ac_prog; ac_word=$2
6166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6167$as_echo_n "checking for $ac_word... " >&6; }
6168if ${ac_cv_path_DATE+:} false; then :
6169  $as_echo_n "(cached) " >&6
6170else
6171  case $DATE in
6172  [\\/]* | ?:[\\/]*)
6173  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6174  ;;
6175  *)
6176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6177for as_dir in $PATH
6178do
6179  IFS=$as_save_IFS
6180  test -z "$as_dir" && as_dir=.
6181    for ac_exec_ext in '' $ac_executable_extensions; do
6182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6183    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6185    break 2
6186  fi
6187done
6188  done
6189IFS=$as_save_IFS
6190
6191  ;;
6192esac
6193fi
6194DATE=$ac_cv_path_DATE
6195if test -n "$DATE"; then
6196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6197$as_echo "$DATE" >&6; }
6198else
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6200$as_echo "no" >&6; }
6201fi
6202
6203
6204  test -n "$DATE" && break
6205done
6206
6207    else
6208      # If it succeeded, then it was overridden by the user. We will use it
6209      # for the tool.
6210
6211      # First remove it from the list of overridden variables, so we can test
6212      # for unknown variables in the end.
6213      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6214
6215      # Check if the provided tool contains a complete path.
6216      tool_specified="$DATE"
6217      tool_basename="${tool_specified##*/}"
6218      if test "x$tool_basename" = "x$tool_specified"; then
6219        # A command without a complete path is provided, search $PATH.
6220        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6221$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6222        # Extract the first word of "$tool_basename", so it can be a program name with args.
6223set dummy $tool_basename; ac_word=$2
6224{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6225$as_echo_n "checking for $ac_word... " >&6; }
6226if ${ac_cv_path_DATE+:} false; then :
6227  $as_echo_n "(cached) " >&6
6228else
6229  case $DATE in
6230  [\\/]* | ?:[\\/]*)
6231  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6232  ;;
6233  *)
6234  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6235for as_dir in $PATH
6236do
6237  IFS=$as_save_IFS
6238  test -z "$as_dir" && as_dir=.
6239    for ac_exec_ext in '' $ac_executable_extensions; do
6240  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6241    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6242    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6243    break 2
6244  fi
6245done
6246  done
6247IFS=$as_save_IFS
6248
6249  ;;
6250esac
6251fi
6252DATE=$ac_cv_path_DATE
6253if test -n "$DATE"; then
6254  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6255$as_echo "$DATE" >&6; }
6256else
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6258$as_echo "no" >&6; }
6259fi
6260
6261
6262        if test "x$DATE" = x; then
6263          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6264        fi
6265      else
6266        # Otherwise we believe it is a complete path. Use it as it is.
6267        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6268$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6269        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6270$as_echo_n "checking for DATE... " >&6; }
6271        if test ! -x "$tool_specified"; then
6272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6273$as_echo "not found" >&6; }
6274          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6275        fi
6276        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6277$as_echo "$tool_specified" >&6; }
6278      fi
6279    fi
6280  fi
6281
6282
6283
6284  if test "x$DATE" = x; then
6285    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6286  fi
6287
6288
6289
6290
6291
6292  # Publish this variable in the help.
6293
6294
6295  if test "x$DIFF" = x; then
6296    # The variable is not set by user, try to locate tool using the code snippet
6297    for ac_prog in gdiff diff
6298do
6299  # Extract the first word of "$ac_prog", so it can be a program name with args.
6300set dummy $ac_prog; ac_word=$2
6301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6302$as_echo_n "checking for $ac_word... " >&6; }
6303if ${ac_cv_path_DIFF+:} false; then :
6304  $as_echo_n "(cached) " >&6
6305else
6306  case $DIFF in
6307  [\\/]* | ?:[\\/]*)
6308  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6309  ;;
6310  *)
6311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6312for as_dir in $PATH
6313do
6314  IFS=$as_save_IFS
6315  test -z "$as_dir" && as_dir=.
6316    for ac_exec_ext in '' $ac_executable_extensions; do
6317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6318    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6320    break 2
6321  fi
6322done
6323  done
6324IFS=$as_save_IFS
6325
6326  ;;
6327esac
6328fi
6329DIFF=$ac_cv_path_DIFF
6330if test -n "$DIFF"; then
6331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6332$as_echo "$DIFF" >&6; }
6333else
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6335$as_echo "no" >&6; }
6336fi
6337
6338
6339  test -n "$DIFF" && break
6340done
6341
6342  else
6343    # The variable is set, but is it from the command line or the environment?
6344
6345    # Try to remove the string !DIFF! from our list.
6346    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6347    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6348      # If it failed, the variable was not from the command line. Ignore it,
6349      # but warn the user (except for BASH, which is always set by the calling BASH).
6350      if test "xDIFF" != xBASH; then
6351        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6352$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6353      fi
6354      # Try to locate tool using the code snippet
6355      for ac_prog in gdiff diff
6356do
6357  # Extract the first word of "$ac_prog", so it can be a program name with args.
6358set dummy $ac_prog; ac_word=$2
6359{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6360$as_echo_n "checking for $ac_word... " >&6; }
6361if ${ac_cv_path_DIFF+:} false; then :
6362  $as_echo_n "(cached) " >&6
6363else
6364  case $DIFF in
6365  [\\/]* | ?:[\\/]*)
6366  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6367  ;;
6368  *)
6369  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6370for as_dir in $PATH
6371do
6372  IFS=$as_save_IFS
6373  test -z "$as_dir" && as_dir=.
6374    for ac_exec_ext in '' $ac_executable_extensions; do
6375  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6376    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6377    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6378    break 2
6379  fi
6380done
6381  done
6382IFS=$as_save_IFS
6383
6384  ;;
6385esac
6386fi
6387DIFF=$ac_cv_path_DIFF
6388if test -n "$DIFF"; then
6389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6390$as_echo "$DIFF" >&6; }
6391else
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6393$as_echo "no" >&6; }
6394fi
6395
6396
6397  test -n "$DIFF" && break
6398done
6399
6400    else
6401      # If it succeeded, then it was overridden by the user. We will use it
6402      # for the tool.
6403
6404      # First remove it from the list of overridden variables, so we can test
6405      # for unknown variables in the end.
6406      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6407
6408      # Check if the provided tool contains a complete path.
6409      tool_specified="$DIFF"
6410      tool_basename="${tool_specified##*/}"
6411      if test "x$tool_basename" = "x$tool_specified"; then
6412        # A command without a complete path is provided, search $PATH.
6413        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6414$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6415        # Extract the first word of "$tool_basename", so it can be a program name with args.
6416set dummy $tool_basename; ac_word=$2
6417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6418$as_echo_n "checking for $ac_word... " >&6; }
6419if ${ac_cv_path_DIFF+:} false; then :
6420  $as_echo_n "(cached) " >&6
6421else
6422  case $DIFF in
6423  [\\/]* | ?:[\\/]*)
6424  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6425  ;;
6426  *)
6427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6428for as_dir in $PATH
6429do
6430  IFS=$as_save_IFS
6431  test -z "$as_dir" && as_dir=.
6432    for ac_exec_ext in '' $ac_executable_extensions; do
6433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6434    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6436    break 2
6437  fi
6438done
6439  done
6440IFS=$as_save_IFS
6441
6442  ;;
6443esac
6444fi
6445DIFF=$ac_cv_path_DIFF
6446if test -n "$DIFF"; then
6447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6448$as_echo "$DIFF" >&6; }
6449else
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451$as_echo "no" >&6; }
6452fi
6453
6454
6455        if test "x$DIFF" = x; then
6456          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6457        fi
6458      else
6459        # Otherwise we believe it is a complete path. Use it as it is.
6460        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6461$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6462        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6463$as_echo_n "checking for DIFF... " >&6; }
6464        if test ! -x "$tool_specified"; then
6465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6466$as_echo "not found" >&6; }
6467          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6468        fi
6469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6470$as_echo "$tool_specified" >&6; }
6471      fi
6472    fi
6473  fi
6474
6475
6476
6477  if test "x$DIFF" = x; then
6478    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6479  fi
6480
6481
6482
6483
6484
6485  # Publish this variable in the help.
6486
6487
6488  if test "x$DIRNAME" = x; then
6489    # The variable is not set by user, try to locate tool using the code snippet
6490    for ac_prog in dirname
6491do
6492  # Extract the first word of "$ac_prog", so it can be a program name with args.
6493set dummy $ac_prog; ac_word=$2
6494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6495$as_echo_n "checking for $ac_word... " >&6; }
6496if ${ac_cv_path_DIRNAME+:} false; then :
6497  $as_echo_n "(cached) " >&6
6498else
6499  case $DIRNAME in
6500  [\\/]* | ?:[\\/]*)
6501  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6502  ;;
6503  *)
6504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6505for as_dir in $PATH
6506do
6507  IFS=$as_save_IFS
6508  test -z "$as_dir" && as_dir=.
6509    for ac_exec_ext in '' $ac_executable_extensions; do
6510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6511    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6513    break 2
6514  fi
6515done
6516  done
6517IFS=$as_save_IFS
6518
6519  ;;
6520esac
6521fi
6522DIRNAME=$ac_cv_path_DIRNAME
6523if test -n "$DIRNAME"; then
6524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6525$as_echo "$DIRNAME" >&6; }
6526else
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6528$as_echo "no" >&6; }
6529fi
6530
6531
6532  test -n "$DIRNAME" && break
6533done
6534
6535  else
6536    # The variable is set, but is it from the command line or the environment?
6537
6538    # Try to remove the string !DIRNAME! from our list.
6539    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6540    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6541      # If it failed, the variable was not from the command line. Ignore it,
6542      # but warn the user (except for BASH, which is always set by the calling BASH).
6543      if test "xDIRNAME" != xBASH; then
6544        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6545$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6546      fi
6547      # Try to locate tool using the code snippet
6548      for ac_prog in dirname
6549do
6550  # Extract the first word of "$ac_prog", so it can be a program name with args.
6551set dummy $ac_prog; ac_word=$2
6552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6553$as_echo_n "checking for $ac_word... " >&6; }
6554if ${ac_cv_path_DIRNAME+:} false; then :
6555  $as_echo_n "(cached) " >&6
6556else
6557  case $DIRNAME in
6558  [\\/]* | ?:[\\/]*)
6559  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6560  ;;
6561  *)
6562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6563for as_dir in $PATH
6564do
6565  IFS=$as_save_IFS
6566  test -z "$as_dir" && as_dir=.
6567    for ac_exec_ext in '' $ac_executable_extensions; do
6568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6569    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6571    break 2
6572  fi
6573done
6574  done
6575IFS=$as_save_IFS
6576
6577  ;;
6578esac
6579fi
6580DIRNAME=$ac_cv_path_DIRNAME
6581if test -n "$DIRNAME"; then
6582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6583$as_echo "$DIRNAME" >&6; }
6584else
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6586$as_echo "no" >&6; }
6587fi
6588
6589
6590  test -n "$DIRNAME" && break
6591done
6592
6593    else
6594      # If it succeeded, then it was overridden by the user. We will use it
6595      # for the tool.
6596
6597      # First remove it from the list of overridden variables, so we can test
6598      # for unknown variables in the end.
6599      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6600
6601      # Check if the provided tool contains a complete path.
6602      tool_specified="$DIRNAME"
6603      tool_basename="${tool_specified##*/}"
6604      if test "x$tool_basename" = "x$tool_specified"; then
6605        # A command without a complete path is provided, search $PATH.
6606        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6607$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6608        # Extract the first word of "$tool_basename", so it can be a program name with args.
6609set dummy $tool_basename; ac_word=$2
6610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6611$as_echo_n "checking for $ac_word... " >&6; }
6612if ${ac_cv_path_DIRNAME+:} false; then :
6613  $as_echo_n "(cached) " >&6
6614else
6615  case $DIRNAME in
6616  [\\/]* | ?:[\\/]*)
6617  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6618  ;;
6619  *)
6620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6621for as_dir in $PATH
6622do
6623  IFS=$as_save_IFS
6624  test -z "$as_dir" && as_dir=.
6625    for ac_exec_ext in '' $ac_executable_extensions; do
6626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6627    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6629    break 2
6630  fi
6631done
6632  done
6633IFS=$as_save_IFS
6634
6635  ;;
6636esac
6637fi
6638DIRNAME=$ac_cv_path_DIRNAME
6639if test -n "$DIRNAME"; then
6640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6641$as_echo "$DIRNAME" >&6; }
6642else
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6644$as_echo "no" >&6; }
6645fi
6646
6647
6648        if test "x$DIRNAME" = x; then
6649          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6650        fi
6651      else
6652        # Otherwise we believe it is a complete path. Use it as it is.
6653        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6654$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6655        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6656$as_echo_n "checking for DIRNAME... " >&6; }
6657        if test ! -x "$tool_specified"; then
6658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6659$as_echo "not found" >&6; }
6660          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6661        fi
6662        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6663$as_echo "$tool_specified" >&6; }
6664      fi
6665    fi
6666  fi
6667
6668
6669
6670  if test "x$DIRNAME" = x; then
6671    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6672  fi
6673
6674
6675
6676
6677
6678  # Publish this variable in the help.
6679
6680
6681  if test "x$ECHO" = x; then
6682    # The variable is not set by user, try to locate tool using the code snippet
6683    for ac_prog in echo
6684do
6685  # Extract the first word of "$ac_prog", so it can be a program name with args.
6686set dummy $ac_prog; ac_word=$2
6687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6688$as_echo_n "checking for $ac_word... " >&6; }
6689if ${ac_cv_path_ECHO+:} false; then :
6690  $as_echo_n "(cached) " >&6
6691else
6692  case $ECHO in
6693  [\\/]* | ?:[\\/]*)
6694  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6695  ;;
6696  *)
6697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6698for as_dir in $PATH
6699do
6700  IFS=$as_save_IFS
6701  test -z "$as_dir" && as_dir=.
6702    for ac_exec_ext in '' $ac_executable_extensions; do
6703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6704    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6706    break 2
6707  fi
6708done
6709  done
6710IFS=$as_save_IFS
6711
6712  ;;
6713esac
6714fi
6715ECHO=$ac_cv_path_ECHO
6716if test -n "$ECHO"; then
6717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6718$as_echo "$ECHO" >&6; }
6719else
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6721$as_echo "no" >&6; }
6722fi
6723
6724
6725  test -n "$ECHO" && break
6726done
6727
6728  else
6729    # The variable is set, but is it from the command line or the environment?
6730
6731    # Try to remove the string !ECHO! from our list.
6732    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6733    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6734      # If it failed, the variable was not from the command line. Ignore it,
6735      # but warn the user (except for BASH, which is always set by the calling BASH).
6736      if test "xECHO" != xBASH; then
6737        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6738$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6739      fi
6740      # Try to locate tool using the code snippet
6741      for ac_prog in echo
6742do
6743  # Extract the first word of "$ac_prog", so it can be a program name with args.
6744set dummy $ac_prog; ac_word=$2
6745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6746$as_echo_n "checking for $ac_word... " >&6; }
6747if ${ac_cv_path_ECHO+:} false; then :
6748  $as_echo_n "(cached) " >&6
6749else
6750  case $ECHO in
6751  [\\/]* | ?:[\\/]*)
6752  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6753  ;;
6754  *)
6755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6756for as_dir in $PATH
6757do
6758  IFS=$as_save_IFS
6759  test -z "$as_dir" && as_dir=.
6760    for ac_exec_ext in '' $ac_executable_extensions; do
6761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6762    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6764    break 2
6765  fi
6766done
6767  done
6768IFS=$as_save_IFS
6769
6770  ;;
6771esac
6772fi
6773ECHO=$ac_cv_path_ECHO
6774if test -n "$ECHO"; then
6775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6776$as_echo "$ECHO" >&6; }
6777else
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6779$as_echo "no" >&6; }
6780fi
6781
6782
6783  test -n "$ECHO" && break
6784done
6785
6786    else
6787      # If it succeeded, then it was overridden by the user. We will use it
6788      # for the tool.
6789
6790      # First remove it from the list of overridden variables, so we can test
6791      # for unknown variables in the end.
6792      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6793
6794      # Check if the provided tool contains a complete path.
6795      tool_specified="$ECHO"
6796      tool_basename="${tool_specified##*/}"
6797      if test "x$tool_basename" = "x$tool_specified"; then
6798        # A command without a complete path is provided, search $PATH.
6799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6800$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6801        # Extract the first word of "$tool_basename", so it can be a program name with args.
6802set dummy $tool_basename; ac_word=$2
6803{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6804$as_echo_n "checking for $ac_word... " >&6; }
6805if ${ac_cv_path_ECHO+:} false; then :
6806  $as_echo_n "(cached) " >&6
6807else
6808  case $ECHO in
6809  [\\/]* | ?:[\\/]*)
6810  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6811  ;;
6812  *)
6813  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6814for as_dir in $PATH
6815do
6816  IFS=$as_save_IFS
6817  test -z "$as_dir" && as_dir=.
6818    for ac_exec_ext in '' $ac_executable_extensions; do
6819  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6820    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6821    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6822    break 2
6823  fi
6824done
6825  done
6826IFS=$as_save_IFS
6827
6828  ;;
6829esac
6830fi
6831ECHO=$ac_cv_path_ECHO
6832if test -n "$ECHO"; then
6833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6834$as_echo "$ECHO" >&6; }
6835else
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6837$as_echo "no" >&6; }
6838fi
6839
6840
6841        if test "x$ECHO" = x; then
6842          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6843        fi
6844      else
6845        # Otherwise we believe it is a complete path. Use it as it is.
6846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6847$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6848        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6849$as_echo_n "checking for ECHO... " >&6; }
6850        if test ! -x "$tool_specified"; then
6851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6852$as_echo "not found" >&6; }
6853          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6854        fi
6855        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6856$as_echo "$tool_specified" >&6; }
6857      fi
6858    fi
6859  fi
6860
6861
6862
6863  if test "x$ECHO" = x; then
6864    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6865  fi
6866
6867
6868
6869
6870
6871  # Publish this variable in the help.
6872
6873
6874  if test "x$EXPR" = x; then
6875    # The variable is not set by user, try to locate tool using the code snippet
6876    for ac_prog in expr
6877do
6878  # Extract the first word of "$ac_prog", so it can be a program name with args.
6879set dummy $ac_prog; ac_word=$2
6880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6881$as_echo_n "checking for $ac_word... " >&6; }
6882if ${ac_cv_path_EXPR+:} false; then :
6883  $as_echo_n "(cached) " >&6
6884else
6885  case $EXPR in
6886  [\\/]* | ?:[\\/]*)
6887  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6888  ;;
6889  *)
6890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6891for as_dir in $PATH
6892do
6893  IFS=$as_save_IFS
6894  test -z "$as_dir" && as_dir=.
6895    for ac_exec_ext in '' $ac_executable_extensions; do
6896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6897    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6899    break 2
6900  fi
6901done
6902  done
6903IFS=$as_save_IFS
6904
6905  ;;
6906esac
6907fi
6908EXPR=$ac_cv_path_EXPR
6909if test -n "$EXPR"; then
6910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6911$as_echo "$EXPR" >&6; }
6912else
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6914$as_echo "no" >&6; }
6915fi
6916
6917
6918  test -n "$EXPR" && break
6919done
6920
6921  else
6922    # The variable is set, but is it from the command line or the environment?
6923
6924    # Try to remove the string !EXPR! from our list.
6925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6927      # If it failed, the variable was not from the command line. Ignore it,
6928      # but warn the user (except for BASH, which is always set by the calling BASH).
6929      if test "xEXPR" != xBASH; then
6930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6931$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6932      fi
6933      # Try to locate tool using the code snippet
6934      for ac_prog in expr
6935do
6936  # Extract the first word of "$ac_prog", so it can be a program name with args.
6937set dummy $ac_prog; ac_word=$2
6938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6939$as_echo_n "checking for $ac_word... " >&6; }
6940if ${ac_cv_path_EXPR+:} false; then :
6941  $as_echo_n "(cached) " >&6
6942else
6943  case $EXPR in
6944  [\\/]* | ?:[\\/]*)
6945  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6946  ;;
6947  *)
6948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6949for as_dir in $PATH
6950do
6951  IFS=$as_save_IFS
6952  test -z "$as_dir" && as_dir=.
6953    for ac_exec_ext in '' $ac_executable_extensions; do
6954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6955    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6957    break 2
6958  fi
6959done
6960  done
6961IFS=$as_save_IFS
6962
6963  ;;
6964esac
6965fi
6966EXPR=$ac_cv_path_EXPR
6967if test -n "$EXPR"; then
6968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6969$as_echo "$EXPR" >&6; }
6970else
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6972$as_echo "no" >&6; }
6973fi
6974
6975
6976  test -n "$EXPR" && break
6977done
6978
6979    else
6980      # If it succeeded, then it was overridden by the user. We will use it
6981      # for the tool.
6982
6983      # First remove it from the list of overridden variables, so we can test
6984      # for unknown variables in the end.
6985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6986
6987      # Check if the provided tool contains a complete path.
6988      tool_specified="$EXPR"
6989      tool_basename="${tool_specified##*/}"
6990      if test "x$tool_basename" = "x$tool_specified"; then
6991        # A command without a complete path is provided, search $PATH.
6992        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6993$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6994        # Extract the first word of "$tool_basename", so it can be a program name with args.
6995set dummy $tool_basename; ac_word=$2
6996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6997$as_echo_n "checking for $ac_word... " >&6; }
6998if ${ac_cv_path_EXPR+:} false; then :
6999  $as_echo_n "(cached) " >&6
7000else
7001  case $EXPR in
7002  [\\/]* | ?:[\\/]*)
7003  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7004  ;;
7005  *)
7006  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7007for as_dir in $PATH
7008do
7009  IFS=$as_save_IFS
7010  test -z "$as_dir" && as_dir=.
7011    for ac_exec_ext in '' $ac_executable_extensions; do
7012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7013    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7015    break 2
7016  fi
7017done
7018  done
7019IFS=$as_save_IFS
7020
7021  ;;
7022esac
7023fi
7024EXPR=$ac_cv_path_EXPR
7025if test -n "$EXPR"; then
7026  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7027$as_echo "$EXPR" >&6; }
7028else
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7030$as_echo "no" >&6; }
7031fi
7032
7033
7034        if test "x$EXPR" = x; then
7035          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7036        fi
7037      else
7038        # Otherwise we believe it is a complete path. Use it as it is.
7039        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7040$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7042$as_echo_n "checking for EXPR... " >&6; }
7043        if test ! -x "$tool_specified"; then
7044          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7045$as_echo "not found" >&6; }
7046          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7047        fi
7048        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7049$as_echo "$tool_specified" >&6; }
7050      fi
7051    fi
7052  fi
7053
7054
7055
7056  if test "x$EXPR" = x; then
7057    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7058  fi
7059
7060
7061
7062
7063
7064  # Publish this variable in the help.
7065
7066
7067  if test "x$FILE" = x; then
7068    # The variable is not set by user, try to locate tool using the code snippet
7069    for ac_prog in file
7070do
7071  # Extract the first word of "$ac_prog", so it can be a program name with args.
7072set dummy $ac_prog; ac_word=$2
7073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7074$as_echo_n "checking for $ac_word... " >&6; }
7075if ${ac_cv_path_FILE+:} false; then :
7076  $as_echo_n "(cached) " >&6
7077else
7078  case $FILE in
7079  [\\/]* | ?:[\\/]*)
7080  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7081  ;;
7082  *)
7083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7084for as_dir in $PATH
7085do
7086  IFS=$as_save_IFS
7087  test -z "$as_dir" && as_dir=.
7088    for ac_exec_ext in '' $ac_executable_extensions; do
7089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7090    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7092    break 2
7093  fi
7094done
7095  done
7096IFS=$as_save_IFS
7097
7098  ;;
7099esac
7100fi
7101FILE=$ac_cv_path_FILE
7102if test -n "$FILE"; then
7103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7104$as_echo "$FILE" >&6; }
7105else
7106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7107$as_echo "no" >&6; }
7108fi
7109
7110
7111  test -n "$FILE" && break
7112done
7113
7114  else
7115    # The variable is set, but is it from the command line or the environment?
7116
7117    # Try to remove the string !FILE! from our list.
7118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7120      # If it failed, the variable was not from the command line. Ignore it,
7121      # but warn the user (except for BASH, which is always set by the calling BASH).
7122      if test "xFILE" != xBASH; then
7123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7124$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7125      fi
7126      # Try to locate tool using the code snippet
7127      for ac_prog in file
7128do
7129  # Extract the first word of "$ac_prog", so it can be a program name with args.
7130set dummy $ac_prog; ac_word=$2
7131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7132$as_echo_n "checking for $ac_word... " >&6; }
7133if ${ac_cv_path_FILE+:} false; then :
7134  $as_echo_n "(cached) " >&6
7135else
7136  case $FILE in
7137  [\\/]* | ?:[\\/]*)
7138  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7139  ;;
7140  *)
7141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7142for as_dir in $PATH
7143do
7144  IFS=$as_save_IFS
7145  test -z "$as_dir" && as_dir=.
7146    for ac_exec_ext in '' $ac_executable_extensions; do
7147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7148    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7150    break 2
7151  fi
7152done
7153  done
7154IFS=$as_save_IFS
7155
7156  ;;
7157esac
7158fi
7159FILE=$ac_cv_path_FILE
7160if test -n "$FILE"; then
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7162$as_echo "$FILE" >&6; }
7163else
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7165$as_echo "no" >&6; }
7166fi
7167
7168
7169  test -n "$FILE" && break
7170done
7171
7172    else
7173      # If it succeeded, then it was overridden by the user. We will use it
7174      # for the tool.
7175
7176      # First remove it from the list of overridden variables, so we can test
7177      # for unknown variables in the end.
7178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7179
7180      # Check if the provided tool contains a complete path.
7181      tool_specified="$FILE"
7182      tool_basename="${tool_specified##*/}"
7183      if test "x$tool_basename" = "x$tool_specified"; then
7184        # A command without a complete path is provided, search $PATH.
7185        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7186$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7187        # Extract the first word of "$tool_basename", so it can be a program name with args.
7188set dummy $tool_basename; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_FILE+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $FILE in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217FILE=$ac_cv_path_FILE
7218if test -n "$FILE"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7220$as_echo "$FILE" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227        if test "x$FILE" = x; then
7228          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7229        fi
7230      else
7231        # Otherwise we believe it is a complete path. Use it as it is.
7232        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7233$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7234        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7235$as_echo_n "checking for FILE... " >&6; }
7236        if test ! -x "$tool_specified"; then
7237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7238$as_echo "not found" >&6; }
7239          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7240        fi
7241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7242$as_echo "$tool_specified" >&6; }
7243      fi
7244    fi
7245  fi
7246
7247
7248
7249  if test "x$FILE" = x; then
7250    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7251  fi
7252
7253
7254
7255
7256
7257  # Publish this variable in the help.
7258
7259
7260  if test "x$FIND" = x; then
7261    # The variable is not set by user, try to locate tool using the code snippet
7262    for ac_prog in find
7263do
7264  # Extract the first word of "$ac_prog", so it can be a program name with args.
7265set dummy $ac_prog; ac_word=$2
7266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7267$as_echo_n "checking for $ac_word... " >&6; }
7268if ${ac_cv_path_FIND+:} false; then :
7269  $as_echo_n "(cached) " >&6
7270else
7271  case $FIND in
7272  [\\/]* | ?:[\\/]*)
7273  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7274  ;;
7275  *)
7276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7277for as_dir in $PATH
7278do
7279  IFS=$as_save_IFS
7280  test -z "$as_dir" && as_dir=.
7281    for ac_exec_ext in '' $ac_executable_extensions; do
7282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7283    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7285    break 2
7286  fi
7287done
7288  done
7289IFS=$as_save_IFS
7290
7291  ;;
7292esac
7293fi
7294FIND=$ac_cv_path_FIND
7295if test -n "$FIND"; then
7296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7297$as_echo "$FIND" >&6; }
7298else
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7300$as_echo "no" >&6; }
7301fi
7302
7303
7304  test -n "$FIND" && break
7305done
7306
7307  else
7308    # The variable is set, but is it from the command line or the environment?
7309
7310    # Try to remove the string !FIND! from our list.
7311    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7312    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7313      # If it failed, the variable was not from the command line. Ignore it,
7314      # but warn the user (except for BASH, which is always set by the calling BASH).
7315      if test "xFIND" != xBASH; then
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7317$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7318      fi
7319      # Try to locate tool using the code snippet
7320      for ac_prog in find
7321do
7322  # Extract the first word of "$ac_prog", so it can be a program name with args.
7323set dummy $ac_prog; ac_word=$2
7324{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7325$as_echo_n "checking for $ac_word... " >&6; }
7326if ${ac_cv_path_FIND+:} false; then :
7327  $as_echo_n "(cached) " >&6
7328else
7329  case $FIND in
7330  [\\/]* | ?:[\\/]*)
7331  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7332  ;;
7333  *)
7334  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7335for as_dir in $PATH
7336do
7337  IFS=$as_save_IFS
7338  test -z "$as_dir" && as_dir=.
7339    for ac_exec_ext in '' $ac_executable_extensions; do
7340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7341    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7343    break 2
7344  fi
7345done
7346  done
7347IFS=$as_save_IFS
7348
7349  ;;
7350esac
7351fi
7352FIND=$ac_cv_path_FIND
7353if test -n "$FIND"; then
7354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7355$as_echo "$FIND" >&6; }
7356else
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7358$as_echo "no" >&6; }
7359fi
7360
7361
7362  test -n "$FIND" && break
7363done
7364
7365    else
7366      # If it succeeded, then it was overridden by the user. We will use it
7367      # for the tool.
7368
7369      # First remove it from the list of overridden variables, so we can test
7370      # for unknown variables in the end.
7371      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7372
7373      # Check if the provided tool contains a complete path.
7374      tool_specified="$FIND"
7375      tool_basename="${tool_specified##*/}"
7376      if test "x$tool_basename" = "x$tool_specified"; then
7377        # A command without a complete path is provided, search $PATH.
7378        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7379$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7380        # Extract the first word of "$tool_basename", so it can be a program name with args.
7381set dummy $tool_basename; ac_word=$2
7382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7383$as_echo_n "checking for $ac_word... " >&6; }
7384if ${ac_cv_path_FIND+:} false; then :
7385  $as_echo_n "(cached) " >&6
7386else
7387  case $FIND in
7388  [\\/]* | ?:[\\/]*)
7389  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7390  ;;
7391  *)
7392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7393for as_dir in $PATH
7394do
7395  IFS=$as_save_IFS
7396  test -z "$as_dir" && as_dir=.
7397    for ac_exec_ext in '' $ac_executable_extensions; do
7398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7399    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7401    break 2
7402  fi
7403done
7404  done
7405IFS=$as_save_IFS
7406
7407  ;;
7408esac
7409fi
7410FIND=$ac_cv_path_FIND
7411if test -n "$FIND"; then
7412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7413$as_echo "$FIND" >&6; }
7414else
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7416$as_echo "no" >&6; }
7417fi
7418
7419
7420        if test "x$FIND" = x; then
7421          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7422        fi
7423      else
7424        # Otherwise we believe it is a complete path. Use it as it is.
7425        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7426$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7427        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7428$as_echo_n "checking for FIND... " >&6; }
7429        if test ! -x "$tool_specified"; then
7430          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7431$as_echo "not found" >&6; }
7432          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7433        fi
7434        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7435$as_echo "$tool_specified" >&6; }
7436      fi
7437    fi
7438  fi
7439
7440
7441
7442  if test "x$FIND" = x; then
7443    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7444  fi
7445
7446
7447
7448
7449
7450  # Publish this variable in the help.
7451
7452
7453  if test "x$HEAD" = x; then
7454    # The variable is not set by user, try to locate tool using the code snippet
7455    for ac_prog in head
7456do
7457  # Extract the first word of "$ac_prog", so it can be a program name with args.
7458set dummy $ac_prog; ac_word=$2
7459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7460$as_echo_n "checking for $ac_word... " >&6; }
7461if ${ac_cv_path_HEAD+:} false; then :
7462  $as_echo_n "(cached) " >&6
7463else
7464  case $HEAD in
7465  [\\/]* | ?:[\\/]*)
7466  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7467  ;;
7468  *)
7469  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7470for as_dir in $PATH
7471do
7472  IFS=$as_save_IFS
7473  test -z "$as_dir" && as_dir=.
7474    for ac_exec_ext in '' $ac_executable_extensions; do
7475  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7476    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7477    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7478    break 2
7479  fi
7480done
7481  done
7482IFS=$as_save_IFS
7483
7484  ;;
7485esac
7486fi
7487HEAD=$ac_cv_path_HEAD
7488if test -n "$HEAD"; then
7489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7490$as_echo "$HEAD" >&6; }
7491else
7492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7493$as_echo "no" >&6; }
7494fi
7495
7496
7497  test -n "$HEAD" && break
7498done
7499
7500  else
7501    # The variable is set, but is it from the command line or the environment?
7502
7503    # Try to remove the string !HEAD! from our list.
7504    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7505    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7506      # If it failed, the variable was not from the command line. Ignore it,
7507      # but warn the user (except for BASH, which is always set by the calling BASH).
7508      if test "xHEAD" != xBASH; then
7509        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7510$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7511      fi
7512      # Try to locate tool using the code snippet
7513      for ac_prog in head
7514do
7515  # Extract the first word of "$ac_prog", so it can be a program name with args.
7516set dummy $ac_prog; ac_word=$2
7517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7518$as_echo_n "checking for $ac_word... " >&6; }
7519if ${ac_cv_path_HEAD+:} false; then :
7520  $as_echo_n "(cached) " >&6
7521else
7522  case $HEAD in
7523  [\\/]* | ?:[\\/]*)
7524  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7525  ;;
7526  *)
7527  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7528for as_dir in $PATH
7529do
7530  IFS=$as_save_IFS
7531  test -z "$as_dir" && as_dir=.
7532    for ac_exec_ext in '' $ac_executable_extensions; do
7533  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7534    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7535    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7536    break 2
7537  fi
7538done
7539  done
7540IFS=$as_save_IFS
7541
7542  ;;
7543esac
7544fi
7545HEAD=$ac_cv_path_HEAD
7546if test -n "$HEAD"; then
7547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7548$as_echo "$HEAD" >&6; }
7549else
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7551$as_echo "no" >&6; }
7552fi
7553
7554
7555  test -n "$HEAD" && break
7556done
7557
7558    else
7559      # If it succeeded, then it was overridden by the user. We will use it
7560      # for the tool.
7561
7562      # First remove it from the list of overridden variables, so we can test
7563      # for unknown variables in the end.
7564      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7565
7566      # Check if the provided tool contains a complete path.
7567      tool_specified="$HEAD"
7568      tool_basename="${tool_specified##*/}"
7569      if test "x$tool_basename" = "x$tool_specified"; then
7570        # A command without a complete path is provided, search $PATH.
7571        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7572$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7573        # Extract the first word of "$tool_basename", so it can be a program name with args.
7574set dummy $tool_basename; ac_word=$2
7575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7576$as_echo_n "checking for $ac_word... " >&6; }
7577if ${ac_cv_path_HEAD+:} false; then :
7578  $as_echo_n "(cached) " >&6
7579else
7580  case $HEAD in
7581  [\\/]* | ?:[\\/]*)
7582  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7583  ;;
7584  *)
7585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7586for as_dir in $PATH
7587do
7588  IFS=$as_save_IFS
7589  test -z "$as_dir" && as_dir=.
7590    for ac_exec_ext in '' $ac_executable_extensions; do
7591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7592    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7594    break 2
7595  fi
7596done
7597  done
7598IFS=$as_save_IFS
7599
7600  ;;
7601esac
7602fi
7603HEAD=$ac_cv_path_HEAD
7604if test -n "$HEAD"; then
7605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7606$as_echo "$HEAD" >&6; }
7607else
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7609$as_echo "no" >&6; }
7610fi
7611
7612
7613        if test "x$HEAD" = x; then
7614          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7615        fi
7616      else
7617        # Otherwise we believe it is a complete path. Use it as it is.
7618        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7619$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7620        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7621$as_echo_n "checking for HEAD... " >&6; }
7622        if test ! -x "$tool_specified"; then
7623          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7624$as_echo "not found" >&6; }
7625          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7626        fi
7627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7628$as_echo "$tool_specified" >&6; }
7629      fi
7630    fi
7631  fi
7632
7633
7634
7635  if test "x$HEAD" = x; then
7636    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7637  fi
7638
7639
7640
7641
7642
7643  # Publish this variable in the help.
7644
7645
7646  if test "x$LN" = x; then
7647    # The variable is not set by user, try to locate tool using the code snippet
7648    for ac_prog in ln
7649do
7650  # Extract the first word of "$ac_prog", so it can be a program name with args.
7651set dummy $ac_prog; ac_word=$2
7652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7653$as_echo_n "checking for $ac_word... " >&6; }
7654if ${ac_cv_path_LN+:} false; then :
7655  $as_echo_n "(cached) " >&6
7656else
7657  case $LN in
7658  [\\/]* | ?:[\\/]*)
7659  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7660  ;;
7661  *)
7662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7663for as_dir in $PATH
7664do
7665  IFS=$as_save_IFS
7666  test -z "$as_dir" && as_dir=.
7667    for ac_exec_ext in '' $ac_executable_extensions; do
7668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7669    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7671    break 2
7672  fi
7673done
7674  done
7675IFS=$as_save_IFS
7676
7677  ;;
7678esac
7679fi
7680LN=$ac_cv_path_LN
7681if test -n "$LN"; then
7682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7683$as_echo "$LN" >&6; }
7684else
7685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7686$as_echo "no" >&6; }
7687fi
7688
7689
7690  test -n "$LN" && break
7691done
7692
7693  else
7694    # The variable is set, but is it from the command line or the environment?
7695
7696    # Try to remove the string !LN! from our list.
7697    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7698    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7699      # If it failed, the variable was not from the command line. Ignore it,
7700      # but warn the user (except for BASH, which is always set by the calling BASH).
7701      if test "xLN" != xBASH; then
7702        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7703$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7704      fi
7705      # Try to locate tool using the code snippet
7706      for ac_prog in ln
7707do
7708  # Extract the first word of "$ac_prog", so it can be a program name with args.
7709set dummy $ac_prog; ac_word=$2
7710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7711$as_echo_n "checking for $ac_word... " >&6; }
7712if ${ac_cv_path_LN+:} false; then :
7713  $as_echo_n "(cached) " >&6
7714else
7715  case $LN in
7716  [\\/]* | ?:[\\/]*)
7717  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7718  ;;
7719  *)
7720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7721for as_dir in $PATH
7722do
7723  IFS=$as_save_IFS
7724  test -z "$as_dir" && as_dir=.
7725    for ac_exec_ext in '' $ac_executable_extensions; do
7726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7727    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7729    break 2
7730  fi
7731done
7732  done
7733IFS=$as_save_IFS
7734
7735  ;;
7736esac
7737fi
7738LN=$ac_cv_path_LN
7739if test -n "$LN"; then
7740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7741$as_echo "$LN" >&6; }
7742else
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7744$as_echo "no" >&6; }
7745fi
7746
7747
7748  test -n "$LN" && break
7749done
7750
7751    else
7752      # If it succeeded, then it was overridden by the user. We will use it
7753      # for the tool.
7754
7755      # First remove it from the list of overridden variables, so we can test
7756      # for unknown variables in the end.
7757      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7758
7759      # Check if the provided tool contains a complete path.
7760      tool_specified="$LN"
7761      tool_basename="${tool_specified##*/}"
7762      if test "x$tool_basename" = "x$tool_specified"; then
7763        # A command without a complete path is provided, search $PATH.
7764        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7765$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7766        # Extract the first word of "$tool_basename", so it can be a program name with args.
7767set dummy $tool_basename; ac_word=$2
7768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7769$as_echo_n "checking for $ac_word... " >&6; }
7770if ${ac_cv_path_LN+:} false; then :
7771  $as_echo_n "(cached) " >&6
7772else
7773  case $LN in
7774  [\\/]* | ?:[\\/]*)
7775  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7776  ;;
7777  *)
7778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7779for as_dir in $PATH
7780do
7781  IFS=$as_save_IFS
7782  test -z "$as_dir" && as_dir=.
7783    for ac_exec_ext in '' $ac_executable_extensions; do
7784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7785    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7787    break 2
7788  fi
7789done
7790  done
7791IFS=$as_save_IFS
7792
7793  ;;
7794esac
7795fi
7796LN=$ac_cv_path_LN
7797if test -n "$LN"; then
7798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7799$as_echo "$LN" >&6; }
7800else
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7802$as_echo "no" >&6; }
7803fi
7804
7805
7806        if test "x$LN" = x; then
7807          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7808        fi
7809      else
7810        # Otherwise we believe it is a complete path. Use it as it is.
7811        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7812$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7813        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7814$as_echo_n "checking for LN... " >&6; }
7815        if test ! -x "$tool_specified"; then
7816          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7817$as_echo "not found" >&6; }
7818          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7819        fi
7820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7821$as_echo "$tool_specified" >&6; }
7822      fi
7823    fi
7824  fi
7825
7826
7827
7828  if test "x$LN" = x; then
7829    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7830  fi
7831
7832
7833
7834
7835
7836  # Publish this variable in the help.
7837
7838
7839  if test "x$LS" = x; then
7840    # The variable is not set by user, try to locate tool using the code snippet
7841    for ac_prog in ls
7842do
7843  # Extract the first word of "$ac_prog", so it can be a program name with args.
7844set dummy $ac_prog; ac_word=$2
7845{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7846$as_echo_n "checking for $ac_word... " >&6; }
7847if ${ac_cv_path_LS+:} false; then :
7848  $as_echo_n "(cached) " >&6
7849else
7850  case $LS in
7851  [\\/]* | ?:[\\/]*)
7852  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7853  ;;
7854  *)
7855  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7856for as_dir in $PATH
7857do
7858  IFS=$as_save_IFS
7859  test -z "$as_dir" && as_dir=.
7860    for ac_exec_ext in '' $ac_executable_extensions; do
7861  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7862    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7863    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7864    break 2
7865  fi
7866done
7867  done
7868IFS=$as_save_IFS
7869
7870  ;;
7871esac
7872fi
7873LS=$ac_cv_path_LS
7874if test -n "$LS"; then
7875  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7876$as_echo "$LS" >&6; }
7877else
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7879$as_echo "no" >&6; }
7880fi
7881
7882
7883  test -n "$LS" && break
7884done
7885
7886  else
7887    # The variable is set, but is it from the command line or the environment?
7888
7889    # Try to remove the string !LS! from our list.
7890    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7891    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7892      # If it failed, the variable was not from the command line. Ignore it,
7893      # but warn the user (except for BASH, which is always set by the calling BASH).
7894      if test "xLS" != xBASH; then
7895        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7896$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7897      fi
7898      # Try to locate tool using the code snippet
7899      for ac_prog in ls
7900do
7901  # Extract the first word of "$ac_prog", so it can be a program name with args.
7902set dummy $ac_prog; ac_word=$2
7903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7904$as_echo_n "checking for $ac_word... " >&6; }
7905if ${ac_cv_path_LS+:} false; then :
7906  $as_echo_n "(cached) " >&6
7907else
7908  case $LS in
7909  [\\/]* | ?:[\\/]*)
7910  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7911  ;;
7912  *)
7913  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7914for as_dir in $PATH
7915do
7916  IFS=$as_save_IFS
7917  test -z "$as_dir" && as_dir=.
7918    for ac_exec_ext in '' $ac_executable_extensions; do
7919  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7920    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7921    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7922    break 2
7923  fi
7924done
7925  done
7926IFS=$as_save_IFS
7927
7928  ;;
7929esac
7930fi
7931LS=$ac_cv_path_LS
7932if test -n "$LS"; then
7933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7934$as_echo "$LS" >&6; }
7935else
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7937$as_echo "no" >&6; }
7938fi
7939
7940
7941  test -n "$LS" && break
7942done
7943
7944    else
7945      # If it succeeded, then it was overridden by the user. We will use it
7946      # for the tool.
7947
7948      # First remove it from the list of overridden variables, so we can test
7949      # for unknown variables in the end.
7950      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7951
7952      # Check if the provided tool contains a complete path.
7953      tool_specified="$LS"
7954      tool_basename="${tool_specified##*/}"
7955      if test "x$tool_basename" = "x$tool_specified"; then
7956        # A command without a complete path is provided, search $PATH.
7957        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7958$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7959        # Extract the first word of "$tool_basename", so it can be a program name with args.
7960set dummy $tool_basename; ac_word=$2
7961{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7962$as_echo_n "checking for $ac_word... " >&6; }
7963if ${ac_cv_path_LS+:} false; then :
7964  $as_echo_n "(cached) " >&6
7965else
7966  case $LS in
7967  [\\/]* | ?:[\\/]*)
7968  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7969  ;;
7970  *)
7971  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7972for as_dir in $PATH
7973do
7974  IFS=$as_save_IFS
7975  test -z "$as_dir" && as_dir=.
7976    for ac_exec_ext in '' $ac_executable_extensions; do
7977  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7978    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7980    break 2
7981  fi
7982done
7983  done
7984IFS=$as_save_IFS
7985
7986  ;;
7987esac
7988fi
7989LS=$ac_cv_path_LS
7990if test -n "$LS"; then
7991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7992$as_echo "$LS" >&6; }
7993else
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7995$as_echo "no" >&6; }
7996fi
7997
7998
7999        if test "x$LS" = x; then
8000          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8001        fi
8002      else
8003        # Otherwise we believe it is a complete path. Use it as it is.
8004        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8005$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8006        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8007$as_echo_n "checking for LS... " >&6; }
8008        if test ! -x "$tool_specified"; then
8009          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8010$as_echo "not found" >&6; }
8011          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8012        fi
8013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8014$as_echo "$tool_specified" >&6; }
8015      fi
8016    fi
8017  fi
8018
8019
8020
8021  if test "x$LS" = x; then
8022    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8023  fi
8024
8025
8026
8027
8028
8029  # Publish this variable in the help.
8030
8031
8032  if test "x$MKDIR" = x; then
8033    # The variable is not set by user, try to locate tool using the code snippet
8034    for ac_prog in mkdir
8035do
8036  # Extract the first word of "$ac_prog", so it can be a program name with args.
8037set dummy $ac_prog; ac_word=$2
8038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8039$as_echo_n "checking for $ac_word... " >&6; }
8040if ${ac_cv_path_MKDIR+:} false; then :
8041  $as_echo_n "(cached) " >&6
8042else
8043  case $MKDIR in
8044  [\\/]* | ?:[\\/]*)
8045  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8046  ;;
8047  *)
8048  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8049for as_dir in $PATH
8050do
8051  IFS=$as_save_IFS
8052  test -z "$as_dir" && as_dir=.
8053    for ac_exec_ext in '' $ac_executable_extensions; do
8054  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8055    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8056    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8057    break 2
8058  fi
8059done
8060  done
8061IFS=$as_save_IFS
8062
8063  ;;
8064esac
8065fi
8066MKDIR=$ac_cv_path_MKDIR
8067if test -n "$MKDIR"; then
8068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8069$as_echo "$MKDIR" >&6; }
8070else
8071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8072$as_echo "no" >&6; }
8073fi
8074
8075
8076  test -n "$MKDIR" && break
8077done
8078
8079  else
8080    # The variable is set, but is it from the command line or the environment?
8081
8082    # Try to remove the string !MKDIR! from our list.
8083    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8084    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8085      # If it failed, the variable was not from the command line. Ignore it,
8086      # but warn the user (except for BASH, which is always set by the calling BASH).
8087      if test "xMKDIR" != xBASH; then
8088        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8089$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8090      fi
8091      # Try to locate tool using the code snippet
8092      for ac_prog in mkdir
8093do
8094  # Extract the first word of "$ac_prog", so it can be a program name with args.
8095set dummy $ac_prog; ac_word=$2
8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8097$as_echo_n "checking for $ac_word... " >&6; }
8098if ${ac_cv_path_MKDIR+:} false; then :
8099  $as_echo_n "(cached) " >&6
8100else
8101  case $MKDIR in
8102  [\\/]* | ?:[\\/]*)
8103  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8104  ;;
8105  *)
8106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8107for as_dir in $PATH
8108do
8109  IFS=$as_save_IFS
8110  test -z "$as_dir" && as_dir=.
8111    for ac_exec_ext in '' $ac_executable_extensions; do
8112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8113    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8115    break 2
8116  fi
8117done
8118  done
8119IFS=$as_save_IFS
8120
8121  ;;
8122esac
8123fi
8124MKDIR=$ac_cv_path_MKDIR
8125if test -n "$MKDIR"; then
8126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8127$as_echo "$MKDIR" >&6; }
8128else
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8130$as_echo "no" >&6; }
8131fi
8132
8133
8134  test -n "$MKDIR" && break
8135done
8136
8137    else
8138      # If it succeeded, then it was overridden by the user. We will use it
8139      # for the tool.
8140
8141      # First remove it from the list of overridden variables, so we can test
8142      # for unknown variables in the end.
8143      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8144
8145      # Check if the provided tool contains a complete path.
8146      tool_specified="$MKDIR"
8147      tool_basename="${tool_specified##*/}"
8148      if test "x$tool_basename" = "x$tool_specified"; then
8149        # A command without a complete path is provided, search $PATH.
8150        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8151$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8152        # Extract the first word of "$tool_basename", so it can be a program name with args.
8153set dummy $tool_basename; ac_word=$2
8154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8155$as_echo_n "checking for $ac_word... " >&6; }
8156if ${ac_cv_path_MKDIR+:} false; then :
8157  $as_echo_n "(cached) " >&6
8158else
8159  case $MKDIR in
8160  [\\/]* | ?:[\\/]*)
8161  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8162  ;;
8163  *)
8164  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8165for as_dir in $PATH
8166do
8167  IFS=$as_save_IFS
8168  test -z "$as_dir" && as_dir=.
8169    for ac_exec_ext in '' $ac_executable_extensions; do
8170  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8171    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8172    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8173    break 2
8174  fi
8175done
8176  done
8177IFS=$as_save_IFS
8178
8179  ;;
8180esac
8181fi
8182MKDIR=$ac_cv_path_MKDIR
8183if test -n "$MKDIR"; then
8184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8185$as_echo "$MKDIR" >&6; }
8186else
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8188$as_echo "no" >&6; }
8189fi
8190
8191
8192        if test "x$MKDIR" = x; then
8193          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8194        fi
8195      else
8196        # Otherwise we believe it is a complete path. Use it as it is.
8197        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8198$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8199        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8200$as_echo_n "checking for MKDIR... " >&6; }
8201        if test ! -x "$tool_specified"; then
8202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8203$as_echo "not found" >&6; }
8204          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8205        fi
8206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8207$as_echo "$tool_specified" >&6; }
8208      fi
8209    fi
8210  fi
8211
8212
8213
8214  if test "x$MKDIR" = x; then
8215    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8216  fi
8217
8218
8219
8220
8221
8222  # Publish this variable in the help.
8223
8224
8225  if test "x$MKTEMP" = x; then
8226    # The variable is not set by user, try to locate tool using the code snippet
8227    for ac_prog in mktemp
8228do
8229  # Extract the first word of "$ac_prog", so it can be a program name with args.
8230set dummy $ac_prog; ac_word=$2
8231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8232$as_echo_n "checking for $ac_word... " >&6; }
8233if ${ac_cv_path_MKTEMP+:} false; then :
8234  $as_echo_n "(cached) " >&6
8235else
8236  case $MKTEMP in
8237  [\\/]* | ?:[\\/]*)
8238  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8239  ;;
8240  *)
8241  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8242for as_dir in $PATH
8243do
8244  IFS=$as_save_IFS
8245  test -z "$as_dir" && as_dir=.
8246    for ac_exec_ext in '' $ac_executable_extensions; do
8247  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8248    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8249    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8250    break 2
8251  fi
8252done
8253  done
8254IFS=$as_save_IFS
8255
8256  ;;
8257esac
8258fi
8259MKTEMP=$ac_cv_path_MKTEMP
8260if test -n "$MKTEMP"; then
8261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8262$as_echo "$MKTEMP" >&6; }
8263else
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8265$as_echo "no" >&6; }
8266fi
8267
8268
8269  test -n "$MKTEMP" && break
8270done
8271
8272  else
8273    # The variable is set, but is it from the command line or the environment?
8274
8275    # Try to remove the string !MKTEMP! from our list.
8276    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8277    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8278      # If it failed, the variable was not from the command line. Ignore it,
8279      # but warn the user (except for BASH, which is always set by the calling BASH).
8280      if test "xMKTEMP" != xBASH; then
8281        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8282$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8283      fi
8284      # Try to locate tool using the code snippet
8285      for ac_prog in mktemp
8286do
8287  # Extract the first word of "$ac_prog", so it can be a program name with args.
8288set dummy $ac_prog; ac_word=$2
8289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8290$as_echo_n "checking for $ac_word... " >&6; }
8291if ${ac_cv_path_MKTEMP+:} false; then :
8292  $as_echo_n "(cached) " >&6
8293else
8294  case $MKTEMP in
8295  [\\/]* | ?:[\\/]*)
8296  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8297  ;;
8298  *)
8299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8300for as_dir in $PATH
8301do
8302  IFS=$as_save_IFS
8303  test -z "$as_dir" && as_dir=.
8304    for ac_exec_ext in '' $ac_executable_extensions; do
8305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8306    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8308    break 2
8309  fi
8310done
8311  done
8312IFS=$as_save_IFS
8313
8314  ;;
8315esac
8316fi
8317MKTEMP=$ac_cv_path_MKTEMP
8318if test -n "$MKTEMP"; then
8319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8320$as_echo "$MKTEMP" >&6; }
8321else
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8323$as_echo "no" >&6; }
8324fi
8325
8326
8327  test -n "$MKTEMP" && break
8328done
8329
8330    else
8331      # If it succeeded, then it was overridden by the user. We will use it
8332      # for the tool.
8333
8334      # First remove it from the list of overridden variables, so we can test
8335      # for unknown variables in the end.
8336      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8337
8338      # Check if the provided tool contains a complete path.
8339      tool_specified="$MKTEMP"
8340      tool_basename="${tool_specified##*/}"
8341      if test "x$tool_basename" = "x$tool_specified"; then
8342        # A command without a complete path is provided, search $PATH.
8343        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8344$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8345        # Extract the first word of "$tool_basename", so it can be a program name with args.
8346set dummy $tool_basename; ac_word=$2
8347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8348$as_echo_n "checking for $ac_word... " >&6; }
8349if ${ac_cv_path_MKTEMP+:} false; then :
8350  $as_echo_n "(cached) " >&6
8351else
8352  case $MKTEMP in
8353  [\\/]* | ?:[\\/]*)
8354  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8355  ;;
8356  *)
8357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8358for as_dir in $PATH
8359do
8360  IFS=$as_save_IFS
8361  test -z "$as_dir" && as_dir=.
8362    for ac_exec_ext in '' $ac_executable_extensions; do
8363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8364    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8366    break 2
8367  fi
8368done
8369  done
8370IFS=$as_save_IFS
8371
8372  ;;
8373esac
8374fi
8375MKTEMP=$ac_cv_path_MKTEMP
8376if test -n "$MKTEMP"; then
8377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8378$as_echo "$MKTEMP" >&6; }
8379else
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8381$as_echo "no" >&6; }
8382fi
8383
8384
8385        if test "x$MKTEMP" = x; then
8386          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8387        fi
8388      else
8389        # Otherwise we believe it is a complete path. Use it as it is.
8390        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8391$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8392        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8393$as_echo_n "checking for MKTEMP... " >&6; }
8394        if test ! -x "$tool_specified"; then
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8396$as_echo "not found" >&6; }
8397          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8398        fi
8399        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8400$as_echo "$tool_specified" >&6; }
8401      fi
8402    fi
8403  fi
8404
8405
8406
8407  if test "x$MKTEMP" = x; then
8408    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8409  fi
8410
8411
8412
8413
8414
8415  # Publish this variable in the help.
8416
8417
8418  if test "x$MV" = x; then
8419    # The variable is not set by user, try to locate tool using the code snippet
8420    for ac_prog in mv
8421do
8422  # Extract the first word of "$ac_prog", so it can be a program name with args.
8423set dummy $ac_prog; ac_word=$2
8424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8425$as_echo_n "checking for $ac_word... " >&6; }
8426if ${ac_cv_path_MV+:} false; then :
8427  $as_echo_n "(cached) " >&6
8428else
8429  case $MV in
8430  [\\/]* | ?:[\\/]*)
8431  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8432  ;;
8433  *)
8434  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8435for as_dir in $PATH
8436do
8437  IFS=$as_save_IFS
8438  test -z "$as_dir" && as_dir=.
8439    for ac_exec_ext in '' $ac_executable_extensions; do
8440  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8441    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8442    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8443    break 2
8444  fi
8445done
8446  done
8447IFS=$as_save_IFS
8448
8449  ;;
8450esac
8451fi
8452MV=$ac_cv_path_MV
8453if test -n "$MV"; then
8454  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8455$as_echo "$MV" >&6; }
8456else
8457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8458$as_echo "no" >&6; }
8459fi
8460
8461
8462  test -n "$MV" && break
8463done
8464
8465  else
8466    # The variable is set, but is it from the command line or the environment?
8467
8468    # Try to remove the string !MV! from our list.
8469    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8470    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8471      # If it failed, the variable was not from the command line. Ignore it,
8472      # but warn the user (except for BASH, which is always set by the calling BASH).
8473      if test "xMV" != xBASH; then
8474        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8475$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8476      fi
8477      # Try to locate tool using the code snippet
8478      for ac_prog in mv
8479do
8480  # Extract the first word of "$ac_prog", so it can be a program name with args.
8481set dummy $ac_prog; ac_word=$2
8482{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8483$as_echo_n "checking for $ac_word... " >&6; }
8484if ${ac_cv_path_MV+:} false; then :
8485  $as_echo_n "(cached) " >&6
8486else
8487  case $MV in
8488  [\\/]* | ?:[\\/]*)
8489  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8490  ;;
8491  *)
8492  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8493for as_dir in $PATH
8494do
8495  IFS=$as_save_IFS
8496  test -z "$as_dir" && as_dir=.
8497    for ac_exec_ext in '' $ac_executable_extensions; do
8498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8499    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8501    break 2
8502  fi
8503done
8504  done
8505IFS=$as_save_IFS
8506
8507  ;;
8508esac
8509fi
8510MV=$ac_cv_path_MV
8511if test -n "$MV"; then
8512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8513$as_echo "$MV" >&6; }
8514else
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8516$as_echo "no" >&6; }
8517fi
8518
8519
8520  test -n "$MV" && break
8521done
8522
8523    else
8524      # If it succeeded, then it was overridden by the user. We will use it
8525      # for the tool.
8526
8527      # First remove it from the list of overridden variables, so we can test
8528      # for unknown variables in the end.
8529      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8530
8531      # Check if the provided tool contains a complete path.
8532      tool_specified="$MV"
8533      tool_basename="${tool_specified##*/}"
8534      if test "x$tool_basename" = "x$tool_specified"; then
8535        # A command without a complete path is provided, search $PATH.
8536        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8537$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8538        # Extract the first word of "$tool_basename", so it can be a program name with args.
8539set dummy $tool_basename; ac_word=$2
8540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8541$as_echo_n "checking for $ac_word... " >&6; }
8542if ${ac_cv_path_MV+:} false; then :
8543  $as_echo_n "(cached) " >&6
8544else
8545  case $MV in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8551for as_dir in $PATH
8552do
8553  IFS=$as_save_IFS
8554  test -z "$as_dir" && as_dir=.
8555    for ac_exec_ext in '' $ac_executable_extensions; do
8556  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8557    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8558    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8559    break 2
8560  fi
8561done
8562  done
8563IFS=$as_save_IFS
8564
8565  ;;
8566esac
8567fi
8568MV=$ac_cv_path_MV
8569if test -n "$MV"; then
8570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8571$as_echo "$MV" >&6; }
8572else
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8574$as_echo "no" >&6; }
8575fi
8576
8577
8578        if test "x$MV" = x; then
8579          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8580        fi
8581      else
8582        # Otherwise we believe it is a complete path. Use it as it is.
8583        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8584$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8586$as_echo_n "checking for MV... " >&6; }
8587        if test ! -x "$tool_specified"; then
8588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8589$as_echo "not found" >&6; }
8590          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8591        fi
8592        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8593$as_echo "$tool_specified" >&6; }
8594      fi
8595    fi
8596  fi
8597
8598
8599
8600  if test "x$MV" = x; then
8601    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8602  fi
8603
8604
8605
8606
8607
8608  # Publish this variable in the help.
8609
8610
8611  if test "x$NAWK" = x; then
8612    # The variable is not set by user, try to locate tool using the code snippet
8613    for ac_prog in nawk gawk awk
8614do
8615  # Extract the first word of "$ac_prog", so it can be a program name with args.
8616set dummy $ac_prog; ac_word=$2
8617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8618$as_echo_n "checking for $ac_word... " >&6; }
8619if ${ac_cv_path_NAWK+:} false; then :
8620  $as_echo_n "(cached) " >&6
8621else
8622  case $NAWK in
8623  [\\/]* | ?:[\\/]*)
8624  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8625  ;;
8626  *)
8627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8628for as_dir in $PATH
8629do
8630  IFS=$as_save_IFS
8631  test -z "$as_dir" && as_dir=.
8632    for ac_exec_ext in '' $ac_executable_extensions; do
8633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8634    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8636    break 2
8637  fi
8638done
8639  done
8640IFS=$as_save_IFS
8641
8642  ;;
8643esac
8644fi
8645NAWK=$ac_cv_path_NAWK
8646if test -n "$NAWK"; then
8647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8648$as_echo "$NAWK" >&6; }
8649else
8650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8651$as_echo "no" >&6; }
8652fi
8653
8654
8655  test -n "$NAWK" && break
8656done
8657
8658  else
8659    # The variable is set, but is it from the command line or the environment?
8660
8661    # Try to remove the string !NAWK! from our list.
8662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8664      # If it failed, the variable was not from the command line. Ignore it,
8665      # but warn the user (except for BASH, which is always set by the calling BASH).
8666      if test "xNAWK" != xBASH; then
8667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8668$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8669      fi
8670      # Try to locate tool using the code snippet
8671      for ac_prog in nawk gawk awk
8672do
8673  # Extract the first word of "$ac_prog", so it can be a program name with args.
8674set dummy $ac_prog; ac_word=$2
8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8676$as_echo_n "checking for $ac_word... " >&6; }
8677if ${ac_cv_path_NAWK+:} false; then :
8678  $as_echo_n "(cached) " >&6
8679else
8680  case $NAWK in
8681  [\\/]* | ?:[\\/]*)
8682  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8683  ;;
8684  *)
8685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688  IFS=$as_save_IFS
8689  test -z "$as_dir" && as_dir=.
8690    for ac_exec_ext in '' $ac_executable_extensions; do
8691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8692    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8694    break 2
8695  fi
8696done
8697  done
8698IFS=$as_save_IFS
8699
8700  ;;
8701esac
8702fi
8703NAWK=$ac_cv_path_NAWK
8704if test -n "$NAWK"; then
8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8706$as_echo "$NAWK" >&6; }
8707else
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
8710fi
8711
8712
8713  test -n "$NAWK" && break
8714done
8715
8716    else
8717      # If it succeeded, then it was overridden by the user. We will use it
8718      # for the tool.
8719
8720      # First remove it from the list of overridden variables, so we can test
8721      # for unknown variables in the end.
8722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8723
8724      # Check if the provided tool contains a complete path.
8725      tool_specified="$NAWK"
8726      tool_basename="${tool_specified##*/}"
8727      if test "x$tool_basename" = "x$tool_specified"; then
8728        # A command without a complete path is provided, search $PATH.
8729        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8730$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8731        # Extract the first word of "$tool_basename", so it can be a program name with args.
8732set dummy $tool_basename; ac_word=$2
8733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8734$as_echo_n "checking for $ac_word... " >&6; }
8735if ${ac_cv_path_NAWK+:} false; then :
8736  $as_echo_n "(cached) " >&6
8737else
8738  case $NAWK in
8739  [\\/]* | ?:[\\/]*)
8740  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8741  ;;
8742  *)
8743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8744for as_dir in $PATH
8745do
8746  IFS=$as_save_IFS
8747  test -z "$as_dir" && as_dir=.
8748    for ac_exec_ext in '' $ac_executable_extensions; do
8749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8750    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8752    break 2
8753  fi
8754done
8755  done
8756IFS=$as_save_IFS
8757
8758  ;;
8759esac
8760fi
8761NAWK=$ac_cv_path_NAWK
8762if test -n "$NAWK"; then
8763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8764$as_echo "$NAWK" >&6; }
8765else
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8767$as_echo "no" >&6; }
8768fi
8769
8770
8771        if test "x$NAWK" = x; then
8772          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8773        fi
8774      else
8775        # Otherwise we believe it is a complete path. Use it as it is.
8776        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8777$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8778        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8779$as_echo_n "checking for NAWK... " >&6; }
8780        if test ! -x "$tool_specified"; then
8781          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8782$as_echo "not found" >&6; }
8783          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8784        fi
8785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8786$as_echo "$tool_specified" >&6; }
8787      fi
8788    fi
8789  fi
8790
8791
8792
8793  if test "x$NAWK" = x; then
8794    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8795  fi
8796
8797
8798
8799
8800
8801  # Publish this variable in the help.
8802
8803
8804  if test "x$PRINTF" = x; then
8805    # The variable is not set by user, try to locate tool using the code snippet
8806    for ac_prog in printf
8807do
8808  # Extract the first word of "$ac_prog", so it can be a program name with args.
8809set dummy $ac_prog; ac_word=$2
8810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8811$as_echo_n "checking for $ac_word... " >&6; }
8812if ${ac_cv_path_PRINTF+:} false; then :
8813  $as_echo_n "(cached) " >&6
8814else
8815  case $PRINTF in
8816  [\\/]* | ?:[\\/]*)
8817  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8818  ;;
8819  *)
8820  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8821for as_dir in $PATH
8822do
8823  IFS=$as_save_IFS
8824  test -z "$as_dir" && as_dir=.
8825    for ac_exec_ext in '' $ac_executable_extensions; do
8826  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8827    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8828    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8829    break 2
8830  fi
8831done
8832  done
8833IFS=$as_save_IFS
8834
8835  ;;
8836esac
8837fi
8838PRINTF=$ac_cv_path_PRINTF
8839if test -n "$PRINTF"; then
8840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8841$as_echo "$PRINTF" >&6; }
8842else
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8844$as_echo "no" >&6; }
8845fi
8846
8847
8848  test -n "$PRINTF" && break
8849done
8850
8851  else
8852    # The variable is set, but is it from the command line or the environment?
8853
8854    # Try to remove the string !PRINTF! from our list.
8855    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8856    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8857      # If it failed, the variable was not from the command line. Ignore it,
8858      # but warn the user (except for BASH, which is always set by the calling BASH).
8859      if test "xPRINTF" != xBASH; then
8860        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8861$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8862      fi
8863      # Try to locate tool using the code snippet
8864      for ac_prog in printf
8865do
8866  # Extract the first word of "$ac_prog", so it can be a program name with args.
8867set dummy $ac_prog; ac_word=$2
8868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8869$as_echo_n "checking for $ac_word... " >&6; }
8870if ${ac_cv_path_PRINTF+:} false; then :
8871  $as_echo_n "(cached) " >&6
8872else
8873  case $PRINTF in
8874  [\\/]* | ?:[\\/]*)
8875  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8876  ;;
8877  *)
8878  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8879for as_dir in $PATH
8880do
8881  IFS=$as_save_IFS
8882  test -z "$as_dir" && as_dir=.
8883    for ac_exec_ext in '' $ac_executable_extensions; do
8884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8885    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8887    break 2
8888  fi
8889done
8890  done
8891IFS=$as_save_IFS
8892
8893  ;;
8894esac
8895fi
8896PRINTF=$ac_cv_path_PRINTF
8897if test -n "$PRINTF"; then
8898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8899$as_echo "$PRINTF" >&6; }
8900else
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8902$as_echo "no" >&6; }
8903fi
8904
8905
8906  test -n "$PRINTF" && break
8907done
8908
8909    else
8910      # If it succeeded, then it was overridden by the user. We will use it
8911      # for the tool.
8912
8913      # First remove it from the list of overridden variables, so we can test
8914      # for unknown variables in the end.
8915      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8916
8917      # Check if the provided tool contains a complete path.
8918      tool_specified="$PRINTF"
8919      tool_basename="${tool_specified##*/}"
8920      if test "x$tool_basename" = "x$tool_specified"; then
8921        # A command without a complete path is provided, search $PATH.
8922        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8923$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8924        # Extract the first word of "$tool_basename", so it can be a program name with args.
8925set dummy $tool_basename; ac_word=$2
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8927$as_echo_n "checking for $ac_word... " >&6; }
8928if ${ac_cv_path_PRINTF+:} false; then :
8929  $as_echo_n "(cached) " >&6
8930else
8931  case $PRINTF in
8932  [\\/]* | ?:[\\/]*)
8933  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8934  ;;
8935  *)
8936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8937for as_dir in $PATH
8938do
8939  IFS=$as_save_IFS
8940  test -z "$as_dir" && as_dir=.
8941    for ac_exec_ext in '' $ac_executable_extensions; do
8942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8943    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8945    break 2
8946  fi
8947done
8948  done
8949IFS=$as_save_IFS
8950
8951  ;;
8952esac
8953fi
8954PRINTF=$ac_cv_path_PRINTF
8955if test -n "$PRINTF"; then
8956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8957$as_echo "$PRINTF" >&6; }
8958else
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8960$as_echo "no" >&6; }
8961fi
8962
8963
8964        if test "x$PRINTF" = x; then
8965          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8966        fi
8967      else
8968        # Otherwise we believe it is a complete path. Use it as it is.
8969        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8970$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8972$as_echo_n "checking for PRINTF... " >&6; }
8973        if test ! -x "$tool_specified"; then
8974          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8975$as_echo "not found" >&6; }
8976          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8977        fi
8978        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8979$as_echo "$tool_specified" >&6; }
8980      fi
8981    fi
8982  fi
8983
8984
8985
8986  if test "x$PRINTF" = x; then
8987    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8988  fi
8989
8990
8991
8992
8993
8994  # Publish this variable in the help.
8995
8996
8997  if test "x$RM" = x; then
8998    # The variable is not set by user, try to locate tool using the code snippet
8999    for ac_prog in rm
9000do
9001  # Extract the first word of "$ac_prog", so it can be a program name with args.
9002set dummy $ac_prog; ac_word=$2
9003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9004$as_echo_n "checking for $ac_word... " >&6; }
9005if ${ac_cv_path_RM+:} false; then :
9006  $as_echo_n "(cached) " >&6
9007else
9008  case $RM in
9009  [\\/]* | ?:[\\/]*)
9010  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9011  ;;
9012  *)
9013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9014for as_dir in $PATH
9015do
9016  IFS=$as_save_IFS
9017  test -z "$as_dir" && as_dir=.
9018    for ac_exec_ext in '' $ac_executable_extensions; do
9019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9020    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9022    break 2
9023  fi
9024done
9025  done
9026IFS=$as_save_IFS
9027
9028  ;;
9029esac
9030fi
9031RM=$ac_cv_path_RM
9032if test -n "$RM"; then
9033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9034$as_echo "$RM" >&6; }
9035else
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9037$as_echo "no" >&6; }
9038fi
9039
9040
9041  test -n "$RM" && break
9042done
9043
9044  else
9045    # The variable is set, but is it from the command line or the environment?
9046
9047    # Try to remove the string !RM! from our list.
9048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9050      # If it failed, the variable was not from the command line. Ignore it,
9051      # but warn the user (except for BASH, which is always set by the calling BASH).
9052      if test "xRM" != xBASH; then
9053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9054$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9055      fi
9056      # Try to locate tool using the code snippet
9057      for ac_prog in rm
9058do
9059  # Extract the first word of "$ac_prog", so it can be a program name with args.
9060set dummy $ac_prog; ac_word=$2
9061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9062$as_echo_n "checking for $ac_word... " >&6; }
9063if ${ac_cv_path_RM+:} false; then :
9064  $as_echo_n "(cached) " >&6
9065else
9066  case $RM in
9067  [\\/]* | ?:[\\/]*)
9068  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9069  ;;
9070  *)
9071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9072for as_dir in $PATH
9073do
9074  IFS=$as_save_IFS
9075  test -z "$as_dir" && as_dir=.
9076    for ac_exec_ext in '' $ac_executable_extensions; do
9077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9078    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9080    break 2
9081  fi
9082done
9083  done
9084IFS=$as_save_IFS
9085
9086  ;;
9087esac
9088fi
9089RM=$ac_cv_path_RM
9090if test -n "$RM"; then
9091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9092$as_echo "$RM" >&6; }
9093else
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9095$as_echo "no" >&6; }
9096fi
9097
9098
9099  test -n "$RM" && break
9100done
9101
9102    else
9103      # If it succeeded, then it was overridden by the user. We will use it
9104      # for the tool.
9105
9106      # First remove it from the list of overridden variables, so we can test
9107      # for unknown variables in the end.
9108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9109
9110      # Check if the provided tool contains a complete path.
9111      tool_specified="$RM"
9112      tool_basename="${tool_specified##*/}"
9113      if test "x$tool_basename" = "x$tool_specified"; then
9114        # A command without a complete path is provided, search $PATH.
9115        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9116$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9117        # Extract the first word of "$tool_basename", so it can be a program name with args.
9118set dummy $tool_basename; ac_word=$2
9119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9120$as_echo_n "checking for $ac_word... " >&6; }
9121if ${ac_cv_path_RM+:} false; then :
9122  $as_echo_n "(cached) " >&6
9123else
9124  case $RM in
9125  [\\/]* | ?:[\\/]*)
9126  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9127  ;;
9128  *)
9129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9130for as_dir in $PATH
9131do
9132  IFS=$as_save_IFS
9133  test -z "$as_dir" && as_dir=.
9134    for ac_exec_ext in '' $ac_executable_extensions; do
9135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9136    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9138    break 2
9139  fi
9140done
9141  done
9142IFS=$as_save_IFS
9143
9144  ;;
9145esac
9146fi
9147RM=$ac_cv_path_RM
9148if test -n "$RM"; then
9149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9150$as_echo "$RM" >&6; }
9151else
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153$as_echo "no" >&6; }
9154fi
9155
9156
9157        if test "x$RM" = x; then
9158          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9159        fi
9160      else
9161        # Otherwise we believe it is a complete path. Use it as it is.
9162        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9163$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9165$as_echo_n "checking for RM... " >&6; }
9166        if test ! -x "$tool_specified"; then
9167          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9168$as_echo "not found" >&6; }
9169          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9170        fi
9171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9172$as_echo "$tool_specified" >&6; }
9173      fi
9174    fi
9175  fi
9176
9177
9178
9179  if test "x$RM" = x; then
9180    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9181  fi
9182
9183
9184
9185
9186
9187  # Publish this variable in the help.
9188
9189
9190  if test "x$SH" = x; then
9191    # The variable is not set by user, try to locate tool using the code snippet
9192    for ac_prog in sh
9193do
9194  # Extract the first word of "$ac_prog", so it can be a program name with args.
9195set dummy $ac_prog; ac_word=$2
9196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9197$as_echo_n "checking for $ac_word... " >&6; }
9198if ${ac_cv_path_SH+:} false; then :
9199  $as_echo_n "(cached) " >&6
9200else
9201  case $SH in
9202  [\\/]* | ?:[\\/]*)
9203  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9204  ;;
9205  *)
9206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9207for as_dir in $PATH
9208do
9209  IFS=$as_save_IFS
9210  test -z "$as_dir" && as_dir=.
9211    for ac_exec_ext in '' $ac_executable_extensions; do
9212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9213    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9215    break 2
9216  fi
9217done
9218  done
9219IFS=$as_save_IFS
9220
9221  ;;
9222esac
9223fi
9224SH=$ac_cv_path_SH
9225if test -n "$SH"; then
9226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9227$as_echo "$SH" >&6; }
9228else
9229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9230$as_echo "no" >&6; }
9231fi
9232
9233
9234  test -n "$SH" && break
9235done
9236
9237  else
9238    # The variable is set, but is it from the command line or the environment?
9239
9240    # Try to remove the string !SH! from our list.
9241    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9242    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9243      # If it failed, the variable was not from the command line. Ignore it,
9244      # but warn the user (except for BASH, which is always set by the calling BASH).
9245      if test "xSH" != xBASH; then
9246        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9247$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9248      fi
9249      # Try to locate tool using the code snippet
9250      for ac_prog in sh
9251do
9252  # Extract the first word of "$ac_prog", so it can be a program name with args.
9253set dummy $ac_prog; ac_word=$2
9254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9255$as_echo_n "checking for $ac_word... " >&6; }
9256if ${ac_cv_path_SH+:} false; then :
9257  $as_echo_n "(cached) " >&6
9258else
9259  case $SH in
9260  [\\/]* | ?:[\\/]*)
9261  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9262  ;;
9263  *)
9264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9265for as_dir in $PATH
9266do
9267  IFS=$as_save_IFS
9268  test -z "$as_dir" && as_dir=.
9269    for ac_exec_ext in '' $ac_executable_extensions; do
9270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9271    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9273    break 2
9274  fi
9275done
9276  done
9277IFS=$as_save_IFS
9278
9279  ;;
9280esac
9281fi
9282SH=$ac_cv_path_SH
9283if test -n "$SH"; then
9284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9285$as_echo "$SH" >&6; }
9286else
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9288$as_echo "no" >&6; }
9289fi
9290
9291
9292  test -n "$SH" && break
9293done
9294
9295    else
9296      # If it succeeded, then it was overridden by the user. We will use it
9297      # for the tool.
9298
9299      # First remove it from the list of overridden variables, so we can test
9300      # for unknown variables in the end.
9301      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9302
9303      # Check if the provided tool contains a complete path.
9304      tool_specified="$SH"
9305      tool_basename="${tool_specified##*/}"
9306      if test "x$tool_basename" = "x$tool_specified"; then
9307        # A command without a complete path is provided, search $PATH.
9308        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9309$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9310        # Extract the first word of "$tool_basename", so it can be a program name with args.
9311set dummy $tool_basename; ac_word=$2
9312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9313$as_echo_n "checking for $ac_word... " >&6; }
9314if ${ac_cv_path_SH+:} false; then :
9315  $as_echo_n "(cached) " >&6
9316else
9317  case $SH in
9318  [\\/]* | ?:[\\/]*)
9319  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9320  ;;
9321  *)
9322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9323for as_dir in $PATH
9324do
9325  IFS=$as_save_IFS
9326  test -z "$as_dir" && as_dir=.
9327    for ac_exec_ext in '' $ac_executable_extensions; do
9328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9329    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9331    break 2
9332  fi
9333done
9334  done
9335IFS=$as_save_IFS
9336
9337  ;;
9338esac
9339fi
9340SH=$ac_cv_path_SH
9341if test -n "$SH"; then
9342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9343$as_echo "$SH" >&6; }
9344else
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9346$as_echo "no" >&6; }
9347fi
9348
9349
9350        if test "x$SH" = x; then
9351          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9352        fi
9353      else
9354        # Otherwise we believe it is a complete path. Use it as it is.
9355        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9356$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9357        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9358$as_echo_n "checking for SH... " >&6; }
9359        if test ! -x "$tool_specified"; then
9360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9361$as_echo "not found" >&6; }
9362          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9363        fi
9364        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9365$as_echo "$tool_specified" >&6; }
9366      fi
9367    fi
9368  fi
9369
9370
9371
9372  if test "x$SH" = x; then
9373    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9374  fi
9375
9376
9377
9378
9379
9380  # Publish this variable in the help.
9381
9382
9383  if test "x$SORT" = x; then
9384    # The variable is not set by user, try to locate tool using the code snippet
9385    for ac_prog in sort
9386do
9387  # Extract the first word of "$ac_prog", so it can be a program name with args.
9388set dummy $ac_prog; ac_word=$2
9389{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9390$as_echo_n "checking for $ac_word... " >&6; }
9391if ${ac_cv_path_SORT+:} false; then :
9392  $as_echo_n "(cached) " >&6
9393else
9394  case $SORT in
9395  [\\/]* | ?:[\\/]*)
9396  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9397  ;;
9398  *)
9399  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9400for as_dir in $PATH
9401do
9402  IFS=$as_save_IFS
9403  test -z "$as_dir" && as_dir=.
9404    for ac_exec_ext in '' $ac_executable_extensions; do
9405  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9406    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9407    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9408    break 2
9409  fi
9410done
9411  done
9412IFS=$as_save_IFS
9413
9414  ;;
9415esac
9416fi
9417SORT=$ac_cv_path_SORT
9418if test -n "$SORT"; then
9419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9420$as_echo "$SORT" >&6; }
9421else
9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9423$as_echo "no" >&6; }
9424fi
9425
9426
9427  test -n "$SORT" && break
9428done
9429
9430  else
9431    # The variable is set, but is it from the command line or the environment?
9432
9433    # Try to remove the string !SORT! from our list.
9434    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9435    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9436      # If it failed, the variable was not from the command line. Ignore it,
9437      # but warn the user (except for BASH, which is always set by the calling BASH).
9438      if test "xSORT" != xBASH; then
9439        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9440$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9441      fi
9442      # Try to locate tool using the code snippet
9443      for ac_prog in sort
9444do
9445  # Extract the first word of "$ac_prog", so it can be a program name with args.
9446set dummy $ac_prog; ac_word=$2
9447{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9448$as_echo_n "checking for $ac_word... " >&6; }
9449if ${ac_cv_path_SORT+:} false; then :
9450  $as_echo_n "(cached) " >&6
9451else
9452  case $SORT in
9453  [\\/]* | ?:[\\/]*)
9454  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9455  ;;
9456  *)
9457  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9458for as_dir in $PATH
9459do
9460  IFS=$as_save_IFS
9461  test -z "$as_dir" && as_dir=.
9462    for ac_exec_ext in '' $ac_executable_extensions; do
9463  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9464    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9465    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9466    break 2
9467  fi
9468done
9469  done
9470IFS=$as_save_IFS
9471
9472  ;;
9473esac
9474fi
9475SORT=$ac_cv_path_SORT
9476if test -n "$SORT"; then
9477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9478$as_echo "$SORT" >&6; }
9479else
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9481$as_echo "no" >&6; }
9482fi
9483
9484
9485  test -n "$SORT" && break
9486done
9487
9488    else
9489      # If it succeeded, then it was overridden by the user. We will use it
9490      # for the tool.
9491
9492      # First remove it from the list of overridden variables, so we can test
9493      # for unknown variables in the end.
9494      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9495
9496      # Check if the provided tool contains a complete path.
9497      tool_specified="$SORT"
9498      tool_basename="${tool_specified##*/}"
9499      if test "x$tool_basename" = "x$tool_specified"; then
9500        # A command without a complete path is provided, search $PATH.
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9502$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9503        # Extract the first word of "$tool_basename", so it can be a program name with args.
9504set dummy $tool_basename; ac_word=$2
9505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9506$as_echo_n "checking for $ac_word... " >&6; }
9507if ${ac_cv_path_SORT+:} false; then :
9508  $as_echo_n "(cached) " >&6
9509else
9510  case $SORT in
9511  [\\/]* | ?:[\\/]*)
9512  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9513  ;;
9514  *)
9515  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9516for as_dir in $PATH
9517do
9518  IFS=$as_save_IFS
9519  test -z "$as_dir" && as_dir=.
9520    for ac_exec_ext in '' $ac_executable_extensions; do
9521  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9522    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9523    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9524    break 2
9525  fi
9526done
9527  done
9528IFS=$as_save_IFS
9529
9530  ;;
9531esac
9532fi
9533SORT=$ac_cv_path_SORT
9534if test -n "$SORT"; then
9535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9536$as_echo "$SORT" >&6; }
9537else
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9539$as_echo "no" >&6; }
9540fi
9541
9542
9543        if test "x$SORT" = x; then
9544          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9545        fi
9546      else
9547        # Otherwise we believe it is a complete path. Use it as it is.
9548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9549$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9550        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9551$as_echo_n "checking for SORT... " >&6; }
9552        if test ! -x "$tool_specified"; then
9553          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9554$as_echo "not found" >&6; }
9555          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9556        fi
9557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9558$as_echo "$tool_specified" >&6; }
9559      fi
9560    fi
9561  fi
9562
9563
9564
9565  if test "x$SORT" = x; then
9566    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9567  fi
9568
9569
9570
9571
9572
9573  # Publish this variable in the help.
9574
9575
9576  if test "x$TAIL" = x; then
9577    # The variable is not set by user, try to locate tool using the code snippet
9578    for ac_prog in tail
9579do
9580  # Extract the first word of "$ac_prog", so it can be a program name with args.
9581set dummy $ac_prog; ac_word=$2
9582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9583$as_echo_n "checking for $ac_word... " >&6; }
9584if ${ac_cv_path_TAIL+:} false; then :
9585  $as_echo_n "(cached) " >&6
9586else
9587  case $TAIL in
9588  [\\/]* | ?:[\\/]*)
9589  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9590  ;;
9591  *)
9592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9593for as_dir in $PATH
9594do
9595  IFS=$as_save_IFS
9596  test -z "$as_dir" && as_dir=.
9597    for ac_exec_ext in '' $ac_executable_extensions; do
9598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9599    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9601    break 2
9602  fi
9603done
9604  done
9605IFS=$as_save_IFS
9606
9607  ;;
9608esac
9609fi
9610TAIL=$ac_cv_path_TAIL
9611if test -n "$TAIL"; then
9612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9613$as_echo "$TAIL" >&6; }
9614else
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9616$as_echo "no" >&6; }
9617fi
9618
9619
9620  test -n "$TAIL" && break
9621done
9622
9623  else
9624    # The variable is set, but is it from the command line or the environment?
9625
9626    # Try to remove the string !TAIL! from our list.
9627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9629      # If it failed, the variable was not from the command line. Ignore it,
9630      # but warn the user (except for BASH, which is always set by the calling BASH).
9631      if test "xTAIL" != xBASH; then
9632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9633$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9634      fi
9635      # Try to locate tool using the code snippet
9636      for ac_prog in tail
9637do
9638  # Extract the first word of "$ac_prog", so it can be a program name with args.
9639set dummy $ac_prog; ac_word=$2
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9641$as_echo_n "checking for $ac_word... " >&6; }
9642if ${ac_cv_path_TAIL+:} false; then :
9643  $as_echo_n "(cached) " >&6
9644else
9645  case $TAIL in
9646  [\\/]* | ?:[\\/]*)
9647  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9648  ;;
9649  *)
9650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9651for as_dir in $PATH
9652do
9653  IFS=$as_save_IFS
9654  test -z "$as_dir" && as_dir=.
9655    for ac_exec_ext in '' $ac_executable_extensions; do
9656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9657    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9659    break 2
9660  fi
9661done
9662  done
9663IFS=$as_save_IFS
9664
9665  ;;
9666esac
9667fi
9668TAIL=$ac_cv_path_TAIL
9669if test -n "$TAIL"; then
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9671$as_echo "$TAIL" >&6; }
9672else
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9674$as_echo "no" >&6; }
9675fi
9676
9677
9678  test -n "$TAIL" && break
9679done
9680
9681    else
9682      # If it succeeded, then it was overridden by the user. We will use it
9683      # for the tool.
9684
9685      # First remove it from the list of overridden variables, so we can test
9686      # for unknown variables in the end.
9687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9688
9689      # Check if the provided tool contains a complete path.
9690      tool_specified="$TAIL"
9691      tool_basename="${tool_specified##*/}"
9692      if test "x$tool_basename" = "x$tool_specified"; then
9693        # A command without a complete path is provided, search $PATH.
9694        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9695$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9696        # Extract the first word of "$tool_basename", so it can be a program name with args.
9697set dummy $tool_basename; ac_word=$2
9698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9699$as_echo_n "checking for $ac_word... " >&6; }
9700if ${ac_cv_path_TAIL+:} false; then :
9701  $as_echo_n "(cached) " >&6
9702else
9703  case $TAIL in
9704  [\\/]* | ?:[\\/]*)
9705  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9706  ;;
9707  *)
9708  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9709for as_dir in $PATH
9710do
9711  IFS=$as_save_IFS
9712  test -z "$as_dir" && as_dir=.
9713    for ac_exec_ext in '' $ac_executable_extensions; do
9714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9715    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9717    break 2
9718  fi
9719done
9720  done
9721IFS=$as_save_IFS
9722
9723  ;;
9724esac
9725fi
9726TAIL=$ac_cv_path_TAIL
9727if test -n "$TAIL"; then
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9729$as_echo "$TAIL" >&6; }
9730else
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9732$as_echo "no" >&6; }
9733fi
9734
9735
9736        if test "x$TAIL" = x; then
9737          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9738        fi
9739      else
9740        # Otherwise we believe it is a complete path. Use it as it is.
9741        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9742$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9743        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9744$as_echo_n "checking for TAIL... " >&6; }
9745        if test ! -x "$tool_specified"; then
9746          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9747$as_echo "not found" >&6; }
9748          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9749        fi
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9751$as_echo "$tool_specified" >&6; }
9752      fi
9753    fi
9754  fi
9755
9756
9757
9758  if test "x$TAIL" = x; then
9759    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9760  fi
9761
9762
9763
9764
9765
9766  # Publish this variable in the help.
9767
9768
9769  if test "x$TAR" = x; then
9770    # The variable is not set by user, try to locate tool using the code snippet
9771    for ac_prog in tar
9772do
9773  # Extract the first word of "$ac_prog", so it can be a program name with args.
9774set dummy $ac_prog; ac_word=$2
9775{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9776$as_echo_n "checking for $ac_word... " >&6; }
9777if ${ac_cv_path_TAR+:} false; then :
9778  $as_echo_n "(cached) " >&6
9779else
9780  case $TAR in
9781  [\\/]* | ?:[\\/]*)
9782  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9783  ;;
9784  *)
9785  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9786for as_dir in $PATH
9787do
9788  IFS=$as_save_IFS
9789  test -z "$as_dir" && as_dir=.
9790    for ac_exec_ext in '' $ac_executable_extensions; do
9791  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9792    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9793    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9794    break 2
9795  fi
9796done
9797  done
9798IFS=$as_save_IFS
9799
9800  ;;
9801esac
9802fi
9803TAR=$ac_cv_path_TAR
9804if test -n "$TAR"; then
9805  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9806$as_echo "$TAR" >&6; }
9807else
9808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9809$as_echo "no" >&6; }
9810fi
9811
9812
9813  test -n "$TAR" && break
9814done
9815
9816  else
9817    # The variable is set, but is it from the command line or the environment?
9818
9819    # Try to remove the string !TAR! from our list.
9820    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9821    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9822      # If it failed, the variable was not from the command line. Ignore it,
9823      # but warn the user (except for BASH, which is always set by the calling BASH).
9824      if test "xTAR" != xBASH; then
9825        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9826$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9827      fi
9828      # Try to locate tool using the code snippet
9829      for ac_prog in tar
9830do
9831  # Extract the first word of "$ac_prog", so it can be a program name with args.
9832set dummy $ac_prog; ac_word=$2
9833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9834$as_echo_n "checking for $ac_word... " >&6; }
9835if ${ac_cv_path_TAR+:} false; then :
9836  $as_echo_n "(cached) " >&6
9837else
9838  case $TAR in
9839  [\\/]* | ?:[\\/]*)
9840  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9841  ;;
9842  *)
9843  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9844for as_dir in $PATH
9845do
9846  IFS=$as_save_IFS
9847  test -z "$as_dir" && as_dir=.
9848    for ac_exec_ext in '' $ac_executable_extensions; do
9849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9850    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9852    break 2
9853  fi
9854done
9855  done
9856IFS=$as_save_IFS
9857
9858  ;;
9859esac
9860fi
9861TAR=$ac_cv_path_TAR
9862if test -n "$TAR"; then
9863  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9864$as_echo "$TAR" >&6; }
9865else
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867$as_echo "no" >&6; }
9868fi
9869
9870
9871  test -n "$TAR" && break
9872done
9873
9874    else
9875      # If it succeeded, then it was overridden by the user. We will use it
9876      # for the tool.
9877
9878      # First remove it from the list of overridden variables, so we can test
9879      # for unknown variables in the end.
9880      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9881
9882      # Check if the provided tool contains a complete path.
9883      tool_specified="$TAR"
9884      tool_basename="${tool_specified##*/}"
9885      if test "x$tool_basename" = "x$tool_specified"; then
9886        # A command without a complete path is provided, search $PATH.
9887        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9888$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9889        # Extract the first word of "$tool_basename", so it can be a program name with args.
9890set dummy $tool_basename; ac_word=$2
9891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9892$as_echo_n "checking for $ac_word... " >&6; }
9893if ${ac_cv_path_TAR+:} false; then :
9894  $as_echo_n "(cached) " >&6
9895else
9896  case $TAR in
9897  [\\/]* | ?:[\\/]*)
9898  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9899  ;;
9900  *)
9901  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9902for as_dir in $PATH
9903do
9904  IFS=$as_save_IFS
9905  test -z "$as_dir" && as_dir=.
9906    for ac_exec_ext in '' $ac_executable_extensions; do
9907  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9908    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9909    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9910    break 2
9911  fi
9912done
9913  done
9914IFS=$as_save_IFS
9915
9916  ;;
9917esac
9918fi
9919TAR=$ac_cv_path_TAR
9920if test -n "$TAR"; then
9921  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9922$as_echo "$TAR" >&6; }
9923else
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9925$as_echo "no" >&6; }
9926fi
9927
9928
9929        if test "x$TAR" = x; then
9930          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9931        fi
9932      else
9933        # Otherwise we believe it is a complete path. Use it as it is.
9934        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9935$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9936        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9937$as_echo_n "checking for TAR... " >&6; }
9938        if test ! -x "$tool_specified"; then
9939          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9940$as_echo "not found" >&6; }
9941          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9942        fi
9943        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9944$as_echo "$tool_specified" >&6; }
9945      fi
9946    fi
9947  fi
9948
9949
9950
9951  if test "x$TAR" = x; then
9952    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9953  fi
9954
9955
9956
9957
9958
9959  # Publish this variable in the help.
9960
9961
9962  if test "x$TEE" = x; then
9963    # The variable is not set by user, try to locate tool using the code snippet
9964    for ac_prog in tee
9965do
9966  # Extract the first word of "$ac_prog", so it can be a program name with args.
9967set dummy $ac_prog; ac_word=$2
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9969$as_echo_n "checking for $ac_word... " >&6; }
9970if ${ac_cv_path_TEE+:} false; then :
9971  $as_echo_n "(cached) " >&6
9972else
9973  case $TEE in
9974  [\\/]* | ?:[\\/]*)
9975  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9976  ;;
9977  *)
9978  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9979for as_dir in $PATH
9980do
9981  IFS=$as_save_IFS
9982  test -z "$as_dir" && as_dir=.
9983    for ac_exec_ext in '' $ac_executable_extensions; do
9984  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9985    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9986    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9987    break 2
9988  fi
9989done
9990  done
9991IFS=$as_save_IFS
9992
9993  ;;
9994esac
9995fi
9996TEE=$ac_cv_path_TEE
9997if test -n "$TEE"; then
9998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
9999$as_echo "$TEE" >&6; }
10000else
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
10003fi
10004
10005
10006  test -n "$TEE" && break
10007done
10008
10009  else
10010    # The variable is set, but is it from the command line or the environment?
10011
10012    # Try to remove the string !TEE! from our list.
10013    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10014    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10015      # If it failed, the variable was not from the command line. Ignore it,
10016      # but warn the user (except for BASH, which is always set by the calling BASH).
10017      if test "xTEE" != xBASH; then
10018        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10019$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10020      fi
10021      # Try to locate tool using the code snippet
10022      for ac_prog in tee
10023do
10024  # Extract the first word of "$ac_prog", so it can be a program name with args.
10025set dummy $ac_prog; ac_word=$2
10026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10027$as_echo_n "checking for $ac_word... " >&6; }
10028if ${ac_cv_path_TEE+:} false; then :
10029  $as_echo_n "(cached) " >&6
10030else
10031  case $TEE in
10032  [\\/]* | ?:[\\/]*)
10033  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10034  ;;
10035  *)
10036  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10037for as_dir in $PATH
10038do
10039  IFS=$as_save_IFS
10040  test -z "$as_dir" && as_dir=.
10041    for ac_exec_ext in '' $ac_executable_extensions; do
10042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10043    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10045    break 2
10046  fi
10047done
10048  done
10049IFS=$as_save_IFS
10050
10051  ;;
10052esac
10053fi
10054TEE=$ac_cv_path_TEE
10055if test -n "$TEE"; then
10056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10057$as_echo "$TEE" >&6; }
10058else
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10060$as_echo "no" >&6; }
10061fi
10062
10063
10064  test -n "$TEE" && break
10065done
10066
10067    else
10068      # If it succeeded, then it was overridden by the user. We will use it
10069      # for the tool.
10070
10071      # First remove it from the list of overridden variables, so we can test
10072      # for unknown variables in the end.
10073      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10074
10075      # Check if the provided tool contains a complete path.
10076      tool_specified="$TEE"
10077      tool_basename="${tool_specified##*/}"
10078      if test "x$tool_basename" = "x$tool_specified"; then
10079        # A command without a complete path is provided, search $PATH.
10080        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10081$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10082        # Extract the first word of "$tool_basename", so it can be a program name with args.
10083set dummy $tool_basename; ac_word=$2
10084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10085$as_echo_n "checking for $ac_word... " >&6; }
10086if ${ac_cv_path_TEE+:} false; then :
10087  $as_echo_n "(cached) " >&6
10088else
10089  case $TEE in
10090  [\\/]* | ?:[\\/]*)
10091  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10092  ;;
10093  *)
10094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10095for as_dir in $PATH
10096do
10097  IFS=$as_save_IFS
10098  test -z "$as_dir" && as_dir=.
10099    for ac_exec_ext in '' $ac_executable_extensions; do
10100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10101    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10103    break 2
10104  fi
10105done
10106  done
10107IFS=$as_save_IFS
10108
10109  ;;
10110esac
10111fi
10112TEE=$ac_cv_path_TEE
10113if test -n "$TEE"; then
10114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10115$as_echo "$TEE" >&6; }
10116else
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10118$as_echo "no" >&6; }
10119fi
10120
10121
10122        if test "x$TEE" = x; then
10123          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10124        fi
10125      else
10126        # Otherwise we believe it is a complete path. Use it as it is.
10127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10128$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10130$as_echo_n "checking for TEE... " >&6; }
10131        if test ! -x "$tool_specified"; then
10132          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10133$as_echo "not found" >&6; }
10134          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10135        fi
10136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10137$as_echo "$tool_specified" >&6; }
10138      fi
10139    fi
10140  fi
10141
10142
10143
10144  if test "x$TEE" = x; then
10145    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10146  fi
10147
10148
10149
10150
10151
10152  # Publish this variable in the help.
10153
10154
10155  if test "x$TOUCH" = x; then
10156    # The variable is not set by user, try to locate tool using the code snippet
10157    for ac_prog in touch
10158do
10159  # Extract the first word of "$ac_prog", so it can be a program name with args.
10160set dummy $ac_prog; ac_word=$2
10161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10162$as_echo_n "checking for $ac_word... " >&6; }
10163if ${ac_cv_path_TOUCH+:} false; then :
10164  $as_echo_n "(cached) " >&6
10165else
10166  case $TOUCH in
10167  [\\/]* | ?:[\\/]*)
10168  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10169  ;;
10170  *)
10171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10172for as_dir in $PATH
10173do
10174  IFS=$as_save_IFS
10175  test -z "$as_dir" && as_dir=.
10176    for ac_exec_ext in '' $ac_executable_extensions; do
10177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10178    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10180    break 2
10181  fi
10182done
10183  done
10184IFS=$as_save_IFS
10185
10186  ;;
10187esac
10188fi
10189TOUCH=$ac_cv_path_TOUCH
10190if test -n "$TOUCH"; then
10191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10192$as_echo "$TOUCH" >&6; }
10193else
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10195$as_echo "no" >&6; }
10196fi
10197
10198
10199  test -n "$TOUCH" && break
10200done
10201
10202  else
10203    # The variable is set, but is it from the command line or the environment?
10204
10205    # Try to remove the string !TOUCH! from our list.
10206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10208      # If it failed, the variable was not from the command line. Ignore it,
10209      # but warn the user (except for BASH, which is always set by the calling BASH).
10210      if test "xTOUCH" != xBASH; then
10211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10212$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10213      fi
10214      # Try to locate tool using the code snippet
10215      for ac_prog in touch
10216do
10217  # Extract the first word of "$ac_prog", so it can be a program name with args.
10218set dummy $ac_prog; ac_word=$2
10219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10220$as_echo_n "checking for $ac_word... " >&6; }
10221if ${ac_cv_path_TOUCH+:} false; then :
10222  $as_echo_n "(cached) " >&6
10223else
10224  case $TOUCH in
10225  [\\/]* | ?:[\\/]*)
10226  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10227  ;;
10228  *)
10229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10230for as_dir in $PATH
10231do
10232  IFS=$as_save_IFS
10233  test -z "$as_dir" && as_dir=.
10234    for ac_exec_ext in '' $ac_executable_extensions; do
10235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10236    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10238    break 2
10239  fi
10240done
10241  done
10242IFS=$as_save_IFS
10243
10244  ;;
10245esac
10246fi
10247TOUCH=$ac_cv_path_TOUCH
10248if test -n "$TOUCH"; then
10249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10250$as_echo "$TOUCH" >&6; }
10251else
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10253$as_echo "no" >&6; }
10254fi
10255
10256
10257  test -n "$TOUCH" && break
10258done
10259
10260    else
10261      # If it succeeded, then it was overridden by the user. We will use it
10262      # for the tool.
10263
10264      # First remove it from the list of overridden variables, so we can test
10265      # for unknown variables in the end.
10266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10267
10268      # Check if the provided tool contains a complete path.
10269      tool_specified="$TOUCH"
10270      tool_basename="${tool_specified##*/}"
10271      if test "x$tool_basename" = "x$tool_specified"; then
10272        # A command without a complete path is provided, search $PATH.
10273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10274$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10275        # Extract the first word of "$tool_basename", so it can be a program name with args.
10276set dummy $tool_basename; ac_word=$2
10277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10278$as_echo_n "checking for $ac_word... " >&6; }
10279if ${ac_cv_path_TOUCH+:} false; then :
10280  $as_echo_n "(cached) " >&6
10281else
10282  case $TOUCH in
10283  [\\/]* | ?:[\\/]*)
10284  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10285  ;;
10286  *)
10287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10288for as_dir in $PATH
10289do
10290  IFS=$as_save_IFS
10291  test -z "$as_dir" && as_dir=.
10292    for ac_exec_ext in '' $ac_executable_extensions; do
10293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10294    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10296    break 2
10297  fi
10298done
10299  done
10300IFS=$as_save_IFS
10301
10302  ;;
10303esac
10304fi
10305TOUCH=$ac_cv_path_TOUCH
10306if test -n "$TOUCH"; then
10307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10308$as_echo "$TOUCH" >&6; }
10309else
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10311$as_echo "no" >&6; }
10312fi
10313
10314
10315        if test "x$TOUCH" = x; then
10316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10317        fi
10318      else
10319        # Otherwise we believe it is a complete path. Use it as it is.
10320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10321$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10323$as_echo_n "checking for TOUCH... " >&6; }
10324        if test ! -x "$tool_specified"; then
10325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10326$as_echo "not found" >&6; }
10327          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10328        fi
10329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10330$as_echo "$tool_specified" >&6; }
10331      fi
10332    fi
10333  fi
10334
10335
10336
10337  if test "x$TOUCH" = x; then
10338    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10339  fi
10340
10341
10342
10343
10344
10345  # Publish this variable in the help.
10346
10347
10348  if test "x$TR" = x; then
10349    # The variable is not set by user, try to locate tool using the code snippet
10350    for ac_prog in tr
10351do
10352  # Extract the first word of "$ac_prog", so it can be a program name with args.
10353set dummy $ac_prog; ac_word=$2
10354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10355$as_echo_n "checking for $ac_word... " >&6; }
10356if ${ac_cv_path_TR+:} false; then :
10357  $as_echo_n "(cached) " >&6
10358else
10359  case $TR in
10360  [\\/]* | ?:[\\/]*)
10361  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10362  ;;
10363  *)
10364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10365for as_dir in $PATH
10366do
10367  IFS=$as_save_IFS
10368  test -z "$as_dir" && as_dir=.
10369    for ac_exec_ext in '' $ac_executable_extensions; do
10370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10371    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10373    break 2
10374  fi
10375done
10376  done
10377IFS=$as_save_IFS
10378
10379  ;;
10380esac
10381fi
10382TR=$ac_cv_path_TR
10383if test -n "$TR"; then
10384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10385$as_echo "$TR" >&6; }
10386else
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10388$as_echo "no" >&6; }
10389fi
10390
10391
10392  test -n "$TR" && break
10393done
10394
10395  else
10396    # The variable is set, but is it from the command line or the environment?
10397
10398    # Try to remove the string !TR! from our list.
10399    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10400    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10401      # If it failed, the variable was not from the command line. Ignore it,
10402      # but warn the user (except for BASH, which is always set by the calling BASH).
10403      if test "xTR" != xBASH; then
10404        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10405$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10406      fi
10407      # Try to locate tool using the code snippet
10408      for ac_prog in tr
10409do
10410  # Extract the first word of "$ac_prog", so it can be a program name with args.
10411set dummy $ac_prog; ac_word=$2
10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10413$as_echo_n "checking for $ac_word... " >&6; }
10414if ${ac_cv_path_TR+:} false; then :
10415  $as_echo_n "(cached) " >&6
10416else
10417  case $TR in
10418  [\\/]* | ?:[\\/]*)
10419  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10420  ;;
10421  *)
10422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10423for as_dir in $PATH
10424do
10425  IFS=$as_save_IFS
10426  test -z "$as_dir" && as_dir=.
10427    for ac_exec_ext in '' $ac_executable_extensions; do
10428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10429    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10431    break 2
10432  fi
10433done
10434  done
10435IFS=$as_save_IFS
10436
10437  ;;
10438esac
10439fi
10440TR=$ac_cv_path_TR
10441if test -n "$TR"; then
10442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10443$as_echo "$TR" >&6; }
10444else
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10446$as_echo "no" >&6; }
10447fi
10448
10449
10450  test -n "$TR" && break
10451done
10452
10453    else
10454      # If it succeeded, then it was overridden by the user. We will use it
10455      # for the tool.
10456
10457      # First remove it from the list of overridden variables, so we can test
10458      # for unknown variables in the end.
10459      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10460
10461      # Check if the provided tool contains a complete path.
10462      tool_specified="$TR"
10463      tool_basename="${tool_specified##*/}"
10464      if test "x$tool_basename" = "x$tool_specified"; then
10465        # A command without a complete path is provided, search $PATH.
10466        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10467$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10468        # Extract the first word of "$tool_basename", so it can be a program name with args.
10469set dummy $tool_basename; ac_word=$2
10470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10471$as_echo_n "checking for $ac_word... " >&6; }
10472if ${ac_cv_path_TR+:} false; then :
10473  $as_echo_n "(cached) " >&6
10474else
10475  case $TR in
10476  [\\/]* | ?:[\\/]*)
10477  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10478  ;;
10479  *)
10480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10481for as_dir in $PATH
10482do
10483  IFS=$as_save_IFS
10484  test -z "$as_dir" && as_dir=.
10485    for ac_exec_ext in '' $ac_executable_extensions; do
10486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10487    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10489    break 2
10490  fi
10491done
10492  done
10493IFS=$as_save_IFS
10494
10495  ;;
10496esac
10497fi
10498TR=$ac_cv_path_TR
10499if test -n "$TR"; then
10500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10501$as_echo "$TR" >&6; }
10502else
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10504$as_echo "no" >&6; }
10505fi
10506
10507
10508        if test "x$TR" = x; then
10509          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10510        fi
10511      else
10512        # Otherwise we believe it is a complete path. Use it as it is.
10513        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10514$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10515        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10516$as_echo_n "checking for TR... " >&6; }
10517        if test ! -x "$tool_specified"; then
10518          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10519$as_echo "not found" >&6; }
10520          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10521        fi
10522        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10523$as_echo "$tool_specified" >&6; }
10524      fi
10525    fi
10526  fi
10527
10528
10529
10530  if test "x$TR" = x; then
10531    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10532  fi
10533
10534
10535
10536
10537
10538  # Publish this variable in the help.
10539
10540
10541  if test "x$UNAME" = x; then
10542    # The variable is not set by user, try to locate tool using the code snippet
10543    for ac_prog in uname
10544do
10545  # Extract the first word of "$ac_prog", so it can be a program name with args.
10546set dummy $ac_prog; ac_word=$2
10547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10548$as_echo_n "checking for $ac_word... " >&6; }
10549if ${ac_cv_path_UNAME+:} false; then :
10550  $as_echo_n "(cached) " >&6
10551else
10552  case $UNAME in
10553  [\\/]* | ?:[\\/]*)
10554  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10555  ;;
10556  *)
10557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10558for as_dir in $PATH
10559do
10560  IFS=$as_save_IFS
10561  test -z "$as_dir" && as_dir=.
10562    for ac_exec_ext in '' $ac_executable_extensions; do
10563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10564    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10566    break 2
10567  fi
10568done
10569  done
10570IFS=$as_save_IFS
10571
10572  ;;
10573esac
10574fi
10575UNAME=$ac_cv_path_UNAME
10576if test -n "$UNAME"; then
10577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10578$as_echo "$UNAME" >&6; }
10579else
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10581$as_echo "no" >&6; }
10582fi
10583
10584
10585  test -n "$UNAME" && break
10586done
10587
10588  else
10589    # The variable is set, but is it from the command line or the environment?
10590
10591    # Try to remove the string !UNAME! from our list.
10592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10594      # If it failed, the variable was not from the command line. Ignore it,
10595      # but warn the user (except for BASH, which is always set by the calling BASH).
10596      if test "xUNAME" != xBASH; then
10597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10598$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10599      fi
10600      # Try to locate tool using the code snippet
10601      for ac_prog in uname
10602do
10603  # Extract the first word of "$ac_prog", so it can be a program name with args.
10604set dummy $ac_prog; ac_word=$2
10605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10606$as_echo_n "checking for $ac_word... " >&6; }
10607if ${ac_cv_path_UNAME+:} false; then :
10608  $as_echo_n "(cached) " >&6
10609else
10610  case $UNAME in
10611  [\\/]* | ?:[\\/]*)
10612  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10613  ;;
10614  *)
10615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10616for as_dir in $PATH
10617do
10618  IFS=$as_save_IFS
10619  test -z "$as_dir" && as_dir=.
10620    for ac_exec_ext in '' $ac_executable_extensions; do
10621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10622    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10624    break 2
10625  fi
10626done
10627  done
10628IFS=$as_save_IFS
10629
10630  ;;
10631esac
10632fi
10633UNAME=$ac_cv_path_UNAME
10634if test -n "$UNAME"; then
10635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10636$as_echo "$UNAME" >&6; }
10637else
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10639$as_echo "no" >&6; }
10640fi
10641
10642
10643  test -n "$UNAME" && break
10644done
10645
10646    else
10647      # If it succeeded, then it was overridden by the user. We will use it
10648      # for the tool.
10649
10650      # First remove it from the list of overridden variables, so we can test
10651      # for unknown variables in the end.
10652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10653
10654      # Check if the provided tool contains a complete path.
10655      tool_specified="$UNAME"
10656      tool_basename="${tool_specified##*/}"
10657      if test "x$tool_basename" = "x$tool_specified"; then
10658        # A command without a complete path is provided, search $PATH.
10659        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10660$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10661        # Extract the first word of "$tool_basename", so it can be a program name with args.
10662set dummy $tool_basename; ac_word=$2
10663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10664$as_echo_n "checking for $ac_word... " >&6; }
10665if ${ac_cv_path_UNAME+:} false; then :
10666  $as_echo_n "(cached) " >&6
10667else
10668  case $UNAME in
10669  [\\/]* | ?:[\\/]*)
10670  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10671  ;;
10672  *)
10673  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10674for as_dir in $PATH
10675do
10676  IFS=$as_save_IFS
10677  test -z "$as_dir" && as_dir=.
10678    for ac_exec_ext in '' $ac_executable_extensions; do
10679  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10680    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10681    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10682    break 2
10683  fi
10684done
10685  done
10686IFS=$as_save_IFS
10687
10688  ;;
10689esac
10690fi
10691UNAME=$ac_cv_path_UNAME
10692if test -n "$UNAME"; then
10693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10694$as_echo "$UNAME" >&6; }
10695else
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10697$as_echo "no" >&6; }
10698fi
10699
10700
10701        if test "x$UNAME" = x; then
10702          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10703        fi
10704      else
10705        # Otherwise we believe it is a complete path. Use it as it is.
10706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10707$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10709$as_echo_n "checking for UNAME... " >&6; }
10710        if test ! -x "$tool_specified"; then
10711          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10712$as_echo "not found" >&6; }
10713          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10714        fi
10715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10716$as_echo "$tool_specified" >&6; }
10717      fi
10718    fi
10719  fi
10720
10721
10722
10723  if test "x$UNAME" = x; then
10724    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10725  fi
10726
10727
10728
10729
10730
10731  # Publish this variable in the help.
10732
10733
10734  if test "x$UNIQ" = x; then
10735    # The variable is not set by user, try to locate tool using the code snippet
10736    for ac_prog in uniq
10737do
10738  # Extract the first word of "$ac_prog", so it can be a program name with args.
10739set dummy $ac_prog; ac_word=$2
10740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10741$as_echo_n "checking for $ac_word... " >&6; }
10742if ${ac_cv_path_UNIQ+:} false; then :
10743  $as_echo_n "(cached) " >&6
10744else
10745  case $UNIQ in
10746  [\\/]* | ?:[\\/]*)
10747  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10748  ;;
10749  *)
10750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10751for as_dir in $PATH
10752do
10753  IFS=$as_save_IFS
10754  test -z "$as_dir" && as_dir=.
10755    for ac_exec_ext in '' $ac_executable_extensions; do
10756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10757    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10759    break 2
10760  fi
10761done
10762  done
10763IFS=$as_save_IFS
10764
10765  ;;
10766esac
10767fi
10768UNIQ=$ac_cv_path_UNIQ
10769if test -n "$UNIQ"; then
10770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10771$as_echo "$UNIQ" >&6; }
10772else
10773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10774$as_echo "no" >&6; }
10775fi
10776
10777
10778  test -n "$UNIQ" && break
10779done
10780
10781  else
10782    # The variable is set, but is it from the command line or the environment?
10783
10784    # Try to remove the string !UNIQ! from our list.
10785    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10786    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10787      # If it failed, the variable was not from the command line. Ignore it,
10788      # but warn the user (except for BASH, which is always set by the calling BASH).
10789      if test "xUNIQ" != xBASH; then
10790        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10791$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10792      fi
10793      # Try to locate tool using the code snippet
10794      for ac_prog in uniq
10795do
10796  # Extract the first word of "$ac_prog", so it can be a program name with args.
10797set dummy $ac_prog; ac_word=$2
10798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10799$as_echo_n "checking for $ac_word... " >&6; }
10800if ${ac_cv_path_UNIQ+:} false; then :
10801  $as_echo_n "(cached) " >&6
10802else
10803  case $UNIQ in
10804  [\\/]* | ?:[\\/]*)
10805  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10806  ;;
10807  *)
10808  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10809for as_dir in $PATH
10810do
10811  IFS=$as_save_IFS
10812  test -z "$as_dir" && as_dir=.
10813    for ac_exec_ext in '' $ac_executable_extensions; do
10814  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10815    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10816    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10817    break 2
10818  fi
10819done
10820  done
10821IFS=$as_save_IFS
10822
10823  ;;
10824esac
10825fi
10826UNIQ=$ac_cv_path_UNIQ
10827if test -n "$UNIQ"; then
10828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10829$as_echo "$UNIQ" >&6; }
10830else
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10832$as_echo "no" >&6; }
10833fi
10834
10835
10836  test -n "$UNIQ" && break
10837done
10838
10839    else
10840      # If it succeeded, then it was overridden by the user. We will use it
10841      # for the tool.
10842
10843      # First remove it from the list of overridden variables, so we can test
10844      # for unknown variables in the end.
10845      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10846
10847      # Check if the provided tool contains a complete path.
10848      tool_specified="$UNIQ"
10849      tool_basename="${tool_specified##*/}"
10850      if test "x$tool_basename" = "x$tool_specified"; then
10851        # A command without a complete path is provided, search $PATH.
10852        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10853$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10854        # Extract the first word of "$tool_basename", so it can be a program name with args.
10855set dummy $tool_basename; ac_word=$2
10856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10857$as_echo_n "checking for $ac_word... " >&6; }
10858if ${ac_cv_path_UNIQ+:} false; then :
10859  $as_echo_n "(cached) " >&6
10860else
10861  case $UNIQ in
10862  [\\/]* | ?:[\\/]*)
10863  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10864  ;;
10865  *)
10866  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10867for as_dir in $PATH
10868do
10869  IFS=$as_save_IFS
10870  test -z "$as_dir" && as_dir=.
10871    for ac_exec_ext in '' $ac_executable_extensions; do
10872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10873    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10875    break 2
10876  fi
10877done
10878  done
10879IFS=$as_save_IFS
10880
10881  ;;
10882esac
10883fi
10884UNIQ=$ac_cv_path_UNIQ
10885if test -n "$UNIQ"; then
10886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10887$as_echo "$UNIQ" >&6; }
10888else
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890$as_echo "no" >&6; }
10891fi
10892
10893
10894        if test "x$UNIQ" = x; then
10895          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10896        fi
10897      else
10898        # Otherwise we believe it is a complete path. Use it as it is.
10899        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10900$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10901        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10902$as_echo_n "checking for UNIQ... " >&6; }
10903        if test ! -x "$tool_specified"; then
10904          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10905$as_echo "not found" >&6; }
10906          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10907        fi
10908        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10909$as_echo "$tool_specified" >&6; }
10910      fi
10911    fi
10912  fi
10913
10914
10915
10916  if test "x$UNIQ" = x; then
10917    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10918  fi
10919
10920
10921
10922
10923
10924  # Publish this variable in the help.
10925
10926
10927  if test "x$WC" = x; then
10928    # The variable is not set by user, try to locate tool using the code snippet
10929    for ac_prog in wc
10930do
10931  # Extract the first word of "$ac_prog", so it can be a program name with args.
10932set dummy $ac_prog; ac_word=$2
10933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10934$as_echo_n "checking for $ac_word... " >&6; }
10935if ${ac_cv_path_WC+:} false; then :
10936  $as_echo_n "(cached) " >&6
10937else
10938  case $WC in
10939  [\\/]* | ?:[\\/]*)
10940  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10941  ;;
10942  *)
10943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10944for as_dir in $PATH
10945do
10946  IFS=$as_save_IFS
10947  test -z "$as_dir" && as_dir=.
10948    for ac_exec_ext in '' $ac_executable_extensions; do
10949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10950    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10952    break 2
10953  fi
10954done
10955  done
10956IFS=$as_save_IFS
10957
10958  ;;
10959esac
10960fi
10961WC=$ac_cv_path_WC
10962if test -n "$WC"; then
10963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10964$as_echo "$WC" >&6; }
10965else
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10967$as_echo "no" >&6; }
10968fi
10969
10970
10971  test -n "$WC" && break
10972done
10973
10974  else
10975    # The variable is set, but is it from the command line or the environment?
10976
10977    # Try to remove the string !WC! from our list.
10978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10980      # If it failed, the variable was not from the command line. Ignore it,
10981      # but warn the user (except for BASH, which is always set by the calling BASH).
10982      if test "xWC" != xBASH; then
10983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10984$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10985      fi
10986      # Try to locate tool using the code snippet
10987      for ac_prog in wc
10988do
10989  # Extract the first word of "$ac_prog", so it can be a program name with args.
10990set dummy $ac_prog; ac_word=$2
10991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10992$as_echo_n "checking for $ac_word... " >&6; }
10993if ${ac_cv_path_WC+:} false; then :
10994  $as_echo_n "(cached) " >&6
10995else
10996  case $WC in
10997  [\\/]* | ?:[\\/]*)
10998  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10999  ;;
11000  *)
11001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11002for as_dir in $PATH
11003do
11004  IFS=$as_save_IFS
11005  test -z "$as_dir" && as_dir=.
11006    for ac_exec_ext in '' $ac_executable_extensions; do
11007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11008    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11010    break 2
11011  fi
11012done
11013  done
11014IFS=$as_save_IFS
11015
11016  ;;
11017esac
11018fi
11019WC=$ac_cv_path_WC
11020if test -n "$WC"; then
11021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11022$as_echo "$WC" >&6; }
11023else
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11025$as_echo "no" >&6; }
11026fi
11027
11028
11029  test -n "$WC" && break
11030done
11031
11032    else
11033      # If it succeeded, then it was overridden by the user. We will use it
11034      # for the tool.
11035
11036      # First remove it from the list of overridden variables, so we can test
11037      # for unknown variables in the end.
11038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11039
11040      # Check if the provided tool contains a complete path.
11041      tool_specified="$WC"
11042      tool_basename="${tool_specified##*/}"
11043      if test "x$tool_basename" = "x$tool_specified"; then
11044        # A command without a complete path is provided, search $PATH.
11045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11046$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11047        # Extract the first word of "$tool_basename", so it can be a program name with args.
11048set dummy $tool_basename; ac_word=$2
11049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11050$as_echo_n "checking for $ac_word... " >&6; }
11051if ${ac_cv_path_WC+:} false; then :
11052  $as_echo_n "(cached) " >&6
11053else
11054  case $WC in
11055  [\\/]* | ?:[\\/]*)
11056  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11057  ;;
11058  *)
11059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11060for as_dir in $PATH
11061do
11062  IFS=$as_save_IFS
11063  test -z "$as_dir" && as_dir=.
11064    for ac_exec_ext in '' $ac_executable_extensions; do
11065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11066    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11068    break 2
11069  fi
11070done
11071  done
11072IFS=$as_save_IFS
11073
11074  ;;
11075esac
11076fi
11077WC=$ac_cv_path_WC
11078if test -n "$WC"; then
11079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11080$as_echo "$WC" >&6; }
11081else
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11083$as_echo "no" >&6; }
11084fi
11085
11086
11087        if test "x$WC" = x; then
11088          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11089        fi
11090      else
11091        # Otherwise we believe it is a complete path. Use it as it is.
11092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11093$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11095$as_echo_n "checking for WC... " >&6; }
11096        if test ! -x "$tool_specified"; then
11097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11098$as_echo "not found" >&6; }
11099          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11100        fi
11101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11102$as_echo "$tool_specified" >&6; }
11103      fi
11104    fi
11105  fi
11106
11107
11108
11109  if test "x$WC" = x; then
11110    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11111  fi
11112
11113
11114
11115
11116
11117  # Publish this variable in the help.
11118
11119
11120  if test "x$WHICH" = x; then
11121    # The variable is not set by user, try to locate tool using the code snippet
11122    for ac_prog in which
11123do
11124  # Extract the first word of "$ac_prog", so it can be a program name with args.
11125set dummy $ac_prog; ac_word=$2
11126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11127$as_echo_n "checking for $ac_word... " >&6; }
11128if ${ac_cv_path_WHICH+:} false; then :
11129  $as_echo_n "(cached) " >&6
11130else
11131  case $WHICH in
11132  [\\/]* | ?:[\\/]*)
11133  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11134  ;;
11135  *)
11136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11137for as_dir in $PATH
11138do
11139  IFS=$as_save_IFS
11140  test -z "$as_dir" && as_dir=.
11141    for ac_exec_ext in '' $ac_executable_extensions; do
11142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11143    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11145    break 2
11146  fi
11147done
11148  done
11149IFS=$as_save_IFS
11150
11151  ;;
11152esac
11153fi
11154WHICH=$ac_cv_path_WHICH
11155if test -n "$WHICH"; then
11156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11157$as_echo "$WHICH" >&6; }
11158else
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11160$as_echo "no" >&6; }
11161fi
11162
11163
11164  test -n "$WHICH" && break
11165done
11166
11167  else
11168    # The variable is set, but is it from the command line or the environment?
11169
11170    # Try to remove the string !WHICH! from our list.
11171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11173      # If it failed, the variable was not from the command line. Ignore it,
11174      # but warn the user (except for BASH, which is always set by the calling BASH).
11175      if test "xWHICH" != xBASH; then
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11177$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11178      fi
11179      # Try to locate tool using the code snippet
11180      for ac_prog in which
11181do
11182  # Extract the first word of "$ac_prog", so it can be a program name with args.
11183set dummy $ac_prog; ac_word=$2
11184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11185$as_echo_n "checking for $ac_word... " >&6; }
11186if ${ac_cv_path_WHICH+:} false; then :
11187  $as_echo_n "(cached) " >&6
11188else
11189  case $WHICH in
11190  [\\/]* | ?:[\\/]*)
11191  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11192  ;;
11193  *)
11194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11195for as_dir in $PATH
11196do
11197  IFS=$as_save_IFS
11198  test -z "$as_dir" && as_dir=.
11199    for ac_exec_ext in '' $ac_executable_extensions; do
11200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11201    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11203    break 2
11204  fi
11205done
11206  done
11207IFS=$as_save_IFS
11208
11209  ;;
11210esac
11211fi
11212WHICH=$ac_cv_path_WHICH
11213if test -n "$WHICH"; then
11214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11215$as_echo "$WHICH" >&6; }
11216else
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11218$as_echo "no" >&6; }
11219fi
11220
11221
11222  test -n "$WHICH" && break
11223done
11224
11225    else
11226      # If it succeeded, then it was overridden by the user. We will use it
11227      # for the tool.
11228
11229      # First remove it from the list of overridden variables, so we can test
11230      # for unknown variables in the end.
11231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11232
11233      # Check if the provided tool contains a complete path.
11234      tool_specified="$WHICH"
11235      tool_basename="${tool_specified##*/}"
11236      if test "x$tool_basename" = "x$tool_specified"; then
11237        # A command without a complete path is provided, search $PATH.
11238        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11239$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11240        # Extract the first word of "$tool_basename", so it can be a program name with args.
11241set dummy $tool_basename; ac_word=$2
11242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11243$as_echo_n "checking for $ac_word... " >&6; }
11244if ${ac_cv_path_WHICH+:} false; then :
11245  $as_echo_n "(cached) " >&6
11246else
11247  case $WHICH in
11248  [\\/]* | ?:[\\/]*)
11249  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11250  ;;
11251  *)
11252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11253for as_dir in $PATH
11254do
11255  IFS=$as_save_IFS
11256  test -z "$as_dir" && as_dir=.
11257    for ac_exec_ext in '' $ac_executable_extensions; do
11258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11259    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11261    break 2
11262  fi
11263done
11264  done
11265IFS=$as_save_IFS
11266
11267  ;;
11268esac
11269fi
11270WHICH=$ac_cv_path_WHICH
11271if test -n "$WHICH"; then
11272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11273$as_echo "$WHICH" >&6; }
11274else
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11276$as_echo "no" >&6; }
11277fi
11278
11279
11280        if test "x$WHICH" = x; then
11281          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11282        fi
11283      else
11284        # Otherwise we believe it is a complete path. Use it as it is.
11285        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11286$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11288$as_echo_n "checking for WHICH... " >&6; }
11289        if test ! -x "$tool_specified"; then
11290          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11291$as_echo "not found" >&6; }
11292          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11293        fi
11294        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11295$as_echo "$tool_specified" >&6; }
11296      fi
11297    fi
11298  fi
11299
11300
11301
11302  if test "x$WHICH" = x; then
11303    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11304  fi
11305
11306
11307
11308
11309
11310  # Publish this variable in the help.
11311
11312
11313  if test "x$XARGS" = x; then
11314    # The variable is not set by user, try to locate tool using the code snippet
11315    for ac_prog in xargs
11316do
11317  # Extract the first word of "$ac_prog", so it can be a program name with args.
11318set dummy $ac_prog; ac_word=$2
11319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11320$as_echo_n "checking for $ac_word... " >&6; }
11321if ${ac_cv_path_XARGS+:} false; then :
11322  $as_echo_n "(cached) " >&6
11323else
11324  case $XARGS in
11325  [\\/]* | ?:[\\/]*)
11326  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11327  ;;
11328  *)
11329  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11330for as_dir in $PATH
11331do
11332  IFS=$as_save_IFS
11333  test -z "$as_dir" && as_dir=.
11334    for ac_exec_ext in '' $ac_executable_extensions; do
11335  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11336    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11337    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11338    break 2
11339  fi
11340done
11341  done
11342IFS=$as_save_IFS
11343
11344  ;;
11345esac
11346fi
11347XARGS=$ac_cv_path_XARGS
11348if test -n "$XARGS"; then
11349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11350$as_echo "$XARGS" >&6; }
11351else
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11353$as_echo "no" >&6; }
11354fi
11355
11356
11357  test -n "$XARGS" && break
11358done
11359
11360  else
11361    # The variable is set, but is it from the command line or the environment?
11362
11363    # Try to remove the string !XARGS! from our list.
11364    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11365    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11366      # If it failed, the variable was not from the command line. Ignore it,
11367      # but warn the user (except for BASH, which is always set by the calling BASH).
11368      if test "xXARGS" != xBASH; then
11369        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11370$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11371      fi
11372      # Try to locate tool using the code snippet
11373      for ac_prog in xargs
11374do
11375  # Extract the first word of "$ac_prog", so it can be a program name with args.
11376set dummy $ac_prog; ac_word=$2
11377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11378$as_echo_n "checking for $ac_word... " >&6; }
11379if ${ac_cv_path_XARGS+:} false; then :
11380  $as_echo_n "(cached) " >&6
11381else
11382  case $XARGS in
11383  [\\/]* | ?:[\\/]*)
11384  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11385  ;;
11386  *)
11387  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11388for as_dir in $PATH
11389do
11390  IFS=$as_save_IFS
11391  test -z "$as_dir" && as_dir=.
11392    for ac_exec_ext in '' $ac_executable_extensions; do
11393  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11394    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11395    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11396    break 2
11397  fi
11398done
11399  done
11400IFS=$as_save_IFS
11401
11402  ;;
11403esac
11404fi
11405XARGS=$ac_cv_path_XARGS
11406if test -n "$XARGS"; then
11407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11408$as_echo "$XARGS" >&6; }
11409else
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11411$as_echo "no" >&6; }
11412fi
11413
11414
11415  test -n "$XARGS" && break
11416done
11417
11418    else
11419      # If it succeeded, then it was overridden by the user. We will use it
11420      # for the tool.
11421
11422      # First remove it from the list of overridden variables, so we can test
11423      # for unknown variables in the end.
11424      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11425
11426      # Check if the provided tool contains a complete path.
11427      tool_specified="$XARGS"
11428      tool_basename="${tool_specified##*/}"
11429      if test "x$tool_basename" = "x$tool_specified"; then
11430        # A command without a complete path is provided, search $PATH.
11431        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11432$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11433        # Extract the first word of "$tool_basename", so it can be a program name with args.
11434set dummy $tool_basename; ac_word=$2
11435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11436$as_echo_n "checking for $ac_word... " >&6; }
11437if ${ac_cv_path_XARGS+:} false; then :
11438  $as_echo_n "(cached) " >&6
11439else
11440  case $XARGS in
11441  [\\/]* | ?:[\\/]*)
11442  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11443  ;;
11444  *)
11445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11446for as_dir in $PATH
11447do
11448  IFS=$as_save_IFS
11449  test -z "$as_dir" && as_dir=.
11450    for ac_exec_ext in '' $ac_executable_extensions; do
11451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11452    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11454    break 2
11455  fi
11456done
11457  done
11458IFS=$as_save_IFS
11459
11460  ;;
11461esac
11462fi
11463XARGS=$ac_cv_path_XARGS
11464if test -n "$XARGS"; then
11465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11466$as_echo "$XARGS" >&6; }
11467else
11468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11469$as_echo "no" >&6; }
11470fi
11471
11472
11473        if test "x$XARGS" = x; then
11474          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11475        fi
11476      else
11477        # Otherwise we believe it is a complete path. Use it as it is.
11478        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11479$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11480        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11481$as_echo_n "checking for XARGS... " >&6; }
11482        if test ! -x "$tool_specified"; then
11483          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11484$as_echo "not found" >&6; }
11485          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11486        fi
11487        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11488$as_echo "$tool_specified" >&6; }
11489      fi
11490    fi
11491  fi
11492
11493
11494
11495  if test "x$XARGS" = x; then
11496    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11497  fi
11498
11499
11500
11501  # Then required tools that require some special treatment.
11502
11503
11504  # Publish this variable in the help.
11505
11506
11507  if test "x$AWK" = x; then
11508    # The variable is not set by user, try to locate tool using the code snippet
11509    for ac_prog in gawk mawk nawk awk
11510do
11511  # Extract the first word of "$ac_prog", so it can be a program name with args.
11512set dummy $ac_prog; ac_word=$2
11513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11514$as_echo_n "checking for $ac_word... " >&6; }
11515if ${ac_cv_prog_AWK+:} false; then :
11516  $as_echo_n "(cached) " >&6
11517else
11518  if test -n "$AWK"; then
11519  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11520else
11521as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11522for as_dir in $PATH
11523do
11524  IFS=$as_save_IFS
11525  test -z "$as_dir" && as_dir=.
11526    for ac_exec_ext in '' $ac_executable_extensions; do
11527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11528    ac_cv_prog_AWK="$ac_prog"
11529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11530    break 2
11531  fi
11532done
11533  done
11534IFS=$as_save_IFS
11535
11536fi
11537fi
11538AWK=$ac_cv_prog_AWK
11539if test -n "$AWK"; then
11540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11541$as_echo "$AWK" >&6; }
11542else
11543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11544$as_echo "no" >&6; }
11545fi
11546
11547
11548  test -n "$AWK" && break
11549done
11550
11551  else
11552    # The variable is set, but is it from the command line or the environment?
11553
11554    # Try to remove the string !AWK! from our list.
11555    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11556    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11557      # If it failed, the variable was not from the command line. Ignore it,
11558      # but warn the user (except for BASH, which is always set by the calling BASH).
11559      if test "xAWK" != xBASH; then
11560        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11561$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11562      fi
11563      # Try to locate tool using the code snippet
11564      for ac_prog in gawk mawk nawk awk
11565do
11566  # Extract the first word of "$ac_prog", so it can be a program name with args.
11567set dummy $ac_prog; ac_word=$2
11568{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11569$as_echo_n "checking for $ac_word... " >&6; }
11570if ${ac_cv_prog_AWK+:} false; then :
11571  $as_echo_n "(cached) " >&6
11572else
11573  if test -n "$AWK"; then
11574  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11575else
11576as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11577for as_dir in $PATH
11578do
11579  IFS=$as_save_IFS
11580  test -z "$as_dir" && as_dir=.
11581    for ac_exec_ext in '' $ac_executable_extensions; do
11582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11583    ac_cv_prog_AWK="$ac_prog"
11584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11585    break 2
11586  fi
11587done
11588  done
11589IFS=$as_save_IFS
11590
11591fi
11592fi
11593AWK=$ac_cv_prog_AWK
11594if test -n "$AWK"; then
11595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11596$as_echo "$AWK" >&6; }
11597else
11598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11599$as_echo "no" >&6; }
11600fi
11601
11602
11603  test -n "$AWK" && break
11604done
11605
11606    else
11607      # If it succeeded, then it was overridden by the user. We will use it
11608      # for the tool.
11609
11610      # First remove it from the list of overridden variables, so we can test
11611      # for unknown variables in the end.
11612      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11613
11614      # Check if the provided tool contains a complete path.
11615      tool_specified="$AWK"
11616      tool_basename="${tool_specified##*/}"
11617      if test "x$tool_basename" = "x$tool_specified"; then
11618        # A command without a complete path is provided, search $PATH.
11619        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11620$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11621        # Extract the first word of "$tool_basename", so it can be a program name with args.
11622set dummy $tool_basename; ac_word=$2
11623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11624$as_echo_n "checking for $ac_word... " >&6; }
11625if ${ac_cv_path_AWK+:} false; then :
11626  $as_echo_n "(cached) " >&6
11627else
11628  case $AWK in
11629  [\\/]* | ?:[\\/]*)
11630  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11631  ;;
11632  *)
11633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11634for as_dir in $PATH
11635do
11636  IFS=$as_save_IFS
11637  test -z "$as_dir" && as_dir=.
11638    for ac_exec_ext in '' $ac_executable_extensions; do
11639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11640    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11642    break 2
11643  fi
11644done
11645  done
11646IFS=$as_save_IFS
11647
11648  ;;
11649esac
11650fi
11651AWK=$ac_cv_path_AWK
11652if test -n "$AWK"; then
11653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11654$as_echo "$AWK" >&6; }
11655else
11656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11657$as_echo "no" >&6; }
11658fi
11659
11660
11661        if test "x$AWK" = x; then
11662          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11663        fi
11664      else
11665        # Otherwise we believe it is a complete path. Use it as it is.
11666        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11667$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11669$as_echo_n "checking for AWK... " >&6; }
11670        if test ! -x "$tool_specified"; then
11671          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11672$as_echo "not found" >&6; }
11673          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11674        fi
11675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11676$as_echo "$tool_specified" >&6; }
11677      fi
11678    fi
11679  fi
11680
11681
11682  if test "x$AWK" = x; then
11683    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11684  fi
11685
11686
11687
11688
11689  # Publish this variable in the help.
11690
11691
11692  if test "x$GREP" = x; then
11693    # The variable is not set by user, try to locate tool using the code snippet
11694    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11695$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11696if ${ac_cv_path_GREP+:} false; then :
11697  $as_echo_n "(cached) " >&6
11698else
11699  if test -z "$GREP"; then
11700  ac_path_GREP_found=false
11701  # Loop through the user's path and test for each of PROGNAME-LIST
11702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11703for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11704do
11705  IFS=$as_save_IFS
11706  test -z "$as_dir" && as_dir=.
11707    for ac_prog in grep ggrep; do
11708    for ac_exec_ext in '' $ac_executable_extensions; do
11709      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11710      as_fn_executable_p "$ac_path_GREP" || continue
11711# Check for GNU ac_path_GREP and select it if it is found.
11712  # Check for GNU $ac_path_GREP
11713case `"$ac_path_GREP" --version 2>&1` in
11714*GNU*)
11715  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11716*)
11717  ac_count=0
11718  $as_echo_n 0123456789 >"conftest.in"
11719  while :
11720  do
11721    cat "conftest.in" "conftest.in" >"conftest.tmp"
11722    mv "conftest.tmp" "conftest.in"
11723    cp "conftest.in" "conftest.nl"
11724    $as_echo 'GREP' >> "conftest.nl"
11725    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11726    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11727    as_fn_arith $ac_count + 1 && ac_count=$as_val
11728    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11729      # Best one so far, save it but keep looking for a better one
11730      ac_cv_path_GREP="$ac_path_GREP"
11731      ac_path_GREP_max=$ac_count
11732    fi
11733    # 10*(2^10) chars as input seems more than enough
11734    test $ac_count -gt 10 && break
11735  done
11736  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11737esac
11738
11739      $ac_path_GREP_found && break 3
11740    done
11741  done
11742  done
11743IFS=$as_save_IFS
11744  if test -z "$ac_cv_path_GREP"; then
11745    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11746  fi
11747else
11748  ac_cv_path_GREP=$GREP
11749fi
11750
11751fi
11752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11753$as_echo "$ac_cv_path_GREP" >&6; }
11754 GREP="$ac_cv_path_GREP"
11755
11756
11757  else
11758    # The variable is set, but is it from the command line or the environment?
11759
11760    # Try to remove the string !GREP! from our list.
11761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11763      # If it failed, the variable was not from the command line. Ignore it,
11764      # but warn the user (except for BASH, which is always set by the calling BASH).
11765      if test "xGREP" != xBASH; then
11766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11767$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11768      fi
11769      # Try to locate tool using the code snippet
11770      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11771$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11772if ${ac_cv_path_GREP+:} false; then :
11773  $as_echo_n "(cached) " >&6
11774else
11775  if test -z "$GREP"; then
11776  ac_path_GREP_found=false
11777  # Loop through the user's path and test for each of PROGNAME-LIST
11778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11779for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11780do
11781  IFS=$as_save_IFS
11782  test -z "$as_dir" && as_dir=.
11783    for ac_prog in grep ggrep; do
11784    for ac_exec_ext in '' $ac_executable_extensions; do
11785      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11786      as_fn_executable_p "$ac_path_GREP" || continue
11787# Check for GNU ac_path_GREP and select it if it is found.
11788  # Check for GNU $ac_path_GREP
11789case `"$ac_path_GREP" --version 2>&1` in
11790*GNU*)
11791  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11792*)
11793  ac_count=0
11794  $as_echo_n 0123456789 >"conftest.in"
11795  while :
11796  do
11797    cat "conftest.in" "conftest.in" >"conftest.tmp"
11798    mv "conftest.tmp" "conftest.in"
11799    cp "conftest.in" "conftest.nl"
11800    $as_echo 'GREP' >> "conftest.nl"
11801    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11802    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11803    as_fn_arith $ac_count + 1 && ac_count=$as_val
11804    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11805      # Best one so far, save it but keep looking for a better one
11806      ac_cv_path_GREP="$ac_path_GREP"
11807      ac_path_GREP_max=$ac_count
11808    fi
11809    # 10*(2^10) chars as input seems more than enough
11810    test $ac_count -gt 10 && break
11811  done
11812  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11813esac
11814
11815      $ac_path_GREP_found && break 3
11816    done
11817  done
11818  done
11819IFS=$as_save_IFS
11820  if test -z "$ac_cv_path_GREP"; then
11821    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11822  fi
11823else
11824  ac_cv_path_GREP=$GREP
11825fi
11826
11827fi
11828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11829$as_echo "$ac_cv_path_GREP" >&6; }
11830 GREP="$ac_cv_path_GREP"
11831
11832
11833    else
11834      # If it succeeded, then it was overridden by the user. We will use it
11835      # for the tool.
11836
11837      # First remove it from the list of overridden variables, so we can test
11838      # for unknown variables in the end.
11839      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11840
11841      # Check if the provided tool contains a complete path.
11842      tool_specified="$GREP"
11843      tool_basename="${tool_specified##*/}"
11844      if test "x$tool_basename" = "x$tool_specified"; then
11845        # A command without a complete path is provided, search $PATH.
11846        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11847$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11848        # Extract the first word of "$tool_basename", so it can be a program name with args.
11849set dummy $tool_basename; ac_word=$2
11850{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11851$as_echo_n "checking for $ac_word... " >&6; }
11852if ${ac_cv_path_GREP+:} false; then :
11853  $as_echo_n "(cached) " >&6
11854else
11855  case $GREP in
11856  [\\/]* | ?:[\\/]*)
11857  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11858  ;;
11859  *)
11860  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11861for as_dir in $PATH
11862do
11863  IFS=$as_save_IFS
11864  test -z "$as_dir" && as_dir=.
11865    for ac_exec_ext in '' $ac_executable_extensions; do
11866  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11867    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11868    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11869    break 2
11870  fi
11871done
11872  done
11873IFS=$as_save_IFS
11874
11875  ;;
11876esac
11877fi
11878GREP=$ac_cv_path_GREP
11879if test -n "$GREP"; then
11880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11881$as_echo "$GREP" >&6; }
11882else
11883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11884$as_echo "no" >&6; }
11885fi
11886
11887
11888        if test "x$GREP" = x; then
11889          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11890        fi
11891      else
11892        # Otherwise we believe it is a complete path. Use it as it is.
11893        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11894$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11895        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11896$as_echo_n "checking for GREP... " >&6; }
11897        if test ! -x "$tool_specified"; then
11898          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11899$as_echo "not found" >&6; }
11900          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11901        fi
11902        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11903$as_echo "$tool_specified" >&6; }
11904      fi
11905    fi
11906  fi
11907
11908
11909  if test "x$GREP" = x; then
11910    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11911  fi
11912
11913
11914
11915
11916  # Publish this variable in the help.
11917
11918
11919  if test "x$EGREP" = x; then
11920    # The variable is not set by user, try to locate tool using the code snippet
11921    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11922$as_echo_n "checking for egrep... " >&6; }
11923if ${ac_cv_path_EGREP+:} false; then :
11924  $as_echo_n "(cached) " >&6
11925else
11926  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11927   then ac_cv_path_EGREP="$GREP -E"
11928   else
11929     if test -z "$EGREP"; then
11930  ac_path_EGREP_found=false
11931  # Loop through the user's path and test for each of PROGNAME-LIST
11932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11933for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11934do
11935  IFS=$as_save_IFS
11936  test -z "$as_dir" && as_dir=.
11937    for ac_prog in egrep; do
11938    for ac_exec_ext in '' $ac_executable_extensions; do
11939      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11940      as_fn_executable_p "$ac_path_EGREP" || continue
11941# Check for GNU ac_path_EGREP and select it if it is found.
11942  # Check for GNU $ac_path_EGREP
11943case `"$ac_path_EGREP" --version 2>&1` in
11944*GNU*)
11945  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11946*)
11947  ac_count=0
11948  $as_echo_n 0123456789 >"conftest.in"
11949  while :
11950  do
11951    cat "conftest.in" "conftest.in" >"conftest.tmp"
11952    mv "conftest.tmp" "conftest.in"
11953    cp "conftest.in" "conftest.nl"
11954    $as_echo 'EGREP' >> "conftest.nl"
11955    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11956    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11957    as_fn_arith $ac_count + 1 && ac_count=$as_val
11958    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11959      # Best one so far, save it but keep looking for a better one
11960      ac_cv_path_EGREP="$ac_path_EGREP"
11961      ac_path_EGREP_max=$ac_count
11962    fi
11963    # 10*(2^10) chars as input seems more than enough
11964    test $ac_count -gt 10 && break
11965  done
11966  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11967esac
11968
11969      $ac_path_EGREP_found && break 3
11970    done
11971  done
11972  done
11973IFS=$as_save_IFS
11974  if test -z "$ac_cv_path_EGREP"; then
11975    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11976  fi
11977else
11978  ac_cv_path_EGREP=$EGREP
11979fi
11980
11981   fi
11982fi
11983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11984$as_echo "$ac_cv_path_EGREP" >&6; }
11985 EGREP="$ac_cv_path_EGREP"
11986
11987
11988  else
11989    # The variable is set, but is it from the command line or the environment?
11990
11991    # Try to remove the string !EGREP! from our list.
11992    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11993    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11994      # If it failed, the variable was not from the command line. Ignore it,
11995      # but warn the user (except for BASH, which is always set by the calling BASH).
11996      if test "xEGREP" != xBASH; then
11997        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
11998$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
11999      fi
12000      # Try to locate tool using the code snippet
12001      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12002$as_echo_n "checking for egrep... " >&6; }
12003if ${ac_cv_path_EGREP+:} false; then :
12004  $as_echo_n "(cached) " >&6
12005else
12006  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12007   then ac_cv_path_EGREP="$GREP -E"
12008   else
12009     if test -z "$EGREP"; then
12010  ac_path_EGREP_found=false
12011  # Loop through the user's path and test for each of PROGNAME-LIST
12012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12013for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12014do
12015  IFS=$as_save_IFS
12016  test -z "$as_dir" && as_dir=.
12017    for ac_prog in egrep; do
12018    for ac_exec_ext in '' $ac_executable_extensions; do
12019      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12020      as_fn_executable_p "$ac_path_EGREP" || continue
12021# Check for GNU ac_path_EGREP and select it if it is found.
12022  # Check for GNU $ac_path_EGREP
12023case `"$ac_path_EGREP" --version 2>&1` in
12024*GNU*)
12025  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12026*)
12027  ac_count=0
12028  $as_echo_n 0123456789 >"conftest.in"
12029  while :
12030  do
12031    cat "conftest.in" "conftest.in" >"conftest.tmp"
12032    mv "conftest.tmp" "conftest.in"
12033    cp "conftest.in" "conftest.nl"
12034    $as_echo 'EGREP' >> "conftest.nl"
12035    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12036    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12037    as_fn_arith $ac_count + 1 && ac_count=$as_val
12038    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12039      # Best one so far, save it but keep looking for a better one
12040      ac_cv_path_EGREP="$ac_path_EGREP"
12041      ac_path_EGREP_max=$ac_count
12042    fi
12043    # 10*(2^10) chars as input seems more than enough
12044    test $ac_count -gt 10 && break
12045  done
12046  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12047esac
12048
12049      $ac_path_EGREP_found && break 3
12050    done
12051  done
12052  done
12053IFS=$as_save_IFS
12054  if test -z "$ac_cv_path_EGREP"; then
12055    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12056  fi
12057else
12058  ac_cv_path_EGREP=$EGREP
12059fi
12060
12061   fi
12062fi
12063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12064$as_echo "$ac_cv_path_EGREP" >&6; }
12065 EGREP="$ac_cv_path_EGREP"
12066
12067
12068    else
12069      # If it succeeded, then it was overridden by the user. We will use it
12070      # for the tool.
12071
12072      # First remove it from the list of overridden variables, so we can test
12073      # for unknown variables in the end.
12074      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12075
12076      # Check if the provided tool contains a complete path.
12077      tool_specified="$EGREP"
12078      tool_basename="${tool_specified##*/}"
12079      if test "x$tool_basename" = "x$tool_specified"; then
12080        # A command without a complete path is provided, search $PATH.
12081        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12082$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12083        # Extract the first word of "$tool_basename", so it can be a program name with args.
12084set dummy $tool_basename; ac_word=$2
12085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12086$as_echo_n "checking for $ac_word... " >&6; }
12087if ${ac_cv_path_EGREP+:} false; then :
12088  $as_echo_n "(cached) " >&6
12089else
12090  case $EGREP in
12091  [\\/]* | ?:[\\/]*)
12092  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12093  ;;
12094  *)
12095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12096for as_dir in $PATH
12097do
12098  IFS=$as_save_IFS
12099  test -z "$as_dir" && as_dir=.
12100    for ac_exec_ext in '' $ac_executable_extensions; do
12101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12102    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12104    break 2
12105  fi
12106done
12107  done
12108IFS=$as_save_IFS
12109
12110  ;;
12111esac
12112fi
12113EGREP=$ac_cv_path_EGREP
12114if test -n "$EGREP"; then
12115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12116$as_echo "$EGREP" >&6; }
12117else
12118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
12120fi
12121
12122
12123        if test "x$EGREP" = x; then
12124          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12125        fi
12126      else
12127        # Otherwise we believe it is a complete path. Use it as it is.
12128        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12129$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12131$as_echo_n "checking for EGREP... " >&6; }
12132        if test ! -x "$tool_specified"; then
12133          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12134$as_echo "not found" >&6; }
12135          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12136        fi
12137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12138$as_echo "$tool_specified" >&6; }
12139      fi
12140    fi
12141  fi
12142
12143
12144  if test "x$EGREP" = x; then
12145    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12146  fi
12147
12148
12149
12150
12151  # Publish this variable in the help.
12152
12153
12154  if test "x$FGREP" = x; then
12155    # The variable is not set by user, try to locate tool using the code snippet
12156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12157$as_echo_n "checking for fgrep... " >&6; }
12158if ${ac_cv_path_FGREP+:} false; then :
12159  $as_echo_n "(cached) " >&6
12160else
12161  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12162   then ac_cv_path_FGREP="$GREP -F"
12163   else
12164     if test -z "$FGREP"; then
12165  ac_path_FGREP_found=false
12166  # Loop through the user's path and test for each of PROGNAME-LIST
12167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12168for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12169do
12170  IFS=$as_save_IFS
12171  test -z "$as_dir" && as_dir=.
12172    for ac_prog in fgrep; do
12173    for ac_exec_ext in '' $ac_executable_extensions; do
12174      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12175      as_fn_executable_p "$ac_path_FGREP" || continue
12176# Check for GNU ac_path_FGREP and select it if it is found.
12177  # Check for GNU $ac_path_FGREP
12178case `"$ac_path_FGREP" --version 2>&1` in
12179*GNU*)
12180  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12181*)
12182  ac_count=0
12183  $as_echo_n 0123456789 >"conftest.in"
12184  while :
12185  do
12186    cat "conftest.in" "conftest.in" >"conftest.tmp"
12187    mv "conftest.tmp" "conftest.in"
12188    cp "conftest.in" "conftest.nl"
12189    $as_echo 'FGREP' >> "conftest.nl"
12190    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12191    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12192    as_fn_arith $ac_count + 1 && ac_count=$as_val
12193    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12194      # Best one so far, save it but keep looking for a better one
12195      ac_cv_path_FGREP="$ac_path_FGREP"
12196      ac_path_FGREP_max=$ac_count
12197    fi
12198    # 10*(2^10) chars as input seems more than enough
12199    test $ac_count -gt 10 && break
12200  done
12201  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12202esac
12203
12204      $ac_path_FGREP_found && break 3
12205    done
12206  done
12207  done
12208IFS=$as_save_IFS
12209  if test -z "$ac_cv_path_FGREP"; then
12210    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12211  fi
12212else
12213  ac_cv_path_FGREP=$FGREP
12214fi
12215
12216   fi
12217fi
12218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12219$as_echo "$ac_cv_path_FGREP" >&6; }
12220 FGREP="$ac_cv_path_FGREP"
12221
12222
12223  else
12224    # The variable is set, but is it from the command line or the environment?
12225
12226    # Try to remove the string !FGREP! from our list.
12227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12229      # If it failed, the variable was not from the command line. Ignore it,
12230      # but warn the user (except for BASH, which is always set by the calling BASH).
12231      if test "xFGREP" != xBASH; then
12232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12233$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12234      fi
12235      # Try to locate tool using the code snippet
12236      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12237$as_echo_n "checking for fgrep... " >&6; }
12238if ${ac_cv_path_FGREP+:} false; then :
12239  $as_echo_n "(cached) " >&6
12240else
12241  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12242   then ac_cv_path_FGREP="$GREP -F"
12243   else
12244     if test -z "$FGREP"; then
12245  ac_path_FGREP_found=false
12246  # Loop through the user's path and test for each of PROGNAME-LIST
12247  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12248for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12249do
12250  IFS=$as_save_IFS
12251  test -z "$as_dir" && as_dir=.
12252    for ac_prog in fgrep; do
12253    for ac_exec_ext in '' $ac_executable_extensions; do
12254      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12255      as_fn_executable_p "$ac_path_FGREP" || continue
12256# Check for GNU ac_path_FGREP and select it if it is found.
12257  # Check for GNU $ac_path_FGREP
12258case `"$ac_path_FGREP" --version 2>&1` in
12259*GNU*)
12260  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12261*)
12262  ac_count=0
12263  $as_echo_n 0123456789 >"conftest.in"
12264  while :
12265  do
12266    cat "conftest.in" "conftest.in" >"conftest.tmp"
12267    mv "conftest.tmp" "conftest.in"
12268    cp "conftest.in" "conftest.nl"
12269    $as_echo 'FGREP' >> "conftest.nl"
12270    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12271    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12272    as_fn_arith $ac_count + 1 && ac_count=$as_val
12273    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12274      # Best one so far, save it but keep looking for a better one
12275      ac_cv_path_FGREP="$ac_path_FGREP"
12276      ac_path_FGREP_max=$ac_count
12277    fi
12278    # 10*(2^10) chars as input seems more than enough
12279    test $ac_count -gt 10 && break
12280  done
12281  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12282esac
12283
12284      $ac_path_FGREP_found && break 3
12285    done
12286  done
12287  done
12288IFS=$as_save_IFS
12289  if test -z "$ac_cv_path_FGREP"; then
12290    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12291  fi
12292else
12293  ac_cv_path_FGREP=$FGREP
12294fi
12295
12296   fi
12297fi
12298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12299$as_echo "$ac_cv_path_FGREP" >&6; }
12300 FGREP="$ac_cv_path_FGREP"
12301
12302
12303    else
12304      # If it succeeded, then it was overridden by the user. We will use it
12305      # for the tool.
12306
12307      # First remove it from the list of overridden variables, so we can test
12308      # for unknown variables in the end.
12309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12310
12311      # Check if the provided tool contains a complete path.
12312      tool_specified="$FGREP"
12313      tool_basename="${tool_specified##*/}"
12314      if test "x$tool_basename" = "x$tool_specified"; then
12315        # A command without a complete path is provided, search $PATH.
12316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12317$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12318        # Extract the first word of "$tool_basename", so it can be a program name with args.
12319set dummy $tool_basename; ac_word=$2
12320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12321$as_echo_n "checking for $ac_word... " >&6; }
12322if ${ac_cv_path_FGREP+:} false; then :
12323  $as_echo_n "(cached) " >&6
12324else
12325  case $FGREP in
12326  [\\/]* | ?:[\\/]*)
12327  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12328  ;;
12329  *)
12330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12331for as_dir in $PATH
12332do
12333  IFS=$as_save_IFS
12334  test -z "$as_dir" && as_dir=.
12335    for ac_exec_ext in '' $ac_executable_extensions; do
12336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12337    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12339    break 2
12340  fi
12341done
12342  done
12343IFS=$as_save_IFS
12344
12345  ;;
12346esac
12347fi
12348FGREP=$ac_cv_path_FGREP
12349if test -n "$FGREP"; then
12350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12351$as_echo "$FGREP" >&6; }
12352else
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12354$as_echo "no" >&6; }
12355fi
12356
12357
12358        if test "x$FGREP" = x; then
12359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12360        fi
12361      else
12362        # Otherwise we believe it is a complete path. Use it as it is.
12363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12364$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12366$as_echo_n "checking for FGREP... " >&6; }
12367        if test ! -x "$tool_specified"; then
12368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12369$as_echo "not found" >&6; }
12370          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12371        fi
12372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12373$as_echo "$tool_specified" >&6; }
12374      fi
12375    fi
12376  fi
12377
12378
12379  if test "x$FGREP" = x; then
12380    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12381  fi
12382
12383
12384
12385
12386  # Publish this variable in the help.
12387
12388
12389  if test "x$SED" = x; then
12390    # The variable is not set by user, try to locate tool using the code snippet
12391    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12392$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12393if ${ac_cv_path_SED+:} false; then :
12394  $as_echo_n "(cached) " >&6
12395else
12396            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12397     for ac_i in 1 2 3 4 5 6 7; do
12398       ac_script="$ac_script$as_nl$ac_script"
12399     done
12400     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12401     { ac_script=; unset ac_script;}
12402     if test -z "$SED"; then
12403  ac_path_SED_found=false
12404  # Loop through the user's path and test for each of PROGNAME-LIST
12405  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12406for as_dir in $PATH
12407do
12408  IFS=$as_save_IFS
12409  test -z "$as_dir" && as_dir=.
12410    for ac_prog in sed gsed; do
12411    for ac_exec_ext in '' $ac_executable_extensions; do
12412      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12413      as_fn_executable_p "$ac_path_SED" || continue
12414# Check for GNU ac_path_SED and select it if it is found.
12415  # Check for GNU $ac_path_SED
12416case `"$ac_path_SED" --version 2>&1` in
12417*GNU*)
12418  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12419*)
12420  ac_count=0
12421  $as_echo_n 0123456789 >"conftest.in"
12422  while :
12423  do
12424    cat "conftest.in" "conftest.in" >"conftest.tmp"
12425    mv "conftest.tmp" "conftest.in"
12426    cp "conftest.in" "conftest.nl"
12427    $as_echo '' >> "conftest.nl"
12428    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12429    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12430    as_fn_arith $ac_count + 1 && ac_count=$as_val
12431    if test $ac_count -gt ${ac_path_SED_max-0}; then
12432      # Best one so far, save it but keep looking for a better one
12433      ac_cv_path_SED="$ac_path_SED"
12434      ac_path_SED_max=$ac_count
12435    fi
12436    # 10*(2^10) chars as input seems more than enough
12437    test $ac_count -gt 10 && break
12438  done
12439  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12440esac
12441
12442      $ac_path_SED_found && break 3
12443    done
12444  done
12445  done
12446IFS=$as_save_IFS
12447  if test -z "$ac_cv_path_SED"; then
12448    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12449  fi
12450else
12451  ac_cv_path_SED=$SED
12452fi
12453
12454fi
12455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12456$as_echo "$ac_cv_path_SED" >&6; }
12457 SED="$ac_cv_path_SED"
12458  rm -f conftest.sed
12459
12460  else
12461    # The variable is set, but is it from the command line or the environment?
12462
12463    # Try to remove the string !SED! from our list.
12464    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12465    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12466      # If it failed, the variable was not from the command line. Ignore it,
12467      # but warn the user (except for BASH, which is always set by the calling BASH).
12468      if test "xSED" != xBASH; then
12469        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12470$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12471      fi
12472      # Try to locate tool using the code snippet
12473      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12474$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12475if ${ac_cv_path_SED+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12479     for ac_i in 1 2 3 4 5 6 7; do
12480       ac_script="$ac_script$as_nl$ac_script"
12481     done
12482     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12483     { ac_script=; unset ac_script;}
12484     if test -z "$SED"; then
12485  ac_path_SED_found=false
12486  # Loop through the user's path and test for each of PROGNAME-LIST
12487  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12488for as_dir in $PATH
12489do
12490  IFS=$as_save_IFS
12491  test -z "$as_dir" && as_dir=.
12492    for ac_prog in sed gsed; do
12493    for ac_exec_ext in '' $ac_executable_extensions; do
12494      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12495      as_fn_executable_p "$ac_path_SED" || continue
12496# Check for GNU ac_path_SED and select it if it is found.
12497  # Check for GNU $ac_path_SED
12498case `"$ac_path_SED" --version 2>&1` in
12499*GNU*)
12500  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12501*)
12502  ac_count=0
12503  $as_echo_n 0123456789 >"conftest.in"
12504  while :
12505  do
12506    cat "conftest.in" "conftest.in" >"conftest.tmp"
12507    mv "conftest.tmp" "conftest.in"
12508    cp "conftest.in" "conftest.nl"
12509    $as_echo '' >> "conftest.nl"
12510    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12511    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12512    as_fn_arith $ac_count + 1 && ac_count=$as_val
12513    if test $ac_count -gt ${ac_path_SED_max-0}; then
12514      # Best one so far, save it but keep looking for a better one
12515      ac_cv_path_SED="$ac_path_SED"
12516      ac_path_SED_max=$ac_count
12517    fi
12518    # 10*(2^10) chars as input seems more than enough
12519    test $ac_count -gt 10 && break
12520  done
12521  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12522esac
12523
12524      $ac_path_SED_found && break 3
12525    done
12526  done
12527  done
12528IFS=$as_save_IFS
12529  if test -z "$ac_cv_path_SED"; then
12530    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12531  fi
12532else
12533  ac_cv_path_SED=$SED
12534fi
12535
12536fi
12537{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12538$as_echo "$ac_cv_path_SED" >&6; }
12539 SED="$ac_cv_path_SED"
12540  rm -f conftest.sed
12541
12542    else
12543      # If it succeeded, then it was overridden by the user. We will use it
12544      # for the tool.
12545
12546      # First remove it from the list of overridden variables, so we can test
12547      # for unknown variables in the end.
12548      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12549
12550      # Check if the provided tool contains a complete path.
12551      tool_specified="$SED"
12552      tool_basename="${tool_specified##*/}"
12553      if test "x$tool_basename" = "x$tool_specified"; then
12554        # A command without a complete path is provided, search $PATH.
12555        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12556$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12557        # Extract the first word of "$tool_basename", so it can be a program name with args.
12558set dummy $tool_basename; ac_word=$2
12559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12560$as_echo_n "checking for $ac_word... " >&6; }
12561if ${ac_cv_path_SED+:} false; then :
12562  $as_echo_n "(cached) " >&6
12563else
12564  case $SED in
12565  [\\/]* | ?:[\\/]*)
12566  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12567  ;;
12568  *)
12569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12570for as_dir in $PATH
12571do
12572  IFS=$as_save_IFS
12573  test -z "$as_dir" && as_dir=.
12574    for ac_exec_ext in '' $ac_executable_extensions; do
12575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12576    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12578    break 2
12579  fi
12580done
12581  done
12582IFS=$as_save_IFS
12583
12584  ;;
12585esac
12586fi
12587SED=$ac_cv_path_SED
12588if test -n "$SED"; then
12589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12590$as_echo "$SED" >&6; }
12591else
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12593$as_echo "no" >&6; }
12594fi
12595
12596
12597        if test "x$SED" = x; then
12598          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12599        fi
12600      else
12601        # Otherwise we believe it is a complete path. Use it as it is.
12602        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12603$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12605$as_echo_n "checking for SED... " >&6; }
12606        if test ! -x "$tool_specified"; then
12607          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12608$as_echo "not found" >&6; }
12609          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12610        fi
12611        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12612$as_echo "$tool_specified" >&6; }
12613      fi
12614    fi
12615  fi
12616
12617
12618  if test "x$SED" = x; then
12619    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12620  fi
12621
12622
12623
12624  # Always force rm.
12625  RM="$RM -f"
12626
12627  # pwd behaves differently on various platforms and some don't support the -L flag.
12628  # Always use the bash builtin pwd to get uniform behavior.
12629  THEPWDCMD=pwd
12630
12631  # These are not required on all platforms
12632
12633
12634  # Publish this variable in the help.
12635
12636
12637  if test "x$CYGPATH" = x; then
12638    # The variable is not set by user, try to locate tool using the code snippet
12639    for ac_prog in cygpath
12640do
12641  # Extract the first word of "$ac_prog", so it can be a program name with args.
12642set dummy $ac_prog; ac_word=$2
12643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12644$as_echo_n "checking for $ac_word... " >&6; }
12645if ${ac_cv_path_CYGPATH+:} false; then :
12646  $as_echo_n "(cached) " >&6
12647else
12648  case $CYGPATH in
12649  [\\/]* | ?:[\\/]*)
12650  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12651  ;;
12652  *)
12653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12654for as_dir in $PATH
12655do
12656  IFS=$as_save_IFS
12657  test -z "$as_dir" && as_dir=.
12658    for ac_exec_ext in '' $ac_executable_extensions; do
12659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12660    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12662    break 2
12663  fi
12664done
12665  done
12666IFS=$as_save_IFS
12667
12668  ;;
12669esac
12670fi
12671CYGPATH=$ac_cv_path_CYGPATH
12672if test -n "$CYGPATH"; then
12673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12674$as_echo "$CYGPATH" >&6; }
12675else
12676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12677$as_echo "no" >&6; }
12678fi
12679
12680
12681  test -n "$CYGPATH" && break
12682done
12683
12684  else
12685    # The variable is set, but is it from the command line or the environment?
12686
12687    # Try to remove the string !CYGPATH! from our list.
12688    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12689    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12690      # If it failed, the variable was not from the command line. Ignore it,
12691      # but warn the user (except for BASH, which is always set by the calling BASH).
12692      if test "xCYGPATH" != xBASH; then
12693        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12694$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12695      fi
12696      # Try to locate tool using the code snippet
12697      for ac_prog in cygpath
12698do
12699  # Extract the first word of "$ac_prog", so it can be a program name with args.
12700set dummy $ac_prog; ac_word=$2
12701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12702$as_echo_n "checking for $ac_word... " >&6; }
12703if ${ac_cv_path_CYGPATH+:} false; then :
12704  $as_echo_n "(cached) " >&6
12705else
12706  case $CYGPATH in
12707  [\\/]* | ?:[\\/]*)
12708  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12709  ;;
12710  *)
12711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12712for as_dir in $PATH
12713do
12714  IFS=$as_save_IFS
12715  test -z "$as_dir" && as_dir=.
12716    for ac_exec_ext in '' $ac_executable_extensions; do
12717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12718    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12720    break 2
12721  fi
12722done
12723  done
12724IFS=$as_save_IFS
12725
12726  ;;
12727esac
12728fi
12729CYGPATH=$ac_cv_path_CYGPATH
12730if test -n "$CYGPATH"; then
12731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12732$as_echo "$CYGPATH" >&6; }
12733else
12734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12735$as_echo "no" >&6; }
12736fi
12737
12738
12739  test -n "$CYGPATH" && break
12740done
12741
12742    else
12743      # If it succeeded, then it was overridden by the user. We will use it
12744      # for the tool.
12745
12746      # First remove it from the list of overridden variables, so we can test
12747      # for unknown variables in the end.
12748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12749
12750      # Check if the provided tool contains a complete path.
12751      tool_specified="$CYGPATH"
12752      tool_basename="${tool_specified##*/}"
12753      if test "x$tool_basename" = "x$tool_specified"; then
12754        # A command without a complete path is provided, search $PATH.
12755        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12756$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12757        # Extract the first word of "$tool_basename", so it can be a program name with args.
12758set dummy $tool_basename; ac_word=$2
12759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12760$as_echo_n "checking for $ac_word... " >&6; }
12761if ${ac_cv_path_CYGPATH+:} false; then :
12762  $as_echo_n "(cached) " >&6
12763else
12764  case $CYGPATH in
12765  [\\/]* | ?:[\\/]*)
12766  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12767  ;;
12768  *)
12769  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12770for as_dir in $PATH
12771do
12772  IFS=$as_save_IFS
12773  test -z "$as_dir" && as_dir=.
12774    for ac_exec_ext in '' $ac_executable_extensions; do
12775  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12776    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12777    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12778    break 2
12779  fi
12780done
12781  done
12782IFS=$as_save_IFS
12783
12784  ;;
12785esac
12786fi
12787CYGPATH=$ac_cv_path_CYGPATH
12788if test -n "$CYGPATH"; then
12789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12790$as_echo "$CYGPATH" >&6; }
12791else
12792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12793$as_echo "no" >&6; }
12794fi
12795
12796
12797        if test "x$CYGPATH" = x; then
12798          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12799        fi
12800      else
12801        # Otherwise we believe it is a complete path. Use it as it is.
12802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12803$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12804        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12805$as_echo_n "checking for CYGPATH... " >&6; }
12806        if test ! -x "$tool_specified"; then
12807          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12808$as_echo "not found" >&6; }
12809          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12810        fi
12811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12812$as_echo "$tool_specified" >&6; }
12813      fi
12814    fi
12815  fi
12816
12817
12818
12819
12820  # Publish this variable in the help.
12821
12822
12823  if test "x$READLINK" = x; then
12824    # The variable is not set by user, try to locate tool using the code snippet
12825    for ac_prog in greadlink readlink
12826do
12827  # Extract the first word of "$ac_prog", so it can be a program name with args.
12828set dummy $ac_prog; ac_word=$2
12829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12830$as_echo_n "checking for $ac_word... " >&6; }
12831if ${ac_cv_path_READLINK+:} false; then :
12832  $as_echo_n "(cached) " >&6
12833else
12834  case $READLINK in
12835  [\\/]* | ?:[\\/]*)
12836  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12837  ;;
12838  *)
12839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12840for as_dir in $PATH
12841do
12842  IFS=$as_save_IFS
12843  test -z "$as_dir" && as_dir=.
12844    for ac_exec_ext in '' $ac_executable_extensions; do
12845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12846    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12848    break 2
12849  fi
12850done
12851  done
12852IFS=$as_save_IFS
12853
12854  ;;
12855esac
12856fi
12857READLINK=$ac_cv_path_READLINK
12858if test -n "$READLINK"; then
12859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12860$as_echo "$READLINK" >&6; }
12861else
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12863$as_echo "no" >&6; }
12864fi
12865
12866
12867  test -n "$READLINK" && break
12868done
12869
12870  else
12871    # The variable is set, but is it from the command line or the environment?
12872
12873    # Try to remove the string !READLINK! from our list.
12874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12876      # If it failed, the variable was not from the command line. Ignore it,
12877      # but warn the user (except for BASH, which is always set by the calling BASH).
12878      if test "xREADLINK" != xBASH; then
12879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12880$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12881      fi
12882      # Try to locate tool using the code snippet
12883      for ac_prog in greadlink readlink
12884do
12885  # Extract the first word of "$ac_prog", so it can be a program name with args.
12886set dummy $ac_prog; ac_word=$2
12887{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12888$as_echo_n "checking for $ac_word... " >&6; }
12889if ${ac_cv_path_READLINK+:} false; then :
12890  $as_echo_n "(cached) " >&6
12891else
12892  case $READLINK in
12893  [\\/]* | ?:[\\/]*)
12894  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12895  ;;
12896  *)
12897  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12898for as_dir in $PATH
12899do
12900  IFS=$as_save_IFS
12901  test -z "$as_dir" && as_dir=.
12902    for ac_exec_ext in '' $ac_executable_extensions; do
12903  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12904    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12905    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12906    break 2
12907  fi
12908done
12909  done
12910IFS=$as_save_IFS
12911
12912  ;;
12913esac
12914fi
12915READLINK=$ac_cv_path_READLINK
12916if test -n "$READLINK"; then
12917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12918$as_echo "$READLINK" >&6; }
12919else
12920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12921$as_echo "no" >&6; }
12922fi
12923
12924
12925  test -n "$READLINK" && break
12926done
12927
12928    else
12929      # If it succeeded, then it was overridden by the user. We will use it
12930      # for the tool.
12931
12932      # First remove it from the list of overridden variables, so we can test
12933      # for unknown variables in the end.
12934      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12935
12936      # Check if the provided tool contains a complete path.
12937      tool_specified="$READLINK"
12938      tool_basename="${tool_specified##*/}"
12939      if test "x$tool_basename" = "x$tool_specified"; then
12940        # A command without a complete path is provided, search $PATH.
12941        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12942$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12943        # Extract the first word of "$tool_basename", so it can be a program name with args.
12944set dummy $tool_basename; ac_word=$2
12945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12946$as_echo_n "checking for $ac_word... " >&6; }
12947if ${ac_cv_path_READLINK+:} false; then :
12948  $as_echo_n "(cached) " >&6
12949else
12950  case $READLINK in
12951  [\\/]* | ?:[\\/]*)
12952  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12953  ;;
12954  *)
12955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12956for as_dir in $PATH
12957do
12958  IFS=$as_save_IFS
12959  test -z "$as_dir" && as_dir=.
12960    for ac_exec_ext in '' $ac_executable_extensions; do
12961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12962    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12964    break 2
12965  fi
12966done
12967  done
12968IFS=$as_save_IFS
12969
12970  ;;
12971esac
12972fi
12973READLINK=$ac_cv_path_READLINK
12974if test -n "$READLINK"; then
12975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12976$as_echo "$READLINK" >&6; }
12977else
12978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12979$as_echo "no" >&6; }
12980fi
12981
12982
12983        if test "x$READLINK" = x; then
12984          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12985        fi
12986      else
12987        # Otherwise we believe it is a complete path. Use it as it is.
12988        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12989$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12991$as_echo_n "checking for READLINK... " >&6; }
12992        if test ! -x "$tool_specified"; then
12993          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12994$as_echo "not found" >&6; }
12995          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12996        fi
12997        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12998$as_echo "$tool_specified" >&6; }
12999      fi
13000    fi
13001  fi
13002
13003
13004
13005
13006  # Publish this variable in the help.
13007
13008
13009  if test "x$DF" = x; then
13010    # The variable is not set by user, try to locate tool using the code snippet
13011    for ac_prog in df
13012do
13013  # Extract the first word of "$ac_prog", so it can be a program name with args.
13014set dummy $ac_prog; ac_word=$2
13015{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13016$as_echo_n "checking for $ac_word... " >&6; }
13017if ${ac_cv_path_DF+:} false; then :
13018  $as_echo_n "(cached) " >&6
13019else
13020  case $DF in
13021  [\\/]* | ?:[\\/]*)
13022  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13023  ;;
13024  *)
13025  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13026for as_dir in $PATH
13027do
13028  IFS=$as_save_IFS
13029  test -z "$as_dir" && as_dir=.
13030    for ac_exec_ext in '' $ac_executable_extensions; do
13031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13032    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13034    break 2
13035  fi
13036done
13037  done
13038IFS=$as_save_IFS
13039
13040  ;;
13041esac
13042fi
13043DF=$ac_cv_path_DF
13044if test -n "$DF"; then
13045  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13046$as_echo "$DF" >&6; }
13047else
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13049$as_echo "no" >&6; }
13050fi
13051
13052
13053  test -n "$DF" && break
13054done
13055
13056  else
13057    # The variable is set, but is it from the command line or the environment?
13058
13059    # Try to remove the string !DF! from our list.
13060    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13061    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13062      # If it failed, the variable was not from the command line. Ignore it,
13063      # but warn the user (except for BASH, which is always set by the calling BASH).
13064      if test "xDF" != xBASH; then
13065        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13066$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13067      fi
13068      # Try to locate tool using the code snippet
13069      for ac_prog in df
13070do
13071  # Extract the first word of "$ac_prog", so it can be a program name with args.
13072set dummy $ac_prog; ac_word=$2
13073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13074$as_echo_n "checking for $ac_word... " >&6; }
13075if ${ac_cv_path_DF+:} false; then :
13076  $as_echo_n "(cached) " >&6
13077else
13078  case $DF in
13079  [\\/]* | ?:[\\/]*)
13080  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13081  ;;
13082  *)
13083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13084for as_dir in $PATH
13085do
13086  IFS=$as_save_IFS
13087  test -z "$as_dir" && as_dir=.
13088    for ac_exec_ext in '' $ac_executable_extensions; do
13089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13090    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13092    break 2
13093  fi
13094done
13095  done
13096IFS=$as_save_IFS
13097
13098  ;;
13099esac
13100fi
13101DF=$ac_cv_path_DF
13102if test -n "$DF"; then
13103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13104$as_echo "$DF" >&6; }
13105else
13106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13107$as_echo "no" >&6; }
13108fi
13109
13110
13111  test -n "$DF" && break
13112done
13113
13114    else
13115      # If it succeeded, then it was overridden by the user. We will use it
13116      # for the tool.
13117
13118      # First remove it from the list of overridden variables, so we can test
13119      # for unknown variables in the end.
13120      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13121
13122      # Check if the provided tool contains a complete path.
13123      tool_specified="$DF"
13124      tool_basename="${tool_specified##*/}"
13125      if test "x$tool_basename" = "x$tool_specified"; then
13126        # A command without a complete path is provided, search $PATH.
13127        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13128$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13129        # Extract the first word of "$tool_basename", so it can be a program name with args.
13130set dummy $tool_basename; ac_word=$2
13131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13132$as_echo_n "checking for $ac_word... " >&6; }
13133if ${ac_cv_path_DF+:} false; then :
13134  $as_echo_n "(cached) " >&6
13135else
13136  case $DF in
13137  [\\/]* | ?:[\\/]*)
13138  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13139  ;;
13140  *)
13141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13142for as_dir in $PATH
13143do
13144  IFS=$as_save_IFS
13145  test -z "$as_dir" && as_dir=.
13146    for ac_exec_ext in '' $ac_executable_extensions; do
13147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13148    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13150    break 2
13151  fi
13152done
13153  done
13154IFS=$as_save_IFS
13155
13156  ;;
13157esac
13158fi
13159DF=$ac_cv_path_DF
13160if test -n "$DF"; then
13161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13162$as_echo "$DF" >&6; }
13163else
13164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13165$as_echo "no" >&6; }
13166fi
13167
13168
13169        if test "x$DF" = x; then
13170          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13171        fi
13172      else
13173        # Otherwise we believe it is a complete path. Use it as it is.
13174        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13175$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13177$as_echo_n "checking for DF... " >&6; }
13178        if test ! -x "$tool_specified"; then
13179          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13180$as_echo "not found" >&6; }
13181          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13182        fi
13183        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13184$as_echo "$tool_specified" >&6; }
13185      fi
13186    fi
13187  fi
13188
13189
13190
13191
13192  # Publish this variable in the help.
13193
13194
13195  if test "x$SETFILE" = x; then
13196    # The variable is not set by user, try to locate tool using the code snippet
13197    for ac_prog in SetFile
13198do
13199  # Extract the first word of "$ac_prog", so it can be a program name with args.
13200set dummy $ac_prog; ac_word=$2
13201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13202$as_echo_n "checking for $ac_word... " >&6; }
13203if ${ac_cv_path_SETFILE+:} false; then :
13204  $as_echo_n "(cached) " >&6
13205else
13206  case $SETFILE in
13207  [\\/]* | ?:[\\/]*)
13208  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13209  ;;
13210  *)
13211  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13212for as_dir in $PATH
13213do
13214  IFS=$as_save_IFS
13215  test -z "$as_dir" && as_dir=.
13216    for ac_exec_ext in '' $ac_executable_extensions; do
13217  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13218    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13219    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13220    break 2
13221  fi
13222done
13223  done
13224IFS=$as_save_IFS
13225
13226  ;;
13227esac
13228fi
13229SETFILE=$ac_cv_path_SETFILE
13230if test -n "$SETFILE"; then
13231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13232$as_echo "$SETFILE" >&6; }
13233else
13234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13235$as_echo "no" >&6; }
13236fi
13237
13238
13239  test -n "$SETFILE" && break
13240done
13241
13242  else
13243    # The variable is set, but is it from the command line or the environment?
13244
13245    # Try to remove the string !SETFILE! from our list.
13246    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13247    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13248      # If it failed, the variable was not from the command line. Ignore it,
13249      # but warn the user (except for BASH, which is always set by the calling BASH).
13250      if test "xSETFILE" != xBASH; then
13251        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13252$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13253      fi
13254      # Try to locate tool using the code snippet
13255      for ac_prog in SetFile
13256do
13257  # Extract the first word of "$ac_prog", so it can be a program name with args.
13258set dummy $ac_prog; ac_word=$2
13259{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13260$as_echo_n "checking for $ac_word... " >&6; }
13261if ${ac_cv_path_SETFILE+:} false; then :
13262  $as_echo_n "(cached) " >&6
13263else
13264  case $SETFILE in
13265  [\\/]* | ?:[\\/]*)
13266  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13267  ;;
13268  *)
13269  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13270for as_dir in $PATH
13271do
13272  IFS=$as_save_IFS
13273  test -z "$as_dir" && as_dir=.
13274    for ac_exec_ext in '' $ac_executable_extensions; do
13275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13276    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13277    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13278    break 2
13279  fi
13280done
13281  done
13282IFS=$as_save_IFS
13283
13284  ;;
13285esac
13286fi
13287SETFILE=$ac_cv_path_SETFILE
13288if test -n "$SETFILE"; then
13289  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13290$as_echo "$SETFILE" >&6; }
13291else
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13293$as_echo "no" >&6; }
13294fi
13295
13296
13297  test -n "$SETFILE" && break
13298done
13299
13300    else
13301      # If it succeeded, then it was overridden by the user. We will use it
13302      # for the tool.
13303
13304      # First remove it from the list of overridden variables, so we can test
13305      # for unknown variables in the end.
13306      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13307
13308      # Check if the provided tool contains a complete path.
13309      tool_specified="$SETFILE"
13310      tool_basename="${tool_specified##*/}"
13311      if test "x$tool_basename" = "x$tool_specified"; then
13312        # A command without a complete path is provided, search $PATH.
13313        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13314$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13315        # Extract the first word of "$tool_basename", so it can be a program name with args.
13316set dummy $tool_basename; ac_word=$2
13317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13318$as_echo_n "checking for $ac_word... " >&6; }
13319if ${ac_cv_path_SETFILE+:} false; then :
13320  $as_echo_n "(cached) " >&6
13321else
13322  case $SETFILE in
13323  [\\/]* | ?:[\\/]*)
13324  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13325  ;;
13326  *)
13327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13328for as_dir in $PATH
13329do
13330  IFS=$as_save_IFS
13331  test -z "$as_dir" && as_dir=.
13332    for ac_exec_ext in '' $ac_executable_extensions; do
13333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13334    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13336    break 2
13337  fi
13338done
13339  done
13340IFS=$as_save_IFS
13341
13342  ;;
13343esac
13344fi
13345SETFILE=$ac_cv_path_SETFILE
13346if test -n "$SETFILE"; then
13347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13348$as_echo "$SETFILE" >&6; }
13349else
13350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13351$as_echo "no" >&6; }
13352fi
13353
13354
13355        if test "x$SETFILE" = x; then
13356          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13357        fi
13358      else
13359        # Otherwise we believe it is a complete path. Use it as it is.
13360        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13361$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13362        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13363$as_echo_n "checking for SETFILE... " >&6; }
13364        if test ! -x "$tool_specified"; then
13365          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13366$as_echo "not found" >&6; }
13367          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13368        fi
13369        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13370$as_echo "$tool_specified" >&6; }
13371      fi
13372    fi
13373  fi
13374
13375
13376
13377
13378# Now we can determine OpenJDK build and target platforms. This is required to
13379# have early on.
13380# Make sure we can run config.sub.
13381$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13382  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13383
13384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13385$as_echo_n "checking build system type... " >&6; }
13386if ${ac_cv_build+:} false; then :
13387  $as_echo_n "(cached) " >&6
13388else
13389  ac_build_alias=$build_alias
13390test "x$ac_build_alias" = x &&
13391  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13392test "x$ac_build_alias" = x &&
13393  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13394ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13395  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13396
13397fi
13398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13399$as_echo "$ac_cv_build" >&6; }
13400case $ac_cv_build in
13401*-*-*) ;;
13402*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13403esac
13404build=$ac_cv_build
13405ac_save_IFS=$IFS; IFS='-'
13406set x $ac_cv_build
13407shift
13408build_cpu=$1
13409build_vendor=$2
13410shift; shift
13411# Remember, the first character of IFS is used to create $*,
13412# except with old shells:
13413build_os=$*
13414IFS=$ac_save_IFS
13415case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13416
13417
13418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13419$as_echo_n "checking host system type... " >&6; }
13420if ${ac_cv_host+:} false; then :
13421  $as_echo_n "(cached) " >&6
13422else
13423  if test "x$host_alias" = x; then
13424  ac_cv_host=$ac_cv_build
13425else
13426  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13427    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13428fi
13429
13430fi
13431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13432$as_echo "$ac_cv_host" >&6; }
13433case $ac_cv_host in
13434*-*-*) ;;
13435*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13436esac
13437host=$ac_cv_host
13438ac_save_IFS=$IFS; IFS='-'
13439set x $ac_cv_host
13440shift
13441host_cpu=$1
13442host_vendor=$2
13443shift; shift
13444# Remember, the first character of IFS is used to create $*,
13445# except with old shells:
13446host_os=$*
13447IFS=$ac_save_IFS
13448case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13449
13450
13451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13452$as_echo_n "checking target system type... " >&6; }
13453if ${ac_cv_target+:} false; then :
13454  $as_echo_n "(cached) " >&6
13455else
13456  if test "x$target_alias" = x; then
13457  ac_cv_target=$ac_cv_host
13458else
13459  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13460    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13461fi
13462
13463fi
13464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13465$as_echo "$ac_cv_target" >&6; }
13466case $ac_cv_target in
13467*-*-*) ;;
13468*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13469esac
13470target=$ac_cv_target
13471ac_save_IFS=$IFS; IFS='-'
13472set x $ac_cv_target
13473shift
13474target_cpu=$1
13475target_vendor=$2
13476shift; shift
13477# Remember, the first character of IFS is used to create $*,
13478# except with old shells:
13479target_os=$*
13480IFS=$ac_save_IFS
13481case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13482
13483
13484# The aliases save the names the user supplied, while $host etc.
13485# will get canonicalized.
13486test -n "$target_alias" &&
13487  test "$program_prefix$program_suffix$program_transform_name" = \
13488    NONENONEs,x,x, &&
13489  program_prefix=${target_alias}-
13490
13491  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13492  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13493  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13494  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13495  # to use the configure naming style.
13496
13497
13498
13499
13500
13501  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13502  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13503  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13504  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13505  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13506  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13507
13508
13509
13510  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13511
13512  case "$build_os" in
13513    *linux*)
13514      VAR_OS=linux
13515      VAR_OS_API=posix
13516      VAR_OS_ENV=linux
13517      ;;
13518    *solaris*)
13519      VAR_OS=solaris
13520      VAR_OS_API=posix
13521      VAR_OS_ENV=solaris
13522      ;;
13523    *darwin*)
13524      VAR_OS=macosx
13525      VAR_OS_API=posix
13526      VAR_OS_ENV=macosx
13527      ;;
13528    *bsd*)
13529      VAR_OS=bsd
13530      VAR_OS_API=posix
13531      VAR_OS_ENV=bsd
13532      ;;
13533    *cygwin*)
13534      VAR_OS=windows
13535      VAR_OS_API=winapi
13536      VAR_OS_ENV=windows.cygwin
13537      ;;
13538    *mingw*)
13539      VAR_OS=windows
13540      VAR_OS_API=winapi
13541      VAR_OS_ENV=windows.msys
13542      ;;
13543    *aix*)
13544      VAR_OS=aix
13545      VAR_OS_API=posix
13546      VAR_OS_ENV=aix
13547      ;;
13548    *)
13549      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13550      ;;
13551  esac
13552
13553
13554  # First argument is the cpu name from the trip/quad
13555  case "$build_cpu" in
13556    x86_64)
13557      VAR_CPU=x86_64
13558      VAR_CPU_ARCH=x86
13559      VAR_CPU_BITS=64
13560      VAR_CPU_ENDIAN=little
13561      ;;
13562    i?86)
13563      VAR_CPU=x86
13564      VAR_CPU_ARCH=x86
13565      VAR_CPU_BITS=32
13566      VAR_CPU_ENDIAN=little
13567      ;;
13568    arm*)
13569      VAR_CPU=arm
13570      VAR_CPU_ARCH=arm
13571      VAR_CPU_BITS=32
13572      VAR_CPU_ENDIAN=little
13573      ;;
13574    powerpc)
13575      VAR_CPU=ppc
13576      VAR_CPU_ARCH=ppc
13577      VAR_CPU_BITS=32
13578      VAR_CPU_ENDIAN=big
13579      ;;
13580    powerpc64)
13581      VAR_CPU=ppc64
13582      VAR_CPU_ARCH=ppc
13583      VAR_CPU_BITS=64
13584      VAR_CPU_ENDIAN=big
13585      ;;
13586    powerpc64le)
13587      VAR_CPU=ppc64
13588      VAR_CPU_ARCH=ppc
13589      VAR_CPU_BITS=64
13590      VAR_CPU_ENDIAN=little
13591      ;;
13592    s390)
13593      VAR_CPU=s390
13594      VAR_CPU_ARCH=s390
13595      VAR_CPU_BITS=32
13596      VAR_CPU_ENDIAN=big
13597      ;;
13598    s390x)
13599      VAR_CPU=s390x
13600      VAR_CPU_ARCH=s390
13601      VAR_CPU_BITS=64
13602      VAR_CPU_ENDIAN=big
13603      ;;
13604    sparc)
13605      VAR_CPU=sparc
13606      VAR_CPU_ARCH=sparc
13607      VAR_CPU_BITS=32
13608      VAR_CPU_ENDIAN=big
13609      ;;
13610    sparcv9)
13611      VAR_CPU=sparcv9
13612      VAR_CPU_ARCH=sparc
13613      VAR_CPU_BITS=64
13614      VAR_CPU_ENDIAN=big
13615      ;;
13616    *)
13617      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13618      ;;
13619  esac
13620
13621  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13622  OPENJDK_BUILD_OS="$VAR_OS"
13623  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13624  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13625  OPENJDK_BUILD_CPU="$VAR_CPU"
13626  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13627  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13628  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13629
13630
13631
13632
13633
13634
13635
13636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13637$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13639$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13640
13641  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13642
13643  case "$host_os" in
13644    *linux*)
13645      VAR_OS=linux
13646      VAR_OS_API=posix
13647      VAR_OS_ENV=linux
13648      ;;
13649    *solaris*)
13650      VAR_OS=solaris
13651      VAR_OS_API=posix
13652      VAR_OS_ENV=solaris
13653      ;;
13654    *darwin*)
13655      VAR_OS=macosx
13656      VAR_OS_API=posix
13657      VAR_OS_ENV=macosx
13658      ;;
13659    *bsd*)
13660      VAR_OS=bsd
13661      VAR_OS_API=posix
13662      VAR_OS_ENV=bsd
13663      ;;
13664    *cygwin*)
13665      VAR_OS=windows
13666      VAR_OS_API=winapi
13667      VAR_OS_ENV=windows.cygwin
13668      ;;
13669    *mingw*)
13670      VAR_OS=windows
13671      VAR_OS_API=winapi
13672      VAR_OS_ENV=windows.msys
13673      ;;
13674    *aix*)
13675      VAR_OS=aix
13676      VAR_OS_API=posix
13677      VAR_OS_ENV=aix
13678      ;;
13679    *)
13680      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13681      ;;
13682  esac
13683
13684
13685  # First argument is the cpu name from the trip/quad
13686  case "$host_cpu" in
13687    x86_64)
13688      VAR_CPU=x86_64
13689      VAR_CPU_ARCH=x86
13690      VAR_CPU_BITS=64
13691      VAR_CPU_ENDIAN=little
13692      ;;
13693    i?86)
13694      VAR_CPU=x86
13695      VAR_CPU_ARCH=x86
13696      VAR_CPU_BITS=32
13697      VAR_CPU_ENDIAN=little
13698      ;;
13699    arm*)
13700      VAR_CPU=arm
13701      VAR_CPU_ARCH=arm
13702      VAR_CPU_BITS=32
13703      VAR_CPU_ENDIAN=little
13704      ;;
13705    powerpc)
13706      VAR_CPU=ppc
13707      VAR_CPU_ARCH=ppc
13708      VAR_CPU_BITS=32
13709      VAR_CPU_ENDIAN=big
13710      ;;
13711    powerpc64)
13712      VAR_CPU=ppc64
13713      VAR_CPU_ARCH=ppc
13714      VAR_CPU_BITS=64
13715      VAR_CPU_ENDIAN=big
13716      ;;
13717    powerpc64le)
13718      VAR_CPU=ppc64
13719      VAR_CPU_ARCH=ppc
13720      VAR_CPU_BITS=64
13721      VAR_CPU_ENDIAN=little
13722      ;;
13723    s390)
13724      VAR_CPU=s390
13725      VAR_CPU_ARCH=s390
13726      VAR_CPU_BITS=32
13727      VAR_CPU_ENDIAN=big
13728      ;;
13729    s390x)
13730      VAR_CPU=s390x
13731      VAR_CPU_ARCH=s390
13732      VAR_CPU_BITS=64
13733      VAR_CPU_ENDIAN=big
13734      ;;
13735    sparc)
13736      VAR_CPU=sparc
13737      VAR_CPU_ARCH=sparc
13738      VAR_CPU_BITS=32
13739      VAR_CPU_ENDIAN=big
13740      ;;
13741    sparcv9)
13742      VAR_CPU=sparcv9
13743      VAR_CPU_ARCH=sparc
13744      VAR_CPU_BITS=64
13745      VAR_CPU_ENDIAN=big
13746      ;;
13747    *)
13748      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13749      ;;
13750  esac
13751
13752  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13753  OPENJDK_TARGET_OS="$VAR_OS"
13754  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13755  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13756  OPENJDK_TARGET_CPU="$VAR_CPU"
13757  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13758  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13759  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13760
13761
13762
13763
13764
13765
13766
13767  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13768$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13770$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13771
13772
13773
13774# Check whether --with-target-bits was given.
13775if test "${with_target_bits+set}" = set; then :
13776  withval=$with_target_bits;
13777fi
13778
13779
13780  # We have three types of compiles:
13781  # native  == normal compilation, target system == build system
13782  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13783  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13784  #
13785  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13786    # We're doing a proper cross-compilation
13787    COMPILE_TYPE="cross"
13788  else
13789    COMPILE_TYPE="native"
13790  fi
13791
13792  if test "x$with_target_bits" != x; then
13793    if test "x$COMPILE_TYPE" = "xcross"; then
13794      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13795    fi
13796
13797    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13798      # A reduced build is requested
13799      COMPILE_TYPE="reduced"
13800      OPENJDK_TARGET_CPU_BITS=32
13801      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13802        OPENJDK_TARGET_CPU=x86
13803      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13804        OPENJDK_TARGET_CPU=sparc
13805      else
13806        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13807      fi
13808    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13809      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
13810    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13811      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13812$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13813    else
13814      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13815    fi
13816  fi
13817
13818
13819  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13820$as_echo_n "checking compilation type... " >&6; }
13821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13822$as_echo "$COMPILE_TYPE" >&6; }
13823
13824
13825  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13826    REQUIRED_OS_NAME=SunOS
13827    REQUIRED_OS_VERSION=5.10
13828  fi
13829  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13830    REQUIRED_OS_NAME=Linux
13831    REQUIRED_OS_VERSION=2.6
13832  fi
13833  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13834    REQUIRED_OS_NAME=Windows
13835    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13836      REQUIRED_OS_VERSION=5.2
13837    else
13838      REQUIRED_OS_VERSION=5.1
13839    fi
13840  fi
13841  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13842    REQUIRED_OS_NAME=Darwin
13843    REQUIRED_OS_VERSION=11.2
13844  fi
13845
13846
13847
13848
13849
13850  # Also store the legacy naming of the cpu.
13851  # Ie i586 and amd64 instead of x86 and x86_64
13852  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13853  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13854    OPENJDK_TARGET_CPU_LEGACY="i586"
13855  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13856    # On all platforms except MacOSX replace x86_64 with amd64.
13857    OPENJDK_TARGET_CPU_LEGACY="amd64"
13858  fi
13859
13860
13861  # And the second legacy naming of the cpu.
13862  # Ie i386 and amd64 instead of x86 and x86_64.
13863  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13864  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13865    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13866  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13867    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13868  fi
13869
13870
13871  # This is the name of the cpu (but using i386 and amd64 instead of
13872  # x86 and x86_64, respectively), preceeded by a /, to be used when
13873  # locating libraries. On macosx, it's empty, though.
13874  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13875  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13876    OPENJDK_TARGET_CPU_LIBDIR=""
13877  fi
13878
13879
13880  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13881  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13882  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13883  OPENJDK_TARGET_CPU_ISADIR=""
13884  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13885    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13886      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13887    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13888      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13889    fi
13890  fi
13891
13892
13893  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13894  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13895  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13896    # On linux only, we replace x86 with i386.
13897    OPENJDK_TARGET_CPU_OSARCH="i386"
13898  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13899    # On all platforms except macosx, we replace x86_64 with amd64.
13900    OPENJDK_TARGET_CPU_OSARCH="amd64"
13901  fi
13902
13903
13904  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13905  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13906    OPENJDK_TARGET_CPU_JLI="i386"
13907  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13908    # On all platforms except macosx, we replace x86_64 with amd64.
13909    OPENJDK_TARGET_CPU_JLI="amd64"
13910  fi
13911  # Now setup the -D flags for building libjli.
13912  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13913  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13914    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13915      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13916    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13917      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13918    fi
13919  fi
13920
13921
13922  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13923  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13924    OPENJDK_TARGET_OS_API_DIR="solaris"
13925  fi
13926  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13927    OPENJDK_TARGET_OS_API_DIR="windows"
13928  fi
13929
13930
13931  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13932      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13933  else
13934      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13935  fi
13936
13937
13938  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13939    A_LP64="LP64:="
13940    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13941    # unpack200.exe
13942    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13943      ADD_LP64="-D_LP64=1"
13944    fi
13945  fi
13946  LP64=$A_LP64
13947
13948
13949  if test "x$COMPILE_TYPE" = "xcross"; then
13950    # FIXME: ... or should this include reduced builds..?
13951    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13952  else
13953    DEFINE_CROSS_COMPILE_ARCH=""
13954  fi
13955
13956
13957  # ZERO_ARCHDEF is used to enable architecture-specific code
13958  case "${OPENJDK_TARGET_CPU}" in
13959    ppc*)    ZERO_ARCHDEF=PPC   ;;
13960    s390*)   ZERO_ARCHDEF=S390  ;;
13961    sparc*)  ZERO_ARCHDEF=SPARC ;;
13962    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13963    x86)     ZERO_ARCHDEF=IA32  ;;
13964    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13965  esac
13966
13967
13968
13969
13970# Continue setting up basic stuff. Most remaining code require fundamental tools.
13971
13972  # Save the current directory this script was started from
13973  CURDIR="$PWD"
13974
13975  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13976    PATH_SEP=";"
13977
13978  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13979  if test $SRC_ROOT_LENGTH -gt 100; then
13980    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13981  fi
13982
13983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13984    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13985$as_echo_n "checking cygwin release... " >&6; }
13986    CYGWIN_VERSION=`$UNAME -r`
13987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13988$as_echo "$CYGWIN_VERSION" >&6; }
13989    WINDOWS_ENV_VENDOR='cygwin'
13990    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13991
13992    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13993    if test "x$CYGWIN_VERSION_OK" = x; then
13994      { $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
13995$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;}
13996      as_fn_error $? "Cannot continue" "$LINENO" 5
13997    fi
13998    if test "x$CYGPATH" = x; then
13999      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14000    fi
14001    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14002$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14003    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14004    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14005    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14006    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14007    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14008$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14009    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14010    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14011    if test "x$test_cygdrive_prefix" = x; then
14012      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14013    fi
14014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14015    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14016$as_echo_n "checking msys release... " >&6; }
14017    MSYS_VERSION=`$UNAME -r`
14018    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14019$as_echo "$MSYS_VERSION" >&6; }
14020
14021    WINDOWS_ENV_VENDOR='msys'
14022    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14023
14024    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14025$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14026    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14027    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14028
14029  windows_path="$MSYS_ROOT_PATH"
14030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14031    unix_path=`$CYGPATH -u "$windows_path"`
14032    MSYS_ROOT_PATH="$unix_path"
14033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14035    MSYS_ROOT_PATH="$unix_path"
14036  fi
14037
14038    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14039$as_echo "$MSYS_ROOT_PATH" >&6; }
14040    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14041  else
14042    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14043  fi
14044
14045  # Test if windows or unix (cygwin/msys) find is first in path.
14046  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14047$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14048  FIND_BINARY_OUTPUT=`find --version 2>&1`
14049  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14050    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14051$as_echo "unix style" >&6; }
14052  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14054$as_echo "Windows" >&6; }
14055    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14056$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14057    { $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
14058$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14059    as_fn_error $? "Cannot continue" "$LINENO" 5
14060  else
14061    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14062$as_echo "unknown" >&6; }
14063    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14064$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14065  fi
14066
14067  else
14068    PATH_SEP=":"
14069  fi
14070
14071
14072  # We get the top-level directory from the supporting wrappers.
14073  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14074$as_echo_n "checking for top-level directory... " >&6; }
14075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14076$as_echo "$TOPDIR" >&6; }
14077
14078
14079  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14080
14081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14082
14083  # Input might be given as Windows format, start by converting to
14084  # unix format.
14085  path="$CURDIR"
14086  new_path=`$CYGPATH -u "$path"`
14087
14088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14091  # "foo.exe" is OK but "foo" is an error.
14092  #
14093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14094  # It is also a way to make sure we got the proper file name for the real test later on.
14095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14096  if test "x$test_shortpath" = x; then
14097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14098$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14099    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14100  fi
14101
14102  # Call helper function which possibly converts this using DOS-style short mode.
14103  # If so, the updated path is stored in $new_path.
14104
14105  input_path="$new_path"
14106  # Check if we need to convert this using DOS-style short mode. If the path
14107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14108  # take no chances and rewrite it.
14109  # Note: m4 eats our [], so we need to use [ and ] instead.
14110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14111  if test "x$has_forbidden_chars" != x; then
14112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14116      # Going to short mode and back again did indeed matter. Since short mode is
14117      # case insensitive, let's make it lowercase to improve readability.
14118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14119      # Now convert it back to Unix-stile (cygpath)
14120      input_path=`$CYGPATH -u "$shortmode_path"`
14121      new_path="$input_path"
14122    fi
14123  fi
14124
14125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14126  if test "x$test_cygdrive_prefix" = x; then
14127    # As a simple fix, exclude /usr/bin since it's not a real path.
14128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14130      # a path prefixed by /cygdrive for fixpath to work.
14131      new_path="$CYGWIN_ROOT_PATH$input_path"
14132    fi
14133  fi
14134
14135
14136  if test "x$path" != "x$new_path"; then
14137    CURDIR="$new_path"
14138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14139$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14140  fi
14141
14142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14143
14144  path="$CURDIR"
14145  has_colon=`$ECHO $path | $GREP ^.:`
14146  new_path="$path"
14147  if test "x$has_colon" = x; then
14148    # Not in mixed or Windows style, start by that.
14149    new_path=`cmd //c echo $path`
14150  fi
14151
14152
14153  input_path="$new_path"
14154  # Check if we need to convert this using DOS-style short mode. If the path
14155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14156  # take no chances and rewrite it.
14157  # Note: m4 eats our [], so we need to use [ and ] instead.
14158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14159  if test "x$has_forbidden_chars" != x; then
14160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14162  fi
14163
14164
14165  windows_path="$new_path"
14166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14167    unix_path=`$CYGPATH -u "$windows_path"`
14168    new_path="$unix_path"
14169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14171    new_path="$unix_path"
14172  fi
14173
14174  if test "x$path" != "x$new_path"; then
14175    CURDIR="$new_path"
14176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14177$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14178  fi
14179
14180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14182
14183  else
14184    # We're on a posix platform. Hooray! :)
14185    path="$CURDIR"
14186    has_space=`$ECHO "$path" | $GREP " "`
14187    if test "x$has_space" != x; then
14188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14189$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14191    fi
14192
14193    # Use eval to expand a potential ~
14194    eval path="$path"
14195    if test ! -f "$path" && test ! -d "$path"; then
14196      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14197    fi
14198
14199    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14200  fi
14201
14202
14203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14204
14205  # Input might be given as Windows format, start by converting to
14206  # unix format.
14207  path="$TOPDIR"
14208  new_path=`$CYGPATH -u "$path"`
14209
14210  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14211  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14212  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14213  # "foo.exe" is OK but "foo" is an error.
14214  #
14215  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14216  # It is also a way to make sure we got the proper file name for the real test later on.
14217  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14218  if test "x$test_shortpath" = x; then
14219    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14220$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14221    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14222  fi
14223
14224  # Call helper function which possibly converts this using DOS-style short mode.
14225  # If so, the updated path is stored in $new_path.
14226
14227  input_path="$new_path"
14228  # Check if we need to convert this using DOS-style short mode. If the path
14229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14230  # take no chances and rewrite it.
14231  # Note: m4 eats our [], so we need to use [ and ] instead.
14232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14233  if test "x$has_forbidden_chars" != x; then
14234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14235    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14236    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14237    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14238      # Going to short mode and back again did indeed matter. Since short mode is
14239      # case insensitive, let's make it lowercase to improve readability.
14240      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14241      # Now convert it back to Unix-stile (cygpath)
14242      input_path=`$CYGPATH -u "$shortmode_path"`
14243      new_path="$input_path"
14244    fi
14245  fi
14246
14247  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14248  if test "x$test_cygdrive_prefix" = x; then
14249    # As a simple fix, exclude /usr/bin since it's not a real path.
14250    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14251      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14252      # a path prefixed by /cygdrive for fixpath to work.
14253      new_path="$CYGWIN_ROOT_PATH$input_path"
14254    fi
14255  fi
14256
14257
14258  if test "x$path" != "x$new_path"; then
14259    TOPDIR="$new_path"
14260    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14261$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14262  fi
14263
14264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14265
14266  path="$TOPDIR"
14267  has_colon=`$ECHO $path | $GREP ^.:`
14268  new_path="$path"
14269  if test "x$has_colon" = x; then
14270    # Not in mixed or Windows style, start by that.
14271    new_path=`cmd //c echo $path`
14272  fi
14273
14274
14275  input_path="$new_path"
14276  # Check if we need to convert this using DOS-style short mode. If the path
14277  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14278  # take no chances and rewrite it.
14279  # Note: m4 eats our [], so we need to use [ and ] instead.
14280  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14281  if test "x$has_forbidden_chars" != x; then
14282    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14283    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14284  fi
14285
14286
14287  windows_path="$new_path"
14288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14289    unix_path=`$CYGPATH -u "$windows_path"`
14290    new_path="$unix_path"
14291  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14292    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14293    new_path="$unix_path"
14294  fi
14295
14296  if test "x$path" != "x$new_path"; then
14297    TOPDIR="$new_path"
14298    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14299$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14300  fi
14301
14302  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14303  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14304
14305  else
14306    # We're on a posix platform. Hooray! :)
14307    path="$TOPDIR"
14308    has_space=`$ECHO "$path" | $GREP " "`
14309    if test "x$has_space" != x; then
14310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14311$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14312      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14313    fi
14314
14315    # Use eval to expand a potential ~
14316    eval path="$path"
14317    if test ! -f "$path" && test ! -d "$path"; then
14318      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14319    fi
14320
14321    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14322  fi
14323
14324  # SRC_ROOT is a traditional alias for TOPDIR.
14325  SRC_ROOT=$TOPDIR
14326
14327  # Locate the directory of this script.
14328  AUTOCONF_DIR=$TOPDIR/common/autoconf
14329
14330
14331  # Setup default logging of stdout and stderr to build.log in the output root.
14332  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14333  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14334  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14335
14336
14337
14338
14339
14340# Check if it's a pure open build or if custom sources are to be used.
14341
14342  # Check whether --enable-openjdk-only was given.
14343if test "${enable_openjdk_only+set}" = set; then :
14344  enableval=$enable_openjdk_only;
14345else
14346  enable_openjdk_only="no"
14347fi
14348
14349
14350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14351$as_echo_n "checking for presence of closed sources... " >&6; }
14352  if test -d "$SRC_ROOT/jdk/src/closed"; then
14353    CLOSED_SOURCE_PRESENT=yes
14354  else
14355    CLOSED_SOURCE_PRESENT=no
14356  fi
14357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14358$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14359
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14361$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14362  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14364$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14365
14366  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14367    OPENJDK=true
14368    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14369      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14370$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14371    fi
14372  else
14373    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14374      OPENJDK=true
14375    else
14376      OPENJDK=false
14377    fi
14378  fi
14379
14380  if test "x$OPENJDK" = "xtrue"; then
14381    SET_OPENJDK="OPENJDK=true"
14382  fi
14383
14384
14385
14386  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14387  # the IncludeCustomExtension macro.
14388
14389
14390# Check whether --with-custom-make-dir was given.
14391if test "${with_custom_make_dir+set}" = set; then :
14392  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
14393$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14394fi
14395
14396
14397
14398
14399# These are needed to be able to create a configuration name (and thus the output directory)
14400
14401  ###############################################################################
14402  #
14403  # Check which variant of the JDK that we want to build.
14404  # Currently we have:
14405  #    normal:   standard edition
14406  # but the custom make system may add other variants
14407  #
14408  # Effectively the JDK variant gives a name to a specific set of
14409  # modules to compile into the JDK. In the future, these modules
14410  # might even be Jigsaw modules.
14411  #
14412  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14413$as_echo_n "checking which variant of the JDK to build... " >&6; }
14414
14415# Check whether --with-jdk-variant was given.
14416if test "${with_jdk_variant+set}" = set; then :
14417  withval=$with_jdk_variant;
14418fi
14419
14420
14421  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14422    JDK_VARIANT="normal"
14423  else
14424    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14425  fi
14426
14427
14428
14429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14430$as_echo "$JDK_VARIANT" >&6; }
14431
14432
14433###############################################################################
14434#
14435# Check which interpreter of the JVM we want to build.
14436# Currently we have:
14437#    template: Template interpreter (the default)
14438#    cpp     : C++ interpreter
14439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14440$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14441
14442# Check whether --with-jvm-interpreter was given.
14443if test "${with_jvm_interpreter+set}" = set; then :
14444  withval=$with_jvm_interpreter;
14445fi
14446
14447
14448if test "x$with_jvm_interpreter" = x; then
14449     with_jvm_interpreter="template"
14450fi
14451
14452JVM_INTERPRETER="$with_jvm_interpreter"
14453
14454if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14455   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14456fi
14457
14458
14459
14460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14461$as_echo "$with_jvm_interpreter" >&6; }
14462
14463
14464
14465  ###############################################################################
14466  #
14467  # Check which variants of the JVM that we want to build.
14468  # Currently we have:
14469  #    server: normal interpreter and a tiered C1/C2 compiler
14470  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14471  #    minimal1: reduced form of client with optional VM services and features stripped out
14472  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14473  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14474  #    zero: no machine code interpreter, no compiler
14475  #    zeroshark: zero interpreter and shark/llvm compiler backend
14476#    core: interpreter only, no compiler (only works on some platforms)
14477  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14478$as_echo_n "checking which variants of the JVM to build... " >&6; }
14479
14480# Check whether --with-jvm-variants was given.
14481if test "${with_jvm_variants+set}" = set; then :
14482  withval=$with_jvm_variants;
14483fi
14484
14485
14486  if test "x$with_jvm_variants" = x; then
14487    with_jvm_variants="server"
14488  fi
14489
14490  JVM_VARIANTS=",$with_jvm_variants,"
14491  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,//'`
14492
14493  if test "x$TEST_VARIANTS" != "x,"; then
14494     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14495  fi
14496  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14497$as_echo "$with_jvm_variants" >&6; }
14498
14499  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14500  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14501  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14502  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14503  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14504  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14505  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14506
14507  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14508    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14509      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14510    fi
14511  fi
14512  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14513    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14514      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14515    fi
14516  fi
14517  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14518    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14519      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14520    fi
14521  fi
14522
14523  # Replace the commas with AND for use in the build directory name.
14524  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14525  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/'`
14526  if test "x$COUNT_VARIANTS" != "x,1"; then
14527    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14528  else
14529    BUILDING_MULTIPLE_JVM_VARIANTS=no
14530  fi
14531
14532
14533
14534
14535
14536
14537
14538
14539
14540
14541  INCLUDE_SA=true
14542  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14543    INCLUDE_SA=false
14544  fi
14545  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14546    INCLUDE_SA=false
14547  fi
14548  if test "x$VAR_CPU" = xppc64 ; then
14549    INCLUDE_SA=false
14550  fi
14551
14552
14553  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14554    MACOSX_UNIVERSAL="true"
14555  fi
14556
14557
14558
14559
14560  ###############################################################################
14561  #
14562  # Set the debug level
14563  #    release: no debug information, all optimizations, no asserts.
14564  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14565  #    fastdebug: debug information (-g), all optimizations, all asserts
14566  #    slowdebug: debug information (-g), no optimizations, all asserts
14567  #
14568  DEBUG_LEVEL="release"
14569  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14570$as_echo_n "checking which debug level to use... " >&6; }
14571  # Check whether --enable-debug was given.
14572if test "${enable_debug+set}" = set; then :
14573  enableval=$enable_debug;
14574        ENABLE_DEBUG="${enableval}"
14575        DEBUG_LEVEL="fastdebug"
14576
14577else
14578  ENABLE_DEBUG="no"
14579fi
14580
14581
14582
14583# Check whether --with-debug-level was given.
14584if test "${with_debug_level+set}" = set; then :
14585  withval=$with_debug_level;
14586        DEBUG_LEVEL="${withval}"
14587        if test "x$ENABLE_DEBUG" = xyes; then
14588          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14589        fi
14590
14591fi
14592
14593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14594$as_echo "$DEBUG_LEVEL" >&6; }
14595
14596  if test "x$DEBUG_LEVEL" != xrelease && \
14597      test "x$DEBUG_LEVEL" != xoptimized && \
14598      test "x$DEBUG_LEVEL" != xfastdebug && \
14599      test "x$DEBUG_LEVEL" != xslowdebug; then
14600    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14601  fi
14602
14603
14604  ###############################################################################
14605  #
14606  # Setup legacy vars/targets and new vars to deal with different debug levels.
14607  #
14608
14609  case $DEBUG_LEVEL in
14610    release )
14611      VARIANT="OPT"
14612      FASTDEBUG="false"
14613      DEBUG_CLASSFILES="false"
14614      BUILD_VARIANT_RELEASE=""
14615      HOTSPOT_DEBUG_LEVEL="product"
14616      HOTSPOT_EXPORT="product"
14617      ;;
14618    fastdebug )
14619      VARIANT="DBG"
14620      FASTDEBUG="true"
14621      DEBUG_CLASSFILES="true"
14622      BUILD_VARIANT_RELEASE="-fastdebug"
14623      HOTSPOT_DEBUG_LEVEL="fastdebug"
14624      HOTSPOT_EXPORT="fastdebug"
14625      ;;
14626    slowdebug )
14627      VARIANT="DBG"
14628      FASTDEBUG="false"
14629      DEBUG_CLASSFILES="true"
14630      BUILD_VARIANT_RELEASE="-debug"
14631      HOTSPOT_DEBUG_LEVEL="jvmg"
14632      HOTSPOT_EXPORT="debug"
14633      ;;
14634    optimized )
14635      VARIANT="OPT"
14636      FASTDEBUG="false"
14637      DEBUG_CLASSFILES="false"
14638      BUILD_VARIANT_RELEASE="-optimized"
14639      HOTSPOT_DEBUG_LEVEL="optimized"
14640      HOTSPOT_EXPORT="optimized"
14641      ;;
14642  esac
14643
14644  # The debug level 'optimized' is a little special because it is currently only
14645  # applicable to the HotSpot build where it means to build a completely
14646  # optimized version of the VM without any debugging code (like for the
14647  # 'release' debug level which is called 'product' in the HotSpot build) but
14648  # with the exception that it can contain additional code which is otherwise
14649  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14650  # test new and/or experimental features which are not intended for customer
14651  # shipment. Because these new features need to be tested and benchmarked in
14652  # real world scenarios, we want to build the containing JDK at the 'release'
14653  # debug level.
14654  if test "x$DEBUG_LEVEL" = xoptimized; then
14655    DEBUG_LEVEL="release"
14656  fi
14657
14658  #####
14659  # Generate the legacy makefile targets for hotspot.
14660  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14661  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14662  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14663  # But until then ...
14664  HOTSPOT_TARGET=""
14665
14666  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14667    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14668  fi
14669
14670  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14671    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14672  fi
14673
14674  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14675    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14676  fi
14677
14678  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14679    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14680  fi
14681
14682  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14683    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14684  fi
14685
14686  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14687    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14688  fi
14689
14690  if test "x$JVM_VARIANT_CORE" = xtrue; then
14691    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14692  fi
14693
14694  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14695
14696  # On Macosx universal binaries are produced, but they only contain
14697  # 64 bit intel. This invalidates control of which jvms are built
14698  # from configure, but only server is valid anyway. Fix this
14699  # when hotspot makefiles are rewritten.
14700  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14701    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14702  fi
14703
14704  #####
14705
14706
14707
14708
14709
14710
14711
14712
14713# With basic setup done, call the custom early hook.
14714
14715
14716# Check if we have devkits, extra paths or sysroot set.
14717
14718
14719# Check whether --with-devkit was given.
14720if test "${with_devkit+set}" = set; then :
14721  withval=$with_devkit;
14722
14723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14724
14725  # Input might be given as Windows format, start by converting to
14726  # unix format.
14727  path="$with_devkit"
14728  new_path=`$CYGPATH -u "$path"`
14729
14730  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14731  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14732  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14733  # "foo.exe" is OK but "foo" is an error.
14734  #
14735  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14736  # It is also a way to make sure we got the proper file name for the real test later on.
14737  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14738  if test "x$test_shortpath" = x; then
14739    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14740$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14741    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14742  fi
14743
14744  # Call helper function which possibly converts this using DOS-style short mode.
14745  # If so, the updated path is stored in $new_path.
14746
14747  input_path="$new_path"
14748  # Check if we need to convert this using DOS-style short mode. If the path
14749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14750  # take no chances and rewrite it.
14751  # Note: m4 eats our [], so we need to use [ and ] instead.
14752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14753  if test "x$has_forbidden_chars" != x; then
14754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14755    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14756    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14757    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14758      # Going to short mode and back again did indeed matter. Since short mode is
14759      # case insensitive, let's make it lowercase to improve readability.
14760      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14761      # Now convert it back to Unix-stile (cygpath)
14762      input_path=`$CYGPATH -u "$shortmode_path"`
14763      new_path="$input_path"
14764    fi
14765  fi
14766
14767  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14768  if test "x$test_cygdrive_prefix" = x; then
14769    # As a simple fix, exclude /usr/bin since it's not a real path.
14770    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14771      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14772      # a path prefixed by /cygdrive for fixpath to work.
14773      new_path="$CYGWIN_ROOT_PATH$input_path"
14774    fi
14775  fi
14776
14777
14778  if test "x$path" != "x$new_path"; then
14779    with_devkit="$new_path"
14780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14781$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14782  fi
14783
14784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14785
14786  path="$with_devkit"
14787  has_colon=`$ECHO $path | $GREP ^.:`
14788  new_path="$path"
14789  if test "x$has_colon" = x; then
14790    # Not in mixed or Windows style, start by that.
14791    new_path=`cmd //c echo $path`
14792  fi
14793
14794
14795  input_path="$new_path"
14796  # Check if we need to convert this using DOS-style short mode. If the path
14797  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14798  # take no chances and rewrite it.
14799  # Note: m4 eats our [], so we need to use [ and ] instead.
14800  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14801  if test "x$has_forbidden_chars" != x; then
14802    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14803    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14804  fi
14805
14806
14807  windows_path="$new_path"
14808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14809    unix_path=`$CYGPATH -u "$windows_path"`
14810    new_path="$unix_path"
14811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14812    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14813    new_path="$unix_path"
14814  fi
14815
14816  if test "x$path" != "x$new_path"; then
14817    with_devkit="$new_path"
14818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14819$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14820  fi
14821
14822  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14823  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14824
14825  else
14826    # We're on a posix platform. Hooray! :)
14827    path="$with_devkit"
14828    has_space=`$ECHO "$path" | $GREP " "`
14829    if test "x$has_space" != x; then
14830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14831$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14832      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14833    fi
14834
14835    # Use eval to expand a potential ~
14836    eval path="$path"
14837    if test ! -f "$path" && test ! -d "$path"; then
14838      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14839    fi
14840
14841    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14842  fi
14843
14844        DEVKIT_ROOT="$with_devkit"
14845        # Check for a meta data info file in the root of the devkit
14846        if test -f "$DEVKIT_ROOT/devkit.info"; then
14847          # This potentially sets the following:
14848          # DEVKIT_NAME: A descriptive name of the devkit
14849          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14850          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14851          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14852          . $DEVKIT_ROOT/devkit.info
14853        fi
14854
14855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14856$as_echo_n "checking for devkit... " >&6; }
14857        if test "x$DEVKIT_NAME" != x; then
14858          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14859$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14860        else
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14862$as_echo "$DEVKIT_ROOT" >&6; }
14863        fi
14864
14865        if test "x$DEVKIT_EXTRA_PATH" != x; then
14866
14867  if test "x$DEVKIT_EXTRA_PATH" != x; then
14868    if test "x$EXTRA_PATH" = x; then
14869      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14870    else
14871      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14872    fi
14873  fi
14874
14875        fi
14876
14877        # Fallback default of just /bin if DEVKIT_PATH is not defined
14878        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14879          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14880        fi
14881
14882  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14883    if test "x$TOOLCHAIN_PATH" = x; then
14884      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14885    else
14886      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14887    fi
14888  fi
14889
14890
14891        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14892        # places for backwards compatiblity.
14893        if test "x$DEVKIT_SYSROOT" != x; then
14894          SYSROOT="$DEVKIT_SYSROOT"
14895        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14896          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14897        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14898          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14899        fi
14900
14901
14902fi
14903
14904
14905  # You can force the sysroot if the sysroot encoded into the compiler tools
14906  # is not correct.
14907
14908# Check whether --with-sys-root was given.
14909if test "${with_sys_root+set}" = set; then :
14910  withval=$with_sys_root; SYSROOT=$with_sys_root
14911
14912fi
14913
14914
14915
14916# Check whether --with-sysroot was given.
14917if test "${with_sysroot+set}" = set; then :
14918  withval=$with_sysroot; SYSROOT=$with_sysroot
14919
14920fi
14921
14922
14923
14924# Check whether --with-tools-dir was given.
14925if test "${with_tools_dir+set}" = set; then :
14926  withval=$with_tools_dir;
14927  if test "x$with_tools_dir" != x; then
14928    if test "x$TOOLCHAIN_PATH" = x; then
14929      TOOLCHAIN_PATH="$with_tools_dir"
14930    else
14931      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14932    fi
14933  fi
14934
14935
14936fi
14937
14938
14939
14940# Check whether --with-toolchain-path was given.
14941if test "${with_toolchain_path+set}" = set; then :
14942  withval=$with_toolchain_path;
14943  if test "x$with_toolchain_path" != x; then
14944    if test "x$TOOLCHAIN_PATH" = x; then
14945      TOOLCHAIN_PATH="$with_toolchain_path"
14946    else
14947      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14948    fi
14949  fi
14950
14951
14952fi
14953
14954
14955
14956# Check whether --with-extra-path was given.
14957if test "${with_extra_path+set}" = set; then :
14958  withval=$with_extra_path;
14959  if test "x$with_extra_path" != x; then
14960    if test "x$EXTRA_PATH" = x; then
14961      EXTRA_PATH="$with_extra_path"
14962    else
14963      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14964    fi
14965  fi
14966
14967
14968fi
14969
14970
14971  # Prepend the extra path to the global path
14972
14973  if test "x$EXTRA_PATH" != x; then
14974    if test "x$PATH" = x; then
14975      PATH="$EXTRA_PATH"
14976    else
14977      PATH="$EXTRA_PATH:$PATH"
14978    fi
14979  fi
14980
14981
14982  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
14983    # Add extra search paths on solaris for utilities like ar and as etc...
14984    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
14985  fi
14986
14987  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
14988$as_echo_n "checking for sysroot... " >&6; }
14989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
14990$as_echo "$SYSROOT" >&6; }
14991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
14992$as_echo_n "checking for toolchain path... " >&6; }
14993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
14994$as_echo "$TOOLCHAIN_PATH" >&6; }
14995  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
14996$as_echo_n "checking for extra path... " >&6; }
14997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
14998$as_echo "$EXTRA_PATH" >&6; }
14999
15000
15001# To properly create a configuration name, we need to have the OpenJDK target
15002# and options (variants and debug level) parsed.
15003
15004
15005
15006# Check whether --with-conf-name was given.
15007if test "${with_conf_name+set}" = set; then :
15008  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15009fi
15010
15011
15012  # Test from where we are running configure, in or outside of src root.
15013  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15014$as_echo_n "checking where to store configuration... " >&6; }
15015  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15016      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15017      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15018    # We are running configure from the src root.
15019    # Create a default ./build/target-variant-debuglevel output root.
15020    if test "x${CONF_NAME}" = x; then
15021      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15022$as_echo "in default location" >&6; }
15023      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15024    else
15025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15026$as_echo "in build directory with custom name" >&6; }
15027    fi
15028    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15029    $MKDIR -p "$OUTPUT_ROOT"
15030    if test ! -d "$OUTPUT_ROOT"; then
15031      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15032    fi
15033  else
15034    # We are running configure from outside of the src dir.
15035    # Then use the current directory as output dir!
15036    # If configuration is situated in normal build directory, just use the build
15037    # directory name as configuration name, otherwise use the complete path.
15038    if test "x${CONF_NAME}" = x; then
15039      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15040    fi
15041    OUTPUT_ROOT="$CURDIR"
15042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15043$as_echo "in current directory" >&6; }
15044
15045    # WARNING: This might be a bad thing to do. You need to be sure you want to
15046    # have a configuration in this directory. Do some sanity checks!
15047
15048    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15049      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15050      # other files
15051      files_present=`$LS $OUTPUT_ROOT`
15052      # Configure has already touched config.log and confdefs.h in the current dir when this check
15053      # is performed.
15054      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15055      | $TR -d '\n'`
15056      if test "x$filtered_files" != x; then
15057        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15058$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15059        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15060$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15061        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15062$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15063        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15064$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15065        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15066$as_echo "$as_me: seriously mess up just about everything." >&6;}
15067        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15068$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15069        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15070$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15071        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15072      fi
15073    fi
15074  fi
15075  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15076$as_echo_n "checking what configuration name to use... " >&6; }
15077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15078$as_echo "$CONF_NAME" >&6; }
15079
15080
15081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15082
15083  # Input might be given as Windows format, start by converting to
15084  # unix format.
15085  path="$OUTPUT_ROOT"
15086  new_path=`$CYGPATH -u "$path"`
15087
15088  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15089  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15090  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15091  # "foo.exe" is OK but "foo" is an error.
15092  #
15093  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15094  # It is also a way to make sure we got the proper file name for the real test later on.
15095  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15096  if test "x$test_shortpath" = x; then
15097    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15098$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15099    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15100  fi
15101
15102  # Call helper function which possibly converts this using DOS-style short mode.
15103  # If so, the updated path is stored in $new_path.
15104
15105  input_path="$new_path"
15106  # Check if we need to convert this using DOS-style short mode. If the path
15107  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15108  # take no chances and rewrite it.
15109  # Note: m4 eats our [], so we need to use [ and ] instead.
15110  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15111  if test "x$has_forbidden_chars" != x; then
15112    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15113    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15114    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15115    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15116      # Going to short mode and back again did indeed matter. Since short mode is
15117      # case insensitive, let's make it lowercase to improve readability.
15118      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15119      # Now convert it back to Unix-stile (cygpath)
15120      input_path=`$CYGPATH -u "$shortmode_path"`
15121      new_path="$input_path"
15122    fi
15123  fi
15124
15125  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15126  if test "x$test_cygdrive_prefix" = x; then
15127    # As a simple fix, exclude /usr/bin since it's not a real path.
15128    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15129      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15130      # a path prefixed by /cygdrive for fixpath to work.
15131      new_path="$CYGWIN_ROOT_PATH$input_path"
15132    fi
15133  fi
15134
15135
15136  if test "x$path" != "x$new_path"; then
15137    OUTPUT_ROOT="$new_path"
15138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15139$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15140  fi
15141
15142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15143
15144  path="$OUTPUT_ROOT"
15145  has_colon=`$ECHO $path | $GREP ^.:`
15146  new_path="$path"
15147  if test "x$has_colon" = x; then
15148    # Not in mixed or Windows style, start by that.
15149    new_path=`cmd //c echo $path`
15150  fi
15151
15152
15153  input_path="$new_path"
15154  # Check if we need to convert this using DOS-style short mode. If the path
15155  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15156  # take no chances and rewrite it.
15157  # Note: m4 eats our [], so we need to use [ and ] instead.
15158  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15159  if test "x$has_forbidden_chars" != x; then
15160    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15161    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15162  fi
15163
15164
15165  windows_path="$new_path"
15166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15167    unix_path=`$CYGPATH -u "$windows_path"`
15168    new_path="$unix_path"
15169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15171    new_path="$unix_path"
15172  fi
15173
15174  if test "x$path" != "x$new_path"; then
15175    OUTPUT_ROOT="$new_path"
15176    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15177$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15178  fi
15179
15180  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15181  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15182
15183  else
15184    # We're on a posix platform. Hooray! :)
15185    path="$OUTPUT_ROOT"
15186    has_space=`$ECHO "$path" | $GREP " "`
15187    if test "x$has_space" != x; then
15188      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15189$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15190      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15191    fi
15192
15193    # Use eval to expand a potential ~
15194    eval path="$path"
15195    if test ! -f "$path" && test ! -d "$path"; then
15196      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15197    fi
15198
15199    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15200  fi
15201
15202
15203  SPEC=$OUTPUT_ROOT/spec.gmk
15204
15205  CONF_NAME=$CONF_NAME
15206
15207  OUTPUT_ROOT=$OUTPUT_ROOT
15208
15209
15210  # Most of the probed defines are put into config.h
15211  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15212
15213  # The spec.gmk file contains all variables for the make system.
15214  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15215
15216  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15217  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15218
15219  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15220  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15221
15222  # The compare.sh is used to compare the build output to other builds.
15223  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15224
15225  # Spec.sh is currently used by compare-objects.sh
15226  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15227
15228  # The generated Makefile knows where the spec.gmk is and where the source is.
15229  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15230  # which will look for generated configurations
15231  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15232
15233
15234
15235# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15236
15237  for ac_prog in apt-get yum port pkgutil pkgadd
15238do
15239  # Extract the first word of "$ac_prog", so it can be a program name with args.
15240set dummy $ac_prog; ac_word=$2
15241{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15242$as_echo_n "checking for $ac_word... " >&6; }
15243if ${ac_cv_prog_PKGHANDLER+:} false; then :
15244  $as_echo_n "(cached) " >&6
15245else
15246  if test -n "$PKGHANDLER"; then
15247  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15248else
15249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15250for as_dir in $PATH
15251do
15252  IFS=$as_save_IFS
15253  test -z "$as_dir" && as_dir=.
15254    for ac_exec_ext in '' $ac_executable_extensions; do
15255  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15256    ac_cv_prog_PKGHANDLER="$ac_prog"
15257    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15258    break 2
15259  fi
15260done
15261  done
15262IFS=$as_save_IFS
15263
15264fi
15265fi
15266PKGHANDLER=$ac_cv_prog_PKGHANDLER
15267if test -n "$PKGHANDLER"; then
15268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15269$as_echo "$PKGHANDLER" >&6; }
15270else
15271  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15272$as_echo "no" >&6; }
15273fi
15274
15275
15276  test -n "$PKGHANDLER" && break
15277done
15278
15279
15280
15281# Setup tools that requires more complex handling, or that is not needed by the configure script.
15282
15283
15284  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15285  if test "x$MAKE" != x; then
15286    # User has supplied a make, test it.
15287    if test ! -f "$MAKE"; then
15288      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15289    fi
15290
15291  MAKE_CANDIDATE=""$MAKE""
15292  DESCRIPTION="user supplied MAKE=$MAKE"
15293  if test "x$MAKE_CANDIDATE" != x; then
15294    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15295$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15296    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15297    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15298    if test "x$IS_GNU_MAKE" = x; then
15299      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15300$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15301    else
15302      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15303      if test "x$IS_MODERN_MAKE" = x; then
15304        { $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
15305$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;}
15306      else
15307        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15308          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15309            MAKE_EXPECTED_ENV='cygwin'
15310          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15311            MAKE_EXPECTED_ENV='msys'
15312          else
15313            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15314          fi
15315          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15316          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15317        else
15318          # Not relevant for non-Windows
15319          IS_MAKE_CORRECT_ENV=true
15320        fi
15321        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15322          { $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
15323$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;}
15324        else
15325          FOUND_MAKE=$MAKE_CANDIDATE
15326
15327  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15328
15329  # First separate the path from the arguments. This will split at the first
15330  # space.
15331  complete="$FOUND_MAKE"
15332  path="${complete%% *}"
15333  tmp="$complete EOL"
15334  arguments="${tmp#* }"
15335
15336  # Input might be given as Windows format, start by converting to
15337  # unix format.
15338  new_path=`$CYGPATH -u "$path"`
15339
15340  # Now try to locate executable using which
15341  new_path=`$WHICH "$new_path" 2> /dev/null`
15342  # bat and cmd files are not always considered executable in cygwin causing which
15343  # to not find them
15344  if test "x$new_path" = x \
15345      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15346      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15347    new_path=`$CYGPATH -u "$path"`
15348  fi
15349  if test "x$new_path" = x; then
15350    # Oops. Which didn't find the executable.
15351    # The splitting of arguments from the executable at a space might have been incorrect,
15352    # since paths with space are more likely in Windows. Give it another try with the whole
15353    # argument.
15354    path="$complete"
15355    arguments="EOL"
15356    new_path=`$CYGPATH -u "$path"`
15357    new_path=`$WHICH "$new_path" 2> /dev/null`
15358    # bat and cmd files are not always considered executable in cygwin causing which
15359    # to not find them
15360    if test "x$new_path" = x \
15361        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15362        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15363      new_path=`$CYGPATH -u "$path"`
15364    fi
15365    if test "x$new_path" = x; then
15366      # It's still not found. Now this is an unrecoverable error.
15367      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15368$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15369      has_space=`$ECHO "$complete" | $GREP " "`
15370      if test "x$has_space" != x; then
15371        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15372$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15373      fi
15374      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15375    fi
15376  fi
15377
15378  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15379  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15380  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15381  # "foo.exe" is OK but "foo" is an error.
15382  #
15383  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15384  # It is also a way to make sure we got the proper file name for the real test later on.
15385  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15386  if test "x$test_shortpath" = x; then
15387    # Short path failed, file does not exist as specified.
15388    # Try adding .exe or .cmd
15389    if test -f "${new_path}.exe"; then
15390      input_to_shortpath="${new_path}.exe"
15391    elif test -f "${new_path}.cmd"; then
15392      input_to_shortpath="${new_path}.cmd"
15393    else
15394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15396      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15397$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15398      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15399    fi
15400  else
15401    input_to_shortpath="$new_path"
15402  fi
15403
15404  # Call helper function which possibly converts this using DOS-style short mode.
15405  # If so, the updated path is stored in $new_path.
15406  new_path="$input_to_shortpath"
15407
15408  input_path="$input_to_shortpath"
15409  # Check if we need to convert this using DOS-style short mode. If the path
15410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15411  # take no chances and rewrite it.
15412  # Note: m4 eats our [], so we need to use [ and ] instead.
15413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15414  if test "x$has_forbidden_chars" != x; then
15415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15419      # Going to short mode and back again did indeed matter. Since short mode is
15420      # case insensitive, let's make it lowercase to improve readability.
15421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15422      # Now convert it back to Unix-stile (cygpath)
15423      input_path=`$CYGPATH -u "$shortmode_path"`
15424      new_path="$input_path"
15425    fi
15426  fi
15427
15428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15429  if test "x$test_cygdrive_prefix" = x; then
15430    # As a simple fix, exclude /usr/bin since it's not a real path.
15431    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15433      # a path prefixed by /cygdrive for fixpath to work.
15434      new_path="$CYGWIN_ROOT_PATH$input_path"
15435    fi
15436  fi
15437
15438  # remove trailing .exe if any
15439  new_path="${new_path/%.exe/}"
15440
15441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15442
15443  # First separate the path from the arguments. This will split at the first
15444  # space.
15445  complete="$FOUND_MAKE"
15446  path="${complete%% *}"
15447  tmp="$complete EOL"
15448  arguments="${tmp#* }"
15449
15450  # Input might be given as Windows format, start by converting to
15451  # unix format.
15452  new_path="$path"
15453
15454  windows_path="$new_path"
15455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15456    unix_path=`$CYGPATH -u "$windows_path"`
15457    new_path="$unix_path"
15458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15460    new_path="$unix_path"
15461  fi
15462
15463
15464  # Now try to locate executable using which
15465  new_path=`$WHICH "$new_path" 2> /dev/null`
15466
15467  if test "x$new_path" = x; then
15468    # Oops. Which didn't find the executable.
15469    # The splitting of arguments from the executable at a space might have been incorrect,
15470    # since paths with space are more likely in Windows. Give it another try with the whole
15471    # argument.
15472    path="$complete"
15473    arguments="EOL"
15474    new_path="$path"
15475
15476  windows_path="$new_path"
15477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15478    unix_path=`$CYGPATH -u "$windows_path"`
15479    new_path="$unix_path"
15480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15482    new_path="$unix_path"
15483  fi
15484
15485
15486    new_path=`$WHICH "$new_path" 2> /dev/null`
15487
15488    if test "x$new_path" = x; then
15489      # It's still not found. Now this is an unrecoverable error.
15490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15491$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15492      has_space=`$ECHO "$complete" | $GREP " "`
15493      if test "x$has_space" != x; then
15494        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15495$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15496      fi
15497      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15498    fi
15499  fi
15500
15501  # Now new_path has a complete unix path to the binary
15502  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15503    # Keep paths in /bin as-is, but remove trailing .exe if any
15504    new_path="${new_path/%.exe/}"
15505    # Do not save /bin paths to all_fixpath_prefixes!
15506  else
15507    # Not in mixed or Windows style, start by that.
15508    new_path=`cmd //c echo $new_path`
15509
15510  input_path="$new_path"
15511  # Check if we need to convert this using DOS-style short mode. If the path
15512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15513  # take no chances and rewrite it.
15514  # Note: m4 eats our [], so we need to use [ and ] instead.
15515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15516  if test "x$has_forbidden_chars" != x; then
15517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15518    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15519  fi
15520
15521    # Output is in $new_path
15522
15523  windows_path="$new_path"
15524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15525    unix_path=`$CYGPATH -u "$windows_path"`
15526    new_path="$unix_path"
15527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15529    new_path="$unix_path"
15530  fi
15531
15532    # remove trailing .exe if any
15533    new_path="${new_path/%.exe/}"
15534
15535    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15536    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15537  fi
15538
15539  else
15540    # We're on a posix platform. Hooray! :)
15541    # First separate the path from the arguments. This will split at the first
15542    # space.
15543    complete="$FOUND_MAKE"
15544    path="${complete%% *}"
15545    tmp="$complete EOL"
15546    arguments="${tmp#* }"
15547
15548    # Cannot rely on the command "which" here since it doesn't always work.
15549    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15550    if test -z "$is_absolute_path"; then
15551      # Path to executable is not absolute. Find it.
15552      IFS_save="$IFS"
15553      IFS=:
15554      for p in $PATH; do
15555        if test -f "$p/$path" && test -x "$p/$path"; then
15556          new_path="$p/$path"
15557          break
15558        fi
15559      done
15560      IFS="$IFS_save"
15561    else
15562      # This is an absolute path, we can use it without further modifications.
15563      new_path="$path"
15564    fi
15565
15566    if test "x$new_path" = x; then
15567      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15568$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15569      has_space=`$ECHO "$complete" | $GREP " "`
15570      if test "x$has_space" != x; then
15571        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15572$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15573      fi
15574      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15575    fi
15576  fi
15577
15578  # Now join together the path and the arguments once again
15579  if test "x$arguments" != xEOL; then
15580    new_complete="$new_path ${arguments% *}"
15581  else
15582    new_complete="$new_path"
15583  fi
15584
15585  if test "x$complete" != "x$new_complete"; then
15586    FOUND_MAKE="$new_complete"
15587    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15588$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15589  fi
15590
15591        fi
15592      fi
15593    fi
15594  fi
15595
15596    if test "x$FOUND_MAKE" = x; then
15597      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15598    fi
15599  else
15600    # Try our hardest to locate a correct version of GNU make
15601    for ac_prog in gmake
15602do
15603  # Extract the first word of "$ac_prog", so it can be a program name with args.
15604set dummy $ac_prog; ac_word=$2
15605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15606$as_echo_n "checking for $ac_word... " >&6; }
15607if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15608  $as_echo_n "(cached) " >&6
15609else
15610  case $CHECK_GMAKE in
15611  [\\/]* | ?:[\\/]*)
15612  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15613  ;;
15614  *)
15615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15616for as_dir in $PATH
15617do
15618  IFS=$as_save_IFS
15619  test -z "$as_dir" && as_dir=.
15620    for ac_exec_ext in '' $ac_executable_extensions; do
15621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15622    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15624    break 2
15625  fi
15626done
15627  done
15628IFS=$as_save_IFS
15629
15630  ;;
15631esac
15632fi
15633CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15634if test -n "$CHECK_GMAKE"; then
15635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15636$as_echo "$CHECK_GMAKE" >&6; }
15637else
15638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15639$as_echo "no" >&6; }
15640fi
15641
15642
15643  test -n "$CHECK_GMAKE" && break
15644done
15645
15646
15647  MAKE_CANDIDATE=""$CHECK_GMAKE""
15648  DESCRIPTION="gmake in PATH"
15649  if test "x$MAKE_CANDIDATE" != x; then
15650    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15651$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15652    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15653    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15654    if test "x$IS_GNU_MAKE" = x; then
15655      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15656$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15657    else
15658      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15659      if test "x$IS_MODERN_MAKE" = x; then
15660        { $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
15661$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;}
15662      else
15663        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15664          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15665            MAKE_EXPECTED_ENV='cygwin'
15666          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15667            MAKE_EXPECTED_ENV='msys'
15668          else
15669            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15670          fi
15671          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15672          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15673        else
15674          # Not relevant for non-Windows
15675          IS_MAKE_CORRECT_ENV=true
15676        fi
15677        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15678          { $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
15679$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;}
15680        else
15681          FOUND_MAKE=$MAKE_CANDIDATE
15682
15683  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15684
15685  # First separate the path from the arguments. This will split at the first
15686  # space.
15687  complete="$FOUND_MAKE"
15688  path="${complete%% *}"
15689  tmp="$complete EOL"
15690  arguments="${tmp#* }"
15691
15692  # Input might be given as Windows format, start by converting to
15693  # unix format.
15694  new_path=`$CYGPATH -u "$path"`
15695
15696  # Now try to locate executable using which
15697  new_path=`$WHICH "$new_path" 2> /dev/null`
15698  # bat and cmd files are not always considered executable in cygwin causing which
15699  # to not find them
15700  if test "x$new_path" = x \
15701      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15702      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15703    new_path=`$CYGPATH -u "$path"`
15704  fi
15705  if test "x$new_path" = x; then
15706    # Oops. Which didn't find the executable.
15707    # The splitting of arguments from the executable at a space might have been incorrect,
15708    # since paths with space are more likely in Windows. Give it another try with the whole
15709    # argument.
15710    path="$complete"
15711    arguments="EOL"
15712    new_path=`$CYGPATH -u "$path"`
15713    new_path=`$WHICH "$new_path" 2> /dev/null`
15714    # bat and cmd files are not always considered executable in cygwin causing which
15715    # to not find them
15716    if test "x$new_path" = x \
15717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15719      new_path=`$CYGPATH -u "$path"`
15720    fi
15721    if test "x$new_path" = x; then
15722      # It's still not found. Now this is an unrecoverable error.
15723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15724$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15725      has_space=`$ECHO "$complete" | $GREP " "`
15726      if test "x$has_space" != x; then
15727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15729      fi
15730      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15731    fi
15732  fi
15733
15734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15737  # "foo.exe" is OK but "foo" is an error.
15738  #
15739  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15740  # It is also a way to make sure we got the proper file name for the real test later on.
15741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15742  if test "x$test_shortpath" = x; then
15743    # Short path failed, file does not exist as specified.
15744    # Try adding .exe or .cmd
15745    if test -f "${new_path}.exe"; then
15746      input_to_shortpath="${new_path}.exe"
15747    elif test -f "${new_path}.cmd"; then
15748      input_to_shortpath="${new_path}.cmd"
15749    else
15750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15751$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15752      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15753$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15754      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15755    fi
15756  else
15757    input_to_shortpath="$new_path"
15758  fi
15759
15760  # Call helper function which possibly converts this using DOS-style short mode.
15761  # If so, the updated path is stored in $new_path.
15762  new_path="$input_to_shortpath"
15763
15764  input_path="$input_to_shortpath"
15765  # Check if we need to convert this using DOS-style short mode. If the path
15766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15767  # take no chances and rewrite it.
15768  # Note: m4 eats our [], so we need to use [ and ] instead.
15769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15770  if test "x$has_forbidden_chars" != x; then
15771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15775      # Going to short mode and back again did indeed matter. Since short mode is
15776      # case insensitive, let's make it lowercase to improve readability.
15777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15778      # Now convert it back to Unix-stile (cygpath)
15779      input_path=`$CYGPATH -u "$shortmode_path"`
15780      new_path="$input_path"
15781    fi
15782  fi
15783
15784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15785  if test "x$test_cygdrive_prefix" = x; then
15786    # As a simple fix, exclude /usr/bin since it's not a real path.
15787    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15789      # a path prefixed by /cygdrive for fixpath to work.
15790      new_path="$CYGWIN_ROOT_PATH$input_path"
15791    fi
15792  fi
15793
15794  # remove trailing .exe if any
15795  new_path="${new_path/%.exe/}"
15796
15797  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15798
15799  # First separate the path from the arguments. This will split at the first
15800  # space.
15801  complete="$FOUND_MAKE"
15802  path="${complete%% *}"
15803  tmp="$complete EOL"
15804  arguments="${tmp#* }"
15805
15806  # Input might be given as Windows format, start by converting to
15807  # unix format.
15808  new_path="$path"
15809
15810  windows_path="$new_path"
15811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15812    unix_path=`$CYGPATH -u "$windows_path"`
15813    new_path="$unix_path"
15814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15816    new_path="$unix_path"
15817  fi
15818
15819
15820  # Now try to locate executable using which
15821  new_path=`$WHICH "$new_path" 2> /dev/null`
15822
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="$path"
15831
15832  windows_path="$new_path"
15833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15834    unix_path=`$CYGPATH -u "$windows_path"`
15835    new_path="$unix_path"
15836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15838    new_path="$unix_path"
15839  fi
15840
15841
15842    new_path=`$WHICH "$new_path" 2> /dev/null`
15843
15844    if test "x$new_path" = x; then
15845      # It's still not found. Now this is an unrecoverable error.
15846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15847$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15848      has_space=`$ECHO "$complete" | $GREP " "`
15849      if test "x$has_space" != x; then
15850        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15851$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15852      fi
15853      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15854    fi
15855  fi
15856
15857  # Now new_path has a complete unix path to the binary
15858  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15859    # Keep paths in /bin as-is, but remove trailing .exe if any
15860    new_path="${new_path/%.exe/}"
15861    # Do not save /bin paths to all_fixpath_prefixes!
15862  else
15863    # Not in mixed or Windows style, start by that.
15864    new_path=`cmd //c echo $new_path`
15865
15866  input_path="$new_path"
15867  # Check if we need to convert this using DOS-style short mode. If the path
15868  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15869  # take no chances and rewrite it.
15870  # Note: m4 eats our [], so we need to use [ and ] instead.
15871  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15872  if test "x$has_forbidden_chars" != x; then
15873    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15874    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15875  fi
15876
15877    # Output is in $new_path
15878
15879  windows_path="$new_path"
15880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15881    unix_path=`$CYGPATH -u "$windows_path"`
15882    new_path="$unix_path"
15883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15885    new_path="$unix_path"
15886  fi
15887
15888    # remove trailing .exe if any
15889    new_path="${new_path/%.exe/}"
15890
15891    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15892    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15893  fi
15894
15895  else
15896    # We're on a posix platform. Hooray! :)
15897    # First separate the path from the arguments. This will split at the first
15898    # space.
15899    complete="$FOUND_MAKE"
15900    path="${complete%% *}"
15901    tmp="$complete EOL"
15902    arguments="${tmp#* }"
15903
15904    # Cannot rely on the command "which" here since it doesn't always work.
15905    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15906    if test -z "$is_absolute_path"; then
15907      # Path to executable is not absolute. Find it.
15908      IFS_save="$IFS"
15909      IFS=:
15910      for p in $PATH; do
15911        if test -f "$p/$path" && test -x "$p/$path"; then
15912          new_path="$p/$path"
15913          break
15914        fi
15915      done
15916      IFS="$IFS_save"
15917    else
15918      # This is an absolute path, we can use it without further modifications.
15919      new_path="$path"
15920    fi
15921
15922    if test "x$new_path" = x; then
15923      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15924$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15925      has_space=`$ECHO "$complete" | $GREP " "`
15926      if test "x$has_space" != x; then
15927        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15928$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15929      fi
15930      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15931    fi
15932  fi
15933
15934  # Now join together the path and the arguments once again
15935  if test "x$arguments" != xEOL; then
15936    new_complete="$new_path ${arguments% *}"
15937  else
15938    new_complete="$new_path"
15939  fi
15940
15941  if test "x$complete" != "x$new_complete"; then
15942    FOUND_MAKE="$new_complete"
15943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15944$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15945  fi
15946
15947        fi
15948      fi
15949    fi
15950  fi
15951
15952
15953    if test "x$FOUND_MAKE" = x; then
15954      for ac_prog in make
15955do
15956  # Extract the first word of "$ac_prog", so it can be a program name with args.
15957set dummy $ac_prog; ac_word=$2
15958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15959$as_echo_n "checking for $ac_word... " >&6; }
15960if ${ac_cv_path_CHECK_MAKE+:} false; then :
15961  $as_echo_n "(cached) " >&6
15962else
15963  case $CHECK_MAKE in
15964  [\\/]* | ?:[\\/]*)
15965  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
15966  ;;
15967  *)
15968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15969for as_dir in $PATH
15970do
15971  IFS=$as_save_IFS
15972  test -z "$as_dir" && as_dir=.
15973    for ac_exec_ext in '' $ac_executable_extensions; do
15974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15975    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
15976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15977    break 2
15978  fi
15979done
15980  done
15981IFS=$as_save_IFS
15982
15983  ;;
15984esac
15985fi
15986CHECK_MAKE=$ac_cv_path_CHECK_MAKE
15987if test -n "$CHECK_MAKE"; then
15988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
15989$as_echo "$CHECK_MAKE" >&6; }
15990else
15991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15992$as_echo "no" >&6; }
15993fi
15994
15995
15996  test -n "$CHECK_MAKE" && break
15997done
15998
15999
16000  MAKE_CANDIDATE=""$CHECK_MAKE""
16001  DESCRIPTION="make in PATH"
16002  if test "x$MAKE_CANDIDATE" != x; then
16003    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16004$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16005    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16006    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16007    if test "x$IS_GNU_MAKE" = x; then
16008      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16009$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16010    else
16011      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16012      if test "x$IS_MODERN_MAKE" = x; then
16013        { $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
16014$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;}
16015      else
16016        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16017          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16018            MAKE_EXPECTED_ENV='cygwin'
16019          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16020            MAKE_EXPECTED_ENV='msys'
16021          else
16022            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16023          fi
16024          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16025          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16026        else
16027          # Not relevant for non-Windows
16028          IS_MAKE_CORRECT_ENV=true
16029        fi
16030        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16031          { $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
16032$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;}
16033        else
16034          FOUND_MAKE=$MAKE_CANDIDATE
16035
16036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16037
16038  # First separate the path from the arguments. This will split at the first
16039  # space.
16040  complete="$FOUND_MAKE"
16041  path="${complete%% *}"
16042  tmp="$complete EOL"
16043  arguments="${tmp#* }"
16044
16045  # Input might be given as Windows format, start by converting to
16046  # unix format.
16047  new_path=`$CYGPATH -u "$path"`
16048
16049  # Now try to locate executable using which
16050  new_path=`$WHICH "$new_path" 2> /dev/null`
16051  # bat and cmd files are not always considered executable in cygwin causing which
16052  # to not find them
16053  if test "x$new_path" = x \
16054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16056    new_path=`$CYGPATH -u "$path"`
16057  fi
16058  if test "x$new_path" = x; then
16059    # Oops. Which didn't find the executable.
16060    # The splitting of arguments from the executable at a space might have been incorrect,
16061    # since paths with space are more likely in Windows. Give it another try with the whole
16062    # argument.
16063    path="$complete"
16064    arguments="EOL"
16065    new_path=`$CYGPATH -u "$path"`
16066    new_path=`$WHICH "$new_path" 2> /dev/null`
16067    # bat and cmd files are not always considered executable in cygwin causing which
16068    # to not find them
16069    if test "x$new_path" = x \
16070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16072      new_path=`$CYGPATH -u "$path"`
16073    fi
16074    if test "x$new_path" = x; then
16075      # It's still not found. Now this is an unrecoverable error.
16076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16078      has_space=`$ECHO "$complete" | $GREP " "`
16079      if test "x$has_space" != x; then
16080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16082      fi
16083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16084    fi
16085  fi
16086
16087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16090  # "foo.exe" is OK but "foo" is an error.
16091  #
16092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16093  # It is also a way to make sure we got the proper file name for the real test later on.
16094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16095  if test "x$test_shortpath" = x; then
16096    # Short path failed, file does not exist as specified.
16097    # Try adding .exe or .cmd
16098    if test -f "${new_path}.exe"; then
16099      input_to_shortpath="${new_path}.exe"
16100    elif test -f "${new_path}.cmd"; then
16101      input_to_shortpath="${new_path}.cmd"
16102    else
16103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16108    fi
16109  else
16110    input_to_shortpath="$new_path"
16111  fi
16112
16113  # Call helper function which possibly converts this using DOS-style short mode.
16114  # If so, the updated path is stored in $new_path.
16115  new_path="$input_to_shortpath"
16116
16117  input_path="$input_to_shortpath"
16118  # Check if we need to convert this using DOS-style short mode. If the path
16119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16120  # take no chances and rewrite it.
16121  # Note: m4 eats our [], so we need to use [ and ] instead.
16122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16123  if test "x$has_forbidden_chars" != x; then
16124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16128      # Going to short mode and back again did indeed matter. Since short mode is
16129      # case insensitive, let's make it lowercase to improve readability.
16130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16131      # Now convert it back to Unix-stile (cygpath)
16132      input_path=`$CYGPATH -u "$shortmode_path"`
16133      new_path="$input_path"
16134    fi
16135  fi
16136
16137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16138  if test "x$test_cygdrive_prefix" = x; then
16139    # As a simple fix, exclude /usr/bin since it's not a real path.
16140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16142      # a path prefixed by /cygdrive for fixpath to work.
16143      new_path="$CYGWIN_ROOT_PATH$input_path"
16144    fi
16145  fi
16146
16147  # remove trailing .exe if any
16148  new_path="${new_path/%.exe/}"
16149
16150  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16151
16152  # First separate the path from the arguments. This will split at the first
16153  # space.
16154  complete="$FOUND_MAKE"
16155  path="${complete%% *}"
16156  tmp="$complete EOL"
16157  arguments="${tmp#* }"
16158
16159  # Input might be given as Windows format, start by converting to
16160  # unix format.
16161  new_path="$path"
16162
16163  windows_path="$new_path"
16164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16165    unix_path=`$CYGPATH -u "$windows_path"`
16166    new_path="$unix_path"
16167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16169    new_path="$unix_path"
16170  fi
16171
16172
16173  # Now try to locate executable using which
16174  new_path=`$WHICH "$new_path" 2> /dev/null`
16175
16176  if test "x$new_path" = x; then
16177    # Oops. Which didn't find the executable.
16178    # The splitting of arguments from the executable at a space might have been incorrect,
16179    # since paths with space are more likely in Windows. Give it another try with the whole
16180    # argument.
16181    path="$complete"
16182    arguments="EOL"
16183    new_path="$path"
16184
16185  windows_path="$new_path"
16186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16187    unix_path=`$CYGPATH -u "$windows_path"`
16188    new_path="$unix_path"
16189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16191    new_path="$unix_path"
16192  fi
16193
16194
16195    new_path=`$WHICH "$new_path" 2> /dev/null`
16196
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  # Now new_path has a complete unix path to the binary
16211  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16212    # Keep paths in /bin as-is, but remove trailing .exe if any
16213    new_path="${new_path/%.exe/}"
16214    # Do not save /bin paths to all_fixpath_prefixes!
16215  else
16216    # Not in mixed or Windows style, start by that.
16217    new_path=`cmd //c echo $new_path`
16218
16219  input_path="$new_path"
16220  # Check if we need to convert this using DOS-style short mode. If the path
16221  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16222  # take no chances and rewrite it.
16223  # Note: m4 eats our [], so we need to use [ and ] instead.
16224  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16225  if test "x$has_forbidden_chars" != x; then
16226    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16227    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16228  fi
16229
16230    # Output is in $new_path
16231
16232  windows_path="$new_path"
16233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16234    unix_path=`$CYGPATH -u "$windows_path"`
16235    new_path="$unix_path"
16236  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16237    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16238    new_path="$unix_path"
16239  fi
16240
16241    # remove trailing .exe if any
16242    new_path="${new_path/%.exe/}"
16243
16244    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16245    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16246  fi
16247
16248  else
16249    # We're on a posix platform. Hooray! :)
16250    # First separate the path from the arguments. This will split at the first
16251    # space.
16252    complete="$FOUND_MAKE"
16253    path="${complete%% *}"
16254    tmp="$complete EOL"
16255    arguments="${tmp#* }"
16256
16257    # Cannot rely on the command "which" here since it doesn't always work.
16258    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16259    if test -z "$is_absolute_path"; then
16260      # Path to executable is not absolute. Find it.
16261      IFS_save="$IFS"
16262      IFS=:
16263      for p in $PATH; do
16264        if test -f "$p/$path" && test -x "$p/$path"; then
16265          new_path="$p/$path"
16266          break
16267        fi
16268      done
16269      IFS="$IFS_save"
16270    else
16271      # This is an absolute path, we can use it without further modifications.
16272      new_path="$path"
16273    fi
16274
16275    if test "x$new_path" = x; then
16276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16277$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16278      has_space=`$ECHO "$complete" | $GREP " "`
16279      if test "x$has_space" != x; then
16280        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16281$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16282      fi
16283      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16284    fi
16285  fi
16286
16287  # Now join together the path and the arguments once again
16288  if test "x$arguments" != xEOL; then
16289    new_complete="$new_path ${arguments% *}"
16290  else
16291    new_complete="$new_path"
16292  fi
16293
16294  if test "x$complete" != "x$new_complete"; then
16295    FOUND_MAKE="$new_complete"
16296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16297$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16298  fi
16299
16300        fi
16301      fi
16302    fi
16303  fi
16304
16305    fi
16306
16307    if test "x$FOUND_MAKE" = x; then
16308      if test "x$TOOLCHAIN_PATH" != x; then
16309        # We have a toolchain path, check that as well before giving up.
16310        OLD_PATH=$PATH
16311        PATH=$TOOLCHAIN_PATH:$PATH
16312        for ac_prog in gmake
16313do
16314  # Extract the first word of "$ac_prog", so it can be a program name with args.
16315set dummy $ac_prog; ac_word=$2
16316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16317$as_echo_n "checking for $ac_word... " >&6; }
16318if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16319  $as_echo_n "(cached) " >&6
16320else
16321  case $CHECK_TOOLSDIR_GMAKE in
16322  [\\/]* | ?:[\\/]*)
16323  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16324  ;;
16325  *)
16326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16327for as_dir in $PATH
16328do
16329  IFS=$as_save_IFS
16330  test -z "$as_dir" && as_dir=.
16331    for ac_exec_ext in '' $ac_executable_extensions; do
16332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16333    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16335    break 2
16336  fi
16337done
16338  done
16339IFS=$as_save_IFS
16340
16341  ;;
16342esac
16343fi
16344CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16345if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16347$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16348else
16349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16350$as_echo "no" >&6; }
16351fi
16352
16353
16354  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16355done
16356
16357
16358  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16359  DESCRIPTION="gmake in tools-dir"
16360  if test "x$MAKE_CANDIDATE" != x; then
16361    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16362$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16363    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16364    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16365    if test "x$IS_GNU_MAKE" = x; then
16366      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16367$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16368    else
16369      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16370      if test "x$IS_MODERN_MAKE" = x; then
16371        { $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
16372$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;}
16373      else
16374        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16375          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16376            MAKE_EXPECTED_ENV='cygwin'
16377          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16378            MAKE_EXPECTED_ENV='msys'
16379          else
16380            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16381          fi
16382          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16383          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16384        else
16385          # Not relevant for non-Windows
16386          IS_MAKE_CORRECT_ENV=true
16387        fi
16388        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16389          { $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
16390$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;}
16391        else
16392          FOUND_MAKE=$MAKE_CANDIDATE
16393
16394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16395
16396  # First separate the path from the arguments. This will split at the first
16397  # space.
16398  complete="$FOUND_MAKE"
16399  path="${complete%% *}"
16400  tmp="$complete EOL"
16401  arguments="${tmp#* }"
16402
16403  # Input might be given as Windows format, start by converting to
16404  # unix format.
16405  new_path=`$CYGPATH -u "$path"`
16406
16407  # Now try to locate executable using which
16408  new_path=`$WHICH "$new_path" 2> /dev/null`
16409  # bat and cmd files are not always considered executable in cygwin causing which
16410  # to not find them
16411  if test "x$new_path" = x \
16412      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16413      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16414    new_path=`$CYGPATH -u "$path"`
16415  fi
16416  if test "x$new_path" = x; then
16417    # Oops. Which didn't find the executable.
16418    # The splitting of arguments from the executable at a space might have been incorrect,
16419    # since paths with space are more likely in Windows. Give it another try with the whole
16420    # argument.
16421    path="$complete"
16422    arguments="EOL"
16423    new_path=`$CYGPATH -u "$path"`
16424    new_path=`$WHICH "$new_path" 2> /dev/null`
16425    # bat and cmd files are not always considered executable in cygwin causing which
16426    # to not find them
16427    if test "x$new_path" = x \
16428        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16429        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16430      new_path=`$CYGPATH -u "$path"`
16431    fi
16432    if test "x$new_path" = x; then
16433      # It's still not found. Now this is an unrecoverable error.
16434      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16435$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16436      has_space=`$ECHO "$complete" | $GREP " "`
16437      if test "x$has_space" != x; then
16438        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16439$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16440      fi
16441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16442    fi
16443  fi
16444
16445  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16446  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16447  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16448  # "foo.exe" is OK but "foo" is an error.
16449  #
16450  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16451  # It is also a way to make sure we got the proper file name for the real test later on.
16452  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16453  if test "x$test_shortpath" = x; then
16454    # Short path failed, file does not exist as specified.
16455    # Try adding .exe or .cmd
16456    if test -f "${new_path}.exe"; then
16457      input_to_shortpath="${new_path}.exe"
16458    elif test -f "${new_path}.cmd"; then
16459      input_to_shortpath="${new_path}.cmd"
16460    else
16461      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16462$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16463      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16464$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16465      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16466    fi
16467  else
16468    input_to_shortpath="$new_path"
16469  fi
16470
16471  # Call helper function which possibly converts this using DOS-style short mode.
16472  # If so, the updated path is stored in $new_path.
16473  new_path="$input_to_shortpath"
16474
16475  input_path="$input_to_shortpath"
16476  # Check if we need to convert this using DOS-style short mode. If the path
16477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16478  # take no chances and rewrite it.
16479  # Note: m4 eats our [], so we need to use [ and ] instead.
16480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16481  if test "x$has_forbidden_chars" != x; then
16482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16483    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16484    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16485    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16486      # Going to short mode and back again did indeed matter. Since short mode is
16487      # case insensitive, let's make it lowercase to improve readability.
16488      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16489      # Now convert it back to Unix-stile (cygpath)
16490      input_path=`$CYGPATH -u "$shortmode_path"`
16491      new_path="$input_path"
16492    fi
16493  fi
16494
16495  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16496  if test "x$test_cygdrive_prefix" = x; then
16497    # As a simple fix, exclude /usr/bin since it's not a real path.
16498    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16499      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16500      # a path prefixed by /cygdrive for fixpath to work.
16501      new_path="$CYGWIN_ROOT_PATH$input_path"
16502    fi
16503  fi
16504
16505  # remove trailing .exe if any
16506  new_path="${new_path/%.exe/}"
16507
16508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16509
16510  # First separate the path from the arguments. This will split at the first
16511  # space.
16512  complete="$FOUND_MAKE"
16513  path="${complete%% *}"
16514  tmp="$complete EOL"
16515  arguments="${tmp#* }"
16516
16517  # Input might be given as Windows format, start by converting to
16518  # unix format.
16519  new_path="$path"
16520
16521  windows_path="$new_path"
16522  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16523    unix_path=`$CYGPATH -u "$windows_path"`
16524    new_path="$unix_path"
16525  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16526    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16527    new_path="$unix_path"
16528  fi
16529
16530
16531  # Now try to locate executable using which
16532  new_path=`$WHICH "$new_path" 2> /dev/null`
16533
16534  if test "x$new_path" = x; then
16535    # Oops. Which didn't find the executable.
16536    # The splitting of arguments from the executable at a space might have been incorrect,
16537    # since paths with space are more likely in Windows. Give it another try with the whole
16538    # argument.
16539    path="$complete"
16540    arguments="EOL"
16541    new_path="$path"
16542
16543  windows_path="$new_path"
16544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16545    unix_path=`$CYGPATH -u "$windows_path"`
16546    new_path="$unix_path"
16547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16549    new_path="$unix_path"
16550  fi
16551
16552
16553    new_path=`$WHICH "$new_path" 2> /dev/null`
16554
16555    if test "x$new_path" = x; then
16556      # It's still not found. Now this is an unrecoverable error.
16557      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16558$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16559      has_space=`$ECHO "$complete" | $GREP " "`
16560      if test "x$has_space" != x; then
16561        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16562$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16563      fi
16564      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16565    fi
16566  fi
16567
16568  # Now new_path has a complete unix path to the binary
16569  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16570    # Keep paths in /bin as-is, but remove trailing .exe if any
16571    new_path="${new_path/%.exe/}"
16572    # Do not save /bin paths to all_fixpath_prefixes!
16573  else
16574    # Not in mixed or Windows style, start by that.
16575    new_path=`cmd //c echo $new_path`
16576
16577  input_path="$new_path"
16578  # Check if we need to convert this using DOS-style short mode. If the path
16579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16580  # take no chances and rewrite it.
16581  # Note: m4 eats our [], so we need to use [ and ] instead.
16582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16583  if test "x$has_forbidden_chars" != x; then
16584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16585    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16586  fi
16587
16588    # Output is in $new_path
16589
16590  windows_path="$new_path"
16591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16592    unix_path=`$CYGPATH -u "$windows_path"`
16593    new_path="$unix_path"
16594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16596    new_path="$unix_path"
16597  fi
16598
16599    # remove trailing .exe if any
16600    new_path="${new_path/%.exe/}"
16601
16602    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16603    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16604  fi
16605
16606  else
16607    # We're on a posix platform. Hooray! :)
16608    # First separate the path from the arguments. This will split at the first
16609    # space.
16610    complete="$FOUND_MAKE"
16611    path="${complete%% *}"
16612    tmp="$complete EOL"
16613    arguments="${tmp#* }"
16614
16615    # Cannot rely on the command "which" here since it doesn't always work.
16616    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16617    if test -z "$is_absolute_path"; then
16618      # Path to executable is not absolute. Find it.
16619      IFS_save="$IFS"
16620      IFS=:
16621      for p in $PATH; do
16622        if test -f "$p/$path" && test -x "$p/$path"; then
16623          new_path="$p/$path"
16624          break
16625        fi
16626      done
16627      IFS="$IFS_save"
16628    else
16629      # This is an absolute path, we can use it without further modifications.
16630      new_path="$path"
16631    fi
16632
16633    if test "x$new_path" = x; then
16634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16635$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16636      has_space=`$ECHO "$complete" | $GREP " "`
16637      if test "x$has_space" != x; then
16638        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16639$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16640      fi
16641      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16642    fi
16643  fi
16644
16645  # Now join together the path and the arguments once again
16646  if test "x$arguments" != xEOL; then
16647    new_complete="$new_path ${arguments% *}"
16648  else
16649    new_complete="$new_path"
16650  fi
16651
16652  if test "x$complete" != "x$new_complete"; then
16653    FOUND_MAKE="$new_complete"
16654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16655$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16656  fi
16657
16658        fi
16659      fi
16660    fi
16661  fi
16662
16663        if test "x$FOUND_MAKE" = x; then
16664          for ac_prog in make
16665do
16666  # Extract the first word of "$ac_prog", so it can be a program name with args.
16667set dummy $ac_prog; ac_word=$2
16668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16669$as_echo_n "checking for $ac_word... " >&6; }
16670if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16671  $as_echo_n "(cached) " >&6
16672else
16673  case $CHECK_TOOLSDIR_MAKE in
16674  [\\/]* | ?:[\\/]*)
16675  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16676  ;;
16677  *)
16678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16679for as_dir in $PATH
16680do
16681  IFS=$as_save_IFS
16682  test -z "$as_dir" && as_dir=.
16683    for ac_exec_ext in '' $ac_executable_extensions; do
16684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16685    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16687    break 2
16688  fi
16689done
16690  done
16691IFS=$as_save_IFS
16692
16693  ;;
16694esac
16695fi
16696CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16697if test -n "$CHECK_TOOLSDIR_MAKE"; then
16698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16699$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16700else
16701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16702$as_echo "no" >&6; }
16703fi
16704
16705
16706  test -n "$CHECK_TOOLSDIR_MAKE" && break
16707done
16708
16709
16710  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16711  DESCRIPTION="make in tools-dir"
16712  if test "x$MAKE_CANDIDATE" != x; then
16713    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16714$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16715    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16716    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16717    if test "x$IS_GNU_MAKE" = x; then
16718      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16719$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16720    else
16721      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16722      if test "x$IS_MODERN_MAKE" = x; then
16723        { $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
16724$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;}
16725      else
16726        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16727          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16728            MAKE_EXPECTED_ENV='cygwin'
16729          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16730            MAKE_EXPECTED_ENV='msys'
16731          else
16732            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16733          fi
16734          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16735          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16736        else
16737          # Not relevant for non-Windows
16738          IS_MAKE_CORRECT_ENV=true
16739        fi
16740        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16741          { $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
16742$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;}
16743        else
16744          FOUND_MAKE=$MAKE_CANDIDATE
16745
16746  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16747
16748  # First separate the path from the arguments. This will split at the first
16749  # space.
16750  complete="$FOUND_MAKE"
16751  path="${complete%% *}"
16752  tmp="$complete EOL"
16753  arguments="${tmp#* }"
16754
16755  # Input might be given as Windows format, start by converting to
16756  # unix format.
16757  new_path=`$CYGPATH -u "$path"`
16758
16759  # Now try to locate executable using which
16760  new_path=`$WHICH "$new_path" 2> /dev/null`
16761  # bat and cmd files are not always considered executable in cygwin causing which
16762  # to not find them
16763  if test "x$new_path" = x \
16764      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16765      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16766    new_path=`$CYGPATH -u "$path"`
16767  fi
16768  if test "x$new_path" = x; then
16769    # Oops. Which didn't find the executable.
16770    # The splitting of arguments from the executable at a space might have been incorrect,
16771    # since paths with space are more likely in Windows. Give it another try with the whole
16772    # argument.
16773    path="$complete"
16774    arguments="EOL"
16775    new_path=`$CYGPATH -u "$path"`
16776    new_path=`$WHICH "$new_path" 2> /dev/null`
16777    # bat and cmd files are not always considered executable in cygwin causing which
16778    # to not find them
16779    if test "x$new_path" = x \
16780        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16781        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16782      new_path=`$CYGPATH -u "$path"`
16783    fi
16784    if test "x$new_path" = x; then
16785      # It's still not found. Now this is an unrecoverable error.
16786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16787$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16788      has_space=`$ECHO "$complete" | $GREP " "`
16789      if test "x$has_space" != x; then
16790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16792      fi
16793      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16794    fi
16795  fi
16796
16797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16800  # "foo.exe" is OK but "foo" is an error.
16801  #
16802  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16803  # It is also a way to make sure we got the proper file name for the real test later on.
16804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16805  if test "x$test_shortpath" = x; then
16806    # Short path failed, file does not exist as specified.
16807    # Try adding .exe or .cmd
16808    if test -f "${new_path}.exe"; then
16809      input_to_shortpath="${new_path}.exe"
16810    elif test -f "${new_path}.cmd"; then
16811      input_to_shortpath="${new_path}.cmd"
16812    else
16813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16814$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16815      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16816$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16817      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16818    fi
16819  else
16820    input_to_shortpath="$new_path"
16821  fi
16822
16823  # Call helper function which possibly converts this using DOS-style short mode.
16824  # If so, the updated path is stored in $new_path.
16825  new_path="$input_to_shortpath"
16826
16827  input_path="$input_to_shortpath"
16828  # Check if we need to convert this using DOS-style short mode. If the path
16829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16830  # take no chances and rewrite it.
16831  # Note: m4 eats our [], so we need to use [ and ] instead.
16832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16833  if test "x$has_forbidden_chars" != x; then
16834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16838      # Going to short mode and back again did indeed matter. Since short mode is
16839      # case insensitive, let's make it lowercase to improve readability.
16840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16841      # Now convert it back to Unix-stile (cygpath)
16842      input_path=`$CYGPATH -u "$shortmode_path"`
16843      new_path="$input_path"
16844    fi
16845  fi
16846
16847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16848  if test "x$test_cygdrive_prefix" = x; then
16849    # As a simple fix, exclude /usr/bin since it's not a real path.
16850    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16852      # a path prefixed by /cygdrive for fixpath to work.
16853      new_path="$CYGWIN_ROOT_PATH$input_path"
16854    fi
16855  fi
16856
16857  # remove trailing .exe if any
16858  new_path="${new_path/%.exe/}"
16859
16860  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16861
16862  # First separate the path from the arguments. This will split at the first
16863  # space.
16864  complete="$FOUND_MAKE"
16865  path="${complete%% *}"
16866  tmp="$complete EOL"
16867  arguments="${tmp#* }"
16868
16869  # Input might be given as Windows format, start by converting to
16870  # unix format.
16871  new_path="$path"
16872
16873  windows_path="$new_path"
16874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16875    unix_path=`$CYGPATH -u "$windows_path"`
16876    new_path="$unix_path"
16877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16879    new_path="$unix_path"
16880  fi
16881
16882
16883  # Now try to locate executable using which
16884  new_path=`$WHICH "$new_path" 2> /dev/null`
16885
16886  if test "x$new_path" = x; then
16887    # Oops. Which didn't find the executable.
16888    # The splitting of arguments from the executable at a space might have been incorrect,
16889    # since paths with space are more likely in Windows. Give it another try with the whole
16890    # argument.
16891    path="$complete"
16892    arguments="EOL"
16893    new_path="$path"
16894
16895  windows_path="$new_path"
16896  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16897    unix_path=`$CYGPATH -u "$windows_path"`
16898    new_path="$unix_path"
16899  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16900    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16901    new_path="$unix_path"
16902  fi
16903
16904
16905    new_path=`$WHICH "$new_path" 2> /dev/null`
16906
16907    if test "x$new_path" = x; then
16908      # It's still not found. Now this is an unrecoverable error.
16909      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16910$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16911      has_space=`$ECHO "$complete" | $GREP " "`
16912      if test "x$has_space" != x; then
16913        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16914$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16915      fi
16916      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16917    fi
16918  fi
16919
16920  # Now new_path has a complete unix path to the binary
16921  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16922    # Keep paths in /bin as-is, but remove trailing .exe if any
16923    new_path="${new_path/%.exe/}"
16924    # Do not save /bin paths to all_fixpath_prefixes!
16925  else
16926    # Not in mixed or Windows style, start by that.
16927    new_path=`cmd //c echo $new_path`
16928
16929  input_path="$new_path"
16930  # Check if we need to convert this using DOS-style short mode. If the path
16931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16932  # take no chances and rewrite it.
16933  # Note: m4 eats our [], so we need to use [ and ] instead.
16934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16935  if test "x$has_forbidden_chars" != x; then
16936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16938  fi
16939
16940    # Output is in $new_path
16941
16942  windows_path="$new_path"
16943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16944    unix_path=`$CYGPATH -u "$windows_path"`
16945    new_path="$unix_path"
16946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16948    new_path="$unix_path"
16949  fi
16950
16951    # remove trailing .exe if any
16952    new_path="${new_path/%.exe/}"
16953
16954    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16955    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16956  fi
16957
16958  else
16959    # We're on a posix platform. Hooray! :)
16960    # First separate the path from the arguments. This will split at the first
16961    # space.
16962    complete="$FOUND_MAKE"
16963    path="${complete%% *}"
16964    tmp="$complete EOL"
16965    arguments="${tmp#* }"
16966
16967    # Cannot rely on the command "which" here since it doesn't always work.
16968    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16969    if test -z "$is_absolute_path"; then
16970      # Path to executable is not absolute. Find it.
16971      IFS_save="$IFS"
16972      IFS=:
16973      for p in $PATH; do
16974        if test -f "$p/$path" && test -x "$p/$path"; then
16975          new_path="$p/$path"
16976          break
16977        fi
16978      done
16979      IFS="$IFS_save"
16980    else
16981      # This is an absolute path, we can use it without further modifications.
16982      new_path="$path"
16983    fi
16984
16985    if test "x$new_path" = x; then
16986      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16987$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16988      has_space=`$ECHO "$complete" | $GREP " "`
16989      if test "x$has_space" != x; then
16990        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16991$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16992      fi
16993      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16994    fi
16995  fi
16996
16997  # Now join together the path and the arguments once again
16998  if test "x$arguments" != xEOL; then
16999    new_complete="$new_path ${arguments% *}"
17000  else
17001    new_complete="$new_path"
17002  fi
17003
17004  if test "x$complete" != "x$new_complete"; then
17005    FOUND_MAKE="$new_complete"
17006    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17007$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17008  fi
17009
17010        fi
17011      fi
17012    fi
17013  fi
17014
17015        fi
17016        PATH=$OLD_PATH
17017      fi
17018    fi
17019
17020    if test "x$FOUND_MAKE" = x; then
17021      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
17022    fi
17023  fi
17024
17025  MAKE=$FOUND_MAKE
17026
17027  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17028$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17029
17030
17031
17032  # Test if find supports -delete
17033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17034$as_echo_n "checking if find supports -delete... " >&6; }
17035  FIND_DELETE="-delete"
17036
17037  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17038
17039  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17040
17041  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17042  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17043    # No, it does not.
17044    rm $DELETEDIR/TestIfFindSupportsDelete
17045    FIND_DELETE="-exec rm \{\} \+"
17046    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17047$as_echo "no" >&6; }
17048  else
17049    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17050$as_echo "yes" >&6; }
17051  fi
17052  rmdir $DELETEDIR
17053
17054
17055
17056  # These tools might not be installed by default,
17057  # need hint on how to install them.
17058
17059
17060
17061  # Publish this variable in the help.
17062
17063
17064  if test "x$UNZIP" = x; then
17065    # The variable is not set by user, try to locate tool using the code snippet
17066    for ac_prog in unzip
17067do
17068  # Extract the first word of "$ac_prog", so it can be a program name with args.
17069set dummy $ac_prog; ac_word=$2
17070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17071$as_echo_n "checking for $ac_word... " >&6; }
17072if ${ac_cv_path_UNZIP+:} false; then :
17073  $as_echo_n "(cached) " >&6
17074else
17075  case $UNZIP in
17076  [\\/]* | ?:[\\/]*)
17077  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17078  ;;
17079  *)
17080  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17081for as_dir in $PATH
17082do
17083  IFS=$as_save_IFS
17084  test -z "$as_dir" && as_dir=.
17085    for ac_exec_ext in '' $ac_executable_extensions; do
17086  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17087    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17088    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17089    break 2
17090  fi
17091done
17092  done
17093IFS=$as_save_IFS
17094
17095  ;;
17096esac
17097fi
17098UNZIP=$ac_cv_path_UNZIP
17099if test -n "$UNZIP"; then
17100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17101$as_echo "$UNZIP" >&6; }
17102else
17103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17104$as_echo "no" >&6; }
17105fi
17106
17107
17108  test -n "$UNZIP" && break
17109done
17110
17111  else
17112    # The variable is set, but is it from the command line or the environment?
17113
17114    # Try to remove the string !UNZIP! from our list.
17115    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17116    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17117      # If it failed, the variable was not from the command line. Ignore it,
17118      # but warn the user (except for BASH, which is always set by the calling BASH).
17119      if test "xUNZIP" != xBASH; then
17120        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17121$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17122      fi
17123      # Try to locate tool using the code snippet
17124      for ac_prog in unzip
17125do
17126  # Extract the first word of "$ac_prog", so it can be a program name with args.
17127set dummy $ac_prog; ac_word=$2
17128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17129$as_echo_n "checking for $ac_word... " >&6; }
17130if ${ac_cv_path_UNZIP+:} false; then :
17131  $as_echo_n "(cached) " >&6
17132else
17133  case $UNZIP in
17134  [\\/]* | ?:[\\/]*)
17135  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17136  ;;
17137  *)
17138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17139for as_dir in $PATH
17140do
17141  IFS=$as_save_IFS
17142  test -z "$as_dir" && as_dir=.
17143    for ac_exec_ext in '' $ac_executable_extensions; do
17144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17145    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17147    break 2
17148  fi
17149done
17150  done
17151IFS=$as_save_IFS
17152
17153  ;;
17154esac
17155fi
17156UNZIP=$ac_cv_path_UNZIP
17157if test -n "$UNZIP"; then
17158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17159$as_echo "$UNZIP" >&6; }
17160else
17161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17162$as_echo "no" >&6; }
17163fi
17164
17165
17166  test -n "$UNZIP" && break
17167done
17168
17169    else
17170      # If it succeeded, then it was overridden by the user. We will use it
17171      # for the tool.
17172
17173      # First remove it from the list of overridden variables, so we can test
17174      # for unknown variables in the end.
17175      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17176
17177      # Check if the provided tool contains a complete path.
17178      tool_specified="$UNZIP"
17179      tool_basename="${tool_specified##*/}"
17180      if test "x$tool_basename" = "x$tool_specified"; then
17181        # A command without a complete path is provided, search $PATH.
17182        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17183$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17184        # Extract the first word of "$tool_basename", so it can be a program name with args.
17185set dummy $tool_basename; ac_word=$2
17186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17187$as_echo_n "checking for $ac_word... " >&6; }
17188if ${ac_cv_path_UNZIP+:} false; then :
17189  $as_echo_n "(cached) " >&6
17190else
17191  case $UNZIP in
17192  [\\/]* | ?:[\\/]*)
17193  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17194  ;;
17195  *)
17196  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17197for as_dir in $PATH
17198do
17199  IFS=$as_save_IFS
17200  test -z "$as_dir" && as_dir=.
17201    for ac_exec_ext in '' $ac_executable_extensions; do
17202  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17203    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17204    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17205    break 2
17206  fi
17207done
17208  done
17209IFS=$as_save_IFS
17210
17211  ;;
17212esac
17213fi
17214UNZIP=$ac_cv_path_UNZIP
17215if test -n "$UNZIP"; then
17216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17217$as_echo "$UNZIP" >&6; }
17218else
17219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17220$as_echo "no" >&6; }
17221fi
17222
17223
17224        if test "x$UNZIP" = x; then
17225          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17226        fi
17227      else
17228        # Otherwise we believe it is a complete path. Use it as it is.
17229        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17230$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17232$as_echo_n "checking for UNZIP... " >&6; }
17233        if test ! -x "$tool_specified"; then
17234          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17235$as_echo "not found" >&6; }
17236          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17237        fi
17238        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17239$as_echo "$tool_specified" >&6; }
17240      fi
17241    fi
17242  fi
17243
17244
17245
17246  if test "x$UNZIP" = x; then
17247    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17248  fi
17249
17250
17251
17252
17253
17254  # Publish this variable in the help.
17255
17256
17257  if test "x$ZIP" = x; then
17258    # The variable is not set by user, try to locate tool using the code snippet
17259    for ac_prog in zip
17260do
17261  # Extract the first word of "$ac_prog", so it can be a program name with args.
17262set dummy $ac_prog; ac_word=$2
17263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17264$as_echo_n "checking for $ac_word... " >&6; }
17265if ${ac_cv_path_ZIP+:} false; then :
17266  $as_echo_n "(cached) " >&6
17267else
17268  case $ZIP in
17269  [\\/]* | ?:[\\/]*)
17270  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17271  ;;
17272  *)
17273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17274for as_dir in $PATH
17275do
17276  IFS=$as_save_IFS
17277  test -z "$as_dir" && as_dir=.
17278    for ac_exec_ext in '' $ac_executable_extensions; do
17279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17280    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17282    break 2
17283  fi
17284done
17285  done
17286IFS=$as_save_IFS
17287
17288  ;;
17289esac
17290fi
17291ZIP=$ac_cv_path_ZIP
17292if test -n "$ZIP"; then
17293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17294$as_echo "$ZIP" >&6; }
17295else
17296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17297$as_echo "no" >&6; }
17298fi
17299
17300
17301  test -n "$ZIP" && break
17302done
17303
17304  else
17305    # The variable is set, but is it from the command line or the environment?
17306
17307    # Try to remove the string !ZIP! from our list.
17308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17310      # If it failed, the variable was not from the command line. Ignore it,
17311      # but warn the user (except for BASH, which is always set by the calling BASH).
17312      if test "xZIP" != xBASH; then
17313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17314$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17315      fi
17316      # Try to locate tool using the code snippet
17317      for ac_prog in zip
17318do
17319  # Extract the first word of "$ac_prog", so it can be a program name with args.
17320set dummy $ac_prog; ac_word=$2
17321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17322$as_echo_n "checking for $ac_word... " >&6; }
17323if ${ac_cv_path_ZIP+:} false; then :
17324  $as_echo_n "(cached) " >&6
17325else
17326  case $ZIP in
17327  [\\/]* | ?:[\\/]*)
17328  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17329  ;;
17330  *)
17331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17332for as_dir in $PATH
17333do
17334  IFS=$as_save_IFS
17335  test -z "$as_dir" && as_dir=.
17336    for ac_exec_ext in '' $ac_executable_extensions; do
17337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17338    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17340    break 2
17341  fi
17342done
17343  done
17344IFS=$as_save_IFS
17345
17346  ;;
17347esac
17348fi
17349ZIP=$ac_cv_path_ZIP
17350if test -n "$ZIP"; then
17351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17352$as_echo "$ZIP" >&6; }
17353else
17354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17355$as_echo "no" >&6; }
17356fi
17357
17358
17359  test -n "$ZIP" && break
17360done
17361
17362    else
17363      # If it succeeded, then it was overridden by the user. We will use it
17364      # for the tool.
17365
17366      # First remove it from the list of overridden variables, so we can test
17367      # for unknown variables in the end.
17368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17369
17370      # Check if the provided tool contains a complete path.
17371      tool_specified="$ZIP"
17372      tool_basename="${tool_specified##*/}"
17373      if test "x$tool_basename" = "x$tool_specified"; then
17374        # A command without a complete path is provided, search $PATH.
17375        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17376$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17377        # Extract the first word of "$tool_basename", so it can be a program name with args.
17378set dummy $tool_basename; ac_word=$2
17379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17380$as_echo_n "checking for $ac_word... " >&6; }
17381if ${ac_cv_path_ZIP+:} false; then :
17382  $as_echo_n "(cached) " >&6
17383else
17384  case $ZIP in
17385  [\\/]* | ?:[\\/]*)
17386  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17387  ;;
17388  *)
17389  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17390for as_dir in $PATH
17391do
17392  IFS=$as_save_IFS
17393  test -z "$as_dir" && as_dir=.
17394    for ac_exec_ext in '' $ac_executable_extensions; do
17395  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17396    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17397    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17398    break 2
17399  fi
17400done
17401  done
17402IFS=$as_save_IFS
17403
17404  ;;
17405esac
17406fi
17407ZIP=$ac_cv_path_ZIP
17408if test -n "$ZIP"; then
17409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17410$as_echo "$ZIP" >&6; }
17411else
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17413$as_echo "no" >&6; }
17414fi
17415
17416
17417        if test "x$ZIP" = x; then
17418          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17419        fi
17420      else
17421        # Otherwise we believe it is a complete path. Use it as it is.
17422        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17423$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17424        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17425$as_echo_n "checking for ZIP... " >&6; }
17426        if test ! -x "$tool_specified"; then
17427          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17428$as_echo "not found" >&6; }
17429          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17430        fi
17431        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17432$as_echo "$tool_specified" >&6; }
17433      fi
17434    fi
17435  fi
17436
17437
17438
17439  if test "x$ZIP" = x; then
17440    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17441  fi
17442
17443
17444
17445  # Non-required basic tools
17446
17447
17448
17449  # Publish this variable in the help.
17450
17451
17452  if test "x$LDD" = x; then
17453    # The variable is not set by user, try to locate tool using the code snippet
17454    for ac_prog in ldd
17455do
17456  # Extract the first word of "$ac_prog", so it can be a program name with args.
17457set dummy $ac_prog; ac_word=$2
17458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17459$as_echo_n "checking for $ac_word... " >&6; }
17460if ${ac_cv_path_LDD+:} false; then :
17461  $as_echo_n "(cached) " >&6
17462else
17463  case $LDD in
17464  [\\/]* | ?:[\\/]*)
17465  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17466  ;;
17467  *)
17468  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17469for as_dir in $PATH
17470do
17471  IFS=$as_save_IFS
17472  test -z "$as_dir" && as_dir=.
17473    for ac_exec_ext in '' $ac_executable_extensions; do
17474  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17475    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17476    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17477    break 2
17478  fi
17479done
17480  done
17481IFS=$as_save_IFS
17482
17483  ;;
17484esac
17485fi
17486LDD=$ac_cv_path_LDD
17487if test -n "$LDD"; then
17488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17489$as_echo "$LDD" >&6; }
17490else
17491  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17492$as_echo "no" >&6; }
17493fi
17494
17495
17496  test -n "$LDD" && break
17497done
17498
17499  else
17500    # The variable is set, but is it from the command line or the environment?
17501
17502    # Try to remove the string !LDD! from our list.
17503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17505      # If it failed, the variable was not from the command line. Ignore it,
17506      # but warn the user (except for BASH, which is always set by the calling BASH).
17507      if test "xLDD" != xBASH; then
17508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17509$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17510      fi
17511      # Try to locate tool using the code snippet
17512      for ac_prog in ldd
17513do
17514  # Extract the first word of "$ac_prog", so it can be a program name with args.
17515set dummy $ac_prog; ac_word=$2
17516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17517$as_echo_n "checking for $ac_word... " >&6; }
17518if ${ac_cv_path_LDD+:} false; then :
17519  $as_echo_n "(cached) " >&6
17520else
17521  case $LDD in
17522  [\\/]* | ?:[\\/]*)
17523  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17524  ;;
17525  *)
17526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17527for as_dir in $PATH
17528do
17529  IFS=$as_save_IFS
17530  test -z "$as_dir" && as_dir=.
17531    for ac_exec_ext in '' $ac_executable_extensions; do
17532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17533    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17535    break 2
17536  fi
17537done
17538  done
17539IFS=$as_save_IFS
17540
17541  ;;
17542esac
17543fi
17544LDD=$ac_cv_path_LDD
17545if test -n "$LDD"; then
17546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17547$as_echo "$LDD" >&6; }
17548else
17549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17550$as_echo "no" >&6; }
17551fi
17552
17553
17554  test -n "$LDD" && break
17555done
17556
17557    else
17558      # If it succeeded, then it was overridden by the user. We will use it
17559      # for the tool.
17560
17561      # First remove it from the list of overridden variables, so we can test
17562      # for unknown variables in the end.
17563      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17564
17565      # Check if the provided tool contains a complete path.
17566      tool_specified="$LDD"
17567      tool_basename="${tool_specified##*/}"
17568      if test "x$tool_basename" = "x$tool_specified"; then
17569        # A command without a complete path is provided, search $PATH.
17570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17571$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17572        # Extract the first word of "$tool_basename", so it can be a program name with args.
17573set dummy $tool_basename; ac_word=$2
17574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17575$as_echo_n "checking for $ac_word... " >&6; }
17576if ${ac_cv_path_LDD+:} false; then :
17577  $as_echo_n "(cached) " >&6
17578else
17579  case $LDD in
17580  [\\/]* | ?:[\\/]*)
17581  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17582  ;;
17583  *)
17584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17585for as_dir in $PATH
17586do
17587  IFS=$as_save_IFS
17588  test -z "$as_dir" && as_dir=.
17589    for ac_exec_ext in '' $ac_executable_extensions; do
17590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17591    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17593    break 2
17594  fi
17595done
17596  done
17597IFS=$as_save_IFS
17598
17599  ;;
17600esac
17601fi
17602LDD=$ac_cv_path_LDD
17603if test -n "$LDD"; then
17604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17605$as_echo "$LDD" >&6; }
17606else
17607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17608$as_echo "no" >&6; }
17609fi
17610
17611
17612        if test "x$LDD" = x; then
17613          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17614        fi
17615      else
17616        # Otherwise we believe it is a complete path. Use it as it is.
17617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17618$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17619        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17620$as_echo_n "checking for LDD... " >&6; }
17621        if test ! -x "$tool_specified"; then
17622          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17623$as_echo "not found" >&6; }
17624          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17625        fi
17626        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17627$as_echo "$tool_specified" >&6; }
17628      fi
17629    fi
17630  fi
17631
17632
17633  if test "x$LDD" = "x"; then
17634    # List shared lib dependencies is used for
17635    # debug output and checking for forbidden dependencies.
17636    # We can build without it.
17637    LDD="true"
17638  fi
17639
17640
17641  # Publish this variable in the help.
17642
17643
17644  if test "x$OTOOL" = x; then
17645    # The variable is not set by user, try to locate tool using the code snippet
17646    for ac_prog in otool
17647do
17648  # Extract the first word of "$ac_prog", so it can be a program name with args.
17649set dummy $ac_prog; ac_word=$2
17650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17651$as_echo_n "checking for $ac_word... " >&6; }
17652if ${ac_cv_path_OTOOL+:} false; then :
17653  $as_echo_n "(cached) " >&6
17654else
17655  case $OTOOL in
17656  [\\/]* | ?:[\\/]*)
17657  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17658  ;;
17659  *)
17660  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17661for as_dir in $PATH
17662do
17663  IFS=$as_save_IFS
17664  test -z "$as_dir" && as_dir=.
17665    for ac_exec_ext in '' $ac_executable_extensions; do
17666  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17667    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17668    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17669    break 2
17670  fi
17671done
17672  done
17673IFS=$as_save_IFS
17674
17675  ;;
17676esac
17677fi
17678OTOOL=$ac_cv_path_OTOOL
17679if test -n "$OTOOL"; then
17680  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17681$as_echo "$OTOOL" >&6; }
17682else
17683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17684$as_echo "no" >&6; }
17685fi
17686
17687
17688  test -n "$OTOOL" && break
17689done
17690
17691  else
17692    # The variable is set, but is it from the command line or the environment?
17693
17694    # Try to remove the string !OTOOL! from our list.
17695    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17696    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17697      # If it failed, the variable was not from the command line. Ignore it,
17698      # but warn the user (except for BASH, which is always set by the calling BASH).
17699      if test "xOTOOL" != xBASH; then
17700        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17701$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17702      fi
17703      # Try to locate tool using the code snippet
17704      for ac_prog in otool
17705do
17706  # Extract the first word of "$ac_prog", so it can be a program name with args.
17707set dummy $ac_prog; ac_word=$2
17708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17709$as_echo_n "checking for $ac_word... " >&6; }
17710if ${ac_cv_path_OTOOL+:} false; then :
17711  $as_echo_n "(cached) " >&6
17712else
17713  case $OTOOL in
17714  [\\/]* | ?:[\\/]*)
17715  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17716  ;;
17717  *)
17718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17719for as_dir in $PATH
17720do
17721  IFS=$as_save_IFS
17722  test -z "$as_dir" && as_dir=.
17723    for ac_exec_ext in '' $ac_executable_extensions; do
17724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17725    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17727    break 2
17728  fi
17729done
17730  done
17731IFS=$as_save_IFS
17732
17733  ;;
17734esac
17735fi
17736OTOOL=$ac_cv_path_OTOOL
17737if test -n "$OTOOL"; then
17738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17739$as_echo "$OTOOL" >&6; }
17740else
17741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17742$as_echo "no" >&6; }
17743fi
17744
17745
17746  test -n "$OTOOL" && break
17747done
17748
17749    else
17750      # If it succeeded, then it was overridden by the user. We will use it
17751      # for the tool.
17752
17753      # First remove it from the list of overridden variables, so we can test
17754      # for unknown variables in the end.
17755      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17756
17757      # Check if the provided tool contains a complete path.
17758      tool_specified="$OTOOL"
17759      tool_basename="${tool_specified##*/}"
17760      if test "x$tool_basename" = "x$tool_specified"; then
17761        # A command without a complete path is provided, search $PATH.
17762        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17763$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17764        # Extract the first word of "$tool_basename", so it can be a program name with args.
17765set dummy $tool_basename; ac_word=$2
17766{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17767$as_echo_n "checking for $ac_word... " >&6; }
17768if ${ac_cv_path_OTOOL+:} false; then :
17769  $as_echo_n "(cached) " >&6
17770else
17771  case $OTOOL in
17772  [\\/]* | ?:[\\/]*)
17773  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17774  ;;
17775  *)
17776  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17777for as_dir in $PATH
17778do
17779  IFS=$as_save_IFS
17780  test -z "$as_dir" && as_dir=.
17781    for ac_exec_ext in '' $ac_executable_extensions; do
17782  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17783    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17784    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17785    break 2
17786  fi
17787done
17788  done
17789IFS=$as_save_IFS
17790
17791  ;;
17792esac
17793fi
17794OTOOL=$ac_cv_path_OTOOL
17795if test -n "$OTOOL"; then
17796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17797$as_echo "$OTOOL" >&6; }
17798else
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17800$as_echo "no" >&6; }
17801fi
17802
17803
17804        if test "x$OTOOL" = x; then
17805          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17806        fi
17807      else
17808        # Otherwise we believe it is a complete path. Use it as it is.
17809        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17810$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17811        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17812$as_echo_n "checking for OTOOL... " >&6; }
17813        if test ! -x "$tool_specified"; then
17814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17815$as_echo "not found" >&6; }
17816          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17817        fi
17818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17819$as_echo "$tool_specified" >&6; }
17820      fi
17821    fi
17822  fi
17823
17824
17825  if test "x$OTOOL" = "x"; then
17826    OTOOL="true"
17827  fi
17828
17829
17830  # Publish this variable in the help.
17831
17832
17833  if test "x$READELF" = x; then
17834    # The variable is not set by user, try to locate tool using the code snippet
17835    for ac_prog in greadelf readelf
17836do
17837  # Extract the first word of "$ac_prog", so it can be a program name with args.
17838set dummy $ac_prog; ac_word=$2
17839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17840$as_echo_n "checking for $ac_word... " >&6; }
17841if ${ac_cv_path_READELF+:} false; then :
17842  $as_echo_n "(cached) " >&6
17843else
17844  case $READELF in
17845  [\\/]* | ?:[\\/]*)
17846  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17847  ;;
17848  *)
17849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17850for as_dir in $PATH
17851do
17852  IFS=$as_save_IFS
17853  test -z "$as_dir" && as_dir=.
17854    for ac_exec_ext in '' $ac_executable_extensions; do
17855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17856    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17858    break 2
17859  fi
17860done
17861  done
17862IFS=$as_save_IFS
17863
17864  ;;
17865esac
17866fi
17867READELF=$ac_cv_path_READELF
17868if test -n "$READELF"; then
17869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17870$as_echo "$READELF" >&6; }
17871else
17872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17873$as_echo "no" >&6; }
17874fi
17875
17876
17877  test -n "$READELF" && break
17878done
17879
17880  else
17881    # The variable is set, but is it from the command line or the environment?
17882
17883    # Try to remove the string !READELF! from our list.
17884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
17885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17886      # If it failed, the variable was not from the command line. Ignore it,
17887      # but warn the user (except for BASH, which is always set by the calling BASH).
17888      if test "xREADELF" != xBASH; then
17889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
17890$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
17891      fi
17892      # Try to locate tool using the code snippet
17893      for ac_prog in greadelf readelf
17894do
17895  # Extract the first word of "$ac_prog", so it can be a program name with args.
17896set dummy $ac_prog; ac_word=$2
17897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17898$as_echo_n "checking for $ac_word... " >&6; }
17899if ${ac_cv_path_READELF+:} false; then :
17900  $as_echo_n "(cached) " >&6
17901else
17902  case $READELF in
17903  [\\/]* | ?:[\\/]*)
17904  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17905  ;;
17906  *)
17907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17908for as_dir in $PATH
17909do
17910  IFS=$as_save_IFS
17911  test -z "$as_dir" && as_dir=.
17912    for ac_exec_ext in '' $ac_executable_extensions; do
17913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17914    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17916    break 2
17917  fi
17918done
17919  done
17920IFS=$as_save_IFS
17921
17922  ;;
17923esac
17924fi
17925READELF=$ac_cv_path_READELF
17926if test -n "$READELF"; then
17927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17928$as_echo "$READELF" >&6; }
17929else
17930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17931$as_echo "no" >&6; }
17932fi
17933
17934
17935  test -n "$READELF" && break
17936done
17937
17938    else
17939      # If it succeeded, then it was overridden by the user. We will use it
17940      # for the tool.
17941
17942      # First remove it from the list of overridden variables, so we can test
17943      # for unknown variables in the end.
17944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17945
17946      # Check if the provided tool contains a complete path.
17947      tool_specified="$READELF"
17948      tool_basename="${tool_specified##*/}"
17949      if test "x$tool_basename" = "x$tool_specified"; then
17950        # A command without a complete path is provided, search $PATH.
17951        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
17952$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
17953        # Extract the first word of "$tool_basename", so it can be a program name with args.
17954set dummy $tool_basename; ac_word=$2
17955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17956$as_echo_n "checking for $ac_word... " >&6; }
17957if ${ac_cv_path_READELF+:} false; then :
17958  $as_echo_n "(cached) " >&6
17959else
17960  case $READELF in
17961  [\\/]* | ?:[\\/]*)
17962  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17963  ;;
17964  *)
17965  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17966for as_dir in $PATH
17967do
17968  IFS=$as_save_IFS
17969  test -z "$as_dir" && as_dir=.
17970    for ac_exec_ext in '' $ac_executable_extensions; do
17971  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17972    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17973    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17974    break 2
17975  fi
17976done
17977  done
17978IFS=$as_save_IFS
17979
17980  ;;
17981esac
17982fi
17983READELF=$ac_cv_path_READELF
17984if test -n "$READELF"; then
17985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17986$as_echo "$READELF" >&6; }
17987else
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17989$as_echo "no" >&6; }
17990fi
17991
17992
17993        if test "x$READELF" = x; then
17994          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17995        fi
17996      else
17997        # Otherwise we believe it is a complete path. Use it as it is.
17998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
17999$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18001$as_echo_n "checking for READELF... " >&6; }
18002        if test ! -x "$tool_specified"; then
18003          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18004$as_echo "not found" >&6; }
18005          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18006        fi
18007        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18008$as_echo "$tool_specified" >&6; }
18009      fi
18010    fi
18011  fi
18012
18013
18014
18015
18016  # Publish this variable in the help.
18017
18018
18019  if test "x$HG" = x; then
18020    # The variable is not set by user, try to locate tool using the code snippet
18021    for ac_prog in hg
18022do
18023  # Extract the first word of "$ac_prog", so it can be a program name with args.
18024set dummy $ac_prog; ac_word=$2
18025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18026$as_echo_n "checking for $ac_word... " >&6; }
18027if ${ac_cv_path_HG+:} false; then :
18028  $as_echo_n "(cached) " >&6
18029else
18030  case $HG in
18031  [\\/]* | ?:[\\/]*)
18032  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18033  ;;
18034  *)
18035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18036for as_dir in $PATH
18037do
18038  IFS=$as_save_IFS
18039  test -z "$as_dir" && as_dir=.
18040    for ac_exec_ext in '' $ac_executable_extensions; do
18041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18042    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18044    break 2
18045  fi
18046done
18047  done
18048IFS=$as_save_IFS
18049
18050  ;;
18051esac
18052fi
18053HG=$ac_cv_path_HG
18054if test -n "$HG"; then
18055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18056$as_echo "$HG" >&6; }
18057else
18058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18059$as_echo "no" >&6; }
18060fi
18061
18062
18063  test -n "$HG" && break
18064done
18065
18066  else
18067    # The variable is set, but is it from the command line or the environment?
18068
18069    # Try to remove the string !HG! from our list.
18070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18072      # If it failed, the variable was not from the command line. Ignore it,
18073      # but warn the user (except for BASH, which is always set by the calling BASH).
18074      if test "xHG" != xBASH; then
18075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18076$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18077      fi
18078      # Try to locate tool using the code snippet
18079      for ac_prog in hg
18080do
18081  # Extract the first word of "$ac_prog", so it can be a program name with args.
18082set dummy $ac_prog; ac_word=$2
18083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18084$as_echo_n "checking for $ac_word... " >&6; }
18085if ${ac_cv_path_HG+:} false; then :
18086  $as_echo_n "(cached) " >&6
18087else
18088  case $HG in
18089  [\\/]* | ?:[\\/]*)
18090  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18091  ;;
18092  *)
18093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18094for as_dir in $PATH
18095do
18096  IFS=$as_save_IFS
18097  test -z "$as_dir" && as_dir=.
18098    for ac_exec_ext in '' $ac_executable_extensions; do
18099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18100    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18102    break 2
18103  fi
18104done
18105  done
18106IFS=$as_save_IFS
18107
18108  ;;
18109esac
18110fi
18111HG=$ac_cv_path_HG
18112if test -n "$HG"; then
18113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18114$as_echo "$HG" >&6; }
18115else
18116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18117$as_echo "no" >&6; }
18118fi
18119
18120
18121  test -n "$HG" && break
18122done
18123
18124    else
18125      # If it succeeded, then it was overridden by the user. We will use it
18126      # for the tool.
18127
18128      # First remove it from the list of overridden variables, so we can test
18129      # for unknown variables in the end.
18130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18131
18132      # Check if the provided tool contains a complete path.
18133      tool_specified="$HG"
18134      tool_basename="${tool_specified##*/}"
18135      if test "x$tool_basename" = "x$tool_specified"; then
18136        # A command without a complete path is provided, search $PATH.
18137        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18138$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18139        # Extract the first word of "$tool_basename", so it can be a program name with args.
18140set dummy $tool_basename; ac_word=$2
18141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18142$as_echo_n "checking for $ac_word... " >&6; }
18143if ${ac_cv_path_HG+:} false; then :
18144  $as_echo_n "(cached) " >&6
18145else
18146  case $HG in
18147  [\\/]* | ?:[\\/]*)
18148  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18149  ;;
18150  *)
18151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18152for as_dir in $PATH
18153do
18154  IFS=$as_save_IFS
18155  test -z "$as_dir" && as_dir=.
18156    for ac_exec_ext in '' $ac_executable_extensions; do
18157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18158    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18160    break 2
18161  fi
18162done
18163  done
18164IFS=$as_save_IFS
18165
18166  ;;
18167esac
18168fi
18169HG=$ac_cv_path_HG
18170if test -n "$HG"; then
18171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18172$as_echo "$HG" >&6; }
18173else
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18175$as_echo "no" >&6; }
18176fi
18177
18178
18179        if test "x$HG" = x; then
18180          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18181        fi
18182      else
18183        # Otherwise we believe it is a complete path. Use it as it is.
18184        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18185$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18186        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18187$as_echo_n "checking for HG... " >&6; }
18188        if test ! -x "$tool_specified"; then
18189          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18190$as_echo "not found" >&6; }
18191          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18192        fi
18193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18194$as_echo "$tool_specified" >&6; }
18195      fi
18196    fi
18197  fi
18198
18199
18200
18201
18202  # Publish this variable in the help.
18203
18204
18205  if test "x$STAT" = x; then
18206    # The variable is not set by user, try to locate tool using the code snippet
18207    for ac_prog in stat
18208do
18209  # Extract the first word of "$ac_prog", so it can be a program name with args.
18210set dummy $ac_prog; ac_word=$2
18211{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18212$as_echo_n "checking for $ac_word... " >&6; }
18213if ${ac_cv_path_STAT+:} false; then :
18214  $as_echo_n "(cached) " >&6
18215else
18216  case $STAT in
18217  [\\/]* | ?:[\\/]*)
18218  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18219  ;;
18220  *)
18221  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18222for as_dir in $PATH
18223do
18224  IFS=$as_save_IFS
18225  test -z "$as_dir" && as_dir=.
18226    for ac_exec_ext in '' $ac_executable_extensions; do
18227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18228    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18230    break 2
18231  fi
18232done
18233  done
18234IFS=$as_save_IFS
18235
18236  ;;
18237esac
18238fi
18239STAT=$ac_cv_path_STAT
18240if test -n "$STAT"; then
18241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18242$as_echo "$STAT" >&6; }
18243else
18244  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18245$as_echo "no" >&6; }
18246fi
18247
18248
18249  test -n "$STAT" && break
18250done
18251
18252  else
18253    # The variable is set, but is it from the command line or the environment?
18254
18255    # Try to remove the string !STAT! from our list.
18256    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18257    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18258      # If it failed, the variable was not from the command line. Ignore it,
18259      # but warn the user (except for BASH, which is always set by the calling BASH).
18260      if test "xSTAT" != xBASH; then
18261        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18262$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18263      fi
18264      # Try to locate tool using the code snippet
18265      for ac_prog in stat
18266do
18267  # Extract the first word of "$ac_prog", so it can be a program name with args.
18268set dummy $ac_prog; ac_word=$2
18269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18270$as_echo_n "checking for $ac_word... " >&6; }
18271if ${ac_cv_path_STAT+:} false; then :
18272  $as_echo_n "(cached) " >&6
18273else
18274  case $STAT in
18275  [\\/]* | ?:[\\/]*)
18276  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18277  ;;
18278  *)
18279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18280for as_dir in $PATH
18281do
18282  IFS=$as_save_IFS
18283  test -z "$as_dir" && as_dir=.
18284    for ac_exec_ext in '' $ac_executable_extensions; do
18285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18286    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18288    break 2
18289  fi
18290done
18291  done
18292IFS=$as_save_IFS
18293
18294  ;;
18295esac
18296fi
18297STAT=$ac_cv_path_STAT
18298if test -n "$STAT"; then
18299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18300$as_echo "$STAT" >&6; }
18301else
18302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18303$as_echo "no" >&6; }
18304fi
18305
18306
18307  test -n "$STAT" && break
18308done
18309
18310    else
18311      # If it succeeded, then it was overridden by the user. We will use it
18312      # for the tool.
18313
18314      # First remove it from the list of overridden variables, so we can test
18315      # for unknown variables in the end.
18316      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18317
18318      # Check if the provided tool contains a complete path.
18319      tool_specified="$STAT"
18320      tool_basename="${tool_specified##*/}"
18321      if test "x$tool_basename" = "x$tool_specified"; then
18322        # A command without a complete path is provided, search $PATH.
18323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18324$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18325        # Extract the first word of "$tool_basename", so it can be a program name with args.
18326set dummy $tool_basename; ac_word=$2
18327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18328$as_echo_n "checking for $ac_word... " >&6; }
18329if ${ac_cv_path_STAT+:} false; then :
18330  $as_echo_n "(cached) " >&6
18331else
18332  case $STAT in
18333  [\\/]* | ?:[\\/]*)
18334  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18335  ;;
18336  *)
18337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18338for as_dir in $PATH
18339do
18340  IFS=$as_save_IFS
18341  test -z "$as_dir" && as_dir=.
18342    for ac_exec_ext in '' $ac_executable_extensions; do
18343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18344    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18346    break 2
18347  fi
18348done
18349  done
18350IFS=$as_save_IFS
18351
18352  ;;
18353esac
18354fi
18355STAT=$ac_cv_path_STAT
18356if test -n "$STAT"; then
18357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18358$as_echo "$STAT" >&6; }
18359else
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18361$as_echo "no" >&6; }
18362fi
18363
18364
18365        if test "x$STAT" = x; then
18366          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18367        fi
18368      else
18369        # Otherwise we believe it is a complete path. Use it as it is.
18370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18371$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18372        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18373$as_echo_n "checking for STAT... " >&6; }
18374        if test ! -x "$tool_specified"; then
18375          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18376$as_echo "not found" >&6; }
18377          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18378        fi
18379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18380$as_echo "$tool_specified" >&6; }
18381      fi
18382    fi
18383  fi
18384
18385
18386
18387
18388  # Publish this variable in the help.
18389
18390
18391  if test "x$TIME" = x; then
18392    # The variable is not set by user, try to locate tool using the code snippet
18393    for ac_prog in time
18394do
18395  # Extract the first word of "$ac_prog", so it can be a program name with args.
18396set dummy $ac_prog; ac_word=$2
18397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18398$as_echo_n "checking for $ac_word... " >&6; }
18399if ${ac_cv_path_TIME+:} false; then :
18400  $as_echo_n "(cached) " >&6
18401else
18402  case $TIME in
18403  [\\/]* | ?:[\\/]*)
18404  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18405  ;;
18406  *)
18407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18408for as_dir in $PATH
18409do
18410  IFS=$as_save_IFS
18411  test -z "$as_dir" && as_dir=.
18412    for ac_exec_ext in '' $ac_executable_extensions; do
18413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18414    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18416    break 2
18417  fi
18418done
18419  done
18420IFS=$as_save_IFS
18421
18422  ;;
18423esac
18424fi
18425TIME=$ac_cv_path_TIME
18426if test -n "$TIME"; then
18427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18428$as_echo "$TIME" >&6; }
18429else
18430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18431$as_echo "no" >&6; }
18432fi
18433
18434
18435  test -n "$TIME" && break
18436done
18437
18438  else
18439    # The variable is set, but is it from the command line or the environment?
18440
18441    # Try to remove the string !TIME! from our list.
18442    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18443    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18444      # If it failed, the variable was not from the command line. Ignore it,
18445      # but warn the user (except for BASH, which is always set by the calling BASH).
18446      if test "xTIME" != xBASH; then
18447        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18448$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18449      fi
18450      # Try to locate tool using the code snippet
18451      for ac_prog in time
18452do
18453  # Extract the first word of "$ac_prog", so it can be a program name with args.
18454set dummy $ac_prog; ac_word=$2
18455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18456$as_echo_n "checking for $ac_word... " >&6; }
18457if ${ac_cv_path_TIME+:} false; then :
18458  $as_echo_n "(cached) " >&6
18459else
18460  case $TIME in
18461  [\\/]* | ?:[\\/]*)
18462  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18463  ;;
18464  *)
18465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18466for as_dir in $PATH
18467do
18468  IFS=$as_save_IFS
18469  test -z "$as_dir" && as_dir=.
18470    for ac_exec_ext in '' $ac_executable_extensions; do
18471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18472    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18474    break 2
18475  fi
18476done
18477  done
18478IFS=$as_save_IFS
18479
18480  ;;
18481esac
18482fi
18483TIME=$ac_cv_path_TIME
18484if test -n "$TIME"; then
18485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18486$as_echo "$TIME" >&6; }
18487else
18488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18489$as_echo "no" >&6; }
18490fi
18491
18492
18493  test -n "$TIME" && break
18494done
18495
18496    else
18497      # If it succeeded, then it was overridden by the user. We will use it
18498      # for the tool.
18499
18500      # First remove it from the list of overridden variables, so we can test
18501      # for unknown variables in the end.
18502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18503
18504      # Check if the provided tool contains a complete path.
18505      tool_specified="$TIME"
18506      tool_basename="${tool_specified##*/}"
18507      if test "x$tool_basename" = "x$tool_specified"; then
18508        # A command without a complete path is provided, search $PATH.
18509        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18510$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18511        # Extract the first word of "$tool_basename", so it can be a program name with args.
18512set dummy $tool_basename; ac_word=$2
18513{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18514$as_echo_n "checking for $ac_word... " >&6; }
18515if ${ac_cv_path_TIME+:} false; then :
18516  $as_echo_n "(cached) " >&6
18517else
18518  case $TIME in
18519  [\\/]* | ?:[\\/]*)
18520  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18521  ;;
18522  *)
18523  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18524for as_dir in $PATH
18525do
18526  IFS=$as_save_IFS
18527  test -z "$as_dir" && as_dir=.
18528    for ac_exec_ext in '' $ac_executable_extensions; do
18529  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18530    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18531    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18532    break 2
18533  fi
18534done
18535  done
18536IFS=$as_save_IFS
18537
18538  ;;
18539esac
18540fi
18541TIME=$ac_cv_path_TIME
18542if test -n "$TIME"; then
18543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18544$as_echo "$TIME" >&6; }
18545else
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18547$as_echo "no" >&6; }
18548fi
18549
18550
18551        if test "x$TIME" = x; then
18552          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18553        fi
18554      else
18555        # Otherwise we believe it is a complete path. Use it as it is.
18556        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18557$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18558        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18559$as_echo_n "checking for TIME... " >&6; }
18560        if test ! -x "$tool_specified"; then
18561          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18562$as_echo "not found" >&6; }
18563          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18564        fi
18565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18566$as_echo "$tool_specified" >&6; }
18567      fi
18568    fi
18569  fi
18570
18571
18572  # Check if it's GNU time
18573  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18574  if test "x$IS_GNU_TIME" != x; then
18575    IS_GNU_TIME=yes
18576  else
18577    IS_GNU_TIME=no
18578  fi
18579
18580
18581  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18582
18583
18584
18585  # Publish this variable in the help.
18586
18587
18588  if test "x$COMM" = x; then
18589    # The variable is not set by user, try to locate tool using the code snippet
18590    for ac_prog in comm
18591do
18592  # Extract the first word of "$ac_prog", so it can be a program name with args.
18593set dummy $ac_prog; ac_word=$2
18594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18595$as_echo_n "checking for $ac_word... " >&6; }
18596if ${ac_cv_path_COMM+:} false; then :
18597  $as_echo_n "(cached) " >&6
18598else
18599  case $COMM in
18600  [\\/]* | ?:[\\/]*)
18601  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18602  ;;
18603  *)
18604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18605for as_dir in $PATH
18606do
18607  IFS=$as_save_IFS
18608  test -z "$as_dir" && as_dir=.
18609    for ac_exec_ext in '' $ac_executable_extensions; do
18610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18611    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18613    break 2
18614  fi
18615done
18616  done
18617IFS=$as_save_IFS
18618
18619  ;;
18620esac
18621fi
18622COMM=$ac_cv_path_COMM
18623if test -n "$COMM"; then
18624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18625$as_echo "$COMM" >&6; }
18626else
18627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18628$as_echo "no" >&6; }
18629fi
18630
18631
18632  test -n "$COMM" && break
18633done
18634
18635  else
18636    # The variable is set, but is it from the command line or the environment?
18637
18638    # Try to remove the string !COMM! from our list.
18639    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18640    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18641      # If it failed, the variable was not from the command line. Ignore it,
18642      # but warn the user (except for BASH, which is always set by the calling BASH).
18643      if test "xCOMM" != xBASH; then
18644        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18645$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18646      fi
18647      # Try to locate tool using the code snippet
18648      for ac_prog in comm
18649do
18650  # Extract the first word of "$ac_prog", so it can be a program name with args.
18651set dummy $ac_prog; ac_word=$2
18652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18653$as_echo_n "checking for $ac_word... " >&6; }
18654if ${ac_cv_path_COMM+:} false; then :
18655  $as_echo_n "(cached) " >&6
18656else
18657  case $COMM in
18658  [\\/]* | ?:[\\/]*)
18659  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18660  ;;
18661  *)
18662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18663for as_dir in $PATH
18664do
18665  IFS=$as_save_IFS
18666  test -z "$as_dir" && as_dir=.
18667    for ac_exec_ext in '' $ac_executable_extensions; do
18668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18669    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18671    break 2
18672  fi
18673done
18674  done
18675IFS=$as_save_IFS
18676
18677  ;;
18678esac
18679fi
18680COMM=$ac_cv_path_COMM
18681if test -n "$COMM"; then
18682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18683$as_echo "$COMM" >&6; }
18684else
18685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18686$as_echo "no" >&6; }
18687fi
18688
18689
18690  test -n "$COMM" && break
18691done
18692
18693    else
18694      # If it succeeded, then it was overridden by the user. We will use it
18695      # for the tool.
18696
18697      # First remove it from the list of overridden variables, so we can test
18698      # for unknown variables in the end.
18699      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18700
18701      # Check if the provided tool contains a complete path.
18702      tool_specified="$COMM"
18703      tool_basename="${tool_specified##*/}"
18704      if test "x$tool_basename" = "x$tool_specified"; then
18705        # A command without a complete path is provided, search $PATH.
18706        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18707$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18708        # Extract the first word of "$tool_basename", so it can be a program name with args.
18709set dummy $tool_basename; ac_word=$2
18710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18711$as_echo_n "checking for $ac_word... " >&6; }
18712if ${ac_cv_path_COMM+:} false; then :
18713  $as_echo_n "(cached) " >&6
18714else
18715  case $COMM in
18716  [\\/]* | ?:[\\/]*)
18717  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18718  ;;
18719  *)
18720  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18721for as_dir in $PATH
18722do
18723  IFS=$as_save_IFS
18724  test -z "$as_dir" && as_dir=.
18725    for ac_exec_ext in '' $ac_executable_extensions; do
18726  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18727    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18728    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18729    break 2
18730  fi
18731done
18732  done
18733IFS=$as_save_IFS
18734
18735  ;;
18736esac
18737fi
18738COMM=$ac_cv_path_COMM
18739if test -n "$COMM"; then
18740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18741$as_echo "$COMM" >&6; }
18742else
18743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18744$as_echo "no" >&6; }
18745fi
18746
18747
18748        if test "x$COMM" = x; then
18749          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18750        fi
18751      else
18752        # Otherwise we believe it is a complete path. Use it as it is.
18753        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18754$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18755        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18756$as_echo_n "checking for COMM... " >&6; }
18757        if test ! -x "$tool_specified"; then
18758          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18759$as_echo "not found" >&6; }
18760          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18761        fi
18762        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18763$as_echo "$tool_specified" >&6; }
18764      fi
18765    fi
18766  fi
18767
18768
18769
18770  if test "x$COMM" = x; then
18771    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18772  fi
18773
18774
18775  fi
18776
18777  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18778
18779
18780
18781  # Publish this variable in the help.
18782
18783
18784  if test "x$DSYMUTIL" = x; then
18785    # The variable is not set by user, try to locate tool using the code snippet
18786    for ac_prog in dsymutil
18787do
18788  # Extract the first word of "$ac_prog", so it can be a program name with args.
18789set dummy $ac_prog; ac_word=$2
18790{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18791$as_echo_n "checking for $ac_word... " >&6; }
18792if ${ac_cv_path_DSYMUTIL+:} false; then :
18793  $as_echo_n "(cached) " >&6
18794else
18795  case $DSYMUTIL in
18796  [\\/]* | ?:[\\/]*)
18797  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18798  ;;
18799  *)
18800  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18801for as_dir in $PATH
18802do
18803  IFS=$as_save_IFS
18804  test -z "$as_dir" && as_dir=.
18805    for ac_exec_ext in '' $ac_executable_extensions; do
18806  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18807    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18808    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18809    break 2
18810  fi
18811done
18812  done
18813IFS=$as_save_IFS
18814
18815  ;;
18816esac
18817fi
18818DSYMUTIL=$ac_cv_path_DSYMUTIL
18819if test -n "$DSYMUTIL"; then
18820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18821$as_echo "$DSYMUTIL" >&6; }
18822else
18823  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18824$as_echo "no" >&6; }
18825fi
18826
18827
18828  test -n "$DSYMUTIL" && break
18829done
18830
18831  else
18832    # The variable is set, but is it from the command line or the environment?
18833
18834    # Try to remove the string !DSYMUTIL! from our list.
18835    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18836    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18837      # If it failed, the variable was not from the command line. Ignore it,
18838      # but warn the user (except for BASH, which is always set by the calling BASH).
18839      if test "xDSYMUTIL" != xBASH; then
18840        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18841$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18842      fi
18843      # Try to locate tool using the code snippet
18844      for ac_prog in dsymutil
18845do
18846  # Extract the first word of "$ac_prog", so it can be a program name with args.
18847set dummy $ac_prog; ac_word=$2
18848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18849$as_echo_n "checking for $ac_word... " >&6; }
18850if ${ac_cv_path_DSYMUTIL+:} false; then :
18851  $as_echo_n "(cached) " >&6
18852else
18853  case $DSYMUTIL in
18854  [\\/]* | ?:[\\/]*)
18855  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18856  ;;
18857  *)
18858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18859for as_dir in $PATH
18860do
18861  IFS=$as_save_IFS
18862  test -z "$as_dir" && as_dir=.
18863    for ac_exec_ext in '' $ac_executable_extensions; do
18864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18865    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18867    break 2
18868  fi
18869done
18870  done
18871IFS=$as_save_IFS
18872
18873  ;;
18874esac
18875fi
18876DSYMUTIL=$ac_cv_path_DSYMUTIL
18877if test -n "$DSYMUTIL"; then
18878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18879$as_echo "$DSYMUTIL" >&6; }
18880else
18881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18882$as_echo "no" >&6; }
18883fi
18884
18885
18886  test -n "$DSYMUTIL" && break
18887done
18888
18889    else
18890      # If it succeeded, then it was overridden by the user. We will use it
18891      # for the tool.
18892
18893      # First remove it from the list of overridden variables, so we can test
18894      # for unknown variables in the end.
18895      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18896
18897      # Check if the provided tool contains a complete path.
18898      tool_specified="$DSYMUTIL"
18899      tool_basename="${tool_specified##*/}"
18900      if test "x$tool_basename" = "x$tool_specified"; then
18901        # A command without a complete path is provided, search $PATH.
18902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
18903$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
18904        # Extract the first word of "$tool_basename", so it can be a program name with args.
18905set dummy $tool_basename; ac_word=$2
18906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18907$as_echo_n "checking for $ac_word... " >&6; }
18908if ${ac_cv_path_DSYMUTIL+:} false; then :
18909  $as_echo_n "(cached) " >&6
18910else
18911  case $DSYMUTIL in
18912  [\\/]* | ?:[\\/]*)
18913  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18914  ;;
18915  *)
18916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18917for as_dir in $PATH
18918do
18919  IFS=$as_save_IFS
18920  test -z "$as_dir" && as_dir=.
18921    for ac_exec_ext in '' $ac_executable_extensions; do
18922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18923    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18925    break 2
18926  fi
18927done
18928  done
18929IFS=$as_save_IFS
18930
18931  ;;
18932esac
18933fi
18934DSYMUTIL=$ac_cv_path_DSYMUTIL
18935if test -n "$DSYMUTIL"; then
18936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18937$as_echo "$DSYMUTIL" >&6; }
18938else
18939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18940$as_echo "no" >&6; }
18941fi
18942
18943
18944        if test "x$DSYMUTIL" = x; then
18945          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18946        fi
18947      else
18948        # Otherwise we believe it is a complete path. Use it as it is.
18949        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
18950$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
18951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
18952$as_echo_n "checking for DSYMUTIL... " >&6; }
18953        if test ! -x "$tool_specified"; then
18954          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18955$as_echo "not found" >&6; }
18956          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
18957        fi
18958        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18959$as_echo "$tool_specified" >&6; }
18960      fi
18961    fi
18962  fi
18963
18964
18965
18966  if test "x$DSYMUTIL" = x; then
18967    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
18968  fi
18969
18970
18971
18972
18973
18974  # Publish this variable in the help.
18975
18976
18977  if test "x$XATTR" = x; then
18978    # The variable is not set by user, try to locate tool using the code snippet
18979    for ac_prog in xattr
18980do
18981  # Extract the first word of "$ac_prog", so it can be a program name with args.
18982set dummy $ac_prog; ac_word=$2
18983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18984$as_echo_n "checking for $ac_word... " >&6; }
18985if ${ac_cv_path_XATTR+:} false; then :
18986  $as_echo_n "(cached) " >&6
18987else
18988  case $XATTR in
18989  [\\/]* | ?:[\\/]*)
18990  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
18991  ;;
18992  *)
18993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18994for as_dir in $PATH
18995do
18996  IFS=$as_save_IFS
18997  test -z "$as_dir" && as_dir=.
18998    for ac_exec_ext in '' $ac_executable_extensions; do
18999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19000    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19002    break 2
19003  fi
19004done
19005  done
19006IFS=$as_save_IFS
19007
19008  ;;
19009esac
19010fi
19011XATTR=$ac_cv_path_XATTR
19012if test -n "$XATTR"; then
19013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19014$as_echo "$XATTR" >&6; }
19015else
19016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19017$as_echo "no" >&6; }
19018fi
19019
19020
19021  test -n "$XATTR" && break
19022done
19023
19024  else
19025    # The variable is set, but is it from the command line or the environment?
19026
19027    # Try to remove the string !XATTR! from our list.
19028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19030      # If it failed, the variable was not from the command line. Ignore it,
19031      # but warn the user (except for BASH, which is always set by the calling BASH).
19032      if test "xXATTR" != xBASH; then
19033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19034$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19035      fi
19036      # Try to locate tool using the code snippet
19037      for ac_prog in xattr
19038do
19039  # Extract the first word of "$ac_prog", so it can be a program name with args.
19040set dummy $ac_prog; ac_word=$2
19041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19042$as_echo_n "checking for $ac_word... " >&6; }
19043if ${ac_cv_path_XATTR+:} false; then :
19044  $as_echo_n "(cached) " >&6
19045else
19046  case $XATTR in
19047  [\\/]* | ?:[\\/]*)
19048  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19049  ;;
19050  *)
19051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19052for as_dir in $PATH
19053do
19054  IFS=$as_save_IFS
19055  test -z "$as_dir" && as_dir=.
19056    for ac_exec_ext in '' $ac_executable_extensions; do
19057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19058    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19060    break 2
19061  fi
19062done
19063  done
19064IFS=$as_save_IFS
19065
19066  ;;
19067esac
19068fi
19069XATTR=$ac_cv_path_XATTR
19070if test -n "$XATTR"; then
19071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19072$as_echo "$XATTR" >&6; }
19073else
19074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19075$as_echo "no" >&6; }
19076fi
19077
19078
19079  test -n "$XATTR" && break
19080done
19081
19082    else
19083      # If it succeeded, then it was overridden by the user. We will use it
19084      # for the tool.
19085
19086      # First remove it from the list of overridden variables, so we can test
19087      # for unknown variables in the end.
19088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19089
19090      # Check if the provided tool contains a complete path.
19091      tool_specified="$XATTR"
19092      tool_basename="${tool_specified##*/}"
19093      if test "x$tool_basename" = "x$tool_specified"; then
19094        # A command without a complete path is provided, search $PATH.
19095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19096$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19097        # Extract the first word of "$tool_basename", so it can be a program name with args.
19098set dummy $tool_basename; ac_word=$2
19099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19100$as_echo_n "checking for $ac_word... " >&6; }
19101if ${ac_cv_path_XATTR+:} false; then :
19102  $as_echo_n "(cached) " >&6
19103else
19104  case $XATTR in
19105  [\\/]* | ?:[\\/]*)
19106  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19107  ;;
19108  *)
19109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19110for as_dir in $PATH
19111do
19112  IFS=$as_save_IFS
19113  test -z "$as_dir" && as_dir=.
19114    for ac_exec_ext in '' $ac_executable_extensions; do
19115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19116    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19118    break 2
19119  fi
19120done
19121  done
19122IFS=$as_save_IFS
19123
19124  ;;
19125esac
19126fi
19127XATTR=$ac_cv_path_XATTR
19128if test -n "$XATTR"; then
19129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19130$as_echo "$XATTR" >&6; }
19131else
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19133$as_echo "no" >&6; }
19134fi
19135
19136
19137        if test "x$XATTR" = x; then
19138          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19139        fi
19140      else
19141        # Otherwise we believe it is a complete path. Use it as it is.
19142        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19143$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19144        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19145$as_echo_n "checking for XATTR... " >&6; }
19146        if test ! -x "$tool_specified"; then
19147          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19148$as_echo "not found" >&6; }
19149          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19150        fi
19151        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19152$as_echo "$tool_specified" >&6; }
19153      fi
19154    fi
19155  fi
19156
19157
19158
19159  if test "x$XATTR" = x; then
19160    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19161  fi
19162
19163
19164
19165
19166  # Publish this variable in the help.
19167
19168
19169  if test "x$CODESIGN" = x; then
19170    # The variable is not set by user, try to locate tool using the code snippet
19171    for ac_prog in codesign
19172do
19173  # Extract the first word of "$ac_prog", so it can be a program name with args.
19174set dummy $ac_prog; ac_word=$2
19175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19176$as_echo_n "checking for $ac_word... " >&6; }
19177if ${ac_cv_path_CODESIGN+:} false; then :
19178  $as_echo_n "(cached) " >&6
19179else
19180  case $CODESIGN in
19181  [\\/]* | ?:[\\/]*)
19182  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19183  ;;
19184  *)
19185  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19186for as_dir in $PATH
19187do
19188  IFS=$as_save_IFS
19189  test -z "$as_dir" && as_dir=.
19190    for ac_exec_ext in '' $ac_executable_extensions; do
19191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19192    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19194    break 2
19195  fi
19196done
19197  done
19198IFS=$as_save_IFS
19199
19200  ;;
19201esac
19202fi
19203CODESIGN=$ac_cv_path_CODESIGN
19204if test -n "$CODESIGN"; then
19205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19206$as_echo "$CODESIGN" >&6; }
19207else
19208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19209$as_echo "no" >&6; }
19210fi
19211
19212
19213  test -n "$CODESIGN" && break
19214done
19215
19216  else
19217    # The variable is set, but is it from the command line or the environment?
19218
19219    # Try to remove the string !CODESIGN! from our list.
19220    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19221    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19222      # If it failed, the variable was not from the command line. Ignore it,
19223      # but warn the user (except for BASH, which is always set by the calling BASH).
19224      if test "xCODESIGN" != xBASH; then
19225        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19226$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19227      fi
19228      # Try to locate tool using the code snippet
19229      for ac_prog in codesign
19230do
19231  # Extract the first word of "$ac_prog", so it can be a program name with args.
19232set dummy $ac_prog; ac_word=$2
19233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19234$as_echo_n "checking for $ac_word... " >&6; }
19235if ${ac_cv_path_CODESIGN+:} false; then :
19236  $as_echo_n "(cached) " >&6
19237else
19238  case $CODESIGN in
19239  [\\/]* | ?:[\\/]*)
19240  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19241  ;;
19242  *)
19243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19244for as_dir in $PATH
19245do
19246  IFS=$as_save_IFS
19247  test -z "$as_dir" && as_dir=.
19248    for ac_exec_ext in '' $ac_executable_extensions; do
19249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19250    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19252    break 2
19253  fi
19254done
19255  done
19256IFS=$as_save_IFS
19257
19258  ;;
19259esac
19260fi
19261CODESIGN=$ac_cv_path_CODESIGN
19262if test -n "$CODESIGN"; then
19263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19264$as_echo "$CODESIGN" >&6; }
19265else
19266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19267$as_echo "no" >&6; }
19268fi
19269
19270
19271  test -n "$CODESIGN" && break
19272done
19273
19274    else
19275      # If it succeeded, then it was overridden by the user. We will use it
19276      # for the tool.
19277
19278      # First remove it from the list of overridden variables, so we can test
19279      # for unknown variables in the end.
19280      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19281
19282      # Check if the provided tool contains a complete path.
19283      tool_specified="$CODESIGN"
19284      tool_basename="${tool_specified##*/}"
19285      if test "x$tool_basename" = "x$tool_specified"; then
19286        # A command without a complete path is provided, search $PATH.
19287        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19288$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19289        # Extract the first word of "$tool_basename", so it can be a program name with args.
19290set dummy $tool_basename; ac_word=$2
19291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19292$as_echo_n "checking for $ac_word... " >&6; }
19293if ${ac_cv_path_CODESIGN+:} false; then :
19294  $as_echo_n "(cached) " >&6
19295else
19296  case $CODESIGN in
19297  [\\/]* | ?:[\\/]*)
19298  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19299  ;;
19300  *)
19301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19302for as_dir in $PATH
19303do
19304  IFS=$as_save_IFS
19305  test -z "$as_dir" && as_dir=.
19306    for ac_exec_ext in '' $ac_executable_extensions; do
19307  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19308    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19309    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19310    break 2
19311  fi
19312done
19313  done
19314IFS=$as_save_IFS
19315
19316  ;;
19317esac
19318fi
19319CODESIGN=$ac_cv_path_CODESIGN
19320if test -n "$CODESIGN"; then
19321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19322$as_echo "$CODESIGN" >&6; }
19323else
19324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19325$as_echo "no" >&6; }
19326fi
19327
19328
19329        if test "x$CODESIGN" = x; then
19330          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19331        fi
19332      else
19333        # Otherwise we believe it is a complete path. Use it as it is.
19334        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19335$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19336        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19337$as_echo_n "checking for CODESIGN... " >&6; }
19338        if test ! -x "$tool_specified"; then
19339          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19340$as_echo "not found" >&6; }
19341          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19342        fi
19343        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19344$as_echo "$tool_specified" >&6; }
19345      fi
19346    fi
19347  fi
19348
19349
19350    if test "x$CODESIGN" != "x"; then
19351      # Verify that the openjdk_codesign certificate is present
19352      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19353$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19354      rm -f codesign-testfile
19355      touch codesign-testfile
19356      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19357      rm -f codesign-testfile
19358      if test "x$CODESIGN" = x; then
19359        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19360$as_echo "no" >&6; }
19361      else
19362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19363$as_echo "yes" >&6; }
19364      fi
19365    fi
19366  fi
19367
19368
19369# Check if pkg-config is available.
19370
19371
19372if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19373	if test -n "$ac_tool_prefix"; then
19374  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19375set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19376{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19377$as_echo_n "checking for $ac_word... " >&6; }
19378if ${ac_cv_path_PKG_CONFIG+:} false; then :
19379  $as_echo_n "(cached) " >&6
19380else
19381  case $PKG_CONFIG in
19382  [\\/]* | ?:[\\/]*)
19383  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19384  ;;
19385  *)
19386  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19387for as_dir in $PATH
19388do
19389  IFS=$as_save_IFS
19390  test -z "$as_dir" && as_dir=.
19391    for ac_exec_ext in '' $ac_executable_extensions; do
19392  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19393    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19394    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19395    break 2
19396  fi
19397done
19398  done
19399IFS=$as_save_IFS
19400
19401  ;;
19402esac
19403fi
19404PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19405if test -n "$PKG_CONFIG"; then
19406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19407$as_echo "$PKG_CONFIG" >&6; }
19408else
19409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19410$as_echo "no" >&6; }
19411fi
19412
19413
19414fi
19415if test -z "$ac_cv_path_PKG_CONFIG"; then
19416  ac_pt_PKG_CONFIG=$PKG_CONFIG
19417  # Extract the first word of "pkg-config", so it can be a program name with args.
19418set dummy pkg-config; ac_word=$2
19419{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19420$as_echo_n "checking for $ac_word... " >&6; }
19421if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19422  $as_echo_n "(cached) " >&6
19423else
19424  case $ac_pt_PKG_CONFIG in
19425  [\\/]* | ?:[\\/]*)
19426  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19427  ;;
19428  *)
19429  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19430for as_dir in $PATH
19431do
19432  IFS=$as_save_IFS
19433  test -z "$as_dir" && as_dir=.
19434    for ac_exec_ext in '' $ac_executable_extensions; do
19435  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19436    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19437    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19438    break 2
19439  fi
19440done
19441  done
19442IFS=$as_save_IFS
19443
19444  ;;
19445esac
19446fi
19447ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19448if test -n "$ac_pt_PKG_CONFIG"; then
19449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19450$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19451else
19452  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19453$as_echo "no" >&6; }
19454fi
19455
19456  if test "x$ac_pt_PKG_CONFIG" = x; then
19457    PKG_CONFIG=""
19458  else
19459    case $cross_compiling:$ac_tool_warned in
19460yes:)
19461{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19462$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19463ac_tool_warned=yes ;;
19464esac
19465    PKG_CONFIG=$ac_pt_PKG_CONFIG
19466  fi
19467else
19468  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19469fi
19470
19471fi
19472if test -n "$PKG_CONFIG"; then
19473	_pkg_min_version=0.9.0
19474	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19475$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19476	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19477		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19478$as_echo "yes" >&6; }
19479	else
19480		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19481$as_echo "no" >&6; }
19482		PKG_CONFIG=""
19483	fi
19484
19485fi
19486
19487# After basic tools have been setup, we can check build os specific details.
19488
19489  ###############################################################################
19490
19491  # Note that this is the build platform OS version!
19492
19493  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19494  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19495  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19496  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19497
19498
19499
19500
19501
19502# Setup builddeps, for automatic downloading of tools we need.
19503# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19504# boot-jdk setup, but we need to have basic tools setup first.
19505
19506
19507# Check whether --with-builddeps-conf was given.
19508if test "${with_builddeps_conf+set}" = set; then :
19509  withval=$with_builddeps_conf;
19510fi
19511
19512
19513
19514# Check whether --with-builddeps-server was given.
19515if test "${with_builddeps_server+set}" = set; then :
19516  withval=$with_builddeps_server;
19517fi
19518
19519
19520
19521# Check whether --with-builddeps-dir was given.
19522if test "${with_builddeps_dir+set}" = set; then :
19523  withval=$with_builddeps_dir;
19524else
19525  with_builddeps_dir=/localhome/builddeps
19526fi
19527
19528
19529
19530# Check whether --with-builddeps-group was given.
19531if test "${with_builddeps_group+set}" = set; then :
19532  withval=$with_builddeps_group;
19533fi
19534
19535
19536
19537
19538  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19539    if test "x$with_builddeps_conf" != x; then
19540      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19541$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19542      builddepsfile=$with_builddeps_conf
19543      if test -s $builddepsfile; then
19544        . $builddepsfile
19545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19546$as_echo "loaded!" >&6; }
19547      else
19548        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19549      fi
19550    else
19551      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19552$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19553      builddepsfile=`mktemp`
19554      touch $builddepsfile
19555      # Put all found confs into a single file.
19556      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19557      # Source the file to acquire the variables
19558      if test -s $builddepsfile; then
19559        . $builddepsfile
19560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19561$as_echo "found at least one!" >&6; }
19562      else
19563        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19564      fi
19565    fi
19566    # Create build and target names that use _ instead of "-" and ".".
19567    # This is necessary to use them in variable names.
19568    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19569    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19570    # Extract rewrite information for build and target
19571    eval rewritten_build=\${REWRITE_${build_var}}
19572    if test "x$rewritten_build" = x; then
19573      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19574      echo Build stays the same $rewritten_build
19575    else
19576      echo Rewriting build for builddeps into $rewritten_build
19577    fi
19578    eval rewritten_target=\${REWRITE_${target_var}}
19579    if test "x$rewritten_target" = x; then
19580      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19581      echo Target stays the same $rewritten_target
19582    else
19583      echo Rewriting target for builddeps into $rewritten_target
19584    fi
19585    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19586    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19587  fi
19588  for ac_prog in 7z unzip
19589do
19590  # Extract the first word of "$ac_prog", so it can be a program name with args.
19591set dummy $ac_prog; ac_word=$2
19592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19593$as_echo_n "checking for $ac_word... " >&6; }
19594if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19595  $as_echo_n "(cached) " >&6
19596else
19597  if test -n "$BDEPS_UNZIP"; then
19598  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19599else
19600as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19601for as_dir in $PATH
19602do
19603  IFS=$as_save_IFS
19604  test -z "$as_dir" && as_dir=.
19605    for ac_exec_ext in '' $ac_executable_extensions; do
19606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19607    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19609    break 2
19610  fi
19611done
19612  done
19613IFS=$as_save_IFS
19614
19615fi
19616fi
19617BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19618if test -n "$BDEPS_UNZIP"; then
19619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19620$as_echo "$BDEPS_UNZIP" >&6; }
19621else
19622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19623$as_echo "no" >&6; }
19624fi
19625
19626
19627  test -n "$BDEPS_UNZIP" && break
19628done
19629
19630  if test "x$BDEPS_UNZIP" = x7z; then
19631    BDEPS_UNZIP="7z x"
19632  fi
19633
19634  for ac_prog in wget lftp ftp
19635do
19636  # Extract the first word of "$ac_prog", so it can be a program name with args.
19637set dummy $ac_prog; ac_word=$2
19638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19639$as_echo_n "checking for $ac_word... " >&6; }
19640if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19641  $as_echo_n "(cached) " >&6
19642else
19643  if test -n "$BDEPS_FTP"; then
19644  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19645else
19646as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19647for as_dir in $PATH
19648do
19649  IFS=$as_save_IFS
19650  test -z "$as_dir" && as_dir=.
19651    for ac_exec_ext in '' $ac_executable_extensions; do
19652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19653    ac_cv_prog_BDEPS_FTP="$ac_prog"
19654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19655    break 2
19656  fi
19657done
19658  done
19659IFS=$as_save_IFS
19660
19661fi
19662fi
19663BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19664if test -n "$BDEPS_FTP"; then
19665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19666$as_echo "$BDEPS_FTP" >&6; }
19667else
19668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19669$as_echo "no" >&6; }
19670fi
19671
19672
19673  test -n "$BDEPS_FTP" && break
19674done
19675
19676
19677
19678###############################################################################
19679#
19680# Determine OpenJDK variants, options and version numbers.
19681#
19682###############################################################################
19683
19684# We need build & target for this.
19685
19686
19687  ###############################################################################
19688  #
19689  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19690  # We always build headless support.
19691  #
19692  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19693$as_echo_n "checking headful support... " >&6; }
19694  # Check whether --enable-headful was given.
19695if test "${enable_headful+set}" = set; then :
19696  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19697else
19698  SUPPORT_HEADFUL=yes
19699fi
19700
19701
19702  SUPPORT_HEADLESS=yes
19703  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19704
19705  if test "x$SUPPORT_HEADFUL" = xyes; then
19706    # We are building both headful and headless.
19707    headful_msg="include support for both headful and headless"
19708  fi
19709
19710  if test "x$SUPPORT_HEADFUL" = xno; then
19711    # Thus we are building headless only.
19712    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19713    headful_msg="headless only"
19714  fi
19715
19716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19717$as_echo "$headful_msg" >&6; }
19718
19719
19720
19721
19722
19723  # Control wether Hotspot runs Queens test after build.
19724  # Check whether --enable-hotspot-test-in-build was given.
19725if test "${enable_hotspot_test_in_build+set}" = set; then :
19726  enableval=$enable_hotspot_test_in_build;
19727else
19728  enable_hotspot_test_in_build=no
19729fi
19730
19731  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19732    TEST_IN_BUILD=true
19733  else
19734    TEST_IN_BUILD=false
19735  fi
19736
19737
19738  ###############################################################################
19739  #
19740  # Choose cacerts source file
19741  #
19742
19743# Check whether --with-cacerts-file was given.
19744if test "${with_cacerts_file+set}" = set; then :
19745  withval=$with_cacerts_file;
19746fi
19747
19748  if test "x$with_cacerts_file" != x; then
19749    CACERTS_FILE=$with_cacerts_file
19750  else
19751    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19752  fi
19753
19754
19755  ###############################################################################
19756  #
19757  # Enable or disable unlimited crypto
19758  #
19759  # Check whether --enable-unlimited-crypto was given.
19760if test "${enable_unlimited_crypto+set}" = set; then :
19761  enableval=$enable_unlimited_crypto;
19762else
19763  enable_unlimited_crypto=no
19764fi
19765
19766  if test "x$enable_unlimited_crypto" = "xyes"; then
19767    UNLIMITED_CRYPTO=true
19768  else
19769    UNLIMITED_CRYPTO=false
19770  fi
19771
19772
19773  ###############################################################################
19774  #
19775  # Enable or disable the elliptic curve crypto implementation
19776  #
19777
19778
19779  ###############################################################################
19780  #
19781  # --enable-rmiconnector-iiop
19782  #
19783  # Check whether --enable-rmiconnector-iiop was given.
19784if test "${enable_rmiconnector_iiop+set}" = set; then :
19785  enableval=$enable_rmiconnector_iiop;
19786fi
19787
19788  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19789    RMICONNECTOR_IIOP=true
19790  else
19791    RMICONNECTOR_IIOP=false
19792  fi
19793
19794
19795  ###############################################################################
19796  #
19797  # Compress jars
19798  #
19799  COMPRESS_JARS=false
19800
19801
19802
19803
19804  # Source the version numbers
19805  . $AUTOCONF_DIR/version-numbers
19806
19807  # Get the settings from parameters
19808
19809# Check whether --with-milestone was given.
19810if test "${with_milestone+set}" = set; then :
19811  withval=$with_milestone;
19812fi
19813
19814  if test "x$with_milestone" = xyes; then
19815    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19816  elif test "x$with_milestone" != x; then
19817    MILESTONE="$with_milestone"
19818  fi
19819  if test "x$MILESTONE" = x; then
19820    MILESTONE=internal
19821  fi
19822
19823
19824# Check whether --with-update-version was given.
19825if test "${with_update_version+set}" = set; then :
19826  withval=$with_update_version;
19827fi
19828
19829  if test "x$with_update_version" = xyes; then
19830    as_fn_error $? "Update version must have a value" "$LINENO" 5
19831  elif test "x$with_update_version" != x; then
19832    JDK_UPDATE_VERSION="$with_update_version"
19833    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19834    # to a bug in expr (which reduces it to just X). To work around this, we
19835    # always add a 0 to one digit update versions.
19836    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19837      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19838    fi
19839  fi
19840
19841
19842# Check whether --with-user-release-suffix was given.
19843if test "${with_user_release_suffix+set}" = set; then :
19844  withval=$with_user_release_suffix;
19845fi
19846
19847  if test "x$with_user_release_suffix" = xyes; then
19848    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19849  elif test "x$with_user_release_suffix" != x; then
19850    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19851  fi
19852
19853
19854# Check whether --with-build-number was given.
19855if test "${with_build_number+set}" = set; then :
19856  withval=$with_build_number;
19857fi
19858
19859  if test "x$with_build_number" = xyes; then
19860    as_fn_error $? "Build number must have a value" "$LINENO" 5
19861  elif test "x$with_build_number" != x; then
19862    JDK_BUILD_NUMBER="$with_build_number"
19863  fi
19864  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19865  if test "x$JDK_BUILD_NUMBER" = x; then
19866    JDK_BUILD_NUMBER=b00
19867    if test "x$USER_RELEASE_SUFFIX" = x; then
19868      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19869      # Avoid [:alnum:] since it depends on the locale.
19870      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19871      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19872    fi
19873  fi
19874
19875  # Now set the JDK version, milestone, build number etc.
19876
19877
19878
19879
19880
19881
19882
19883
19884
19885
19886
19887
19888
19889
19890
19891  COPYRIGHT_YEAR=`date +'%Y'`
19892
19893
19894  if test "x$JDK_UPDATE_VERSION" != x; then
19895    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
19896  else
19897    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
19898  fi
19899
19900
19901  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
19902
19903
19904
19905###############################################################################
19906#
19907# Setup BootJDK, used to bootstrap the build.
19908#
19909###############################################################################
19910
19911
19912  BOOT_JDK_FOUND=no
19913
19914# Check whether --with-boot-jdk was given.
19915if test "${with_boot_jdk+set}" = set; then :
19916  withval=$with_boot_jdk;
19917fi
19918
19919
19920  # We look for the Boot JDK through various means, going from more certain to
19921  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
19922  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
19923  # must check if this is indeed valid; otherwise we'll continue looking.
19924
19925  # Test: Is bootjdk explicitely set by command line arguments?
19926
19927  if test "x$BOOT_JDK_FOUND" = xno; then
19928    # Now execute the test
19929
19930  if test "x$with_boot_jdk" != x; then
19931    BOOT_JDK=$with_boot_jdk
19932    BOOT_JDK_FOUND=maybe
19933    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
19934$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
19935  fi
19936
19937
19938    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
19939    if test "x$BOOT_JDK_FOUND" = xmaybe; then
19940      # Do we have a bin/java?
19941      if test ! -x "$BOOT_JDK/bin/java"; then
19942        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
19943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
19944        BOOT_JDK_FOUND=no
19945      else
19946        # Do we have a bin/javac?
19947        if test ! -x "$BOOT_JDK/bin/javac"; then
19948          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
19949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
19950          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
19951$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
19952          BOOT_JDK_FOUND=no
19953        else
19954          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
19955          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
19956            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
19957$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
19958            BOOT_JDK_FOUND=no
19959          else
19960            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
19961            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
19962
19963            # Extra M4 quote needed to protect [] in grep expression.
19964            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
19965            if test "x$FOUND_CORRECT_VERSION" = x; then
19966              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
19967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
19968              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
19969$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
19970              BOOT_JDK_FOUND=no
19971            else
19972              # We're done! :-)
19973              BOOT_JDK_FOUND=yes
19974
19975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19976
19977  # Input might be given as Windows format, start by converting to
19978  # unix format.
19979  path="$BOOT_JDK"
19980  new_path=`$CYGPATH -u "$path"`
19981
19982  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19983  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19984  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19985  # "foo.exe" is OK but "foo" is an error.
19986  #
19987  # This test is therefore slightly more accurate than "test -f" to check for file precense.
19988  # It is also a way to make sure we got the proper file name for the real test later on.
19989  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19990  if test "x$test_shortpath" = x; then
19991    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
19992$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
19993    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
19994  fi
19995
19996  # Call helper function which possibly converts this using DOS-style short mode.
19997  # If so, the updated path is stored in $new_path.
19998
19999  input_path="$new_path"
20000  # Check if we need to convert this using DOS-style short mode. If the path
20001  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20002  # take no chances and rewrite it.
20003  # Note: m4 eats our [], so we need to use [ and ] instead.
20004  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20005  if test "x$has_forbidden_chars" != x; then
20006    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20007    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20008    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20009    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20010      # Going to short mode and back again did indeed matter. Since short mode is
20011      # case insensitive, let's make it lowercase to improve readability.
20012      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20013      # Now convert it back to Unix-stile (cygpath)
20014      input_path=`$CYGPATH -u "$shortmode_path"`
20015      new_path="$input_path"
20016    fi
20017  fi
20018
20019  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20020  if test "x$test_cygdrive_prefix" = x; then
20021    # As a simple fix, exclude /usr/bin since it's not a real path.
20022    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20023      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20024      # a path prefixed by /cygdrive for fixpath to work.
20025      new_path="$CYGWIN_ROOT_PATH$input_path"
20026    fi
20027  fi
20028
20029
20030  if test "x$path" != "x$new_path"; then
20031    BOOT_JDK="$new_path"
20032    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20033$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20034  fi
20035
20036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20037
20038  path="$BOOT_JDK"
20039  has_colon=`$ECHO $path | $GREP ^.:`
20040  new_path="$path"
20041  if test "x$has_colon" = x; then
20042    # Not in mixed or Windows style, start by that.
20043    new_path=`cmd //c echo $path`
20044  fi
20045
20046
20047  input_path="$new_path"
20048  # Check if we need to convert this using DOS-style short mode. If the path
20049  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20050  # take no chances and rewrite it.
20051  # Note: m4 eats our [], so we need to use [ and ] instead.
20052  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20053  if test "x$has_forbidden_chars" != x; then
20054    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20055    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20056  fi
20057
20058
20059  windows_path="$new_path"
20060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20061    unix_path=`$CYGPATH -u "$windows_path"`
20062    new_path="$unix_path"
20063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20065    new_path="$unix_path"
20066  fi
20067
20068  if test "x$path" != "x$new_path"; then
20069    BOOT_JDK="$new_path"
20070    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20071$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20072  fi
20073
20074  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20075  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20076
20077  else
20078    # We're on a posix platform. Hooray! :)
20079    path="$BOOT_JDK"
20080    has_space=`$ECHO "$path" | $GREP " "`
20081    if test "x$has_space" != x; then
20082      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20083$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20084      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20085    fi
20086
20087    # Use eval to expand a potential ~
20088    eval path="$path"
20089    if test ! -f "$path" && test ! -d "$path"; then
20090      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20091    fi
20092
20093    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20094  fi
20095
20096              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20097$as_echo_n "checking for Boot JDK... " >&6; }
20098              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20099$as_echo "$BOOT_JDK" >&6; }
20100              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20101$as_echo_n "checking Boot JDK version... " >&6; }
20102              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20103              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20104$as_echo "$BOOT_JDK_VERSION" >&6; }
20105            fi # end check jdk version
20106          fi # end check rt.jar
20107        fi # end check javac
20108      fi # end check java
20109    fi # end check boot jdk found
20110  fi
20111
20112  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20113    # Having specified an argument which is incorrect will produce an instant failure;
20114    # we should not go on looking
20115    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20116  fi
20117
20118  # Test: Is bootjdk available from builddeps?
20119
20120  if test "x$BOOT_JDK_FOUND" = xno; then
20121    # Now execute the test
20122
20123
20124
20125  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20126    # Source the builddeps file again, to make sure it uses the latest variables!
20127    . $builddepsfile
20128    # Look for a target and build machine specific resource!
20129    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20130    if test "x$resource" = x; then
20131      # Ok, lets instead look for a target specific resource
20132      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20133    fi
20134    if test "x$resource" = x; then
20135      # Ok, lets instead look for a build specific resource
20136      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20137    fi
20138    if test "x$resource" = x; then
20139      # Ok, lets instead look for a generic resource
20140      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20141      resource=${builddep_bootjdk}
20142    fi
20143    if test "x$resource" != x; then
20144      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20145$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20146      # If the resource in the builddeps.conf file is an existing directory,
20147      # for example /java/linux/cups
20148      if test -d ${resource}; then
20149        depdir=${resource}
20150      else
20151
20152  # bootjdk is for example mymodule
20153  # $resource is for example libs/general/libmymod_1_2_3.zip
20154  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20155  # $with_builddeps_dir is for example /localhome/builddeps
20156  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20157  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20158  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20159  filename=`basename $resource`
20160  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20161  filebase=${filename%%.*}
20162  extension=${filename#*.}
20163  installdir=$with_builddeps_dir/$filebase
20164  if test ! -f $installdir/$filename.unpacked; then
20165    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20166$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20167    if test ! -d $installdir; then
20168      mkdir -p $installdir
20169    fi
20170    if test ! -d $installdir; then
20171      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20172    fi
20173    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20174    touch $tmpfile
20175    if test ! -f $tmpfile; then
20176      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20177    fi
20178
20179  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20180  # $tmpfile is the local file name for the downloaded file.
20181  VALID_TOOL=no
20182  if test "x$BDEPS_FTP" = xwget; then
20183    VALID_TOOL=yes
20184    wget -O $tmpfile $with_builddeps_server/$resource
20185  fi
20186  if test "x$BDEPS_FTP" = xlftp; then
20187    VALID_TOOL=yes
20188    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20189  fi
20190  if test "x$BDEPS_FTP" = xftp; then
20191    VALID_TOOL=yes
20192    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20193    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20194    FTPUSERPWD=${FTPSERVER%%@*}
20195    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20196      FTPUSER=${userpwd%%:*}
20197      FTPPWD=${userpwd#*@}
20198      FTPSERVER=${FTPSERVER#*@}
20199    else
20200      FTPUSER=ftp
20201      FTPPWD=ftp
20202    fi
20203    # the "pass" command does not work on some
20204    # ftp clients (read ftp.exe) but if it works,
20205    # passive mode is better!
20206    ( \
20207        echo "user $FTPUSER $FTPPWD"        ; \
20208        echo "pass"                         ; \
20209        echo "bin"                          ; \
20210        echo "get $FTPPATH $tmpfile"              ; \
20211    ) | ftp -in $FTPSERVER
20212  fi
20213  if test "x$VALID_TOOL" != xyes; then
20214    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20215  fi
20216
20217    mv $tmpfile $installdir/$filename
20218    if test ! -s $installdir/$filename; then
20219      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20220    fi
20221    case "$extension" in
20222      zip)  echo "Unzipping $installdir/$filename..."
20223        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20224        ;;
20225      tar.gz) echo "Untaring $installdir/$filename..."
20226        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20227        ;;
20228      tgz) echo "Untaring $installdir/$filename..."
20229        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20230        ;;
20231      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20232        ;;
20233    esac
20234  fi
20235  if test -f $installdir/$filename.unpacked; then
20236    depdir=$installdir
20237  fi
20238
20239      fi
20240      # Source the builddeps file again, because in the previous command, the depdir
20241      # was updated to point at the current build dependency install directory.
20242      . $builddepsfile
20243      # Now extract variables from the builddeps.conf files.
20244      theroot=${builddep_bootjdk_ROOT}
20245      thecflags=${builddep_bootjdk_CFLAGS}
20246      thelibs=${builddep_bootjdk_LIBS}
20247      if test "x$depdir" = x; then
20248        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20249      fi
20250      BOOT_JDK=$depdir
20251      if test "x$theroot" != x; then
20252        BOOT_JDK="$theroot"
20253      fi
20254      if test "x$thecflags" != x; then
20255        BOOT_JDK_CFLAGS="$thecflags"
20256      fi
20257      if test "x$thelibs" != x; then
20258        BOOT_JDK_LIBS="$thelibs"
20259      fi
20260      BOOT_JDK_FOUND=maybe
20261      else BOOT_JDK_FOUND=no
20262
20263    fi
20264    else BOOT_JDK_FOUND=no
20265
20266  fi
20267
20268
20269
20270    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20271    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20272      # Do we have a bin/java?
20273      if test ! -x "$BOOT_JDK/bin/java"; then
20274        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20276        BOOT_JDK_FOUND=no
20277      else
20278        # Do we have a bin/javac?
20279        if test ! -x "$BOOT_JDK/bin/javac"; then
20280          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20282          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20283$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20284          BOOT_JDK_FOUND=no
20285        else
20286          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20287          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20288            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20289$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20290            BOOT_JDK_FOUND=no
20291          else
20292            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20293            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20294
20295            # Extra M4 quote needed to protect [] in grep expression.
20296            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20297            if test "x$FOUND_CORRECT_VERSION" = x; then
20298              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20299$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20300              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20301$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20302              BOOT_JDK_FOUND=no
20303            else
20304              # We're done! :-)
20305              BOOT_JDK_FOUND=yes
20306
20307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20308
20309  # Input might be given as Windows format, start by converting to
20310  # unix format.
20311  path="$BOOT_JDK"
20312  new_path=`$CYGPATH -u "$path"`
20313
20314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20317  # "foo.exe" is OK but "foo" is an error.
20318  #
20319  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20320  # It is also a way to make sure we got the proper file name for the real test later on.
20321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20322  if test "x$test_shortpath" = x; then
20323    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20324$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20325    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20326  fi
20327
20328  # Call helper function which possibly converts this using DOS-style short mode.
20329  # If so, the updated path is stored in $new_path.
20330
20331  input_path="$new_path"
20332  # Check if we need to convert this using DOS-style short mode. If the path
20333  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20334  # take no chances and rewrite it.
20335  # Note: m4 eats our [], so we need to use [ and ] instead.
20336  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20337  if test "x$has_forbidden_chars" != x; then
20338    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20339    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20340    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20341    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20342      # Going to short mode and back again did indeed matter. Since short mode is
20343      # case insensitive, let's make it lowercase to improve readability.
20344      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20345      # Now convert it back to Unix-stile (cygpath)
20346      input_path=`$CYGPATH -u "$shortmode_path"`
20347      new_path="$input_path"
20348    fi
20349  fi
20350
20351  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20352  if test "x$test_cygdrive_prefix" = x; then
20353    # As a simple fix, exclude /usr/bin since it's not a real path.
20354    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20355      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20356      # a path prefixed by /cygdrive for fixpath to work.
20357      new_path="$CYGWIN_ROOT_PATH$input_path"
20358    fi
20359  fi
20360
20361
20362  if test "x$path" != "x$new_path"; then
20363    BOOT_JDK="$new_path"
20364    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20365$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20366  fi
20367
20368  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20369
20370  path="$BOOT_JDK"
20371  has_colon=`$ECHO $path | $GREP ^.:`
20372  new_path="$path"
20373  if test "x$has_colon" = x; then
20374    # Not in mixed or Windows style, start by that.
20375    new_path=`cmd //c echo $path`
20376  fi
20377
20378
20379  input_path="$new_path"
20380  # Check if we need to convert this using DOS-style short mode. If the path
20381  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20382  # take no chances and rewrite it.
20383  # Note: m4 eats our [], so we need to use [ and ] instead.
20384  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20385  if test "x$has_forbidden_chars" != x; then
20386    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20387    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20388  fi
20389
20390
20391  windows_path="$new_path"
20392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20393    unix_path=`$CYGPATH -u "$windows_path"`
20394    new_path="$unix_path"
20395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20397    new_path="$unix_path"
20398  fi
20399
20400  if test "x$path" != "x$new_path"; then
20401    BOOT_JDK="$new_path"
20402    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20403$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20404  fi
20405
20406  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20407  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20408
20409  else
20410    # We're on a posix platform. Hooray! :)
20411    path="$BOOT_JDK"
20412    has_space=`$ECHO "$path" | $GREP " "`
20413    if test "x$has_space" != x; then
20414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20415$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20416      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20417    fi
20418
20419    # Use eval to expand a potential ~
20420    eval path="$path"
20421    if test ! -f "$path" && test ! -d "$path"; then
20422      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20423    fi
20424
20425    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20426  fi
20427
20428              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20429$as_echo_n "checking for Boot JDK... " >&6; }
20430              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20431$as_echo "$BOOT_JDK" >&6; }
20432              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20433$as_echo_n "checking Boot JDK version... " >&6; }
20434              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20435              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20436$as_echo "$BOOT_JDK_VERSION" >&6; }
20437            fi # end check jdk version
20438          fi # end check rt.jar
20439        fi # end check javac
20440      fi # end check java
20441    fi # end check boot jdk found
20442  fi
20443
20444
20445  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20446
20447  if test "x$BOOT_JDK_FOUND" = xno; then
20448    # Now execute the test
20449
20450  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20451    # First check at user selected default
20452
20453  if test "x$BOOT_JDK_FOUND" = xno; then
20454    # Now execute the test
20455
20456  if test -x /usr/libexec/java_home; then
20457    BOOT_JDK=`/usr/libexec/java_home `
20458    BOOT_JDK_FOUND=maybe
20459    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20460$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20461  fi
20462
20463
20464    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20465    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20466      # Do we have a bin/java?
20467      if test ! -x "$BOOT_JDK/bin/java"; then
20468        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20469$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20470        BOOT_JDK_FOUND=no
20471      else
20472        # Do we have a bin/javac?
20473        if test ! -x "$BOOT_JDK/bin/javac"; then
20474          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20475$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20476          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20477$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20478          BOOT_JDK_FOUND=no
20479        else
20480          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20481          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20482            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20484            BOOT_JDK_FOUND=no
20485          else
20486            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20487            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20488
20489            # Extra M4 quote needed to protect [] in grep expression.
20490            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20491            if test "x$FOUND_CORRECT_VERSION" = x; then
20492              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20493$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20494              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20495$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20496              BOOT_JDK_FOUND=no
20497            else
20498              # We're done! :-)
20499              BOOT_JDK_FOUND=yes
20500
20501  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20502
20503  # Input might be given as Windows format, start by converting to
20504  # unix format.
20505  path="$BOOT_JDK"
20506  new_path=`$CYGPATH -u "$path"`
20507
20508  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20509  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20510  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20511  # "foo.exe" is OK but "foo" is an error.
20512  #
20513  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20514  # It is also a way to make sure we got the proper file name for the real test later on.
20515  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20516  if test "x$test_shortpath" = x; then
20517    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20519    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20520  fi
20521
20522  # Call helper function which possibly converts this using DOS-style short mode.
20523  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20534    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20535    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20536      # Going to short mode and back again did indeed matter. Since short mode is
20537      # case insensitive, let's make it lowercase to improve readability.
20538      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20539      # Now convert it back to Unix-stile (cygpath)
20540      input_path=`$CYGPATH -u "$shortmode_path"`
20541      new_path="$input_path"
20542    fi
20543  fi
20544
20545  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20546  if test "x$test_cygdrive_prefix" = x; then
20547    # As a simple fix, exclude /usr/bin since it's not a real path.
20548    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20549      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20550      # a path prefixed by /cygdrive for fixpath to work.
20551      new_path="$CYGWIN_ROOT_PATH$input_path"
20552    fi
20553  fi
20554
20555
20556  if test "x$path" != "x$new_path"; then
20557    BOOT_JDK="$new_path"
20558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20560  fi
20561
20562  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20563
20564  path="$BOOT_JDK"
20565  has_colon=`$ECHO $path | $GREP ^.:`
20566  new_path="$path"
20567  if test "x$has_colon" = x; then
20568    # Not in mixed or Windows style, start by that.
20569    new_path=`cmd //c echo $path`
20570  fi
20571
20572
20573  input_path="$new_path"
20574  # Check if we need to convert this using DOS-style short mode. If the path
20575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20576  # take no chances and rewrite it.
20577  # Note: m4 eats our [], so we need to use [ and ] instead.
20578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20579  if test "x$has_forbidden_chars" != x; then
20580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20581    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20582  fi
20583
20584
20585  windows_path="$new_path"
20586  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20587    unix_path=`$CYGPATH -u "$windows_path"`
20588    new_path="$unix_path"
20589  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20590    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20591    new_path="$unix_path"
20592  fi
20593
20594  if test "x$path" != "x$new_path"; then
20595    BOOT_JDK="$new_path"
20596    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20597$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20598  fi
20599
20600  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20601  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20602
20603  else
20604    # We're on a posix platform. Hooray! :)
20605    path="$BOOT_JDK"
20606    has_space=`$ECHO "$path" | $GREP " "`
20607    if test "x$has_space" != x; then
20608      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20609$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20610      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20611    fi
20612
20613    # Use eval to expand a potential ~
20614    eval path="$path"
20615    if test ! -f "$path" && test ! -d "$path"; then
20616      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20617    fi
20618
20619    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20620  fi
20621
20622              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20623$as_echo_n "checking for Boot JDK... " >&6; }
20624              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20625$as_echo "$BOOT_JDK" >&6; }
20626              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20627$as_echo_n "checking Boot JDK version... " >&6; }
20628              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20629              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20630$as_echo "$BOOT_JDK_VERSION" >&6; }
20631            fi # end check jdk version
20632          fi # end check rt.jar
20633        fi # end check javac
20634      fi # end check java
20635    fi # end check boot jdk found
20636  fi
20637
20638    # If that did not work out (e.g. too old), try explicit versions instead
20639
20640  if test "x$BOOT_JDK_FOUND" = xno; then
20641    # Now execute the test
20642
20643  if test -x /usr/libexec/java_home; then
20644    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20645    BOOT_JDK_FOUND=maybe
20646    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20647$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20648  fi
20649
20650
20651    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20652    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20653      # Do we have a bin/java?
20654      if test ! -x "$BOOT_JDK/bin/java"; then
20655        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20657        BOOT_JDK_FOUND=no
20658      else
20659        # Do we have a bin/javac?
20660        if test ! -x "$BOOT_JDK/bin/javac"; then
20661          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20662$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20663          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20664$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20665          BOOT_JDK_FOUND=no
20666        else
20667          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20668          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20669            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20670$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20671            BOOT_JDK_FOUND=no
20672          else
20673            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20674            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20675
20676            # Extra M4 quote needed to protect [] in grep expression.
20677            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20678            if test "x$FOUND_CORRECT_VERSION" = x; then
20679              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20680$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20681              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20682$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20683              BOOT_JDK_FOUND=no
20684            else
20685              # We're done! :-)
20686              BOOT_JDK_FOUND=yes
20687
20688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20689
20690  # Input might be given as Windows format, start by converting to
20691  # unix format.
20692  path="$BOOT_JDK"
20693  new_path=`$CYGPATH -u "$path"`
20694
20695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20698  # "foo.exe" is OK but "foo" is an error.
20699  #
20700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20701  # It is also a way to make sure we got the proper file name for the real test later on.
20702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20703  if test "x$test_shortpath" = x; then
20704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20705$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20706    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20707  fi
20708
20709  # Call helper function which possibly converts this using DOS-style short mode.
20710  # If so, the updated path is stored in $new_path.
20711
20712  input_path="$new_path"
20713  # Check if we need to convert this using DOS-style short mode. If the path
20714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20715  # take no chances and rewrite it.
20716  # Note: m4 eats our [], so we need to use [ and ] instead.
20717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20718  if test "x$has_forbidden_chars" != x; then
20719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20723      # Going to short mode and back again did indeed matter. Since short mode is
20724      # case insensitive, let's make it lowercase to improve readability.
20725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20726      # Now convert it back to Unix-stile (cygpath)
20727      input_path=`$CYGPATH -u "$shortmode_path"`
20728      new_path="$input_path"
20729    fi
20730  fi
20731
20732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20733  if test "x$test_cygdrive_prefix" = x; then
20734    # As a simple fix, exclude /usr/bin since it's not a real path.
20735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20737      # a path prefixed by /cygdrive for fixpath to work.
20738      new_path="$CYGWIN_ROOT_PATH$input_path"
20739    fi
20740  fi
20741
20742
20743  if test "x$path" != "x$new_path"; then
20744    BOOT_JDK="$new_path"
20745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20746$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20747  fi
20748
20749  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20750
20751  path="$BOOT_JDK"
20752  has_colon=`$ECHO $path | $GREP ^.:`
20753  new_path="$path"
20754  if test "x$has_colon" = x; then
20755    # Not in mixed or Windows style, start by that.
20756    new_path=`cmd //c echo $path`
20757  fi
20758
20759
20760  input_path="$new_path"
20761  # Check if we need to convert this using DOS-style short mode. If the path
20762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20763  # take no chances and rewrite it.
20764  # Note: m4 eats our [], so we need to use [ and ] instead.
20765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20766  if test "x$has_forbidden_chars" != x; then
20767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20769  fi
20770
20771
20772  windows_path="$new_path"
20773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20774    unix_path=`$CYGPATH -u "$windows_path"`
20775    new_path="$unix_path"
20776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20778    new_path="$unix_path"
20779  fi
20780
20781  if test "x$path" != "x$new_path"; then
20782    BOOT_JDK="$new_path"
20783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20784$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20785  fi
20786
20787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20789
20790  else
20791    # We're on a posix platform. Hooray! :)
20792    path="$BOOT_JDK"
20793    has_space=`$ECHO "$path" | $GREP " "`
20794    if test "x$has_space" != x; then
20795      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20796$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20797      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20798    fi
20799
20800    # Use eval to expand a potential ~
20801    eval path="$path"
20802    if test ! -f "$path" && test ! -d "$path"; then
20803      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20804    fi
20805
20806    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20807  fi
20808
20809              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20810$as_echo_n "checking for Boot JDK... " >&6; }
20811              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20812$as_echo "$BOOT_JDK" >&6; }
20813              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20814$as_echo_n "checking Boot JDK version... " >&6; }
20815              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20816              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20817$as_echo "$BOOT_JDK_VERSION" >&6; }
20818            fi # end check jdk version
20819          fi # end check rt.jar
20820        fi # end check javac
20821      fi # end check java
20822    fi # end check boot jdk found
20823  fi
20824
20825
20826  if test "x$BOOT_JDK_FOUND" = xno; then
20827    # Now execute the test
20828
20829  if test -x /usr/libexec/java_home; then
20830    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20831    BOOT_JDK_FOUND=maybe
20832    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20833$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20834  fi
20835
20836
20837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20839      # Do we have a bin/java?
20840      if test ! -x "$BOOT_JDK/bin/java"; then
20841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20843        BOOT_JDK_FOUND=no
20844      else
20845        # Do we have a bin/javac?
20846        if test ! -x "$BOOT_JDK/bin/javac"; then
20847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20851          BOOT_JDK_FOUND=no
20852        else
20853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20857            BOOT_JDK_FOUND=no
20858          else
20859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20861
20862            # Extra M4 quote needed to protect [] in grep expression.
20863            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20864            if test "x$FOUND_CORRECT_VERSION" = x; then
20865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20869              BOOT_JDK_FOUND=no
20870            else
20871              # We're done! :-)
20872              BOOT_JDK_FOUND=yes
20873
20874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20875
20876  # Input might be given as Windows format, start by converting to
20877  # unix format.
20878  path="$BOOT_JDK"
20879  new_path=`$CYGPATH -u "$path"`
20880
20881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20884  # "foo.exe" is OK but "foo" is an error.
20885  #
20886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20887  # It is also a way to make sure we got the proper file name for the real test later on.
20888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20889  if test "x$test_shortpath" = x; then
20890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20893  fi
20894
20895  # Call helper function which possibly converts this using DOS-style short mode.
20896  # If so, the updated path is stored in $new_path.
20897
20898  input_path="$new_path"
20899  # Check if we need to convert this using DOS-style short mode. If the path
20900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20901  # take no chances and rewrite it.
20902  # Note: m4 eats our [], so we need to use [ and ] instead.
20903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20904  if test "x$has_forbidden_chars" != x; then
20905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20909      # Going to short mode and back again did indeed matter. Since short mode is
20910      # case insensitive, let's make it lowercase to improve readability.
20911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20912      # Now convert it back to Unix-stile (cygpath)
20913      input_path=`$CYGPATH -u "$shortmode_path"`
20914      new_path="$input_path"
20915    fi
20916  fi
20917
20918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20919  if test "x$test_cygdrive_prefix" = x; then
20920    # As a simple fix, exclude /usr/bin since it's not a real path.
20921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20923      # a path prefixed by /cygdrive for fixpath to work.
20924      new_path="$CYGWIN_ROOT_PATH$input_path"
20925    fi
20926  fi
20927
20928
20929  if test "x$path" != "x$new_path"; then
20930    BOOT_JDK="$new_path"
20931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20933  fi
20934
20935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20936
20937  path="$BOOT_JDK"
20938  has_colon=`$ECHO $path | $GREP ^.:`
20939  new_path="$path"
20940  if test "x$has_colon" = x; then
20941    # Not in mixed or Windows style, start by that.
20942    new_path=`cmd //c echo $path`
20943  fi
20944
20945
20946  input_path="$new_path"
20947  # Check if we need to convert this using DOS-style short mode. If the path
20948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20949  # take no chances and rewrite it.
20950  # Note: m4 eats our [], so we need to use [ and ] instead.
20951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20952  if test "x$has_forbidden_chars" != x; then
20953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20955  fi
20956
20957
20958  windows_path="$new_path"
20959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20960    unix_path=`$CYGPATH -u "$windows_path"`
20961    new_path="$unix_path"
20962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20964    new_path="$unix_path"
20965  fi
20966
20967  if test "x$path" != "x$new_path"; then
20968    BOOT_JDK="$new_path"
20969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20971  fi
20972
20973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20975
20976  else
20977    # We're on a posix platform. Hooray! :)
20978    path="$BOOT_JDK"
20979    has_space=`$ECHO "$path" | $GREP " "`
20980    if test "x$has_space" != x; then
20981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20984    fi
20985
20986    # Use eval to expand a potential ~
20987    eval path="$path"
20988    if test ! -f "$path" && test ! -d "$path"; then
20989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20990    fi
20991
20992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20993  fi
20994
20995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20996$as_echo_n "checking for Boot JDK... " >&6; }
20997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20998$as_echo "$BOOT_JDK" >&6; }
20999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21000$as_echo_n "checking Boot JDK version... " >&6; }
21001              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21003$as_echo "$BOOT_JDK_VERSION" >&6; }
21004            fi # end check jdk version
21005          fi # end check rt.jar
21006        fi # end check javac
21007      fi # end check java
21008    fi # end check boot jdk found
21009  fi
21010
21011
21012  if test "x$BOOT_JDK_FOUND" = xno; then
21013    # Now execute the test
21014
21015  if test -x /usr/libexec/java_home; then
21016    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21017    BOOT_JDK_FOUND=maybe
21018    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21019$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21020  fi
21021
21022
21023    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21024    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21025      # Do we have a bin/java?
21026      if test ! -x "$BOOT_JDK/bin/java"; then
21027        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21029        BOOT_JDK_FOUND=no
21030      else
21031        # Do we have a bin/javac?
21032        if test ! -x "$BOOT_JDK/bin/javac"; then
21033          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21034$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21035          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21036$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21037          BOOT_JDK_FOUND=no
21038        else
21039          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21040          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21041            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21042$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21043            BOOT_JDK_FOUND=no
21044          else
21045            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21046            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21047
21048            # Extra M4 quote needed to protect [] in grep expression.
21049            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21050            if test "x$FOUND_CORRECT_VERSION" = x; then
21051              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21052$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21053              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21054$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21055              BOOT_JDK_FOUND=no
21056            else
21057              # We're done! :-)
21058              BOOT_JDK_FOUND=yes
21059
21060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21061
21062  # Input might be given as Windows format, start by converting to
21063  # unix format.
21064  path="$BOOT_JDK"
21065  new_path=`$CYGPATH -u "$path"`
21066
21067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21070  # "foo.exe" is OK but "foo" is an error.
21071  #
21072  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21073  # It is also a way to make sure we got the proper file name for the real test later on.
21074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21075  if test "x$test_shortpath" = x; then
21076    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21077$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21078    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21079  fi
21080
21081  # Call helper function which possibly converts this using DOS-style short mode.
21082  # If so, the updated path is stored in $new_path.
21083
21084  input_path="$new_path"
21085  # Check if we need to convert this using DOS-style short mode. If the path
21086  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21087  # take no chances and rewrite it.
21088  # Note: m4 eats our [], so we need to use [ and ] instead.
21089  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21090  if test "x$has_forbidden_chars" != x; then
21091    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21092    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21093    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21094    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21095      # Going to short mode and back again did indeed matter. Since short mode is
21096      # case insensitive, let's make it lowercase to improve readability.
21097      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21098      # Now convert it back to Unix-stile (cygpath)
21099      input_path=`$CYGPATH -u "$shortmode_path"`
21100      new_path="$input_path"
21101    fi
21102  fi
21103
21104  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21105  if test "x$test_cygdrive_prefix" = x; then
21106    # As a simple fix, exclude /usr/bin since it's not a real path.
21107    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21108      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21109      # a path prefixed by /cygdrive for fixpath to work.
21110      new_path="$CYGWIN_ROOT_PATH$input_path"
21111    fi
21112  fi
21113
21114
21115  if test "x$path" != "x$new_path"; then
21116    BOOT_JDK="$new_path"
21117    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21118$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21119  fi
21120
21121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21122
21123  path="$BOOT_JDK"
21124  has_colon=`$ECHO $path | $GREP ^.:`
21125  new_path="$path"
21126  if test "x$has_colon" = x; then
21127    # Not in mixed or Windows style, start by that.
21128    new_path=`cmd //c echo $path`
21129  fi
21130
21131
21132  input_path="$new_path"
21133  # Check if we need to convert this using DOS-style short mode. If the path
21134  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21135  # take no chances and rewrite it.
21136  # Note: m4 eats our [], so we need to use [ and ] instead.
21137  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21138  if test "x$has_forbidden_chars" != x; then
21139    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21140    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21141  fi
21142
21143
21144  windows_path="$new_path"
21145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21146    unix_path=`$CYGPATH -u "$windows_path"`
21147    new_path="$unix_path"
21148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21150    new_path="$unix_path"
21151  fi
21152
21153  if test "x$path" != "x$new_path"; then
21154    BOOT_JDK="$new_path"
21155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21157  fi
21158
21159  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21160  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21161
21162  else
21163    # We're on a posix platform. Hooray! :)
21164    path="$BOOT_JDK"
21165    has_space=`$ECHO "$path" | $GREP " "`
21166    if test "x$has_space" != x; then
21167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21168$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21169      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21170    fi
21171
21172    # Use eval to expand a potential ~
21173    eval path="$path"
21174    if test ! -f "$path" && test ! -d "$path"; then
21175      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21176    fi
21177
21178    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21179  fi
21180
21181              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21182$as_echo_n "checking for Boot JDK... " >&6; }
21183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21184$as_echo "$BOOT_JDK" >&6; }
21185              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21186$as_echo_n "checking Boot JDK version... " >&6; }
21187              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21188              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21189$as_echo "$BOOT_JDK_VERSION" >&6; }
21190            fi # end check jdk version
21191          fi # end check rt.jar
21192        fi # end check javac
21193      fi # end check java
21194    fi # end check boot jdk found
21195  fi
21196
21197  fi
21198
21199
21200    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21201    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21202      # Do we have a bin/java?
21203      if test ! -x "$BOOT_JDK/bin/java"; then
21204        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21205$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21206        BOOT_JDK_FOUND=no
21207      else
21208        # Do we have a bin/javac?
21209        if test ! -x "$BOOT_JDK/bin/javac"; then
21210          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21211$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21212          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21213$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21214          BOOT_JDK_FOUND=no
21215        else
21216          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21217          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21218            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21219$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21220            BOOT_JDK_FOUND=no
21221          else
21222            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21223            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21224
21225            # Extra M4 quote needed to protect [] in grep expression.
21226            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21227            if test "x$FOUND_CORRECT_VERSION" = x; then
21228              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21230              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21231$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21232              BOOT_JDK_FOUND=no
21233            else
21234              # We're done! :-)
21235              BOOT_JDK_FOUND=yes
21236
21237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21238
21239  # Input might be given as Windows format, start by converting to
21240  # unix format.
21241  path="$BOOT_JDK"
21242  new_path=`$CYGPATH -u "$path"`
21243
21244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21247  # "foo.exe" is OK but "foo" is an error.
21248  #
21249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21250  # It is also a way to make sure we got the proper file name for the real test later on.
21251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21252  if test "x$test_shortpath" = x; then
21253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21255    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21256  fi
21257
21258  # Call helper function which possibly converts this using DOS-style short mode.
21259  # If so, the updated path is stored in $new_path.
21260
21261  input_path="$new_path"
21262  # Check if we need to convert this using DOS-style short mode. If the path
21263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21264  # take no chances and rewrite it.
21265  # Note: m4 eats our [], so we need to use [ and ] instead.
21266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21267  if test "x$has_forbidden_chars" != x; then
21268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21272      # Going to short mode and back again did indeed matter. Since short mode is
21273      # case insensitive, let's make it lowercase to improve readability.
21274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21275      # Now convert it back to Unix-stile (cygpath)
21276      input_path=`$CYGPATH -u "$shortmode_path"`
21277      new_path="$input_path"
21278    fi
21279  fi
21280
21281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21282  if test "x$test_cygdrive_prefix" = x; then
21283    # As a simple fix, exclude /usr/bin since it's not a real path.
21284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21286      # a path prefixed by /cygdrive for fixpath to work.
21287      new_path="$CYGWIN_ROOT_PATH$input_path"
21288    fi
21289  fi
21290
21291
21292  if test "x$path" != "x$new_path"; then
21293    BOOT_JDK="$new_path"
21294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21296  fi
21297
21298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21299
21300  path="$BOOT_JDK"
21301  has_colon=`$ECHO $path | $GREP ^.:`
21302  new_path="$path"
21303  if test "x$has_colon" = x; then
21304    # Not in mixed or Windows style, start by that.
21305    new_path=`cmd //c echo $path`
21306  fi
21307
21308
21309  input_path="$new_path"
21310  # Check if we need to convert this using DOS-style short mode. If the path
21311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21312  # take no chances and rewrite it.
21313  # Note: m4 eats our [], so we need to use [ and ] instead.
21314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21315  if test "x$has_forbidden_chars" != x; then
21316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21318  fi
21319
21320
21321  windows_path="$new_path"
21322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21323    unix_path=`$CYGPATH -u "$windows_path"`
21324    new_path="$unix_path"
21325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21327    new_path="$unix_path"
21328  fi
21329
21330  if test "x$path" != "x$new_path"; then
21331    BOOT_JDK="$new_path"
21332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21334  fi
21335
21336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21338
21339  else
21340    # We're on a posix platform. Hooray! :)
21341    path="$BOOT_JDK"
21342    has_space=`$ECHO "$path" | $GREP " "`
21343    if test "x$has_space" != x; then
21344      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21346      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21347    fi
21348
21349    # Use eval to expand a potential ~
21350    eval path="$path"
21351    if test ! -f "$path" && test ! -d "$path"; then
21352      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21353    fi
21354
21355    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21356  fi
21357
21358              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21359$as_echo_n "checking for Boot JDK... " >&6; }
21360              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21361$as_echo "$BOOT_JDK" >&6; }
21362              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21363$as_echo_n "checking Boot JDK version... " >&6; }
21364              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21365              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21366$as_echo "$BOOT_JDK_VERSION" >&6; }
21367            fi # end check jdk version
21368          fi # end check rt.jar
21369        fi # end check javac
21370      fi # end check java
21371    fi # end check boot jdk found
21372  fi
21373
21374
21375  # Test: Is $JAVA_HOME set?
21376
21377  if test "x$BOOT_JDK_FOUND" = xno; then
21378    # Now execute the test
21379
21380  if test "x$JAVA_HOME" != x; then
21381    JAVA_HOME_PROCESSED="$JAVA_HOME"
21382
21383  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21384
21385  # Input might be given as Windows format, start by converting to
21386  # unix format.
21387  path="$JAVA_HOME_PROCESSED"
21388  new_path=`$CYGPATH -u "$path"`
21389
21390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21393  # "foo.exe" is OK but "foo" is an error.
21394  #
21395  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21396  # It is also a way to make sure we got the proper file name for the real test later on.
21397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21398  if test "x$test_shortpath" = x; then
21399    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21400$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21401    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21402  fi
21403
21404  # Call helper function which possibly converts this using DOS-style short mode.
21405  # If so, the updated path is stored in $new_path.
21406
21407  input_path="$new_path"
21408  # Check if we need to convert this using DOS-style short mode. If the path
21409  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21410  # take no chances and rewrite it.
21411  # Note: m4 eats our [], so we need to use [ and ] instead.
21412  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21413  if test "x$has_forbidden_chars" != x; then
21414    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21415    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21416    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21417    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21418      # Going to short mode and back again did indeed matter. Since short mode is
21419      # case insensitive, let's make it lowercase to improve readability.
21420      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21421      # Now convert it back to Unix-stile (cygpath)
21422      input_path=`$CYGPATH -u "$shortmode_path"`
21423      new_path="$input_path"
21424    fi
21425  fi
21426
21427  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21428  if test "x$test_cygdrive_prefix" = x; then
21429    # As a simple fix, exclude /usr/bin since it's not a real path.
21430    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21431      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21432      # a path prefixed by /cygdrive for fixpath to work.
21433      new_path="$CYGWIN_ROOT_PATH$input_path"
21434    fi
21435  fi
21436
21437
21438  if test "x$path" != "x$new_path"; then
21439    JAVA_HOME_PROCESSED="$new_path"
21440    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21441$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21442  fi
21443
21444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21445
21446  path="$JAVA_HOME_PROCESSED"
21447  has_colon=`$ECHO $path | $GREP ^.:`
21448  new_path="$path"
21449  if test "x$has_colon" = x; then
21450    # Not in mixed or Windows style, start by that.
21451    new_path=`cmd //c echo $path`
21452  fi
21453
21454
21455  input_path="$new_path"
21456  # Check if we need to convert this using DOS-style short mode. If the path
21457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21458  # take no chances and rewrite it.
21459  # Note: m4 eats our [], so we need to use [ and ] instead.
21460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21461  if test "x$has_forbidden_chars" != x; then
21462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21463    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21464  fi
21465
21466
21467  windows_path="$new_path"
21468  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21469    unix_path=`$CYGPATH -u "$windows_path"`
21470    new_path="$unix_path"
21471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21472    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21473    new_path="$unix_path"
21474  fi
21475
21476  if test "x$path" != "x$new_path"; then
21477    JAVA_HOME_PROCESSED="$new_path"
21478    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21479$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21480  fi
21481
21482  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21483  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21484
21485  else
21486    # We're on a posix platform. Hooray! :)
21487    path="$JAVA_HOME_PROCESSED"
21488    has_space=`$ECHO "$path" | $GREP " "`
21489    if test "x$has_space" != x; then
21490      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21491$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21492      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21493    fi
21494
21495    # Use eval to expand a potential ~
21496    eval path="$path"
21497    if test ! -f "$path" && test ! -d "$path"; then
21498      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21499    fi
21500
21501    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21502  fi
21503
21504    if test ! -d "$JAVA_HOME_PROCESSED"; then
21505      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21506$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21507    else
21508      # Aha, the user has set a JAVA_HOME
21509      # let us use that as the Boot JDK.
21510      BOOT_JDK="$JAVA_HOME_PROCESSED"
21511      BOOT_JDK_FOUND=maybe
21512      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21513$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21514    fi
21515  fi
21516
21517
21518    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21519    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21520      # Do we have a bin/java?
21521      if test ! -x "$BOOT_JDK/bin/java"; then
21522        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21523$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21524        BOOT_JDK_FOUND=no
21525      else
21526        # Do we have a bin/javac?
21527        if test ! -x "$BOOT_JDK/bin/javac"; then
21528          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21530          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21531$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21532          BOOT_JDK_FOUND=no
21533        else
21534          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21535          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21536            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21537$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21538            BOOT_JDK_FOUND=no
21539          else
21540            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21541            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21542
21543            # Extra M4 quote needed to protect [] in grep expression.
21544            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21545            if test "x$FOUND_CORRECT_VERSION" = x; then
21546              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21548              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21550              BOOT_JDK_FOUND=no
21551            else
21552              # We're done! :-)
21553              BOOT_JDK_FOUND=yes
21554
21555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21556
21557  # Input might be given as Windows format, start by converting to
21558  # unix format.
21559  path="$BOOT_JDK"
21560  new_path=`$CYGPATH -u "$path"`
21561
21562  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21563  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21564  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21565  # "foo.exe" is OK but "foo" is an error.
21566  #
21567  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21568  # It is also a way to make sure we got the proper file name for the real test later on.
21569  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21570  if test "x$test_shortpath" = x; then
21571    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21572$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21573    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21574  fi
21575
21576  # Call helper function which possibly converts this using DOS-style short mode.
21577  # If so, the updated path is stored in $new_path.
21578
21579  input_path="$new_path"
21580  # Check if we need to convert this using DOS-style short mode. If the path
21581  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21582  # take no chances and rewrite it.
21583  # Note: m4 eats our [], so we need to use [ and ] instead.
21584  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21585  if test "x$has_forbidden_chars" != x; then
21586    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21587    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21588    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21589    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21590      # Going to short mode and back again did indeed matter. Since short mode is
21591      # case insensitive, let's make it lowercase to improve readability.
21592      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21593      # Now convert it back to Unix-stile (cygpath)
21594      input_path=`$CYGPATH -u "$shortmode_path"`
21595      new_path="$input_path"
21596    fi
21597  fi
21598
21599  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21600  if test "x$test_cygdrive_prefix" = x; then
21601    # As a simple fix, exclude /usr/bin since it's not a real path.
21602    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21603      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21604      # a path prefixed by /cygdrive for fixpath to work.
21605      new_path="$CYGWIN_ROOT_PATH$input_path"
21606    fi
21607  fi
21608
21609
21610  if test "x$path" != "x$new_path"; then
21611    BOOT_JDK="$new_path"
21612    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21613$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21614  fi
21615
21616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21617
21618  path="$BOOT_JDK"
21619  has_colon=`$ECHO $path | $GREP ^.:`
21620  new_path="$path"
21621  if test "x$has_colon" = x; then
21622    # Not in mixed or Windows style, start by that.
21623    new_path=`cmd //c echo $path`
21624  fi
21625
21626
21627  input_path="$new_path"
21628  # Check if we need to convert this using DOS-style short mode. If the path
21629  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21630  # take no chances and rewrite it.
21631  # Note: m4 eats our [], so we need to use [ and ] instead.
21632  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21633  if test "x$has_forbidden_chars" != x; then
21634    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21635    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21636  fi
21637
21638
21639  windows_path="$new_path"
21640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21641    unix_path=`$CYGPATH -u "$windows_path"`
21642    new_path="$unix_path"
21643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21644    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21645    new_path="$unix_path"
21646  fi
21647
21648  if test "x$path" != "x$new_path"; then
21649    BOOT_JDK="$new_path"
21650    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21651$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21652  fi
21653
21654  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21655  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21656
21657  else
21658    # We're on a posix platform. Hooray! :)
21659    path="$BOOT_JDK"
21660    has_space=`$ECHO "$path" | $GREP " "`
21661    if test "x$has_space" != x; then
21662      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21664      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21665    fi
21666
21667    # Use eval to expand a potential ~
21668    eval path="$path"
21669    if test ! -f "$path" && test ! -d "$path"; then
21670      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21671    fi
21672
21673    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21674  fi
21675
21676              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21677$as_echo_n "checking for Boot JDK... " >&6; }
21678              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21679$as_echo "$BOOT_JDK" >&6; }
21680              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21681$as_echo_n "checking Boot JDK version... " >&6; }
21682              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21683              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21684$as_echo "$BOOT_JDK_VERSION" >&6; }
21685            fi # end check jdk version
21686          fi # end check rt.jar
21687        fi # end check javac
21688      fi # end check java
21689    fi # end check boot jdk found
21690  fi
21691
21692
21693  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21694
21695  if test "x$BOOT_JDK_FOUND" = xno; then
21696    # Now execute the test
21697
21698  # Extract the first word of "javac", so it can be a program name with args.
21699set dummy javac; ac_word=$2
21700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21701$as_echo_n "checking for $ac_word... " >&6; }
21702if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21703  $as_echo_n "(cached) " >&6
21704else
21705  case $JAVAC_CHECK in
21706  [\\/]* | ?:[\\/]*)
21707  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21708  ;;
21709  *)
21710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21711for as_dir in $PATH
21712do
21713  IFS=$as_save_IFS
21714  test -z "$as_dir" && as_dir=.
21715    for ac_exec_ext in '' $ac_executable_extensions; do
21716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21717    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21719    break 2
21720  fi
21721done
21722  done
21723IFS=$as_save_IFS
21724
21725  ;;
21726esac
21727fi
21728JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21729if test -n "$JAVAC_CHECK"; then
21730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21731$as_echo "$JAVAC_CHECK" >&6; }
21732else
21733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21734$as_echo "no" >&6; }
21735fi
21736
21737
21738  # Extract the first word of "java", so it can be a program name with args.
21739set dummy java; ac_word=$2
21740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21741$as_echo_n "checking for $ac_word... " >&6; }
21742if ${ac_cv_path_JAVA_CHECK+:} false; then :
21743  $as_echo_n "(cached) " >&6
21744else
21745  case $JAVA_CHECK in
21746  [\\/]* | ?:[\\/]*)
21747  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21748  ;;
21749  *)
21750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21751for as_dir in $PATH
21752do
21753  IFS=$as_save_IFS
21754  test -z "$as_dir" && as_dir=.
21755    for ac_exec_ext in '' $ac_executable_extensions; do
21756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21757    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21759    break 2
21760  fi
21761done
21762  done
21763IFS=$as_save_IFS
21764
21765  ;;
21766esac
21767fi
21768JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21769if test -n "$JAVA_CHECK"; then
21770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21771$as_echo "$JAVA_CHECK" >&6; }
21772else
21773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21774$as_echo "no" >&6; }
21775fi
21776
21777
21778  BINARY="$JAVAC_CHECK"
21779  if test "x$JAVAC_CHECK" = x; then
21780    BINARY="$JAVA_CHECK"
21781  fi
21782  if test "x$BINARY" != x; then
21783    # So there is a java(c) binary, it might be part of a JDK.
21784    # Lets find the JDK/JRE directory by following symbolic links.
21785    # Linux/GNU systems often have links from /usr/bin/java to
21786    # /etc/alternatives/java to the real JDK binary.
21787
21788  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21789    # Follow a chain of symbolic links. Use readlink
21790    # where it exists, else fall back to horribly
21791    # complicated shell code.
21792    if test "x$READLINK_TESTED" != yes; then
21793      # On MacOSX there is a readlink tool with a different
21794      # purpose than the GNU readlink tool. Check the found readlink.
21795      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21796      if test "x$ISGNU" = x; then
21797        # A readlink that we do not know how to use.
21798        # Are there other non-GNU readlinks out there?
21799        READLINK_TESTED=yes
21800        READLINK=
21801      fi
21802    fi
21803
21804    if test "x$READLINK" != x; then
21805      BINARY=`$READLINK -f $BINARY`
21806    else
21807      # Save the current directory for restoring afterwards
21808      STARTDIR=$PWD
21809      COUNTER=0
21810      sym_link_dir=`$DIRNAME $BINARY`
21811      sym_link_file=`$BASENAME $BINARY`
21812      cd $sym_link_dir
21813      # Use -P flag to resolve symlinks in directories.
21814      cd `$THEPWDCMD -P`
21815      sym_link_dir=`$THEPWDCMD -P`
21816      # Resolve file symlinks
21817      while test $COUNTER -lt 20; do
21818        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21819        if test "x$ISLINK" == x; then
21820          # This is not a symbolic link! We are done!
21821          break
21822        fi
21823        # Again resolve directory symlinks since the target of the just found
21824        # link could be in a different directory
21825        cd `$DIRNAME $ISLINK`
21826        sym_link_dir=`$THEPWDCMD -P`
21827        sym_link_file=`$BASENAME $ISLINK`
21828        let COUNTER=COUNTER+1
21829      done
21830      cd $STARTDIR
21831      BINARY=$sym_link_dir/$sym_link_file
21832    fi
21833  fi
21834
21835    BOOT_JDK=`dirname "$BINARY"`
21836    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21837    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21838      # Looks like we found ourselves an JDK
21839      BOOT_JDK_FOUND=maybe
21840      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21841$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21842    fi
21843  fi
21844
21845
21846    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21847    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21848      # Do we have a bin/java?
21849      if test ! -x "$BOOT_JDK/bin/java"; then
21850        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21852        BOOT_JDK_FOUND=no
21853      else
21854        # Do we have a bin/javac?
21855        if test ! -x "$BOOT_JDK/bin/javac"; then
21856          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21858          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21859$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21860          BOOT_JDK_FOUND=no
21861        else
21862          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21863          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21864            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21865$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21866            BOOT_JDK_FOUND=no
21867          else
21868            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21869            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21870
21871            # Extra M4 quote needed to protect [] in grep expression.
21872            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21873            if test "x$FOUND_CORRECT_VERSION" = x; then
21874              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21876              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21877$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21878              BOOT_JDK_FOUND=no
21879            else
21880              # We're done! :-)
21881              BOOT_JDK_FOUND=yes
21882
21883  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21884
21885  # Input might be given as Windows format, start by converting to
21886  # unix format.
21887  path="$BOOT_JDK"
21888  new_path=`$CYGPATH -u "$path"`
21889
21890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21893  # "foo.exe" is OK but "foo" is an error.
21894  #
21895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21896  # It is also a way to make sure we got the proper file name for the real test later on.
21897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21898  if test "x$test_shortpath" = x; then
21899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21900$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21901    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21902  fi
21903
21904  # Call helper function which possibly converts this using DOS-style short mode.
21905  # If so, the updated path is stored in $new_path.
21906
21907  input_path="$new_path"
21908  # Check if we need to convert this using DOS-style short mode. If the path
21909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21910  # take no chances and rewrite it.
21911  # Note: m4 eats our [], so we need to use [ and ] instead.
21912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21913  if test "x$has_forbidden_chars" != x; then
21914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21918      # Going to short mode and back again did indeed matter. Since short mode is
21919      # case insensitive, let's make it lowercase to improve readability.
21920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21921      # Now convert it back to Unix-stile (cygpath)
21922      input_path=`$CYGPATH -u "$shortmode_path"`
21923      new_path="$input_path"
21924    fi
21925  fi
21926
21927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21928  if test "x$test_cygdrive_prefix" = x; then
21929    # As a simple fix, exclude /usr/bin since it's not a real path.
21930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21932      # a path prefixed by /cygdrive for fixpath to work.
21933      new_path="$CYGWIN_ROOT_PATH$input_path"
21934    fi
21935  fi
21936
21937
21938  if test "x$path" != "x$new_path"; then
21939    BOOT_JDK="$new_path"
21940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21942  fi
21943
21944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21945
21946  path="$BOOT_JDK"
21947  has_colon=`$ECHO $path | $GREP ^.:`
21948  new_path="$path"
21949  if test "x$has_colon" = x; then
21950    # Not in mixed or Windows style, start by that.
21951    new_path=`cmd //c echo $path`
21952  fi
21953
21954
21955  input_path="$new_path"
21956  # Check if we need to convert this using DOS-style short mode. If the path
21957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21958  # take no chances and rewrite it.
21959  # Note: m4 eats our [], so we need to use [ and ] instead.
21960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21961  if test "x$has_forbidden_chars" != x; then
21962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21964  fi
21965
21966
21967  windows_path="$new_path"
21968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21969    unix_path=`$CYGPATH -u "$windows_path"`
21970    new_path="$unix_path"
21971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21973    new_path="$unix_path"
21974  fi
21975
21976  if test "x$path" != "x$new_path"; then
21977    BOOT_JDK="$new_path"
21978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21979$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21980  fi
21981
21982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21984
21985  else
21986    # We're on a posix platform. Hooray! :)
21987    path="$BOOT_JDK"
21988    has_space=`$ECHO "$path" | $GREP " "`
21989    if test "x$has_space" != x; then
21990      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21991$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21992      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21993    fi
21994
21995    # Use eval to expand a potential ~
21996    eval path="$path"
21997    if test ! -f "$path" && test ! -d "$path"; then
21998      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21999    fi
22000
22001    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22002  fi
22003
22004              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22005$as_echo_n "checking for Boot JDK... " >&6; }
22006              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22007$as_echo "$BOOT_JDK" >&6; }
22008              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22009$as_echo_n "checking Boot JDK version... " >&6; }
22010              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22011              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22012$as_echo "$BOOT_JDK_VERSION" >&6; }
22013            fi # end check jdk version
22014          fi # end check rt.jar
22015        fi # end check javac
22016      fi # end check java
22017    fi # end check boot jdk found
22018  fi
22019
22020
22021  # Test: Is there a JDK installed in default, well-known locations?
22022
22023  if test "x$BOOT_JDK_FOUND" = xno; then
22024    # Now execute the test
22025
22026  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22027
22028  if test "x$BOOT_JDK_FOUND" = xno; then
22029    # Now execute the test
22030
22031  if test "x$ProgramW6432" != x; then
22032    VIRTUAL_DIR="$ProgramW6432/Java"
22033
22034  windows_path="$VIRTUAL_DIR"
22035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22036    unix_path=`$CYGPATH -u "$windows_path"`
22037    VIRTUAL_DIR="$unix_path"
22038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22040    VIRTUAL_DIR="$unix_path"
22041  fi
22042
22043
22044  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22045  BOOT_JDK_SUFFIX=""
22046  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22047  if test "x$ALL_JDKS_FOUND" != x; then
22048    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22049
22050  if test "x$BOOT_JDK_FOUND" = xno; then
22051    # Now execute the test
22052
22053        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22054        if test -d "$BOOT_JDK"; then
22055          BOOT_JDK_FOUND=maybe
22056          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22057$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22058        fi
22059
22060
22061    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22062    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22063      # Do we have a bin/java?
22064      if test ! -x "$BOOT_JDK/bin/java"; then
22065        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22067        BOOT_JDK_FOUND=no
22068      else
22069        # Do we have a bin/javac?
22070        if test ! -x "$BOOT_JDK/bin/javac"; then
22071          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22072$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22073          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22074$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22075          BOOT_JDK_FOUND=no
22076        else
22077          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22078          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22079            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22080$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22081            BOOT_JDK_FOUND=no
22082          else
22083            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22084            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22085
22086            # Extra M4 quote needed to protect [] in grep expression.
22087            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22088            if test "x$FOUND_CORRECT_VERSION" = x; then
22089              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22090$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22091              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22092$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22093              BOOT_JDK_FOUND=no
22094            else
22095              # We're done! :-)
22096              BOOT_JDK_FOUND=yes
22097
22098  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22099
22100  # Input might be given as Windows format, start by converting to
22101  # unix format.
22102  path="$BOOT_JDK"
22103  new_path=`$CYGPATH -u "$path"`
22104
22105  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22106  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22107  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22108  # "foo.exe" is OK but "foo" is an error.
22109  #
22110  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22111  # It is also a way to make sure we got the proper file name for the real test later on.
22112  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22113  if test "x$test_shortpath" = x; then
22114    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22115$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22116    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22117  fi
22118
22119  # Call helper function which possibly converts this using DOS-style short mode.
22120  # If so, the updated path is stored in $new_path.
22121
22122  input_path="$new_path"
22123  # Check if we need to convert this using DOS-style short mode. If the path
22124  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22125  # take no chances and rewrite it.
22126  # Note: m4 eats our [], so we need to use [ and ] instead.
22127  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22128  if test "x$has_forbidden_chars" != x; then
22129    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22130    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22131    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22132    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22133      # Going to short mode and back again did indeed matter. Since short mode is
22134      # case insensitive, let's make it lowercase to improve readability.
22135      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22136      # Now convert it back to Unix-stile (cygpath)
22137      input_path=`$CYGPATH -u "$shortmode_path"`
22138      new_path="$input_path"
22139    fi
22140  fi
22141
22142  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22143  if test "x$test_cygdrive_prefix" = x; then
22144    # As a simple fix, exclude /usr/bin since it's not a real path.
22145    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22146      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22147      # a path prefixed by /cygdrive for fixpath to work.
22148      new_path="$CYGWIN_ROOT_PATH$input_path"
22149    fi
22150  fi
22151
22152
22153  if test "x$path" != "x$new_path"; then
22154    BOOT_JDK="$new_path"
22155    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22156$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22157  fi
22158
22159  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22160
22161  path="$BOOT_JDK"
22162  has_colon=`$ECHO $path | $GREP ^.:`
22163  new_path="$path"
22164  if test "x$has_colon" = x; then
22165    # Not in mixed or Windows style, start by that.
22166    new_path=`cmd //c echo $path`
22167  fi
22168
22169
22170  input_path="$new_path"
22171  # Check if we need to convert this using DOS-style short mode. If the path
22172  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22173  # take no chances and rewrite it.
22174  # Note: m4 eats our [], so we need to use [ and ] instead.
22175  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22176  if test "x$has_forbidden_chars" != x; then
22177    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22178    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22179  fi
22180
22181
22182  windows_path="$new_path"
22183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22184    unix_path=`$CYGPATH -u "$windows_path"`
22185    new_path="$unix_path"
22186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22188    new_path="$unix_path"
22189  fi
22190
22191  if test "x$path" != "x$new_path"; then
22192    BOOT_JDK="$new_path"
22193    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22194$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22195  fi
22196
22197  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22198  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22199
22200  else
22201    # We're on a posix platform. Hooray! :)
22202    path="$BOOT_JDK"
22203    has_space=`$ECHO "$path" | $GREP " "`
22204    if test "x$has_space" != x; then
22205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22206$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22207      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22208    fi
22209
22210    # Use eval to expand a potential ~
22211    eval path="$path"
22212    if test ! -f "$path" && test ! -d "$path"; then
22213      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22214    fi
22215
22216    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22217  fi
22218
22219              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22220$as_echo_n "checking for Boot JDK... " >&6; }
22221              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22222$as_echo "$BOOT_JDK" >&6; }
22223              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22224$as_echo_n "checking Boot JDK version... " >&6; }
22225              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22226              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22227$as_echo "$BOOT_JDK_VERSION" >&6; }
22228            fi # end check jdk version
22229          fi # end check rt.jar
22230        fi # end check javac
22231      fi # end check java
22232    fi # end check boot jdk found
22233  fi
22234
22235    done
22236  fi
22237
22238  fi
22239
22240
22241    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22242    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22243      # Do we have a bin/java?
22244      if test ! -x "$BOOT_JDK/bin/java"; then
22245        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22246$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22247        BOOT_JDK_FOUND=no
22248      else
22249        # Do we have a bin/javac?
22250        if test ! -x "$BOOT_JDK/bin/javac"; then
22251          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22252$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22253          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22254$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22255          BOOT_JDK_FOUND=no
22256        else
22257          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22258          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22259            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22260$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22261            BOOT_JDK_FOUND=no
22262          else
22263            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22264            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22265
22266            # Extra M4 quote needed to protect [] in grep expression.
22267            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22268            if test "x$FOUND_CORRECT_VERSION" = x; then
22269              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22270$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22271              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22272$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22273              BOOT_JDK_FOUND=no
22274            else
22275              # We're done! :-)
22276              BOOT_JDK_FOUND=yes
22277
22278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22279
22280  # Input might be given as Windows format, start by converting to
22281  # unix format.
22282  path="$BOOT_JDK"
22283  new_path=`$CYGPATH -u "$path"`
22284
22285  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22286  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22287  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22288  # "foo.exe" is OK but "foo" is an error.
22289  #
22290  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22291  # It is also a way to make sure we got the proper file name for the real test later on.
22292  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22293  if test "x$test_shortpath" = x; then
22294    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22295$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22296    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22297  fi
22298
22299  # Call helper function which possibly converts this using DOS-style short mode.
22300  # If so, the updated path is stored in $new_path.
22301
22302  input_path="$new_path"
22303  # Check if we need to convert this using DOS-style short mode. If the path
22304  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22305  # take no chances and rewrite it.
22306  # Note: m4 eats our [], so we need to use [ and ] instead.
22307  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22308  if test "x$has_forbidden_chars" != x; then
22309    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22310    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22311    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22312    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22313      # Going to short mode and back again did indeed matter. Since short mode is
22314      # case insensitive, let's make it lowercase to improve readability.
22315      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22316      # Now convert it back to Unix-stile (cygpath)
22317      input_path=`$CYGPATH -u "$shortmode_path"`
22318      new_path="$input_path"
22319    fi
22320  fi
22321
22322  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22323  if test "x$test_cygdrive_prefix" = x; then
22324    # As a simple fix, exclude /usr/bin since it's not a real path.
22325    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22326      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22327      # a path prefixed by /cygdrive for fixpath to work.
22328      new_path="$CYGWIN_ROOT_PATH$input_path"
22329    fi
22330  fi
22331
22332
22333  if test "x$path" != "x$new_path"; then
22334    BOOT_JDK="$new_path"
22335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22336$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22337  fi
22338
22339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22340
22341  path="$BOOT_JDK"
22342  has_colon=`$ECHO $path | $GREP ^.:`
22343  new_path="$path"
22344  if test "x$has_colon" = x; then
22345    # Not in mixed or Windows style, start by that.
22346    new_path=`cmd //c echo $path`
22347  fi
22348
22349
22350  input_path="$new_path"
22351  # Check if we need to convert this using DOS-style short mode. If the path
22352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22353  # take no chances and rewrite it.
22354  # Note: m4 eats our [], so we need to use [ and ] instead.
22355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22356  if test "x$has_forbidden_chars" != x; then
22357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22358    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22359  fi
22360
22361
22362  windows_path="$new_path"
22363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22364    unix_path=`$CYGPATH -u "$windows_path"`
22365    new_path="$unix_path"
22366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22368    new_path="$unix_path"
22369  fi
22370
22371  if test "x$path" != "x$new_path"; then
22372    BOOT_JDK="$new_path"
22373    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22374$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22375  fi
22376
22377  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22378  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22379
22380  else
22381    # We're on a posix platform. Hooray! :)
22382    path="$BOOT_JDK"
22383    has_space=`$ECHO "$path" | $GREP " "`
22384    if test "x$has_space" != x; then
22385      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22386$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22387      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22388    fi
22389
22390    # Use eval to expand a potential ~
22391    eval path="$path"
22392    if test ! -f "$path" && test ! -d "$path"; then
22393      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22394    fi
22395
22396    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22397  fi
22398
22399              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22400$as_echo_n "checking for Boot JDK... " >&6; }
22401              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22402$as_echo "$BOOT_JDK" >&6; }
22403              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22404$as_echo_n "checking Boot JDK version... " >&6; }
22405              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22406              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22407$as_echo "$BOOT_JDK_VERSION" >&6; }
22408            fi # end check jdk version
22409          fi # end check rt.jar
22410        fi # end check javac
22411      fi # end check java
22412    fi # end check boot jdk found
22413  fi
22414
22415
22416  if test "x$BOOT_JDK_FOUND" = xno; then
22417    # Now execute the test
22418
22419  if test "x$PROGRAMW6432" != x; then
22420    VIRTUAL_DIR="$PROGRAMW6432/Java"
22421
22422  windows_path="$VIRTUAL_DIR"
22423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22424    unix_path=`$CYGPATH -u "$windows_path"`
22425    VIRTUAL_DIR="$unix_path"
22426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22428    VIRTUAL_DIR="$unix_path"
22429  fi
22430
22431
22432  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22433  BOOT_JDK_SUFFIX=""
22434  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22435  if test "x$ALL_JDKS_FOUND" != x; then
22436    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22437
22438  if test "x$BOOT_JDK_FOUND" = xno; then
22439    # Now execute the test
22440
22441        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22442        if test -d "$BOOT_JDK"; then
22443          BOOT_JDK_FOUND=maybe
22444          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22445$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22446        fi
22447
22448
22449    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22450    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22451      # Do we have a bin/java?
22452      if test ! -x "$BOOT_JDK/bin/java"; then
22453        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22454$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22455        BOOT_JDK_FOUND=no
22456      else
22457        # Do we have a bin/javac?
22458        if test ! -x "$BOOT_JDK/bin/javac"; then
22459          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22460$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22461          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22462$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22463          BOOT_JDK_FOUND=no
22464        else
22465          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22466          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22467            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22468$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22469            BOOT_JDK_FOUND=no
22470          else
22471            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22472            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22473
22474            # Extra M4 quote needed to protect [] in grep expression.
22475            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22476            if test "x$FOUND_CORRECT_VERSION" = x; then
22477              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22478$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22479              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22480$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22481              BOOT_JDK_FOUND=no
22482            else
22483              # We're done! :-)
22484              BOOT_JDK_FOUND=yes
22485
22486  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22487
22488  # Input might be given as Windows format, start by converting to
22489  # unix format.
22490  path="$BOOT_JDK"
22491  new_path=`$CYGPATH -u "$path"`
22492
22493  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22494  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22495  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22496  # "foo.exe" is OK but "foo" is an error.
22497  #
22498  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22499  # It is also a way to make sure we got the proper file name for the real test later on.
22500  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22501  if test "x$test_shortpath" = x; then
22502    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22503$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22504    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22505  fi
22506
22507  # Call helper function which possibly converts this using DOS-style short mode.
22508  # If so, the updated path is stored in $new_path.
22509
22510  input_path="$new_path"
22511  # Check if we need to convert this using DOS-style short mode. If the path
22512  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22513  # take no chances and rewrite it.
22514  # Note: m4 eats our [], so we need to use [ and ] instead.
22515  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22516  if test "x$has_forbidden_chars" != x; then
22517    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22518    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22519    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22520    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22521      # Going to short mode and back again did indeed matter. Since short mode is
22522      # case insensitive, let's make it lowercase to improve readability.
22523      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22524      # Now convert it back to Unix-stile (cygpath)
22525      input_path=`$CYGPATH -u "$shortmode_path"`
22526      new_path="$input_path"
22527    fi
22528  fi
22529
22530  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22531  if test "x$test_cygdrive_prefix" = x; then
22532    # As a simple fix, exclude /usr/bin since it's not a real path.
22533    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22534      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22535      # a path prefixed by /cygdrive for fixpath to work.
22536      new_path="$CYGWIN_ROOT_PATH$input_path"
22537    fi
22538  fi
22539
22540
22541  if test "x$path" != "x$new_path"; then
22542    BOOT_JDK="$new_path"
22543    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22544$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22545  fi
22546
22547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22548
22549  path="$BOOT_JDK"
22550  has_colon=`$ECHO $path | $GREP ^.:`
22551  new_path="$path"
22552  if test "x$has_colon" = x; then
22553    # Not in mixed or Windows style, start by that.
22554    new_path=`cmd //c echo $path`
22555  fi
22556
22557
22558  input_path="$new_path"
22559  # Check if we need to convert this using DOS-style short mode. If the path
22560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22561  # take no chances and rewrite it.
22562  # Note: m4 eats our [], so we need to use [ and ] instead.
22563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22564  if test "x$has_forbidden_chars" != x; then
22565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22566    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22567  fi
22568
22569
22570  windows_path="$new_path"
22571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22572    unix_path=`$CYGPATH -u "$windows_path"`
22573    new_path="$unix_path"
22574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22576    new_path="$unix_path"
22577  fi
22578
22579  if test "x$path" != "x$new_path"; then
22580    BOOT_JDK="$new_path"
22581    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22582$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22583  fi
22584
22585  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22586  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22587
22588  else
22589    # We're on a posix platform. Hooray! :)
22590    path="$BOOT_JDK"
22591    has_space=`$ECHO "$path" | $GREP " "`
22592    if test "x$has_space" != x; then
22593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22594$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22595      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22596    fi
22597
22598    # Use eval to expand a potential ~
22599    eval path="$path"
22600    if test ! -f "$path" && test ! -d "$path"; then
22601      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22602    fi
22603
22604    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22605  fi
22606
22607              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22608$as_echo_n "checking for Boot JDK... " >&6; }
22609              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22610$as_echo "$BOOT_JDK" >&6; }
22611              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22612$as_echo_n "checking Boot JDK version... " >&6; }
22613              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22614              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22615$as_echo "$BOOT_JDK_VERSION" >&6; }
22616            fi # end check jdk version
22617          fi # end check rt.jar
22618        fi # end check javac
22619      fi # end check java
22620    fi # end check boot jdk found
22621  fi
22622
22623    done
22624  fi
22625
22626  fi
22627
22628
22629    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22630    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22631      # Do we have a bin/java?
22632      if test ! -x "$BOOT_JDK/bin/java"; then
22633        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22634$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22635        BOOT_JDK_FOUND=no
22636      else
22637        # Do we have a bin/javac?
22638        if test ! -x "$BOOT_JDK/bin/javac"; then
22639          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22641          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22642$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22643          BOOT_JDK_FOUND=no
22644        else
22645          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22646          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22647            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22649            BOOT_JDK_FOUND=no
22650          else
22651            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22652            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22653
22654            # Extra M4 quote needed to protect [] in grep expression.
22655            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22656            if test "x$FOUND_CORRECT_VERSION" = x; then
22657              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22659              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22660$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22661              BOOT_JDK_FOUND=no
22662            else
22663              # We're done! :-)
22664              BOOT_JDK_FOUND=yes
22665
22666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22667
22668  # Input might be given as Windows format, start by converting to
22669  # unix format.
22670  path="$BOOT_JDK"
22671  new_path=`$CYGPATH -u "$path"`
22672
22673  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22674  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22675  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22676  # "foo.exe" is OK but "foo" is an error.
22677  #
22678  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22679  # It is also a way to make sure we got the proper file name for the real test later on.
22680  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22681  if test "x$test_shortpath" = x; then
22682    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22683$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22684    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22685  fi
22686
22687  # Call helper function which possibly converts this using DOS-style short mode.
22688  # If so, the updated path is stored in $new_path.
22689
22690  input_path="$new_path"
22691  # Check if we need to convert this using DOS-style short mode. If the path
22692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22693  # take no chances and rewrite it.
22694  # Note: m4 eats our [], so we need to use [ and ] instead.
22695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22696  if test "x$has_forbidden_chars" != x; then
22697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22698    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22699    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22700    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22701      # Going to short mode and back again did indeed matter. Since short mode is
22702      # case insensitive, let's make it lowercase to improve readability.
22703      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22704      # Now convert it back to Unix-stile (cygpath)
22705      input_path=`$CYGPATH -u "$shortmode_path"`
22706      new_path="$input_path"
22707    fi
22708  fi
22709
22710  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22711  if test "x$test_cygdrive_prefix" = x; then
22712    # As a simple fix, exclude /usr/bin since it's not a real path.
22713    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22714      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22715      # a path prefixed by /cygdrive for fixpath to work.
22716      new_path="$CYGWIN_ROOT_PATH$input_path"
22717    fi
22718  fi
22719
22720
22721  if test "x$path" != "x$new_path"; then
22722    BOOT_JDK="$new_path"
22723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22724$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22725  fi
22726
22727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22728
22729  path="$BOOT_JDK"
22730  has_colon=`$ECHO $path | $GREP ^.:`
22731  new_path="$path"
22732  if test "x$has_colon" = x; then
22733    # Not in mixed or Windows style, start by that.
22734    new_path=`cmd //c echo $path`
22735  fi
22736
22737
22738  input_path="$new_path"
22739  # Check if we need to convert this using DOS-style short mode. If the path
22740  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22741  # take no chances and rewrite it.
22742  # Note: m4 eats our [], so we need to use [ and ] instead.
22743  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22744  if test "x$has_forbidden_chars" != x; then
22745    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22746    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22747  fi
22748
22749
22750  windows_path="$new_path"
22751  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22752    unix_path=`$CYGPATH -u "$windows_path"`
22753    new_path="$unix_path"
22754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22755    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22756    new_path="$unix_path"
22757  fi
22758
22759  if test "x$path" != "x$new_path"; then
22760    BOOT_JDK="$new_path"
22761    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22762$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22763  fi
22764
22765  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22766  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22767
22768  else
22769    # We're on a posix platform. Hooray! :)
22770    path="$BOOT_JDK"
22771    has_space=`$ECHO "$path" | $GREP " "`
22772    if test "x$has_space" != x; then
22773      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22774$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22775      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22776    fi
22777
22778    # Use eval to expand a potential ~
22779    eval path="$path"
22780    if test ! -f "$path" && test ! -d "$path"; then
22781      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22782    fi
22783
22784    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22785  fi
22786
22787              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22788$as_echo_n "checking for Boot JDK... " >&6; }
22789              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22790$as_echo "$BOOT_JDK" >&6; }
22791              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22792$as_echo_n "checking Boot JDK version... " >&6; }
22793              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22794              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22795$as_echo "$BOOT_JDK_VERSION" >&6; }
22796            fi # end check jdk version
22797          fi # end check rt.jar
22798        fi # end check javac
22799      fi # end check java
22800    fi # end check boot jdk found
22801  fi
22802
22803
22804  if test "x$BOOT_JDK_FOUND" = xno; then
22805    # Now execute the test
22806
22807  if test "x$PROGRAMFILES" != x; then
22808    VIRTUAL_DIR="$PROGRAMFILES/Java"
22809
22810  windows_path="$VIRTUAL_DIR"
22811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22812    unix_path=`$CYGPATH -u "$windows_path"`
22813    VIRTUAL_DIR="$unix_path"
22814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22816    VIRTUAL_DIR="$unix_path"
22817  fi
22818
22819
22820  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22821  BOOT_JDK_SUFFIX=""
22822  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22823  if test "x$ALL_JDKS_FOUND" != x; then
22824    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22825
22826  if test "x$BOOT_JDK_FOUND" = xno; then
22827    # Now execute the test
22828
22829        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22830        if test -d "$BOOT_JDK"; then
22831          BOOT_JDK_FOUND=maybe
22832          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22833$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22834        fi
22835
22836
22837    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22838    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22839      # Do we have a bin/java?
22840      if test ! -x "$BOOT_JDK/bin/java"; then
22841        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22842$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22843        BOOT_JDK_FOUND=no
22844      else
22845        # Do we have a bin/javac?
22846        if test ! -x "$BOOT_JDK/bin/javac"; then
22847          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22848$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22849          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22850$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22851          BOOT_JDK_FOUND=no
22852        else
22853          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22854          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22855            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22856$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22857            BOOT_JDK_FOUND=no
22858          else
22859            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22860            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22861
22862            # Extra M4 quote needed to protect [] in grep expression.
22863            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22864            if test "x$FOUND_CORRECT_VERSION" = x; then
22865              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22866$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22867              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22868$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22869              BOOT_JDK_FOUND=no
22870            else
22871              # We're done! :-)
22872              BOOT_JDK_FOUND=yes
22873
22874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22875
22876  # Input might be given as Windows format, start by converting to
22877  # unix format.
22878  path="$BOOT_JDK"
22879  new_path=`$CYGPATH -u "$path"`
22880
22881  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22882  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22883  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22884  # "foo.exe" is OK but "foo" is an error.
22885  #
22886  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22887  # It is also a way to make sure we got the proper file name for the real test later on.
22888  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22889  if test "x$test_shortpath" = x; then
22890    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22891$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22892    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22893  fi
22894
22895  # Call helper function which possibly converts this using DOS-style short mode.
22896  # If so, the updated path is stored in $new_path.
22897
22898  input_path="$new_path"
22899  # Check if we need to convert this using DOS-style short mode. If the path
22900  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22901  # take no chances and rewrite it.
22902  # Note: m4 eats our [], so we need to use [ and ] instead.
22903  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22904  if test "x$has_forbidden_chars" != x; then
22905    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22906    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22907    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22908    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22909      # Going to short mode and back again did indeed matter. Since short mode is
22910      # case insensitive, let's make it lowercase to improve readability.
22911      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22912      # Now convert it back to Unix-stile (cygpath)
22913      input_path=`$CYGPATH -u "$shortmode_path"`
22914      new_path="$input_path"
22915    fi
22916  fi
22917
22918  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22919  if test "x$test_cygdrive_prefix" = x; then
22920    # As a simple fix, exclude /usr/bin since it's not a real path.
22921    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22922      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22923      # a path prefixed by /cygdrive for fixpath to work.
22924      new_path="$CYGWIN_ROOT_PATH$input_path"
22925    fi
22926  fi
22927
22928
22929  if test "x$path" != "x$new_path"; then
22930    BOOT_JDK="$new_path"
22931    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22932$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22933  fi
22934
22935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22936
22937  path="$BOOT_JDK"
22938  has_colon=`$ECHO $path | $GREP ^.:`
22939  new_path="$path"
22940  if test "x$has_colon" = x; then
22941    # Not in mixed or Windows style, start by that.
22942    new_path=`cmd //c echo $path`
22943  fi
22944
22945
22946  input_path="$new_path"
22947  # Check if we need to convert this using DOS-style short mode. If the path
22948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22949  # take no chances and rewrite it.
22950  # Note: m4 eats our [], so we need to use [ and ] instead.
22951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22952  if test "x$has_forbidden_chars" != x; then
22953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22954    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22955  fi
22956
22957
22958  windows_path="$new_path"
22959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22960    unix_path=`$CYGPATH -u "$windows_path"`
22961    new_path="$unix_path"
22962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22964    new_path="$unix_path"
22965  fi
22966
22967  if test "x$path" != "x$new_path"; then
22968    BOOT_JDK="$new_path"
22969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22970$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22971  fi
22972
22973  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22974  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22975
22976  else
22977    # We're on a posix platform. Hooray! :)
22978    path="$BOOT_JDK"
22979    has_space=`$ECHO "$path" | $GREP " "`
22980    if test "x$has_space" != x; then
22981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22982$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22983      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22984    fi
22985
22986    # Use eval to expand a potential ~
22987    eval path="$path"
22988    if test ! -f "$path" && test ! -d "$path"; then
22989      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22990    fi
22991
22992    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22993  fi
22994
22995              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22996$as_echo_n "checking for Boot JDK... " >&6; }
22997              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22998$as_echo "$BOOT_JDK" >&6; }
22999              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23000$as_echo_n "checking Boot JDK version... " >&6; }
23001              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23002              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23003$as_echo "$BOOT_JDK_VERSION" >&6; }
23004            fi # end check jdk version
23005          fi # end check rt.jar
23006        fi # end check javac
23007      fi # end check java
23008    fi # end check boot jdk found
23009  fi
23010
23011    done
23012  fi
23013
23014  fi
23015
23016
23017    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23018    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23019      # Do we have a bin/java?
23020      if test ! -x "$BOOT_JDK/bin/java"; then
23021        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23022$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23023        BOOT_JDK_FOUND=no
23024      else
23025        # Do we have a bin/javac?
23026        if test ! -x "$BOOT_JDK/bin/javac"; then
23027          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23028$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23029          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23030$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23031          BOOT_JDK_FOUND=no
23032        else
23033          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23034          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23037            BOOT_JDK_FOUND=no
23038          else
23039            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23040            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23041
23042            # Extra M4 quote needed to protect [] in grep expression.
23043            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23044            if test "x$FOUND_CORRECT_VERSION" = x; then
23045              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23047              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23048$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23049              BOOT_JDK_FOUND=no
23050            else
23051              # We're done! :-)
23052              BOOT_JDK_FOUND=yes
23053
23054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23055
23056  # Input might be given as Windows format, start by converting to
23057  # unix format.
23058  path="$BOOT_JDK"
23059  new_path=`$CYGPATH -u "$path"`
23060
23061  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23062  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23063  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23064  # "foo.exe" is OK but "foo" is an error.
23065  #
23066  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23067  # It is also a way to make sure we got the proper file name for the real test later on.
23068  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23069  if test "x$test_shortpath" = x; then
23070    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23071$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23072    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23073  fi
23074
23075  # Call helper function which possibly converts this using DOS-style short mode.
23076  # If so, the updated path is stored in $new_path.
23077
23078  input_path="$new_path"
23079  # Check if we need to convert this using DOS-style short mode. If the path
23080  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23081  # take no chances and rewrite it.
23082  # Note: m4 eats our [], so we need to use [ and ] instead.
23083  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23084  if test "x$has_forbidden_chars" != x; then
23085    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23086    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23087    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23088    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23089      # Going to short mode and back again did indeed matter. Since short mode is
23090      # case insensitive, let's make it lowercase to improve readability.
23091      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23092      # Now convert it back to Unix-stile (cygpath)
23093      input_path=`$CYGPATH -u "$shortmode_path"`
23094      new_path="$input_path"
23095    fi
23096  fi
23097
23098  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23099  if test "x$test_cygdrive_prefix" = x; then
23100    # As a simple fix, exclude /usr/bin since it's not a real path.
23101    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23102      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23103      # a path prefixed by /cygdrive for fixpath to work.
23104      new_path="$CYGWIN_ROOT_PATH$input_path"
23105    fi
23106  fi
23107
23108
23109  if test "x$path" != "x$new_path"; then
23110    BOOT_JDK="$new_path"
23111    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23112$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23113  fi
23114
23115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23116
23117  path="$BOOT_JDK"
23118  has_colon=`$ECHO $path | $GREP ^.:`
23119  new_path="$path"
23120  if test "x$has_colon" = x; then
23121    # Not in mixed or Windows style, start by that.
23122    new_path=`cmd //c echo $path`
23123  fi
23124
23125
23126  input_path="$new_path"
23127  # Check if we need to convert this using DOS-style short mode. If the path
23128  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23129  # take no chances and rewrite it.
23130  # Note: m4 eats our [], so we need to use [ and ] instead.
23131  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23132  if test "x$has_forbidden_chars" != x; then
23133    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23134    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23135  fi
23136
23137
23138  windows_path="$new_path"
23139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23140    unix_path=`$CYGPATH -u "$windows_path"`
23141    new_path="$unix_path"
23142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23144    new_path="$unix_path"
23145  fi
23146
23147  if test "x$path" != "x$new_path"; then
23148    BOOT_JDK="$new_path"
23149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23150$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23151  fi
23152
23153  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23154  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23155
23156  else
23157    # We're on a posix platform. Hooray! :)
23158    path="$BOOT_JDK"
23159    has_space=`$ECHO "$path" | $GREP " "`
23160    if test "x$has_space" != x; then
23161      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23162$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23163      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23164    fi
23165
23166    # Use eval to expand a potential ~
23167    eval path="$path"
23168    if test ! -f "$path" && test ! -d "$path"; then
23169      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23170    fi
23171
23172    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23173  fi
23174
23175              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23176$as_echo_n "checking for Boot JDK... " >&6; }
23177              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23178$as_echo "$BOOT_JDK" >&6; }
23179              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23180$as_echo_n "checking Boot JDK version... " >&6; }
23181              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23182              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23183$as_echo "$BOOT_JDK_VERSION" >&6; }
23184            fi # end check jdk version
23185          fi # end check rt.jar
23186        fi # end check javac
23187      fi # end check java
23188    fi # end check boot jdk found
23189  fi
23190
23191
23192  if test "x$BOOT_JDK_FOUND" = xno; then
23193    # Now execute the test
23194
23195  if test "x$ProgramFiles" != x; then
23196    VIRTUAL_DIR="$ProgramFiles/Java"
23197
23198  windows_path="$VIRTUAL_DIR"
23199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23200    unix_path=`$CYGPATH -u "$windows_path"`
23201    VIRTUAL_DIR="$unix_path"
23202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23204    VIRTUAL_DIR="$unix_path"
23205  fi
23206
23207
23208  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23209  BOOT_JDK_SUFFIX=""
23210  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23211  if test "x$ALL_JDKS_FOUND" != x; then
23212    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23213
23214  if test "x$BOOT_JDK_FOUND" = xno; then
23215    # Now execute the test
23216
23217        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23218        if test -d "$BOOT_JDK"; then
23219          BOOT_JDK_FOUND=maybe
23220          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23221$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23222        fi
23223
23224
23225    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23226    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23227      # Do we have a bin/java?
23228      if test ! -x "$BOOT_JDK/bin/java"; then
23229        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23230$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23231        BOOT_JDK_FOUND=no
23232      else
23233        # Do we have a bin/javac?
23234        if test ! -x "$BOOT_JDK/bin/javac"; then
23235          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23237          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23238$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23239          BOOT_JDK_FOUND=no
23240        else
23241          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23242          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23243            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23244$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23245            BOOT_JDK_FOUND=no
23246          else
23247            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23248            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23249
23250            # Extra M4 quote needed to protect [] in grep expression.
23251            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23252            if test "x$FOUND_CORRECT_VERSION" = x; then
23253              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23254$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23255              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23256$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23257              BOOT_JDK_FOUND=no
23258            else
23259              # We're done! :-)
23260              BOOT_JDK_FOUND=yes
23261
23262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23263
23264  # Input might be given as Windows format, start by converting to
23265  # unix format.
23266  path="$BOOT_JDK"
23267  new_path=`$CYGPATH -u "$path"`
23268
23269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23272  # "foo.exe" is OK but "foo" is an error.
23273  #
23274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23275  # It is also a way to make sure we got the proper file name for the real test later on.
23276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23277  if test "x$test_shortpath" = x; then
23278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23279$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23280    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23281  fi
23282
23283  # Call helper function which possibly converts this using DOS-style short mode.
23284  # If so, the updated path is stored in $new_path.
23285
23286  input_path="$new_path"
23287  # Check if we need to convert this using DOS-style short mode. If the path
23288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23289  # take no chances and rewrite it.
23290  # Note: m4 eats our [], so we need to use [ and ] instead.
23291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23292  if test "x$has_forbidden_chars" != x; then
23293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23297      # Going to short mode and back again did indeed matter. Since short mode is
23298      # case insensitive, let's make it lowercase to improve readability.
23299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23300      # Now convert it back to Unix-stile (cygpath)
23301      input_path=`$CYGPATH -u "$shortmode_path"`
23302      new_path="$input_path"
23303    fi
23304  fi
23305
23306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23307  if test "x$test_cygdrive_prefix" = x; then
23308    # As a simple fix, exclude /usr/bin since it's not a real path.
23309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23311      # a path prefixed by /cygdrive for fixpath to work.
23312      new_path="$CYGWIN_ROOT_PATH$input_path"
23313    fi
23314  fi
23315
23316
23317  if test "x$path" != "x$new_path"; then
23318    BOOT_JDK="$new_path"
23319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23320$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23321  fi
23322
23323  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23324
23325  path="$BOOT_JDK"
23326  has_colon=`$ECHO $path | $GREP ^.:`
23327  new_path="$path"
23328  if test "x$has_colon" = x; then
23329    # Not in mixed or Windows style, start by that.
23330    new_path=`cmd //c echo $path`
23331  fi
23332
23333
23334  input_path="$new_path"
23335  # Check if we need to convert this using DOS-style short mode. If the path
23336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23337  # take no chances and rewrite it.
23338  # Note: m4 eats our [], so we need to use [ and ] instead.
23339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23340  if test "x$has_forbidden_chars" != x; then
23341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23343  fi
23344
23345
23346  windows_path="$new_path"
23347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23348    unix_path=`$CYGPATH -u "$windows_path"`
23349    new_path="$unix_path"
23350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23352    new_path="$unix_path"
23353  fi
23354
23355  if test "x$path" != "x$new_path"; then
23356    BOOT_JDK="$new_path"
23357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23358$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23359  fi
23360
23361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23363
23364  else
23365    # We're on a posix platform. Hooray! :)
23366    path="$BOOT_JDK"
23367    has_space=`$ECHO "$path" | $GREP " "`
23368    if test "x$has_space" != x; then
23369      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23370$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23371      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23372    fi
23373
23374    # Use eval to expand a potential ~
23375    eval path="$path"
23376    if test ! -f "$path" && test ! -d "$path"; then
23377      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23378    fi
23379
23380    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23381  fi
23382
23383              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23384$as_echo_n "checking for Boot JDK... " >&6; }
23385              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23386$as_echo "$BOOT_JDK" >&6; }
23387              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23388$as_echo_n "checking Boot JDK version... " >&6; }
23389              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23390              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23391$as_echo "$BOOT_JDK_VERSION" >&6; }
23392            fi # end check jdk version
23393          fi # end check rt.jar
23394        fi # end check javac
23395      fi # end check java
23396    fi # end check boot jdk found
23397  fi
23398
23399    done
23400  fi
23401
23402  fi
23403
23404
23405    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23406    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23407      # Do we have a bin/java?
23408      if test ! -x "$BOOT_JDK/bin/java"; then
23409        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23410$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23411        BOOT_JDK_FOUND=no
23412      else
23413        # Do we have a bin/javac?
23414        if test ! -x "$BOOT_JDK/bin/javac"; then
23415          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23416$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23417          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23418$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23419          BOOT_JDK_FOUND=no
23420        else
23421          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23422          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23423            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23424$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23425            BOOT_JDK_FOUND=no
23426          else
23427            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23428            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23429
23430            # Extra M4 quote needed to protect [] in grep expression.
23431            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23432            if test "x$FOUND_CORRECT_VERSION" = x; then
23433              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23435              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23436$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23437              BOOT_JDK_FOUND=no
23438            else
23439              # We're done! :-)
23440              BOOT_JDK_FOUND=yes
23441
23442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23443
23444  # Input might be given as Windows format, start by converting to
23445  # unix format.
23446  path="$BOOT_JDK"
23447  new_path=`$CYGPATH -u "$path"`
23448
23449  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23450  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23451  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23452  # "foo.exe" is OK but "foo" is an error.
23453  #
23454  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23455  # It is also a way to make sure we got the proper file name for the real test later on.
23456  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23457  if test "x$test_shortpath" = x; then
23458    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23459$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23460    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23461  fi
23462
23463  # Call helper function which possibly converts this using DOS-style short mode.
23464  # If so, the updated path is stored in $new_path.
23465
23466  input_path="$new_path"
23467  # Check if we need to convert this using DOS-style short mode. If the path
23468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23469  # take no chances and rewrite it.
23470  # Note: m4 eats our [], so we need to use [ and ] instead.
23471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23472  if test "x$has_forbidden_chars" != x; then
23473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23474    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23475    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23476    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23477      # Going to short mode and back again did indeed matter. Since short mode is
23478      # case insensitive, let's make it lowercase to improve readability.
23479      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23480      # Now convert it back to Unix-stile (cygpath)
23481      input_path=`$CYGPATH -u "$shortmode_path"`
23482      new_path="$input_path"
23483    fi
23484  fi
23485
23486  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23487  if test "x$test_cygdrive_prefix" = x; then
23488    # As a simple fix, exclude /usr/bin since it's not a real path.
23489    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23490      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23491      # a path prefixed by /cygdrive for fixpath to work.
23492      new_path="$CYGWIN_ROOT_PATH$input_path"
23493    fi
23494  fi
23495
23496
23497  if test "x$path" != "x$new_path"; then
23498    BOOT_JDK="$new_path"
23499    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23500$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23501  fi
23502
23503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23504
23505  path="$BOOT_JDK"
23506  has_colon=`$ECHO $path | $GREP ^.:`
23507  new_path="$path"
23508  if test "x$has_colon" = x; then
23509    # Not in mixed or Windows style, start by that.
23510    new_path=`cmd //c echo $path`
23511  fi
23512
23513
23514  input_path="$new_path"
23515  # Check if we need to convert this using DOS-style short mode. If the path
23516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23517  # take no chances and rewrite it.
23518  # Note: m4 eats our [], so we need to use [ and ] instead.
23519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23520  if test "x$has_forbidden_chars" != x; then
23521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23522    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23523  fi
23524
23525
23526  windows_path="$new_path"
23527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23528    unix_path=`$CYGPATH -u "$windows_path"`
23529    new_path="$unix_path"
23530  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23531    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23532    new_path="$unix_path"
23533  fi
23534
23535  if test "x$path" != "x$new_path"; then
23536    BOOT_JDK="$new_path"
23537    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23538$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23539  fi
23540
23541  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23542  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23543
23544  else
23545    # We're on a posix platform. Hooray! :)
23546    path="$BOOT_JDK"
23547    has_space=`$ECHO "$path" | $GREP " "`
23548    if test "x$has_space" != x; then
23549      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23550$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23551      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23552    fi
23553
23554    # Use eval to expand a potential ~
23555    eval path="$path"
23556    if test ! -f "$path" && test ! -d "$path"; then
23557      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23558    fi
23559
23560    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23561  fi
23562
23563              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23564$as_echo_n "checking for Boot JDK... " >&6; }
23565              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23566$as_echo "$BOOT_JDK" >&6; }
23567              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23568$as_echo_n "checking Boot JDK version... " >&6; }
23569              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23570              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23571$as_echo "$BOOT_JDK_VERSION" >&6; }
23572            fi # end check jdk version
23573          fi # end check rt.jar
23574        fi # end check javac
23575      fi # end check java
23576    fi # end check boot jdk found
23577  fi
23578
23579
23580  if test "x$BOOT_JDK_FOUND" = xno; then
23581    # Now execute the test
23582
23583  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23584  BOOT_JDK_SUFFIX=""
23585  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23586  if test "x$ALL_JDKS_FOUND" != x; then
23587    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23588
23589  if test "x$BOOT_JDK_FOUND" = xno; then
23590    # Now execute the test
23591
23592        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23593        if test -d "$BOOT_JDK"; then
23594          BOOT_JDK_FOUND=maybe
23595          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23596$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23597        fi
23598
23599
23600    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23601    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23602      # Do we have a bin/java?
23603      if test ! -x "$BOOT_JDK/bin/java"; then
23604        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23605$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23606        BOOT_JDK_FOUND=no
23607      else
23608        # Do we have a bin/javac?
23609        if test ! -x "$BOOT_JDK/bin/javac"; then
23610          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23611$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23612          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23613$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23614          BOOT_JDK_FOUND=no
23615        else
23616          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23617          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23618            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23619$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23620            BOOT_JDK_FOUND=no
23621          else
23622            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23623            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23624
23625            # Extra M4 quote needed to protect [] in grep expression.
23626            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23627            if test "x$FOUND_CORRECT_VERSION" = x; then
23628              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23630              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23631$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23632              BOOT_JDK_FOUND=no
23633            else
23634              # We're done! :-)
23635              BOOT_JDK_FOUND=yes
23636
23637  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23638
23639  # Input might be given as Windows format, start by converting to
23640  # unix format.
23641  path="$BOOT_JDK"
23642  new_path=`$CYGPATH -u "$path"`
23643
23644  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23645  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23646  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23647  # "foo.exe" is OK but "foo" is an error.
23648  #
23649  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23650  # It is also a way to make sure we got the proper file name for the real test later on.
23651  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23652  if test "x$test_shortpath" = x; then
23653    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23654$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23655    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23656  fi
23657
23658  # Call helper function which possibly converts this using DOS-style short mode.
23659  # If so, the updated path is stored in $new_path.
23660
23661  input_path="$new_path"
23662  # Check if we need to convert this using DOS-style short mode. If the path
23663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23664  # take no chances and rewrite it.
23665  # Note: m4 eats our [], so we need to use [ and ] instead.
23666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23667  if test "x$has_forbidden_chars" != x; then
23668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23669    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23670    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23671    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23672      # Going to short mode and back again did indeed matter. Since short mode is
23673      # case insensitive, let's make it lowercase to improve readability.
23674      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23675      # Now convert it back to Unix-stile (cygpath)
23676      input_path=`$CYGPATH -u "$shortmode_path"`
23677      new_path="$input_path"
23678    fi
23679  fi
23680
23681  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23682  if test "x$test_cygdrive_prefix" = x; then
23683    # As a simple fix, exclude /usr/bin since it's not a real path.
23684    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23685      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23686      # a path prefixed by /cygdrive for fixpath to work.
23687      new_path="$CYGWIN_ROOT_PATH$input_path"
23688    fi
23689  fi
23690
23691
23692  if test "x$path" != "x$new_path"; then
23693    BOOT_JDK="$new_path"
23694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23695$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23696  fi
23697
23698  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23699
23700  path="$BOOT_JDK"
23701  has_colon=`$ECHO $path | $GREP ^.:`
23702  new_path="$path"
23703  if test "x$has_colon" = x; then
23704    # Not in mixed or Windows style, start by that.
23705    new_path=`cmd //c echo $path`
23706  fi
23707
23708
23709  input_path="$new_path"
23710  # Check if we need to convert this using DOS-style short mode. If the path
23711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23712  # take no chances and rewrite it.
23713  # Note: m4 eats our [], so we need to use [ and ] instead.
23714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23715  if test "x$has_forbidden_chars" != x; then
23716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23717    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23718  fi
23719
23720
23721  windows_path="$new_path"
23722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23723    unix_path=`$CYGPATH -u "$windows_path"`
23724    new_path="$unix_path"
23725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23727    new_path="$unix_path"
23728  fi
23729
23730  if test "x$path" != "x$new_path"; then
23731    BOOT_JDK="$new_path"
23732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23734  fi
23735
23736  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23737  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23738
23739  else
23740    # We're on a posix platform. Hooray! :)
23741    path="$BOOT_JDK"
23742    has_space=`$ECHO "$path" | $GREP " "`
23743    if test "x$has_space" != x; then
23744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23745$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23746      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23747    fi
23748
23749    # Use eval to expand a potential ~
23750    eval path="$path"
23751    if test ! -f "$path" && test ! -d "$path"; then
23752      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23753    fi
23754
23755    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23756  fi
23757
23758              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23759$as_echo_n "checking for Boot JDK... " >&6; }
23760              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23761$as_echo "$BOOT_JDK" >&6; }
23762              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23763$as_echo_n "checking Boot JDK version... " >&6; }
23764              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23765              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23766$as_echo "$BOOT_JDK_VERSION" >&6; }
23767            fi # end check jdk version
23768          fi # end check rt.jar
23769        fi # end check javac
23770      fi # end check java
23771    fi # end check boot jdk found
23772  fi
23773
23774    done
23775  fi
23776
23777
23778    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23779    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23780      # Do we have a bin/java?
23781      if test ! -x "$BOOT_JDK/bin/java"; then
23782        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23783$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23784        BOOT_JDK_FOUND=no
23785      else
23786        # Do we have a bin/javac?
23787        if test ! -x "$BOOT_JDK/bin/javac"; then
23788          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23790          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23791$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23792          BOOT_JDK_FOUND=no
23793        else
23794          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23795          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23796            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23797$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23798            BOOT_JDK_FOUND=no
23799          else
23800            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23801            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23802
23803            # Extra M4 quote needed to protect [] in grep expression.
23804            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23805            if test "x$FOUND_CORRECT_VERSION" = x; then
23806              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23807$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23808              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23809$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23810              BOOT_JDK_FOUND=no
23811            else
23812              # We're done! :-)
23813              BOOT_JDK_FOUND=yes
23814
23815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23816
23817  # Input might be given as Windows format, start by converting to
23818  # unix format.
23819  path="$BOOT_JDK"
23820  new_path=`$CYGPATH -u "$path"`
23821
23822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23825  # "foo.exe" is OK but "foo" is an error.
23826  #
23827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23828  # It is also a way to make sure we got the proper file name for the real test later on.
23829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23830  if test "x$test_shortpath" = x; then
23831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23832$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23833    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23834  fi
23835
23836  # Call helper function which possibly converts this using DOS-style short mode.
23837  # If so, the updated path is stored in $new_path.
23838
23839  input_path="$new_path"
23840  # Check if we need to convert this using DOS-style short mode. If the path
23841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23842  # take no chances and rewrite it.
23843  # Note: m4 eats our [], so we need to use [ and ] instead.
23844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23845  if test "x$has_forbidden_chars" != x; then
23846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23850      # Going to short mode and back again did indeed matter. Since short mode is
23851      # case insensitive, let's make it lowercase to improve readability.
23852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23853      # Now convert it back to Unix-stile (cygpath)
23854      input_path=`$CYGPATH -u "$shortmode_path"`
23855      new_path="$input_path"
23856    fi
23857  fi
23858
23859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23860  if test "x$test_cygdrive_prefix" = x; then
23861    # As a simple fix, exclude /usr/bin since it's not a real path.
23862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23864      # a path prefixed by /cygdrive for fixpath to work.
23865      new_path="$CYGWIN_ROOT_PATH$input_path"
23866    fi
23867  fi
23868
23869
23870  if test "x$path" != "x$new_path"; then
23871    BOOT_JDK="$new_path"
23872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23873$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23874  fi
23875
23876  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23877
23878  path="$BOOT_JDK"
23879  has_colon=`$ECHO $path | $GREP ^.:`
23880  new_path="$path"
23881  if test "x$has_colon" = x; then
23882    # Not in mixed or Windows style, start by that.
23883    new_path=`cmd //c echo $path`
23884  fi
23885
23886
23887  input_path="$new_path"
23888  # Check if we need to convert this using DOS-style short mode. If the path
23889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23890  # take no chances and rewrite it.
23891  # Note: m4 eats our [], so we need to use [ and ] instead.
23892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23893  if test "x$has_forbidden_chars" != x; then
23894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23896  fi
23897
23898
23899  windows_path="$new_path"
23900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23901    unix_path=`$CYGPATH -u "$windows_path"`
23902    new_path="$unix_path"
23903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23905    new_path="$unix_path"
23906  fi
23907
23908  if test "x$path" != "x$new_path"; then
23909    BOOT_JDK="$new_path"
23910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23911$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23912  fi
23913
23914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23916
23917  else
23918    # We're on a posix platform. Hooray! :)
23919    path="$BOOT_JDK"
23920    has_space=`$ECHO "$path" | $GREP " "`
23921    if test "x$has_space" != x; then
23922      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23923$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23924      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23925    fi
23926
23927    # Use eval to expand a potential ~
23928    eval path="$path"
23929    if test ! -f "$path" && test ! -d "$path"; then
23930      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23931    fi
23932
23933    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23934  fi
23935
23936              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23937$as_echo_n "checking for Boot JDK... " >&6; }
23938              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23939$as_echo "$BOOT_JDK" >&6; }
23940              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23941$as_echo_n "checking Boot JDK version... " >&6; }
23942              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23943              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23944$as_echo "$BOOT_JDK_VERSION" >&6; }
23945            fi # end check jdk version
23946          fi # end check rt.jar
23947        fi # end check javac
23948      fi # end check java
23949    fi # end check boot jdk found
23950  fi
23951
23952  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
23953
23954  if test "x$BOOT_JDK_FOUND" = xno; then
23955    # Now execute the test
23956
23957  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
23958  BOOT_JDK_SUFFIX="/Contents/Home"
23959  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23960  if test "x$ALL_JDKS_FOUND" != x; then
23961    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23962
23963  if test "x$BOOT_JDK_FOUND" = xno; then
23964    # Now execute the test
23965
23966        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23967        if test -d "$BOOT_JDK"; then
23968          BOOT_JDK_FOUND=maybe
23969          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23970$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23971        fi
23972
23973
23974    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23975    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23976      # Do we have a bin/java?
23977      if test ! -x "$BOOT_JDK/bin/java"; then
23978        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23979$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23980        BOOT_JDK_FOUND=no
23981      else
23982        # Do we have a bin/javac?
23983        if test ! -x "$BOOT_JDK/bin/javac"; then
23984          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23986          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23987$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23988          BOOT_JDK_FOUND=no
23989        else
23990          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23991          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23992            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23993$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23994            BOOT_JDK_FOUND=no
23995          else
23996            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23997            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23998
23999            # Extra M4 quote needed to protect [] in grep expression.
24000            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24001            if test "x$FOUND_CORRECT_VERSION" = x; then
24002              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24003$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24004              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24005$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24006              BOOT_JDK_FOUND=no
24007            else
24008              # We're done! :-)
24009              BOOT_JDK_FOUND=yes
24010
24011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24012
24013  # Input might be given as Windows format, start by converting to
24014  # unix format.
24015  path="$BOOT_JDK"
24016  new_path=`$CYGPATH -u "$path"`
24017
24018  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24019  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24020  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24021  # "foo.exe" is OK but "foo" is an error.
24022  #
24023  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24024  # It is also a way to make sure we got the proper file name for the real test later on.
24025  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24026  if test "x$test_shortpath" = x; then
24027    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24028$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24029    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24030  fi
24031
24032  # Call helper function which possibly converts this using DOS-style short mode.
24033  # If so, the updated path is stored in $new_path.
24034
24035  input_path="$new_path"
24036  # Check if we need to convert this using DOS-style short mode. If the path
24037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24038  # take no chances and rewrite it.
24039  # Note: m4 eats our [], so we need to use [ and ] instead.
24040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24041  if test "x$has_forbidden_chars" != x; then
24042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24046      # Going to short mode and back again did indeed matter. Since short mode is
24047      # case insensitive, let's make it lowercase to improve readability.
24048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24049      # Now convert it back to Unix-stile (cygpath)
24050      input_path=`$CYGPATH -u "$shortmode_path"`
24051      new_path="$input_path"
24052    fi
24053  fi
24054
24055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24056  if test "x$test_cygdrive_prefix" = x; then
24057    # As a simple fix, exclude /usr/bin since it's not a real path.
24058    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24060      # a path prefixed by /cygdrive for fixpath to work.
24061      new_path="$CYGWIN_ROOT_PATH$input_path"
24062    fi
24063  fi
24064
24065
24066  if test "x$path" != "x$new_path"; then
24067    BOOT_JDK="$new_path"
24068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24069$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24070  fi
24071
24072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24073
24074  path="$BOOT_JDK"
24075  has_colon=`$ECHO $path | $GREP ^.:`
24076  new_path="$path"
24077  if test "x$has_colon" = x; then
24078    # Not in mixed or Windows style, start by that.
24079    new_path=`cmd //c echo $path`
24080  fi
24081
24082
24083  input_path="$new_path"
24084  # Check if we need to convert this using DOS-style short mode. If the path
24085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24086  # take no chances and rewrite it.
24087  # Note: m4 eats our [], so we need to use [ and ] instead.
24088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24089  if test "x$has_forbidden_chars" != x; then
24090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24092  fi
24093
24094
24095  windows_path="$new_path"
24096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24097    unix_path=`$CYGPATH -u "$windows_path"`
24098    new_path="$unix_path"
24099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24101    new_path="$unix_path"
24102  fi
24103
24104  if test "x$path" != "x$new_path"; then
24105    BOOT_JDK="$new_path"
24106    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24107$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24108  fi
24109
24110  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24111  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24112
24113  else
24114    # We're on a posix platform. Hooray! :)
24115    path="$BOOT_JDK"
24116    has_space=`$ECHO "$path" | $GREP " "`
24117    if test "x$has_space" != x; then
24118      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24119$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24120      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24121    fi
24122
24123    # Use eval to expand a potential ~
24124    eval path="$path"
24125    if test ! -f "$path" && test ! -d "$path"; then
24126      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24127    fi
24128
24129    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24130  fi
24131
24132              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24133$as_echo_n "checking for Boot JDK... " >&6; }
24134              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24135$as_echo "$BOOT_JDK" >&6; }
24136              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24137$as_echo_n "checking Boot JDK version... " >&6; }
24138              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24139              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24140$as_echo "$BOOT_JDK_VERSION" >&6; }
24141            fi # end check jdk version
24142          fi # end check rt.jar
24143        fi # end check javac
24144      fi # end check java
24145    fi # end check boot jdk found
24146  fi
24147
24148    done
24149  fi
24150
24151
24152    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24153    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24154      # Do we have a bin/java?
24155      if test ! -x "$BOOT_JDK/bin/java"; then
24156        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24157$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24158        BOOT_JDK_FOUND=no
24159      else
24160        # Do we have a bin/javac?
24161        if test ! -x "$BOOT_JDK/bin/javac"; then
24162          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24163$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24164          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24165$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24166          BOOT_JDK_FOUND=no
24167        else
24168          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24169          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24170            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24172            BOOT_JDK_FOUND=no
24173          else
24174            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24175            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24176
24177            # Extra M4 quote needed to protect [] in grep expression.
24178            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24179            if test "x$FOUND_CORRECT_VERSION" = x; then
24180              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24181$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24182              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24183$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24184              BOOT_JDK_FOUND=no
24185            else
24186              # We're done! :-)
24187              BOOT_JDK_FOUND=yes
24188
24189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24190
24191  # Input might be given as Windows format, start by converting to
24192  # unix format.
24193  path="$BOOT_JDK"
24194  new_path=`$CYGPATH -u "$path"`
24195
24196  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24197  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24198  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24199  # "foo.exe" is OK but "foo" is an error.
24200  #
24201  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24202  # It is also a way to make sure we got the proper file name for the real test later on.
24203  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24204  if test "x$test_shortpath" = x; then
24205    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24206$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24207    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24208  fi
24209
24210  # Call helper function which possibly converts this using DOS-style short mode.
24211  # If so, the updated path is stored in $new_path.
24212
24213  input_path="$new_path"
24214  # Check if we need to convert this using DOS-style short mode. If the path
24215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24216  # take no chances and rewrite it.
24217  # Note: m4 eats our [], so we need to use [ and ] instead.
24218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24219  if test "x$has_forbidden_chars" != x; then
24220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24224      # Going to short mode and back again did indeed matter. Since short mode is
24225      # case insensitive, let's make it lowercase to improve readability.
24226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24227      # Now convert it back to Unix-stile (cygpath)
24228      input_path=`$CYGPATH -u "$shortmode_path"`
24229      new_path="$input_path"
24230    fi
24231  fi
24232
24233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24234  if test "x$test_cygdrive_prefix" = x; then
24235    # As a simple fix, exclude /usr/bin since it's not a real path.
24236    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24238      # a path prefixed by /cygdrive for fixpath to work.
24239      new_path="$CYGWIN_ROOT_PATH$input_path"
24240    fi
24241  fi
24242
24243
24244  if test "x$path" != "x$new_path"; then
24245    BOOT_JDK="$new_path"
24246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24247$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24248  fi
24249
24250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24251
24252  path="$BOOT_JDK"
24253  has_colon=`$ECHO $path | $GREP ^.:`
24254  new_path="$path"
24255  if test "x$has_colon" = x; then
24256    # Not in mixed or Windows style, start by that.
24257    new_path=`cmd //c echo $path`
24258  fi
24259
24260
24261  input_path="$new_path"
24262  # Check if we need to convert this using DOS-style short mode. If the path
24263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24264  # take no chances and rewrite it.
24265  # Note: m4 eats our [], so we need to use [ and ] instead.
24266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24267  if test "x$has_forbidden_chars" != x; then
24268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24269    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24270  fi
24271
24272
24273  windows_path="$new_path"
24274  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24275    unix_path=`$CYGPATH -u "$windows_path"`
24276    new_path="$unix_path"
24277  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24278    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24279    new_path="$unix_path"
24280  fi
24281
24282  if test "x$path" != "x$new_path"; then
24283    BOOT_JDK="$new_path"
24284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24285$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24286  fi
24287
24288  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24289  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24290
24291  else
24292    # We're on a posix platform. Hooray! :)
24293    path="$BOOT_JDK"
24294    has_space=`$ECHO "$path" | $GREP " "`
24295    if test "x$has_space" != x; then
24296      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24297$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24298      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24299    fi
24300
24301    # Use eval to expand a potential ~
24302    eval path="$path"
24303    if test ! -f "$path" && test ! -d "$path"; then
24304      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24305    fi
24306
24307    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24308  fi
24309
24310              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24311$as_echo_n "checking for Boot JDK... " >&6; }
24312              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24313$as_echo "$BOOT_JDK" >&6; }
24314              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24315$as_echo_n "checking Boot JDK version... " >&6; }
24316              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24317              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24318$as_echo "$BOOT_JDK_VERSION" >&6; }
24319            fi # end check jdk version
24320          fi # end check rt.jar
24321        fi # end check javac
24322      fi # end check java
24323    fi # end check boot jdk found
24324  fi
24325
24326
24327  if test "x$BOOT_JDK_FOUND" = xno; then
24328    # Now execute the test
24329
24330  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24331  BOOT_JDK_SUFFIX="/Contents/Home"
24332  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24333  if test "x$ALL_JDKS_FOUND" != x; then
24334    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24335
24336  if test "x$BOOT_JDK_FOUND" = xno; then
24337    # Now execute the test
24338
24339        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24340        if test -d "$BOOT_JDK"; then
24341          BOOT_JDK_FOUND=maybe
24342          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24343$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24344        fi
24345
24346
24347    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24348    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24349      # Do we have a bin/java?
24350      if test ! -x "$BOOT_JDK/bin/java"; then
24351        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24352$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24353        BOOT_JDK_FOUND=no
24354      else
24355        # Do we have a bin/javac?
24356        if test ! -x "$BOOT_JDK/bin/javac"; then
24357          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24358$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24359          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24360$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24361          BOOT_JDK_FOUND=no
24362        else
24363          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24364          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24365            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24367            BOOT_JDK_FOUND=no
24368          else
24369            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24370            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24371
24372            # Extra M4 quote needed to protect [] in grep expression.
24373            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24374            if test "x$FOUND_CORRECT_VERSION" = x; then
24375              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24376$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24377              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24378$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24379              BOOT_JDK_FOUND=no
24380            else
24381              # We're done! :-)
24382              BOOT_JDK_FOUND=yes
24383
24384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24385
24386  # Input might be given as Windows format, start by converting to
24387  # unix format.
24388  path="$BOOT_JDK"
24389  new_path=`$CYGPATH -u "$path"`
24390
24391  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24392  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24393  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24394  # "foo.exe" is OK but "foo" is an error.
24395  #
24396  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24397  # It is also a way to make sure we got the proper file name for the real test later on.
24398  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24399  if test "x$test_shortpath" = x; then
24400    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24401$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24402    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24403  fi
24404
24405  # Call helper function which possibly converts this using DOS-style short mode.
24406  # If so, the updated path is stored in $new_path.
24407
24408  input_path="$new_path"
24409  # Check if we need to convert this using DOS-style short mode. If the path
24410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24411  # take no chances and rewrite it.
24412  # Note: m4 eats our [], so we need to use [ and ] instead.
24413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24414  if test "x$has_forbidden_chars" != x; then
24415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24416    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24417    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24418    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24419      # Going to short mode and back again did indeed matter. Since short mode is
24420      # case insensitive, let's make it lowercase to improve readability.
24421      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24422      # Now convert it back to Unix-stile (cygpath)
24423      input_path=`$CYGPATH -u "$shortmode_path"`
24424      new_path="$input_path"
24425    fi
24426  fi
24427
24428  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24429  if test "x$test_cygdrive_prefix" = x; then
24430    # As a simple fix, exclude /usr/bin since it's not a real path.
24431    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24432      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24433      # a path prefixed by /cygdrive for fixpath to work.
24434      new_path="$CYGWIN_ROOT_PATH$input_path"
24435    fi
24436  fi
24437
24438
24439  if test "x$path" != "x$new_path"; then
24440    BOOT_JDK="$new_path"
24441    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24442$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24443  fi
24444
24445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24446
24447  path="$BOOT_JDK"
24448  has_colon=`$ECHO $path | $GREP ^.:`
24449  new_path="$path"
24450  if test "x$has_colon" = x; then
24451    # Not in mixed or Windows style, start by that.
24452    new_path=`cmd //c echo $path`
24453  fi
24454
24455
24456  input_path="$new_path"
24457  # Check if we need to convert this using DOS-style short mode. If the path
24458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24459  # take no chances and rewrite it.
24460  # Note: m4 eats our [], so we need to use [ and ] instead.
24461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24462  if test "x$has_forbidden_chars" != x; then
24463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24464    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24465  fi
24466
24467
24468  windows_path="$new_path"
24469  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24470    unix_path=`$CYGPATH -u "$windows_path"`
24471    new_path="$unix_path"
24472  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24473    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24474    new_path="$unix_path"
24475  fi
24476
24477  if test "x$path" != "x$new_path"; then
24478    BOOT_JDK="$new_path"
24479    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24480$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24481  fi
24482
24483  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24484  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24485
24486  else
24487    # We're on a posix platform. Hooray! :)
24488    path="$BOOT_JDK"
24489    has_space=`$ECHO "$path" | $GREP " "`
24490    if test "x$has_space" != x; then
24491      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24492$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24493      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24494    fi
24495
24496    # Use eval to expand a potential ~
24497    eval path="$path"
24498    if test ! -f "$path" && test ! -d "$path"; then
24499      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24500    fi
24501
24502    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24503  fi
24504
24505              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24506$as_echo_n "checking for Boot JDK... " >&6; }
24507              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24508$as_echo "$BOOT_JDK" >&6; }
24509              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24510$as_echo_n "checking Boot JDK version... " >&6; }
24511              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24512              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24513$as_echo "$BOOT_JDK_VERSION" >&6; }
24514            fi # end check jdk version
24515          fi # end check rt.jar
24516        fi # end check javac
24517      fi # end check java
24518    fi # end check boot jdk found
24519  fi
24520
24521    done
24522  fi
24523
24524
24525    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24526    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24527      # Do we have a bin/java?
24528      if test ! -x "$BOOT_JDK/bin/java"; then
24529        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24530$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24531        BOOT_JDK_FOUND=no
24532      else
24533        # Do we have a bin/javac?
24534        if test ! -x "$BOOT_JDK/bin/javac"; then
24535          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24536$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24537          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24538$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24539          BOOT_JDK_FOUND=no
24540        else
24541          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24542          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24543            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24544$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24545            BOOT_JDK_FOUND=no
24546          else
24547            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24548            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24549
24550            # Extra M4 quote needed to protect [] in grep expression.
24551            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24552            if test "x$FOUND_CORRECT_VERSION" = x; then
24553              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24554$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24555              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24556$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24557              BOOT_JDK_FOUND=no
24558            else
24559              # We're done! :-)
24560              BOOT_JDK_FOUND=yes
24561
24562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24563
24564  # Input might be given as Windows format, start by converting to
24565  # unix format.
24566  path="$BOOT_JDK"
24567  new_path=`$CYGPATH -u "$path"`
24568
24569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24572  # "foo.exe" is OK but "foo" is an error.
24573  #
24574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24575  # It is also a way to make sure we got the proper file name for the real test later on.
24576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24577  if test "x$test_shortpath" = x; then
24578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24579$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24580    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24581  fi
24582
24583  # Call helper function which possibly converts this using DOS-style short mode.
24584  # If so, the updated path is stored in $new_path.
24585
24586  input_path="$new_path"
24587  # Check if we need to convert this using DOS-style short mode. If the path
24588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24589  # take no chances and rewrite it.
24590  # Note: m4 eats our [], so we need to use [ and ] instead.
24591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24592  if test "x$has_forbidden_chars" != x; then
24593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24597      # Going to short mode and back again did indeed matter. Since short mode is
24598      # case insensitive, let's make it lowercase to improve readability.
24599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24600      # Now convert it back to Unix-stile (cygpath)
24601      input_path=`$CYGPATH -u "$shortmode_path"`
24602      new_path="$input_path"
24603    fi
24604  fi
24605
24606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24607  if test "x$test_cygdrive_prefix" = x; then
24608    # As a simple fix, exclude /usr/bin since it's not a real path.
24609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24611      # a path prefixed by /cygdrive for fixpath to work.
24612      new_path="$CYGWIN_ROOT_PATH$input_path"
24613    fi
24614  fi
24615
24616
24617  if test "x$path" != "x$new_path"; then
24618    BOOT_JDK="$new_path"
24619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24620$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24621  fi
24622
24623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24624
24625  path="$BOOT_JDK"
24626  has_colon=`$ECHO $path | $GREP ^.:`
24627  new_path="$path"
24628  if test "x$has_colon" = x; then
24629    # Not in mixed or Windows style, start by that.
24630    new_path=`cmd //c echo $path`
24631  fi
24632
24633
24634  input_path="$new_path"
24635  # Check if we need to convert this using DOS-style short mode. If the path
24636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24637  # take no chances and rewrite it.
24638  # Note: m4 eats our [], so we need to use [ and ] instead.
24639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24640  if test "x$has_forbidden_chars" != x; then
24641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24643  fi
24644
24645
24646  windows_path="$new_path"
24647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24648    unix_path=`$CYGPATH -u "$windows_path"`
24649    new_path="$unix_path"
24650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24652    new_path="$unix_path"
24653  fi
24654
24655  if test "x$path" != "x$new_path"; then
24656    BOOT_JDK="$new_path"
24657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24658$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24659  fi
24660
24661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24663
24664  else
24665    # We're on a posix platform. Hooray! :)
24666    path="$BOOT_JDK"
24667    has_space=`$ECHO "$path" | $GREP " "`
24668    if test "x$has_space" != x; then
24669      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24670$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24671      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24672    fi
24673
24674    # Use eval to expand a potential ~
24675    eval path="$path"
24676    if test ! -f "$path" && test ! -d "$path"; then
24677      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24678    fi
24679
24680    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24681  fi
24682
24683              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24684$as_echo_n "checking for Boot JDK... " >&6; }
24685              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24686$as_echo "$BOOT_JDK" >&6; }
24687              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24688$as_echo_n "checking Boot JDK version... " >&6; }
24689              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24690              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24691$as_echo "$BOOT_JDK_VERSION" >&6; }
24692            fi # end check jdk version
24693          fi # end check rt.jar
24694        fi # end check javac
24695      fi # end check java
24696    fi # end check boot jdk found
24697  fi
24698
24699  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24700
24701  if test "x$BOOT_JDK_FOUND" = xno; then
24702    # Now execute the test
24703
24704  BOOT_JDK_PREFIX="/usr/lib/jvm"
24705  BOOT_JDK_SUFFIX=""
24706  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24707  if test "x$ALL_JDKS_FOUND" != x; then
24708    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24709
24710  if test "x$BOOT_JDK_FOUND" = xno; then
24711    # Now execute the test
24712
24713        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24714        if test -d "$BOOT_JDK"; then
24715          BOOT_JDK_FOUND=maybe
24716          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24717$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24718        fi
24719
24720
24721    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24722    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24723      # Do we have a bin/java?
24724      if test ! -x "$BOOT_JDK/bin/java"; then
24725        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24726$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24727        BOOT_JDK_FOUND=no
24728      else
24729        # Do we have a bin/javac?
24730        if test ! -x "$BOOT_JDK/bin/javac"; then
24731          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24733          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24734$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24735          BOOT_JDK_FOUND=no
24736        else
24737          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24738          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24739            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24740$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24741            BOOT_JDK_FOUND=no
24742          else
24743            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24744            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24745
24746            # Extra M4 quote needed to protect [] in grep expression.
24747            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24748            if test "x$FOUND_CORRECT_VERSION" = x; then
24749              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24751              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24753              BOOT_JDK_FOUND=no
24754            else
24755              # We're done! :-)
24756              BOOT_JDK_FOUND=yes
24757
24758  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24759
24760  # Input might be given as Windows format, start by converting to
24761  # unix format.
24762  path="$BOOT_JDK"
24763  new_path=`$CYGPATH -u "$path"`
24764
24765  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24766  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24767  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24768  # "foo.exe" is OK but "foo" is an error.
24769  #
24770  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24771  # It is also a way to make sure we got the proper file name for the real test later on.
24772  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24773  if test "x$test_shortpath" = x; then
24774    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24775$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24776    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24777  fi
24778
24779  # Call helper function which possibly converts this using DOS-style short mode.
24780  # If so, the updated path is stored in $new_path.
24781
24782  input_path="$new_path"
24783  # Check if we need to convert this using DOS-style short mode. If the path
24784  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24785  # take no chances and rewrite it.
24786  # Note: m4 eats our [], so we need to use [ and ] instead.
24787  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24788  if test "x$has_forbidden_chars" != x; then
24789    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24790    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24791    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24792    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24793      # Going to short mode and back again did indeed matter. Since short mode is
24794      # case insensitive, let's make it lowercase to improve readability.
24795      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24796      # Now convert it back to Unix-stile (cygpath)
24797      input_path=`$CYGPATH -u "$shortmode_path"`
24798      new_path="$input_path"
24799    fi
24800  fi
24801
24802  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24803  if test "x$test_cygdrive_prefix" = x; then
24804    # As a simple fix, exclude /usr/bin since it's not a real path.
24805    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24806      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24807      # a path prefixed by /cygdrive for fixpath to work.
24808      new_path="$CYGWIN_ROOT_PATH$input_path"
24809    fi
24810  fi
24811
24812
24813  if test "x$path" != "x$new_path"; then
24814    BOOT_JDK="$new_path"
24815    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24816$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24817  fi
24818
24819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24820
24821  path="$BOOT_JDK"
24822  has_colon=`$ECHO $path | $GREP ^.:`
24823  new_path="$path"
24824  if test "x$has_colon" = x; then
24825    # Not in mixed or Windows style, start by that.
24826    new_path=`cmd //c echo $path`
24827  fi
24828
24829
24830  input_path="$new_path"
24831  # Check if we need to convert this using DOS-style short mode. If the path
24832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24833  # take no chances and rewrite it.
24834  # Note: m4 eats our [], so we need to use [ and ] instead.
24835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24836  if test "x$has_forbidden_chars" != x; then
24837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24838    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24839  fi
24840
24841
24842  windows_path="$new_path"
24843  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24844    unix_path=`$CYGPATH -u "$windows_path"`
24845    new_path="$unix_path"
24846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24847    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24848    new_path="$unix_path"
24849  fi
24850
24851  if test "x$path" != "x$new_path"; then
24852    BOOT_JDK="$new_path"
24853    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24854$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24855  fi
24856
24857  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24858  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24859
24860  else
24861    # We're on a posix platform. Hooray! :)
24862    path="$BOOT_JDK"
24863    has_space=`$ECHO "$path" | $GREP " "`
24864    if test "x$has_space" != x; then
24865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24866$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24867      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24868    fi
24869
24870    # Use eval to expand a potential ~
24871    eval path="$path"
24872    if test ! -f "$path" && test ! -d "$path"; then
24873      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24874    fi
24875
24876    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24877  fi
24878
24879              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24880$as_echo_n "checking for Boot JDK... " >&6; }
24881              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24882$as_echo "$BOOT_JDK" >&6; }
24883              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24884$as_echo_n "checking Boot JDK version... " >&6; }
24885              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24886              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24887$as_echo "$BOOT_JDK_VERSION" >&6; }
24888            fi # end check jdk version
24889          fi # end check rt.jar
24890        fi # end check javac
24891      fi # end check java
24892    fi # end check boot jdk found
24893  fi
24894
24895    done
24896  fi
24897
24898
24899    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24900    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24901      # Do we have a bin/java?
24902      if test ! -x "$BOOT_JDK/bin/java"; then
24903        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24904$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24905        BOOT_JDK_FOUND=no
24906      else
24907        # Do we have a bin/javac?
24908        if test ! -x "$BOOT_JDK/bin/javac"; then
24909          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24910$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24911          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24912$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24913          BOOT_JDK_FOUND=no
24914        else
24915          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24916          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24917            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24918$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24919            BOOT_JDK_FOUND=no
24920          else
24921            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24922            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24923
24924            # Extra M4 quote needed to protect [] in grep expression.
24925            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24926            if test "x$FOUND_CORRECT_VERSION" = x; then
24927              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24928$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24929              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24930$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24931              BOOT_JDK_FOUND=no
24932            else
24933              # We're done! :-)
24934              BOOT_JDK_FOUND=yes
24935
24936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24937
24938  # Input might be given as Windows format, start by converting to
24939  # unix format.
24940  path="$BOOT_JDK"
24941  new_path=`$CYGPATH -u "$path"`
24942
24943  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24944  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24945  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24946  # "foo.exe" is OK but "foo" is an error.
24947  #
24948  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24949  # It is also a way to make sure we got the proper file name for the real test later on.
24950  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24951  if test "x$test_shortpath" = x; then
24952    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24954    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24955  fi
24956
24957  # Call helper function which possibly converts this using DOS-style short mode.
24958  # If so, the updated path is stored in $new_path.
24959
24960  input_path="$new_path"
24961  # Check if we need to convert this using DOS-style short mode. If the path
24962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24963  # take no chances and rewrite it.
24964  # Note: m4 eats our [], so we need to use [ and ] instead.
24965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24966  if test "x$has_forbidden_chars" != x; then
24967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24968    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24969    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24970    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24971      # Going to short mode and back again did indeed matter. Since short mode is
24972      # case insensitive, let's make it lowercase to improve readability.
24973      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24974      # Now convert it back to Unix-stile (cygpath)
24975      input_path=`$CYGPATH -u "$shortmode_path"`
24976      new_path="$input_path"
24977    fi
24978  fi
24979
24980  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24981  if test "x$test_cygdrive_prefix" = x; then
24982    # As a simple fix, exclude /usr/bin since it's not a real path.
24983    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24984      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24985      # a path prefixed by /cygdrive for fixpath to work.
24986      new_path="$CYGWIN_ROOT_PATH$input_path"
24987    fi
24988  fi
24989
24990
24991  if test "x$path" != "x$new_path"; then
24992    BOOT_JDK="$new_path"
24993    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24994$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24995  fi
24996
24997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24998
24999  path="$BOOT_JDK"
25000  has_colon=`$ECHO $path | $GREP ^.:`
25001  new_path="$path"
25002  if test "x$has_colon" = x; then
25003    # Not in mixed or Windows style, start by that.
25004    new_path=`cmd //c echo $path`
25005  fi
25006
25007
25008  input_path="$new_path"
25009  # Check if we need to convert this using DOS-style short mode. If the path
25010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25011  # take no chances and rewrite it.
25012  # Note: m4 eats our [], so we need to use [ and ] instead.
25013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25014  if test "x$has_forbidden_chars" != x; then
25015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25017  fi
25018
25019
25020  windows_path="$new_path"
25021  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25022    unix_path=`$CYGPATH -u "$windows_path"`
25023    new_path="$unix_path"
25024  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25025    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25026    new_path="$unix_path"
25027  fi
25028
25029  if test "x$path" != "x$new_path"; then
25030    BOOT_JDK="$new_path"
25031    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25032$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25033  fi
25034
25035  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25036  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25037
25038  else
25039    # We're on a posix platform. Hooray! :)
25040    path="$BOOT_JDK"
25041    has_space=`$ECHO "$path" | $GREP " "`
25042    if test "x$has_space" != x; then
25043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25045      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25046    fi
25047
25048    # Use eval to expand a potential ~
25049    eval path="$path"
25050    if test ! -f "$path" && test ! -d "$path"; then
25051      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25052    fi
25053
25054    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25055  fi
25056
25057              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25058$as_echo_n "checking for Boot JDK... " >&6; }
25059              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25060$as_echo "$BOOT_JDK" >&6; }
25061              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25062$as_echo_n "checking Boot JDK version... " >&6; }
25063              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25064              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25065$as_echo "$BOOT_JDK_VERSION" >&6; }
25066            fi # end check jdk version
25067          fi # end check rt.jar
25068        fi # end check javac
25069      fi # end check java
25070    fi # end check boot jdk found
25071  fi
25072
25073  fi
25074
25075
25076    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25077    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25078      # Do we have a bin/java?
25079      if test ! -x "$BOOT_JDK/bin/java"; then
25080        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25081$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25082        BOOT_JDK_FOUND=no
25083      else
25084        # Do we have a bin/javac?
25085        if test ! -x "$BOOT_JDK/bin/javac"; then
25086          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25087$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25088          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25089$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25090          BOOT_JDK_FOUND=no
25091        else
25092          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25093          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25094            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25096            BOOT_JDK_FOUND=no
25097          else
25098            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25099            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25100
25101            # Extra M4 quote needed to protect [] in grep expression.
25102            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25103            if test "x$FOUND_CORRECT_VERSION" = x; then
25104              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25105$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25106              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25107$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25108              BOOT_JDK_FOUND=no
25109            else
25110              # We're done! :-)
25111              BOOT_JDK_FOUND=yes
25112
25113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25114
25115  # Input might be given as Windows format, start by converting to
25116  # unix format.
25117  path="$BOOT_JDK"
25118  new_path=`$CYGPATH -u "$path"`
25119
25120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25123  # "foo.exe" is OK but "foo" is an error.
25124  #
25125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25126  # It is also a way to make sure we got the proper file name for the real test later on.
25127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25128  if test "x$test_shortpath" = x; then
25129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25130$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25131    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25132  fi
25133
25134  # Call helper function which possibly converts this using DOS-style short mode.
25135  # If so, the updated path is stored in $new_path.
25136
25137  input_path="$new_path"
25138  # Check if we need to convert this using DOS-style short mode. If the path
25139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25140  # take no chances and rewrite it.
25141  # Note: m4 eats our [], so we need to use [ and ] instead.
25142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25143  if test "x$has_forbidden_chars" != x; then
25144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25148      # Going to short mode and back again did indeed matter. Since short mode is
25149      # case insensitive, let's make it lowercase to improve readability.
25150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25151      # Now convert it back to Unix-stile (cygpath)
25152      input_path=`$CYGPATH -u "$shortmode_path"`
25153      new_path="$input_path"
25154    fi
25155  fi
25156
25157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25158  if test "x$test_cygdrive_prefix" = x; then
25159    # As a simple fix, exclude /usr/bin since it's not a real path.
25160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25162      # a path prefixed by /cygdrive for fixpath to work.
25163      new_path="$CYGWIN_ROOT_PATH$input_path"
25164    fi
25165  fi
25166
25167
25168  if test "x$path" != "x$new_path"; then
25169    BOOT_JDK="$new_path"
25170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25171$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25172  fi
25173
25174  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25175
25176  path="$BOOT_JDK"
25177  has_colon=`$ECHO $path | $GREP ^.:`
25178  new_path="$path"
25179  if test "x$has_colon" = x; then
25180    # Not in mixed or Windows style, start by that.
25181    new_path=`cmd //c echo $path`
25182  fi
25183
25184
25185  input_path="$new_path"
25186  # Check if we need to convert this using DOS-style short mode. If the path
25187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25188  # take no chances and rewrite it.
25189  # Note: m4 eats our [], so we need to use [ and ] instead.
25190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25191  if test "x$has_forbidden_chars" != x; then
25192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25194  fi
25195
25196
25197  windows_path="$new_path"
25198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25199    unix_path=`$CYGPATH -u "$windows_path"`
25200    new_path="$unix_path"
25201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25203    new_path="$unix_path"
25204  fi
25205
25206  if test "x$path" != "x$new_path"; then
25207    BOOT_JDK="$new_path"
25208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25209$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25210  fi
25211
25212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25214
25215  else
25216    # We're on a posix platform. Hooray! :)
25217    path="$BOOT_JDK"
25218    has_space=`$ECHO "$path" | $GREP " "`
25219    if test "x$has_space" != x; then
25220      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25221$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25222      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25223    fi
25224
25225    # Use eval to expand a potential ~
25226    eval path="$path"
25227    if test ! -f "$path" && test ! -d "$path"; then
25228      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25229    fi
25230
25231    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25232  fi
25233
25234              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25235$as_echo_n "checking for Boot JDK... " >&6; }
25236              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25237$as_echo "$BOOT_JDK" >&6; }
25238              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25239$as_echo_n "checking Boot JDK version... " >&6; }
25240              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25241              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25242$as_echo "$BOOT_JDK_VERSION" >&6; }
25243            fi # end check jdk version
25244          fi # end check rt.jar
25245        fi # end check javac
25246      fi # end check java
25247    fi # end check boot jdk found
25248  fi
25249
25250
25251  # If we haven't found anything yet, we've truly lost. Give up.
25252  if test "x$BOOT_JDK_FOUND" = xno; then
25253
25254  # Print a helpful message on how to acquire the necessary build dependency.
25255  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25256  MISSING_DEPENDENCY=openjdk
25257
25258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25259    cygwin_help $MISSING_DEPENDENCY
25260  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25261    msys_help $MISSING_DEPENDENCY
25262  else
25263    PKGHANDLER_COMMAND=
25264
25265    case $PKGHANDLER in
25266      apt-get)
25267        apt_help     $MISSING_DEPENDENCY ;;
25268      yum)
25269        yum_help     $MISSING_DEPENDENCY ;;
25270      port)
25271        port_help    $MISSING_DEPENDENCY ;;
25272      pkgutil)
25273        pkgutil_help $MISSING_DEPENDENCY ;;
25274      pkgadd)
25275        pkgadd_help  $MISSING_DEPENDENCY ;;
25276    esac
25277
25278    if test "x$PKGHANDLER_COMMAND" != x; then
25279      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25280    fi
25281  fi
25282
25283    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25284$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25285    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25286$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25287    as_fn_error $? "Cannot continue" "$LINENO" 5
25288  fi
25289
25290  # Setup proper paths for what we found
25291  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25292  if test ! -f "$BOOT_RTJAR"; then
25293    # On MacOSX it is called classes.jar
25294    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25295    if test -f "$BOOT_RTJAR"; then
25296      # Remove the ..
25297      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25298    fi
25299  fi
25300  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25301  BOOT_JDK="$BOOT_JDK"
25302
25303
25304
25305
25306  # Setup tools from the Boot JDK.
25307
25308  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25309
25310  # Publish this variable in the help.
25311
25312
25313  if test "x$JAVA" = x; then
25314    # The variable is not set by user, try to locate tool using the code snippet
25315
25316      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25317$as_echo_n "checking for java in Boot JDK... " >&6; }
25318      JAVA=$BOOT_JDK/bin/java
25319      if test ! -x $JAVA; then
25320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25321$as_echo "not found" >&6; }
25322        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25323$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25324        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25325      fi
25326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25327$as_echo "ok" >&6; }
25328
25329
25330  else
25331    # The variable is set, but is it from the command line or the environment?
25332
25333    # Try to remove the string !JAVA! from our list.
25334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25336      # If it failed, the variable was not from the command line. Ignore it,
25337      # but warn the user (except for BASH, which is always set by the calling BASH).
25338      if test "xJAVA" != xBASH; then
25339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25340$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25341      fi
25342      # Try to locate tool using the code snippet
25343
25344      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25345$as_echo_n "checking for java in Boot JDK... " >&6; }
25346      JAVA=$BOOT_JDK/bin/java
25347      if test ! -x $JAVA; then
25348        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25349$as_echo "not found" >&6; }
25350        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25351$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25352        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25353      fi
25354      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25355$as_echo "ok" >&6; }
25356
25357
25358    else
25359      # If it succeeded, then it was overridden by the user. We will use it
25360      # for the tool.
25361
25362      # First remove it from the list of overridden variables, so we can test
25363      # for unknown variables in the end.
25364      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25365
25366      # Check if the provided tool contains a complete path.
25367      tool_specified="$JAVA"
25368      tool_basename="${tool_specified##*/}"
25369      if test "x$tool_basename" = "x$tool_specified"; then
25370        # A command without a complete path is provided, search $PATH.
25371        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25372$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25373        # Extract the first word of "$tool_basename", so it can be a program name with args.
25374set dummy $tool_basename; ac_word=$2
25375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25376$as_echo_n "checking for $ac_word... " >&6; }
25377if ${ac_cv_path_JAVA+:} false; then :
25378  $as_echo_n "(cached) " >&6
25379else
25380  case $JAVA in
25381  [\\/]* | ?:[\\/]*)
25382  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25383  ;;
25384  *)
25385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25386for as_dir in $PATH
25387do
25388  IFS=$as_save_IFS
25389  test -z "$as_dir" && as_dir=.
25390    for ac_exec_ext in '' $ac_executable_extensions; do
25391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25392    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25394    break 2
25395  fi
25396done
25397  done
25398IFS=$as_save_IFS
25399
25400  ;;
25401esac
25402fi
25403JAVA=$ac_cv_path_JAVA
25404if test -n "$JAVA"; then
25405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25406$as_echo "$JAVA" >&6; }
25407else
25408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25409$as_echo "no" >&6; }
25410fi
25411
25412
25413        if test "x$JAVA" = x; then
25414          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25415        fi
25416      else
25417        # Otherwise we believe it is a complete path. Use it as it is.
25418        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25419$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25421$as_echo_n "checking for JAVA... " >&6; }
25422        if test ! -x "$tool_specified"; then
25423          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25424$as_echo "not found" >&6; }
25425          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25426        fi
25427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25428$as_echo "$tool_specified" >&6; }
25429      fi
25430    fi
25431  fi
25432
25433
25434
25435  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25436
25437  # Publish this variable in the help.
25438
25439
25440  if test "x$JAVAC" = x; then
25441    # The variable is not set by user, try to locate tool using the code snippet
25442
25443      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25444$as_echo_n "checking for javac in Boot JDK... " >&6; }
25445      JAVAC=$BOOT_JDK/bin/javac
25446      if test ! -x $JAVAC; then
25447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25448$as_echo "not found" >&6; }
25449        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25450$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25451        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25452      fi
25453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25454$as_echo "ok" >&6; }
25455
25456
25457  else
25458    # The variable is set, but is it from the command line or the environment?
25459
25460    # Try to remove the string !JAVAC! from our list.
25461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25463      # If it failed, the variable was not from the command line. Ignore it,
25464      # but warn the user (except for BASH, which is always set by the calling BASH).
25465      if test "xJAVAC" != xBASH; then
25466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25467$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25468      fi
25469      # Try to locate tool using the code snippet
25470
25471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25472$as_echo_n "checking for javac in Boot JDK... " >&6; }
25473      JAVAC=$BOOT_JDK/bin/javac
25474      if test ! -x $JAVAC; then
25475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25476$as_echo "not found" >&6; }
25477        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25478$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25479        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25480      fi
25481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25482$as_echo "ok" >&6; }
25483
25484
25485    else
25486      # If it succeeded, then it was overridden by the user. We will use it
25487      # for the tool.
25488
25489      # First remove it from the list of overridden variables, so we can test
25490      # for unknown variables in the end.
25491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25492
25493      # Check if the provided tool contains a complete path.
25494      tool_specified="$JAVAC"
25495      tool_basename="${tool_specified##*/}"
25496      if test "x$tool_basename" = "x$tool_specified"; then
25497        # A command without a complete path is provided, search $PATH.
25498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25499$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25500        # Extract the first word of "$tool_basename", so it can be a program name with args.
25501set dummy $tool_basename; ac_word=$2
25502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25503$as_echo_n "checking for $ac_word... " >&6; }
25504if ${ac_cv_path_JAVAC+:} false; then :
25505  $as_echo_n "(cached) " >&6
25506else
25507  case $JAVAC in
25508  [\\/]* | ?:[\\/]*)
25509  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25510  ;;
25511  *)
25512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25513for as_dir in $PATH
25514do
25515  IFS=$as_save_IFS
25516  test -z "$as_dir" && as_dir=.
25517    for ac_exec_ext in '' $ac_executable_extensions; do
25518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25519    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25521    break 2
25522  fi
25523done
25524  done
25525IFS=$as_save_IFS
25526
25527  ;;
25528esac
25529fi
25530JAVAC=$ac_cv_path_JAVAC
25531if test -n "$JAVAC"; then
25532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25533$as_echo "$JAVAC" >&6; }
25534else
25535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25536$as_echo "no" >&6; }
25537fi
25538
25539
25540        if test "x$JAVAC" = x; then
25541          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25542        fi
25543      else
25544        # Otherwise we believe it is a complete path. Use it as it is.
25545        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25546$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25547        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25548$as_echo_n "checking for JAVAC... " >&6; }
25549        if test ! -x "$tool_specified"; then
25550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25551$as_echo "not found" >&6; }
25552          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25553        fi
25554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25555$as_echo "$tool_specified" >&6; }
25556      fi
25557    fi
25558  fi
25559
25560
25561
25562  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25563
25564  # Publish this variable in the help.
25565
25566
25567  if test "x$JAVAH" = x; then
25568    # The variable is not set by user, try to locate tool using the code snippet
25569
25570      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25571$as_echo_n "checking for javah in Boot JDK... " >&6; }
25572      JAVAH=$BOOT_JDK/bin/javah
25573      if test ! -x $JAVAH; then
25574        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25575$as_echo "not found" >&6; }
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25577$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25578        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25579      fi
25580      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25581$as_echo "ok" >&6; }
25582
25583
25584  else
25585    # The variable is set, but is it from the command line or the environment?
25586
25587    # Try to remove the string !JAVAH! from our list.
25588    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25589    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25590      # If it failed, the variable was not from the command line. Ignore it,
25591      # but warn the user (except for BASH, which is always set by the calling BASH).
25592      if test "xJAVAH" != xBASH; then
25593        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25594$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25595      fi
25596      # Try to locate tool using the code snippet
25597
25598      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25599$as_echo_n "checking for javah in Boot JDK... " >&6; }
25600      JAVAH=$BOOT_JDK/bin/javah
25601      if test ! -x $JAVAH; then
25602        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25603$as_echo "not found" >&6; }
25604        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25605$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25606        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25607      fi
25608      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25609$as_echo "ok" >&6; }
25610
25611
25612    else
25613      # If it succeeded, then it was overridden by the user. We will use it
25614      # for the tool.
25615
25616      # First remove it from the list of overridden variables, so we can test
25617      # for unknown variables in the end.
25618      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25619
25620      # Check if the provided tool contains a complete path.
25621      tool_specified="$JAVAH"
25622      tool_basename="${tool_specified##*/}"
25623      if test "x$tool_basename" = "x$tool_specified"; then
25624        # A command without a complete path is provided, search $PATH.
25625        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25626$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25627        # Extract the first word of "$tool_basename", so it can be a program name with args.
25628set dummy $tool_basename; ac_word=$2
25629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25630$as_echo_n "checking for $ac_word... " >&6; }
25631if ${ac_cv_path_JAVAH+:} false; then :
25632  $as_echo_n "(cached) " >&6
25633else
25634  case $JAVAH in
25635  [\\/]* | ?:[\\/]*)
25636  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25637  ;;
25638  *)
25639  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25640for as_dir in $PATH
25641do
25642  IFS=$as_save_IFS
25643  test -z "$as_dir" && as_dir=.
25644    for ac_exec_ext in '' $ac_executable_extensions; do
25645  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25646    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25647    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25648    break 2
25649  fi
25650done
25651  done
25652IFS=$as_save_IFS
25653
25654  ;;
25655esac
25656fi
25657JAVAH=$ac_cv_path_JAVAH
25658if test -n "$JAVAH"; then
25659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25660$as_echo "$JAVAH" >&6; }
25661else
25662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25663$as_echo "no" >&6; }
25664fi
25665
25666
25667        if test "x$JAVAH" = x; then
25668          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25669        fi
25670      else
25671        # Otherwise we believe it is a complete path. Use it as it is.
25672        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25673$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25674        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25675$as_echo_n "checking for JAVAH... " >&6; }
25676        if test ! -x "$tool_specified"; then
25677          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25678$as_echo "not found" >&6; }
25679          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25680        fi
25681        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25682$as_echo "$tool_specified" >&6; }
25683      fi
25684    fi
25685  fi
25686
25687
25688
25689  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25690
25691  # Publish this variable in the help.
25692
25693
25694  if test "x$JAR" = x; then
25695    # The variable is not set by user, try to locate tool using the code snippet
25696
25697      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25698$as_echo_n "checking for jar in Boot JDK... " >&6; }
25699      JAR=$BOOT_JDK/bin/jar
25700      if test ! -x $JAR; then
25701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25702$as_echo "not found" >&6; }
25703        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25704$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25705        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25706      fi
25707      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25708$as_echo "ok" >&6; }
25709
25710
25711  else
25712    # The variable is set, but is it from the command line or the environment?
25713
25714    # Try to remove the string !JAR! from our list.
25715    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25716    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25717      # If it failed, the variable was not from the command line. Ignore it,
25718      # but warn the user (except for BASH, which is always set by the calling BASH).
25719      if test "xJAR" != xBASH; then
25720        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25721$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25722      fi
25723      # Try to locate tool using the code snippet
25724
25725      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25726$as_echo_n "checking for jar in Boot JDK... " >&6; }
25727      JAR=$BOOT_JDK/bin/jar
25728      if test ! -x $JAR; then
25729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25730$as_echo "not found" >&6; }
25731        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25732$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25733        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25734      fi
25735      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25736$as_echo "ok" >&6; }
25737
25738
25739    else
25740      # If it succeeded, then it was overridden by the user. We will use it
25741      # for the tool.
25742
25743      # First remove it from the list of overridden variables, so we can test
25744      # for unknown variables in the end.
25745      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25746
25747      # Check if the provided tool contains a complete path.
25748      tool_specified="$JAR"
25749      tool_basename="${tool_specified##*/}"
25750      if test "x$tool_basename" = "x$tool_specified"; then
25751        # A command without a complete path is provided, search $PATH.
25752        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25753$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25754        # Extract the first word of "$tool_basename", so it can be a program name with args.
25755set dummy $tool_basename; ac_word=$2
25756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25757$as_echo_n "checking for $ac_word... " >&6; }
25758if ${ac_cv_path_JAR+:} false; then :
25759  $as_echo_n "(cached) " >&6
25760else
25761  case $JAR in
25762  [\\/]* | ?:[\\/]*)
25763  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25764  ;;
25765  *)
25766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25767for as_dir in $PATH
25768do
25769  IFS=$as_save_IFS
25770  test -z "$as_dir" && as_dir=.
25771    for ac_exec_ext in '' $ac_executable_extensions; do
25772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25773    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25775    break 2
25776  fi
25777done
25778  done
25779IFS=$as_save_IFS
25780
25781  ;;
25782esac
25783fi
25784JAR=$ac_cv_path_JAR
25785if test -n "$JAR"; then
25786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25787$as_echo "$JAR" >&6; }
25788else
25789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25790$as_echo "no" >&6; }
25791fi
25792
25793
25794        if test "x$JAR" = x; then
25795          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25796        fi
25797      else
25798        # Otherwise we believe it is a complete path. Use it as it is.
25799        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25800$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25801        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25802$as_echo_n "checking for JAR... " >&6; }
25803        if test ! -x "$tool_specified"; then
25804          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25805$as_echo "not found" >&6; }
25806          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25807        fi
25808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25809$as_echo "$tool_specified" >&6; }
25810      fi
25811    fi
25812  fi
25813
25814
25815
25816  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25817
25818  # Publish this variable in the help.
25819
25820
25821  if test "x$NATIVE2ASCII" = x; then
25822    # The variable is not set by user, try to locate tool using the code snippet
25823
25824      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25825$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25826      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25827      if test ! -x $NATIVE2ASCII; then
25828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25829$as_echo "not found" >&6; }
25830        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25831$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25832        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25833      fi
25834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25835$as_echo "ok" >&6; }
25836
25837
25838  else
25839    # The variable is set, but is it from the command line or the environment?
25840
25841    # Try to remove the string !NATIVE2ASCII! from our list.
25842    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25843    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25844      # If it failed, the variable was not from the command line. Ignore it,
25845      # but warn the user (except for BASH, which is always set by the calling BASH).
25846      if test "xNATIVE2ASCII" != xBASH; then
25847        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25848$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25849      fi
25850      # Try to locate tool using the code snippet
25851
25852      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25853$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25854      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25855      if test ! -x $NATIVE2ASCII; then
25856        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25857$as_echo "not found" >&6; }
25858        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25859$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25860        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25861      fi
25862      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25863$as_echo "ok" >&6; }
25864
25865
25866    else
25867      # If it succeeded, then it was overridden by the user. We will use it
25868      # for the tool.
25869
25870      # First remove it from the list of overridden variables, so we can test
25871      # for unknown variables in the end.
25872      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25873
25874      # Check if the provided tool contains a complete path.
25875      tool_specified="$NATIVE2ASCII"
25876      tool_basename="${tool_specified##*/}"
25877      if test "x$tool_basename" = "x$tool_specified"; then
25878        # A command without a complete path is provided, search $PATH.
25879        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25880$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
25881        # Extract the first word of "$tool_basename", so it can be a program name with args.
25882set dummy $tool_basename; ac_word=$2
25883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25884$as_echo_n "checking for $ac_word... " >&6; }
25885if ${ac_cv_path_NATIVE2ASCII+:} false; then :
25886  $as_echo_n "(cached) " >&6
25887else
25888  case $NATIVE2ASCII in
25889  [\\/]* | ?:[\\/]*)
25890  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
25891  ;;
25892  *)
25893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25894for as_dir in $PATH
25895do
25896  IFS=$as_save_IFS
25897  test -z "$as_dir" && as_dir=.
25898    for ac_exec_ext in '' $ac_executable_extensions; do
25899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25900    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
25901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25902    break 2
25903  fi
25904done
25905  done
25906IFS=$as_save_IFS
25907
25908  ;;
25909esac
25910fi
25911NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
25912if test -n "$NATIVE2ASCII"; then
25913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
25914$as_echo "$NATIVE2ASCII" >&6; }
25915else
25916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25917$as_echo "no" >&6; }
25918fi
25919
25920
25921        if test "x$NATIVE2ASCII" = x; then
25922          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25923        fi
25924      else
25925        # Otherwise we believe it is a complete path. Use it as it is.
25926        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
25927$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
25928        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
25929$as_echo_n "checking for NATIVE2ASCII... " >&6; }
25930        if test ! -x "$tool_specified"; then
25931          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25932$as_echo "not found" >&6; }
25933          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
25934        fi
25935        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25936$as_echo "$tool_specified" >&6; }
25937      fi
25938    fi
25939  fi
25940
25941
25942
25943  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25944
25945  # Publish this variable in the help.
25946
25947
25948  if test "x$JARSIGNER" = x; then
25949    # The variable is not set by user, try to locate tool using the code snippet
25950
25951      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25952$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25953      JARSIGNER=$BOOT_JDK/bin/jarsigner
25954      if test ! -x $JARSIGNER; then
25955        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25956$as_echo "not found" >&6; }
25957        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25958$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25959        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25960      fi
25961      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25962$as_echo "ok" >&6; }
25963
25964
25965  else
25966    # The variable is set, but is it from the command line or the environment?
25967
25968    # Try to remove the string !JARSIGNER! from our list.
25969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
25970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25971      # If it failed, the variable was not from the command line. Ignore it,
25972      # but warn the user (except for BASH, which is always set by the calling BASH).
25973      if test "xJARSIGNER" != xBASH; then
25974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
25975$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
25976      fi
25977      # Try to locate tool using the code snippet
25978
25979      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
25980$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
25981      JARSIGNER=$BOOT_JDK/bin/jarsigner
25982      if test ! -x $JARSIGNER; then
25983        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25984$as_echo "not found" >&6; }
25985        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25986$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25987        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
25988      fi
25989      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25990$as_echo "ok" >&6; }
25991
25992
25993    else
25994      # If it succeeded, then it was overridden by the user. We will use it
25995      # for the tool.
25996
25997      # First remove it from the list of overridden variables, so we can test
25998      # for unknown variables in the end.
25999      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26000
26001      # Check if the provided tool contains a complete path.
26002      tool_specified="$JARSIGNER"
26003      tool_basename="${tool_specified##*/}"
26004      if test "x$tool_basename" = "x$tool_specified"; then
26005        # A command without a complete path is provided, search $PATH.
26006        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26007$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26008        # Extract the first word of "$tool_basename", so it can be a program name with args.
26009set dummy $tool_basename; ac_word=$2
26010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26011$as_echo_n "checking for $ac_word... " >&6; }
26012if ${ac_cv_path_JARSIGNER+:} false; then :
26013  $as_echo_n "(cached) " >&6
26014else
26015  case $JARSIGNER in
26016  [\\/]* | ?:[\\/]*)
26017  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26018  ;;
26019  *)
26020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26021for as_dir in $PATH
26022do
26023  IFS=$as_save_IFS
26024  test -z "$as_dir" && as_dir=.
26025    for ac_exec_ext in '' $ac_executable_extensions; do
26026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26027    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26029    break 2
26030  fi
26031done
26032  done
26033IFS=$as_save_IFS
26034
26035  ;;
26036esac
26037fi
26038JARSIGNER=$ac_cv_path_JARSIGNER
26039if test -n "$JARSIGNER"; then
26040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26041$as_echo "$JARSIGNER" >&6; }
26042else
26043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26044$as_echo "no" >&6; }
26045fi
26046
26047
26048        if test "x$JARSIGNER" = x; then
26049          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26050        fi
26051      else
26052        # Otherwise we believe it is a complete path. Use it as it is.
26053        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26054$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26055        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26056$as_echo_n "checking for JARSIGNER... " >&6; }
26057        if test ! -x "$tool_specified"; then
26058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26059$as_echo "not found" >&6; }
26060          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26061        fi
26062        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26063$as_echo "$tool_specified" >&6; }
26064      fi
26065    fi
26066  fi
26067
26068
26069
26070  # Finally, set some other options...
26071
26072  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26073  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26074
26075
26076
26077
26078  ##############################################################################
26079  #
26080  # Specify jvm options for anything that is run with the Boot JDK.
26081  # Not all JVM:s accept the same arguments on the command line.
26082  #
26083
26084# Check whether --with-boot-jdk-jvmargs was given.
26085if test "${with_boot_jdk_jvmargs+set}" = set; then :
26086  withval=$with_boot_jdk_jvmargs;
26087fi
26088
26089
26090  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26091$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26092
26093  # Disable special log output when a debug build is used as Boot JDK...
26094
26095  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26096  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26097  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26098  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26099  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26101    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26102    JVM_ARG_OK=true
26103  else
26104    $ECHO "Arg failed:" >&5
26105    $ECHO "$OUTPUT" >&5
26106    JVM_ARG_OK=false
26107  fi
26108
26109
26110  # Apply user provided options.
26111
26112  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26113  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26114  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26115  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26116  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26117  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26118    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26119    JVM_ARG_OK=true
26120  else
26121    $ECHO "Arg failed:" >&5
26122    $ECHO "$OUTPUT" >&5
26123    JVM_ARG_OK=false
26124  fi
26125
26126
26127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26128$as_echo "$boot_jdk_jvmargs" >&6; }
26129
26130  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26131  JAVA_FLAGS=$boot_jdk_jvmargs
26132
26133
26134
26135  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26136$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26137
26138  # Starting amount of heap memory.
26139
26140  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26141  $ECHO "Command: $JAVA -Xms64M -version" >&5
26142  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26143  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26144  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26145  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26146    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26147    JVM_ARG_OK=true
26148  else
26149    $ECHO "Arg failed:" >&5
26150    $ECHO "$OUTPUT" >&5
26151    JVM_ARG_OK=false
26152  fi
26153
26154
26155  # Maximum amount of heap memory.
26156  # Maximum stack size.
26157  if test "x$BUILD_NUM_BITS" = x32; then
26158    JVM_MAX_HEAP=1100M
26159    STACK_SIZE=768
26160  else
26161    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26162    # pointers are used. Apparently, we need to increase the heap and stack
26163    # space for the jvm. More specifically, when running javac to build huge
26164    # jdk batch
26165    JVM_MAX_HEAP=1600M
26166    STACK_SIZE=1536
26167  fi
26168
26169  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26170  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26171  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26172  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26173  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26174  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26175    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26176    JVM_ARG_OK=true
26177  else
26178    $ECHO "Arg failed:" >&5
26179    $ECHO "$OUTPUT" >&5
26180    JVM_ARG_OK=false
26181  fi
26182
26183
26184  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26185  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26186  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26187  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26188  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26189  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26190    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26191    JVM_ARG_OK=true
26192  else
26193    $ECHO "Arg failed:" >&5
26194    $ECHO "$OUTPUT" >&5
26195    JVM_ARG_OK=false
26196  fi
26197
26198
26199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26200$as_echo "$boot_jdk_jvmargs_big" >&6; }
26201
26202  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26203
26204
26205
26206  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26207$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26208
26209  # Use serial gc for small short lived tools if possible
26210
26211  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26212  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26213  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26214  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26215  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26216  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26217    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26218    JVM_ARG_OK=true
26219  else
26220    $ECHO "Arg failed:" >&5
26221    $ECHO "$OUTPUT" >&5
26222    JVM_ARG_OK=false
26223  fi
26224
26225
26226  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26227  $ECHO "Command: $JAVA -Xms32M -version" >&5
26228  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26229  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26230  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26231  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26232    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26233    JVM_ARG_OK=true
26234  else
26235    $ECHO "Arg failed:" >&5
26236    $ECHO "$OUTPUT" >&5
26237    JVM_ARG_OK=false
26238  fi
26239
26240
26241  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26242  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26243  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26244  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26245  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26246  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26247    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26248    JVM_ARG_OK=true
26249  else
26250    $ECHO "Arg failed:" >&5
26251    $ECHO "$OUTPUT" >&5
26252    JVM_ARG_OK=false
26253  fi
26254
26255
26256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26257$as_echo "$boot_jdk_jvmargs_small" >&6; }
26258
26259  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26260
26261
26262
26263###############################################################################
26264#
26265# Configure the sources to use. We can add or override individual directories.
26266#
26267###############################################################################
26268
26269
26270  # Where are the sources. Any of these can be overridden
26271  # using --with-override-corba and the likes.
26272  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26273  CORBA_TOPDIR="$SRC_ROOT/corba"
26274  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26275  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26276  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26277  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26278  JDK_TOPDIR="$SRC_ROOT/jdk"
26279
26280
26281
26282
26283
26284
26285
26286
26287
26288
26289  ###############################################################################
26290  #
26291  # Pickup additional source for a component from outside of the source root
26292  # or override source for a component.
26293  #
26294
26295# Check whether --with-add-source-root was given.
26296if test "${with_add_source_root+set}" = set; then :
26297  withval=$with_add_source_root;
26298fi
26299
26300
26301
26302# Check whether --with-override-source-root was given.
26303if test "${with_override_source_root+set}" = set; then :
26304  withval=$with_override_source_root;
26305fi
26306
26307
26308
26309# Check whether --with-adds-and-overrides was given.
26310if test "${with_adds_and_overrides+set}" = set; then :
26311  withval=$with_adds_and_overrides;
26312fi
26313
26314
26315  if test "x$with_adds_and_overrides" != x; then
26316    with_add_source_root="$with_adds_and_overrides/adds"
26317    with_override_source_root="$with_adds_and_overrides/overrides"
26318  fi
26319
26320  if test "x$with_add_source_root" != x; then
26321    if ! test -d $with_add_source_root; then
26322      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26323    fi
26324    CURDIR="$PWD"
26325    cd "$with_add_source_root"
26326    ADD_SRC_ROOT="`pwd`"
26327    cd "$CURDIR"
26328    # Verify that the addon source root does not have any root makefiles.
26329    # If it does, then it is usually an error, prevent this.
26330    if test -f $with_add_source_root/langtools/make/Makefile; then
26331      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
26332    fi
26333    if test -f $with_add_source_root/corba/make/Makefile; then
26334      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
26335    fi
26336    if test -f $with_add_source_root/jaxp/make/Makefile; then
26337      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
26338    fi
26339    if test -f $with_add_source_root/jaxws/make/Makefile; then
26340      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
26341    fi
26342    if test -f $with_add_source_root/hotspot/make/Makefile; then
26343      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
26344    fi
26345    if test -f $with_add_source_root/nashorn/make/Makefile; then
26346      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
26347    fi
26348    if test -f $with_add_source_root/jdk/make/Makefile; then
26349      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
26350    fi
26351  fi
26352
26353
26354  if test "x$with_override_source_root" != x; then
26355    if ! test -d $with_override_source_root; then
26356      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26357    fi
26358    CURDIR="$PWD"
26359    cd "$with_override_source_root"
26360    OVERRIDE_SRC_ROOT="`pwd`"
26361    cd "$CURDIR"
26362    if test -f $with_override_source_root/langtools/make/Makefile; then
26363      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
26364    fi
26365    if test -f $with_override_source_root/corba/make/Makefile; then
26366      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
26367    fi
26368    if test -f $with_override_source_root/jaxp/make/Makefile; then
26369      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
26370    fi
26371    if test -f $with_override_source_root/jaxws/make/Makefile; then
26372      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
26373    fi
26374    if test -f $with_override_source_root/hotspot/make/Makefile; then
26375      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
26376    fi
26377    if test -f $with_override_source_root/nashorn/make/Makefile; then
26378      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
26379    fi
26380    if test -f $with_override_source_root/jdk/make/Makefile; then
26381      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
26382    fi
26383  fi
26384
26385
26386  ###############################################################################
26387  #
26388  # Override a repo completely, this is used for example when you have 3 small
26389  # development sandboxes of the langtools sources and want to avoid having 3 full
26390  # OpenJDK sources checked out on disk.
26391  #
26392  # Assuming that the 3 langtools sandboxes are located here:
26393  # /home/fredrik/sandbox1/langtools
26394  # /home/fredrik/sandbox2/langtools
26395  # /home/fredrik/sandbox3/langtools
26396  #
26397  # From the source root you create build subdirs manually:
26398  #     mkdir -p build1 build2 build3
26399  # in each build directory run:
26400  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26401  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26402  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26403  #
26404
26405
26406# Check whether --with-override-langtools was given.
26407if test "${with_override_langtools+set}" = set; then :
26408  withval=$with_override_langtools;
26409fi
26410
26411
26412
26413# Check whether --with-override-corba was given.
26414if test "${with_override_corba+set}" = set; then :
26415  withval=$with_override_corba;
26416fi
26417
26418
26419
26420# Check whether --with-override-jaxp was given.
26421if test "${with_override_jaxp+set}" = set; then :
26422  withval=$with_override_jaxp;
26423fi
26424
26425
26426
26427# Check whether --with-override-jaxws was given.
26428if test "${with_override_jaxws+set}" = set; then :
26429  withval=$with_override_jaxws;
26430fi
26431
26432
26433
26434# Check whether --with-override-hotspot was given.
26435if test "${with_override_hotspot+set}" = set; then :
26436  withval=$with_override_hotspot;
26437fi
26438
26439
26440
26441# Check whether --with-override-nashorn was given.
26442if test "${with_override_nashorn+set}" = set; then :
26443  withval=$with_override_nashorn;
26444fi
26445
26446
26447
26448# Check whether --with-override-jdk was given.
26449if test "${with_override_jdk+set}" = set; then :
26450  withval=$with_override_jdk;
26451fi
26452
26453
26454  if test "x$with_override_langtools" != x; then
26455    CURDIR="$PWD"
26456    cd "$with_override_langtools"
26457    LANGTOOLS_TOPDIR="`pwd`"
26458    cd "$CURDIR"
26459    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26460      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26461    fi
26462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26463$as_echo_n "checking if langtools should be overridden... " >&6; }
26464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26465$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26466  fi
26467  if test "x$with_override_corba" != x; then
26468    CURDIR="$PWD"
26469    cd "$with_override_corba"
26470    CORBA_TOPDIR="`pwd`"
26471    cd "$CURDIR"
26472    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26473      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26474    fi
26475    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26476$as_echo_n "checking if corba should be overridden... " >&6; }
26477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26478$as_echo "yes with $CORBA_TOPDIR" >&6; }
26479  fi
26480  if test "x$with_override_jaxp" != x; then
26481    CURDIR="$PWD"
26482    cd "$with_override_jaxp"
26483    JAXP_TOPDIR="`pwd`"
26484    cd "$CURDIR"
26485    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26486      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26487    fi
26488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26489$as_echo_n "checking if jaxp should be overridden... " >&6; }
26490    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26491$as_echo "yes with $JAXP_TOPDIR" >&6; }
26492  fi
26493  if test "x$with_override_jaxws" != x; then
26494    CURDIR="$PWD"
26495    cd "$with_override_jaxws"
26496    JAXWS_TOPDIR="`pwd`"
26497    cd "$CURDIR"
26498    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26499      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26500    fi
26501    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26502$as_echo_n "checking if jaxws should be overridden... " >&6; }
26503    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26504$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26505  fi
26506  if test "x$with_override_hotspot" != x; then
26507    CURDIR="$PWD"
26508    cd "$with_override_hotspot"
26509    HOTSPOT_TOPDIR="`pwd`"
26510    cd "$CURDIR"
26511    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26512      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26513    fi
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26515$as_echo_n "checking if hotspot should be overridden... " >&6; }
26516    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26517$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26518  fi
26519  if test "x$with_override_nashorn" != x; then
26520    CURDIR="$PWD"
26521    cd "$with_override_nashorn"
26522    NASHORN_TOPDIR="`pwd`"
26523    cd "$CURDIR"
26524    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26525      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26526    fi
26527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26528$as_echo_n "checking if nashorn should be overridden... " >&6; }
26529    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26530$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26531  fi
26532  if test "x$with_override_jdk" != x; then
26533    CURDIR="$PWD"
26534    cd "$with_override_jdk"
26535    JDK_TOPDIR="`pwd`"
26536    cd "$CURDIR"
26537    if ! test -f $JDK_TOPDIR/make/Makefile; then
26538      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26539    fi
26540    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26541$as_echo_n "checking if JDK should be overridden... " >&6; }
26542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26543$as_echo "yes with $JDK_TOPDIR" >&6; }
26544  fi
26545
26546
26547  BUILD_OUTPUT="$OUTPUT_ROOT"
26548
26549
26550  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26551  BUILD_HOTSPOT=true
26552
26553
26554
26555# Check whether --with-import-hotspot was given.
26556if test "${with_import_hotspot+set}" = set; then :
26557  withval=$with_import_hotspot;
26558fi
26559
26560  if test "x$with_import_hotspot" != x; then
26561    CURDIR="$PWD"
26562    cd "$with_import_hotspot"
26563    HOTSPOT_DIST="`pwd`"
26564    cd "$CURDIR"
26565    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26566      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26567    fi
26568    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26569$as_echo_n "checking if hotspot should be imported... " >&6; }
26570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26571$as_echo "yes from $HOTSPOT_DIST" >&6; }
26572    BUILD_HOTSPOT=false
26573  fi
26574
26575  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26576
26577
26578###############################################################################
26579#
26580# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26581# native code.
26582#
26583###############################################################################
26584
26585# First determine the toolchain type (compiler family)
26586
26587
26588# Check whether --with-toolchain-type was given.
26589if test "${with_toolchain_type+set}" = set; then :
26590  withval=$with_toolchain_type;
26591fi
26592
26593
26594  # Use indirect variable referencing
26595  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26596  VALID_TOOLCHAINS=${!toolchain_var_name}
26597
26598  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26599    # On Mac OS X, default toolchain to clang after Xcode 5
26600    XCODE_VERSION_OUTPUT=`xcodebuild -version 2>&1 | $HEAD -n 1`
26601    $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26602    if test $? -ne 0; then
26603      as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26604    fi
26605    XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26606        $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26607        $CUT -f 1 -d .`
26608    { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26609$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26610    if test $XCODE_MAJOR_VERSION -ge 5; then
26611        DEFAULT_TOOLCHAIN="clang"
26612    else
26613        DEFAULT_TOOLCHAIN="gcc"
26614    fi
26615  else
26616    # First toolchain type in the list is the default
26617    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26618  fi
26619
26620  if test "x$with_toolchain_type" = xlist; then
26621    # List all toolchains
26622    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26623$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26624    for toolchain in $VALID_TOOLCHAINS; do
26625      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26626      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26627      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26628    done
26629
26630    exit 0
26631  elif test "x$with_toolchain_type" != x; then
26632    # User override; check that it is valid
26633    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26634      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26635$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26636      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26637$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26638      as_fn_error $? "Cannot continue." "$LINENO" 5
26639    fi
26640    TOOLCHAIN_TYPE=$with_toolchain_type
26641  else
26642    # No flag given, use default
26643    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26644  fi
26645
26646
26647  TOOLCHAIN_CC_BINARY_clang="clang"
26648  TOOLCHAIN_CC_BINARY_gcc="gcc"
26649  TOOLCHAIN_CC_BINARY_microsoft="cl"
26650  TOOLCHAIN_CC_BINARY_solstudio="cc"
26651  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26652
26653  TOOLCHAIN_CXX_BINARY_clang="clang++"
26654  TOOLCHAIN_CXX_BINARY_gcc="g++"
26655  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26656  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26657  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26658
26659  # Use indirect variable referencing
26660  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26661  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26662  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26663  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26664  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26665  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26666
26667
26668  # Define filename patterns
26669  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26670    LIBRARY_PREFIX=
26671    SHARED_LIBRARY_SUFFIX='.dll'
26672    STATIC_LIBRARY_SUFFIX='.lib'
26673    SHARED_LIBRARY='$1.dll'
26674    STATIC_LIBRARY='$1.lib'
26675    OBJ_SUFFIX='.obj'
26676    EXE_SUFFIX='.exe'
26677  else
26678    LIBRARY_PREFIX=lib
26679    SHARED_LIBRARY_SUFFIX='.so'
26680    STATIC_LIBRARY_SUFFIX='.a'
26681    SHARED_LIBRARY='lib$1.so'
26682    STATIC_LIBRARY='lib$1.a'
26683    OBJ_SUFFIX='.o'
26684    EXE_SUFFIX=''
26685    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26686      SHARED_LIBRARY='lib$1.dylib'
26687      SHARED_LIBRARY_SUFFIX='.dylib'
26688    fi
26689  fi
26690
26691
26692
26693
26694
26695
26696
26697
26698
26699
26700  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26701    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26702$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26703  else
26704    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26705$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26706  fi
26707
26708
26709# Then detect the actual binaries needed
26710
26711  # FIXME: Is this needed?
26712  ac_ext=cpp
26713ac_cpp='$CXXCPP $CPPFLAGS'
26714ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26715ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26716ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26717
26718
26719  # Store the CFLAGS etc passed to the configure script.
26720  ORG_CFLAGS="$CFLAGS"
26721  ORG_CXXFLAGS="$CXXFLAGS"
26722  ORG_OBJCFLAGS="$OBJCFLAGS"
26723
26724  # On Windows, we need to detect the visual studio installation first.
26725  # This will change the PATH, but we need to keep that new PATH even
26726  # after toolchain detection is done, since the compiler (on x86) uses
26727  # it for DLL resolution in runtime.
26728  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26729
26730  # Store path to cygwin link.exe to help excluding it when searching for
26731  # VS linker. This must be done before changing the PATH when looking for VS.
26732  # Extract the first word of "link", so it can be a program name with args.
26733set dummy link; ac_word=$2
26734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26735$as_echo_n "checking for $ac_word... " >&6; }
26736if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26737  $as_echo_n "(cached) " >&6
26738else
26739  case $CYGWIN_LINK in
26740  [\\/]* | ?:[\\/]*)
26741  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26742  ;;
26743  *)
26744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26745for as_dir in $PATH
26746do
26747  IFS=$as_save_IFS
26748  test -z "$as_dir" && as_dir=.
26749    for ac_exec_ext in '' $ac_executable_extensions; do
26750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26751    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26753    break 2
26754  fi
26755done
26756  done
26757IFS=$as_save_IFS
26758
26759  ;;
26760esac
26761fi
26762CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26763if test -n "$CYGWIN_LINK"; then
26764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26765$as_echo "$CYGWIN_LINK" >&6; }
26766else
26767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26768$as_echo "no" >&6; }
26769fi
26770
26771
26772  if test "x$CYGWIN_LINK" != x; then
26773    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26774$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26775    "$CYGWIN_LINK" --version > /dev/null
26776    if test $? -eq 0 ; then
26777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26778$as_echo "yes" >&6; }
26779    else
26780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26781$as_echo "no" >&6; }
26782      # This might be the VS linker. Don't exclude it later on.
26783      CYGWIN_LINK=""
26784    fi
26785  fi
26786
26787  # First-hand choice is to locate and run the vsvars bat file.
26788
26789  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26790    VCVARSFILE="vc/bin/vcvars32.bat"
26791  else
26792    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26793  fi
26794
26795  VS_ENV_CMD=""
26796  VS_ENV_ARGS=""
26797  if test "x$with_toolsdir" != x; then
26798
26799  if test "x$VS_ENV_CMD" = x; then
26800    VS100BASE="$with_toolsdir/../.."
26801    METHOD="--with-tools-dir"
26802
26803  windows_path="$VS100BASE"
26804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26805    unix_path=`$CYGPATH -u "$windows_path"`
26806    VS100BASE="$unix_path"
26807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26809    VS100BASE="$unix_path"
26810  fi
26811
26812    if test -d "$VS100BASE"; then
26813      if test -f "$VS100BASE/$VCVARSFILE"; then
26814        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26815$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26816        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26817      else
26818        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26819$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26820        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26821$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26822      fi
26823    fi
26824  fi
26825
26826  fi
26827
26828  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26829    # Having specified an argument which is incorrect will produce an instant failure;
26830    # we should not go on looking
26831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26832$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26833    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26834$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26835    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26836  fi
26837
26838  if test "x$VS100COMNTOOLS" != x; then
26839
26840  if test "x$VS_ENV_CMD" = x; then
26841    VS100BASE="$VS100COMNTOOLS/../.."
26842    METHOD="VS100COMNTOOLS variable"
26843
26844  windows_path="$VS100BASE"
26845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26846    unix_path=`$CYGPATH -u "$windows_path"`
26847    VS100BASE="$unix_path"
26848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26850    VS100BASE="$unix_path"
26851  fi
26852
26853    if test -d "$VS100BASE"; then
26854      if test -f "$VS100BASE/$VCVARSFILE"; then
26855        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26856$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26857        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26858      else
26859        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26860$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26861        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26862$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26863      fi
26864    fi
26865  fi
26866
26867  fi
26868  if test "x$PROGRAMFILES" != x; then
26869
26870  if test "x$VS_ENV_CMD" = x; then
26871    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26872    METHOD="well-known name"
26873
26874  windows_path="$VS100BASE"
26875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26876    unix_path=`$CYGPATH -u "$windows_path"`
26877    VS100BASE="$unix_path"
26878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26880    VS100BASE="$unix_path"
26881  fi
26882
26883    if test -d "$VS100BASE"; then
26884      if test -f "$VS100BASE/$VCVARSFILE"; then
26885        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26886$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26887        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26888      else
26889        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26890$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26891        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26892$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26893      fi
26894    fi
26895  fi
26896
26897  fi
26898
26899  if test "x$VS_ENV_CMD" = x; then
26900    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
26901    METHOD="well-known name"
26902
26903  windows_path="$VS100BASE"
26904  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26905    unix_path=`$CYGPATH -u "$windows_path"`
26906    VS100BASE="$unix_path"
26907  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26908    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26909    VS100BASE="$unix_path"
26910  fi
26911
26912    if test -d "$VS100BASE"; then
26913      if test -f "$VS100BASE/$VCVARSFILE"; then
26914        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26915$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26916        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26917      else
26918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26919$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26920        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26921$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26922      fi
26923    fi
26924  fi
26925
26926
26927  if test "x$VS_ENV_CMD" = x; then
26928    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
26929    METHOD="well-known name"
26930
26931  windows_path="$VS100BASE"
26932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26933    unix_path=`$CYGPATH -u "$windows_path"`
26934    VS100BASE="$unix_path"
26935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26937    VS100BASE="$unix_path"
26938  fi
26939
26940    if test -d "$VS100BASE"; then
26941      if test -f "$VS100BASE/$VCVARSFILE"; then
26942        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26943$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26944        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26945      else
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26947$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26948        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26949$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26950      fi
26951    fi
26952  fi
26953
26954
26955  if test "x$ProgramW6432" != x; then
26956
26957  if test "x$VS_ENV_CMD" = x; then
26958    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
26959    METHOD="well-known name"
26960
26961  windows_path="$WIN_SDK_BASE"
26962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26963    unix_path=`$CYGPATH -u "$windows_path"`
26964    WIN_SDK_BASE="$unix_path"
26965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26967    WIN_SDK_BASE="$unix_path"
26968  fi
26969
26970    if test -d "$WIN_SDK_BASE"; then
26971      # There have been cases of partial or broken SDK installations. A missing
26972      # lib dir is not going to work.
26973      if test ! -d "$WIN_SDK_BASE/../lib"; then
26974        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26975$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26976        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
26977$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
26978      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
26979        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26980$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26981        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
26982        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26983          VS_ENV_ARGS="/x86"
26984        else
26985          VS_ENV_ARGS="/x64"
26986        fi
26987      else
26988        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
26989$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
26990        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
26991$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
26992      fi
26993    fi
26994  fi
26995
26996  fi
26997  if test "x$PROGRAMW6432" != x; then
26998
26999  if test "x$VS_ENV_CMD" = x; then
27000    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27001    METHOD="well-known name"
27002
27003  windows_path="$WIN_SDK_BASE"
27004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27005    unix_path=`$CYGPATH -u "$windows_path"`
27006    WIN_SDK_BASE="$unix_path"
27007  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27008    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27009    WIN_SDK_BASE="$unix_path"
27010  fi
27011
27012    if test -d "$WIN_SDK_BASE"; then
27013      # There have been cases of partial or broken SDK installations. A missing
27014      # lib dir is not going to work.
27015      if test ! -d "$WIN_SDK_BASE/../lib"; then
27016        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27017$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27018        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27019$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27020      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27022$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27023        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27024        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27025          VS_ENV_ARGS="/x86"
27026        else
27027          VS_ENV_ARGS="/x64"
27028        fi
27029      else
27030        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27031$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27032        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27033$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27034      fi
27035    fi
27036  fi
27037
27038  fi
27039  if test "x$PROGRAMFILES" != x; then
27040
27041  if test "x$VS_ENV_CMD" = x; then
27042    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27043    METHOD="well-known name"
27044
27045  windows_path="$WIN_SDK_BASE"
27046  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27047    unix_path=`$CYGPATH -u "$windows_path"`
27048    WIN_SDK_BASE="$unix_path"
27049  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27050    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27051    WIN_SDK_BASE="$unix_path"
27052  fi
27053
27054    if test -d "$WIN_SDK_BASE"; then
27055      # There have been cases of partial or broken SDK installations. A missing
27056      # lib dir is not going to work.
27057      if test ! -d "$WIN_SDK_BASE/../lib"; then
27058        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27059$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27061$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27062      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27063        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27064$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27065        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27066        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27067          VS_ENV_ARGS="/x86"
27068        else
27069          VS_ENV_ARGS="/x64"
27070        fi
27071      else
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27073$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27075$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27076      fi
27077    fi
27078  fi
27079
27080  fi
27081
27082  if test "x$VS_ENV_CMD" = x; then
27083    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27084    METHOD="well-known name"
27085
27086  windows_path="$WIN_SDK_BASE"
27087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27088    unix_path=`$CYGPATH -u "$windows_path"`
27089    WIN_SDK_BASE="$unix_path"
27090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27092    WIN_SDK_BASE="$unix_path"
27093  fi
27094
27095    if test -d "$WIN_SDK_BASE"; then
27096      # There have been cases of partial or broken SDK installations. A missing
27097      # lib dir is not going to work.
27098      if test ! -d "$WIN_SDK_BASE/../lib"; then
27099        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27100$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27101        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27102$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27103      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27104        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27105$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27106        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27107        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27108          VS_ENV_ARGS="/x86"
27109        else
27110          VS_ENV_ARGS="/x64"
27111        fi
27112      else
27113        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27114$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27115        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27116$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27117      fi
27118    fi
27119  fi
27120
27121
27122  if test "x$VS_ENV_CMD" = x; then
27123    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27124    METHOD="well-known name"
27125
27126  windows_path="$WIN_SDK_BASE"
27127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27128    unix_path=`$CYGPATH -u "$windows_path"`
27129    WIN_SDK_BASE="$unix_path"
27130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27132    WIN_SDK_BASE="$unix_path"
27133  fi
27134
27135    if test -d "$WIN_SDK_BASE"; then
27136      # There have been cases of partial or broken SDK installations. A missing
27137      # lib dir is not going to work.
27138      if test ! -d "$WIN_SDK_BASE/../lib"; then
27139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27142$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27143      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27145$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27146        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27147        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27148          VS_ENV_ARGS="/x86"
27149        else
27150          VS_ENV_ARGS="/x64"
27151        fi
27152      else
27153        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27154$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27155        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27156$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27157      fi
27158    fi
27159  fi
27160
27161
27162  if test "x$VS_ENV_CMD" != x; then
27163    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27164
27165  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27166
27167  # First separate the path from the arguments. This will split at the first
27168  # space.
27169  complete="$VS_ENV_CMD"
27170  path="${complete%% *}"
27171  tmp="$complete EOL"
27172  arguments="${tmp#* }"
27173
27174  # Input might be given as Windows format, start by converting to
27175  # unix format.
27176  new_path=`$CYGPATH -u "$path"`
27177
27178  # Now try to locate executable using which
27179  new_path=`$WHICH "$new_path" 2> /dev/null`
27180  # bat and cmd files are not always considered executable in cygwin causing which
27181  # to not find them
27182  if test "x$new_path" = x \
27183      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27184      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27185    new_path=`$CYGPATH -u "$path"`
27186  fi
27187  if test "x$new_path" = x; then
27188    # Oops. Which didn't find the executable.
27189    # The splitting of arguments from the executable at a space might have been incorrect,
27190    # since paths with space are more likely in Windows. Give it another try with the whole
27191    # argument.
27192    path="$complete"
27193    arguments="EOL"
27194    new_path=`$CYGPATH -u "$path"`
27195    new_path=`$WHICH "$new_path" 2> /dev/null`
27196    # bat and cmd files are not always considered executable in cygwin causing which
27197    # to not find them
27198    if test "x$new_path" = x \
27199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27201      new_path=`$CYGPATH -u "$path"`
27202    fi
27203    if test "x$new_path" = x; then
27204      # It's still not found. Now this is an unrecoverable error.
27205      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27206$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27207      has_space=`$ECHO "$complete" | $GREP " "`
27208      if test "x$has_space" != x; then
27209        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27210$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27211      fi
27212      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27213    fi
27214  fi
27215
27216  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27217  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27218  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27219  # "foo.exe" is OK but "foo" is an error.
27220  #
27221  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27222  # It is also a way to make sure we got the proper file name for the real test later on.
27223  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27224  if test "x$test_shortpath" = x; then
27225    # Short path failed, file does not exist as specified.
27226    # Try adding .exe or .cmd
27227    if test -f "${new_path}.exe"; then
27228      input_to_shortpath="${new_path}.exe"
27229    elif test -f "${new_path}.cmd"; then
27230      input_to_shortpath="${new_path}.cmd"
27231    else
27232      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27233$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27234      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27235$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27236      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27237    fi
27238  else
27239    input_to_shortpath="$new_path"
27240  fi
27241
27242  # Call helper function which possibly converts this using DOS-style short mode.
27243  # If so, the updated path is stored in $new_path.
27244  new_path="$input_to_shortpath"
27245
27246  input_path="$input_to_shortpath"
27247  # Check if we need to convert this using DOS-style short mode. If the path
27248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27249  # take no chances and rewrite it.
27250  # Note: m4 eats our [], so we need to use [ and ] instead.
27251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27252  if test "x$has_forbidden_chars" != x; then
27253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27257      # Going to short mode and back again did indeed matter. Since short mode is
27258      # case insensitive, let's make it lowercase to improve readability.
27259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27260      # Now convert it back to Unix-stile (cygpath)
27261      input_path=`$CYGPATH -u "$shortmode_path"`
27262      new_path="$input_path"
27263    fi
27264  fi
27265
27266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27267  if test "x$test_cygdrive_prefix" = x; then
27268    # As a simple fix, exclude /usr/bin since it's not a real path.
27269    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27271      # a path prefixed by /cygdrive for fixpath to work.
27272      new_path="$CYGWIN_ROOT_PATH$input_path"
27273    fi
27274  fi
27275
27276  # remove trailing .exe if any
27277  new_path="${new_path/%.exe/}"
27278
27279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27280
27281  # First separate the path from the arguments. This will split at the first
27282  # space.
27283  complete="$VS_ENV_CMD"
27284  path="${complete%% *}"
27285  tmp="$complete EOL"
27286  arguments="${tmp#* }"
27287
27288  # Input might be given as Windows format, start by converting to
27289  # unix format.
27290  new_path="$path"
27291
27292  windows_path="$new_path"
27293  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27294    unix_path=`$CYGPATH -u "$windows_path"`
27295    new_path="$unix_path"
27296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27297    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27298    new_path="$unix_path"
27299  fi
27300
27301
27302  # Now try to locate executable using which
27303  new_path=`$WHICH "$new_path" 2> /dev/null`
27304
27305  if test "x$new_path" = x; then
27306    # Oops. Which didn't find the executable.
27307    # The splitting of arguments from the executable at a space might have been incorrect,
27308    # since paths with space are more likely in Windows. Give it another try with the whole
27309    # argument.
27310    path="$complete"
27311    arguments="EOL"
27312    new_path="$path"
27313
27314  windows_path="$new_path"
27315  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27316    unix_path=`$CYGPATH -u "$windows_path"`
27317    new_path="$unix_path"
27318  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27319    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27320    new_path="$unix_path"
27321  fi
27322
27323
27324    new_path=`$WHICH "$new_path" 2> /dev/null`
27325
27326    if test "x$new_path" = x; then
27327      # It's still not found. Now this is an unrecoverable error.
27328      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27329$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27330      has_space=`$ECHO "$complete" | $GREP " "`
27331      if test "x$has_space" != x; then
27332        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27333$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27334      fi
27335      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27336    fi
27337  fi
27338
27339  # Now new_path has a complete unix path to the binary
27340  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27341    # Keep paths in /bin as-is, but remove trailing .exe if any
27342    new_path="${new_path/%.exe/}"
27343    # Do not save /bin paths to all_fixpath_prefixes!
27344  else
27345    # Not in mixed or Windows style, start by that.
27346    new_path=`cmd //c echo $new_path`
27347
27348  input_path="$new_path"
27349  # Check if we need to convert this using DOS-style short mode. If the path
27350  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27351  # take no chances and rewrite it.
27352  # Note: m4 eats our [], so we need to use [ and ] instead.
27353  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27354  if test "x$has_forbidden_chars" != x; then
27355    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27356    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27357  fi
27358
27359    # Output is in $new_path
27360
27361  windows_path="$new_path"
27362  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27363    unix_path=`$CYGPATH -u "$windows_path"`
27364    new_path="$unix_path"
27365  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27366    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27367    new_path="$unix_path"
27368  fi
27369
27370    # remove trailing .exe if any
27371    new_path="${new_path/%.exe/}"
27372
27373    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27374    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27375  fi
27376
27377  else
27378    # We're on a posix platform. Hooray! :)
27379    # First separate the path from the arguments. This will split at the first
27380    # space.
27381    complete="$VS_ENV_CMD"
27382    path="${complete%% *}"
27383    tmp="$complete EOL"
27384    arguments="${tmp#* }"
27385
27386    # Cannot rely on the command "which" here since it doesn't always work.
27387    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27388    if test -z "$is_absolute_path"; then
27389      # Path to executable is not absolute. Find it.
27390      IFS_save="$IFS"
27391      IFS=:
27392      for p in $PATH; do
27393        if test -f "$p/$path" && test -x "$p/$path"; then
27394          new_path="$p/$path"
27395          break
27396        fi
27397      done
27398      IFS="$IFS_save"
27399    else
27400      # This is an absolute path, we can use it without further modifications.
27401      new_path="$path"
27402    fi
27403
27404    if test "x$new_path" = x; then
27405      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27406$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27407      has_space=`$ECHO "$complete" | $GREP " "`
27408      if test "x$has_space" != x; then
27409        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27410$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27411      fi
27412      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27413    fi
27414  fi
27415
27416  # Now join together the path and the arguments once again
27417  if test "x$arguments" != xEOL; then
27418    new_complete="$new_path ${arguments% *}"
27419  else
27420    new_complete="$new_path"
27421  fi
27422
27423  if test "x$complete" != "x$new_complete"; then
27424    VS_ENV_CMD="$new_complete"
27425    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27426$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27427  fi
27428
27429
27430    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27431    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27432$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27433
27434    # We need to create a couple of temporary files.
27435    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27436    $MKDIR -p $VS_ENV_TMP_DIR
27437
27438    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27439    # Instead create a shell script which will set the relevant variables when run.
27440    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27441
27442  unix_path="$WINPATH_VS_ENV_CMD"
27443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27444    windows_path=`$CYGPATH -m "$unix_path"`
27445    WINPATH_VS_ENV_CMD="$windows_path"
27446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27447    windows_path=`cmd //c echo $unix_path`
27448    WINPATH_VS_ENV_CMD="$windows_path"
27449  fi
27450
27451    WINPATH_BASH="$BASH"
27452
27453  unix_path="$WINPATH_BASH"
27454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27455    windows_path=`$CYGPATH -m "$unix_path"`
27456    WINPATH_BASH="$windows_path"
27457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27458    windows_path=`cmd //c echo $unix_path`
27459    WINPATH_BASH="$windows_path"
27460  fi
27461
27462
27463    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27464    # script (executable by bash) that will setup the important variables.
27465    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27466    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27467    # This will end up something like:
27468    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27469    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27470    # These will end up something like:
27471    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27472    # The trailing space for everyone except PATH is no typo, but is needed due
27473    # to trailing \ in the Windows paths. These will be stripped later.
27474    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27475    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27476    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27477    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27478    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27479    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27480
27481    # Now execute the newly created bat file.
27482    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27483    # Change directory so we don't need to mess with Windows paths in redirects.
27484    cd $VS_ENV_TMP_DIR
27485    cmd /c extract-vs-env.bat | $CAT
27486    cd $CURDIR
27487
27488    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27489      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27490$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27491      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27492$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27493      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27494$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27495      as_fn_error $? "Cannot continue" "$LINENO" 5
27496    fi
27497
27498    # Now set all paths and other env variables. This will allow the rest of
27499    # the configure script to find and run the compiler in the proper way.
27500    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27501$as_echo "$as_me: Setting extracted environment variables" >&6;}
27502    . $VS_ENV_TMP_DIR/set-vs-env.sh
27503    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27504    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27505  else
27506    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27507    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27508$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27509  fi
27510
27511  # At this point, we should have correct variables in the environment, or we can't continue.
27512  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27513$as_echo_n "checking for Visual Studio variables... " >&6; }
27514
27515  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27516    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27517      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27518$as_echo "present but broken" >&6; }
27519      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27520    else
27521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27522$as_echo "ok" >&6; }
27523      # Remove any trailing "\" and " " from the variables.
27524      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27525      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27526      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27527      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27528      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27529      # Remove any paths containing # (typically F#) as that messes up make. This
27530      # is needed if visual studio was installed with F# support.
27531      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27532
27533
27534
27535
27536    fi
27537  else
27538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27539$as_echo "not found" >&6; }
27540
27541    if test "x$VS_ENV_CMD" = x; then
27542      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27543$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27544      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27545$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27546    else
27547      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27548$as_echo "$as_me: Running the extraction script failed." >&6;}
27549    fi
27550    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27551$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27552    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27553$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27554    as_fn_error $? "Cannot continue" "$LINENO" 5
27555  fi
27556
27557    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27558    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27559    PATH="$VS_PATH"
27560    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27561    export INCLUDE="$VS_INCLUDE"
27562    export LIB="$VS_LIB"
27563  fi
27564
27565  # autoconf magic only relies on PATH, so update it if tools dir is specified
27566  OLD_PATH="$PATH"
27567
27568  # For solaris we really need solaris tools, and not the GNU equivalent.
27569  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27570  # so add that to path before starting to probe.
27571  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27572  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27573    PATH="/usr/ccs/bin:$PATH"
27574  fi
27575
27576  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27577  # override all other locations.
27578  if test "x$TOOLCHAIN_PATH" != x; then
27579    PATH=$TOOLCHAIN_PATH:$PATH
27580  fi
27581
27582
27583  #
27584  # Setup the compilers (CC and CXX)
27585  #
27586
27587  COMPILER_NAME=C
27588  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27589
27590  if test "x$CC" != x; then
27591    # User has supplied compiler name already, always let that override.
27592    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27593$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27594    if test "x`basename $CC`" = "x$CC"; then
27595      # A command without a complete path is provided, search $PATH.
27596
27597      for ac_prog in $CC
27598do
27599  # Extract the first word of "$ac_prog", so it can be a program name with args.
27600set dummy $ac_prog; ac_word=$2
27601{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27602$as_echo_n "checking for $ac_word... " >&6; }
27603if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27604  $as_echo_n "(cached) " >&6
27605else
27606  case $POTENTIAL_CC in
27607  [\\/]* | ?:[\\/]*)
27608  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27609  ;;
27610  *)
27611  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27612for as_dir in $PATH
27613do
27614  IFS=$as_save_IFS
27615  test -z "$as_dir" && as_dir=.
27616    for ac_exec_ext in '' $ac_executable_extensions; do
27617  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27618    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27619    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27620    break 2
27621  fi
27622done
27623  done
27624IFS=$as_save_IFS
27625
27626  ;;
27627esac
27628fi
27629POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27630if test -n "$POTENTIAL_CC"; then
27631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27632$as_echo "$POTENTIAL_CC" >&6; }
27633else
27634  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27635$as_echo "no" >&6; }
27636fi
27637
27638
27639  test -n "$POTENTIAL_CC" && break
27640done
27641
27642      if test "x$POTENTIAL_CC" != x; then
27643        CC=$POTENTIAL_CC
27644      else
27645        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27646      fi
27647    else
27648      # Otherwise it might already be a complete path
27649      if test ! -x "$CC"; then
27650        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27651      fi
27652    fi
27653  else
27654    # No user supplied value. Locate compiler ourselves.
27655
27656    # If we are cross compiling, assume cross compilation tools follows the
27657    # cross compilation standard where they are prefixed with the autoconf
27658    # standard name for the target. For example the binary
27659    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27660    # If we are not cross compiling, then the default compiler name will be
27661    # used.
27662
27663    CC=
27664    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27665    # before checking the rest of the PATH.
27666    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27667    # step, this should not be necessary.
27668    if test -n "$TOOLCHAIN_PATH"; then
27669      PATH_save="$PATH"
27670      PATH="$TOOLCHAIN_PATH"
27671      for ac_prog in $SEARCH_LIST
27672do
27673  # Extract the first word of "$ac_prog", so it can be a program name with args.
27674set dummy $ac_prog; ac_word=$2
27675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27676$as_echo_n "checking for $ac_word... " >&6; }
27677if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27678  $as_echo_n "(cached) " >&6
27679else
27680  case $TOOLCHAIN_PATH_CC in
27681  [\\/]* | ?:[\\/]*)
27682  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27683  ;;
27684  *)
27685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27686for as_dir in $PATH
27687do
27688  IFS=$as_save_IFS
27689  test -z "$as_dir" && as_dir=.
27690    for ac_exec_ext in '' $ac_executable_extensions; do
27691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27692    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27694    break 2
27695  fi
27696done
27697  done
27698IFS=$as_save_IFS
27699
27700  ;;
27701esac
27702fi
27703TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27704if test -n "$TOOLCHAIN_PATH_CC"; then
27705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27706$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27707else
27708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27709$as_echo "no" >&6; }
27710fi
27711
27712
27713  test -n "$TOOLCHAIN_PATH_CC" && break
27714done
27715
27716      CC=$TOOLCHAIN_PATH_CC
27717      PATH="$PATH_save"
27718    fi
27719
27720    # AC_PATH_PROGS can't be run multiple times with the same variable,
27721    # so create a new name for this run.
27722    if test "x$CC" = x; then
27723      for ac_prog in $SEARCH_LIST
27724do
27725  # Extract the first word of "$ac_prog", so it can be a program name with args.
27726set dummy $ac_prog; ac_word=$2
27727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27728$as_echo_n "checking for $ac_word... " >&6; }
27729if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27730  $as_echo_n "(cached) " >&6
27731else
27732  case $POTENTIAL_CC in
27733  [\\/]* | ?:[\\/]*)
27734  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27735  ;;
27736  *)
27737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27738for as_dir in $PATH
27739do
27740  IFS=$as_save_IFS
27741  test -z "$as_dir" && as_dir=.
27742    for ac_exec_ext in '' $ac_executable_extensions; do
27743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27744    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27746    break 2
27747  fi
27748done
27749  done
27750IFS=$as_save_IFS
27751
27752  ;;
27753esac
27754fi
27755POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27756if test -n "$POTENTIAL_CC"; then
27757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27758$as_echo "$POTENTIAL_CC" >&6; }
27759else
27760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27761$as_echo "no" >&6; }
27762fi
27763
27764
27765  test -n "$POTENTIAL_CC" && break
27766done
27767
27768      CC=$POTENTIAL_CC
27769    fi
27770
27771    if test "x$CC" = x; then
27772
27773  # Print a helpful message on how to acquire the necessary build dependency.
27774  # devkit is the help tag: freetype, cups, pulse, alsa etc
27775  MISSING_DEPENDENCY=devkit
27776
27777  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27778    cygwin_help $MISSING_DEPENDENCY
27779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27780    msys_help $MISSING_DEPENDENCY
27781  else
27782    PKGHANDLER_COMMAND=
27783
27784    case $PKGHANDLER in
27785      apt-get)
27786        apt_help     $MISSING_DEPENDENCY ;;
27787      yum)
27788        yum_help     $MISSING_DEPENDENCY ;;
27789      port)
27790        port_help    $MISSING_DEPENDENCY ;;
27791      pkgutil)
27792        pkgutil_help $MISSING_DEPENDENCY ;;
27793      pkgadd)
27794        pkgadd_help  $MISSING_DEPENDENCY ;;
27795    esac
27796
27797    if test "x$PKGHANDLER_COMMAND" != x; then
27798      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27799    fi
27800  fi
27801
27802      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27803    fi
27804  fi
27805
27806  # Now we have a compiler binary in CC. Make sure it's okay.
27807
27808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27809
27810  # First separate the path from the arguments. This will split at the first
27811  # space.
27812  complete="$CC"
27813  path="${complete%% *}"
27814  tmp="$complete EOL"
27815  arguments="${tmp#* }"
27816
27817  # Input might be given as Windows format, start by converting to
27818  # unix format.
27819  new_path=`$CYGPATH -u "$path"`
27820
27821  # Now try to locate executable using which
27822  new_path=`$WHICH "$new_path" 2> /dev/null`
27823  # bat and cmd files are not always considered executable in cygwin causing which
27824  # to not find them
27825  if test "x$new_path" = x \
27826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27828    new_path=`$CYGPATH -u "$path"`
27829  fi
27830  if test "x$new_path" = x; then
27831    # Oops. Which didn't find the executable.
27832    # The splitting of arguments from the executable at a space might have been incorrect,
27833    # since paths with space are more likely in Windows. Give it another try with the whole
27834    # argument.
27835    path="$complete"
27836    arguments="EOL"
27837    new_path=`$CYGPATH -u "$path"`
27838    new_path=`$WHICH "$new_path" 2> /dev/null`
27839    # bat and cmd files are not always considered executable in cygwin causing which
27840    # to not find them
27841    if test "x$new_path" = x \
27842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27844      new_path=`$CYGPATH -u "$path"`
27845    fi
27846    if test "x$new_path" = x; then
27847      # It's still not found. Now this is an unrecoverable error.
27848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27849$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27850      has_space=`$ECHO "$complete" | $GREP " "`
27851      if test "x$has_space" != x; then
27852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27854      fi
27855      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27856    fi
27857  fi
27858
27859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27862  # "foo.exe" is OK but "foo" is an error.
27863  #
27864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27865  # It is also a way to make sure we got the proper file name for the real test later on.
27866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27867  if test "x$test_shortpath" = x; then
27868    # Short path failed, file does not exist as specified.
27869    # Try adding .exe or .cmd
27870    if test -f "${new_path}.exe"; then
27871      input_to_shortpath="${new_path}.exe"
27872    elif test -f "${new_path}.cmd"; then
27873      input_to_shortpath="${new_path}.cmd"
27874    else
27875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
27876$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
27877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27879      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27880    fi
27881  else
27882    input_to_shortpath="$new_path"
27883  fi
27884
27885  # Call helper function which possibly converts this using DOS-style short mode.
27886  # If so, the updated path is stored in $new_path.
27887  new_path="$input_to_shortpath"
27888
27889  input_path="$input_to_shortpath"
27890  # Check if we need to convert this using DOS-style short mode. If the path
27891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27892  # take no chances and rewrite it.
27893  # Note: m4 eats our [], so we need to use [ and ] instead.
27894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27895  if test "x$has_forbidden_chars" != x; then
27896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27900      # Going to short mode and back again did indeed matter. Since short mode is
27901      # case insensitive, let's make it lowercase to improve readability.
27902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27903      # Now convert it back to Unix-stile (cygpath)
27904      input_path=`$CYGPATH -u "$shortmode_path"`
27905      new_path="$input_path"
27906    fi
27907  fi
27908
27909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27910  if test "x$test_cygdrive_prefix" = x; then
27911    # As a simple fix, exclude /usr/bin since it's not a real path.
27912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27914      # a path prefixed by /cygdrive for fixpath to work.
27915      new_path="$CYGWIN_ROOT_PATH$input_path"
27916    fi
27917  fi
27918
27919  # remove trailing .exe if any
27920  new_path="${new_path/%.exe/}"
27921
27922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27923
27924  # First separate the path from the arguments. This will split at the first
27925  # space.
27926  complete="$CC"
27927  path="${complete%% *}"
27928  tmp="$complete EOL"
27929  arguments="${tmp#* }"
27930
27931  # Input might be given as Windows format, start by converting to
27932  # unix format.
27933  new_path="$path"
27934
27935  windows_path="$new_path"
27936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27937    unix_path=`$CYGPATH -u "$windows_path"`
27938    new_path="$unix_path"
27939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27941    new_path="$unix_path"
27942  fi
27943
27944
27945  # Now try to locate executable using which
27946  new_path=`$WHICH "$new_path" 2> /dev/null`
27947
27948  if test "x$new_path" = x; then
27949    # Oops. Which didn't find the executable.
27950    # The splitting of arguments from the executable at a space might have been incorrect,
27951    # since paths with space are more likely in Windows. Give it another try with the whole
27952    # argument.
27953    path="$complete"
27954    arguments="EOL"
27955    new_path="$path"
27956
27957  windows_path="$new_path"
27958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27959    unix_path=`$CYGPATH -u "$windows_path"`
27960    new_path="$unix_path"
27961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27963    new_path="$unix_path"
27964  fi
27965
27966
27967    new_path=`$WHICH "$new_path" 2> /dev/null`
27968
27969    if test "x$new_path" = x; then
27970      # It's still not found. Now this is an unrecoverable error.
27971      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27972$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27973      has_space=`$ECHO "$complete" | $GREP " "`
27974      if test "x$has_space" != x; then
27975        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27976$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27977      fi
27978      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27979    fi
27980  fi
27981
27982  # Now new_path has a complete unix path to the binary
27983  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27984    # Keep paths in /bin as-is, but remove trailing .exe if any
27985    new_path="${new_path/%.exe/}"
27986    # Do not save /bin paths to all_fixpath_prefixes!
27987  else
27988    # Not in mixed or Windows style, start by that.
27989    new_path=`cmd //c echo $new_path`
27990
27991  input_path="$new_path"
27992  # Check if we need to convert this using DOS-style short mode. If the path
27993  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27994  # take no chances and rewrite it.
27995  # Note: m4 eats our [], so we need to use [ and ] instead.
27996  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27997  if test "x$has_forbidden_chars" != x; then
27998    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27999    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28000  fi
28001
28002    # Output is in $new_path
28003
28004  windows_path="$new_path"
28005  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28006    unix_path=`$CYGPATH -u "$windows_path"`
28007    new_path="$unix_path"
28008  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28009    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28010    new_path="$unix_path"
28011  fi
28012
28013    # remove trailing .exe if any
28014    new_path="${new_path/%.exe/}"
28015
28016    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28017    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28018  fi
28019
28020  else
28021    # We're on a posix platform. Hooray! :)
28022    # First separate the path from the arguments. This will split at the first
28023    # space.
28024    complete="$CC"
28025    path="${complete%% *}"
28026    tmp="$complete EOL"
28027    arguments="${tmp#* }"
28028
28029    # Cannot rely on the command "which" here since it doesn't always work.
28030    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28031    if test -z "$is_absolute_path"; then
28032      # Path to executable is not absolute. Find it.
28033      IFS_save="$IFS"
28034      IFS=:
28035      for p in $PATH; do
28036        if test -f "$p/$path" && test -x "$p/$path"; then
28037          new_path="$p/$path"
28038          break
28039        fi
28040      done
28041      IFS="$IFS_save"
28042    else
28043      # This is an absolute path, we can use it without further modifications.
28044      new_path="$path"
28045    fi
28046
28047    if test "x$new_path" = x; then
28048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28049$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28050      has_space=`$ECHO "$complete" | $GREP " "`
28051      if test "x$has_space" != x; then
28052        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28053$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28054      fi
28055      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28056    fi
28057  fi
28058
28059  # Now join together the path and the arguments once again
28060  if test "x$arguments" != xEOL; then
28061    new_complete="$new_path ${arguments% *}"
28062  else
28063    new_complete="$new_path"
28064  fi
28065
28066  if test "x$complete" != "x$new_complete"; then
28067    CC="$new_complete"
28068    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28069$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28070  fi
28071
28072  TEST_COMPILER="$CC"
28073  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28074  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28075  if test "x$OPENJDK_BUILD_OS" != xaix; then
28076    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28077    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28078$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28079
28080  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28081    # Follow a chain of symbolic links. Use readlink
28082    # where it exists, else fall back to horribly
28083    # complicated shell code.
28084    if test "x$READLINK_TESTED" != yes; then
28085      # On MacOSX there is a readlink tool with a different
28086      # purpose than the GNU readlink tool. Check the found readlink.
28087      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28088      if test "x$ISGNU" = x; then
28089        # A readlink that we do not know how to use.
28090        # Are there other non-GNU readlinks out there?
28091        READLINK_TESTED=yes
28092        READLINK=
28093      fi
28094    fi
28095
28096    if test "x$READLINK" != x; then
28097      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28098    else
28099      # Save the current directory for restoring afterwards
28100      STARTDIR=$PWD
28101      COUNTER=0
28102      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28103      sym_link_file=`$BASENAME $TEST_COMPILER`
28104      cd $sym_link_dir
28105      # Use -P flag to resolve symlinks in directories.
28106      cd `$THEPWDCMD -P`
28107      sym_link_dir=`$THEPWDCMD -P`
28108      # Resolve file symlinks
28109      while test $COUNTER -lt 20; do
28110        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28111        if test "x$ISLINK" == x; then
28112          # This is not a symbolic link! We are done!
28113          break
28114        fi
28115        # Again resolve directory symlinks since the target of the just found
28116        # link could be in a different directory
28117        cd `$DIRNAME $ISLINK`
28118        sym_link_dir=`$THEPWDCMD -P`
28119        sym_link_file=`$BASENAME $ISLINK`
28120        let COUNTER=COUNTER+1
28121      done
28122      cd $STARTDIR
28123      TEST_COMPILER=$sym_link_dir/$sym_link_file
28124    fi
28125  fi
28126
28127    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28128$as_echo "$TEST_COMPILER" >&6; }
28129  fi
28130  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28131$as_echo_n "checking if CC is disguised ccache... " >&6; }
28132
28133  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28134  if test "x$COMPILER_BASENAME" = "xccache"; then
28135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28136$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28137    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28138    # We want to control ccache invocation ourselves, so ignore this cc and try
28139    # searching again.
28140
28141    # Remove the path to the fake ccache cc from the PATH
28142    RETRY_COMPILER_SAVED_PATH="$PATH"
28143    COMPILER_DIRNAME=`$DIRNAME $CC`
28144    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28145
28146    # Try again looking for our compiler
28147    if test -n "$ac_tool_prefix"; then
28148  for ac_prog in $TOOLCHAIN_CC_BINARY
28149  do
28150    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28151set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28152{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28153$as_echo_n "checking for $ac_word... " >&6; }
28154if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28155  $as_echo_n "(cached) " >&6
28156else
28157  if test -n "$PROPER_COMPILER_CC"; then
28158  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28159else
28160as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28161for as_dir in $PATH
28162do
28163  IFS=$as_save_IFS
28164  test -z "$as_dir" && as_dir=.
28165    for ac_exec_ext in '' $ac_executable_extensions; do
28166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28167    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28169    break 2
28170  fi
28171done
28172  done
28173IFS=$as_save_IFS
28174
28175fi
28176fi
28177PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28178if test -n "$PROPER_COMPILER_CC"; then
28179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28180$as_echo "$PROPER_COMPILER_CC" >&6; }
28181else
28182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28183$as_echo "no" >&6; }
28184fi
28185
28186
28187    test -n "$PROPER_COMPILER_CC" && break
28188  done
28189fi
28190if test -z "$PROPER_COMPILER_CC"; then
28191  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28192  for ac_prog in $TOOLCHAIN_CC_BINARY
28193do
28194  # Extract the first word of "$ac_prog", so it can be a program name with args.
28195set dummy $ac_prog; ac_word=$2
28196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28197$as_echo_n "checking for $ac_word... " >&6; }
28198if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28199  $as_echo_n "(cached) " >&6
28200else
28201  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28202  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28203else
28204as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28205for as_dir in $PATH
28206do
28207  IFS=$as_save_IFS
28208  test -z "$as_dir" && as_dir=.
28209    for ac_exec_ext in '' $ac_executable_extensions; do
28210  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28211    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28212    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28213    break 2
28214  fi
28215done
28216  done
28217IFS=$as_save_IFS
28218
28219fi
28220fi
28221ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28222if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28224$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28225else
28226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28227$as_echo "no" >&6; }
28228fi
28229
28230
28231  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28232done
28233
28234  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28235    PROPER_COMPILER_CC=""
28236  else
28237    case $cross_compiling:$ac_tool_warned in
28238yes:)
28239{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28240$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28241ac_tool_warned=yes ;;
28242esac
28243    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28244  fi
28245fi
28246
28247
28248  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28249
28250  # First separate the path from the arguments. This will split at the first
28251  # space.
28252  complete="$PROPER_COMPILER_CC"
28253  path="${complete%% *}"
28254  tmp="$complete EOL"
28255  arguments="${tmp#* }"
28256
28257  # Input might be given as Windows format, start by converting to
28258  # unix format.
28259  new_path=`$CYGPATH -u "$path"`
28260
28261  # Now try to locate executable using which
28262  new_path=`$WHICH "$new_path" 2> /dev/null`
28263  # bat and cmd files are not always considered executable in cygwin causing which
28264  # to not find them
28265  if test "x$new_path" = x \
28266      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28267      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28268    new_path=`$CYGPATH -u "$path"`
28269  fi
28270  if test "x$new_path" = x; then
28271    # Oops. Which didn't find the executable.
28272    # The splitting of arguments from the executable at a space might have been incorrect,
28273    # since paths with space are more likely in Windows. Give it another try with the whole
28274    # argument.
28275    path="$complete"
28276    arguments="EOL"
28277    new_path=`$CYGPATH -u "$path"`
28278    new_path=`$WHICH "$new_path" 2> /dev/null`
28279    # bat and cmd files are not always considered executable in cygwin causing which
28280    # to not find them
28281    if test "x$new_path" = x \
28282        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28283        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28284      new_path=`$CYGPATH -u "$path"`
28285    fi
28286    if test "x$new_path" = x; then
28287      # It's still not found. Now this is an unrecoverable error.
28288      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28289$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28290      has_space=`$ECHO "$complete" | $GREP " "`
28291      if test "x$has_space" != x; then
28292        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28293$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28294      fi
28295      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28296    fi
28297  fi
28298
28299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28302  # "foo.exe" is OK but "foo" is an error.
28303  #
28304  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28305  # It is also a way to make sure we got the proper file name for the real test later on.
28306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28307  if test "x$test_shortpath" = x; then
28308    # Short path failed, file does not exist as specified.
28309    # Try adding .exe or .cmd
28310    if test -f "${new_path}.exe"; then
28311      input_to_shortpath="${new_path}.exe"
28312    elif test -f "${new_path}.cmd"; then
28313      input_to_shortpath="${new_path}.cmd"
28314    else
28315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28316$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28317      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28318$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28319      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28320    fi
28321  else
28322    input_to_shortpath="$new_path"
28323  fi
28324
28325  # Call helper function which possibly converts this using DOS-style short mode.
28326  # If so, the updated path is stored in $new_path.
28327  new_path="$input_to_shortpath"
28328
28329  input_path="$input_to_shortpath"
28330  # Check if we need to convert this using DOS-style short mode. If the path
28331  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28332  # take no chances and rewrite it.
28333  # Note: m4 eats our [], so we need to use [ and ] instead.
28334  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28335  if test "x$has_forbidden_chars" != x; then
28336    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28337    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28338    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28339    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28340      # Going to short mode and back again did indeed matter. Since short mode is
28341      # case insensitive, let's make it lowercase to improve readability.
28342      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28343      # Now convert it back to Unix-stile (cygpath)
28344      input_path=`$CYGPATH -u "$shortmode_path"`
28345      new_path="$input_path"
28346    fi
28347  fi
28348
28349  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28350  if test "x$test_cygdrive_prefix" = x; then
28351    # As a simple fix, exclude /usr/bin since it's not a real path.
28352    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28353      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28354      # a path prefixed by /cygdrive for fixpath to work.
28355      new_path="$CYGWIN_ROOT_PATH$input_path"
28356    fi
28357  fi
28358
28359  # remove trailing .exe if any
28360  new_path="${new_path/%.exe/}"
28361
28362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28363
28364  # First separate the path from the arguments. This will split at the first
28365  # space.
28366  complete="$PROPER_COMPILER_CC"
28367  path="${complete%% *}"
28368  tmp="$complete EOL"
28369  arguments="${tmp#* }"
28370
28371  # Input might be given as Windows format, start by converting to
28372  # unix format.
28373  new_path="$path"
28374
28375  windows_path="$new_path"
28376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28377    unix_path=`$CYGPATH -u "$windows_path"`
28378    new_path="$unix_path"
28379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28381    new_path="$unix_path"
28382  fi
28383
28384
28385  # Now try to locate executable using which
28386  new_path=`$WHICH "$new_path" 2> /dev/null`
28387
28388  if test "x$new_path" = x; then
28389    # Oops. Which didn't find the executable.
28390    # The splitting of arguments from the executable at a space might have been incorrect,
28391    # since paths with space are more likely in Windows. Give it another try with the whole
28392    # argument.
28393    path="$complete"
28394    arguments="EOL"
28395    new_path="$path"
28396
28397  windows_path="$new_path"
28398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28399    unix_path=`$CYGPATH -u "$windows_path"`
28400    new_path="$unix_path"
28401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28403    new_path="$unix_path"
28404  fi
28405
28406
28407    new_path=`$WHICH "$new_path" 2> /dev/null`
28408
28409    if test "x$new_path" = x; then
28410      # It's still not found. Now this is an unrecoverable error.
28411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28412$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28413      has_space=`$ECHO "$complete" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28417      fi
28418      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28419    fi
28420  fi
28421
28422  # Now new_path has a complete unix path to the binary
28423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28424    # Keep paths in /bin as-is, but remove trailing .exe if any
28425    new_path="${new_path/%.exe/}"
28426    # Do not save /bin paths to all_fixpath_prefixes!
28427  else
28428    # Not in mixed or Windows style, start by that.
28429    new_path=`cmd //c echo $new_path`
28430
28431  input_path="$new_path"
28432  # Check if we need to convert this using DOS-style short mode. If the path
28433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28434  # take no chances and rewrite it.
28435  # Note: m4 eats our [], so we need to use [ and ] instead.
28436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28437  if test "x$has_forbidden_chars" != x; then
28438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28440  fi
28441
28442    # Output is in $new_path
28443
28444  windows_path="$new_path"
28445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28446    unix_path=`$CYGPATH -u "$windows_path"`
28447    new_path="$unix_path"
28448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28450    new_path="$unix_path"
28451  fi
28452
28453    # remove trailing .exe if any
28454    new_path="${new_path/%.exe/}"
28455
28456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28458  fi
28459
28460  else
28461    # We're on a posix platform. Hooray! :)
28462    # First separate the path from the arguments. This will split at the first
28463    # space.
28464    complete="$PROPER_COMPILER_CC"
28465    path="${complete%% *}"
28466    tmp="$complete EOL"
28467    arguments="${tmp#* }"
28468
28469    # Cannot rely on the command "which" here since it doesn't always work.
28470    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28471    if test -z "$is_absolute_path"; then
28472      # Path to executable is not absolute. Find it.
28473      IFS_save="$IFS"
28474      IFS=:
28475      for p in $PATH; do
28476        if test -f "$p/$path" && test -x "$p/$path"; then
28477          new_path="$p/$path"
28478          break
28479        fi
28480      done
28481      IFS="$IFS_save"
28482    else
28483      # This is an absolute path, we can use it without further modifications.
28484      new_path="$path"
28485    fi
28486
28487    if test "x$new_path" = x; then
28488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28489$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28490      has_space=`$ECHO "$complete" | $GREP " "`
28491      if test "x$has_space" != x; then
28492        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28494      fi
28495      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28496    fi
28497  fi
28498
28499  # Now join together the path and the arguments once again
28500  if test "x$arguments" != xEOL; then
28501    new_complete="$new_path ${arguments% *}"
28502  else
28503    new_complete="$new_path"
28504  fi
28505
28506  if test "x$complete" != "x$new_complete"; then
28507    PROPER_COMPILER_CC="$new_complete"
28508    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28509$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28510  fi
28511
28512    PATH="$RETRY_COMPILER_SAVED_PATH"
28513
28514    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28515$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28516
28517  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28518    # Follow a chain of symbolic links. Use readlink
28519    # where it exists, else fall back to horribly
28520    # complicated shell code.
28521    if test "x$READLINK_TESTED" != yes; then
28522      # On MacOSX there is a readlink tool with a different
28523      # purpose than the GNU readlink tool. Check the found readlink.
28524      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28525      if test "x$ISGNU" = x; then
28526        # A readlink that we do not know how to use.
28527        # Are there other non-GNU readlinks out there?
28528        READLINK_TESTED=yes
28529        READLINK=
28530      fi
28531    fi
28532
28533    if test "x$READLINK" != x; then
28534      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28535    else
28536      # Save the current directory for restoring afterwards
28537      STARTDIR=$PWD
28538      COUNTER=0
28539      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28540      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28541      cd $sym_link_dir
28542      # Use -P flag to resolve symlinks in directories.
28543      cd `$THEPWDCMD -P`
28544      sym_link_dir=`$THEPWDCMD -P`
28545      # Resolve file symlinks
28546      while test $COUNTER -lt 20; do
28547        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28548        if test "x$ISLINK" == x; then
28549          # This is not a symbolic link! We are done!
28550          break
28551        fi
28552        # Again resolve directory symlinks since the target of the just found
28553        # link could be in a different directory
28554        cd `$DIRNAME $ISLINK`
28555        sym_link_dir=`$THEPWDCMD -P`
28556        sym_link_file=`$BASENAME $ISLINK`
28557        let COUNTER=COUNTER+1
28558      done
28559      cd $STARTDIR
28560      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28561    fi
28562  fi
28563
28564    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28565$as_echo "$PROPER_COMPILER_CC" >&6; }
28566    CC="$PROPER_COMPILER_CC"
28567  else
28568    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28569$as_echo "no, keeping CC" >&6; }
28570  fi
28571
28572
28573  COMPILER=$CC
28574  COMPILER_NAME=$COMPILER_NAME
28575
28576  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28577    # cc -V output typically looks like
28578    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28579    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28580    # Check that this is likely to be the Solaris Studio cc.
28581    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28582    if test $? -ne 0; then
28583      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28584      { $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
28585$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28586      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28587$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28588      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28589$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28590      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28591    fi
28592    # Remove usage instructions (if present), and
28593    # collapse compiler output into a single line
28594    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28595        $SED -e 's/ *[Uu]sage:.*//'`
28596    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28597        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28598  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28599    # xlc -qversion output typically looks like
28600    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28601    #     Version: 11.01.0000.0015
28602    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28603    # Check that this is likely to be the IBM XL C compiler.
28604    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28605    if test $? -ne 0; then
28606      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28607      { $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
28608$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28609      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28610$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28611      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28612$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28613      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28614    fi
28615    # Collapse compiler output into a single line
28616    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28617    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28618        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28619  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28620    # There is no specific version flag, but all output starts with a version string.
28621    # First line typically looks something like:
28622    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28623    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28624    # Check that this is likely to be Microsoft CL.EXE.
28625    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28626    if test $? -ne 0; then
28627      { $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
28628$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28629      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28630$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28631      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28632    fi
28633    # Collapse compiler output into a single line
28634    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28636        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28637  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28638    # gcc --version output typically looks like
28639    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28640    #     Copyright (C) 2013 Free Software Foundation, Inc.
28641    #     This is free software; see the source for copying conditions.  There is NO
28642    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28643    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28644    # Check that this is likely to be GCC.
28645    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28646    if test $? -ne 0; then
28647      { $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
28648$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28649      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28650$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28651      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28652    fi
28653    # Remove Copyright and legalese from version string, and
28654    # collapse into a single line
28655    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28656        $SED -e 's/ *Copyright .*//'`
28657    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28658        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28659  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28660    # clang --version output typically looks like
28661    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28662    #    clang version 3.3 (tags/RELEASE_33/final)
28663    # or
28664    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28665    #    Target: x86_64-pc-linux-gnu
28666    #    Thread model: posix
28667    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28668    # Check that this is likely to be clang
28669    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28670    if test $? -ne 0; then
28671      { $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
28672$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28673      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28674$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28675      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28676    fi
28677    # Collapse compiler output into a single line
28678    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28679    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28680        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28681  else
28682      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28683  fi
28684  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28685  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28686  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28687  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28688
28689  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28690$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28691
28692
28693  # Now that we have resolved CC ourself, let autoconf have its go at it
28694  ac_ext=c
28695ac_cpp='$CPP $CPPFLAGS'
28696ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28697ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28698ac_compiler_gnu=$ac_cv_c_compiler_gnu
28699if test -n "$ac_tool_prefix"; then
28700  for ac_prog in $CC
28701  do
28702    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28703set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28705$as_echo_n "checking for $ac_word... " >&6; }
28706if ${ac_cv_prog_CC+:} false; then :
28707  $as_echo_n "(cached) " >&6
28708else
28709  if test -n "$CC"; then
28710  ac_cv_prog_CC="$CC" # Let the user override the test.
28711else
28712as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28713for as_dir in $PATH
28714do
28715  IFS=$as_save_IFS
28716  test -z "$as_dir" && as_dir=.
28717    for ac_exec_ext in '' $ac_executable_extensions; do
28718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28719    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28721    break 2
28722  fi
28723done
28724  done
28725IFS=$as_save_IFS
28726
28727fi
28728fi
28729CC=$ac_cv_prog_CC
28730if test -n "$CC"; then
28731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28732$as_echo "$CC" >&6; }
28733else
28734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28735$as_echo "no" >&6; }
28736fi
28737
28738
28739    test -n "$CC" && break
28740  done
28741fi
28742if test -z "$CC"; then
28743  ac_ct_CC=$CC
28744  for ac_prog in $CC
28745do
28746  # Extract the first word of "$ac_prog", so it can be a program name with args.
28747set dummy $ac_prog; ac_word=$2
28748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28749$as_echo_n "checking for $ac_word... " >&6; }
28750if ${ac_cv_prog_ac_ct_CC+:} false; then :
28751  $as_echo_n "(cached) " >&6
28752else
28753  if test -n "$ac_ct_CC"; then
28754  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28755else
28756as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28757for as_dir in $PATH
28758do
28759  IFS=$as_save_IFS
28760  test -z "$as_dir" && as_dir=.
28761    for ac_exec_ext in '' $ac_executable_extensions; do
28762  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28763    ac_cv_prog_ac_ct_CC="$ac_prog"
28764    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28765    break 2
28766  fi
28767done
28768  done
28769IFS=$as_save_IFS
28770
28771fi
28772fi
28773ac_ct_CC=$ac_cv_prog_ac_ct_CC
28774if test -n "$ac_ct_CC"; then
28775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28776$as_echo "$ac_ct_CC" >&6; }
28777else
28778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28779$as_echo "no" >&6; }
28780fi
28781
28782
28783  test -n "$ac_ct_CC" && break
28784done
28785
28786  if test "x$ac_ct_CC" = x; then
28787    CC=""
28788  else
28789    case $cross_compiling:$ac_tool_warned in
28790yes:)
28791{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28792$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28793ac_tool_warned=yes ;;
28794esac
28795    CC=$ac_ct_CC
28796  fi
28797fi
28798
28799
28800test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28801$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28802as_fn_error $? "no acceptable C compiler found in \$PATH
28803See \`config.log' for more details" "$LINENO" 5; }
28804
28805# Provide some information about the compiler.
28806$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28807set X $ac_compile
28808ac_compiler=$2
28809for ac_option in --version -v -V -qversion; do
28810  { { ac_try="$ac_compiler $ac_option >&5"
28811case "(($ac_try" in
28812  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28813  *) ac_try_echo=$ac_try;;
28814esac
28815eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28816$as_echo "$ac_try_echo"; } >&5
28817  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28818  ac_status=$?
28819  if test -s conftest.err; then
28820    sed '10a\
28821... rest of stderr output deleted ...
28822         10q' conftest.err >conftest.er1
28823    cat conftest.er1 >&5
28824  fi
28825  rm -f conftest.er1 conftest.err
28826  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28827  test $ac_status = 0; }
28828done
28829
28830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28831/* end confdefs.h.  */
28832
28833int
28834main ()
28835{
28836
28837  ;
28838  return 0;
28839}
28840_ACEOF
28841ac_clean_files_save=$ac_clean_files
28842ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28843# Try to create an executable without -o first, disregard a.out.
28844# It will help us diagnose broken compilers, and finding out an intuition
28845# of exeext.
28846{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28847$as_echo_n "checking whether the C compiler works... " >&6; }
28848ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28849
28850# The possible output files:
28851ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28852
28853ac_rmfiles=
28854for ac_file in $ac_files
28855do
28856  case $ac_file in
28857    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28858    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28859  esac
28860done
28861rm -f $ac_rmfiles
28862
28863if { { ac_try="$ac_link_default"
28864case "(($ac_try" in
28865  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28866  *) ac_try_echo=$ac_try;;
28867esac
28868eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28869$as_echo "$ac_try_echo"; } >&5
28870  (eval "$ac_link_default") 2>&5
28871  ac_status=$?
28872  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28873  test $ac_status = 0; }; then :
28874  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
28875# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
28876# in a Makefile.  We should not override ac_cv_exeext if it was cached,
28877# so that the user can short-circuit this test for compilers unknown to
28878# Autoconf.
28879for ac_file in $ac_files ''
28880do
28881  test -f "$ac_file" || continue
28882  case $ac_file in
28883    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
28884	;;
28885    [ab].out )
28886	# We found the default executable, but exeext='' is most
28887	# certainly right.
28888	break;;
28889    *.* )
28890	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
28891	then :; else
28892	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28893	fi
28894	# We set ac_cv_exeext here because the later test for it is not
28895	# safe: cross compilers may not add the suffix if given an `-o'
28896	# argument, so we may need to know it at that point already.
28897	# Even if this section looks crufty: it has the advantage of
28898	# actually working.
28899	break;;
28900    * )
28901	break;;
28902  esac
28903done
28904test "$ac_cv_exeext" = no && ac_cv_exeext=
28905
28906else
28907  ac_file=''
28908fi
28909if test -z "$ac_file"; then :
28910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28911$as_echo "no" >&6; }
28912$as_echo "$as_me: failed program was:" >&5
28913sed 's/^/| /' conftest.$ac_ext >&5
28914
28915{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28916$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28917as_fn_error 77 "C compiler cannot create executables
28918See \`config.log' for more details" "$LINENO" 5; }
28919else
28920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28921$as_echo "yes" >&6; }
28922fi
28923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
28924$as_echo_n "checking for C compiler default output file name... " >&6; }
28925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
28926$as_echo "$ac_file" >&6; }
28927ac_exeext=$ac_cv_exeext
28928
28929rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
28930ac_clean_files=$ac_clean_files_save
28931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
28932$as_echo_n "checking for suffix of executables... " >&6; }
28933if { { ac_try="$ac_link"
28934case "(($ac_try" in
28935  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28936  *) ac_try_echo=$ac_try;;
28937esac
28938eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28939$as_echo "$ac_try_echo"; } >&5
28940  (eval "$ac_link") 2>&5
28941  ac_status=$?
28942  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28943  test $ac_status = 0; }; then :
28944  # If both `conftest.exe' and `conftest' are `present' (well, observable)
28945# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
28946# work properly (i.e., refer to `conftest.exe'), while it won't with
28947# `rm'.
28948for ac_file in conftest.exe conftest conftest.*; do
28949  test -f "$ac_file" || continue
28950  case $ac_file in
28951    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28952    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
28953	  break;;
28954    * ) break;;
28955  esac
28956done
28957else
28958  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28959$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28960as_fn_error $? "cannot compute suffix of executables: cannot compile and link
28961See \`config.log' for more details" "$LINENO" 5; }
28962fi
28963rm -f conftest conftest$ac_cv_exeext
28964{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
28965$as_echo "$ac_cv_exeext" >&6; }
28966
28967rm -f conftest.$ac_ext
28968EXEEXT=$ac_cv_exeext
28969ac_exeext=$EXEEXT
28970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28971/* end confdefs.h.  */
28972#include <stdio.h>
28973int
28974main ()
28975{
28976FILE *f = fopen ("conftest.out", "w");
28977 return ferror (f) || fclose (f) != 0;
28978
28979  ;
28980  return 0;
28981}
28982_ACEOF
28983ac_clean_files="$ac_clean_files conftest.out"
28984# Check that the compiler produces executables we can run.  If not, either
28985# the compiler is broken, or we cross compile.
28986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
28987$as_echo_n "checking whether we are cross compiling... " >&6; }
28988if test "$cross_compiling" != yes; then
28989  { { ac_try="$ac_link"
28990case "(($ac_try" in
28991  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28992  *) ac_try_echo=$ac_try;;
28993esac
28994eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28995$as_echo "$ac_try_echo"; } >&5
28996  (eval "$ac_link") 2>&5
28997  ac_status=$?
28998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28999  test $ac_status = 0; }
29000  if { ac_try='./conftest$ac_cv_exeext'
29001  { { case "(($ac_try" in
29002  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29003  *) ac_try_echo=$ac_try;;
29004esac
29005eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29006$as_echo "$ac_try_echo"; } >&5
29007  (eval "$ac_try") 2>&5
29008  ac_status=$?
29009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29010  test $ac_status = 0; }; }; then
29011    cross_compiling=no
29012  else
29013    if test "$cross_compiling" = maybe; then
29014	cross_compiling=yes
29015    else
29016	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29017$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29018as_fn_error $? "cannot run C compiled programs.
29019If you meant to cross compile, use \`--host'.
29020See \`config.log' for more details" "$LINENO" 5; }
29021    fi
29022  fi
29023fi
29024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29025$as_echo "$cross_compiling" >&6; }
29026
29027rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29028ac_clean_files=$ac_clean_files_save
29029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29030$as_echo_n "checking for suffix of object files... " >&6; }
29031if ${ac_cv_objext+:} false; then :
29032  $as_echo_n "(cached) " >&6
29033else
29034  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29035/* end confdefs.h.  */
29036
29037int
29038main ()
29039{
29040
29041  ;
29042  return 0;
29043}
29044_ACEOF
29045rm -f conftest.o conftest.obj
29046if { { ac_try="$ac_compile"
29047case "(($ac_try" in
29048  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29049  *) ac_try_echo=$ac_try;;
29050esac
29051eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29052$as_echo "$ac_try_echo"; } >&5
29053  (eval "$ac_compile") 2>&5
29054  ac_status=$?
29055  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29056  test $ac_status = 0; }; then :
29057  for ac_file in conftest.o conftest.obj conftest.*; do
29058  test -f "$ac_file" || continue;
29059  case $ac_file in
29060    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29061    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29062       break;;
29063  esac
29064done
29065else
29066  $as_echo "$as_me: failed program was:" >&5
29067sed 's/^/| /' conftest.$ac_ext >&5
29068
29069{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29070$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29071as_fn_error $? "cannot compute suffix of object files: cannot compile
29072See \`config.log' for more details" "$LINENO" 5; }
29073fi
29074rm -f conftest.$ac_cv_objext conftest.$ac_ext
29075fi
29076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29077$as_echo "$ac_cv_objext" >&6; }
29078OBJEXT=$ac_cv_objext
29079ac_objext=$OBJEXT
29080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29081$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29082if ${ac_cv_c_compiler_gnu+:} false; then :
29083  $as_echo_n "(cached) " >&6
29084else
29085  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29086/* end confdefs.h.  */
29087
29088int
29089main ()
29090{
29091#ifndef __GNUC__
29092       choke me
29093#endif
29094
29095  ;
29096  return 0;
29097}
29098_ACEOF
29099if ac_fn_c_try_compile "$LINENO"; then :
29100  ac_compiler_gnu=yes
29101else
29102  ac_compiler_gnu=no
29103fi
29104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29105ac_cv_c_compiler_gnu=$ac_compiler_gnu
29106
29107fi
29108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29109$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29110if test $ac_compiler_gnu = yes; then
29111  GCC=yes
29112else
29113  GCC=
29114fi
29115ac_test_CFLAGS=${CFLAGS+set}
29116ac_save_CFLAGS=$CFLAGS
29117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29118$as_echo_n "checking whether $CC accepts -g... " >&6; }
29119if ${ac_cv_prog_cc_g+:} false; then :
29120  $as_echo_n "(cached) " >&6
29121else
29122  ac_save_c_werror_flag=$ac_c_werror_flag
29123   ac_c_werror_flag=yes
29124   ac_cv_prog_cc_g=no
29125   CFLAGS="-g"
29126   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29127/* end confdefs.h.  */
29128
29129int
29130main ()
29131{
29132
29133  ;
29134  return 0;
29135}
29136_ACEOF
29137if ac_fn_c_try_compile "$LINENO"; then :
29138  ac_cv_prog_cc_g=yes
29139else
29140  CFLAGS=""
29141      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29142/* end confdefs.h.  */
29143
29144int
29145main ()
29146{
29147
29148  ;
29149  return 0;
29150}
29151_ACEOF
29152if ac_fn_c_try_compile "$LINENO"; then :
29153
29154else
29155  ac_c_werror_flag=$ac_save_c_werror_flag
29156	 CFLAGS="-g"
29157	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29158/* end confdefs.h.  */
29159
29160int
29161main ()
29162{
29163
29164  ;
29165  return 0;
29166}
29167_ACEOF
29168if ac_fn_c_try_compile "$LINENO"; then :
29169  ac_cv_prog_cc_g=yes
29170fi
29171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29172fi
29173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29174fi
29175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29176   ac_c_werror_flag=$ac_save_c_werror_flag
29177fi
29178{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29179$as_echo "$ac_cv_prog_cc_g" >&6; }
29180if test "$ac_test_CFLAGS" = set; then
29181  CFLAGS=$ac_save_CFLAGS
29182elif test $ac_cv_prog_cc_g = yes; then
29183  if test "$GCC" = yes; then
29184    CFLAGS="-g -O2"
29185  else
29186    CFLAGS="-g"
29187  fi
29188else
29189  if test "$GCC" = yes; then
29190    CFLAGS="-O2"
29191  else
29192    CFLAGS=
29193  fi
29194fi
29195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29196$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29197if ${ac_cv_prog_cc_c89+:} false; then :
29198  $as_echo_n "(cached) " >&6
29199else
29200  ac_cv_prog_cc_c89=no
29201ac_save_CC=$CC
29202cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29203/* end confdefs.h.  */
29204#include <stdarg.h>
29205#include <stdio.h>
29206struct stat;
29207/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29208struct buf { int x; };
29209FILE * (*rcsopen) (struct buf *, struct stat *, int);
29210static char *e (p, i)
29211     char **p;
29212     int i;
29213{
29214  return p[i];
29215}
29216static char *f (char * (*g) (char **, int), char **p, ...)
29217{
29218  char *s;
29219  va_list v;
29220  va_start (v,p);
29221  s = g (p, va_arg (v,int));
29222  va_end (v);
29223  return s;
29224}
29225
29226/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29227   function prototypes and stuff, but not '\xHH' hex character constants.
29228   These don't provoke an error unfortunately, instead are silently treated
29229   as 'x'.  The following induces an error, until -std is added to get
29230   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29231   array size at least.  It's necessary to write '\x00'==0 to get something
29232   that's true only with -std.  */
29233int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29234
29235/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29236   inside strings and character constants.  */
29237#define FOO(x) 'x'
29238int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29239
29240int test (int i, double x);
29241struct s1 {int (*f) (int a);};
29242struct s2 {int (*f) (double a);};
29243int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29244int argc;
29245char **argv;
29246int
29247main ()
29248{
29249return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29250  ;
29251  return 0;
29252}
29253_ACEOF
29254for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29255	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29256do
29257  CC="$ac_save_CC $ac_arg"
29258  if ac_fn_c_try_compile "$LINENO"; then :
29259  ac_cv_prog_cc_c89=$ac_arg
29260fi
29261rm -f core conftest.err conftest.$ac_objext
29262  test "x$ac_cv_prog_cc_c89" != "xno" && break
29263done
29264rm -f conftest.$ac_ext
29265CC=$ac_save_CC
29266
29267fi
29268# AC_CACHE_VAL
29269case "x$ac_cv_prog_cc_c89" in
29270  x)
29271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29272$as_echo "none needed" >&6; } ;;
29273  xno)
29274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29275$as_echo "unsupported" >&6; } ;;
29276  *)
29277    CC="$CC $ac_cv_prog_cc_c89"
29278    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29279$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29280esac
29281if test "x$ac_cv_prog_cc_c89" != xno; then :
29282
29283fi
29284
29285ac_ext=cpp
29286ac_cpp='$CXXCPP $CPPFLAGS'
29287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29290
29291
29292
29293  COMPILER_NAME=C++
29294  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29295
29296  if test "x$CXX" != x; then
29297    # User has supplied compiler name already, always let that override.
29298    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29299$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29300    if test "x`basename $CXX`" = "x$CXX"; then
29301      # A command without a complete path is provided, search $PATH.
29302
29303      for ac_prog in $CXX
29304do
29305  # Extract the first word of "$ac_prog", so it can be a program name with args.
29306set dummy $ac_prog; ac_word=$2
29307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29308$as_echo_n "checking for $ac_word... " >&6; }
29309if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29310  $as_echo_n "(cached) " >&6
29311else
29312  case $POTENTIAL_CXX in
29313  [\\/]* | ?:[\\/]*)
29314  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29315  ;;
29316  *)
29317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29318for as_dir in $PATH
29319do
29320  IFS=$as_save_IFS
29321  test -z "$as_dir" && as_dir=.
29322    for ac_exec_ext in '' $ac_executable_extensions; do
29323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29324    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29326    break 2
29327  fi
29328done
29329  done
29330IFS=$as_save_IFS
29331
29332  ;;
29333esac
29334fi
29335POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29336if test -n "$POTENTIAL_CXX"; then
29337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29338$as_echo "$POTENTIAL_CXX" >&6; }
29339else
29340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29341$as_echo "no" >&6; }
29342fi
29343
29344
29345  test -n "$POTENTIAL_CXX" && break
29346done
29347
29348      if test "x$POTENTIAL_CXX" != x; then
29349        CXX=$POTENTIAL_CXX
29350      else
29351        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29352      fi
29353    else
29354      # Otherwise it might already be a complete path
29355      if test ! -x "$CXX"; then
29356        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29357      fi
29358    fi
29359  else
29360    # No user supplied value. Locate compiler ourselves.
29361
29362    # If we are cross compiling, assume cross compilation tools follows the
29363    # cross compilation standard where they are prefixed with the autoconf
29364    # standard name for the target. For example the binary
29365    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29366    # If we are not cross compiling, then the default compiler name will be
29367    # used.
29368
29369    CXX=
29370    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29371    # before checking the rest of the PATH.
29372    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29373    # step, this should not be necessary.
29374    if test -n "$TOOLCHAIN_PATH"; then
29375      PATH_save="$PATH"
29376      PATH="$TOOLCHAIN_PATH"
29377      for ac_prog in $SEARCH_LIST
29378do
29379  # Extract the first word of "$ac_prog", so it can be a program name with args.
29380set dummy $ac_prog; ac_word=$2
29381{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29382$as_echo_n "checking for $ac_word... " >&6; }
29383if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29384  $as_echo_n "(cached) " >&6
29385else
29386  case $TOOLCHAIN_PATH_CXX in
29387  [\\/]* | ?:[\\/]*)
29388  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29389  ;;
29390  *)
29391  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29392for as_dir in $PATH
29393do
29394  IFS=$as_save_IFS
29395  test -z "$as_dir" && as_dir=.
29396    for ac_exec_ext in '' $ac_executable_extensions; do
29397  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29398    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29399    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29400    break 2
29401  fi
29402done
29403  done
29404IFS=$as_save_IFS
29405
29406  ;;
29407esac
29408fi
29409TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29410if test -n "$TOOLCHAIN_PATH_CXX"; then
29411  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29412$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29413else
29414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29415$as_echo "no" >&6; }
29416fi
29417
29418
29419  test -n "$TOOLCHAIN_PATH_CXX" && break
29420done
29421
29422      CXX=$TOOLCHAIN_PATH_CXX
29423      PATH="$PATH_save"
29424    fi
29425
29426    # AC_PATH_PROGS can't be run multiple times with the same variable,
29427    # so create a new name for this run.
29428    if test "x$CXX" = x; then
29429      for ac_prog in $SEARCH_LIST
29430do
29431  # Extract the first word of "$ac_prog", so it can be a program name with args.
29432set dummy $ac_prog; ac_word=$2
29433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29434$as_echo_n "checking for $ac_word... " >&6; }
29435if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29436  $as_echo_n "(cached) " >&6
29437else
29438  case $POTENTIAL_CXX in
29439  [\\/]* | ?:[\\/]*)
29440  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29441  ;;
29442  *)
29443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29444for as_dir in $PATH
29445do
29446  IFS=$as_save_IFS
29447  test -z "$as_dir" && as_dir=.
29448    for ac_exec_ext in '' $ac_executable_extensions; do
29449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29450    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29452    break 2
29453  fi
29454done
29455  done
29456IFS=$as_save_IFS
29457
29458  ;;
29459esac
29460fi
29461POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29462if test -n "$POTENTIAL_CXX"; then
29463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29464$as_echo "$POTENTIAL_CXX" >&6; }
29465else
29466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29467$as_echo "no" >&6; }
29468fi
29469
29470
29471  test -n "$POTENTIAL_CXX" && break
29472done
29473
29474      CXX=$POTENTIAL_CXX
29475    fi
29476
29477    if test "x$CXX" = x; then
29478
29479  # Print a helpful message on how to acquire the necessary build dependency.
29480  # devkit is the help tag: freetype, cups, pulse, alsa etc
29481  MISSING_DEPENDENCY=devkit
29482
29483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29484    cygwin_help $MISSING_DEPENDENCY
29485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29486    msys_help $MISSING_DEPENDENCY
29487  else
29488    PKGHANDLER_COMMAND=
29489
29490    case $PKGHANDLER in
29491      apt-get)
29492        apt_help     $MISSING_DEPENDENCY ;;
29493      yum)
29494        yum_help     $MISSING_DEPENDENCY ;;
29495      port)
29496        port_help    $MISSING_DEPENDENCY ;;
29497      pkgutil)
29498        pkgutil_help $MISSING_DEPENDENCY ;;
29499      pkgadd)
29500        pkgadd_help  $MISSING_DEPENDENCY ;;
29501    esac
29502
29503    if test "x$PKGHANDLER_COMMAND" != x; then
29504      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29505    fi
29506  fi
29507
29508      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29509    fi
29510  fi
29511
29512  # Now we have a compiler binary in CXX. Make sure it's okay.
29513
29514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29515
29516  # First separate the path from the arguments. This will split at the first
29517  # space.
29518  complete="$CXX"
29519  path="${complete%% *}"
29520  tmp="$complete EOL"
29521  arguments="${tmp#* }"
29522
29523  # Input might be given as Windows format, start by converting to
29524  # unix format.
29525  new_path=`$CYGPATH -u "$path"`
29526
29527  # Now try to locate executable using which
29528  new_path=`$WHICH "$new_path" 2> /dev/null`
29529  # bat and cmd files are not always considered executable in cygwin causing which
29530  # to not find them
29531  if test "x$new_path" = x \
29532      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29533      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29534    new_path=`$CYGPATH -u "$path"`
29535  fi
29536  if test "x$new_path" = x; then
29537    # Oops. Which didn't find the executable.
29538    # The splitting of arguments from the executable at a space might have been incorrect,
29539    # since paths with space are more likely in Windows. Give it another try with the whole
29540    # argument.
29541    path="$complete"
29542    arguments="EOL"
29543    new_path=`$CYGPATH -u "$path"`
29544    new_path=`$WHICH "$new_path" 2> /dev/null`
29545    # bat and cmd files are not always considered executable in cygwin causing which
29546    # to not find them
29547    if test "x$new_path" = x \
29548        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29549        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29550      new_path=`$CYGPATH -u "$path"`
29551    fi
29552    if test "x$new_path" = x; then
29553      # It's still not found. Now this is an unrecoverable error.
29554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29555$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29556      has_space=`$ECHO "$complete" | $GREP " "`
29557      if test "x$has_space" != x; then
29558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29560      fi
29561      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29562    fi
29563  fi
29564
29565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29568  # "foo.exe" is OK but "foo" is an error.
29569  #
29570  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29571  # It is also a way to make sure we got the proper file name for the real test later on.
29572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29573  if test "x$test_shortpath" = x; then
29574    # Short path failed, file does not exist as specified.
29575    # Try adding .exe or .cmd
29576    if test -f "${new_path}.exe"; then
29577      input_to_shortpath="${new_path}.exe"
29578    elif test -f "${new_path}.cmd"; then
29579      input_to_shortpath="${new_path}.cmd"
29580    else
29581      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29582$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29583      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29584$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29585      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29586    fi
29587  else
29588    input_to_shortpath="$new_path"
29589  fi
29590
29591  # Call helper function which possibly converts this using DOS-style short mode.
29592  # If so, the updated path is stored in $new_path.
29593  new_path="$input_to_shortpath"
29594
29595  input_path="$input_to_shortpath"
29596  # Check if we need to convert this using DOS-style short mode. If the path
29597  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29598  # take no chances and rewrite it.
29599  # Note: m4 eats our [], so we need to use [ and ] instead.
29600  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29601  if test "x$has_forbidden_chars" != x; then
29602    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29603    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29604    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29605    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29606      # Going to short mode and back again did indeed matter. Since short mode is
29607      # case insensitive, let's make it lowercase to improve readability.
29608      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29609      # Now convert it back to Unix-stile (cygpath)
29610      input_path=`$CYGPATH -u "$shortmode_path"`
29611      new_path="$input_path"
29612    fi
29613  fi
29614
29615  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29616  if test "x$test_cygdrive_prefix" = x; then
29617    # As a simple fix, exclude /usr/bin since it's not a real path.
29618    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29619      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29620      # a path prefixed by /cygdrive for fixpath to work.
29621      new_path="$CYGWIN_ROOT_PATH$input_path"
29622    fi
29623  fi
29624
29625  # remove trailing .exe if any
29626  new_path="${new_path/%.exe/}"
29627
29628  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29629
29630  # First separate the path from the arguments. This will split at the first
29631  # space.
29632  complete="$CXX"
29633  path="${complete%% *}"
29634  tmp="$complete EOL"
29635  arguments="${tmp#* }"
29636
29637  # Input might be given as Windows format, start by converting to
29638  # unix format.
29639  new_path="$path"
29640
29641  windows_path="$new_path"
29642  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29643    unix_path=`$CYGPATH -u "$windows_path"`
29644    new_path="$unix_path"
29645  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29646    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29647    new_path="$unix_path"
29648  fi
29649
29650
29651  # Now try to locate executable using which
29652  new_path=`$WHICH "$new_path" 2> /dev/null`
29653
29654  if test "x$new_path" = x; then
29655    # Oops. Which didn't find the executable.
29656    # The splitting of arguments from the executable at a space might have been incorrect,
29657    # since paths with space are more likely in Windows. Give it another try with the whole
29658    # argument.
29659    path="$complete"
29660    arguments="EOL"
29661    new_path="$path"
29662
29663  windows_path="$new_path"
29664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29665    unix_path=`$CYGPATH -u "$windows_path"`
29666    new_path="$unix_path"
29667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29669    new_path="$unix_path"
29670  fi
29671
29672
29673    new_path=`$WHICH "$new_path" 2> /dev/null`
29674
29675    if test "x$new_path" = x; then
29676      # It's still not found. Now this is an unrecoverable error.
29677      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29678$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29679      has_space=`$ECHO "$complete" | $GREP " "`
29680      if test "x$has_space" != x; then
29681        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29682$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29683      fi
29684      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29685    fi
29686  fi
29687
29688  # Now new_path has a complete unix path to the binary
29689  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29690    # Keep paths in /bin as-is, but remove trailing .exe if any
29691    new_path="${new_path/%.exe/}"
29692    # Do not save /bin paths to all_fixpath_prefixes!
29693  else
29694    # Not in mixed or Windows style, start by that.
29695    new_path=`cmd //c echo $new_path`
29696
29697  input_path="$new_path"
29698  # Check if we need to convert this using DOS-style short mode. If the path
29699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29700  # take no chances and rewrite it.
29701  # Note: m4 eats our [], so we need to use [ and ] instead.
29702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29703  if test "x$has_forbidden_chars" != x; then
29704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29705    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29706  fi
29707
29708    # Output is in $new_path
29709
29710  windows_path="$new_path"
29711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29712    unix_path=`$CYGPATH -u "$windows_path"`
29713    new_path="$unix_path"
29714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29716    new_path="$unix_path"
29717  fi
29718
29719    # remove trailing .exe if any
29720    new_path="${new_path/%.exe/}"
29721
29722    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29723    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29724  fi
29725
29726  else
29727    # We're on a posix platform. Hooray! :)
29728    # First separate the path from the arguments. This will split at the first
29729    # space.
29730    complete="$CXX"
29731    path="${complete%% *}"
29732    tmp="$complete EOL"
29733    arguments="${tmp#* }"
29734
29735    # Cannot rely on the command "which" here since it doesn't always work.
29736    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29737    if test -z "$is_absolute_path"; then
29738      # Path to executable is not absolute. Find it.
29739      IFS_save="$IFS"
29740      IFS=:
29741      for p in $PATH; do
29742        if test -f "$p/$path" && test -x "$p/$path"; then
29743          new_path="$p/$path"
29744          break
29745        fi
29746      done
29747      IFS="$IFS_save"
29748    else
29749      # This is an absolute path, we can use it without further modifications.
29750      new_path="$path"
29751    fi
29752
29753    if test "x$new_path" = x; then
29754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29755$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29756      has_space=`$ECHO "$complete" | $GREP " "`
29757      if test "x$has_space" != x; then
29758        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29759$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29760      fi
29761      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29762    fi
29763  fi
29764
29765  # Now join together the path and the arguments once again
29766  if test "x$arguments" != xEOL; then
29767    new_complete="$new_path ${arguments% *}"
29768  else
29769    new_complete="$new_path"
29770  fi
29771
29772  if test "x$complete" != "x$new_complete"; then
29773    CXX="$new_complete"
29774    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29775$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29776  fi
29777
29778  TEST_COMPILER="$CXX"
29779  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29780  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29781  if test "x$OPENJDK_BUILD_OS" != xaix; then
29782    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29783    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29784$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29785
29786  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29787    # Follow a chain of symbolic links. Use readlink
29788    # where it exists, else fall back to horribly
29789    # complicated shell code.
29790    if test "x$READLINK_TESTED" != yes; then
29791      # On MacOSX there is a readlink tool with a different
29792      # purpose than the GNU readlink tool. Check the found readlink.
29793      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29794      if test "x$ISGNU" = x; then
29795        # A readlink that we do not know how to use.
29796        # Are there other non-GNU readlinks out there?
29797        READLINK_TESTED=yes
29798        READLINK=
29799      fi
29800    fi
29801
29802    if test "x$READLINK" != x; then
29803      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29804    else
29805      # Save the current directory for restoring afterwards
29806      STARTDIR=$PWD
29807      COUNTER=0
29808      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29809      sym_link_file=`$BASENAME $TEST_COMPILER`
29810      cd $sym_link_dir
29811      # Use -P flag to resolve symlinks in directories.
29812      cd `$THEPWDCMD -P`
29813      sym_link_dir=`$THEPWDCMD -P`
29814      # Resolve file symlinks
29815      while test $COUNTER -lt 20; do
29816        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29817        if test "x$ISLINK" == x; then
29818          # This is not a symbolic link! We are done!
29819          break
29820        fi
29821        # Again resolve directory symlinks since the target of the just found
29822        # link could be in a different directory
29823        cd `$DIRNAME $ISLINK`
29824        sym_link_dir=`$THEPWDCMD -P`
29825        sym_link_file=`$BASENAME $ISLINK`
29826        let COUNTER=COUNTER+1
29827      done
29828      cd $STARTDIR
29829      TEST_COMPILER=$sym_link_dir/$sym_link_file
29830    fi
29831  fi
29832
29833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29834$as_echo "$TEST_COMPILER" >&6; }
29835  fi
29836  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29837$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29838
29839  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29840  if test "x$COMPILER_BASENAME" = "xccache"; then
29841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29842$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29843    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29844    # We want to control ccache invocation ourselves, so ignore this cc and try
29845    # searching again.
29846
29847    # Remove the path to the fake ccache cc from the PATH
29848    RETRY_COMPILER_SAVED_PATH="$PATH"
29849    COMPILER_DIRNAME=`$DIRNAME $CXX`
29850    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29851
29852    # Try again looking for our compiler
29853    if test -n "$ac_tool_prefix"; then
29854  for ac_prog in $TOOLCHAIN_CXX_BINARY
29855  do
29856    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29857set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29859$as_echo_n "checking for $ac_word... " >&6; }
29860if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29861  $as_echo_n "(cached) " >&6
29862else
29863  if test -n "$PROPER_COMPILER_CXX"; then
29864  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29865else
29866as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29867for as_dir in $PATH
29868do
29869  IFS=$as_save_IFS
29870  test -z "$as_dir" && as_dir=.
29871    for ac_exec_ext in '' $ac_executable_extensions; do
29872  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29873    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
29874    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29875    break 2
29876  fi
29877done
29878  done
29879IFS=$as_save_IFS
29880
29881fi
29882fi
29883PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
29884if test -n "$PROPER_COMPILER_CXX"; then
29885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
29886$as_echo "$PROPER_COMPILER_CXX" >&6; }
29887else
29888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29889$as_echo "no" >&6; }
29890fi
29891
29892
29893    test -n "$PROPER_COMPILER_CXX" && break
29894  done
29895fi
29896if test -z "$PROPER_COMPILER_CXX"; then
29897  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
29898  for ac_prog in $TOOLCHAIN_CXX_BINARY
29899do
29900  # Extract the first word of "$ac_prog", so it can be a program name with args.
29901set dummy $ac_prog; ac_word=$2
29902{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29903$as_echo_n "checking for $ac_word... " >&6; }
29904if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
29905  $as_echo_n "(cached) " >&6
29906else
29907  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29908  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
29909else
29910as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29911for as_dir in $PATH
29912do
29913  IFS=$as_save_IFS
29914  test -z "$as_dir" && as_dir=.
29915    for ac_exec_ext in '' $ac_executable_extensions; do
29916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29917    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
29918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29919    break 2
29920  fi
29921done
29922  done
29923IFS=$as_save_IFS
29924
29925fi
29926fi
29927ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
29928if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
29929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
29930$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
29931else
29932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29933$as_echo "no" >&6; }
29934fi
29935
29936
29937  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
29938done
29939
29940  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
29941    PROPER_COMPILER_CXX=""
29942  else
29943    case $cross_compiling:$ac_tool_warned in
29944yes:)
29945{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
29946$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
29947ac_tool_warned=yes ;;
29948esac
29949    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
29950  fi
29951fi
29952
29953
29954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29955
29956  # First separate the path from the arguments. This will split at the first
29957  # space.
29958  complete="$PROPER_COMPILER_CXX"
29959  path="${complete%% *}"
29960  tmp="$complete EOL"
29961  arguments="${tmp#* }"
29962
29963  # Input might be given as Windows format, start by converting to
29964  # unix format.
29965  new_path=`$CYGPATH -u "$path"`
29966
29967  # Now try to locate executable using which
29968  new_path=`$WHICH "$new_path" 2> /dev/null`
29969  # bat and cmd files are not always considered executable in cygwin causing which
29970  # to not find them
29971  if test "x$new_path" = x \
29972      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29973      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29974    new_path=`$CYGPATH -u "$path"`
29975  fi
29976  if test "x$new_path" = x; then
29977    # Oops. Which didn't find the executable.
29978    # The splitting of arguments from the executable at a space might have been incorrect,
29979    # since paths with space are more likely in Windows. Give it another try with the whole
29980    # argument.
29981    path="$complete"
29982    arguments="EOL"
29983    new_path=`$CYGPATH -u "$path"`
29984    new_path=`$WHICH "$new_path" 2> /dev/null`
29985    # bat and cmd files are not always considered executable in cygwin causing which
29986    # to not find them
29987    if test "x$new_path" = x \
29988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29990      new_path=`$CYGPATH -u "$path"`
29991    fi
29992    if test "x$new_path" = x; then
29993      # It's still not found. Now this is an unrecoverable error.
29994      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
29995$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
29996      has_space=`$ECHO "$complete" | $GREP " "`
29997      if test "x$has_space" != x; then
29998        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29999$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30000      fi
30001      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30002    fi
30003  fi
30004
30005  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30006  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30007  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30008  # "foo.exe" is OK but "foo" is an error.
30009  #
30010  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30011  # It is also a way to make sure we got the proper file name for the real test later on.
30012  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30013  if test "x$test_shortpath" = x; then
30014    # Short path failed, file does not exist as specified.
30015    # Try adding .exe or .cmd
30016    if test -f "${new_path}.exe"; then
30017      input_to_shortpath="${new_path}.exe"
30018    elif test -f "${new_path}.cmd"; then
30019      input_to_shortpath="${new_path}.cmd"
30020    else
30021      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30022$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30023      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30024$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30025      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30026    fi
30027  else
30028    input_to_shortpath="$new_path"
30029  fi
30030
30031  # Call helper function which possibly converts this using DOS-style short mode.
30032  # If so, the updated path is stored in $new_path.
30033  new_path="$input_to_shortpath"
30034
30035  input_path="$input_to_shortpath"
30036  # Check if we need to convert this using DOS-style short mode. If the path
30037  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30038  # take no chances and rewrite it.
30039  # Note: m4 eats our [], so we need to use [ and ] instead.
30040  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30041  if test "x$has_forbidden_chars" != x; then
30042    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30043    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30044    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30045    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30046      # Going to short mode and back again did indeed matter. Since short mode is
30047      # case insensitive, let's make it lowercase to improve readability.
30048      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30049      # Now convert it back to Unix-stile (cygpath)
30050      input_path=`$CYGPATH -u "$shortmode_path"`
30051      new_path="$input_path"
30052    fi
30053  fi
30054
30055  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30056  if test "x$test_cygdrive_prefix" = x; then
30057    # As a simple fix, exclude /usr/bin since it's not a real path.
30058    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30059      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30060      # a path prefixed by /cygdrive for fixpath to work.
30061      new_path="$CYGWIN_ROOT_PATH$input_path"
30062    fi
30063  fi
30064
30065  # remove trailing .exe if any
30066  new_path="${new_path/%.exe/}"
30067
30068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30069
30070  # First separate the path from the arguments. This will split at the first
30071  # space.
30072  complete="$PROPER_COMPILER_CXX"
30073  path="${complete%% *}"
30074  tmp="$complete EOL"
30075  arguments="${tmp#* }"
30076
30077  # Input might be given as Windows format, start by converting to
30078  # unix format.
30079  new_path="$path"
30080
30081  windows_path="$new_path"
30082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30083    unix_path=`$CYGPATH -u "$windows_path"`
30084    new_path="$unix_path"
30085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30087    new_path="$unix_path"
30088  fi
30089
30090
30091  # Now try to locate executable using which
30092  new_path=`$WHICH "$new_path" 2> /dev/null`
30093
30094  if test "x$new_path" = x; then
30095    # Oops. Which didn't find the executable.
30096    # The splitting of arguments from the executable at a space might have been incorrect,
30097    # since paths with space are more likely in Windows. Give it another try with the whole
30098    # argument.
30099    path="$complete"
30100    arguments="EOL"
30101    new_path="$path"
30102
30103  windows_path="$new_path"
30104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30105    unix_path=`$CYGPATH -u "$windows_path"`
30106    new_path="$unix_path"
30107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30109    new_path="$unix_path"
30110  fi
30111
30112
30113    new_path=`$WHICH "$new_path" 2> /dev/null`
30114
30115    if test "x$new_path" = x; then
30116      # It's still not found. Now this is an unrecoverable error.
30117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30118$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30119      has_space=`$ECHO "$complete" | $GREP " "`
30120      if test "x$has_space" != x; then
30121        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30122$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30123      fi
30124      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30125    fi
30126  fi
30127
30128  # Now new_path has a complete unix path to the binary
30129  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30130    # Keep paths in /bin as-is, but remove trailing .exe if any
30131    new_path="${new_path/%.exe/}"
30132    # Do not save /bin paths to all_fixpath_prefixes!
30133  else
30134    # Not in mixed or Windows style, start by that.
30135    new_path=`cmd //c echo $new_path`
30136
30137  input_path="$new_path"
30138  # Check if we need to convert this using DOS-style short mode. If the path
30139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30140  # take no chances and rewrite it.
30141  # Note: m4 eats our [], so we need to use [ and ] instead.
30142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30143  if test "x$has_forbidden_chars" != x; then
30144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30146  fi
30147
30148    # Output is in $new_path
30149
30150  windows_path="$new_path"
30151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30152    unix_path=`$CYGPATH -u "$windows_path"`
30153    new_path="$unix_path"
30154  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30155    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30156    new_path="$unix_path"
30157  fi
30158
30159    # remove trailing .exe if any
30160    new_path="${new_path/%.exe/}"
30161
30162    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30163    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30164  fi
30165
30166  else
30167    # We're on a posix platform. Hooray! :)
30168    # First separate the path from the arguments. This will split at the first
30169    # space.
30170    complete="$PROPER_COMPILER_CXX"
30171    path="${complete%% *}"
30172    tmp="$complete EOL"
30173    arguments="${tmp#* }"
30174
30175    # Cannot rely on the command "which" here since it doesn't always work.
30176    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30177    if test -z "$is_absolute_path"; then
30178      # Path to executable is not absolute. Find it.
30179      IFS_save="$IFS"
30180      IFS=:
30181      for p in $PATH; do
30182        if test -f "$p/$path" && test -x "$p/$path"; then
30183          new_path="$p/$path"
30184          break
30185        fi
30186      done
30187      IFS="$IFS_save"
30188    else
30189      # This is an absolute path, we can use it without further modifications.
30190      new_path="$path"
30191    fi
30192
30193    if test "x$new_path" = x; then
30194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30195$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30196      has_space=`$ECHO "$complete" | $GREP " "`
30197      if test "x$has_space" != x; then
30198        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30199$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30200      fi
30201      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30202    fi
30203  fi
30204
30205  # Now join together the path and the arguments once again
30206  if test "x$arguments" != xEOL; then
30207    new_complete="$new_path ${arguments% *}"
30208  else
30209    new_complete="$new_path"
30210  fi
30211
30212  if test "x$complete" != "x$new_complete"; then
30213    PROPER_COMPILER_CXX="$new_complete"
30214    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30215$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30216  fi
30217
30218    PATH="$RETRY_COMPILER_SAVED_PATH"
30219
30220    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30221$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30222
30223  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30224    # Follow a chain of symbolic links. Use readlink
30225    # where it exists, else fall back to horribly
30226    # complicated shell code.
30227    if test "x$READLINK_TESTED" != yes; then
30228      # On MacOSX there is a readlink tool with a different
30229      # purpose than the GNU readlink tool. Check the found readlink.
30230      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30231      if test "x$ISGNU" = x; then
30232        # A readlink that we do not know how to use.
30233        # Are there other non-GNU readlinks out there?
30234        READLINK_TESTED=yes
30235        READLINK=
30236      fi
30237    fi
30238
30239    if test "x$READLINK" != x; then
30240      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30241    else
30242      # Save the current directory for restoring afterwards
30243      STARTDIR=$PWD
30244      COUNTER=0
30245      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30246      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30247      cd $sym_link_dir
30248      # Use -P flag to resolve symlinks in directories.
30249      cd `$THEPWDCMD -P`
30250      sym_link_dir=`$THEPWDCMD -P`
30251      # Resolve file symlinks
30252      while test $COUNTER -lt 20; do
30253        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30254        if test "x$ISLINK" == x; then
30255          # This is not a symbolic link! We are done!
30256          break
30257        fi
30258        # Again resolve directory symlinks since the target of the just found
30259        # link could be in a different directory
30260        cd `$DIRNAME $ISLINK`
30261        sym_link_dir=`$THEPWDCMD -P`
30262        sym_link_file=`$BASENAME $ISLINK`
30263        let COUNTER=COUNTER+1
30264      done
30265      cd $STARTDIR
30266      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30267    fi
30268  fi
30269
30270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30271$as_echo "$PROPER_COMPILER_CXX" >&6; }
30272    CXX="$PROPER_COMPILER_CXX"
30273  else
30274    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30275$as_echo "no, keeping CXX" >&6; }
30276  fi
30277
30278
30279  COMPILER=$CXX
30280  COMPILER_NAME=$COMPILER_NAME
30281
30282  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30283    # cc -V output typically looks like
30284    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30285    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30286    # Check that this is likely to be the Solaris Studio cc.
30287    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30288    if test $? -ne 0; then
30289      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30290      { $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
30291$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30292      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30293$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30294      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30295$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30296      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30297    fi
30298    # Remove usage instructions (if present), and
30299    # collapse compiler output into a single line
30300    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30301        $SED -e 's/ *[Uu]sage:.*//'`
30302    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30303        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30304  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30305    # xlc -qversion output typically looks like
30306    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30307    #     Version: 11.01.0000.0015
30308    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30309    # Check that this is likely to be the IBM XL C compiler.
30310    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30311    if test $? -ne 0; then
30312      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30313      { $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
30314$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30315      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30316$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30317      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30318$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30319      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30320    fi
30321    # Collapse compiler output into a single line
30322    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30323    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30324        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30325  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30326    # There is no specific version flag, but all output starts with a version string.
30327    # First line typically looks something like:
30328    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30329    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30330    # Check that this is likely to be Microsoft CL.EXE.
30331    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30332    if test $? -ne 0; then
30333      { $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
30334$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30335      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30336$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30337      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30338    fi
30339    # Collapse compiler output into a single line
30340    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30341    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30342        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30343  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30344    # gcc --version output typically looks like
30345    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30346    #     Copyright (C) 2013 Free Software Foundation, Inc.
30347    #     This is free software; see the source for copying conditions.  There is NO
30348    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30349    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30350    # Check that this is likely to be GCC.
30351    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30352    if test $? -ne 0; then
30353      { $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
30354$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30355      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30356$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30357      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30358    fi
30359    # Remove Copyright and legalese from version string, and
30360    # collapse into a single line
30361    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30362        $SED -e 's/ *Copyright .*//'`
30363    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30364        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30365  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30366    # clang --version output typically looks like
30367    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30368    #    clang version 3.3 (tags/RELEASE_33/final)
30369    # or
30370    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30371    #    Target: x86_64-pc-linux-gnu
30372    #    Thread model: posix
30373    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30374    # Check that this is likely to be clang
30375    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30376    if test $? -ne 0; then
30377      { $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
30378$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30379      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30380$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30381      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30382    fi
30383    # Collapse compiler output into a single line
30384    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30385    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30386        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30387  else
30388      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30389  fi
30390  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30391  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30392  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30393  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30394
30395  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30396$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30397
30398
30399  # Now that we have resolved CXX ourself, let autoconf have its go at it
30400  ac_ext=cpp
30401ac_cpp='$CXXCPP $CPPFLAGS'
30402ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30403ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30404ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30405if test -z "$CXX"; then
30406  if test -n "$CCC"; then
30407    CXX=$CCC
30408  else
30409    if test -n "$ac_tool_prefix"; then
30410  for ac_prog in $CXX
30411  do
30412    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30413set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30415$as_echo_n "checking for $ac_word... " >&6; }
30416if ${ac_cv_prog_CXX+:} false; then :
30417  $as_echo_n "(cached) " >&6
30418else
30419  if test -n "$CXX"; then
30420  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30421else
30422as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30423for as_dir in $PATH
30424do
30425  IFS=$as_save_IFS
30426  test -z "$as_dir" && as_dir=.
30427    for ac_exec_ext in '' $ac_executable_extensions; do
30428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30429    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30431    break 2
30432  fi
30433done
30434  done
30435IFS=$as_save_IFS
30436
30437fi
30438fi
30439CXX=$ac_cv_prog_CXX
30440if test -n "$CXX"; then
30441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30442$as_echo "$CXX" >&6; }
30443else
30444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30445$as_echo "no" >&6; }
30446fi
30447
30448
30449    test -n "$CXX" && break
30450  done
30451fi
30452if test -z "$CXX"; then
30453  ac_ct_CXX=$CXX
30454  for ac_prog in $CXX
30455do
30456  # Extract the first word of "$ac_prog", so it can be a program name with args.
30457set dummy $ac_prog; ac_word=$2
30458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30459$as_echo_n "checking for $ac_word... " >&6; }
30460if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30461  $as_echo_n "(cached) " >&6
30462else
30463  if test -n "$ac_ct_CXX"; then
30464  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30465else
30466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30467for as_dir in $PATH
30468do
30469  IFS=$as_save_IFS
30470  test -z "$as_dir" && as_dir=.
30471    for ac_exec_ext in '' $ac_executable_extensions; do
30472  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30473    ac_cv_prog_ac_ct_CXX="$ac_prog"
30474    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30475    break 2
30476  fi
30477done
30478  done
30479IFS=$as_save_IFS
30480
30481fi
30482fi
30483ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30484if test -n "$ac_ct_CXX"; then
30485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30486$as_echo "$ac_ct_CXX" >&6; }
30487else
30488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30489$as_echo "no" >&6; }
30490fi
30491
30492
30493  test -n "$ac_ct_CXX" && break
30494done
30495
30496  if test "x$ac_ct_CXX" = x; then
30497    CXX="g++"
30498  else
30499    case $cross_compiling:$ac_tool_warned in
30500yes:)
30501{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30502$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30503ac_tool_warned=yes ;;
30504esac
30505    CXX=$ac_ct_CXX
30506  fi
30507fi
30508
30509  fi
30510fi
30511# Provide some information about the compiler.
30512$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30513set X $ac_compile
30514ac_compiler=$2
30515for ac_option in --version -v -V -qversion; do
30516  { { ac_try="$ac_compiler $ac_option >&5"
30517case "(($ac_try" in
30518  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30519  *) ac_try_echo=$ac_try;;
30520esac
30521eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30522$as_echo "$ac_try_echo"; } >&5
30523  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30524  ac_status=$?
30525  if test -s conftest.err; then
30526    sed '10a\
30527... rest of stderr output deleted ...
30528         10q' conftest.err >conftest.er1
30529    cat conftest.er1 >&5
30530  fi
30531  rm -f conftest.er1 conftest.err
30532  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30533  test $ac_status = 0; }
30534done
30535
30536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30537$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30538if ${ac_cv_cxx_compiler_gnu+:} false; then :
30539  $as_echo_n "(cached) " >&6
30540else
30541  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30542/* end confdefs.h.  */
30543
30544int
30545main ()
30546{
30547#ifndef __GNUC__
30548       choke me
30549#endif
30550
30551  ;
30552  return 0;
30553}
30554_ACEOF
30555if ac_fn_cxx_try_compile "$LINENO"; then :
30556  ac_compiler_gnu=yes
30557else
30558  ac_compiler_gnu=no
30559fi
30560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30561ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30562
30563fi
30564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30565$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30566if test $ac_compiler_gnu = yes; then
30567  GXX=yes
30568else
30569  GXX=
30570fi
30571ac_test_CXXFLAGS=${CXXFLAGS+set}
30572ac_save_CXXFLAGS=$CXXFLAGS
30573{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30574$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30575if ${ac_cv_prog_cxx_g+:} false; then :
30576  $as_echo_n "(cached) " >&6
30577else
30578  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30579   ac_cxx_werror_flag=yes
30580   ac_cv_prog_cxx_g=no
30581   CXXFLAGS="-g"
30582   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30583/* end confdefs.h.  */
30584
30585int
30586main ()
30587{
30588
30589  ;
30590  return 0;
30591}
30592_ACEOF
30593if ac_fn_cxx_try_compile "$LINENO"; then :
30594  ac_cv_prog_cxx_g=yes
30595else
30596  CXXFLAGS=""
30597      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30598/* end confdefs.h.  */
30599
30600int
30601main ()
30602{
30603
30604  ;
30605  return 0;
30606}
30607_ACEOF
30608if ac_fn_cxx_try_compile "$LINENO"; then :
30609
30610else
30611  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30612	 CXXFLAGS="-g"
30613	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30614/* end confdefs.h.  */
30615
30616int
30617main ()
30618{
30619
30620  ;
30621  return 0;
30622}
30623_ACEOF
30624if ac_fn_cxx_try_compile "$LINENO"; then :
30625  ac_cv_prog_cxx_g=yes
30626fi
30627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30628fi
30629rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30630fi
30631rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30632   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30633fi
30634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30635$as_echo "$ac_cv_prog_cxx_g" >&6; }
30636if test "$ac_test_CXXFLAGS" = set; then
30637  CXXFLAGS=$ac_save_CXXFLAGS
30638elif test $ac_cv_prog_cxx_g = yes; then
30639  if test "$GXX" = yes; then
30640    CXXFLAGS="-g -O2"
30641  else
30642    CXXFLAGS="-g"
30643  fi
30644else
30645  if test "$GXX" = yes; then
30646    CXXFLAGS="-O2"
30647  else
30648    CXXFLAGS=
30649  fi
30650fi
30651ac_ext=cpp
30652ac_cpp='$CXXCPP $CPPFLAGS'
30653ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30654ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30655ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30656
30657
30658  #
30659  # Setup the preprocessor (CPP and CXXCPP)
30660  #
30661  ac_ext=c
30662ac_cpp='$CPP $CPPFLAGS'
30663ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30664ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30665ac_compiler_gnu=$ac_cv_c_compiler_gnu
30666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30667$as_echo_n "checking how to run the C preprocessor... " >&6; }
30668# On Suns, sometimes $CPP names a directory.
30669if test -n "$CPP" && test -d "$CPP"; then
30670  CPP=
30671fi
30672if test -z "$CPP"; then
30673  if ${ac_cv_prog_CPP+:} false; then :
30674  $as_echo_n "(cached) " >&6
30675else
30676      # Double quotes because CPP needs to be expanded
30677    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30678    do
30679      ac_preproc_ok=false
30680for ac_c_preproc_warn_flag in '' yes
30681do
30682  # Use a header file that comes with gcc, so configuring glibc
30683  # with a fresh cross-compiler works.
30684  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30685  # <limits.h> exists even on freestanding compilers.
30686  # On the NeXT, cc -E runs the code through the compiler's parser,
30687  # not just through cpp. "Syntax error" is here to catch this case.
30688  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30689/* end confdefs.h.  */
30690#ifdef __STDC__
30691# include <limits.h>
30692#else
30693# include <assert.h>
30694#endif
30695		     Syntax error
30696_ACEOF
30697if ac_fn_c_try_cpp "$LINENO"; then :
30698
30699else
30700  # Broken: fails on valid input.
30701continue
30702fi
30703rm -f conftest.err conftest.i conftest.$ac_ext
30704
30705  # OK, works on sane cases.  Now check whether nonexistent headers
30706  # can be detected and how.
30707  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30708/* end confdefs.h.  */
30709#include <ac_nonexistent.h>
30710_ACEOF
30711if ac_fn_c_try_cpp "$LINENO"; then :
30712  # Broken: success on invalid input.
30713continue
30714else
30715  # Passes both tests.
30716ac_preproc_ok=:
30717break
30718fi
30719rm -f conftest.err conftest.i conftest.$ac_ext
30720
30721done
30722# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30723rm -f conftest.i conftest.err conftest.$ac_ext
30724if $ac_preproc_ok; then :
30725  break
30726fi
30727
30728    done
30729    ac_cv_prog_CPP=$CPP
30730
30731fi
30732  CPP=$ac_cv_prog_CPP
30733else
30734  ac_cv_prog_CPP=$CPP
30735fi
30736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30737$as_echo "$CPP" >&6; }
30738ac_preproc_ok=false
30739for ac_c_preproc_warn_flag in '' yes
30740do
30741  # Use a header file that comes with gcc, so configuring glibc
30742  # with a fresh cross-compiler works.
30743  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30744  # <limits.h> exists even on freestanding compilers.
30745  # On the NeXT, cc -E runs the code through the compiler's parser,
30746  # not just through cpp. "Syntax error" is here to catch this case.
30747  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30748/* end confdefs.h.  */
30749#ifdef __STDC__
30750# include <limits.h>
30751#else
30752# include <assert.h>
30753#endif
30754		     Syntax error
30755_ACEOF
30756if ac_fn_c_try_cpp "$LINENO"; then :
30757
30758else
30759  # Broken: fails on valid input.
30760continue
30761fi
30762rm -f conftest.err conftest.i conftest.$ac_ext
30763
30764  # OK, works on sane cases.  Now check whether nonexistent headers
30765  # can be detected and how.
30766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30767/* end confdefs.h.  */
30768#include <ac_nonexistent.h>
30769_ACEOF
30770if ac_fn_c_try_cpp "$LINENO"; then :
30771  # Broken: success on invalid input.
30772continue
30773else
30774  # Passes both tests.
30775ac_preproc_ok=:
30776break
30777fi
30778rm -f conftest.err conftest.i conftest.$ac_ext
30779
30780done
30781# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30782rm -f conftest.i conftest.err conftest.$ac_ext
30783if $ac_preproc_ok; then :
30784
30785else
30786  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30787$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30788as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30789See \`config.log' for more details" "$LINENO" 5; }
30790fi
30791
30792ac_ext=cpp
30793ac_cpp='$CXXCPP $CPPFLAGS'
30794ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30795ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30796ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30797
30798
30799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30800
30801  # First separate the path from the arguments. This will split at the first
30802  # space.
30803  complete="$CPP"
30804  path="${complete%% *}"
30805  tmp="$complete EOL"
30806  arguments="${tmp#* }"
30807
30808  # Input might be given as Windows format, start by converting to
30809  # unix format.
30810  new_path=`$CYGPATH -u "$path"`
30811
30812  # Now try to locate executable using which
30813  new_path=`$WHICH "$new_path" 2> /dev/null`
30814  # bat and cmd files are not always considered executable in cygwin causing which
30815  # to not find them
30816  if test "x$new_path" = x \
30817      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30818      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30819    new_path=`$CYGPATH -u "$path"`
30820  fi
30821  if test "x$new_path" = x; then
30822    # Oops. Which didn't find the executable.
30823    # The splitting of arguments from the executable at a space might have been incorrect,
30824    # since paths with space are more likely in Windows. Give it another try with the whole
30825    # argument.
30826    path="$complete"
30827    arguments="EOL"
30828    new_path=`$CYGPATH -u "$path"`
30829    new_path=`$WHICH "$new_path" 2> /dev/null`
30830    # bat and cmd files are not always considered executable in cygwin causing which
30831    # to not find them
30832    if test "x$new_path" = x \
30833        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30834        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30835      new_path=`$CYGPATH -u "$path"`
30836    fi
30837    if test "x$new_path" = x; then
30838      # It's still not found. Now this is an unrecoverable error.
30839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30840$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30841      has_space=`$ECHO "$complete" | $GREP " "`
30842      if test "x$has_space" != x; then
30843        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30844$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30845      fi
30846      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30847    fi
30848  fi
30849
30850  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30851  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30852  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30853  # "foo.exe" is OK but "foo" is an error.
30854  #
30855  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30856  # It is also a way to make sure we got the proper file name for the real test later on.
30857  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30858  if test "x$test_shortpath" = x; then
30859    # Short path failed, file does not exist as specified.
30860    # Try adding .exe or .cmd
30861    if test -f "${new_path}.exe"; then
30862      input_to_shortpath="${new_path}.exe"
30863    elif test -f "${new_path}.cmd"; then
30864      input_to_shortpath="${new_path}.cmd"
30865    else
30866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30867$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30868      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30869$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30870      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30871    fi
30872  else
30873    input_to_shortpath="$new_path"
30874  fi
30875
30876  # Call helper function which possibly converts this using DOS-style short mode.
30877  # If so, the updated path is stored in $new_path.
30878  new_path="$input_to_shortpath"
30879
30880  input_path="$input_to_shortpath"
30881  # Check if we need to convert this using DOS-style short mode. If the path
30882  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30883  # take no chances and rewrite it.
30884  # Note: m4 eats our [], so we need to use [ and ] instead.
30885  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30886  if test "x$has_forbidden_chars" != x; then
30887    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30888    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30889    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30890    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30891      # Going to short mode and back again did indeed matter. Since short mode is
30892      # case insensitive, let's make it lowercase to improve readability.
30893      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30894      # Now convert it back to Unix-stile (cygpath)
30895      input_path=`$CYGPATH -u "$shortmode_path"`
30896      new_path="$input_path"
30897    fi
30898  fi
30899
30900  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30901  if test "x$test_cygdrive_prefix" = x; then
30902    # As a simple fix, exclude /usr/bin since it's not a real path.
30903    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30904      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30905      # a path prefixed by /cygdrive for fixpath to work.
30906      new_path="$CYGWIN_ROOT_PATH$input_path"
30907    fi
30908  fi
30909
30910  # remove trailing .exe if any
30911  new_path="${new_path/%.exe/}"
30912
30913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30914
30915  # First separate the path from the arguments. This will split at the first
30916  # space.
30917  complete="$CPP"
30918  path="${complete%% *}"
30919  tmp="$complete EOL"
30920  arguments="${tmp#* }"
30921
30922  # Input might be given as Windows format, start by converting to
30923  # unix format.
30924  new_path="$path"
30925
30926  windows_path="$new_path"
30927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30928    unix_path=`$CYGPATH -u "$windows_path"`
30929    new_path="$unix_path"
30930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30932    new_path="$unix_path"
30933  fi
30934
30935
30936  # Now try to locate executable using which
30937  new_path=`$WHICH "$new_path" 2> /dev/null`
30938
30939  if test "x$new_path" = x; then
30940    # Oops. Which didn't find the executable.
30941    # The splitting of arguments from the executable at a space might have been incorrect,
30942    # since paths with space are more likely in Windows. Give it another try with the whole
30943    # argument.
30944    path="$complete"
30945    arguments="EOL"
30946    new_path="$path"
30947
30948  windows_path="$new_path"
30949  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30950    unix_path=`$CYGPATH -u "$windows_path"`
30951    new_path="$unix_path"
30952  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30953    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30954    new_path="$unix_path"
30955  fi
30956
30957
30958    new_path=`$WHICH "$new_path" 2> /dev/null`
30959
30960    if test "x$new_path" = x; then
30961      # It's still not found. Now this is an unrecoverable error.
30962      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30963$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30964      has_space=`$ECHO "$complete" | $GREP " "`
30965      if test "x$has_space" != x; then
30966        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30967$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30968      fi
30969      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30970    fi
30971  fi
30972
30973  # Now new_path has a complete unix path to the binary
30974  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30975    # Keep paths in /bin as-is, but remove trailing .exe if any
30976    new_path="${new_path/%.exe/}"
30977    # Do not save /bin paths to all_fixpath_prefixes!
30978  else
30979    # Not in mixed or Windows style, start by that.
30980    new_path=`cmd //c echo $new_path`
30981
30982  input_path="$new_path"
30983  # Check if we need to convert this using DOS-style short mode. If the path
30984  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30985  # take no chances and rewrite it.
30986  # Note: m4 eats our [], so we need to use [ and ] instead.
30987  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30988  if test "x$has_forbidden_chars" != x; then
30989    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30990    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30991  fi
30992
30993    # Output is in $new_path
30994
30995  windows_path="$new_path"
30996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30997    unix_path=`$CYGPATH -u "$windows_path"`
30998    new_path="$unix_path"
30999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31001    new_path="$unix_path"
31002  fi
31003
31004    # remove trailing .exe if any
31005    new_path="${new_path/%.exe/}"
31006
31007    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31008    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31009  fi
31010
31011  else
31012    # We're on a posix platform. Hooray! :)
31013    # First separate the path from the arguments. This will split at the first
31014    # space.
31015    complete="$CPP"
31016    path="${complete%% *}"
31017    tmp="$complete EOL"
31018    arguments="${tmp#* }"
31019
31020    # Cannot rely on the command "which" here since it doesn't always work.
31021    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31022    if test -z "$is_absolute_path"; then
31023      # Path to executable is not absolute. Find it.
31024      IFS_save="$IFS"
31025      IFS=:
31026      for p in $PATH; do
31027        if test -f "$p/$path" && test -x "$p/$path"; then
31028          new_path="$p/$path"
31029          break
31030        fi
31031      done
31032      IFS="$IFS_save"
31033    else
31034      # This is an absolute path, we can use it without further modifications.
31035      new_path="$path"
31036    fi
31037
31038    if test "x$new_path" = x; then
31039      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31040$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31041      has_space=`$ECHO "$complete" | $GREP " "`
31042      if test "x$has_space" != x; then
31043        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31044$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31045      fi
31046      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31047    fi
31048  fi
31049
31050  # Now join together the path and the arguments once again
31051  if test "x$arguments" != xEOL; then
31052    new_complete="$new_path ${arguments% *}"
31053  else
31054    new_complete="$new_path"
31055  fi
31056
31057  if test "x$complete" != "x$new_complete"; then
31058    CPP="$new_complete"
31059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31060$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31061  fi
31062
31063  ac_ext=cpp
31064ac_cpp='$CXXCPP $CPPFLAGS'
31065ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31066ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31067ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31069$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31070if test -z "$CXXCPP"; then
31071  if ${ac_cv_prog_CXXCPP+:} false; then :
31072  $as_echo_n "(cached) " >&6
31073else
31074      # Double quotes because CXXCPP needs to be expanded
31075    for CXXCPP in "$CXX -E" "/lib/cpp"
31076    do
31077      ac_preproc_ok=false
31078for ac_cxx_preproc_warn_flag in '' yes
31079do
31080  # Use a header file that comes with gcc, so configuring glibc
31081  # with a fresh cross-compiler works.
31082  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31083  # <limits.h> exists even on freestanding compilers.
31084  # On the NeXT, cc -E runs the code through the compiler's parser,
31085  # not just through cpp. "Syntax error" is here to catch this case.
31086  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31087/* end confdefs.h.  */
31088#ifdef __STDC__
31089# include <limits.h>
31090#else
31091# include <assert.h>
31092#endif
31093		     Syntax error
31094_ACEOF
31095if ac_fn_cxx_try_cpp "$LINENO"; then :
31096
31097else
31098  # Broken: fails on valid input.
31099continue
31100fi
31101rm -f conftest.err conftest.i conftest.$ac_ext
31102
31103  # OK, works on sane cases.  Now check whether nonexistent headers
31104  # can be detected and how.
31105  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31106/* end confdefs.h.  */
31107#include <ac_nonexistent.h>
31108_ACEOF
31109if ac_fn_cxx_try_cpp "$LINENO"; then :
31110  # Broken: success on invalid input.
31111continue
31112else
31113  # Passes both tests.
31114ac_preproc_ok=:
31115break
31116fi
31117rm -f conftest.err conftest.i conftest.$ac_ext
31118
31119done
31120# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31121rm -f conftest.i conftest.err conftest.$ac_ext
31122if $ac_preproc_ok; then :
31123  break
31124fi
31125
31126    done
31127    ac_cv_prog_CXXCPP=$CXXCPP
31128
31129fi
31130  CXXCPP=$ac_cv_prog_CXXCPP
31131else
31132  ac_cv_prog_CXXCPP=$CXXCPP
31133fi
31134{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31135$as_echo "$CXXCPP" >&6; }
31136ac_preproc_ok=false
31137for ac_cxx_preproc_warn_flag in '' yes
31138do
31139  # Use a header file that comes with gcc, so configuring glibc
31140  # with a fresh cross-compiler works.
31141  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31142  # <limits.h> exists even on freestanding compilers.
31143  # On the NeXT, cc -E runs the code through the compiler's parser,
31144  # not just through cpp. "Syntax error" is here to catch this case.
31145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31146/* end confdefs.h.  */
31147#ifdef __STDC__
31148# include <limits.h>
31149#else
31150# include <assert.h>
31151#endif
31152		     Syntax error
31153_ACEOF
31154if ac_fn_cxx_try_cpp "$LINENO"; then :
31155
31156else
31157  # Broken: fails on valid input.
31158continue
31159fi
31160rm -f conftest.err conftest.i conftest.$ac_ext
31161
31162  # OK, works on sane cases.  Now check whether nonexistent headers
31163  # can be detected and how.
31164  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31165/* end confdefs.h.  */
31166#include <ac_nonexistent.h>
31167_ACEOF
31168if ac_fn_cxx_try_cpp "$LINENO"; then :
31169  # Broken: success on invalid input.
31170continue
31171else
31172  # Passes both tests.
31173ac_preproc_ok=:
31174break
31175fi
31176rm -f conftest.err conftest.i conftest.$ac_ext
31177
31178done
31179# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31180rm -f conftest.i conftest.err conftest.$ac_ext
31181if $ac_preproc_ok; then :
31182
31183else
31184  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31185$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31186as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31187See \`config.log' for more details" "$LINENO" 5; }
31188fi
31189
31190ac_ext=cpp
31191ac_cpp='$CXXCPP $CPPFLAGS'
31192ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31193ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31194ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31195
31196
31197  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31198
31199  # First separate the path from the arguments. This will split at the first
31200  # space.
31201  complete="$CXXCPP"
31202  path="${complete%% *}"
31203  tmp="$complete EOL"
31204  arguments="${tmp#* }"
31205
31206  # Input might be given as Windows format, start by converting to
31207  # unix format.
31208  new_path=`$CYGPATH -u "$path"`
31209
31210  # Now try to locate executable using which
31211  new_path=`$WHICH "$new_path" 2> /dev/null`
31212  # bat and cmd files are not always considered executable in cygwin causing which
31213  # to not find them
31214  if test "x$new_path" = x \
31215      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31216      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31217    new_path=`$CYGPATH -u "$path"`
31218  fi
31219  if test "x$new_path" = x; then
31220    # Oops. Which didn't find the executable.
31221    # The splitting of arguments from the executable at a space might have been incorrect,
31222    # since paths with space are more likely in Windows. Give it another try with the whole
31223    # argument.
31224    path="$complete"
31225    arguments="EOL"
31226    new_path=`$CYGPATH -u "$path"`
31227    new_path=`$WHICH "$new_path" 2> /dev/null`
31228    # bat and cmd files are not always considered executable in cygwin causing which
31229    # to not find them
31230    if test "x$new_path" = x \
31231        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31232        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31233      new_path=`$CYGPATH -u "$path"`
31234    fi
31235    if test "x$new_path" = x; then
31236      # It's still not found. Now this is an unrecoverable error.
31237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31238$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31239      has_space=`$ECHO "$complete" | $GREP " "`
31240      if test "x$has_space" != x; then
31241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31243      fi
31244      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31245    fi
31246  fi
31247
31248  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31249  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31250  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31251  # "foo.exe" is OK but "foo" is an error.
31252  #
31253  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31254  # It is also a way to make sure we got the proper file name for the real test later on.
31255  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31256  if test "x$test_shortpath" = x; then
31257    # Short path failed, file does not exist as specified.
31258    # Try adding .exe or .cmd
31259    if test -f "${new_path}.exe"; then
31260      input_to_shortpath="${new_path}.exe"
31261    elif test -f "${new_path}.cmd"; then
31262      input_to_shortpath="${new_path}.cmd"
31263    else
31264      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31265$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31266      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31267$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31268      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31269    fi
31270  else
31271    input_to_shortpath="$new_path"
31272  fi
31273
31274  # Call helper function which possibly converts this using DOS-style short mode.
31275  # If so, the updated path is stored in $new_path.
31276  new_path="$input_to_shortpath"
31277
31278  input_path="$input_to_shortpath"
31279  # Check if we need to convert this using DOS-style short mode. If the path
31280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31281  # take no chances and rewrite it.
31282  # Note: m4 eats our [], so we need to use [ and ] instead.
31283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31284  if test "x$has_forbidden_chars" != x; then
31285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31286    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31287    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31288    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31289      # Going to short mode and back again did indeed matter. Since short mode is
31290      # case insensitive, let's make it lowercase to improve readability.
31291      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31292      # Now convert it back to Unix-stile (cygpath)
31293      input_path=`$CYGPATH -u "$shortmode_path"`
31294      new_path="$input_path"
31295    fi
31296  fi
31297
31298  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31299  if test "x$test_cygdrive_prefix" = x; then
31300    # As a simple fix, exclude /usr/bin since it's not a real path.
31301    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31302      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31303      # a path prefixed by /cygdrive for fixpath to work.
31304      new_path="$CYGWIN_ROOT_PATH$input_path"
31305    fi
31306  fi
31307
31308  # remove trailing .exe if any
31309  new_path="${new_path/%.exe/}"
31310
31311  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31312
31313  # First separate the path from the arguments. This will split at the first
31314  # space.
31315  complete="$CXXCPP"
31316  path="${complete%% *}"
31317  tmp="$complete EOL"
31318  arguments="${tmp#* }"
31319
31320  # Input might be given as Windows format, start by converting to
31321  # unix format.
31322  new_path="$path"
31323
31324  windows_path="$new_path"
31325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31326    unix_path=`$CYGPATH -u "$windows_path"`
31327    new_path="$unix_path"
31328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31330    new_path="$unix_path"
31331  fi
31332
31333
31334  # Now try to locate executable using which
31335  new_path=`$WHICH "$new_path" 2> /dev/null`
31336
31337  if test "x$new_path" = x; then
31338    # Oops. Which didn't find the executable.
31339    # The splitting of arguments from the executable at a space might have been incorrect,
31340    # since paths with space are more likely in Windows. Give it another try with the whole
31341    # argument.
31342    path="$complete"
31343    arguments="EOL"
31344    new_path="$path"
31345
31346  windows_path="$new_path"
31347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31348    unix_path=`$CYGPATH -u "$windows_path"`
31349    new_path="$unix_path"
31350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31352    new_path="$unix_path"
31353  fi
31354
31355
31356    new_path=`$WHICH "$new_path" 2> /dev/null`
31357
31358    if test "x$new_path" = x; then
31359      # It's still not found. Now this is an unrecoverable error.
31360      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31361$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31362      has_space=`$ECHO "$complete" | $GREP " "`
31363      if test "x$has_space" != x; then
31364        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31365$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31366      fi
31367      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31368    fi
31369  fi
31370
31371  # Now new_path has a complete unix path to the binary
31372  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31373    # Keep paths in /bin as-is, but remove trailing .exe if any
31374    new_path="${new_path/%.exe/}"
31375    # Do not save /bin paths to all_fixpath_prefixes!
31376  else
31377    # Not in mixed or Windows style, start by that.
31378    new_path=`cmd //c echo $new_path`
31379
31380  input_path="$new_path"
31381  # Check if we need to convert this using DOS-style short mode. If the path
31382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31383  # take no chances and rewrite it.
31384  # Note: m4 eats our [], so we need to use [ and ] instead.
31385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31386  if test "x$has_forbidden_chars" != x; then
31387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31389  fi
31390
31391    # Output is in $new_path
31392
31393  windows_path="$new_path"
31394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31395    unix_path=`$CYGPATH -u "$windows_path"`
31396    new_path="$unix_path"
31397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31399    new_path="$unix_path"
31400  fi
31401
31402    # remove trailing .exe if any
31403    new_path="${new_path/%.exe/}"
31404
31405    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31406    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31407  fi
31408
31409  else
31410    # We're on a posix platform. Hooray! :)
31411    # First separate the path from the arguments. This will split at the first
31412    # space.
31413    complete="$CXXCPP"
31414    path="${complete%% *}"
31415    tmp="$complete EOL"
31416    arguments="${tmp#* }"
31417
31418    # Cannot rely on the command "which" here since it doesn't always work.
31419    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31420    if test -z "$is_absolute_path"; then
31421      # Path to executable is not absolute. Find it.
31422      IFS_save="$IFS"
31423      IFS=:
31424      for p in $PATH; do
31425        if test -f "$p/$path" && test -x "$p/$path"; then
31426          new_path="$p/$path"
31427          break
31428        fi
31429      done
31430      IFS="$IFS_save"
31431    else
31432      # This is an absolute path, we can use it without further modifications.
31433      new_path="$path"
31434    fi
31435
31436    if test "x$new_path" = x; then
31437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31438$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31439      has_space=`$ECHO "$complete" | $GREP " "`
31440      if test "x$has_space" != x; then
31441        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31442$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31443      fi
31444      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31445    fi
31446  fi
31447
31448  # Now join together the path and the arguments once again
31449  if test "x$arguments" != xEOL; then
31450    new_complete="$new_path ${arguments% *}"
31451  else
31452    new_complete="$new_path"
31453  fi
31454
31455  if test "x$complete" != "x$new_complete"; then
31456    CXXCPP="$new_complete"
31457    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31458$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31459  fi
31460
31461
31462  #
31463  # Setup the linker (LD)
31464  #
31465  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31466    # In the Microsoft toolchain we have a separate LD command "link".
31467    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31468    # a cygwin program for something completely different.
31469    # Extract the first word of "link", so it can be a program name with args.
31470set dummy link; ac_word=$2
31471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31472$as_echo_n "checking for $ac_word... " >&6; }
31473if ${ac_cv_prog_LD+:} false; then :
31474  $as_echo_n "(cached) " >&6
31475else
31476  if test -n "$LD"; then
31477  ac_cv_prog_LD="$LD" # Let the user override the test.
31478else
31479  ac_prog_rejected=no
31480as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31481for as_dir in $PATH
31482do
31483  IFS=$as_save_IFS
31484  test -z "$as_dir" && as_dir=.
31485    for ac_exec_ext in '' $ac_executable_extensions; do
31486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31487    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31488       ac_prog_rejected=yes
31489       continue
31490     fi
31491    ac_cv_prog_LD="link"
31492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31493    break 2
31494  fi
31495done
31496  done
31497IFS=$as_save_IFS
31498
31499if test $ac_prog_rejected = yes; then
31500  # We found a bogon in the path, so make sure we never use it.
31501  set dummy $ac_cv_prog_LD
31502  shift
31503  if test $# != 0; then
31504    # We chose a different compiler from the bogus one.
31505    # However, it has the same basename, so the bogon will be chosen
31506    # first if we set LD to just the basename; use the full file name.
31507    shift
31508    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31509  fi
31510fi
31511fi
31512fi
31513LD=$ac_cv_prog_LD
31514if test -n "$LD"; then
31515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31516$as_echo "$LD" >&6; }
31517else
31518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31519$as_echo "no" >&6; }
31520fi
31521
31522
31523
31524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31525
31526  # First separate the path from the arguments. This will split at the first
31527  # space.
31528  complete="$LD"
31529  path="${complete%% *}"
31530  tmp="$complete EOL"
31531  arguments="${tmp#* }"
31532
31533  # Input might be given as Windows format, start by converting to
31534  # unix format.
31535  new_path=`$CYGPATH -u "$path"`
31536
31537  # Now try to locate executable using which
31538  new_path=`$WHICH "$new_path" 2> /dev/null`
31539  # bat and cmd files are not always considered executable in cygwin causing which
31540  # to not find them
31541  if test "x$new_path" = x \
31542      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31543      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31544    new_path=`$CYGPATH -u "$path"`
31545  fi
31546  if test "x$new_path" = x; then
31547    # Oops. Which didn't find the executable.
31548    # The splitting of arguments from the executable at a space might have been incorrect,
31549    # since paths with space are more likely in Windows. Give it another try with the whole
31550    # argument.
31551    path="$complete"
31552    arguments="EOL"
31553    new_path=`$CYGPATH -u "$path"`
31554    new_path=`$WHICH "$new_path" 2> /dev/null`
31555    # bat and cmd files are not always considered executable in cygwin causing which
31556    # to not find them
31557    if test "x$new_path" = x \
31558        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31559        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31560      new_path=`$CYGPATH -u "$path"`
31561    fi
31562    if test "x$new_path" = x; then
31563      # It's still not found. Now this is an unrecoverable error.
31564      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31565$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31566      has_space=`$ECHO "$complete" | $GREP " "`
31567      if test "x$has_space" != x; then
31568        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31569$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31570      fi
31571      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31572    fi
31573  fi
31574
31575  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31576  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31577  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31578  # "foo.exe" is OK but "foo" is an error.
31579  #
31580  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31581  # It is also a way to make sure we got the proper file name for the real test later on.
31582  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31583  if test "x$test_shortpath" = x; then
31584    # Short path failed, file does not exist as specified.
31585    # Try adding .exe or .cmd
31586    if test -f "${new_path}.exe"; then
31587      input_to_shortpath="${new_path}.exe"
31588    elif test -f "${new_path}.cmd"; then
31589      input_to_shortpath="${new_path}.cmd"
31590    else
31591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31592$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31593      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31594$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31595      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31596    fi
31597  else
31598    input_to_shortpath="$new_path"
31599  fi
31600
31601  # Call helper function which possibly converts this using DOS-style short mode.
31602  # If so, the updated path is stored in $new_path.
31603  new_path="$input_to_shortpath"
31604
31605  input_path="$input_to_shortpath"
31606  # Check if we need to convert this using DOS-style short mode. If the path
31607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31608  # take no chances and rewrite it.
31609  # Note: m4 eats our [], so we need to use [ and ] instead.
31610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31611  if test "x$has_forbidden_chars" != x; then
31612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31616      # Going to short mode and back again did indeed matter. Since short mode is
31617      # case insensitive, let's make it lowercase to improve readability.
31618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31619      # Now convert it back to Unix-stile (cygpath)
31620      input_path=`$CYGPATH -u "$shortmode_path"`
31621      new_path="$input_path"
31622    fi
31623  fi
31624
31625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31626  if test "x$test_cygdrive_prefix" = x; then
31627    # As a simple fix, exclude /usr/bin since it's not a real path.
31628    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31630      # a path prefixed by /cygdrive for fixpath to work.
31631      new_path="$CYGWIN_ROOT_PATH$input_path"
31632    fi
31633  fi
31634
31635  # remove trailing .exe if any
31636  new_path="${new_path/%.exe/}"
31637
31638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31639
31640  # First separate the path from the arguments. This will split at the first
31641  # space.
31642  complete="$LD"
31643  path="${complete%% *}"
31644  tmp="$complete EOL"
31645  arguments="${tmp#* }"
31646
31647  # Input might be given as Windows format, start by converting to
31648  # unix format.
31649  new_path="$path"
31650
31651  windows_path="$new_path"
31652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31653    unix_path=`$CYGPATH -u "$windows_path"`
31654    new_path="$unix_path"
31655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31657    new_path="$unix_path"
31658  fi
31659
31660
31661  # Now try to locate executable using which
31662  new_path=`$WHICH "$new_path" 2> /dev/null`
31663
31664  if test "x$new_path" = x; then
31665    # Oops. Which didn't find the executable.
31666    # The splitting of arguments from the executable at a space might have been incorrect,
31667    # since paths with space are more likely in Windows. Give it another try with the whole
31668    # argument.
31669    path="$complete"
31670    arguments="EOL"
31671    new_path="$path"
31672
31673  windows_path="$new_path"
31674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31675    unix_path=`$CYGPATH -u "$windows_path"`
31676    new_path="$unix_path"
31677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31679    new_path="$unix_path"
31680  fi
31681
31682
31683    new_path=`$WHICH "$new_path" 2> /dev/null`
31684
31685    if test "x$new_path" = x; then
31686      # It's still not found. Now this is an unrecoverable error.
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31688$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31689      has_space=`$ECHO "$complete" | $GREP " "`
31690      if test "x$has_space" != x; then
31691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31693      fi
31694      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31695    fi
31696  fi
31697
31698  # Now new_path has a complete unix path to the binary
31699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31700    # Keep paths in /bin as-is, but remove trailing .exe if any
31701    new_path="${new_path/%.exe/}"
31702    # Do not save /bin paths to all_fixpath_prefixes!
31703  else
31704    # Not in mixed or Windows style, start by that.
31705    new_path=`cmd //c echo $new_path`
31706
31707  input_path="$new_path"
31708  # Check if we need to convert this using DOS-style short mode. If the path
31709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31710  # take no chances and rewrite it.
31711  # Note: m4 eats our [], so we need to use [ and ] instead.
31712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31713  if test "x$has_forbidden_chars" != x; then
31714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31716  fi
31717
31718    # Output is in $new_path
31719
31720  windows_path="$new_path"
31721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31722    unix_path=`$CYGPATH -u "$windows_path"`
31723    new_path="$unix_path"
31724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31726    new_path="$unix_path"
31727  fi
31728
31729    # remove trailing .exe if any
31730    new_path="${new_path/%.exe/}"
31731
31732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31734  fi
31735
31736  else
31737    # We're on a posix platform. Hooray! :)
31738    # First separate the path from the arguments. This will split at the first
31739    # space.
31740    complete="$LD"
31741    path="${complete%% *}"
31742    tmp="$complete EOL"
31743    arguments="${tmp#* }"
31744
31745    # Cannot rely on the command "which" here since it doesn't always work.
31746    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31747    if test -z "$is_absolute_path"; then
31748      # Path to executable is not absolute. Find it.
31749      IFS_save="$IFS"
31750      IFS=:
31751      for p in $PATH; do
31752        if test -f "$p/$path" && test -x "$p/$path"; then
31753          new_path="$p/$path"
31754          break
31755        fi
31756      done
31757      IFS="$IFS_save"
31758    else
31759      # This is an absolute path, we can use it without further modifications.
31760      new_path="$path"
31761    fi
31762
31763    if test "x$new_path" = x; then
31764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31765$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31766      has_space=`$ECHO "$complete" | $GREP " "`
31767      if test "x$has_space" != x; then
31768        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31770      fi
31771      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31772    fi
31773  fi
31774
31775  # Now join together the path and the arguments once again
31776  if test "x$arguments" != xEOL; then
31777    new_complete="$new_path ${arguments% *}"
31778  else
31779    new_complete="$new_path"
31780  fi
31781
31782  if test "x$complete" != "x$new_complete"; then
31783    LD="$new_complete"
31784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31785$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31786  fi
31787
31788    # Verify that we indeed succeeded with this trick.
31789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31790$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31791    "$LD" --version > /dev/null
31792    if test $? -eq 0 ; then
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31794$as_echo "no" >&6; }
31795      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31796    else
31797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31798$as_echo "yes" >&6; }
31799    fi
31800    LDCXX="$LD"
31801  else
31802    # All other toolchains use the compiler to link.
31803    LD="$CC"
31804    LDCXX="$CXX"
31805  fi
31806
31807  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31808
31809
31810  #
31811  # Setup the assembler (AS)
31812  #
31813  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31814    # FIXME: should this really be solaris, or solstudio?
31815
31816
31817  # Publish this variable in the help.
31818
31819
31820  if test "x$AS" = x; then
31821    # The variable is not set by user, try to locate tool using the code snippet
31822    for ac_prog in as
31823do
31824  # Extract the first word of "$ac_prog", so it can be a program name with args.
31825set dummy $ac_prog; ac_word=$2
31826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31827$as_echo_n "checking for $ac_word... " >&6; }
31828if ${ac_cv_path_AS+:} false; then :
31829  $as_echo_n "(cached) " >&6
31830else
31831  case $AS in
31832  [\\/]* | ?:[\\/]*)
31833  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31834  ;;
31835  *)
31836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31837for as_dir in $PATH
31838do
31839  IFS=$as_save_IFS
31840  test -z "$as_dir" && as_dir=.
31841    for ac_exec_ext in '' $ac_executable_extensions; do
31842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31843    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31845    break 2
31846  fi
31847done
31848  done
31849IFS=$as_save_IFS
31850
31851  ;;
31852esac
31853fi
31854AS=$ac_cv_path_AS
31855if test -n "$AS"; then
31856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31857$as_echo "$AS" >&6; }
31858else
31859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31860$as_echo "no" >&6; }
31861fi
31862
31863
31864  test -n "$AS" && break
31865done
31866
31867  else
31868    # The variable is set, but is it from the command line or the environment?
31869
31870    # Try to remove the string !AS! from our list.
31871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31873      # If it failed, the variable was not from the command line. Ignore it,
31874      # but warn the user (except for BASH, which is always set by the calling BASH).
31875      if test "xAS" != xBASH; then
31876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
31877$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
31878      fi
31879      # Try to locate tool using the code snippet
31880      for ac_prog in as
31881do
31882  # Extract the first word of "$ac_prog", so it can be a program name with args.
31883set dummy $ac_prog; ac_word=$2
31884{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31885$as_echo_n "checking for $ac_word... " >&6; }
31886if ${ac_cv_path_AS+:} false; then :
31887  $as_echo_n "(cached) " >&6
31888else
31889  case $AS in
31890  [\\/]* | ?:[\\/]*)
31891  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31892  ;;
31893  *)
31894  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31895for as_dir in $PATH
31896do
31897  IFS=$as_save_IFS
31898  test -z "$as_dir" && as_dir=.
31899    for ac_exec_ext in '' $ac_executable_extensions; do
31900  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31901    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31902    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31903    break 2
31904  fi
31905done
31906  done
31907IFS=$as_save_IFS
31908
31909  ;;
31910esac
31911fi
31912AS=$ac_cv_path_AS
31913if test -n "$AS"; then
31914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31915$as_echo "$AS" >&6; }
31916else
31917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31918$as_echo "no" >&6; }
31919fi
31920
31921
31922  test -n "$AS" && break
31923done
31924
31925    else
31926      # If it succeeded, then it was overridden by the user. We will use it
31927      # for the tool.
31928
31929      # First remove it from the list of overridden variables, so we can test
31930      # for unknown variables in the end.
31931      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
31932
31933      # Check if the provided tool contains a complete path.
31934      tool_specified="$AS"
31935      tool_basename="${tool_specified##*/}"
31936      if test "x$tool_basename" = "x$tool_specified"; then
31937        # A command without a complete path is provided, search $PATH.
31938        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
31939$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
31940        # Extract the first word of "$tool_basename", so it can be a program name with args.
31941set dummy $tool_basename; ac_word=$2
31942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31943$as_echo_n "checking for $ac_word... " >&6; }
31944if ${ac_cv_path_AS+:} false; then :
31945  $as_echo_n "(cached) " >&6
31946else
31947  case $AS in
31948  [\\/]* | ?:[\\/]*)
31949  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31950  ;;
31951  *)
31952  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31953for as_dir in $PATH
31954do
31955  IFS=$as_save_IFS
31956  test -z "$as_dir" && as_dir=.
31957    for ac_exec_ext in '' $ac_executable_extensions; do
31958  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31959    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31960    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31961    break 2
31962  fi
31963done
31964  done
31965IFS=$as_save_IFS
31966
31967  ;;
31968esac
31969fi
31970AS=$ac_cv_path_AS
31971if test -n "$AS"; then
31972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31973$as_echo "$AS" >&6; }
31974else
31975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31976$as_echo "no" >&6; }
31977fi
31978
31979
31980        if test "x$AS" = x; then
31981          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
31982        fi
31983      else
31984        # Otherwise we believe it is a complete path. Use it as it is.
31985        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
31986$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
31987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
31988$as_echo_n "checking for AS... " >&6; }
31989        if test ! -x "$tool_specified"; then
31990          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
31991$as_echo "not found" >&6; }
31992          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
31993        fi
31994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
31995$as_echo "$tool_specified" >&6; }
31996      fi
31997    fi
31998  fi
31999
32000
32001
32002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32003
32004  # First separate the path from the arguments. This will split at the first
32005  # space.
32006  complete="$AS"
32007  path="${complete%% *}"
32008  tmp="$complete EOL"
32009  arguments="${tmp#* }"
32010
32011  # Input might be given as Windows format, start by converting to
32012  # unix format.
32013  new_path=`$CYGPATH -u "$path"`
32014
32015  # Now try to locate executable using which
32016  new_path=`$WHICH "$new_path" 2> /dev/null`
32017  # bat and cmd files are not always considered executable in cygwin causing which
32018  # to not find them
32019  if test "x$new_path" = x \
32020      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32021      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32022    new_path=`$CYGPATH -u "$path"`
32023  fi
32024  if test "x$new_path" = x; then
32025    # Oops. Which didn't find the executable.
32026    # The splitting of arguments from the executable at a space might have been incorrect,
32027    # since paths with space are more likely in Windows. Give it another try with the whole
32028    # argument.
32029    path="$complete"
32030    arguments="EOL"
32031    new_path=`$CYGPATH -u "$path"`
32032    new_path=`$WHICH "$new_path" 2> /dev/null`
32033    # bat and cmd files are not always considered executable in cygwin causing which
32034    # to not find them
32035    if test "x$new_path" = x \
32036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32038      new_path=`$CYGPATH -u "$path"`
32039    fi
32040    if test "x$new_path" = x; then
32041      # It's still not found. Now this is an unrecoverable error.
32042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32043$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32044      has_space=`$ECHO "$complete" | $GREP " "`
32045      if test "x$has_space" != x; then
32046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32048      fi
32049      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32050    fi
32051  fi
32052
32053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32056  # "foo.exe" is OK but "foo" is an error.
32057  #
32058  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32059  # It is also a way to make sure we got the proper file name for the real test later on.
32060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32061  if test "x$test_shortpath" = x; then
32062    # Short path failed, file does not exist as specified.
32063    # Try adding .exe or .cmd
32064    if test -f "${new_path}.exe"; then
32065      input_to_shortpath="${new_path}.exe"
32066    elif test -f "${new_path}.cmd"; then
32067      input_to_shortpath="${new_path}.cmd"
32068    else
32069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32070$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32073      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32074    fi
32075  else
32076    input_to_shortpath="$new_path"
32077  fi
32078
32079  # Call helper function which possibly converts this using DOS-style short mode.
32080  # If so, the updated path is stored in $new_path.
32081  new_path="$input_to_shortpath"
32082
32083  input_path="$input_to_shortpath"
32084  # Check if we need to convert this using DOS-style short mode. If the path
32085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32086  # take no chances and rewrite it.
32087  # Note: m4 eats our [], so we need to use [ and ] instead.
32088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32089  if test "x$has_forbidden_chars" != x; then
32090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32094      # Going to short mode and back again did indeed matter. Since short mode is
32095      # case insensitive, let's make it lowercase to improve readability.
32096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32097      # Now convert it back to Unix-stile (cygpath)
32098      input_path=`$CYGPATH -u "$shortmode_path"`
32099      new_path="$input_path"
32100    fi
32101  fi
32102
32103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32104  if test "x$test_cygdrive_prefix" = x; then
32105    # As a simple fix, exclude /usr/bin since it's not a real path.
32106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32108      # a path prefixed by /cygdrive for fixpath to work.
32109      new_path="$CYGWIN_ROOT_PATH$input_path"
32110    fi
32111  fi
32112
32113  # remove trailing .exe if any
32114  new_path="${new_path/%.exe/}"
32115
32116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32117
32118  # First separate the path from the arguments. This will split at the first
32119  # space.
32120  complete="$AS"
32121  path="${complete%% *}"
32122  tmp="$complete EOL"
32123  arguments="${tmp#* }"
32124
32125  # Input might be given as Windows format, start by converting to
32126  # unix format.
32127  new_path="$path"
32128
32129  windows_path="$new_path"
32130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32131    unix_path=`$CYGPATH -u "$windows_path"`
32132    new_path="$unix_path"
32133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32135    new_path="$unix_path"
32136  fi
32137
32138
32139  # Now try to locate executable using which
32140  new_path=`$WHICH "$new_path" 2> /dev/null`
32141
32142  if test "x$new_path" = x; then
32143    # Oops. Which didn't find the executable.
32144    # The splitting of arguments from the executable at a space might have been incorrect,
32145    # since paths with space are more likely in Windows. Give it another try with the whole
32146    # argument.
32147    path="$complete"
32148    arguments="EOL"
32149    new_path="$path"
32150
32151  windows_path="$new_path"
32152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32153    unix_path=`$CYGPATH -u "$windows_path"`
32154    new_path="$unix_path"
32155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32157    new_path="$unix_path"
32158  fi
32159
32160
32161    new_path=`$WHICH "$new_path" 2> /dev/null`
32162
32163    if test "x$new_path" = x; then
32164      # It's still not found. Now this is an unrecoverable error.
32165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32166$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32167      has_space=`$ECHO "$complete" | $GREP " "`
32168      if test "x$has_space" != x; then
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32170$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32171      fi
32172      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32173    fi
32174  fi
32175
32176  # Now new_path has a complete unix path to the binary
32177  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32178    # Keep paths in /bin as-is, but remove trailing .exe if any
32179    new_path="${new_path/%.exe/}"
32180    # Do not save /bin paths to all_fixpath_prefixes!
32181  else
32182    # Not in mixed or Windows style, start by that.
32183    new_path=`cmd //c echo $new_path`
32184
32185  input_path="$new_path"
32186  # Check if we need to convert this using DOS-style short mode. If the path
32187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32188  # take no chances and rewrite it.
32189  # Note: m4 eats our [], so we need to use [ and ] instead.
32190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32191  if test "x$has_forbidden_chars" != x; then
32192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32194  fi
32195
32196    # Output is in $new_path
32197
32198  windows_path="$new_path"
32199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32200    unix_path=`$CYGPATH -u "$windows_path"`
32201    new_path="$unix_path"
32202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32204    new_path="$unix_path"
32205  fi
32206
32207    # remove trailing .exe if any
32208    new_path="${new_path/%.exe/}"
32209
32210    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32211    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32212  fi
32213
32214  else
32215    # We're on a posix platform. Hooray! :)
32216    # First separate the path from the arguments. This will split at the first
32217    # space.
32218    complete="$AS"
32219    path="${complete%% *}"
32220    tmp="$complete EOL"
32221    arguments="${tmp#* }"
32222
32223    # Cannot rely on the command "which" here since it doesn't always work.
32224    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32225    if test -z "$is_absolute_path"; then
32226      # Path to executable is not absolute. Find it.
32227      IFS_save="$IFS"
32228      IFS=:
32229      for p in $PATH; do
32230        if test -f "$p/$path" && test -x "$p/$path"; then
32231          new_path="$p/$path"
32232          break
32233        fi
32234      done
32235      IFS="$IFS_save"
32236    else
32237      # This is an absolute path, we can use it without further modifications.
32238      new_path="$path"
32239    fi
32240
32241    if test "x$new_path" = x; then
32242      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32243$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32244      has_space=`$ECHO "$complete" | $GREP " "`
32245      if test "x$has_space" != x; then
32246        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32247$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32248      fi
32249      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32250    fi
32251  fi
32252
32253  # Now join together the path and the arguments once again
32254  if test "x$arguments" != xEOL; then
32255    new_complete="$new_path ${arguments% *}"
32256  else
32257    new_complete="$new_path"
32258  fi
32259
32260  if test "x$complete" != "x$new_complete"; then
32261    AS="$new_complete"
32262    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32263$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32264  fi
32265
32266  else
32267    # FIXME: is this correct for microsoft?
32268    AS="$CC -c"
32269  fi
32270
32271
32272  #
32273  # Setup the archiver (AR)
32274  #
32275  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32276    # The corresponding ar tool is lib.exe (used to create static libraries)
32277    # Extract the first word of "lib", so it can be a program name with args.
32278set dummy lib; ac_word=$2
32279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32280$as_echo_n "checking for $ac_word... " >&6; }
32281if ${ac_cv_prog_AR+:} false; then :
32282  $as_echo_n "(cached) " >&6
32283else
32284  if test -n "$AR"; then
32285  ac_cv_prog_AR="$AR" # Let the user override the test.
32286else
32287as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32288for as_dir in $PATH
32289do
32290  IFS=$as_save_IFS
32291  test -z "$as_dir" && as_dir=.
32292    for ac_exec_ext in '' $ac_executable_extensions; do
32293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32294    ac_cv_prog_AR="lib"
32295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32296    break 2
32297  fi
32298done
32299  done
32300IFS=$as_save_IFS
32301
32302fi
32303fi
32304AR=$ac_cv_prog_AR
32305if test -n "$AR"; then
32306  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32307$as_echo "$AR" >&6; }
32308else
32309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32310$as_echo "no" >&6; }
32311fi
32312
32313
32314  else
32315
32316
32317  # Publish this variable in the help.
32318
32319
32320  if test "x$AR" = x; then
32321    # The variable is not set by user, try to locate tool using the code snippet
32322    if test -n "$ac_tool_prefix"; then
32323  for ac_prog in ar
32324  do
32325    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32326set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32328$as_echo_n "checking for $ac_word... " >&6; }
32329if ${ac_cv_prog_AR+:} false; then :
32330  $as_echo_n "(cached) " >&6
32331else
32332  if test -n "$AR"; then
32333  ac_cv_prog_AR="$AR" # Let the user override the test.
32334else
32335as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32336for as_dir in $PATH
32337do
32338  IFS=$as_save_IFS
32339  test -z "$as_dir" && as_dir=.
32340    for ac_exec_ext in '' $ac_executable_extensions; do
32341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32342    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32344    break 2
32345  fi
32346done
32347  done
32348IFS=$as_save_IFS
32349
32350fi
32351fi
32352AR=$ac_cv_prog_AR
32353if test -n "$AR"; then
32354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32355$as_echo "$AR" >&6; }
32356else
32357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32358$as_echo "no" >&6; }
32359fi
32360
32361
32362    test -n "$AR" && break
32363  done
32364fi
32365if test -z "$AR"; then
32366  ac_ct_AR=$AR
32367  for ac_prog in ar
32368do
32369  # Extract the first word of "$ac_prog", so it can be a program name with args.
32370set dummy $ac_prog; ac_word=$2
32371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32372$as_echo_n "checking for $ac_word... " >&6; }
32373if ${ac_cv_prog_ac_ct_AR+:} false; then :
32374  $as_echo_n "(cached) " >&6
32375else
32376  if test -n "$ac_ct_AR"; then
32377  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32378else
32379as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32380for as_dir in $PATH
32381do
32382  IFS=$as_save_IFS
32383  test -z "$as_dir" && as_dir=.
32384    for ac_exec_ext in '' $ac_executable_extensions; do
32385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32386    ac_cv_prog_ac_ct_AR="$ac_prog"
32387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32388    break 2
32389  fi
32390done
32391  done
32392IFS=$as_save_IFS
32393
32394fi
32395fi
32396ac_ct_AR=$ac_cv_prog_ac_ct_AR
32397if test -n "$ac_ct_AR"; then
32398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32399$as_echo "$ac_ct_AR" >&6; }
32400else
32401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32402$as_echo "no" >&6; }
32403fi
32404
32405
32406  test -n "$ac_ct_AR" && break
32407done
32408
32409  if test "x$ac_ct_AR" = x; then
32410    AR=""
32411  else
32412    case $cross_compiling:$ac_tool_warned in
32413yes:)
32414{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32415$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32416ac_tool_warned=yes ;;
32417esac
32418    AR=$ac_ct_AR
32419  fi
32420fi
32421
32422  else
32423    # The variable is set, but is it from the command line or the environment?
32424
32425    # Try to remove the string !AR! from our list.
32426    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32427    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32428      # If it failed, the variable was not from the command line. Ignore it,
32429      # but warn the user (except for BASH, which is always set by the calling BASH).
32430      if test "xAR" != xBASH; then
32431        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32432$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32433      fi
32434      # Try to locate tool using the code snippet
32435      if test -n "$ac_tool_prefix"; then
32436  for ac_prog in ar
32437  do
32438    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32439set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32441$as_echo_n "checking for $ac_word... " >&6; }
32442if ${ac_cv_prog_AR+:} false; then :
32443  $as_echo_n "(cached) " >&6
32444else
32445  if test -n "$AR"; then
32446  ac_cv_prog_AR="$AR" # Let the user override the test.
32447else
32448as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32449for as_dir in $PATH
32450do
32451  IFS=$as_save_IFS
32452  test -z "$as_dir" && as_dir=.
32453    for ac_exec_ext in '' $ac_executable_extensions; do
32454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32455    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32457    break 2
32458  fi
32459done
32460  done
32461IFS=$as_save_IFS
32462
32463fi
32464fi
32465AR=$ac_cv_prog_AR
32466if test -n "$AR"; then
32467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32468$as_echo "$AR" >&6; }
32469else
32470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32471$as_echo "no" >&6; }
32472fi
32473
32474
32475    test -n "$AR" && break
32476  done
32477fi
32478if test -z "$AR"; then
32479  ac_ct_AR=$AR
32480  for ac_prog in ar
32481do
32482  # Extract the first word of "$ac_prog", so it can be a program name with args.
32483set dummy $ac_prog; ac_word=$2
32484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32485$as_echo_n "checking for $ac_word... " >&6; }
32486if ${ac_cv_prog_ac_ct_AR+:} false; then :
32487  $as_echo_n "(cached) " >&6
32488else
32489  if test -n "$ac_ct_AR"; then
32490  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32491else
32492as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32493for as_dir in $PATH
32494do
32495  IFS=$as_save_IFS
32496  test -z "$as_dir" && as_dir=.
32497    for ac_exec_ext in '' $ac_executable_extensions; do
32498  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32499    ac_cv_prog_ac_ct_AR="$ac_prog"
32500    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32501    break 2
32502  fi
32503done
32504  done
32505IFS=$as_save_IFS
32506
32507fi
32508fi
32509ac_ct_AR=$ac_cv_prog_ac_ct_AR
32510if test -n "$ac_ct_AR"; then
32511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32512$as_echo "$ac_ct_AR" >&6; }
32513else
32514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32515$as_echo "no" >&6; }
32516fi
32517
32518
32519  test -n "$ac_ct_AR" && break
32520done
32521
32522  if test "x$ac_ct_AR" = x; then
32523    AR=""
32524  else
32525    case $cross_compiling:$ac_tool_warned in
32526yes:)
32527{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32528$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32529ac_tool_warned=yes ;;
32530esac
32531    AR=$ac_ct_AR
32532  fi
32533fi
32534
32535    else
32536      # If it succeeded, then it was overridden by the user. We will use it
32537      # for the tool.
32538
32539      # First remove it from the list of overridden variables, so we can test
32540      # for unknown variables in the end.
32541      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32542
32543      # Check if the provided tool contains a complete path.
32544      tool_specified="$AR"
32545      tool_basename="${tool_specified##*/}"
32546      if test "x$tool_basename" = "x$tool_specified"; then
32547        # A command without a complete path is provided, search $PATH.
32548        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32549$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32550        # Extract the first word of "$tool_basename", so it can be a program name with args.
32551set dummy $tool_basename; ac_word=$2
32552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32553$as_echo_n "checking for $ac_word... " >&6; }
32554if ${ac_cv_path_AR+:} false; then :
32555  $as_echo_n "(cached) " >&6
32556else
32557  case $AR in
32558  [\\/]* | ?:[\\/]*)
32559  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32560  ;;
32561  *)
32562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32563for as_dir in $PATH
32564do
32565  IFS=$as_save_IFS
32566  test -z "$as_dir" && as_dir=.
32567    for ac_exec_ext in '' $ac_executable_extensions; do
32568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32569    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32571    break 2
32572  fi
32573done
32574  done
32575IFS=$as_save_IFS
32576
32577  ;;
32578esac
32579fi
32580AR=$ac_cv_path_AR
32581if test -n "$AR"; then
32582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32583$as_echo "$AR" >&6; }
32584else
32585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32586$as_echo "no" >&6; }
32587fi
32588
32589
32590        if test "x$AR" = x; then
32591          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32592        fi
32593      else
32594        # Otherwise we believe it is a complete path. Use it as it is.
32595        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32596$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32597        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32598$as_echo_n "checking for AR... " >&6; }
32599        if test ! -x "$tool_specified"; then
32600          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32601$as_echo "not found" >&6; }
32602          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32603        fi
32604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32605$as_echo "$tool_specified" >&6; }
32606      fi
32607    fi
32608  fi
32609
32610
32611  fi
32612
32613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32614
32615  # First separate the path from the arguments. This will split at the first
32616  # space.
32617  complete="$AR"
32618  path="${complete%% *}"
32619  tmp="$complete EOL"
32620  arguments="${tmp#* }"
32621
32622  # Input might be given as Windows format, start by converting to
32623  # unix format.
32624  new_path=`$CYGPATH -u "$path"`
32625
32626  # Now try to locate executable using which
32627  new_path=`$WHICH "$new_path" 2> /dev/null`
32628  # bat and cmd files are not always considered executable in cygwin causing which
32629  # to not find them
32630  if test "x$new_path" = x \
32631      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32632      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32633    new_path=`$CYGPATH -u "$path"`
32634  fi
32635  if test "x$new_path" = x; then
32636    # Oops. Which didn't find the executable.
32637    # The splitting of arguments from the executable at a space might have been incorrect,
32638    # since paths with space are more likely in Windows. Give it another try with the whole
32639    # argument.
32640    path="$complete"
32641    arguments="EOL"
32642    new_path=`$CYGPATH -u "$path"`
32643    new_path=`$WHICH "$new_path" 2> /dev/null`
32644    # bat and cmd files are not always considered executable in cygwin causing which
32645    # to not find them
32646    if test "x$new_path" = x \
32647        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32648        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32649      new_path=`$CYGPATH -u "$path"`
32650    fi
32651    if test "x$new_path" = x; then
32652      # It's still not found. Now this is an unrecoverable error.
32653      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32654$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32655      has_space=`$ECHO "$complete" | $GREP " "`
32656      if test "x$has_space" != x; then
32657        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32658$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32659      fi
32660      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32661    fi
32662  fi
32663
32664  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32665  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32666  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32667  # "foo.exe" is OK but "foo" is an error.
32668  #
32669  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32670  # It is also a way to make sure we got the proper file name for the real test later on.
32671  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32672  if test "x$test_shortpath" = x; then
32673    # Short path failed, file does not exist as specified.
32674    # Try adding .exe or .cmd
32675    if test -f "${new_path}.exe"; then
32676      input_to_shortpath="${new_path}.exe"
32677    elif test -f "${new_path}.cmd"; then
32678      input_to_shortpath="${new_path}.cmd"
32679    else
32680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32681$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32682      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32683$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32684      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32685    fi
32686  else
32687    input_to_shortpath="$new_path"
32688  fi
32689
32690  # Call helper function which possibly converts this using DOS-style short mode.
32691  # If so, the updated path is stored in $new_path.
32692  new_path="$input_to_shortpath"
32693
32694  input_path="$input_to_shortpath"
32695  # Check if we need to convert this using DOS-style short mode. If the path
32696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32697  # take no chances and rewrite it.
32698  # Note: m4 eats our [], so we need to use [ and ] instead.
32699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32700  if test "x$has_forbidden_chars" != x; then
32701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32705      # Going to short mode and back again did indeed matter. Since short mode is
32706      # case insensitive, let's make it lowercase to improve readability.
32707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32708      # Now convert it back to Unix-stile (cygpath)
32709      input_path=`$CYGPATH -u "$shortmode_path"`
32710      new_path="$input_path"
32711    fi
32712  fi
32713
32714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32715  if test "x$test_cygdrive_prefix" = x; then
32716    # As a simple fix, exclude /usr/bin since it's not a real path.
32717    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32719      # a path prefixed by /cygdrive for fixpath to work.
32720      new_path="$CYGWIN_ROOT_PATH$input_path"
32721    fi
32722  fi
32723
32724  # remove trailing .exe if any
32725  new_path="${new_path/%.exe/}"
32726
32727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32728
32729  # First separate the path from the arguments. This will split at the first
32730  # space.
32731  complete="$AR"
32732  path="${complete%% *}"
32733  tmp="$complete EOL"
32734  arguments="${tmp#* }"
32735
32736  # Input might be given as Windows format, start by converting to
32737  # unix format.
32738  new_path="$path"
32739
32740  windows_path="$new_path"
32741  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32742    unix_path=`$CYGPATH -u "$windows_path"`
32743    new_path="$unix_path"
32744  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32745    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32746    new_path="$unix_path"
32747  fi
32748
32749
32750  # Now try to locate executable using which
32751  new_path=`$WHICH "$new_path" 2> /dev/null`
32752
32753  if test "x$new_path" = x; then
32754    # Oops. Which didn't find the executable.
32755    # The splitting of arguments from the executable at a space might have been incorrect,
32756    # since paths with space are more likely in Windows. Give it another try with the whole
32757    # argument.
32758    path="$complete"
32759    arguments="EOL"
32760    new_path="$path"
32761
32762  windows_path="$new_path"
32763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32764    unix_path=`$CYGPATH -u "$windows_path"`
32765    new_path="$unix_path"
32766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32768    new_path="$unix_path"
32769  fi
32770
32771
32772    new_path=`$WHICH "$new_path" 2> /dev/null`
32773
32774    if test "x$new_path" = x; then
32775      # It's still not found. Now this is an unrecoverable error.
32776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32777$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32778      has_space=`$ECHO "$complete" | $GREP " "`
32779      if test "x$has_space" != x; then
32780        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32781$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32782      fi
32783      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32784    fi
32785  fi
32786
32787  # Now new_path has a complete unix path to the binary
32788  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32789    # Keep paths in /bin as-is, but remove trailing .exe if any
32790    new_path="${new_path/%.exe/}"
32791    # Do not save /bin paths to all_fixpath_prefixes!
32792  else
32793    # Not in mixed or Windows style, start by that.
32794    new_path=`cmd //c echo $new_path`
32795
32796  input_path="$new_path"
32797  # Check if we need to convert this using DOS-style short mode. If the path
32798  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32799  # take no chances and rewrite it.
32800  # Note: m4 eats our [], so we need to use [ and ] instead.
32801  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32802  if test "x$has_forbidden_chars" != x; then
32803    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32804    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32805  fi
32806
32807    # Output is in $new_path
32808
32809  windows_path="$new_path"
32810  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32811    unix_path=`$CYGPATH -u "$windows_path"`
32812    new_path="$unix_path"
32813  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32814    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32815    new_path="$unix_path"
32816  fi
32817
32818    # remove trailing .exe if any
32819    new_path="${new_path/%.exe/}"
32820
32821    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32822    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32823  fi
32824
32825  else
32826    # We're on a posix platform. Hooray! :)
32827    # First separate the path from the arguments. This will split at the first
32828    # space.
32829    complete="$AR"
32830    path="${complete%% *}"
32831    tmp="$complete EOL"
32832    arguments="${tmp#* }"
32833
32834    # Cannot rely on the command "which" here since it doesn't always work.
32835    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32836    if test -z "$is_absolute_path"; then
32837      # Path to executable is not absolute. Find it.
32838      IFS_save="$IFS"
32839      IFS=:
32840      for p in $PATH; do
32841        if test -f "$p/$path" && test -x "$p/$path"; then
32842          new_path="$p/$path"
32843          break
32844        fi
32845      done
32846      IFS="$IFS_save"
32847    else
32848      # This is an absolute path, we can use it without further modifications.
32849      new_path="$path"
32850    fi
32851
32852    if test "x$new_path" = x; then
32853      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32854$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32855      has_space=`$ECHO "$complete" | $GREP " "`
32856      if test "x$has_space" != x; then
32857        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32858$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32859      fi
32860      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32861    fi
32862  fi
32863
32864  # Now join together the path and the arguments once again
32865  if test "x$arguments" != xEOL; then
32866    new_complete="$new_path ${arguments% *}"
32867  else
32868    new_complete="$new_path"
32869  fi
32870
32871  if test "x$complete" != "x$new_complete"; then
32872    AR="$new_complete"
32873    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
32874$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
32875  fi
32876
32877
32878
32879  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
32880    ac_ext=m
32881ac_cpp='$OBJCPP $CPPFLAGS'
32882ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
32883ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
32884ac_compiler_gnu=$ac_cv_objc_compiler_gnu
32885if test -n "$ac_tool_prefix"; then
32886  for ac_prog in gcc objcc objc cc CC
32887  do
32888    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32889set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32891$as_echo_n "checking for $ac_word... " >&6; }
32892if ${ac_cv_prog_OBJC+:} false; then :
32893  $as_echo_n "(cached) " >&6
32894else
32895  if test -n "$OBJC"; then
32896  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
32897else
32898as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32899for as_dir in $PATH
32900do
32901  IFS=$as_save_IFS
32902  test -z "$as_dir" && as_dir=.
32903    for ac_exec_ext in '' $ac_executable_extensions; do
32904  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32905    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
32906    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32907    break 2
32908  fi
32909done
32910  done
32911IFS=$as_save_IFS
32912
32913fi
32914fi
32915OBJC=$ac_cv_prog_OBJC
32916if test -n "$OBJC"; then
32917  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
32918$as_echo "$OBJC" >&6; }
32919else
32920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32921$as_echo "no" >&6; }
32922fi
32923
32924
32925    test -n "$OBJC" && break
32926  done
32927fi
32928if test -z "$OBJC"; then
32929  ac_ct_OBJC=$OBJC
32930  for ac_prog in gcc objcc objc cc CC
32931do
32932  # Extract the first word of "$ac_prog", so it can be a program name with args.
32933set dummy $ac_prog; ac_word=$2
32934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32935$as_echo_n "checking for $ac_word... " >&6; }
32936if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
32937  $as_echo_n "(cached) " >&6
32938else
32939  if test -n "$ac_ct_OBJC"; then
32940  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
32941else
32942as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32943for as_dir in $PATH
32944do
32945  IFS=$as_save_IFS
32946  test -z "$as_dir" && as_dir=.
32947    for ac_exec_ext in '' $ac_executable_extensions; do
32948  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32949    ac_cv_prog_ac_ct_OBJC="$ac_prog"
32950    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32951    break 2
32952  fi
32953done
32954  done
32955IFS=$as_save_IFS
32956
32957fi
32958fi
32959ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
32960if test -n "$ac_ct_OBJC"; then
32961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
32962$as_echo "$ac_ct_OBJC" >&6; }
32963else
32964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32965$as_echo "no" >&6; }
32966fi
32967
32968
32969  test -n "$ac_ct_OBJC" && break
32970done
32971
32972  if test "x$ac_ct_OBJC" = x; then
32973    OBJC="gcc"
32974  else
32975    case $cross_compiling:$ac_tool_warned in
32976yes:)
32977{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32978$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32979ac_tool_warned=yes ;;
32980esac
32981    OBJC=$ac_ct_OBJC
32982  fi
32983fi
32984
32985# Provide some information about the compiler.
32986$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
32987set X $ac_compile
32988ac_compiler=$2
32989for ac_option in --version -v -V -qversion; do
32990  { { ac_try="$ac_compiler $ac_option >&5"
32991case "(($ac_try" in
32992  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
32993  *) ac_try_echo=$ac_try;;
32994esac
32995eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
32996$as_echo "$ac_try_echo"; } >&5
32997  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
32998  ac_status=$?
32999  if test -s conftest.err; then
33000    sed '10a\
33001... rest of stderr output deleted ...
33002         10q' conftest.err >conftest.er1
33003    cat conftest.er1 >&5
33004  fi
33005  rm -f conftest.er1 conftest.err
33006  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33007  test $ac_status = 0; }
33008done
33009
33010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33011$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33012if ${ac_cv_objc_compiler_gnu+:} false; then :
33013  $as_echo_n "(cached) " >&6
33014else
33015  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33016/* end confdefs.h.  */
33017
33018int
33019main ()
33020{
33021#ifndef __GNUC__
33022       choke me
33023#endif
33024
33025  ;
33026  return 0;
33027}
33028_ACEOF
33029if ac_fn_objc_try_compile "$LINENO"; then :
33030  ac_compiler_gnu=yes
33031else
33032  ac_compiler_gnu=no
33033fi
33034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33035ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33036
33037fi
33038{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33039$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33040if test $ac_compiler_gnu = yes; then
33041  GOBJC=yes
33042else
33043  GOBJC=
33044fi
33045ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33046ac_save_OBJCFLAGS=$OBJCFLAGS
33047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33048$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33049if ${ac_cv_prog_objc_g+:} false; then :
33050  $as_echo_n "(cached) " >&6
33051else
33052  ac_save_objc_werror_flag=$ac_objc_werror_flag
33053   ac_objc_werror_flag=yes
33054   ac_cv_prog_objc_g=no
33055   OBJCFLAGS="-g"
33056   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33057/* end confdefs.h.  */
33058
33059int
33060main ()
33061{
33062
33063  ;
33064  return 0;
33065}
33066_ACEOF
33067if ac_fn_objc_try_compile "$LINENO"; then :
33068  ac_cv_prog_objc_g=yes
33069else
33070  OBJCFLAGS=""
33071      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33072/* end confdefs.h.  */
33073
33074int
33075main ()
33076{
33077
33078  ;
33079  return 0;
33080}
33081_ACEOF
33082if ac_fn_objc_try_compile "$LINENO"; then :
33083
33084else
33085  ac_objc_werror_flag=$ac_save_objc_werror_flag
33086	 OBJCFLAGS="-g"
33087	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33088/* end confdefs.h.  */
33089
33090int
33091main ()
33092{
33093
33094  ;
33095  return 0;
33096}
33097_ACEOF
33098if ac_fn_objc_try_compile "$LINENO"; then :
33099  ac_cv_prog_objc_g=yes
33100fi
33101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33102fi
33103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33104fi
33105rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33106   ac_objc_werror_flag=$ac_save_objc_werror_flag
33107fi
33108{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33109$as_echo "$ac_cv_prog_objc_g" >&6; }
33110if test "$ac_test_OBJCFLAGS" = set; then
33111  OBJCFLAGS=$ac_save_OBJCFLAGS
33112elif test $ac_cv_prog_objc_g = yes; then
33113  if test "$GOBJC" = yes; then
33114    OBJCFLAGS="-g -O2"
33115  else
33116    OBJCFLAGS="-g"
33117  fi
33118else
33119  if test "$GOBJC" = yes; then
33120    OBJCFLAGS="-O2"
33121  else
33122    OBJCFLAGS=
33123  fi
33124fi
33125ac_ext=cpp
33126ac_cpp='$CXXCPP $CPPFLAGS'
33127ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33128ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33129ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33130
33131
33132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33133
33134  # First separate the path from the arguments. This will split at the first
33135  # space.
33136  complete="$OBJC"
33137  path="${complete%% *}"
33138  tmp="$complete EOL"
33139  arguments="${tmp#* }"
33140
33141  # Input might be given as Windows format, start by converting to
33142  # unix format.
33143  new_path=`$CYGPATH -u "$path"`
33144
33145  # Now try to locate executable using which
33146  new_path=`$WHICH "$new_path" 2> /dev/null`
33147  # bat and cmd files are not always considered executable in cygwin causing which
33148  # to not find them
33149  if test "x$new_path" = x \
33150      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33151      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33152    new_path=`$CYGPATH -u "$path"`
33153  fi
33154  if test "x$new_path" = x; then
33155    # Oops. Which didn't find the executable.
33156    # The splitting of arguments from the executable at a space might have been incorrect,
33157    # since paths with space are more likely in Windows. Give it another try with the whole
33158    # argument.
33159    path="$complete"
33160    arguments="EOL"
33161    new_path=`$CYGPATH -u "$path"`
33162    new_path=`$WHICH "$new_path" 2> /dev/null`
33163    # bat and cmd files are not always considered executable in cygwin causing which
33164    # to not find them
33165    if test "x$new_path" = x \
33166        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33167        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33168      new_path=`$CYGPATH -u "$path"`
33169    fi
33170    if test "x$new_path" = x; then
33171      # It's still not found. Now this is an unrecoverable error.
33172      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33173$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33174      has_space=`$ECHO "$complete" | $GREP " "`
33175      if test "x$has_space" != x; then
33176        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33177$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33178      fi
33179      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33180    fi
33181  fi
33182
33183  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33184  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33185  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33186  # "foo.exe" is OK but "foo" is an error.
33187  #
33188  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33189  # It is also a way to make sure we got the proper file name for the real test later on.
33190  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33191  if test "x$test_shortpath" = x; then
33192    # Short path failed, file does not exist as specified.
33193    # Try adding .exe or .cmd
33194    if test -f "${new_path}.exe"; then
33195      input_to_shortpath="${new_path}.exe"
33196    elif test -f "${new_path}.cmd"; then
33197      input_to_shortpath="${new_path}.cmd"
33198    else
33199      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33200$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33201      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33202$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33203      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33204    fi
33205  else
33206    input_to_shortpath="$new_path"
33207  fi
33208
33209  # Call helper function which possibly converts this using DOS-style short mode.
33210  # If so, the updated path is stored in $new_path.
33211  new_path="$input_to_shortpath"
33212
33213  input_path="$input_to_shortpath"
33214  # Check if we need to convert this using DOS-style short mode. If the path
33215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33216  # take no chances and rewrite it.
33217  # Note: m4 eats our [], so we need to use [ and ] instead.
33218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33219  if test "x$has_forbidden_chars" != x; then
33220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33221    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33222    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33223    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33224      # Going to short mode and back again did indeed matter. Since short mode is
33225      # case insensitive, let's make it lowercase to improve readability.
33226      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33227      # Now convert it back to Unix-stile (cygpath)
33228      input_path=`$CYGPATH -u "$shortmode_path"`
33229      new_path="$input_path"
33230    fi
33231  fi
33232
33233  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33234  if test "x$test_cygdrive_prefix" = x; then
33235    # As a simple fix, exclude /usr/bin since it's not a real path.
33236    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33237      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33238      # a path prefixed by /cygdrive for fixpath to work.
33239      new_path="$CYGWIN_ROOT_PATH$input_path"
33240    fi
33241  fi
33242
33243  # remove trailing .exe if any
33244  new_path="${new_path/%.exe/}"
33245
33246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33247
33248  # First separate the path from the arguments. This will split at the first
33249  # space.
33250  complete="$OBJC"
33251  path="${complete%% *}"
33252  tmp="$complete EOL"
33253  arguments="${tmp#* }"
33254
33255  # Input might be given as Windows format, start by converting to
33256  # unix format.
33257  new_path="$path"
33258
33259  windows_path="$new_path"
33260  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33261    unix_path=`$CYGPATH -u "$windows_path"`
33262    new_path="$unix_path"
33263  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33264    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33265    new_path="$unix_path"
33266  fi
33267
33268
33269  # Now try to locate executable using which
33270  new_path=`$WHICH "$new_path" 2> /dev/null`
33271
33272  if test "x$new_path" = x; then
33273    # Oops. Which didn't find the executable.
33274    # The splitting of arguments from the executable at a space might have been incorrect,
33275    # since paths with space are more likely in Windows. Give it another try with the whole
33276    # argument.
33277    path="$complete"
33278    arguments="EOL"
33279    new_path="$path"
33280
33281  windows_path="$new_path"
33282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33283    unix_path=`$CYGPATH -u "$windows_path"`
33284    new_path="$unix_path"
33285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33287    new_path="$unix_path"
33288  fi
33289
33290
33291    new_path=`$WHICH "$new_path" 2> /dev/null`
33292
33293    if test "x$new_path" = x; then
33294      # It's still not found. Now this is an unrecoverable error.
33295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33296$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33297      has_space=`$ECHO "$complete" | $GREP " "`
33298      if test "x$has_space" != x; then
33299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33301      fi
33302      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33303    fi
33304  fi
33305
33306  # Now new_path has a complete unix path to the binary
33307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33308    # Keep paths in /bin as-is, but remove trailing .exe if any
33309    new_path="${new_path/%.exe/}"
33310    # Do not save /bin paths to all_fixpath_prefixes!
33311  else
33312    # Not in mixed or Windows style, start by that.
33313    new_path=`cmd //c echo $new_path`
33314
33315  input_path="$new_path"
33316  # Check if we need to convert this using DOS-style short mode. If the path
33317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33318  # take no chances and rewrite it.
33319  # Note: m4 eats our [], so we need to use [ and ] instead.
33320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33321  if test "x$has_forbidden_chars" != x; then
33322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33324  fi
33325
33326    # Output is in $new_path
33327
33328  windows_path="$new_path"
33329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33330    unix_path=`$CYGPATH -u "$windows_path"`
33331    new_path="$unix_path"
33332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33334    new_path="$unix_path"
33335  fi
33336
33337    # remove trailing .exe if any
33338    new_path="${new_path/%.exe/}"
33339
33340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33342  fi
33343
33344  else
33345    # We're on a posix platform. Hooray! :)
33346    # First separate the path from the arguments. This will split at the first
33347    # space.
33348    complete="$OBJC"
33349    path="${complete%% *}"
33350    tmp="$complete EOL"
33351    arguments="${tmp#* }"
33352
33353    # Cannot rely on the command "which" here since it doesn't always work.
33354    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33355    if test -z "$is_absolute_path"; then
33356      # Path to executable is not absolute. Find it.
33357      IFS_save="$IFS"
33358      IFS=:
33359      for p in $PATH; do
33360        if test -f "$p/$path" && test -x "$p/$path"; then
33361          new_path="$p/$path"
33362          break
33363        fi
33364      done
33365      IFS="$IFS_save"
33366    else
33367      # This is an absolute path, we can use it without further modifications.
33368      new_path="$path"
33369    fi
33370
33371    if test "x$new_path" = x; then
33372      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33373$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33374      has_space=`$ECHO "$complete" | $GREP " "`
33375      if test "x$has_space" != x; then
33376        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33378      fi
33379      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33380    fi
33381  fi
33382
33383  # Now join together the path and the arguments once again
33384  if test "x$arguments" != xEOL; then
33385    new_complete="$new_path ${arguments% *}"
33386  else
33387    new_complete="$new_path"
33388  fi
33389
33390  if test "x$complete" != "x$new_complete"; then
33391    OBJC="$new_complete"
33392    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33393$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33394  fi
33395
33396
33397
33398  # Publish this variable in the help.
33399
33400
33401  if test "x$LIPO" = x; then
33402    # The variable is not set by user, try to locate tool using the code snippet
33403    for ac_prog in lipo
33404do
33405  # Extract the first word of "$ac_prog", so it can be a program name with args.
33406set dummy $ac_prog; ac_word=$2
33407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33408$as_echo_n "checking for $ac_word... " >&6; }
33409if ${ac_cv_path_LIPO+:} false; then :
33410  $as_echo_n "(cached) " >&6
33411else
33412  case $LIPO in
33413  [\\/]* | ?:[\\/]*)
33414  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33415  ;;
33416  *)
33417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33418for as_dir in $PATH
33419do
33420  IFS=$as_save_IFS
33421  test -z "$as_dir" && as_dir=.
33422    for ac_exec_ext in '' $ac_executable_extensions; do
33423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33424    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33426    break 2
33427  fi
33428done
33429  done
33430IFS=$as_save_IFS
33431
33432  ;;
33433esac
33434fi
33435LIPO=$ac_cv_path_LIPO
33436if test -n "$LIPO"; then
33437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33438$as_echo "$LIPO" >&6; }
33439else
33440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33441$as_echo "no" >&6; }
33442fi
33443
33444
33445  test -n "$LIPO" && break
33446done
33447
33448  else
33449    # The variable is set, but is it from the command line or the environment?
33450
33451    # Try to remove the string !LIPO! from our list.
33452    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33453    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33454      # If it failed, the variable was not from the command line. Ignore it,
33455      # but warn the user (except for BASH, which is always set by the calling BASH).
33456      if test "xLIPO" != xBASH; then
33457        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33458$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33459      fi
33460      # Try to locate tool using the code snippet
33461      for ac_prog in lipo
33462do
33463  # Extract the first word of "$ac_prog", so it can be a program name with args.
33464set dummy $ac_prog; ac_word=$2
33465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33466$as_echo_n "checking for $ac_word... " >&6; }
33467if ${ac_cv_path_LIPO+:} false; then :
33468  $as_echo_n "(cached) " >&6
33469else
33470  case $LIPO in
33471  [\\/]* | ?:[\\/]*)
33472  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33473  ;;
33474  *)
33475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33476for as_dir in $PATH
33477do
33478  IFS=$as_save_IFS
33479  test -z "$as_dir" && as_dir=.
33480    for ac_exec_ext in '' $ac_executable_extensions; do
33481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33482    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33484    break 2
33485  fi
33486done
33487  done
33488IFS=$as_save_IFS
33489
33490  ;;
33491esac
33492fi
33493LIPO=$ac_cv_path_LIPO
33494if test -n "$LIPO"; then
33495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33496$as_echo "$LIPO" >&6; }
33497else
33498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33499$as_echo "no" >&6; }
33500fi
33501
33502
33503  test -n "$LIPO" && break
33504done
33505
33506    else
33507      # If it succeeded, then it was overridden by the user. We will use it
33508      # for the tool.
33509
33510      # First remove it from the list of overridden variables, so we can test
33511      # for unknown variables in the end.
33512      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33513
33514      # Check if the provided tool contains a complete path.
33515      tool_specified="$LIPO"
33516      tool_basename="${tool_specified##*/}"
33517      if test "x$tool_basename" = "x$tool_specified"; then
33518        # A command without a complete path is provided, search $PATH.
33519        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33520$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33521        # Extract the first word of "$tool_basename", so it can be a program name with args.
33522set dummy $tool_basename; ac_word=$2
33523{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33524$as_echo_n "checking for $ac_word... " >&6; }
33525if ${ac_cv_path_LIPO+:} false; then :
33526  $as_echo_n "(cached) " >&6
33527else
33528  case $LIPO in
33529  [\\/]* | ?:[\\/]*)
33530  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33531  ;;
33532  *)
33533  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33534for as_dir in $PATH
33535do
33536  IFS=$as_save_IFS
33537  test -z "$as_dir" && as_dir=.
33538    for ac_exec_ext in '' $ac_executable_extensions; do
33539  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33540    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33541    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33542    break 2
33543  fi
33544done
33545  done
33546IFS=$as_save_IFS
33547
33548  ;;
33549esac
33550fi
33551LIPO=$ac_cv_path_LIPO
33552if test -n "$LIPO"; then
33553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33554$as_echo "$LIPO" >&6; }
33555else
33556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33557$as_echo "no" >&6; }
33558fi
33559
33560
33561        if test "x$LIPO" = x; then
33562          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33563        fi
33564      else
33565        # Otherwise we believe it is a complete path. Use it as it is.
33566        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33567$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33568        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33569$as_echo_n "checking for LIPO... " >&6; }
33570        if test ! -x "$tool_specified"; then
33571          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33572$as_echo "not found" >&6; }
33573          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33574        fi
33575        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33576$as_echo "$tool_specified" >&6; }
33577      fi
33578    fi
33579  fi
33580
33581
33582
33583  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33584
33585  # First separate the path from the arguments. This will split at the first
33586  # space.
33587  complete="$LIPO"
33588  path="${complete%% *}"
33589  tmp="$complete EOL"
33590  arguments="${tmp#* }"
33591
33592  # Input might be given as Windows format, start by converting to
33593  # unix format.
33594  new_path=`$CYGPATH -u "$path"`
33595
33596  # Now try to locate executable using which
33597  new_path=`$WHICH "$new_path" 2> /dev/null`
33598  # bat and cmd files are not always considered executable in cygwin causing which
33599  # to not find them
33600  if test "x$new_path" = x \
33601      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33602      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33603    new_path=`$CYGPATH -u "$path"`
33604  fi
33605  if test "x$new_path" = x; then
33606    # Oops. Which didn't find the executable.
33607    # The splitting of arguments from the executable at a space might have been incorrect,
33608    # since paths with space are more likely in Windows. Give it another try with the whole
33609    # argument.
33610    path="$complete"
33611    arguments="EOL"
33612    new_path=`$CYGPATH -u "$path"`
33613    new_path=`$WHICH "$new_path" 2> /dev/null`
33614    # bat and cmd files are not always considered executable in cygwin causing which
33615    # to not find them
33616    if test "x$new_path" = x \
33617        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33618        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33619      new_path=`$CYGPATH -u "$path"`
33620    fi
33621    if test "x$new_path" = x; then
33622      # It's still not found. Now this is an unrecoverable error.
33623      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33624$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33625      has_space=`$ECHO "$complete" | $GREP " "`
33626      if test "x$has_space" != x; then
33627        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33628$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33629      fi
33630      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33631    fi
33632  fi
33633
33634  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33635  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33636  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33637  # "foo.exe" is OK but "foo" is an error.
33638  #
33639  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33640  # It is also a way to make sure we got the proper file name for the real test later on.
33641  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33642  if test "x$test_shortpath" = x; then
33643    # Short path failed, file does not exist as specified.
33644    # Try adding .exe or .cmd
33645    if test -f "${new_path}.exe"; then
33646      input_to_shortpath="${new_path}.exe"
33647    elif test -f "${new_path}.cmd"; then
33648      input_to_shortpath="${new_path}.cmd"
33649    else
33650      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33651$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33652      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33653$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33654      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33655    fi
33656  else
33657    input_to_shortpath="$new_path"
33658  fi
33659
33660  # Call helper function which possibly converts this using DOS-style short mode.
33661  # If so, the updated path is stored in $new_path.
33662  new_path="$input_to_shortpath"
33663
33664  input_path="$input_to_shortpath"
33665  # Check if we need to convert this using DOS-style short mode. If the path
33666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33667  # take no chances and rewrite it.
33668  # Note: m4 eats our [], so we need to use [ and ] instead.
33669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33670  if test "x$has_forbidden_chars" != x; then
33671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33675      # Going to short mode and back again did indeed matter. Since short mode is
33676      # case insensitive, let's make it lowercase to improve readability.
33677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33678      # Now convert it back to Unix-stile (cygpath)
33679      input_path=`$CYGPATH -u "$shortmode_path"`
33680      new_path="$input_path"
33681    fi
33682  fi
33683
33684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33685  if test "x$test_cygdrive_prefix" = x; then
33686    # As a simple fix, exclude /usr/bin since it's not a real path.
33687    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33689      # a path prefixed by /cygdrive for fixpath to work.
33690      new_path="$CYGWIN_ROOT_PATH$input_path"
33691    fi
33692  fi
33693
33694  # remove trailing .exe if any
33695  new_path="${new_path/%.exe/}"
33696
33697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33698
33699  # First separate the path from the arguments. This will split at the first
33700  # space.
33701  complete="$LIPO"
33702  path="${complete%% *}"
33703  tmp="$complete EOL"
33704  arguments="${tmp#* }"
33705
33706  # Input might be given as Windows format, start by converting to
33707  # unix format.
33708  new_path="$path"
33709
33710  windows_path="$new_path"
33711  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33712    unix_path=`$CYGPATH -u "$windows_path"`
33713    new_path="$unix_path"
33714  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33715    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33716    new_path="$unix_path"
33717  fi
33718
33719
33720  # Now try to locate executable using which
33721  new_path=`$WHICH "$new_path" 2> /dev/null`
33722
33723  if test "x$new_path" = x; then
33724    # Oops. Which didn't find the executable.
33725    # The splitting of arguments from the executable at a space might have been incorrect,
33726    # since paths with space are more likely in Windows. Give it another try with the whole
33727    # argument.
33728    path="$complete"
33729    arguments="EOL"
33730    new_path="$path"
33731
33732  windows_path="$new_path"
33733  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33734    unix_path=`$CYGPATH -u "$windows_path"`
33735    new_path="$unix_path"
33736  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33737    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33738    new_path="$unix_path"
33739  fi
33740
33741
33742    new_path=`$WHICH "$new_path" 2> /dev/null`
33743
33744    if test "x$new_path" = x; then
33745      # It's still not found. Now this is an unrecoverable error.
33746      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33747$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33748      has_space=`$ECHO "$complete" | $GREP " "`
33749      if test "x$has_space" != x; then
33750        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33751$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33752      fi
33753      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33754    fi
33755  fi
33756
33757  # Now new_path has a complete unix path to the binary
33758  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33759    # Keep paths in /bin as-is, but remove trailing .exe if any
33760    new_path="${new_path/%.exe/}"
33761    # Do not save /bin paths to all_fixpath_prefixes!
33762  else
33763    # Not in mixed or Windows style, start by that.
33764    new_path=`cmd //c echo $new_path`
33765
33766  input_path="$new_path"
33767  # Check if we need to convert this using DOS-style short mode. If the path
33768  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33769  # take no chances and rewrite it.
33770  # Note: m4 eats our [], so we need to use [ and ] instead.
33771  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33772  if test "x$has_forbidden_chars" != x; then
33773    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33774    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33775  fi
33776
33777    # Output is in $new_path
33778
33779  windows_path="$new_path"
33780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33781    unix_path=`$CYGPATH -u "$windows_path"`
33782    new_path="$unix_path"
33783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33785    new_path="$unix_path"
33786  fi
33787
33788    # remove trailing .exe if any
33789    new_path="${new_path/%.exe/}"
33790
33791    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33792    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33793  fi
33794
33795  else
33796    # We're on a posix platform. Hooray! :)
33797    # First separate the path from the arguments. This will split at the first
33798    # space.
33799    complete="$LIPO"
33800    path="${complete%% *}"
33801    tmp="$complete EOL"
33802    arguments="${tmp#* }"
33803
33804    # Cannot rely on the command "which" here since it doesn't always work.
33805    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33806    if test -z "$is_absolute_path"; then
33807      # Path to executable is not absolute. Find it.
33808      IFS_save="$IFS"
33809      IFS=:
33810      for p in $PATH; do
33811        if test -f "$p/$path" && test -x "$p/$path"; then
33812          new_path="$p/$path"
33813          break
33814        fi
33815      done
33816      IFS="$IFS_save"
33817    else
33818      # This is an absolute path, we can use it without further modifications.
33819      new_path="$path"
33820    fi
33821
33822    if test "x$new_path" = x; then
33823      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33824$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33825      has_space=`$ECHO "$complete" | $GREP " "`
33826      if test "x$has_space" != x; then
33827        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33828$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33829      fi
33830      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33831    fi
33832  fi
33833
33834  # Now join together the path and the arguments once again
33835  if test "x$arguments" != xEOL; then
33836    new_complete="$new_path ${arguments% *}"
33837  else
33838    new_complete="$new_path"
33839  fi
33840
33841  if test "x$complete" != "x$new_complete"; then
33842    LIPO="$new_complete"
33843    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33844$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33845  fi
33846
33847  else
33848    OBJC=
33849  fi
33850
33851  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33852    # Extract the first word of "mt", so it can be a program name with args.
33853set dummy mt; ac_word=$2
33854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33855$as_echo_n "checking for $ac_word... " >&6; }
33856if ${ac_cv_prog_MT+:} false; then :
33857  $as_echo_n "(cached) " >&6
33858else
33859  if test -n "$MT"; then
33860  ac_cv_prog_MT="$MT" # Let the user override the test.
33861else
33862  ac_prog_rejected=no
33863as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33864for as_dir in $PATH
33865do
33866  IFS=$as_save_IFS
33867  test -z "$as_dir" && as_dir=.
33868    for ac_exec_ext in '' $ac_executable_extensions; do
33869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33870    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33871       ac_prog_rejected=yes
33872       continue
33873     fi
33874    ac_cv_prog_MT="mt"
33875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33876    break 2
33877  fi
33878done
33879  done
33880IFS=$as_save_IFS
33881
33882if test $ac_prog_rejected = yes; then
33883  # We found a bogon in the path, so make sure we never use it.
33884  set dummy $ac_cv_prog_MT
33885  shift
33886  if test $# != 0; then
33887    # We chose a different compiler from the bogus one.
33888    # However, it has the same basename, so the bogon will be chosen
33889    # first if we set MT to just the basename; use the full file name.
33890    shift
33891    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
33892  fi
33893fi
33894fi
33895fi
33896MT=$ac_cv_prog_MT
33897if test -n "$MT"; then
33898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
33899$as_echo "$MT" >&6; }
33900else
33901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33902$as_echo "no" >&6; }
33903fi
33904
33905
33906
33907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33908
33909  # First separate the path from the arguments. This will split at the first
33910  # space.
33911  complete="$MT"
33912  path="${complete%% *}"
33913  tmp="$complete EOL"
33914  arguments="${tmp#* }"
33915
33916  # Input might be given as Windows format, start by converting to
33917  # unix format.
33918  new_path=`$CYGPATH -u "$path"`
33919
33920  # Now try to locate executable using which
33921  new_path=`$WHICH "$new_path" 2> /dev/null`
33922  # bat and cmd files are not always considered executable in cygwin causing which
33923  # to not find them
33924  if test "x$new_path" = x \
33925      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33926      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33927    new_path=`$CYGPATH -u "$path"`
33928  fi
33929  if test "x$new_path" = x; then
33930    # Oops. Which didn't find the executable.
33931    # The splitting of arguments from the executable at a space might have been incorrect,
33932    # since paths with space are more likely in Windows. Give it another try with the whole
33933    # argument.
33934    path="$complete"
33935    arguments="EOL"
33936    new_path=`$CYGPATH -u "$path"`
33937    new_path=`$WHICH "$new_path" 2> /dev/null`
33938    # bat and cmd files are not always considered executable in cygwin causing which
33939    # to not find them
33940    if test "x$new_path" = x \
33941        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33942        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33943      new_path=`$CYGPATH -u "$path"`
33944    fi
33945    if test "x$new_path" = x; then
33946      # It's still not found. Now this is an unrecoverable error.
33947      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
33948$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
33949      has_space=`$ECHO "$complete" | $GREP " "`
33950      if test "x$has_space" != x; then
33951        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33952$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33953      fi
33954      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33955    fi
33956  fi
33957
33958  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33959  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33960  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33961  # "foo.exe" is OK but "foo" is an error.
33962  #
33963  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33964  # It is also a way to make sure we got the proper file name for the real test later on.
33965  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33966  if test "x$test_shortpath" = x; then
33967    # Short path failed, file does not exist as specified.
33968    # Try adding .exe or .cmd
33969    if test -f "${new_path}.exe"; then
33970      input_to_shortpath="${new_path}.exe"
33971    elif test -f "${new_path}.cmd"; then
33972      input_to_shortpath="${new_path}.cmd"
33973    else
33974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
33975$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
33976      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33977$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33978      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
33979    fi
33980  else
33981    input_to_shortpath="$new_path"
33982  fi
33983
33984  # Call helper function which possibly converts this using DOS-style short mode.
33985  # If so, the updated path is stored in $new_path.
33986  new_path="$input_to_shortpath"
33987
33988  input_path="$input_to_shortpath"
33989  # Check if we need to convert this using DOS-style short mode. If the path
33990  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33991  # take no chances and rewrite it.
33992  # Note: m4 eats our [], so we need to use [ and ] instead.
33993  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33994  if test "x$has_forbidden_chars" != x; then
33995    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33996    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33997    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33998    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33999      # Going to short mode and back again did indeed matter. Since short mode is
34000      # case insensitive, let's make it lowercase to improve readability.
34001      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34002      # Now convert it back to Unix-stile (cygpath)
34003      input_path=`$CYGPATH -u "$shortmode_path"`
34004      new_path="$input_path"
34005    fi
34006  fi
34007
34008  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34009  if test "x$test_cygdrive_prefix" = x; then
34010    # As a simple fix, exclude /usr/bin since it's not a real path.
34011    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34012      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34013      # a path prefixed by /cygdrive for fixpath to work.
34014      new_path="$CYGWIN_ROOT_PATH$input_path"
34015    fi
34016  fi
34017
34018  # remove trailing .exe if any
34019  new_path="${new_path/%.exe/}"
34020
34021  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34022
34023  # First separate the path from the arguments. This will split at the first
34024  # space.
34025  complete="$MT"
34026  path="${complete%% *}"
34027  tmp="$complete EOL"
34028  arguments="${tmp#* }"
34029
34030  # Input might be given as Windows format, start by converting to
34031  # unix format.
34032  new_path="$path"
34033
34034  windows_path="$new_path"
34035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34036    unix_path=`$CYGPATH -u "$windows_path"`
34037    new_path="$unix_path"
34038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34040    new_path="$unix_path"
34041  fi
34042
34043
34044  # Now try to locate executable using which
34045  new_path=`$WHICH "$new_path" 2> /dev/null`
34046
34047  if test "x$new_path" = x; then
34048    # Oops. Which didn't find the executable.
34049    # The splitting of arguments from the executable at a space might have been incorrect,
34050    # since paths with space are more likely in Windows. Give it another try with the whole
34051    # argument.
34052    path="$complete"
34053    arguments="EOL"
34054    new_path="$path"
34055
34056  windows_path="$new_path"
34057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34058    unix_path=`$CYGPATH -u "$windows_path"`
34059    new_path="$unix_path"
34060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34062    new_path="$unix_path"
34063  fi
34064
34065
34066    new_path=`$WHICH "$new_path" 2> /dev/null`
34067
34068    if test "x$new_path" = x; then
34069      # It's still not found. Now this is an unrecoverable error.
34070      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34071$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34072      has_space=`$ECHO "$complete" | $GREP " "`
34073      if test "x$has_space" != x; then
34074        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34075$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34076      fi
34077      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34078    fi
34079  fi
34080
34081  # Now new_path has a complete unix path to the binary
34082  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34083    # Keep paths in /bin as-is, but remove trailing .exe if any
34084    new_path="${new_path/%.exe/}"
34085    # Do not save /bin paths to all_fixpath_prefixes!
34086  else
34087    # Not in mixed or Windows style, start by that.
34088    new_path=`cmd //c echo $new_path`
34089
34090  input_path="$new_path"
34091  # Check if we need to convert this using DOS-style short mode. If the path
34092  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34093  # take no chances and rewrite it.
34094  # Note: m4 eats our [], so we need to use [ and ] instead.
34095  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34096  if test "x$has_forbidden_chars" != x; then
34097    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34098    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34099  fi
34100
34101    # Output is in $new_path
34102
34103  windows_path="$new_path"
34104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34105    unix_path=`$CYGPATH -u "$windows_path"`
34106    new_path="$unix_path"
34107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34109    new_path="$unix_path"
34110  fi
34111
34112    # remove trailing .exe if any
34113    new_path="${new_path/%.exe/}"
34114
34115    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34116    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34117  fi
34118
34119  else
34120    # We're on a posix platform. Hooray! :)
34121    # First separate the path from the arguments. This will split at the first
34122    # space.
34123    complete="$MT"
34124    path="${complete%% *}"
34125    tmp="$complete EOL"
34126    arguments="${tmp#* }"
34127
34128    # Cannot rely on the command "which" here since it doesn't always work.
34129    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34130    if test -z "$is_absolute_path"; then
34131      # Path to executable is not absolute. Find it.
34132      IFS_save="$IFS"
34133      IFS=:
34134      for p in $PATH; do
34135        if test -f "$p/$path" && test -x "$p/$path"; then
34136          new_path="$p/$path"
34137          break
34138        fi
34139      done
34140      IFS="$IFS_save"
34141    else
34142      # This is an absolute path, we can use it without further modifications.
34143      new_path="$path"
34144    fi
34145
34146    if test "x$new_path" = x; then
34147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34148$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34149      has_space=`$ECHO "$complete" | $GREP " "`
34150      if test "x$has_space" != x; then
34151        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34152$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34153      fi
34154      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34155    fi
34156  fi
34157
34158  # Now join together the path and the arguments once again
34159  if test "x$arguments" != xEOL; then
34160    new_complete="$new_path ${arguments% *}"
34161  else
34162    new_complete="$new_path"
34163  fi
34164
34165  if test "x$complete" != "x$new_complete"; then
34166    MT="$new_complete"
34167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34168$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34169  fi
34170
34171    # Setup the resource compiler (RC)
34172    # Extract the first word of "rc", so it can be a program name with args.
34173set dummy rc; ac_word=$2
34174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34175$as_echo_n "checking for $ac_word... " >&6; }
34176if ${ac_cv_prog_RC+:} false; then :
34177  $as_echo_n "(cached) " >&6
34178else
34179  if test -n "$RC"; then
34180  ac_cv_prog_RC="$RC" # Let the user override the test.
34181else
34182  ac_prog_rejected=no
34183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34184for as_dir in $PATH
34185do
34186  IFS=$as_save_IFS
34187  test -z "$as_dir" && as_dir=.
34188    for ac_exec_ext in '' $ac_executable_extensions; do
34189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34190    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34191       ac_prog_rejected=yes
34192       continue
34193     fi
34194    ac_cv_prog_RC="rc"
34195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34196    break 2
34197  fi
34198done
34199  done
34200IFS=$as_save_IFS
34201
34202if test $ac_prog_rejected = yes; then
34203  # We found a bogon in the path, so make sure we never use it.
34204  set dummy $ac_cv_prog_RC
34205  shift
34206  if test $# != 0; then
34207    # We chose a different compiler from the bogus one.
34208    # However, it has the same basename, so the bogon will be chosen
34209    # first if we set RC to just the basename; use the full file name.
34210    shift
34211    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34212  fi
34213fi
34214fi
34215fi
34216RC=$ac_cv_prog_RC
34217if test -n "$RC"; then
34218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34219$as_echo "$RC" >&6; }
34220else
34221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34222$as_echo "no" >&6; }
34223fi
34224
34225
34226
34227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34228
34229  # First separate the path from the arguments. This will split at the first
34230  # space.
34231  complete="$RC"
34232  path="${complete%% *}"
34233  tmp="$complete EOL"
34234  arguments="${tmp#* }"
34235
34236  # Input might be given as Windows format, start by converting to
34237  # unix format.
34238  new_path=`$CYGPATH -u "$path"`
34239
34240  # Now try to locate executable using which
34241  new_path=`$WHICH "$new_path" 2> /dev/null`
34242  # bat and cmd files are not always considered executable in cygwin causing which
34243  # to not find them
34244  if test "x$new_path" = x \
34245      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34246      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34247    new_path=`$CYGPATH -u "$path"`
34248  fi
34249  if test "x$new_path" = x; then
34250    # Oops. Which didn't find the executable.
34251    # The splitting of arguments from the executable at a space might have been incorrect,
34252    # since paths with space are more likely in Windows. Give it another try with the whole
34253    # argument.
34254    path="$complete"
34255    arguments="EOL"
34256    new_path=`$CYGPATH -u "$path"`
34257    new_path=`$WHICH "$new_path" 2> /dev/null`
34258    # bat and cmd files are not always considered executable in cygwin causing which
34259    # to not find them
34260    if test "x$new_path" = x \
34261        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34262        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34263      new_path=`$CYGPATH -u "$path"`
34264    fi
34265    if test "x$new_path" = x; then
34266      # It's still not found. Now this is an unrecoverable error.
34267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34268$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34269      has_space=`$ECHO "$complete" | $GREP " "`
34270      if test "x$has_space" != x; then
34271        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34272$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34273      fi
34274      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34275    fi
34276  fi
34277
34278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34281  # "foo.exe" is OK but "foo" is an error.
34282  #
34283  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34284  # It is also a way to make sure we got the proper file name for the real test later on.
34285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34286  if test "x$test_shortpath" = x; then
34287    # Short path failed, file does not exist as specified.
34288    # Try adding .exe or .cmd
34289    if test -f "${new_path}.exe"; then
34290      input_to_shortpath="${new_path}.exe"
34291    elif test -f "${new_path}.cmd"; then
34292      input_to_shortpath="${new_path}.cmd"
34293    else
34294      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34295$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34296      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34297$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34298      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34299    fi
34300  else
34301    input_to_shortpath="$new_path"
34302  fi
34303
34304  # Call helper function which possibly converts this using DOS-style short mode.
34305  # If so, the updated path is stored in $new_path.
34306  new_path="$input_to_shortpath"
34307
34308  input_path="$input_to_shortpath"
34309  # Check if we need to convert this using DOS-style short mode. If the path
34310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34311  # take no chances and rewrite it.
34312  # Note: m4 eats our [], so we need to use [ and ] instead.
34313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34314  if test "x$has_forbidden_chars" != x; then
34315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34316    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34317    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34318    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34319      # Going to short mode and back again did indeed matter. Since short mode is
34320      # case insensitive, let's make it lowercase to improve readability.
34321      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34322      # Now convert it back to Unix-stile (cygpath)
34323      input_path=`$CYGPATH -u "$shortmode_path"`
34324      new_path="$input_path"
34325    fi
34326  fi
34327
34328  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34329  if test "x$test_cygdrive_prefix" = x; then
34330    # As a simple fix, exclude /usr/bin since it's not a real path.
34331    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34332      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34333      # a path prefixed by /cygdrive for fixpath to work.
34334      new_path="$CYGWIN_ROOT_PATH$input_path"
34335    fi
34336  fi
34337
34338  # remove trailing .exe if any
34339  new_path="${new_path/%.exe/}"
34340
34341  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34342
34343  # First separate the path from the arguments. This will split at the first
34344  # space.
34345  complete="$RC"
34346  path="${complete%% *}"
34347  tmp="$complete EOL"
34348  arguments="${tmp#* }"
34349
34350  # Input might be given as Windows format, start by converting to
34351  # unix format.
34352  new_path="$path"
34353
34354  windows_path="$new_path"
34355  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34356    unix_path=`$CYGPATH -u "$windows_path"`
34357    new_path="$unix_path"
34358  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34359    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34360    new_path="$unix_path"
34361  fi
34362
34363
34364  # Now try to locate executable using which
34365  new_path=`$WHICH "$new_path" 2> /dev/null`
34366
34367  if test "x$new_path" = x; then
34368    # Oops. Which didn't find the executable.
34369    # The splitting of arguments from the executable at a space might have been incorrect,
34370    # since paths with space are more likely in Windows. Give it another try with the whole
34371    # argument.
34372    path="$complete"
34373    arguments="EOL"
34374    new_path="$path"
34375
34376  windows_path="$new_path"
34377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34378    unix_path=`$CYGPATH -u "$windows_path"`
34379    new_path="$unix_path"
34380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34382    new_path="$unix_path"
34383  fi
34384
34385
34386    new_path=`$WHICH "$new_path" 2> /dev/null`
34387
34388    if test "x$new_path" = x; then
34389      # It's still not found. Now this is an unrecoverable error.
34390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34391$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34392      has_space=`$ECHO "$complete" | $GREP " "`
34393      if test "x$has_space" != x; then
34394        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34395$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34396      fi
34397      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34398    fi
34399  fi
34400
34401  # Now new_path has a complete unix path to the binary
34402  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34403    # Keep paths in /bin as-is, but remove trailing .exe if any
34404    new_path="${new_path/%.exe/}"
34405    # Do not save /bin paths to all_fixpath_prefixes!
34406  else
34407    # Not in mixed or Windows style, start by that.
34408    new_path=`cmd //c echo $new_path`
34409
34410  input_path="$new_path"
34411  # Check if we need to convert this using DOS-style short mode. If the path
34412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34413  # take no chances and rewrite it.
34414  # Note: m4 eats our [], so we need to use [ and ] instead.
34415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34416  if test "x$has_forbidden_chars" != x; then
34417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34419  fi
34420
34421    # Output is in $new_path
34422
34423  windows_path="$new_path"
34424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34425    unix_path=`$CYGPATH -u "$windows_path"`
34426    new_path="$unix_path"
34427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34429    new_path="$unix_path"
34430  fi
34431
34432    # remove trailing .exe if any
34433    new_path="${new_path/%.exe/}"
34434
34435    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34436    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34437  fi
34438
34439  else
34440    # We're on a posix platform. Hooray! :)
34441    # First separate the path from the arguments. This will split at the first
34442    # space.
34443    complete="$RC"
34444    path="${complete%% *}"
34445    tmp="$complete EOL"
34446    arguments="${tmp#* }"
34447
34448    # Cannot rely on the command "which" here since it doesn't always work.
34449    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34450    if test -z "$is_absolute_path"; then
34451      # Path to executable is not absolute. Find it.
34452      IFS_save="$IFS"
34453      IFS=:
34454      for p in $PATH; do
34455        if test -f "$p/$path" && test -x "$p/$path"; then
34456          new_path="$p/$path"
34457          break
34458        fi
34459      done
34460      IFS="$IFS_save"
34461    else
34462      # This is an absolute path, we can use it without further modifications.
34463      new_path="$path"
34464    fi
34465
34466    if test "x$new_path" = x; then
34467      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34468$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34469      has_space=`$ECHO "$complete" | $GREP " "`
34470      if test "x$has_space" != x; then
34471        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34472$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34473      fi
34474      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34475    fi
34476  fi
34477
34478  # Now join together the path and the arguments once again
34479  if test "x$arguments" != xEOL; then
34480    new_complete="$new_path ${arguments% *}"
34481  else
34482    new_complete="$new_path"
34483  fi
34484
34485  if test "x$complete" != "x$new_complete"; then
34486    RC="$new_complete"
34487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34488$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34489  fi
34490
34491    # Extract the first word of "dumpbin", so it can be a program name with args.
34492set dummy dumpbin; ac_word=$2
34493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34494$as_echo_n "checking for $ac_word... " >&6; }
34495if ${ac_cv_prog_DUMPBIN+:} false; then :
34496  $as_echo_n "(cached) " >&6
34497else
34498  if test -n "$DUMPBIN"; then
34499  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34500else
34501as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34502for as_dir in $PATH
34503do
34504  IFS=$as_save_IFS
34505  test -z "$as_dir" && as_dir=.
34506    for ac_exec_ext in '' $ac_executable_extensions; do
34507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34508    ac_cv_prog_DUMPBIN="dumpbin"
34509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34510    break 2
34511  fi
34512done
34513  done
34514IFS=$as_save_IFS
34515
34516fi
34517fi
34518DUMPBIN=$ac_cv_prog_DUMPBIN
34519if test -n "$DUMPBIN"; then
34520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34521$as_echo "$DUMPBIN" >&6; }
34522else
34523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34524$as_echo "no" >&6; }
34525fi
34526
34527
34528
34529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34530
34531  # First separate the path from the arguments. This will split at the first
34532  # space.
34533  complete="$DUMPBIN"
34534  path="${complete%% *}"
34535  tmp="$complete EOL"
34536  arguments="${tmp#* }"
34537
34538  # Input might be given as Windows format, start by converting to
34539  # unix format.
34540  new_path=`$CYGPATH -u "$path"`
34541
34542  # Now try to locate executable using which
34543  new_path=`$WHICH "$new_path" 2> /dev/null`
34544  # bat and cmd files are not always considered executable in cygwin causing which
34545  # to not find them
34546  if test "x$new_path" = x \
34547      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34548      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34549    new_path=`$CYGPATH -u "$path"`
34550  fi
34551  if test "x$new_path" = x; then
34552    # Oops. Which didn't find the executable.
34553    # The splitting of arguments from the executable at a space might have been incorrect,
34554    # since paths with space are more likely in Windows. Give it another try with the whole
34555    # argument.
34556    path="$complete"
34557    arguments="EOL"
34558    new_path=`$CYGPATH -u "$path"`
34559    new_path=`$WHICH "$new_path" 2> /dev/null`
34560    # bat and cmd files are not always considered executable in cygwin causing which
34561    # to not find them
34562    if test "x$new_path" = x \
34563        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34564        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34565      new_path=`$CYGPATH -u "$path"`
34566    fi
34567    if test "x$new_path" = x; then
34568      # It's still not found. Now this is an unrecoverable error.
34569      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34570$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34571      has_space=`$ECHO "$complete" | $GREP " "`
34572      if test "x$has_space" != x; then
34573        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34574$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34575      fi
34576      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34577    fi
34578  fi
34579
34580  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34581  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34582  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34583  # "foo.exe" is OK but "foo" is an error.
34584  #
34585  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34586  # It is also a way to make sure we got the proper file name for the real test later on.
34587  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34588  if test "x$test_shortpath" = x; then
34589    # Short path failed, file does not exist as specified.
34590    # Try adding .exe or .cmd
34591    if test -f "${new_path}.exe"; then
34592      input_to_shortpath="${new_path}.exe"
34593    elif test -f "${new_path}.cmd"; then
34594      input_to_shortpath="${new_path}.cmd"
34595    else
34596      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34597$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34598      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34599$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34600      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34601    fi
34602  else
34603    input_to_shortpath="$new_path"
34604  fi
34605
34606  # Call helper function which possibly converts this using DOS-style short mode.
34607  # If so, the updated path is stored in $new_path.
34608  new_path="$input_to_shortpath"
34609
34610  input_path="$input_to_shortpath"
34611  # Check if we need to convert this using DOS-style short mode. If the path
34612  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34613  # take no chances and rewrite it.
34614  # Note: m4 eats our [], so we need to use [ and ] instead.
34615  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34616  if test "x$has_forbidden_chars" != x; then
34617    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34618    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34619    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34620    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34621      # Going to short mode and back again did indeed matter. Since short mode is
34622      # case insensitive, let's make it lowercase to improve readability.
34623      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34624      # Now convert it back to Unix-stile (cygpath)
34625      input_path=`$CYGPATH -u "$shortmode_path"`
34626      new_path="$input_path"
34627    fi
34628  fi
34629
34630  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34631  if test "x$test_cygdrive_prefix" = x; then
34632    # As a simple fix, exclude /usr/bin since it's not a real path.
34633    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34634      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34635      # a path prefixed by /cygdrive for fixpath to work.
34636      new_path="$CYGWIN_ROOT_PATH$input_path"
34637    fi
34638  fi
34639
34640  # remove trailing .exe if any
34641  new_path="${new_path/%.exe/}"
34642
34643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34644
34645  # First separate the path from the arguments. This will split at the first
34646  # space.
34647  complete="$DUMPBIN"
34648  path="${complete%% *}"
34649  tmp="$complete EOL"
34650  arguments="${tmp#* }"
34651
34652  # Input might be given as Windows format, start by converting to
34653  # unix format.
34654  new_path="$path"
34655
34656  windows_path="$new_path"
34657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34658    unix_path=`$CYGPATH -u "$windows_path"`
34659    new_path="$unix_path"
34660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34662    new_path="$unix_path"
34663  fi
34664
34665
34666  # Now try to locate executable using which
34667  new_path=`$WHICH "$new_path" 2> /dev/null`
34668
34669  if test "x$new_path" = x; then
34670    # Oops. Which didn't find the executable.
34671    # The splitting of arguments from the executable at a space might have been incorrect,
34672    # since paths with space are more likely in Windows. Give it another try with the whole
34673    # argument.
34674    path="$complete"
34675    arguments="EOL"
34676    new_path="$path"
34677
34678  windows_path="$new_path"
34679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34680    unix_path=`$CYGPATH -u "$windows_path"`
34681    new_path="$unix_path"
34682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34684    new_path="$unix_path"
34685  fi
34686
34687
34688    new_path=`$WHICH "$new_path" 2> /dev/null`
34689
34690    if test "x$new_path" = x; then
34691      # It's still not found. Now this is an unrecoverable error.
34692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34693$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34694      has_space=`$ECHO "$complete" | $GREP " "`
34695      if test "x$has_space" != x; then
34696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34698      fi
34699      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34700    fi
34701  fi
34702
34703  # Now new_path has a complete unix path to the binary
34704  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34705    # Keep paths in /bin as-is, but remove trailing .exe if any
34706    new_path="${new_path/%.exe/}"
34707    # Do not save /bin paths to all_fixpath_prefixes!
34708  else
34709    # Not in mixed or Windows style, start by that.
34710    new_path=`cmd //c echo $new_path`
34711
34712  input_path="$new_path"
34713  # Check if we need to convert this using DOS-style short mode. If the path
34714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34715  # take no chances and rewrite it.
34716  # Note: m4 eats our [], so we need to use [ and ] instead.
34717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34718  if test "x$has_forbidden_chars" != x; then
34719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34721  fi
34722
34723    # Output is in $new_path
34724
34725  windows_path="$new_path"
34726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34727    unix_path=`$CYGPATH -u "$windows_path"`
34728    new_path="$unix_path"
34729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34731    new_path="$unix_path"
34732  fi
34733
34734    # remove trailing .exe if any
34735    new_path="${new_path/%.exe/}"
34736
34737    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34738    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34739  fi
34740
34741  else
34742    # We're on a posix platform. Hooray! :)
34743    # First separate the path from the arguments. This will split at the first
34744    # space.
34745    complete="$DUMPBIN"
34746    path="${complete%% *}"
34747    tmp="$complete EOL"
34748    arguments="${tmp#* }"
34749
34750    # Cannot rely on the command "which" here since it doesn't always work.
34751    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34752    if test -z "$is_absolute_path"; then
34753      # Path to executable is not absolute. Find it.
34754      IFS_save="$IFS"
34755      IFS=:
34756      for p in $PATH; do
34757        if test -f "$p/$path" && test -x "$p/$path"; then
34758          new_path="$p/$path"
34759          break
34760        fi
34761      done
34762      IFS="$IFS_save"
34763    else
34764      # This is an absolute path, we can use it without further modifications.
34765      new_path="$path"
34766    fi
34767
34768    if test "x$new_path" = x; then
34769      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34770$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34771      has_space=`$ECHO "$complete" | $GREP " "`
34772      if test "x$has_space" != x; then
34773        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34774$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34775      fi
34776      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34777    fi
34778  fi
34779
34780  # Now join together the path and the arguments once again
34781  if test "x$arguments" != xEOL; then
34782    new_complete="$new_path ${arguments% *}"
34783  else
34784    new_complete="$new_path"
34785  fi
34786
34787  if test "x$complete" != "x$new_complete"; then
34788    DUMPBIN="$new_complete"
34789    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34790$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34791  fi
34792
34793  fi
34794
34795  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34796
34797
34798  # Publish this variable in the help.
34799
34800
34801  if test "x$STRIP" = x; then
34802    # The variable is not set by user, try to locate tool using the code snippet
34803    for ac_prog in strip
34804do
34805  # Extract the first word of "$ac_prog", so it can be a program name with args.
34806set dummy $ac_prog; ac_word=$2
34807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34808$as_echo_n "checking for $ac_word... " >&6; }
34809if ${ac_cv_path_STRIP+:} false; then :
34810  $as_echo_n "(cached) " >&6
34811else
34812  case $STRIP in
34813  [\\/]* | ?:[\\/]*)
34814  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34815  ;;
34816  *)
34817  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34818for as_dir in $PATH
34819do
34820  IFS=$as_save_IFS
34821  test -z "$as_dir" && as_dir=.
34822    for ac_exec_ext in '' $ac_executable_extensions; do
34823  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34824    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34825    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34826    break 2
34827  fi
34828done
34829  done
34830IFS=$as_save_IFS
34831
34832  ;;
34833esac
34834fi
34835STRIP=$ac_cv_path_STRIP
34836if test -n "$STRIP"; then
34837  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34838$as_echo "$STRIP" >&6; }
34839else
34840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34841$as_echo "no" >&6; }
34842fi
34843
34844
34845  test -n "$STRIP" && break
34846done
34847
34848  else
34849    # The variable is set, but is it from the command line or the environment?
34850
34851    # Try to remove the string !STRIP! from our list.
34852    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34853    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34854      # If it failed, the variable was not from the command line. Ignore it,
34855      # but warn the user (except for BASH, which is always set by the calling BASH).
34856      if test "xSTRIP" != xBASH; then
34857        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34858$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34859      fi
34860      # Try to locate tool using the code snippet
34861      for ac_prog in strip
34862do
34863  # Extract the first word of "$ac_prog", so it can be a program name with args.
34864set dummy $ac_prog; ac_word=$2
34865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34866$as_echo_n "checking for $ac_word... " >&6; }
34867if ${ac_cv_path_STRIP+:} false; then :
34868  $as_echo_n "(cached) " >&6
34869else
34870  case $STRIP in
34871  [\\/]* | ?:[\\/]*)
34872  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34873  ;;
34874  *)
34875  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34876for as_dir in $PATH
34877do
34878  IFS=$as_save_IFS
34879  test -z "$as_dir" && as_dir=.
34880    for ac_exec_ext in '' $ac_executable_extensions; do
34881  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34882    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34883    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34884    break 2
34885  fi
34886done
34887  done
34888IFS=$as_save_IFS
34889
34890  ;;
34891esac
34892fi
34893STRIP=$ac_cv_path_STRIP
34894if test -n "$STRIP"; then
34895  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34896$as_echo "$STRIP" >&6; }
34897else
34898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34899$as_echo "no" >&6; }
34900fi
34901
34902
34903  test -n "$STRIP" && break
34904done
34905
34906    else
34907      # If it succeeded, then it was overridden by the user. We will use it
34908      # for the tool.
34909
34910      # First remove it from the list of overridden variables, so we can test
34911      # for unknown variables in the end.
34912      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
34913
34914      # Check if the provided tool contains a complete path.
34915      tool_specified="$STRIP"
34916      tool_basename="${tool_specified##*/}"
34917      if test "x$tool_basename" = "x$tool_specified"; then
34918        # A command without a complete path is provided, search $PATH.
34919        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
34920$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
34921        # Extract the first word of "$tool_basename", so it can be a program name with args.
34922set dummy $tool_basename; ac_word=$2
34923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34924$as_echo_n "checking for $ac_word... " >&6; }
34925if ${ac_cv_path_STRIP+:} false; then :
34926  $as_echo_n "(cached) " >&6
34927else
34928  case $STRIP in
34929  [\\/]* | ?:[\\/]*)
34930  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34931  ;;
34932  *)
34933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34934for as_dir in $PATH
34935do
34936  IFS=$as_save_IFS
34937  test -z "$as_dir" && as_dir=.
34938    for ac_exec_ext in '' $ac_executable_extensions; do
34939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34940    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34942    break 2
34943  fi
34944done
34945  done
34946IFS=$as_save_IFS
34947
34948  ;;
34949esac
34950fi
34951STRIP=$ac_cv_path_STRIP
34952if test -n "$STRIP"; then
34953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34954$as_echo "$STRIP" >&6; }
34955else
34956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34957$as_echo "no" >&6; }
34958fi
34959
34960
34961        if test "x$STRIP" = x; then
34962          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
34963        fi
34964      else
34965        # Otherwise we believe it is a complete path. Use it as it is.
34966        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
34967$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
34968        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
34969$as_echo_n "checking for STRIP... " >&6; }
34970        if test ! -x "$tool_specified"; then
34971          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
34972$as_echo "not found" >&6; }
34973          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
34974        fi
34975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
34976$as_echo "$tool_specified" >&6; }
34977      fi
34978    fi
34979  fi
34980
34981
34982
34983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34984
34985  # First separate the path from the arguments. This will split at the first
34986  # space.
34987  complete="$STRIP"
34988  path="${complete%% *}"
34989  tmp="$complete EOL"
34990  arguments="${tmp#* }"
34991
34992  # Input might be given as Windows format, start by converting to
34993  # unix format.
34994  new_path=`$CYGPATH -u "$path"`
34995
34996  # Now try to locate executable using which
34997  new_path=`$WHICH "$new_path" 2> /dev/null`
34998  # bat and cmd files are not always considered executable in cygwin causing which
34999  # to not find them
35000  if test "x$new_path" = x \
35001      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35002      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35003    new_path=`$CYGPATH -u "$path"`
35004  fi
35005  if test "x$new_path" = x; then
35006    # Oops. Which didn't find the executable.
35007    # The splitting of arguments from the executable at a space might have been incorrect,
35008    # since paths with space are more likely in Windows. Give it another try with the whole
35009    # argument.
35010    path="$complete"
35011    arguments="EOL"
35012    new_path=`$CYGPATH -u "$path"`
35013    new_path=`$WHICH "$new_path" 2> /dev/null`
35014    # bat and cmd files are not always considered executable in cygwin causing which
35015    # to not find them
35016    if test "x$new_path" = x \
35017        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35018        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35019      new_path=`$CYGPATH -u "$path"`
35020    fi
35021    if test "x$new_path" = x; then
35022      # It's still not found. Now this is an unrecoverable error.
35023      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35024$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35025      has_space=`$ECHO "$complete" | $GREP " "`
35026      if test "x$has_space" != x; then
35027        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35028$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35029      fi
35030      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35031    fi
35032  fi
35033
35034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35037  # "foo.exe" is OK but "foo" is an error.
35038  #
35039  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35040  # It is also a way to make sure we got the proper file name for the real test later on.
35041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35042  if test "x$test_shortpath" = x; then
35043    # Short path failed, file does not exist as specified.
35044    # Try adding .exe or .cmd
35045    if test -f "${new_path}.exe"; then
35046      input_to_shortpath="${new_path}.exe"
35047    elif test -f "${new_path}.cmd"; then
35048      input_to_shortpath="${new_path}.cmd"
35049    else
35050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35051$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35052      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35053$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35054      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35055    fi
35056  else
35057    input_to_shortpath="$new_path"
35058  fi
35059
35060  # Call helper function which possibly converts this using DOS-style short mode.
35061  # If so, the updated path is stored in $new_path.
35062  new_path="$input_to_shortpath"
35063
35064  input_path="$input_to_shortpath"
35065  # Check if we need to convert this using DOS-style short mode. If the path
35066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35067  # take no chances and rewrite it.
35068  # Note: m4 eats our [], so we need to use [ and ] instead.
35069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35070  if test "x$has_forbidden_chars" != x; then
35071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35075      # Going to short mode and back again did indeed matter. Since short mode is
35076      # case insensitive, let's make it lowercase to improve readability.
35077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35078      # Now convert it back to Unix-stile (cygpath)
35079      input_path=`$CYGPATH -u "$shortmode_path"`
35080      new_path="$input_path"
35081    fi
35082  fi
35083
35084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35085  if test "x$test_cygdrive_prefix" = x; then
35086    # As a simple fix, exclude /usr/bin since it's not a real path.
35087    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35089      # a path prefixed by /cygdrive for fixpath to work.
35090      new_path="$CYGWIN_ROOT_PATH$input_path"
35091    fi
35092  fi
35093
35094  # remove trailing .exe if any
35095  new_path="${new_path/%.exe/}"
35096
35097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35098
35099  # First separate the path from the arguments. This will split at the first
35100  # space.
35101  complete="$STRIP"
35102  path="${complete%% *}"
35103  tmp="$complete EOL"
35104  arguments="${tmp#* }"
35105
35106  # Input might be given as Windows format, start by converting to
35107  # unix format.
35108  new_path="$path"
35109
35110  windows_path="$new_path"
35111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35112    unix_path=`$CYGPATH -u "$windows_path"`
35113    new_path="$unix_path"
35114  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35115    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35116    new_path="$unix_path"
35117  fi
35118
35119
35120  # Now try to locate executable using which
35121  new_path=`$WHICH "$new_path" 2> /dev/null`
35122
35123  if test "x$new_path" = x; then
35124    # Oops. Which didn't find the executable.
35125    # The splitting of arguments from the executable at a space might have been incorrect,
35126    # since paths with space are more likely in Windows. Give it another try with the whole
35127    # argument.
35128    path="$complete"
35129    arguments="EOL"
35130    new_path="$path"
35131
35132  windows_path="$new_path"
35133  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35134    unix_path=`$CYGPATH -u "$windows_path"`
35135    new_path="$unix_path"
35136  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35137    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35138    new_path="$unix_path"
35139  fi
35140
35141
35142    new_path=`$WHICH "$new_path" 2> /dev/null`
35143
35144    if test "x$new_path" = x; then
35145      # It's still not found. Now this is an unrecoverable error.
35146      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35147$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35148      has_space=`$ECHO "$complete" | $GREP " "`
35149      if test "x$has_space" != x; then
35150        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35151$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35152      fi
35153      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35154    fi
35155  fi
35156
35157  # Now new_path has a complete unix path to the binary
35158  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35159    # Keep paths in /bin as-is, but remove trailing .exe if any
35160    new_path="${new_path/%.exe/}"
35161    # Do not save /bin paths to all_fixpath_prefixes!
35162  else
35163    # Not in mixed or Windows style, start by that.
35164    new_path=`cmd //c echo $new_path`
35165
35166  input_path="$new_path"
35167  # Check if we need to convert this using DOS-style short mode. If the path
35168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35169  # take no chances and rewrite it.
35170  # Note: m4 eats our [], so we need to use [ and ] instead.
35171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35172  if test "x$has_forbidden_chars" != x; then
35173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35175  fi
35176
35177    # Output is in $new_path
35178
35179  windows_path="$new_path"
35180  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35181    unix_path=`$CYGPATH -u "$windows_path"`
35182    new_path="$unix_path"
35183  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35184    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35185    new_path="$unix_path"
35186  fi
35187
35188    # remove trailing .exe if any
35189    new_path="${new_path/%.exe/}"
35190
35191    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35192    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35193  fi
35194
35195  else
35196    # We're on a posix platform. Hooray! :)
35197    # First separate the path from the arguments. This will split at the first
35198    # space.
35199    complete="$STRIP"
35200    path="${complete%% *}"
35201    tmp="$complete EOL"
35202    arguments="${tmp#* }"
35203
35204    # Cannot rely on the command "which" here since it doesn't always work.
35205    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35206    if test -z "$is_absolute_path"; then
35207      # Path to executable is not absolute. Find it.
35208      IFS_save="$IFS"
35209      IFS=:
35210      for p in $PATH; do
35211        if test -f "$p/$path" && test -x "$p/$path"; then
35212          new_path="$p/$path"
35213          break
35214        fi
35215      done
35216      IFS="$IFS_save"
35217    else
35218      # This is an absolute path, we can use it without further modifications.
35219      new_path="$path"
35220    fi
35221
35222    if test "x$new_path" = x; then
35223      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35224$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35225      has_space=`$ECHO "$complete" | $GREP " "`
35226      if test "x$has_space" != x; then
35227        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35228$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35229      fi
35230      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35231    fi
35232  fi
35233
35234  # Now join together the path and the arguments once again
35235  if test "x$arguments" != xEOL; then
35236    new_complete="$new_path ${arguments% *}"
35237  else
35238    new_complete="$new_path"
35239  fi
35240
35241  if test "x$complete" != "x$new_complete"; then
35242    STRIP="$new_complete"
35243    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35244$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35245  fi
35246
35247
35248
35249  # Publish this variable in the help.
35250
35251
35252  if test "x$NM" = x; then
35253    # The variable is not set by user, try to locate tool using the code snippet
35254    for ac_prog in nm
35255do
35256  # Extract the first word of "$ac_prog", so it can be a program name with args.
35257set dummy $ac_prog; ac_word=$2
35258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35259$as_echo_n "checking for $ac_word... " >&6; }
35260if ${ac_cv_path_NM+:} false; then :
35261  $as_echo_n "(cached) " >&6
35262else
35263  case $NM in
35264  [\\/]* | ?:[\\/]*)
35265  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35266  ;;
35267  *)
35268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35269for as_dir in $PATH
35270do
35271  IFS=$as_save_IFS
35272  test -z "$as_dir" && as_dir=.
35273    for ac_exec_ext in '' $ac_executable_extensions; do
35274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35275    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35277    break 2
35278  fi
35279done
35280  done
35281IFS=$as_save_IFS
35282
35283  ;;
35284esac
35285fi
35286NM=$ac_cv_path_NM
35287if test -n "$NM"; then
35288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35289$as_echo "$NM" >&6; }
35290else
35291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35292$as_echo "no" >&6; }
35293fi
35294
35295
35296  test -n "$NM" && break
35297done
35298
35299  else
35300    # The variable is set, but is it from the command line or the environment?
35301
35302    # Try to remove the string !NM! from our list.
35303    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35304    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35305      # If it failed, the variable was not from the command line. Ignore it,
35306      # but warn the user (except for BASH, which is always set by the calling BASH).
35307      if test "xNM" != xBASH; then
35308        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35309$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35310      fi
35311      # Try to locate tool using the code snippet
35312      for ac_prog in nm
35313do
35314  # Extract the first word of "$ac_prog", so it can be a program name with args.
35315set dummy $ac_prog; ac_word=$2
35316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35317$as_echo_n "checking for $ac_word... " >&6; }
35318if ${ac_cv_path_NM+:} false; then :
35319  $as_echo_n "(cached) " >&6
35320else
35321  case $NM in
35322  [\\/]* | ?:[\\/]*)
35323  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35324  ;;
35325  *)
35326  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35327for as_dir in $PATH
35328do
35329  IFS=$as_save_IFS
35330  test -z "$as_dir" && as_dir=.
35331    for ac_exec_ext in '' $ac_executable_extensions; do
35332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35333    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35335    break 2
35336  fi
35337done
35338  done
35339IFS=$as_save_IFS
35340
35341  ;;
35342esac
35343fi
35344NM=$ac_cv_path_NM
35345if test -n "$NM"; then
35346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35347$as_echo "$NM" >&6; }
35348else
35349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35350$as_echo "no" >&6; }
35351fi
35352
35353
35354  test -n "$NM" && break
35355done
35356
35357    else
35358      # If it succeeded, then it was overridden by the user. We will use it
35359      # for the tool.
35360
35361      # First remove it from the list of overridden variables, so we can test
35362      # for unknown variables in the end.
35363      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35364
35365      # Check if the provided tool contains a complete path.
35366      tool_specified="$NM"
35367      tool_basename="${tool_specified##*/}"
35368      if test "x$tool_basename" = "x$tool_specified"; then
35369        # A command without a complete path is provided, search $PATH.
35370        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35371$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35372        # Extract the first word of "$tool_basename", so it can be a program name with args.
35373set dummy $tool_basename; ac_word=$2
35374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35375$as_echo_n "checking for $ac_word... " >&6; }
35376if ${ac_cv_path_NM+:} false; then :
35377  $as_echo_n "(cached) " >&6
35378else
35379  case $NM in
35380  [\\/]* | ?:[\\/]*)
35381  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35382  ;;
35383  *)
35384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35385for as_dir in $PATH
35386do
35387  IFS=$as_save_IFS
35388  test -z "$as_dir" && as_dir=.
35389    for ac_exec_ext in '' $ac_executable_extensions; do
35390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35391    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35393    break 2
35394  fi
35395done
35396  done
35397IFS=$as_save_IFS
35398
35399  ;;
35400esac
35401fi
35402NM=$ac_cv_path_NM
35403if test -n "$NM"; then
35404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35405$as_echo "$NM" >&6; }
35406else
35407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35408$as_echo "no" >&6; }
35409fi
35410
35411
35412        if test "x$NM" = x; then
35413          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35414        fi
35415      else
35416        # Otherwise we believe it is a complete path. Use it as it is.
35417        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35418$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35420$as_echo_n "checking for NM... " >&6; }
35421        if test ! -x "$tool_specified"; then
35422          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35423$as_echo "not found" >&6; }
35424          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35425        fi
35426        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35427$as_echo "$tool_specified" >&6; }
35428      fi
35429    fi
35430  fi
35431
35432
35433
35434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35435
35436  # First separate the path from the arguments. This will split at the first
35437  # space.
35438  complete="$NM"
35439  path="${complete%% *}"
35440  tmp="$complete EOL"
35441  arguments="${tmp#* }"
35442
35443  # Input might be given as Windows format, start by converting to
35444  # unix format.
35445  new_path=`$CYGPATH -u "$path"`
35446
35447  # Now try to locate executable using which
35448  new_path=`$WHICH "$new_path" 2> /dev/null`
35449  # bat and cmd files are not always considered executable in cygwin causing which
35450  # to not find them
35451  if test "x$new_path" = x \
35452      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35453      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35454    new_path=`$CYGPATH -u "$path"`
35455  fi
35456  if test "x$new_path" = x; then
35457    # Oops. Which didn't find the executable.
35458    # The splitting of arguments from the executable at a space might have been incorrect,
35459    # since paths with space are more likely in Windows. Give it another try with the whole
35460    # argument.
35461    path="$complete"
35462    arguments="EOL"
35463    new_path=`$CYGPATH -u "$path"`
35464    new_path=`$WHICH "$new_path" 2> /dev/null`
35465    # bat and cmd files are not always considered executable in cygwin causing which
35466    # to not find them
35467    if test "x$new_path" = x \
35468        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35469        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35470      new_path=`$CYGPATH -u "$path"`
35471    fi
35472    if test "x$new_path" = x; then
35473      # It's still not found. Now this is an unrecoverable error.
35474      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35475$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35476      has_space=`$ECHO "$complete" | $GREP " "`
35477      if test "x$has_space" != x; then
35478        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35479$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35480      fi
35481      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35482    fi
35483  fi
35484
35485  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35486  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35487  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35488  # "foo.exe" is OK but "foo" is an error.
35489  #
35490  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35491  # It is also a way to make sure we got the proper file name for the real test later on.
35492  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35493  if test "x$test_shortpath" = x; then
35494    # Short path failed, file does not exist as specified.
35495    # Try adding .exe or .cmd
35496    if test -f "${new_path}.exe"; then
35497      input_to_shortpath="${new_path}.exe"
35498    elif test -f "${new_path}.cmd"; then
35499      input_to_shortpath="${new_path}.cmd"
35500    else
35501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35502$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35503      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35504$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35505      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35506    fi
35507  else
35508    input_to_shortpath="$new_path"
35509  fi
35510
35511  # Call helper function which possibly converts this using DOS-style short mode.
35512  # If so, the updated path is stored in $new_path.
35513  new_path="$input_to_shortpath"
35514
35515  input_path="$input_to_shortpath"
35516  # Check if we need to convert this using DOS-style short mode. If the path
35517  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35518  # take no chances and rewrite it.
35519  # Note: m4 eats our [], so we need to use [ and ] instead.
35520  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35521  if test "x$has_forbidden_chars" != x; then
35522    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35523    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35524    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35525    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35526      # Going to short mode and back again did indeed matter. Since short mode is
35527      # case insensitive, let's make it lowercase to improve readability.
35528      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35529      # Now convert it back to Unix-stile (cygpath)
35530      input_path=`$CYGPATH -u "$shortmode_path"`
35531      new_path="$input_path"
35532    fi
35533  fi
35534
35535  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35536  if test "x$test_cygdrive_prefix" = x; then
35537    # As a simple fix, exclude /usr/bin since it's not a real path.
35538    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35539      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35540      # a path prefixed by /cygdrive for fixpath to work.
35541      new_path="$CYGWIN_ROOT_PATH$input_path"
35542    fi
35543  fi
35544
35545  # remove trailing .exe if any
35546  new_path="${new_path/%.exe/}"
35547
35548  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35549
35550  # First separate the path from the arguments. This will split at the first
35551  # space.
35552  complete="$NM"
35553  path="${complete%% *}"
35554  tmp="$complete EOL"
35555  arguments="${tmp#* }"
35556
35557  # Input might be given as Windows format, start by converting to
35558  # unix format.
35559  new_path="$path"
35560
35561  windows_path="$new_path"
35562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35563    unix_path=`$CYGPATH -u "$windows_path"`
35564    new_path="$unix_path"
35565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35567    new_path="$unix_path"
35568  fi
35569
35570
35571  # Now try to locate executable using which
35572  new_path=`$WHICH "$new_path" 2> /dev/null`
35573
35574  if test "x$new_path" = x; then
35575    # Oops. Which didn't find the executable.
35576    # The splitting of arguments from the executable at a space might have been incorrect,
35577    # since paths with space are more likely in Windows. Give it another try with the whole
35578    # argument.
35579    path="$complete"
35580    arguments="EOL"
35581    new_path="$path"
35582
35583  windows_path="$new_path"
35584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35585    unix_path=`$CYGPATH -u "$windows_path"`
35586    new_path="$unix_path"
35587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35589    new_path="$unix_path"
35590  fi
35591
35592
35593    new_path=`$WHICH "$new_path" 2> /dev/null`
35594
35595    if test "x$new_path" = x; then
35596      # It's still not found. Now this is an unrecoverable error.
35597      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35598$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35599      has_space=`$ECHO "$complete" | $GREP " "`
35600      if test "x$has_space" != x; then
35601        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35602$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35603      fi
35604      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35605    fi
35606  fi
35607
35608  # Now new_path has a complete unix path to the binary
35609  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35610    # Keep paths in /bin as-is, but remove trailing .exe if any
35611    new_path="${new_path/%.exe/}"
35612    # Do not save /bin paths to all_fixpath_prefixes!
35613  else
35614    # Not in mixed or Windows style, start by that.
35615    new_path=`cmd //c echo $new_path`
35616
35617  input_path="$new_path"
35618  # Check if we need to convert this using DOS-style short mode. If the path
35619  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35620  # take no chances and rewrite it.
35621  # Note: m4 eats our [], so we need to use [ and ] instead.
35622  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35623  if test "x$has_forbidden_chars" != x; then
35624    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35625    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35626  fi
35627
35628    # Output is in $new_path
35629
35630  windows_path="$new_path"
35631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35632    unix_path=`$CYGPATH -u "$windows_path"`
35633    new_path="$unix_path"
35634  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35635    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35636    new_path="$unix_path"
35637  fi
35638
35639    # remove trailing .exe if any
35640    new_path="${new_path/%.exe/}"
35641
35642    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35643    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35644  fi
35645
35646  else
35647    # We're on a posix platform. Hooray! :)
35648    # First separate the path from the arguments. This will split at the first
35649    # space.
35650    complete="$NM"
35651    path="${complete%% *}"
35652    tmp="$complete EOL"
35653    arguments="${tmp#* }"
35654
35655    # Cannot rely on the command "which" here since it doesn't always work.
35656    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35657    if test -z "$is_absolute_path"; then
35658      # Path to executable is not absolute. Find it.
35659      IFS_save="$IFS"
35660      IFS=:
35661      for p in $PATH; do
35662        if test -f "$p/$path" && test -x "$p/$path"; then
35663          new_path="$p/$path"
35664          break
35665        fi
35666      done
35667      IFS="$IFS_save"
35668    else
35669      # This is an absolute path, we can use it without further modifications.
35670      new_path="$path"
35671    fi
35672
35673    if test "x$new_path" = x; then
35674      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35675$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35676      has_space=`$ECHO "$complete" | $GREP " "`
35677      if test "x$has_space" != x; then
35678        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35679$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35680      fi
35681      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35682    fi
35683  fi
35684
35685  # Now join together the path and the arguments once again
35686  if test "x$arguments" != xEOL; then
35687    new_complete="$new_path ${arguments% *}"
35688  else
35689    new_complete="$new_path"
35690  fi
35691
35692  if test "x$complete" != "x$new_complete"; then
35693    NM="$new_complete"
35694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35695$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35696  fi
35697
35698
35699
35700  # Publish this variable in the help.
35701
35702
35703  if test "x$GNM" = x; then
35704    # The variable is not set by user, try to locate tool using the code snippet
35705    for ac_prog in gnm
35706do
35707  # Extract the first word of "$ac_prog", so it can be a program name with args.
35708set dummy $ac_prog; ac_word=$2
35709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35710$as_echo_n "checking for $ac_word... " >&6; }
35711if ${ac_cv_path_GNM+:} false; then :
35712  $as_echo_n "(cached) " >&6
35713else
35714  case $GNM in
35715  [\\/]* | ?:[\\/]*)
35716  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35717  ;;
35718  *)
35719  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35720for as_dir in $PATH
35721do
35722  IFS=$as_save_IFS
35723  test -z "$as_dir" && as_dir=.
35724    for ac_exec_ext in '' $ac_executable_extensions; do
35725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35726    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35728    break 2
35729  fi
35730done
35731  done
35732IFS=$as_save_IFS
35733
35734  ;;
35735esac
35736fi
35737GNM=$ac_cv_path_GNM
35738if test -n "$GNM"; then
35739  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35740$as_echo "$GNM" >&6; }
35741else
35742  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35743$as_echo "no" >&6; }
35744fi
35745
35746
35747  test -n "$GNM" && break
35748done
35749
35750  else
35751    # The variable is set, but is it from the command line or the environment?
35752
35753    # Try to remove the string !GNM! from our list.
35754    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35755    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35756      # If it failed, the variable was not from the command line. Ignore it,
35757      # but warn the user (except for BASH, which is always set by the calling BASH).
35758      if test "xGNM" != xBASH; then
35759        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35760$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35761      fi
35762      # Try to locate tool using the code snippet
35763      for ac_prog in gnm
35764do
35765  # Extract the first word of "$ac_prog", so it can be a program name with args.
35766set dummy $ac_prog; ac_word=$2
35767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35768$as_echo_n "checking for $ac_word... " >&6; }
35769if ${ac_cv_path_GNM+:} false; then :
35770  $as_echo_n "(cached) " >&6
35771else
35772  case $GNM in
35773  [\\/]* | ?:[\\/]*)
35774  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35775  ;;
35776  *)
35777  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35778for as_dir in $PATH
35779do
35780  IFS=$as_save_IFS
35781  test -z "$as_dir" && as_dir=.
35782    for ac_exec_ext in '' $ac_executable_extensions; do
35783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35784    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35786    break 2
35787  fi
35788done
35789  done
35790IFS=$as_save_IFS
35791
35792  ;;
35793esac
35794fi
35795GNM=$ac_cv_path_GNM
35796if test -n "$GNM"; then
35797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35798$as_echo "$GNM" >&6; }
35799else
35800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35801$as_echo "no" >&6; }
35802fi
35803
35804
35805  test -n "$GNM" && break
35806done
35807
35808    else
35809      # If it succeeded, then it was overridden by the user. We will use it
35810      # for the tool.
35811
35812      # First remove it from the list of overridden variables, so we can test
35813      # for unknown variables in the end.
35814      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35815
35816      # Check if the provided tool contains a complete path.
35817      tool_specified="$GNM"
35818      tool_basename="${tool_specified##*/}"
35819      if test "x$tool_basename" = "x$tool_specified"; then
35820        # A command without a complete path is provided, search $PATH.
35821        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35822$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35823        # Extract the first word of "$tool_basename", so it can be a program name with args.
35824set dummy $tool_basename; ac_word=$2
35825{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35826$as_echo_n "checking for $ac_word... " >&6; }
35827if ${ac_cv_path_GNM+:} false; then :
35828  $as_echo_n "(cached) " >&6
35829else
35830  case $GNM in
35831  [\\/]* | ?:[\\/]*)
35832  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35833  ;;
35834  *)
35835  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35836for as_dir in $PATH
35837do
35838  IFS=$as_save_IFS
35839  test -z "$as_dir" && as_dir=.
35840    for ac_exec_ext in '' $ac_executable_extensions; do
35841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35842    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35844    break 2
35845  fi
35846done
35847  done
35848IFS=$as_save_IFS
35849
35850  ;;
35851esac
35852fi
35853GNM=$ac_cv_path_GNM
35854if test -n "$GNM"; then
35855  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35856$as_echo "$GNM" >&6; }
35857else
35858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35859$as_echo "no" >&6; }
35860fi
35861
35862
35863        if test "x$GNM" = x; then
35864          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35865        fi
35866      else
35867        # Otherwise we believe it is a complete path. Use it as it is.
35868        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35869$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35870        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35871$as_echo_n "checking for GNM... " >&6; }
35872        if test ! -x "$tool_specified"; then
35873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35874$as_echo "not found" >&6; }
35875          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
35876        fi
35877        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35878$as_echo "$tool_specified" >&6; }
35879      fi
35880    fi
35881  fi
35882
35883
35884
35885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35886
35887  # First separate the path from the arguments. This will split at the first
35888  # space.
35889  complete="$GNM"
35890  path="${complete%% *}"
35891  tmp="$complete EOL"
35892  arguments="${tmp#* }"
35893
35894  # Input might be given as Windows format, start by converting to
35895  # unix format.
35896  new_path=`$CYGPATH -u "$path"`
35897
35898  # Now try to locate executable using which
35899  new_path=`$WHICH "$new_path" 2> /dev/null`
35900  # bat and cmd files are not always considered executable in cygwin causing which
35901  # to not find them
35902  if test "x$new_path" = x \
35903      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35904      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35905    new_path=`$CYGPATH -u "$path"`
35906  fi
35907  if test "x$new_path" = x; then
35908    # Oops. Which didn't find the executable.
35909    # The splitting of arguments from the executable at a space might have been incorrect,
35910    # since paths with space are more likely in Windows. Give it another try with the whole
35911    # argument.
35912    path="$complete"
35913    arguments="EOL"
35914    new_path=`$CYGPATH -u "$path"`
35915    new_path=`$WHICH "$new_path" 2> /dev/null`
35916    # bat and cmd files are not always considered executable in cygwin causing which
35917    # to not find them
35918    if test "x$new_path" = x \
35919        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35920        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35921      new_path=`$CYGPATH -u "$path"`
35922    fi
35923    if test "x$new_path" = x; then
35924      # It's still not found. Now this is an unrecoverable error.
35925      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
35926$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
35927      has_space=`$ECHO "$complete" | $GREP " "`
35928      if test "x$has_space" != x; then
35929        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35930$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35931      fi
35932      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35933    fi
35934  fi
35935
35936  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35937  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35938  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35939  # "foo.exe" is OK but "foo" is an error.
35940  #
35941  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35942  # It is also a way to make sure we got the proper file name for the real test later on.
35943  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35944  if test "x$test_shortpath" = x; then
35945    # Short path failed, file does not exist as specified.
35946    # Try adding .exe or .cmd
35947    if test -f "${new_path}.exe"; then
35948      input_to_shortpath="${new_path}.exe"
35949    elif test -f "${new_path}.cmd"; then
35950      input_to_shortpath="${new_path}.cmd"
35951    else
35952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
35953$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
35954      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35955$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35956      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
35957    fi
35958  else
35959    input_to_shortpath="$new_path"
35960  fi
35961
35962  # Call helper function which possibly converts this using DOS-style short mode.
35963  # If so, the updated path is stored in $new_path.
35964  new_path="$input_to_shortpath"
35965
35966  input_path="$input_to_shortpath"
35967  # Check if we need to convert this using DOS-style short mode. If the path
35968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35969  # take no chances and rewrite it.
35970  # Note: m4 eats our [], so we need to use [ and ] instead.
35971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35972  if test "x$has_forbidden_chars" != x; then
35973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35974    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35975    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35976    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35977      # Going to short mode and back again did indeed matter. Since short mode is
35978      # case insensitive, let's make it lowercase to improve readability.
35979      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35980      # Now convert it back to Unix-stile (cygpath)
35981      input_path=`$CYGPATH -u "$shortmode_path"`
35982      new_path="$input_path"
35983    fi
35984  fi
35985
35986  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35987  if test "x$test_cygdrive_prefix" = x; then
35988    # As a simple fix, exclude /usr/bin since it's not a real path.
35989    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35990      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35991      # a path prefixed by /cygdrive for fixpath to work.
35992      new_path="$CYGWIN_ROOT_PATH$input_path"
35993    fi
35994  fi
35995
35996  # remove trailing .exe if any
35997  new_path="${new_path/%.exe/}"
35998
35999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36000
36001  # First separate the path from the arguments. This will split at the first
36002  # space.
36003  complete="$GNM"
36004  path="${complete%% *}"
36005  tmp="$complete EOL"
36006  arguments="${tmp#* }"
36007
36008  # Input might be given as Windows format, start by converting to
36009  # unix format.
36010  new_path="$path"
36011
36012  windows_path="$new_path"
36013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36014    unix_path=`$CYGPATH -u "$windows_path"`
36015    new_path="$unix_path"
36016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36018    new_path="$unix_path"
36019  fi
36020
36021
36022  # Now try to locate executable using which
36023  new_path=`$WHICH "$new_path" 2> /dev/null`
36024
36025  if test "x$new_path" = x; then
36026    # Oops. Which didn't find the executable.
36027    # The splitting of arguments from the executable at a space might have been incorrect,
36028    # since paths with space are more likely in Windows. Give it another try with the whole
36029    # argument.
36030    path="$complete"
36031    arguments="EOL"
36032    new_path="$path"
36033
36034  windows_path="$new_path"
36035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36036    unix_path=`$CYGPATH -u "$windows_path"`
36037    new_path="$unix_path"
36038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36040    new_path="$unix_path"
36041  fi
36042
36043
36044    new_path=`$WHICH "$new_path" 2> /dev/null`
36045
36046    if test "x$new_path" = x; then
36047      # It's still not found. Now this is an unrecoverable error.
36048      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36049$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36050      has_space=`$ECHO "$complete" | $GREP " "`
36051      if test "x$has_space" != x; then
36052        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36053$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36054      fi
36055      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36056    fi
36057  fi
36058
36059  # Now new_path has a complete unix path to the binary
36060  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36061    # Keep paths in /bin as-is, but remove trailing .exe if any
36062    new_path="${new_path/%.exe/}"
36063    # Do not save /bin paths to all_fixpath_prefixes!
36064  else
36065    # Not in mixed or Windows style, start by that.
36066    new_path=`cmd //c echo $new_path`
36067
36068  input_path="$new_path"
36069  # Check if we need to convert this using DOS-style short mode. If the path
36070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36071  # take no chances and rewrite it.
36072  # Note: m4 eats our [], so we need to use [ and ] instead.
36073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36074  if test "x$has_forbidden_chars" != x; then
36075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36077  fi
36078
36079    # Output is in $new_path
36080
36081  windows_path="$new_path"
36082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36083    unix_path=`$CYGPATH -u "$windows_path"`
36084    new_path="$unix_path"
36085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36087    new_path="$unix_path"
36088  fi
36089
36090    # remove trailing .exe if any
36091    new_path="${new_path/%.exe/}"
36092
36093    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36094    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36095  fi
36096
36097  else
36098    # We're on a posix platform. Hooray! :)
36099    # First separate the path from the arguments. This will split at the first
36100    # space.
36101    complete="$GNM"
36102    path="${complete%% *}"
36103    tmp="$complete EOL"
36104    arguments="${tmp#* }"
36105
36106    # Cannot rely on the command "which" here since it doesn't always work.
36107    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36108    if test -z "$is_absolute_path"; then
36109      # Path to executable is not absolute. Find it.
36110      IFS_save="$IFS"
36111      IFS=:
36112      for p in $PATH; do
36113        if test -f "$p/$path" && test -x "$p/$path"; then
36114          new_path="$p/$path"
36115          break
36116        fi
36117      done
36118      IFS="$IFS_save"
36119    else
36120      # This is an absolute path, we can use it without further modifications.
36121      new_path="$path"
36122    fi
36123
36124    if test "x$new_path" = x; then
36125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36126$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36127      has_space=`$ECHO "$complete" | $GREP " "`
36128      if test "x$has_space" != x; then
36129        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36130$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36131      fi
36132      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36133    fi
36134  fi
36135
36136  # Now join together the path and the arguments once again
36137  if test "x$arguments" != xEOL; then
36138    new_complete="$new_path ${arguments% *}"
36139  else
36140    new_complete="$new_path"
36141  fi
36142
36143  if test "x$complete" != "x$new_complete"; then
36144    GNM="$new_complete"
36145    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36146$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36147  fi
36148
36149
36150
36151
36152  # Publish this variable in the help.
36153
36154
36155  if test "x$MCS" = x; then
36156    # The variable is not set by user, try to locate tool using the code snippet
36157    for ac_prog in mcs
36158do
36159  # Extract the first word of "$ac_prog", so it can be a program name with args.
36160set dummy $ac_prog; ac_word=$2
36161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36162$as_echo_n "checking for $ac_word... " >&6; }
36163if ${ac_cv_path_MCS+:} false; then :
36164  $as_echo_n "(cached) " >&6
36165else
36166  case $MCS in
36167  [\\/]* | ?:[\\/]*)
36168  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36169  ;;
36170  *)
36171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36172for as_dir in $PATH
36173do
36174  IFS=$as_save_IFS
36175  test -z "$as_dir" && as_dir=.
36176    for ac_exec_ext in '' $ac_executable_extensions; do
36177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36178    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36180    break 2
36181  fi
36182done
36183  done
36184IFS=$as_save_IFS
36185
36186  ;;
36187esac
36188fi
36189MCS=$ac_cv_path_MCS
36190if test -n "$MCS"; then
36191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36192$as_echo "$MCS" >&6; }
36193else
36194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36195$as_echo "no" >&6; }
36196fi
36197
36198
36199  test -n "$MCS" && break
36200done
36201
36202  else
36203    # The variable is set, but is it from the command line or the environment?
36204
36205    # Try to remove the string !MCS! from our list.
36206    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36207    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36208      # If it failed, the variable was not from the command line. Ignore it,
36209      # but warn the user (except for BASH, which is always set by the calling BASH).
36210      if test "xMCS" != xBASH; then
36211        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36212$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36213      fi
36214      # Try to locate tool using the code snippet
36215      for ac_prog in mcs
36216do
36217  # Extract the first word of "$ac_prog", so it can be a program name with args.
36218set dummy $ac_prog; ac_word=$2
36219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36220$as_echo_n "checking for $ac_word... " >&6; }
36221if ${ac_cv_path_MCS+:} false; then :
36222  $as_echo_n "(cached) " >&6
36223else
36224  case $MCS in
36225  [\\/]* | ?:[\\/]*)
36226  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36227  ;;
36228  *)
36229  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36230for as_dir in $PATH
36231do
36232  IFS=$as_save_IFS
36233  test -z "$as_dir" && as_dir=.
36234    for ac_exec_ext in '' $ac_executable_extensions; do
36235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36236    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36238    break 2
36239  fi
36240done
36241  done
36242IFS=$as_save_IFS
36243
36244  ;;
36245esac
36246fi
36247MCS=$ac_cv_path_MCS
36248if test -n "$MCS"; then
36249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36250$as_echo "$MCS" >&6; }
36251else
36252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36253$as_echo "no" >&6; }
36254fi
36255
36256
36257  test -n "$MCS" && break
36258done
36259
36260    else
36261      # If it succeeded, then it was overridden by the user. We will use it
36262      # for the tool.
36263
36264      # First remove it from the list of overridden variables, so we can test
36265      # for unknown variables in the end.
36266      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36267
36268      # Check if the provided tool contains a complete path.
36269      tool_specified="$MCS"
36270      tool_basename="${tool_specified##*/}"
36271      if test "x$tool_basename" = "x$tool_specified"; then
36272        # A command without a complete path is provided, search $PATH.
36273        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36274$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36275        # Extract the first word of "$tool_basename", so it can be a program name with args.
36276set dummy $tool_basename; ac_word=$2
36277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36278$as_echo_n "checking for $ac_word... " >&6; }
36279if ${ac_cv_path_MCS+:} false; then :
36280  $as_echo_n "(cached) " >&6
36281else
36282  case $MCS in
36283  [\\/]* | ?:[\\/]*)
36284  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36285  ;;
36286  *)
36287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36288for as_dir in $PATH
36289do
36290  IFS=$as_save_IFS
36291  test -z "$as_dir" && as_dir=.
36292    for ac_exec_ext in '' $ac_executable_extensions; do
36293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36294    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36296    break 2
36297  fi
36298done
36299  done
36300IFS=$as_save_IFS
36301
36302  ;;
36303esac
36304fi
36305MCS=$ac_cv_path_MCS
36306if test -n "$MCS"; then
36307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36308$as_echo "$MCS" >&6; }
36309else
36310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36311$as_echo "no" >&6; }
36312fi
36313
36314
36315        if test "x$MCS" = x; then
36316          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36317        fi
36318      else
36319        # Otherwise we believe it is a complete path. Use it as it is.
36320        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36321$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36322        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36323$as_echo_n "checking for MCS... " >&6; }
36324        if test ! -x "$tool_specified"; then
36325          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36326$as_echo "not found" >&6; }
36327          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36328        fi
36329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36330$as_echo "$tool_specified" >&6; }
36331      fi
36332    fi
36333  fi
36334
36335
36336
36337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36338
36339  # First separate the path from the arguments. This will split at the first
36340  # space.
36341  complete="$MCS"
36342  path="${complete%% *}"
36343  tmp="$complete EOL"
36344  arguments="${tmp#* }"
36345
36346  # Input might be given as Windows format, start by converting to
36347  # unix format.
36348  new_path=`$CYGPATH -u "$path"`
36349
36350  # Now try to locate executable using which
36351  new_path=`$WHICH "$new_path" 2> /dev/null`
36352  # bat and cmd files are not always considered executable in cygwin causing which
36353  # to not find them
36354  if test "x$new_path" = x \
36355      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36356      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36357    new_path=`$CYGPATH -u "$path"`
36358  fi
36359  if test "x$new_path" = x; then
36360    # Oops. Which didn't find the executable.
36361    # The splitting of arguments from the executable at a space might have been incorrect,
36362    # since paths with space are more likely in Windows. Give it another try with the whole
36363    # argument.
36364    path="$complete"
36365    arguments="EOL"
36366    new_path=`$CYGPATH -u "$path"`
36367    new_path=`$WHICH "$new_path" 2> /dev/null`
36368    # bat and cmd files are not always considered executable in cygwin causing which
36369    # to not find them
36370    if test "x$new_path" = x \
36371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36373      new_path=`$CYGPATH -u "$path"`
36374    fi
36375    if test "x$new_path" = x; then
36376      # It's still not found. Now this is an unrecoverable error.
36377      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36378$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36379      has_space=`$ECHO "$complete" | $GREP " "`
36380      if test "x$has_space" != x; then
36381        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36382$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36383      fi
36384      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36385    fi
36386  fi
36387
36388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36391  # "foo.exe" is OK but "foo" is an error.
36392  #
36393  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36394  # It is also a way to make sure we got the proper file name for the real test later on.
36395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36396  if test "x$test_shortpath" = x; then
36397    # Short path failed, file does not exist as specified.
36398    # Try adding .exe or .cmd
36399    if test -f "${new_path}.exe"; then
36400      input_to_shortpath="${new_path}.exe"
36401    elif test -f "${new_path}.cmd"; then
36402      input_to_shortpath="${new_path}.cmd"
36403    else
36404      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36405$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36406      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36407$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36408      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36409    fi
36410  else
36411    input_to_shortpath="$new_path"
36412  fi
36413
36414  # Call helper function which possibly converts this using DOS-style short mode.
36415  # If so, the updated path is stored in $new_path.
36416  new_path="$input_to_shortpath"
36417
36418  input_path="$input_to_shortpath"
36419  # Check if we need to convert this using DOS-style short mode. If the path
36420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36421  # take no chances and rewrite it.
36422  # Note: m4 eats our [], so we need to use [ and ] instead.
36423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36424  if test "x$has_forbidden_chars" != x; then
36425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36429      # Going to short mode and back again did indeed matter. Since short mode is
36430      # case insensitive, let's make it lowercase to improve readability.
36431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36432      # Now convert it back to Unix-stile (cygpath)
36433      input_path=`$CYGPATH -u "$shortmode_path"`
36434      new_path="$input_path"
36435    fi
36436  fi
36437
36438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36439  if test "x$test_cygdrive_prefix" = x; then
36440    # As a simple fix, exclude /usr/bin since it's not a real path.
36441    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36443      # a path prefixed by /cygdrive for fixpath to work.
36444      new_path="$CYGWIN_ROOT_PATH$input_path"
36445    fi
36446  fi
36447
36448  # remove trailing .exe if any
36449  new_path="${new_path/%.exe/}"
36450
36451  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36452
36453  # First separate the path from the arguments. This will split at the first
36454  # space.
36455  complete="$MCS"
36456  path="${complete%% *}"
36457  tmp="$complete EOL"
36458  arguments="${tmp#* }"
36459
36460  # Input might be given as Windows format, start by converting to
36461  # unix format.
36462  new_path="$path"
36463
36464  windows_path="$new_path"
36465  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36466    unix_path=`$CYGPATH -u "$windows_path"`
36467    new_path="$unix_path"
36468  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36469    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36470    new_path="$unix_path"
36471  fi
36472
36473
36474  # Now try to locate executable using which
36475  new_path=`$WHICH "$new_path" 2> /dev/null`
36476
36477  if test "x$new_path" = x; then
36478    # Oops. Which didn't find the executable.
36479    # The splitting of arguments from the executable at a space might have been incorrect,
36480    # since paths with space are more likely in Windows. Give it another try with the whole
36481    # argument.
36482    path="$complete"
36483    arguments="EOL"
36484    new_path="$path"
36485
36486  windows_path="$new_path"
36487  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36488    unix_path=`$CYGPATH -u "$windows_path"`
36489    new_path="$unix_path"
36490  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36491    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36492    new_path="$unix_path"
36493  fi
36494
36495
36496    new_path=`$WHICH "$new_path" 2> /dev/null`
36497
36498    if test "x$new_path" = x; then
36499      # It's still not found. Now this is an unrecoverable error.
36500      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36501$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36502      has_space=`$ECHO "$complete" | $GREP " "`
36503      if test "x$has_space" != x; then
36504        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36505$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36506      fi
36507      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36508    fi
36509  fi
36510
36511  # Now new_path has a complete unix path to the binary
36512  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36513    # Keep paths in /bin as-is, but remove trailing .exe if any
36514    new_path="${new_path/%.exe/}"
36515    # Do not save /bin paths to all_fixpath_prefixes!
36516  else
36517    # Not in mixed or Windows style, start by that.
36518    new_path=`cmd //c echo $new_path`
36519
36520  input_path="$new_path"
36521  # Check if we need to convert this using DOS-style short mode. If the path
36522  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36523  # take no chances and rewrite it.
36524  # Note: m4 eats our [], so we need to use [ and ] instead.
36525  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36526  if test "x$has_forbidden_chars" != x; then
36527    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36528    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36529  fi
36530
36531    # Output is in $new_path
36532
36533  windows_path="$new_path"
36534  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36535    unix_path=`$CYGPATH -u "$windows_path"`
36536    new_path="$unix_path"
36537  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36538    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36539    new_path="$unix_path"
36540  fi
36541
36542    # remove trailing .exe if any
36543    new_path="${new_path/%.exe/}"
36544
36545    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36546    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36547  fi
36548
36549  else
36550    # We're on a posix platform. Hooray! :)
36551    # First separate the path from the arguments. This will split at the first
36552    # space.
36553    complete="$MCS"
36554    path="${complete%% *}"
36555    tmp="$complete EOL"
36556    arguments="${tmp#* }"
36557
36558    # Cannot rely on the command "which" here since it doesn't always work.
36559    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36560    if test -z "$is_absolute_path"; then
36561      # Path to executable is not absolute. Find it.
36562      IFS_save="$IFS"
36563      IFS=:
36564      for p in $PATH; do
36565        if test -f "$p/$path" && test -x "$p/$path"; then
36566          new_path="$p/$path"
36567          break
36568        fi
36569      done
36570      IFS="$IFS_save"
36571    else
36572      # This is an absolute path, we can use it without further modifications.
36573      new_path="$path"
36574    fi
36575
36576    if test "x$new_path" = x; then
36577      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36578$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36579      has_space=`$ECHO "$complete" | $GREP " "`
36580      if test "x$has_space" != x; then
36581        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36582$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36583      fi
36584      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36585    fi
36586  fi
36587
36588  # Now join together the path and the arguments once again
36589  if test "x$arguments" != xEOL; then
36590    new_complete="$new_path ${arguments% *}"
36591  else
36592    new_complete="$new_path"
36593  fi
36594
36595  if test "x$complete" != "x$new_complete"; then
36596    MCS="$new_complete"
36597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36598$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36599  fi
36600
36601  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36602    # FIXME: we should unify this with the solaris case above.
36603
36604
36605  # Publish this variable in the help.
36606
36607
36608  if test "x$STRIP" = x; then
36609    # The variable is not set by user, try to locate tool using the code snippet
36610    if test -n "$ac_tool_prefix"; then
36611  for ac_prog in strip
36612  do
36613    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36614set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36616$as_echo_n "checking for $ac_word... " >&6; }
36617if ${ac_cv_prog_STRIP+:} false; then :
36618  $as_echo_n "(cached) " >&6
36619else
36620  if test -n "$STRIP"; then
36621  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36622else
36623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36624for as_dir in $PATH
36625do
36626  IFS=$as_save_IFS
36627  test -z "$as_dir" && as_dir=.
36628    for ac_exec_ext in '' $ac_executable_extensions; do
36629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36630    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36632    break 2
36633  fi
36634done
36635  done
36636IFS=$as_save_IFS
36637
36638fi
36639fi
36640STRIP=$ac_cv_prog_STRIP
36641if test -n "$STRIP"; then
36642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36643$as_echo "$STRIP" >&6; }
36644else
36645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36646$as_echo "no" >&6; }
36647fi
36648
36649
36650    test -n "$STRIP" && break
36651  done
36652fi
36653if test -z "$STRIP"; then
36654  ac_ct_STRIP=$STRIP
36655  for ac_prog in strip
36656do
36657  # Extract the first word of "$ac_prog", so it can be a program name with args.
36658set dummy $ac_prog; ac_word=$2
36659{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36660$as_echo_n "checking for $ac_word... " >&6; }
36661if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36662  $as_echo_n "(cached) " >&6
36663else
36664  if test -n "$ac_ct_STRIP"; then
36665  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36666else
36667as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36668for as_dir in $PATH
36669do
36670  IFS=$as_save_IFS
36671  test -z "$as_dir" && as_dir=.
36672    for ac_exec_ext in '' $ac_executable_extensions; do
36673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36674    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36676    break 2
36677  fi
36678done
36679  done
36680IFS=$as_save_IFS
36681
36682fi
36683fi
36684ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36685if test -n "$ac_ct_STRIP"; then
36686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36687$as_echo "$ac_ct_STRIP" >&6; }
36688else
36689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36690$as_echo "no" >&6; }
36691fi
36692
36693
36694  test -n "$ac_ct_STRIP" && break
36695done
36696
36697  if test "x$ac_ct_STRIP" = x; then
36698    STRIP=""
36699  else
36700    case $cross_compiling:$ac_tool_warned in
36701yes:)
36702{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36703$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36704ac_tool_warned=yes ;;
36705esac
36706    STRIP=$ac_ct_STRIP
36707  fi
36708fi
36709
36710  else
36711    # The variable is set, but is it from the command line or the environment?
36712
36713    # Try to remove the string !STRIP! from our list.
36714    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36715    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36716      # If it failed, the variable was not from the command line. Ignore it,
36717      # but warn the user (except for BASH, which is always set by the calling BASH).
36718      if test "xSTRIP" != xBASH; then
36719        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36720$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36721      fi
36722      # Try to locate tool using the code snippet
36723      if test -n "$ac_tool_prefix"; then
36724  for ac_prog in strip
36725  do
36726    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36727set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36729$as_echo_n "checking for $ac_word... " >&6; }
36730if ${ac_cv_prog_STRIP+:} false; then :
36731  $as_echo_n "(cached) " >&6
36732else
36733  if test -n "$STRIP"; then
36734  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36735else
36736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36737for as_dir in $PATH
36738do
36739  IFS=$as_save_IFS
36740  test -z "$as_dir" && as_dir=.
36741    for ac_exec_ext in '' $ac_executable_extensions; do
36742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36743    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36745    break 2
36746  fi
36747done
36748  done
36749IFS=$as_save_IFS
36750
36751fi
36752fi
36753STRIP=$ac_cv_prog_STRIP
36754if test -n "$STRIP"; then
36755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36756$as_echo "$STRIP" >&6; }
36757else
36758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36759$as_echo "no" >&6; }
36760fi
36761
36762
36763    test -n "$STRIP" && break
36764  done
36765fi
36766if test -z "$STRIP"; then
36767  ac_ct_STRIP=$STRIP
36768  for ac_prog in strip
36769do
36770  # Extract the first word of "$ac_prog", so it can be a program name with args.
36771set dummy $ac_prog; ac_word=$2
36772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36773$as_echo_n "checking for $ac_word... " >&6; }
36774if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36775  $as_echo_n "(cached) " >&6
36776else
36777  if test -n "$ac_ct_STRIP"; then
36778  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36779else
36780as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36781for as_dir in $PATH
36782do
36783  IFS=$as_save_IFS
36784  test -z "$as_dir" && as_dir=.
36785    for ac_exec_ext in '' $ac_executable_extensions; do
36786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36787    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36789    break 2
36790  fi
36791done
36792  done
36793IFS=$as_save_IFS
36794
36795fi
36796fi
36797ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36798if test -n "$ac_ct_STRIP"; then
36799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36800$as_echo "$ac_ct_STRIP" >&6; }
36801else
36802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36803$as_echo "no" >&6; }
36804fi
36805
36806
36807  test -n "$ac_ct_STRIP" && break
36808done
36809
36810  if test "x$ac_ct_STRIP" = x; then
36811    STRIP=""
36812  else
36813    case $cross_compiling:$ac_tool_warned in
36814yes:)
36815{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36816$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36817ac_tool_warned=yes ;;
36818esac
36819    STRIP=$ac_ct_STRIP
36820  fi
36821fi
36822
36823    else
36824      # If it succeeded, then it was overridden by the user. We will use it
36825      # for the tool.
36826
36827      # First remove it from the list of overridden variables, so we can test
36828      # for unknown variables in the end.
36829      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36830
36831      # Check if the provided tool contains a complete path.
36832      tool_specified="$STRIP"
36833      tool_basename="${tool_specified##*/}"
36834      if test "x$tool_basename" = "x$tool_specified"; then
36835        # A command without a complete path is provided, search $PATH.
36836        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36837$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36838        # Extract the first word of "$tool_basename", so it can be a program name with args.
36839set dummy $tool_basename; ac_word=$2
36840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36841$as_echo_n "checking for $ac_word... " >&6; }
36842if ${ac_cv_path_STRIP+:} false; then :
36843  $as_echo_n "(cached) " >&6
36844else
36845  case $STRIP in
36846  [\\/]* | ?:[\\/]*)
36847  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36848  ;;
36849  *)
36850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36851for as_dir in $PATH
36852do
36853  IFS=$as_save_IFS
36854  test -z "$as_dir" && as_dir=.
36855    for ac_exec_ext in '' $ac_executable_extensions; do
36856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36857    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36859    break 2
36860  fi
36861done
36862  done
36863IFS=$as_save_IFS
36864
36865  ;;
36866esac
36867fi
36868STRIP=$ac_cv_path_STRIP
36869if test -n "$STRIP"; then
36870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36871$as_echo "$STRIP" >&6; }
36872else
36873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36874$as_echo "no" >&6; }
36875fi
36876
36877
36878        if test "x$STRIP" = x; then
36879          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36880        fi
36881      else
36882        # Otherwise we believe it is a complete path. Use it as it is.
36883        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
36884$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
36885        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
36886$as_echo_n "checking for STRIP... " >&6; }
36887        if test ! -x "$tool_specified"; then
36888          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36889$as_echo "not found" >&6; }
36890          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
36891        fi
36892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36893$as_echo "$tool_specified" >&6; }
36894      fi
36895    fi
36896  fi
36897
36898
36899
36900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36901
36902  # First separate the path from the arguments. This will split at the first
36903  # space.
36904  complete="$STRIP"
36905  path="${complete%% *}"
36906  tmp="$complete EOL"
36907  arguments="${tmp#* }"
36908
36909  # Input might be given as Windows format, start by converting to
36910  # unix format.
36911  new_path=`$CYGPATH -u "$path"`
36912
36913  # Now try to locate executable using which
36914  new_path=`$WHICH "$new_path" 2> /dev/null`
36915  # bat and cmd files are not always considered executable in cygwin causing which
36916  # to not find them
36917  if test "x$new_path" = x \
36918      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36919      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36920    new_path=`$CYGPATH -u "$path"`
36921  fi
36922  if test "x$new_path" = x; then
36923    # Oops. Which didn't find the executable.
36924    # The splitting of arguments from the executable at a space might have been incorrect,
36925    # since paths with space are more likely in Windows. Give it another try with the whole
36926    # argument.
36927    path="$complete"
36928    arguments="EOL"
36929    new_path=`$CYGPATH -u "$path"`
36930    new_path=`$WHICH "$new_path" 2> /dev/null`
36931    # bat and cmd files are not always considered executable in cygwin causing which
36932    # to not find them
36933    if test "x$new_path" = x \
36934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36936      new_path=`$CYGPATH -u "$path"`
36937    fi
36938    if test "x$new_path" = x; then
36939      # It's still not found. Now this is an unrecoverable error.
36940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
36941$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
36942      has_space=`$ECHO "$complete" | $GREP " "`
36943      if test "x$has_space" != x; then
36944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36946      fi
36947      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36948    fi
36949  fi
36950
36951  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36952  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36953  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36954  # "foo.exe" is OK but "foo" is an error.
36955  #
36956  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36957  # It is also a way to make sure we got the proper file name for the real test later on.
36958  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36959  if test "x$test_shortpath" = x; then
36960    # Short path failed, file does not exist as specified.
36961    # Try adding .exe or .cmd
36962    if test -f "${new_path}.exe"; then
36963      input_to_shortpath="${new_path}.exe"
36964    elif test -f "${new_path}.cmd"; then
36965      input_to_shortpath="${new_path}.cmd"
36966    else
36967      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
36968$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
36969      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36970$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36971      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
36972    fi
36973  else
36974    input_to_shortpath="$new_path"
36975  fi
36976
36977  # Call helper function which possibly converts this using DOS-style short mode.
36978  # If so, the updated path is stored in $new_path.
36979  new_path="$input_to_shortpath"
36980
36981  input_path="$input_to_shortpath"
36982  # Check if we need to convert this using DOS-style short mode. If the path
36983  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36984  # take no chances and rewrite it.
36985  # Note: m4 eats our [], so we need to use [ and ] instead.
36986  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36987  if test "x$has_forbidden_chars" != x; then
36988    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36989    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36990    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36991    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36992      # Going to short mode and back again did indeed matter. Since short mode is
36993      # case insensitive, let's make it lowercase to improve readability.
36994      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36995      # Now convert it back to Unix-stile (cygpath)
36996      input_path=`$CYGPATH -u "$shortmode_path"`
36997      new_path="$input_path"
36998    fi
36999  fi
37000
37001  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37002  if test "x$test_cygdrive_prefix" = x; then
37003    # As a simple fix, exclude /usr/bin since it's not a real path.
37004    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37005      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37006      # a path prefixed by /cygdrive for fixpath to work.
37007      new_path="$CYGWIN_ROOT_PATH$input_path"
37008    fi
37009  fi
37010
37011  # remove trailing .exe if any
37012  new_path="${new_path/%.exe/}"
37013
37014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37015
37016  # First separate the path from the arguments. This will split at the first
37017  # space.
37018  complete="$STRIP"
37019  path="${complete%% *}"
37020  tmp="$complete EOL"
37021  arguments="${tmp#* }"
37022
37023  # Input might be given as Windows format, start by converting to
37024  # unix format.
37025  new_path="$path"
37026
37027  windows_path="$new_path"
37028  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37029    unix_path=`$CYGPATH -u "$windows_path"`
37030    new_path="$unix_path"
37031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37032    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37033    new_path="$unix_path"
37034  fi
37035
37036
37037  # Now try to locate executable using which
37038  new_path=`$WHICH "$new_path" 2> /dev/null`
37039
37040  if test "x$new_path" = x; then
37041    # Oops. Which didn't find the executable.
37042    # The splitting of arguments from the executable at a space might have been incorrect,
37043    # since paths with space are more likely in Windows. Give it another try with the whole
37044    # argument.
37045    path="$complete"
37046    arguments="EOL"
37047    new_path="$path"
37048
37049  windows_path="$new_path"
37050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37051    unix_path=`$CYGPATH -u "$windows_path"`
37052    new_path="$unix_path"
37053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37054    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37055    new_path="$unix_path"
37056  fi
37057
37058
37059    new_path=`$WHICH "$new_path" 2> /dev/null`
37060
37061    if test "x$new_path" = x; then
37062      # It's still not found. Now this is an unrecoverable error.
37063      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37064$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37065      has_space=`$ECHO "$complete" | $GREP " "`
37066      if test "x$has_space" != x; then
37067        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37068$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37069      fi
37070      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37071    fi
37072  fi
37073
37074  # Now new_path has a complete unix path to the binary
37075  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37076    # Keep paths in /bin as-is, but remove trailing .exe if any
37077    new_path="${new_path/%.exe/}"
37078    # Do not save /bin paths to all_fixpath_prefixes!
37079  else
37080    # Not in mixed or Windows style, start by that.
37081    new_path=`cmd //c echo $new_path`
37082
37083  input_path="$new_path"
37084  # Check if we need to convert this using DOS-style short mode. If the path
37085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37086  # take no chances and rewrite it.
37087  # Note: m4 eats our [], so we need to use [ and ] instead.
37088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37089  if test "x$has_forbidden_chars" != x; then
37090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37091    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37092  fi
37093
37094    # Output is in $new_path
37095
37096  windows_path="$new_path"
37097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37098    unix_path=`$CYGPATH -u "$windows_path"`
37099    new_path="$unix_path"
37100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37102    new_path="$unix_path"
37103  fi
37104
37105    # remove trailing .exe if any
37106    new_path="${new_path/%.exe/}"
37107
37108    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37109    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37110  fi
37111
37112  else
37113    # We're on a posix platform. Hooray! :)
37114    # First separate the path from the arguments. This will split at the first
37115    # space.
37116    complete="$STRIP"
37117    path="${complete%% *}"
37118    tmp="$complete EOL"
37119    arguments="${tmp#* }"
37120
37121    # Cannot rely on the command "which" here since it doesn't always work.
37122    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37123    if test -z "$is_absolute_path"; then
37124      # Path to executable is not absolute. Find it.
37125      IFS_save="$IFS"
37126      IFS=:
37127      for p in $PATH; do
37128        if test -f "$p/$path" && test -x "$p/$path"; then
37129          new_path="$p/$path"
37130          break
37131        fi
37132      done
37133      IFS="$IFS_save"
37134    else
37135      # This is an absolute path, we can use it without further modifications.
37136      new_path="$path"
37137    fi
37138
37139    if test "x$new_path" = x; then
37140      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37141$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37142      has_space=`$ECHO "$complete" | $GREP " "`
37143      if test "x$has_space" != x; then
37144        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37145$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37146      fi
37147      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37148    fi
37149  fi
37150
37151  # Now join together the path and the arguments once again
37152  if test "x$arguments" != xEOL; then
37153    new_complete="$new_path ${arguments% *}"
37154  else
37155    new_complete="$new_path"
37156  fi
37157
37158  if test "x$complete" != "x$new_complete"; then
37159    STRIP="$new_complete"
37160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37161$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37162  fi
37163
37164
37165
37166  # Publish this variable in the help.
37167
37168
37169  if test "x$NM" = x; then
37170    # The variable is not set by user, try to locate tool using the code snippet
37171    if test -n "$ac_tool_prefix"; then
37172  for ac_prog in nm
37173  do
37174    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37175set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37176{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37177$as_echo_n "checking for $ac_word... " >&6; }
37178if ${ac_cv_prog_NM+:} false; then :
37179  $as_echo_n "(cached) " >&6
37180else
37181  if test -n "$NM"; then
37182  ac_cv_prog_NM="$NM" # Let the user override the test.
37183else
37184as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37185for as_dir in $PATH
37186do
37187  IFS=$as_save_IFS
37188  test -z "$as_dir" && as_dir=.
37189    for ac_exec_ext in '' $ac_executable_extensions; do
37190  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37191    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37192    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37193    break 2
37194  fi
37195done
37196  done
37197IFS=$as_save_IFS
37198
37199fi
37200fi
37201NM=$ac_cv_prog_NM
37202if test -n "$NM"; then
37203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37204$as_echo "$NM" >&6; }
37205else
37206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37207$as_echo "no" >&6; }
37208fi
37209
37210
37211    test -n "$NM" && break
37212  done
37213fi
37214if test -z "$NM"; then
37215  ac_ct_NM=$NM
37216  for ac_prog in nm
37217do
37218  # Extract the first word of "$ac_prog", so it can be a program name with args.
37219set dummy $ac_prog; ac_word=$2
37220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37221$as_echo_n "checking for $ac_word... " >&6; }
37222if ${ac_cv_prog_ac_ct_NM+:} false; then :
37223  $as_echo_n "(cached) " >&6
37224else
37225  if test -n "$ac_ct_NM"; then
37226  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37227else
37228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37229for as_dir in $PATH
37230do
37231  IFS=$as_save_IFS
37232  test -z "$as_dir" && as_dir=.
37233    for ac_exec_ext in '' $ac_executable_extensions; do
37234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37235    ac_cv_prog_ac_ct_NM="$ac_prog"
37236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37237    break 2
37238  fi
37239done
37240  done
37241IFS=$as_save_IFS
37242
37243fi
37244fi
37245ac_ct_NM=$ac_cv_prog_ac_ct_NM
37246if test -n "$ac_ct_NM"; then
37247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37248$as_echo "$ac_ct_NM" >&6; }
37249else
37250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37251$as_echo "no" >&6; }
37252fi
37253
37254
37255  test -n "$ac_ct_NM" && break
37256done
37257
37258  if test "x$ac_ct_NM" = x; then
37259    NM=""
37260  else
37261    case $cross_compiling:$ac_tool_warned in
37262yes:)
37263{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37264$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37265ac_tool_warned=yes ;;
37266esac
37267    NM=$ac_ct_NM
37268  fi
37269fi
37270
37271  else
37272    # The variable is set, but is it from the command line or the environment?
37273
37274    # Try to remove the string !NM! from our list.
37275    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37276    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37277      # If it failed, the variable was not from the command line. Ignore it,
37278      # but warn the user (except for BASH, which is always set by the calling BASH).
37279      if test "xNM" != xBASH; then
37280        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37281$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37282      fi
37283      # Try to locate tool using the code snippet
37284      if test -n "$ac_tool_prefix"; then
37285  for ac_prog in nm
37286  do
37287    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37288set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37290$as_echo_n "checking for $ac_word... " >&6; }
37291if ${ac_cv_prog_NM+:} false; then :
37292  $as_echo_n "(cached) " >&6
37293else
37294  if test -n "$NM"; then
37295  ac_cv_prog_NM="$NM" # Let the user override the test.
37296else
37297as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37298for as_dir in $PATH
37299do
37300  IFS=$as_save_IFS
37301  test -z "$as_dir" && as_dir=.
37302    for ac_exec_ext in '' $ac_executable_extensions; do
37303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37304    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37306    break 2
37307  fi
37308done
37309  done
37310IFS=$as_save_IFS
37311
37312fi
37313fi
37314NM=$ac_cv_prog_NM
37315if test -n "$NM"; then
37316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37317$as_echo "$NM" >&6; }
37318else
37319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37320$as_echo "no" >&6; }
37321fi
37322
37323
37324    test -n "$NM" && break
37325  done
37326fi
37327if test -z "$NM"; then
37328  ac_ct_NM=$NM
37329  for ac_prog in nm
37330do
37331  # Extract the first word of "$ac_prog", so it can be a program name with args.
37332set dummy $ac_prog; ac_word=$2
37333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37334$as_echo_n "checking for $ac_word... " >&6; }
37335if ${ac_cv_prog_ac_ct_NM+:} false; then :
37336  $as_echo_n "(cached) " >&6
37337else
37338  if test -n "$ac_ct_NM"; then
37339  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37340else
37341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37342for as_dir in $PATH
37343do
37344  IFS=$as_save_IFS
37345  test -z "$as_dir" && as_dir=.
37346    for ac_exec_ext in '' $ac_executable_extensions; do
37347  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37348    ac_cv_prog_ac_ct_NM="$ac_prog"
37349    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37350    break 2
37351  fi
37352done
37353  done
37354IFS=$as_save_IFS
37355
37356fi
37357fi
37358ac_ct_NM=$ac_cv_prog_ac_ct_NM
37359if test -n "$ac_ct_NM"; then
37360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37361$as_echo "$ac_ct_NM" >&6; }
37362else
37363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37364$as_echo "no" >&6; }
37365fi
37366
37367
37368  test -n "$ac_ct_NM" && break
37369done
37370
37371  if test "x$ac_ct_NM" = x; then
37372    NM=""
37373  else
37374    case $cross_compiling:$ac_tool_warned in
37375yes:)
37376{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37377$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37378ac_tool_warned=yes ;;
37379esac
37380    NM=$ac_ct_NM
37381  fi
37382fi
37383
37384    else
37385      # If it succeeded, then it was overridden by the user. We will use it
37386      # for the tool.
37387
37388      # First remove it from the list of overridden variables, so we can test
37389      # for unknown variables in the end.
37390      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37391
37392      # Check if the provided tool contains a complete path.
37393      tool_specified="$NM"
37394      tool_basename="${tool_specified##*/}"
37395      if test "x$tool_basename" = "x$tool_specified"; then
37396        # A command without a complete path is provided, search $PATH.
37397        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37398$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37399        # Extract the first word of "$tool_basename", so it can be a program name with args.
37400set dummy $tool_basename; ac_word=$2
37401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37402$as_echo_n "checking for $ac_word... " >&6; }
37403if ${ac_cv_path_NM+:} false; then :
37404  $as_echo_n "(cached) " >&6
37405else
37406  case $NM in
37407  [\\/]* | ?:[\\/]*)
37408  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37409  ;;
37410  *)
37411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37412for as_dir in $PATH
37413do
37414  IFS=$as_save_IFS
37415  test -z "$as_dir" && as_dir=.
37416    for ac_exec_ext in '' $ac_executable_extensions; do
37417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37418    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37420    break 2
37421  fi
37422done
37423  done
37424IFS=$as_save_IFS
37425
37426  ;;
37427esac
37428fi
37429NM=$ac_cv_path_NM
37430if test -n "$NM"; then
37431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37432$as_echo "$NM" >&6; }
37433else
37434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37435$as_echo "no" >&6; }
37436fi
37437
37438
37439        if test "x$NM" = x; then
37440          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37441        fi
37442      else
37443        # Otherwise we believe it is a complete path. Use it as it is.
37444        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37445$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37447$as_echo_n "checking for NM... " >&6; }
37448        if test ! -x "$tool_specified"; then
37449          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37450$as_echo "not found" >&6; }
37451          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37452        fi
37453        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37454$as_echo "$tool_specified" >&6; }
37455      fi
37456    fi
37457  fi
37458
37459
37460
37461  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37462
37463  # First separate the path from the arguments. This will split at the first
37464  # space.
37465  complete="$NM"
37466  path="${complete%% *}"
37467  tmp="$complete EOL"
37468  arguments="${tmp#* }"
37469
37470  # Input might be given as Windows format, start by converting to
37471  # unix format.
37472  new_path=`$CYGPATH -u "$path"`
37473
37474  # Now try to locate executable using which
37475  new_path=`$WHICH "$new_path" 2> /dev/null`
37476  # bat and cmd files are not always considered executable in cygwin causing which
37477  # to not find them
37478  if test "x$new_path" = x \
37479      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37480      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37481    new_path=`$CYGPATH -u "$path"`
37482  fi
37483  if test "x$new_path" = x; then
37484    # Oops. Which didn't find the executable.
37485    # The splitting of arguments from the executable at a space might have been incorrect,
37486    # since paths with space are more likely in Windows. Give it another try with the whole
37487    # argument.
37488    path="$complete"
37489    arguments="EOL"
37490    new_path=`$CYGPATH -u "$path"`
37491    new_path=`$WHICH "$new_path" 2> /dev/null`
37492    # bat and cmd files are not always considered executable in cygwin causing which
37493    # to not find them
37494    if test "x$new_path" = x \
37495        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37496        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37497      new_path=`$CYGPATH -u "$path"`
37498    fi
37499    if test "x$new_path" = x; then
37500      # It's still not found. Now this is an unrecoverable error.
37501      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37502$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37503      has_space=`$ECHO "$complete" | $GREP " "`
37504      if test "x$has_space" != x; then
37505        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37506$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37507      fi
37508      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37509    fi
37510  fi
37511
37512  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37513  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37514  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37515  # "foo.exe" is OK but "foo" is an error.
37516  #
37517  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37518  # It is also a way to make sure we got the proper file name for the real test later on.
37519  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37520  if test "x$test_shortpath" = x; then
37521    # Short path failed, file does not exist as specified.
37522    # Try adding .exe or .cmd
37523    if test -f "${new_path}.exe"; then
37524      input_to_shortpath="${new_path}.exe"
37525    elif test -f "${new_path}.cmd"; then
37526      input_to_shortpath="${new_path}.cmd"
37527    else
37528      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37529$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37530      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37531$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37532      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37533    fi
37534  else
37535    input_to_shortpath="$new_path"
37536  fi
37537
37538  # Call helper function which possibly converts this using DOS-style short mode.
37539  # If so, the updated path is stored in $new_path.
37540  new_path="$input_to_shortpath"
37541
37542  input_path="$input_to_shortpath"
37543  # Check if we need to convert this using DOS-style short mode. If the path
37544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37545  # take no chances and rewrite it.
37546  # Note: m4 eats our [], so we need to use [ and ] instead.
37547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37548  if test "x$has_forbidden_chars" != x; then
37549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37553      # Going to short mode and back again did indeed matter. Since short mode is
37554      # case insensitive, let's make it lowercase to improve readability.
37555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37556      # Now convert it back to Unix-stile (cygpath)
37557      input_path=`$CYGPATH -u "$shortmode_path"`
37558      new_path="$input_path"
37559    fi
37560  fi
37561
37562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37563  if test "x$test_cygdrive_prefix" = x; then
37564    # As a simple fix, exclude /usr/bin since it's not a real path.
37565    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37567      # a path prefixed by /cygdrive for fixpath to work.
37568      new_path="$CYGWIN_ROOT_PATH$input_path"
37569    fi
37570  fi
37571
37572  # remove trailing .exe if any
37573  new_path="${new_path/%.exe/}"
37574
37575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37576
37577  # First separate the path from the arguments. This will split at the first
37578  # space.
37579  complete="$NM"
37580  path="${complete%% *}"
37581  tmp="$complete EOL"
37582  arguments="${tmp#* }"
37583
37584  # Input might be given as Windows format, start by converting to
37585  # unix format.
37586  new_path="$path"
37587
37588  windows_path="$new_path"
37589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37590    unix_path=`$CYGPATH -u "$windows_path"`
37591    new_path="$unix_path"
37592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37594    new_path="$unix_path"
37595  fi
37596
37597
37598  # Now try to locate executable using which
37599  new_path=`$WHICH "$new_path" 2> /dev/null`
37600
37601  if test "x$new_path" = x; then
37602    # Oops. Which didn't find the executable.
37603    # The splitting of arguments from the executable at a space might have been incorrect,
37604    # since paths with space are more likely in Windows. Give it another try with the whole
37605    # argument.
37606    path="$complete"
37607    arguments="EOL"
37608    new_path="$path"
37609
37610  windows_path="$new_path"
37611  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37612    unix_path=`$CYGPATH -u "$windows_path"`
37613    new_path="$unix_path"
37614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37615    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37616    new_path="$unix_path"
37617  fi
37618
37619
37620    new_path=`$WHICH "$new_path" 2> /dev/null`
37621
37622    if test "x$new_path" = x; then
37623      # It's still not found. Now this is an unrecoverable error.
37624      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37625$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37626      has_space=`$ECHO "$complete" | $GREP " "`
37627      if test "x$has_space" != x; then
37628        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37629$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37630      fi
37631      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37632    fi
37633  fi
37634
37635  # Now new_path has a complete unix path to the binary
37636  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37637    # Keep paths in /bin as-is, but remove trailing .exe if any
37638    new_path="${new_path/%.exe/}"
37639    # Do not save /bin paths to all_fixpath_prefixes!
37640  else
37641    # Not in mixed or Windows style, start by that.
37642    new_path=`cmd //c echo $new_path`
37643
37644  input_path="$new_path"
37645  # Check if we need to convert this using DOS-style short mode. If the path
37646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37647  # take no chances and rewrite it.
37648  # Note: m4 eats our [], so we need to use [ and ] instead.
37649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37650  if test "x$has_forbidden_chars" != x; then
37651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37652    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37653  fi
37654
37655    # Output is in $new_path
37656
37657  windows_path="$new_path"
37658  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37659    unix_path=`$CYGPATH -u "$windows_path"`
37660    new_path="$unix_path"
37661  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37662    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37663    new_path="$unix_path"
37664  fi
37665
37666    # remove trailing .exe if any
37667    new_path="${new_path/%.exe/}"
37668
37669    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37670    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37671  fi
37672
37673  else
37674    # We're on a posix platform. Hooray! :)
37675    # First separate the path from the arguments. This will split at the first
37676    # space.
37677    complete="$NM"
37678    path="${complete%% *}"
37679    tmp="$complete EOL"
37680    arguments="${tmp#* }"
37681
37682    # Cannot rely on the command "which" here since it doesn't always work.
37683    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37684    if test -z "$is_absolute_path"; then
37685      # Path to executable is not absolute. Find it.
37686      IFS_save="$IFS"
37687      IFS=:
37688      for p in $PATH; do
37689        if test -f "$p/$path" && test -x "$p/$path"; then
37690          new_path="$p/$path"
37691          break
37692        fi
37693      done
37694      IFS="$IFS_save"
37695    else
37696      # This is an absolute path, we can use it without further modifications.
37697      new_path="$path"
37698    fi
37699
37700    if test "x$new_path" = x; then
37701      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37702$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37703      has_space=`$ECHO "$complete" | $GREP " "`
37704      if test "x$has_space" != x; then
37705        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37706$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37707      fi
37708      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37709    fi
37710  fi
37711
37712  # Now join together the path and the arguments once again
37713  if test "x$arguments" != xEOL; then
37714    new_complete="$new_path ${arguments% *}"
37715  else
37716    new_complete="$new_path"
37717  fi
37718
37719  if test "x$complete" != "x$new_complete"; then
37720    NM="$new_complete"
37721    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37722$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37723  fi
37724
37725    GNM="$NM"
37726
37727  fi
37728
37729  # objcopy is used for moving debug symbols to separate files when
37730  # full debug symbols are enabled.
37731  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37732
37733
37734  # Publish this variable in the help.
37735
37736
37737  if test "x$OBJCOPY" = x; then
37738    # The variable is not set by user, try to locate tool using the code snippet
37739    if test -n "$ac_tool_prefix"; then
37740  for ac_prog in gobjcopy objcopy
37741  do
37742    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37743set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37745$as_echo_n "checking for $ac_word... " >&6; }
37746if ${ac_cv_prog_OBJCOPY+:} false; then :
37747  $as_echo_n "(cached) " >&6
37748else
37749  if test -n "$OBJCOPY"; then
37750  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37751else
37752as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37753for as_dir in $PATH
37754do
37755  IFS=$as_save_IFS
37756  test -z "$as_dir" && as_dir=.
37757    for ac_exec_ext in '' $ac_executable_extensions; do
37758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37759    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37761    break 2
37762  fi
37763done
37764  done
37765IFS=$as_save_IFS
37766
37767fi
37768fi
37769OBJCOPY=$ac_cv_prog_OBJCOPY
37770if test -n "$OBJCOPY"; then
37771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37772$as_echo "$OBJCOPY" >&6; }
37773else
37774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37775$as_echo "no" >&6; }
37776fi
37777
37778
37779    test -n "$OBJCOPY" && break
37780  done
37781fi
37782if test -z "$OBJCOPY"; then
37783  ac_ct_OBJCOPY=$OBJCOPY
37784  for ac_prog in gobjcopy objcopy
37785do
37786  # Extract the first word of "$ac_prog", so it can be a program name with args.
37787set dummy $ac_prog; ac_word=$2
37788{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37789$as_echo_n "checking for $ac_word... " >&6; }
37790if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37791  $as_echo_n "(cached) " >&6
37792else
37793  if test -n "$ac_ct_OBJCOPY"; then
37794  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37795else
37796as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37797for as_dir in $PATH
37798do
37799  IFS=$as_save_IFS
37800  test -z "$as_dir" && as_dir=.
37801    for ac_exec_ext in '' $ac_executable_extensions; do
37802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37803    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37805    break 2
37806  fi
37807done
37808  done
37809IFS=$as_save_IFS
37810
37811fi
37812fi
37813ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37814if test -n "$ac_ct_OBJCOPY"; then
37815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37816$as_echo "$ac_ct_OBJCOPY" >&6; }
37817else
37818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37819$as_echo "no" >&6; }
37820fi
37821
37822
37823  test -n "$ac_ct_OBJCOPY" && break
37824done
37825
37826  if test "x$ac_ct_OBJCOPY" = x; then
37827    OBJCOPY=""
37828  else
37829    case $cross_compiling:$ac_tool_warned in
37830yes:)
37831{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37832$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37833ac_tool_warned=yes ;;
37834esac
37835    OBJCOPY=$ac_ct_OBJCOPY
37836  fi
37837fi
37838
37839  else
37840    # The variable is set, but is it from the command line or the environment?
37841
37842    # Try to remove the string !OBJCOPY! from our list.
37843    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37844    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37845      # If it failed, the variable was not from the command line. Ignore it,
37846      # but warn the user (except for BASH, which is always set by the calling BASH).
37847      if test "xOBJCOPY" != xBASH; then
37848        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37849$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37850      fi
37851      # Try to locate tool using the code snippet
37852      if test -n "$ac_tool_prefix"; then
37853  for ac_prog in gobjcopy objcopy
37854  do
37855    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37856set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37858$as_echo_n "checking for $ac_word... " >&6; }
37859if ${ac_cv_prog_OBJCOPY+:} false; then :
37860  $as_echo_n "(cached) " >&6
37861else
37862  if test -n "$OBJCOPY"; then
37863  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37864else
37865as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37866for as_dir in $PATH
37867do
37868  IFS=$as_save_IFS
37869  test -z "$as_dir" && as_dir=.
37870    for ac_exec_ext in '' $ac_executable_extensions; do
37871  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37872    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37873    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37874    break 2
37875  fi
37876done
37877  done
37878IFS=$as_save_IFS
37879
37880fi
37881fi
37882OBJCOPY=$ac_cv_prog_OBJCOPY
37883if test -n "$OBJCOPY"; then
37884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37885$as_echo "$OBJCOPY" >&6; }
37886else
37887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37888$as_echo "no" >&6; }
37889fi
37890
37891
37892    test -n "$OBJCOPY" && break
37893  done
37894fi
37895if test -z "$OBJCOPY"; then
37896  ac_ct_OBJCOPY=$OBJCOPY
37897  for ac_prog in gobjcopy objcopy
37898do
37899  # Extract the first word of "$ac_prog", so it can be a program name with args.
37900set dummy $ac_prog; ac_word=$2
37901{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37902$as_echo_n "checking for $ac_word... " >&6; }
37903if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37904  $as_echo_n "(cached) " >&6
37905else
37906  if test -n "$ac_ct_OBJCOPY"; then
37907  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37908else
37909as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37910for as_dir in $PATH
37911do
37912  IFS=$as_save_IFS
37913  test -z "$as_dir" && as_dir=.
37914    for ac_exec_ext in '' $ac_executable_extensions; do
37915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37916    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37918    break 2
37919  fi
37920done
37921  done
37922IFS=$as_save_IFS
37923
37924fi
37925fi
37926ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37927if test -n "$ac_ct_OBJCOPY"; then
37928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37929$as_echo "$ac_ct_OBJCOPY" >&6; }
37930else
37931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37932$as_echo "no" >&6; }
37933fi
37934
37935
37936  test -n "$ac_ct_OBJCOPY" && break
37937done
37938
37939  if test "x$ac_ct_OBJCOPY" = x; then
37940    OBJCOPY=""
37941  else
37942    case $cross_compiling:$ac_tool_warned in
37943yes:)
37944{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37945$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37946ac_tool_warned=yes ;;
37947esac
37948    OBJCOPY=$ac_ct_OBJCOPY
37949  fi
37950fi
37951
37952    else
37953      # If it succeeded, then it was overridden by the user. We will use it
37954      # for the tool.
37955
37956      # First remove it from the list of overridden variables, so we can test
37957      # for unknown variables in the end.
37958      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37959
37960      # Check if the provided tool contains a complete path.
37961      tool_specified="$OBJCOPY"
37962      tool_basename="${tool_specified##*/}"
37963      if test "x$tool_basename" = "x$tool_specified"; then
37964        # A command without a complete path is provided, search $PATH.
37965        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
37966$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
37967        # Extract the first word of "$tool_basename", so it can be a program name with args.
37968set dummy $tool_basename; ac_word=$2
37969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37970$as_echo_n "checking for $ac_word... " >&6; }
37971if ${ac_cv_path_OBJCOPY+:} false; then :
37972  $as_echo_n "(cached) " >&6
37973else
37974  case $OBJCOPY in
37975  [\\/]* | ?:[\\/]*)
37976  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
37977  ;;
37978  *)
37979  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37980for as_dir in $PATH
37981do
37982  IFS=$as_save_IFS
37983  test -z "$as_dir" && as_dir=.
37984    for ac_exec_ext in '' $ac_executable_extensions; do
37985  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37986    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
37987    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37988    break 2
37989  fi
37990done
37991  done
37992IFS=$as_save_IFS
37993
37994  ;;
37995esac
37996fi
37997OBJCOPY=$ac_cv_path_OBJCOPY
37998if test -n "$OBJCOPY"; then
37999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38000$as_echo "$OBJCOPY" >&6; }
38001else
38002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38003$as_echo "no" >&6; }
38004fi
38005
38006
38007        if test "x$OBJCOPY" = x; then
38008          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38009        fi
38010      else
38011        # Otherwise we believe it is a complete path. Use it as it is.
38012        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38013$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38014        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38015$as_echo_n "checking for OBJCOPY... " >&6; }
38016        if test ! -x "$tool_specified"; then
38017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38018$as_echo "not found" >&6; }
38019          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38020        fi
38021        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38022$as_echo "$tool_specified" >&6; }
38023      fi
38024    fi
38025  fi
38026
38027
38028    # Only call fixup if objcopy was found.
38029    if test -n "$OBJCOPY"; then
38030
38031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38032
38033  # First separate the path from the arguments. This will split at the first
38034  # space.
38035  complete="$OBJCOPY"
38036  path="${complete%% *}"
38037  tmp="$complete EOL"
38038  arguments="${tmp#* }"
38039
38040  # Input might be given as Windows format, start by converting to
38041  # unix format.
38042  new_path=`$CYGPATH -u "$path"`
38043
38044  # Now try to locate executable using which
38045  new_path=`$WHICH "$new_path" 2> /dev/null`
38046  # bat and cmd files are not always considered executable in cygwin causing which
38047  # to not find them
38048  if test "x$new_path" = x \
38049      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38050      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38051    new_path=`$CYGPATH -u "$path"`
38052  fi
38053  if test "x$new_path" = x; then
38054    # Oops. Which didn't find the executable.
38055    # The splitting of arguments from the executable at a space might have been incorrect,
38056    # since paths with space are more likely in Windows. Give it another try with the whole
38057    # argument.
38058    path="$complete"
38059    arguments="EOL"
38060    new_path=`$CYGPATH -u "$path"`
38061    new_path=`$WHICH "$new_path" 2> /dev/null`
38062    # bat and cmd files are not always considered executable in cygwin causing which
38063    # to not find them
38064    if test "x$new_path" = x \
38065        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38066        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38067      new_path=`$CYGPATH -u "$path"`
38068    fi
38069    if test "x$new_path" = x; then
38070      # It's still not found. Now this is an unrecoverable error.
38071      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38072$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38073      has_space=`$ECHO "$complete" | $GREP " "`
38074      if test "x$has_space" != x; then
38075        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38076$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38077      fi
38078      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38079    fi
38080  fi
38081
38082  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38083  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38084  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38085  # "foo.exe" is OK but "foo" is an error.
38086  #
38087  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38088  # It is also a way to make sure we got the proper file name for the real test later on.
38089  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38090  if test "x$test_shortpath" = x; then
38091    # Short path failed, file does not exist as specified.
38092    # Try adding .exe or .cmd
38093    if test -f "${new_path}.exe"; then
38094      input_to_shortpath="${new_path}.exe"
38095    elif test -f "${new_path}.cmd"; then
38096      input_to_shortpath="${new_path}.cmd"
38097    else
38098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38099$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38100      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38101$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38102      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38103    fi
38104  else
38105    input_to_shortpath="$new_path"
38106  fi
38107
38108  # Call helper function which possibly converts this using DOS-style short mode.
38109  # If so, the updated path is stored in $new_path.
38110  new_path="$input_to_shortpath"
38111
38112  input_path="$input_to_shortpath"
38113  # Check if we need to convert this using DOS-style short mode. If the path
38114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38115  # take no chances and rewrite it.
38116  # Note: m4 eats our [], so we need to use [ and ] instead.
38117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38118  if test "x$has_forbidden_chars" != x; then
38119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38120    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38121    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38122    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38123      # Going to short mode and back again did indeed matter. Since short mode is
38124      # case insensitive, let's make it lowercase to improve readability.
38125      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38126      # Now convert it back to Unix-stile (cygpath)
38127      input_path=`$CYGPATH -u "$shortmode_path"`
38128      new_path="$input_path"
38129    fi
38130  fi
38131
38132  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38133  if test "x$test_cygdrive_prefix" = x; then
38134    # As a simple fix, exclude /usr/bin since it's not a real path.
38135    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38136      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38137      # a path prefixed by /cygdrive for fixpath to work.
38138      new_path="$CYGWIN_ROOT_PATH$input_path"
38139    fi
38140  fi
38141
38142  # remove trailing .exe if any
38143  new_path="${new_path/%.exe/}"
38144
38145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38146
38147  # First separate the path from the arguments. This will split at the first
38148  # space.
38149  complete="$OBJCOPY"
38150  path="${complete%% *}"
38151  tmp="$complete EOL"
38152  arguments="${tmp#* }"
38153
38154  # Input might be given as Windows format, start by converting to
38155  # unix format.
38156  new_path="$path"
38157
38158  windows_path="$new_path"
38159  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38160    unix_path=`$CYGPATH -u "$windows_path"`
38161    new_path="$unix_path"
38162  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38163    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38164    new_path="$unix_path"
38165  fi
38166
38167
38168  # Now try to locate executable using which
38169  new_path=`$WHICH "$new_path" 2> /dev/null`
38170
38171  if test "x$new_path" = x; then
38172    # Oops. Which didn't find the executable.
38173    # The splitting of arguments from the executable at a space might have been incorrect,
38174    # since paths with space are more likely in Windows. Give it another try with the whole
38175    # argument.
38176    path="$complete"
38177    arguments="EOL"
38178    new_path="$path"
38179
38180  windows_path="$new_path"
38181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38182    unix_path=`$CYGPATH -u "$windows_path"`
38183    new_path="$unix_path"
38184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38186    new_path="$unix_path"
38187  fi
38188
38189
38190    new_path=`$WHICH "$new_path" 2> /dev/null`
38191
38192    if test "x$new_path" = x; then
38193      # It's still not found. Now this is an unrecoverable error.
38194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38195$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38196      has_space=`$ECHO "$complete" | $GREP " "`
38197      if test "x$has_space" != x; then
38198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38200      fi
38201      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38202    fi
38203  fi
38204
38205  # Now new_path has a complete unix path to the binary
38206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38207    # Keep paths in /bin as-is, but remove trailing .exe if any
38208    new_path="${new_path/%.exe/}"
38209    # Do not save /bin paths to all_fixpath_prefixes!
38210  else
38211    # Not in mixed or Windows style, start by that.
38212    new_path=`cmd //c echo $new_path`
38213
38214  input_path="$new_path"
38215  # Check if we need to convert this using DOS-style short mode. If the path
38216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38217  # take no chances and rewrite it.
38218  # Note: m4 eats our [], so we need to use [ and ] instead.
38219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38220  if test "x$has_forbidden_chars" != x; then
38221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38223  fi
38224
38225    # Output is in $new_path
38226
38227  windows_path="$new_path"
38228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38229    unix_path=`$CYGPATH -u "$windows_path"`
38230    new_path="$unix_path"
38231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38233    new_path="$unix_path"
38234  fi
38235
38236    # remove trailing .exe if any
38237    new_path="${new_path/%.exe/}"
38238
38239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38241  fi
38242
38243  else
38244    # We're on a posix platform. Hooray! :)
38245    # First separate the path from the arguments. This will split at the first
38246    # space.
38247    complete="$OBJCOPY"
38248    path="${complete%% *}"
38249    tmp="$complete EOL"
38250    arguments="${tmp#* }"
38251
38252    # Cannot rely on the command "which" here since it doesn't always work.
38253    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38254    if test -z "$is_absolute_path"; then
38255      # Path to executable is not absolute. Find it.
38256      IFS_save="$IFS"
38257      IFS=:
38258      for p in $PATH; do
38259        if test -f "$p/$path" && test -x "$p/$path"; then
38260          new_path="$p/$path"
38261          break
38262        fi
38263      done
38264      IFS="$IFS_save"
38265    else
38266      # This is an absolute path, we can use it without further modifications.
38267      new_path="$path"
38268    fi
38269
38270    if test "x$new_path" = x; then
38271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38272$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38273      has_space=`$ECHO "$complete" | $GREP " "`
38274      if test "x$has_space" != x; then
38275        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38277      fi
38278      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38279    fi
38280  fi
38281
38282  # Now join together the path and the arguments once again
38283  if test "x$arguments" != xEOL; then
38284    new_complete="$new_path ${arguments% *}"
38285  else
38286    new_complete="$new_path"
38287  fi
38288
38289  if test "x$complete" != "x$new_complete"; then
38290    OBJCOPY="$new_complete"
38291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38292$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38293  fi
38294
38295    fi
38296  fi
38297
38298
38299
38300  # Publish this variable in the help.
38301
38302
38303  if test "x$OBJDUMP" = x; then
38304    # The variable is not set by user, try to locate tool using the code snippet
38305    if test -n "$ac_tool_prefix"; then
38306  for ac_prog in gobjdump objdump
38307  do
38308    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38309set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38311$as_echo_n "checking for $ac_word... " >&6; }
38312if ${ac_cv_prog_OBJDUMP+:} false; then :
38313  $as_echo_n "(cached) " >&6
38314else
38315  if test -n "$OBJDUMP"; then
38316  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38317else
38318as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38319for as_dir in $PATH
38320do
38321  IFS=$as_save_IFS
38322  test -z "$as_dir" && as_dir=.
38323    for ac_exec_ext in '' $ac_executable_extensions; do
38324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38325    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38327    break 2
38328  fi
38329done
38330  done
38331IFS=$as_save_IFS
38332
38333fi
38334fi
38335OBJDUMP=$ac_cv_prog_OBJDUMP
38336if test -n "$OBJDUMP"; then
38337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38338$as_echo "$OBJDUMP" >&6; }
38339else
38340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38341$as_echo "no" >&6; }
38342fi
38343
38344
38345    test -n "$OBJDUMP" && break
38346  done
38347fi
38348if test -z "$OBJDUMP"; then
38349  ac_ct_OBJDUMP=$OBJDUMP
38350  for ac_prog in gobjdump objdump
38351do
38352  # Extract the first word of "$ac_prog", so it can be a program name with args.
38353set dummy $ac_prog; ac_word=$2
38354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38355$as_echo_n "checking for $ac_word... " >&6; }
38356if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38357  $as_echo_n "(cached) " >&6
38358else
38359  if test -n "$ac_ct_OBJDUMP"; then
38360  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38361else
38362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38363for as_dir in $PATH
38364do
38365  IFS=$as_save_IFS
38366  test -z "$as_dir" && as_dir=.
38367    for ac_exec_ext in '' $ac_executable_extensions; do
38368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38369    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38371    break 2
38372  fi
38373done
38374  done
38375IFS=$as_save_IFS
38376
38377fi
38378fi
38379ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38380if test -n "$ac_ct_OBJDUMP"; then
38381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38382$as_echo "$ac_ct_OBJDUMP" >&6; }
38383else
38384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38385$as_echo "no" >&6; }
38386fi
38387
38388
38389  test -n "$ac_ct_OBJDUMP" && break
38390done
38391
38392  if test "x$ac_ct_OBJDUMP" = x; then
38393    OBJDUMP=""
38394  else
38395    case $cross_compiling:$ac_tool_warned in
38396yes:)
38397{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38398$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38399ac_tool_warned=yes ;;
38400esac
38401    OBJDUMP=$ac_ct_OBJDUMP
38402  fi
38403fi
38404
38405  else
38406    # The variable is set, but is it from the command line or the environment?
38407
38408    # Try to remove the string !OBJDUMP! from our list.
38409    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38410    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38411      # If it failed, the variable was not from the command line. Ignore it,
38412      # but warn the user (except for BASH, which is always set by the calling BASH).
38413      if test "xOBJDUMP" != xBASH; then
38414        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38415$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38416      fi
38417      # Try to locate tool using the code snippet
38418      if test -n "$ac_tool_prefix"; then
38419  for ac_prog in gobjdump objdump
38420  do
38421    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38422set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38423{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38424$as_echo_n "checking for $ac_word... " >&6; }
38425if ${ac_cv_prog_OBJDUMP+:} false; then :
38426  $as_echo_n "(cached) " >&6
38427else
38428  if test -n "$OBJDUMP"; then
38429  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38430else
38431as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38432for as_dir in $PATH
38433do
38434  IFS=$as_save_IFS
38435  test -z "$as_dir" && as_dir=.
38436    for ac_exec_ext in '' $ac_executable_extensions; do
38437  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38438    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38439    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38440    break 2
38441  fi
38442done
38443  done
38444IFS=$as_save_IFS
38445
38446fi
38447fi
38448OBJDUMP=$ac_cv_prog_OBJDUMP
38449if test -n "$OBJDUMP"; then
38450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38451$as_echo "$OBJDUMP" >&6; }
38452else
38453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38454$as_echo "no" >&6; }
38455fi
38456
38457
38458    test -n "$OBJDUMP" && break
38459  done
38460fi
38461if test -z "$OBJDUMP"; then
38462  ac_ct_OBJDUMP=$OBJDUMP
38463  for ac_prog in gobjdump objdump
38464do
38465  # Extract the first word of "$ac_prog", so it can be a program name with args.
38466set dummy $ac_prog; ac_word=$2
38467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38468$as_echo_n "checking for $ac_word... " >&6; }
38469if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38470  $as_echo_n "(cached) " >&6
38471else
38472  if test -n "$ac_ct_OBJDUMP"; then
38473  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38474else
38475as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38476for as_dir in $PATH
38477do
38478  IFS=$as_save_IFS
38479  test -z "$as_dir" && as_dir=.
38480    for ac_exec_ext in '' $ac_executable_extensions; do
38481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38482    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38484    break 2
38485  fi
38486done
38487  done
38488IFS=$as_save_IFS
38489
38490fi
38491fi
38492ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38493if test -n "$ac_ct_OBJDUMP"; then
38494  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38495$as_echo "$ac_ct_OBJDUMP" >&6; }
38496else
38497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38498$as_echo "no" >&6; }
38499fi
38500
38501
38502  test -n "$ac_ct_OBJDUMP" && break
38503done
38504
38505  if test "x$ac_ct_OBJDUMP" = x; then
38506    OBJDUMP=""
38507  else
38508    case $cross_compiling:$ac_tool_warned in
38509yes:)
38510{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38511$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38512ac_tool_warned=yes ;;
38513esac
38514    OBJDUMP=$ac_ct_OBJDUMP
38515  fi
38516fi
38517
38518    else
38519      # If it succeeded, then it was overridden by the user. We will use it
38520      # for the tool.
38521
38522      # First remove it from the list of overridden variables, so we can test
38523      # for unknown variables in the end.
38524      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38525
38526      # Check if the provided tool contains a complete path.
38527      tool_specified="$OBJDUMP"
38528      tool_basename="${tool_specified##*/}"
38529      if test "x$tool_basename" = "x$tool_specified"; then
38530        # A command without a complete path is provided, search $PATH.
38531        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38532$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38533        # Extract the first word of "$tool_basename", so it can be a program name with args.
38534set dummy $tool_basename; ac_word=$2
38535{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38536$as_echo_n "checking for $ac_word... " >&6; }
38537if ${ac_cv_path_OBJDUMP+:} false; then :
38538  $as_echo_n "(cached) " >&6
38539else
38540  case $OBJDUMP in
38541  [\\/]* | ?:[\\/]*)
38542  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38543  ;;
38544  *)
38545  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38546for as_dir in $PATH
38547do
38548  IFS=$as_save_IFS
38549  test -z "$as_dir" && as_dir=.
38550    for ac_exec_ext in '' $ac_executable_extensions; do
38551  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38552    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38553    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38554    break 2
38555  fi
38556done
38557  done
38558IFS=$as_save_IFS
38559
38560  ;;
38561esac
38562fi
38563OBJDUMP=$ac_cv_path_OBJDUMP
38564if test -n "$OBJDUMP"; then
38565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38566$as_echo "$OBJDUMP" >&6; }
38567else
38568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38569$as_echo "no" >&6; }
38570fi
38571
38572
38573        if test "x$OBJDUMP" = x; then
38574          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38575        fi
38576      else
38577        # Otherwise we believe it is a complete path. Use it as it is.
38578        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38579$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38580        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38581$as_echo_n "checking for OBJDUMP... " >&6; }
38582        if test ! -x "$tool_specified"; then
38583          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38584$as_echo "not found" >&6; }
38585          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38586        fi
38587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38588$as_echo "$tool_specified" >&6; }
38589      fi
38590    fi
38591  fi
38592
38593
38594  if test "x$OBJDUMP" != x; then
38595    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38596    # bails if argument is missing.
38597
38598  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38599
38600  # First separate the path from the arguments. This will split at the first
38601  # space.
38602  complete="$OBJDUMP"
38603  path="${complete%% *}"
38604  tmp="$complete EOL"
38605  arguments="${tmp#* }"
38606
38607  # Input might be given as Windows format, start by converting to
38608  # unix format.
38609  new_path=`$CYGPATH -u "$path"`
38610
38611  # Now try to locate executable using which
38612  new_path=`$WHICH "$new_path" 2> /dev/null`
38613  # bat and cmd files are not always considered executable in cygwin causing which
38614  # to not find them
38615  if test "x$new_path" = x \
38616      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38617      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38618    new_path=`$CYGPATH -u "$path"`
38619  fi
38620  if test "x$new_path" = x; then
38621    # Oops. Which didn't find the executable.
38622    # The splitting of arguments from the executable at a space might have been incorrect,
38623    # since paths with space are more likely in Windows. Give it another try with the whole
38624    # argument.
38625    path="$complete"
38626    arguments="EOL"
38627    new_path=`$CYGPATH -u "$path"`
38628    new_path=`$WHICH "$new_path" 2> /dev/null`
38629    # bat and cmd files are not always considered executable in cygwin causing which
38630    # to not find them
38631    if test "x$new_path" = x \
38632        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38633        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38634      new_path=`$CYGPATH -u "$path"`
38635    fi
38636    if test "x$new_path" = x; then
38637      # It's still not found. Now this is an unrecoverable error.
38638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38639$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38640      has_space=`$ECHO "$complete" | $GREP " "`
38641      if test "x$has_space" != x; then
38642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38644      fi
38645      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38646    fi
38647  fi
38648
38649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38652  # "foo.exe" is OK but "foo" is an error.
38653  #
38654  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38655  # It is also a way to make sure we got the proper file name for the real test later on.
38656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38657  if test "x$test_shortpath" = x; then
38658    # Short path failed, file does not exist as specified.
38659    # Try adding .exe or .cmd
38660    if test -f "${new_path}.exe"; then
38661      input_to_shortpath="${new_path}.exe"
38662    elif test -f "${new_path}.cmd"; then
38663      input_to_shortpath="${new_path}.cmd"
38664    else
38665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38666$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38669      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38670    fi
38671  else
38672    input_to_shortpath="$new_path"
38673  fi
38674
38675  # Call helper function which possibly converts this using DOS-style short mode.
38676  # If so, the updated path is stored in $new_path.
38677  new_path="$input_to_shortpath"
38678
38679  input_path="$input_to_shortpath"
38680  # Check if we need to convert this using DOS-style short mode. If the path
38681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38682  # take no chances and rewrite it.
38683  # Note: m4 eats our [], so we need to use [ and ] instead.
38684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38685  if test "x$has_forbidden_chars" != x; then
38686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38690      # Going to short mode and back again did indeed matter. Since short mode is
38691      # case insensitive, let's make it lowercase to improve readability.
38692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38693      # Now convert it back to Unix-stile (cygpath)
38694      input_path=`$CYGPATH -u "$shortmode_path"`
38695      new_path="$input_path"
38696    fi
38697  fi
38698
38699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38700  if test "x$test_cygdrive_prefix" = x; then
38701    # As a simple fix, exclude /usr/bin since it's not a real path.
38702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38704      # a path prefixed by /cygdrive for fixpath to work.
38705      new_path="$CYGWIN_ROOT_PATH$input_path"
38706    fi
38707  fi
38708
38709  # remove trailing .exe if any
38710  new_path="${new_path/%.exe/}"
38711
38712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38713
38714  # First separate the path from the arguments. This will split at the first
38715  # space.
38716  complete="$OBJDUMP"
38717  path="${complete%% *}"
38718  tmp="$complete EOL"
38719  arguments="${tmp#* }"
38720
38721  # Input might be given as Windows format, start by converting to
38722  # unix format.
38723  new_path="$path"
38724
38725  windows_path="$new_path"
38726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38727    unix_path=`$CYGPATH -u "$windows_path"`
38728    new_path="$unix_path"
38729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38731    new_path="$unix_path"
38732  fi
38733
38734
38735  # Now try to locate executable using which
38736  new_path=`$WHICH "$new_path" 2> /dev/null`
38737
38738  if test "x$new_path" = x; then
38739    # Oops. Which didn't find the executable.
38740    # The splitting of arguments from the executable at a space might have been incorrect,
38741    # since paths with space are more likely in Windows. Give it another try with the whole
38742    # argument.
38743    path="$complete"
38744    arguments="EOL"
38745    new_path="$path"
38746
38747  windows_path="$new_path"
38748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38749    unix_path=`$CYGPATH -u "$windows_path"`
38750    new_path="$unix_path"
38751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38753    new_path="$unix_path"
38754  fi
38755
38756
38757    new_path=`$WHICH "$new_path" 2> /dev/null`
38758
38759    if test "x$new_path" = x; then
38760      # It's still not found. Now this is an unrecoverable error.
38761      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38762$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38763      has_space=`$ECHO "$complete" | $GREP " "`
38764      if test "x$has_space" != x; then
38765        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38766$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38767      fi
38768      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38769    fi
38770  fi
38771
38772  # Now new_path has a complete unix path to the binary
38773  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38774    # Keep paths in /bin as-is, but remove trailing .exe if any
38775    new_path="${new_path/%.exe/}"
38776    # Do not save /bin paths to all_fixpath_prefixes!
38777  else
38778    # Not in mixed or Windows style, start by that.
38779    new_path=`cmd //c echo $new_path`
38780
38781  input_path="$new_path"
38782  # Check if we need to convert this using DOS-style short mode. If the path
38783  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38784  # take no chances and rewrite it.
38785  # Note: m4 eats our [], so we need to use [ and ] instead.
38786  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38787  if test "x$has_forbidden_chars" != x; then
38788    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38789    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38790  fi
38791
38792    # Output is in $new_path
38793
38794  windows_path="$new_path"
38795  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38796    unix_path=`$CYGPATH -u "$windows_path"`
38797    new_path="$unix_path"
38798  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38799    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38800    new_path="$unix_path"
38801  fi
38802
38803    # remove trailing .exe if any
38804    new_path="${new_path/%.exe/}"
38805
38806    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38807    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38808  fi
38809
38810  else
38811    # We're on a posix platform. Hooray! :)
38812    # First separate the path from the arguments. This will split at the first
38813    # space.
38814    complete="$OBJDUMP"
38815    path="${complete%% *}"
38816    tmp="$complete EOL"
38817    arguments="${tmp#* }"
38818
38819    # Cannot rely on the command "which" here since it doesn't always work.
38820    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38821    if test -z "$is_absolute_path"; then
38822      # Path to executable is not absolute. Find it.
38823      IFS_save="$IFS"
38824      IFS=:
38825      for p in $PATH; do
38826        if test -f "$p/$path" && test -x "$p/$path"; then
38827          new_path="$p/$path"
38828          break
38829        fi
38830      done
38831      IFS="$IFS_save"
38832    else
38833      # This is an absolute path, we can use it without further modifications.
38834      new_path="$path"
38835    fi
38836
38837    if test "x$new_path" = x; then
38838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38839$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38840      has_space=`$ECHO "$complete" | $GREP " "`
38841      if test "x$has_space" != x; then
38842        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38843$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38844      fi
38845      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38846    fi
38847  fi
38848
38849  # Now join together the path and the arguments once again
38850  if test "x$arguments" != xEOL; then
38851    new_complete="$new_path ${arguments% *}"
38852  else
38853    new_complete="$new_path"
38854  fi
38855
38856  if test "x$complete" != "x$new_complete"; then
38857    OBJDUMP="$new_complete"
38858    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38859$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38860  fi
38861
38862  fi
38863
38864
38865  # Restore old path.
38866  PATH="$OLD_PATH"
38867
38868  # Restore the flags to the user specified values.
38869  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38870  CFLAGS="$ORG_CFLAGS"
38871  CXXFLAGS="$ORG_CXXFLAGS"
38872  OBJCFLAGS="$ORG_OBJCFLAGS"
38873
38874
38875# Finally do some processing after the detection phase
38876
38877  if test "x$COMPILE_TYPE" = "xcross"; then
38878    # Now we need to find a C/C++ compiler that can build executables for the
38879    # build platform. We can't use the AC_PROG_CC macro, since it can only be
38880    # used once. Also, we need to do this without adding a tools dir to the
38881    # path, otherwise we might pick up cross-compilers which don't use standard
38882    # naming.
38883
38884    # FIXME: we should list the discovered compilers as an exclude pattern!
38885    # If we do that, we can do this detection before POST_DETECTION, and still
38886    # find the build compilers in the tools dir, if needed.
38887
38888
38889  # Publish this variable in the help.
38890
38891
38892  if test "x$BUILD_CC" = x; then
38893    # The variable is not set by user, try to locate tool using the code snippet
38894    for ac_prog in cl cc gcc
38895do
38896  # Extract the first word of "$ac_prog", so it can be a program name with args.
38897set dummy $ac_prog; ac_word=$2
38898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38899$as_echo_n "checking for $ac_word... " >&6; }
38900if ${ac_cv_path_BUILD_CC+:} false; then :
38901  $as_echo_n "(cached) " >&6
38902else
38903  case $BUILD_CC in
38904  [\\/]* | ?:[\\/]*)
38905  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38906  ;;
38907  *)
38908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38909for as_dir in $PATH
38910do
38911  IFS=$as_save_IFS
38912  test -z "$as_dir" && as_dir=.
38913    for ac_exec_ext in '' $ac_executable_extensions; do
38914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38915    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38917    break 2
38918  fi
38919done
38920  done
38921IFS=$as_save_IFS
38922
38923  ;;
38924esac
38925fi
38926BUILD_CC=$ac_cv_path_BUILD_CC
38927if test -n "$BUILD_CC"; then
38928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38929$as_echo "$BUILD_CC" >&6; }
38930else
38931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38932$as_echo "no" >&6; }
38933fi
38934
38935
38936  test -n "$BUILD_CC" && break
38937done
38938
38939  else
38940    # The variable is set, but is it from the command line or the environment?
38941
38942    # Try to remove the string !BUILD_CC! from our list.
38943    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
38944    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38945      # If it failed, the variable was not from the command line. Ignore it,
38946      # but warn the user (except for BASH, which is always set by the calling BASH).
38947      if test "xBUILD_CC" != xBASH; then
38948        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
38949$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
38950      fi
38951      # Try to locate tool using the code snippet
38952      for ac_prog in cl cc gcc
38953do
38954  # Extract the first word of "$ac_prog", so it can be a program name with args.
38955set dummy $ac_prog; ac_word=$2
38956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38957$as_echo_n "checking for $ac_word... " >&6; }
38958if ${ac_cv_path_BUILD_CC+:} false; then :
38959  $as_echo_n "(cached) " >&6
38960else
38961  case $BUILD_CC in
38962  [\\/]* | ?:[\\/]*)
38963  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
38964  ;;
38965  *)
38966  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38967for as_dir in $PATH
38968do
38969  IFS=$as_save_IFS
38970  test -z "$as_dir" && as_dir=.
38971    for ac_exec_ext in '' $ac_executable_extensions; do
38972  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38973    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
38974    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38975    break 2
38976  fi
38977done
38978  done
38979IFS=$as_save_IFS
38980
38981  ;;
38982esac
38983fi
38984BUILD_CC=$ac_cv_path_BUILD_CC
38985if test -n "$BUILD_CC"; then
38986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
38987$as_echo "$BUILD_CC" >&6; }
38988else
38989  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38990$as_echo "no" >&6; }
38991fi
38992
38993
38994  test -n "$BUILD_CC" && break
38995done
38996
38997    else
38998      # If it succeeded, then it was overridden by the user. We will use it
38999      # for the tool.
39000
39001      # First remove it from the list of overridden variables, so we can test
39002      # for unknown variables in the end.
39003      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39004
39005      # Check if the provided tool contains a complete path.
39006      tool_specified="$BUILD_CC"
39007      tool_basename="${tool_specified##*/}"
39008      if test "x$tool_basename" = "x$tool_specified"; then
39009        # A command without a complete path is provided, search $PATH.
39010        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39011$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39012        # Extract the first word of "$tool_basename", so it can be a program name with args.
39013set dummy $tool_basename; ac_word=$2
39014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39015$as_echo_n "checking for $ac_word... " >&6; }
39016if ${ac_cv_path_BUILD_CC+:} false; then :
39017  $as_echo_n "(cached) " >&6
39018else
39019  case $BUILD_CC in
39020  [\\/]* | ?:[\\/]*)
39021  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39022  ;;
39023  *)
39024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39025for as_dir in $PATH
39026do
39027  IFS=$as_save_IFS
39028  test -z "$as_dir" && as_dir=.
39029    for ac_exec_ext in '' $ac_executable_extensions; do
39030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39031    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39033    break 2
39034  fi
39035done
39036  done
39037IFS=$as_save_IFS
39038
39039  ;;
39040esac
39041fi
39042BUILD_CC=$ac_cv_path_BUILD_CC
39043if test -n "$BUILD_CC"; then
39044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39045$as_echo "$BUILD_CC" >&6; }
39046else
39047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39048$as_echo "no" >&6; }
39049fi
39050
39051
39052        if test "x$BUILD_CC" = x; then
39053          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39054        fi
39055      else
39056        # Otherwise we believe it is a complete path. Use it as it is.
39057        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39058$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39059        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39060$as_echo_n "checking for BUILD_CC... " >&6; }
39061        if test ! -x "$tool_specified"; then
39062          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39063$as_echo "not found" >&6; }
39064          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39065        fi
39066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39067$as_echo "$tool_specified" >&6; }
39068      fi
39069    fi
39070  fi
39071
39072
39073
39074  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39075
39076  # First separate the path from the arguments. This will split at the first
39077  # space.
39078  complete="$BUILD_CC"
39079  path="${complete%% *}"
39080  tmp="$complete EOL"
39081  arguments="${tmp#* }"
39082
39083  # Input might be given as Windows format, start by converting to
39084  # unix format.
39085  new_path=`$CYGPATH -u "$path"`
39086
39087  # Now try to locate executable using which
39088  new_path=`$WHICH "$new_path" 2> /dev/null`
39089  # bat and cmd files are not always considered executable in cygwin causing which
39090  # to not find them
39091  if test "x$new_path" = x \
39092      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39093      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39094    new_path=`$CYGPATH -u "$path"`
39095  fi
39096  if test "x$new_path" = x; then
39097    # Oops. Which didn't find the executable.
39098    # The splitting of arguments from the executable at a space might have been incorrect,
39099    # since paths with space are more likely in Windows. Give it another try with the whole
39100    # argument.
39101    path="$complete"
39102    arguments="EOL"
39103    new_path=`$CYGPATH -u "$path"`
39104    new_path=`$WHICH "$new_path" 2> /dev/null`
39105    # bat and cmd files are not always considered executable in cygwin causing which
39106    # to not find them
39107    if test "x$new_path" = x \
39108        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39109        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39110      new_path=`$CYGPATH -u "$path"`
39111    fi
39112    if test "x$new_path" = x; then
39113      # It's still not found. Now this is an unrecoverable error.
39114      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39115$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39116      has_space=`$ECHO "$complete" | $GREP " "`
39117      if test "x$has_space" != x; then
39118        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39119$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39120      fi
39121      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39122    fi
39123  fi
39124
39125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39128  # "foo.exe" is OK but "foo" is an error.
39129  #
39130  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39131  # It is also a way to make sure we got the proper file name for the real test later on.
39132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39133  if test "x$test_shortpath" = x; then
39134    # Short path failed, file does not exist as specified.
39135    # Try adding .exe or .cmd
39136    if test -f "${new_path}.exe"; then
39137      input_to_shortpath="${new_path}.exe"
39138    elif test -f "${new_path}.cmd"; then
39139      input_to_shortpath="${new_path}.cmd"
39140    else
39141      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39142$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39143      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39144$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39145      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39146    fi
39147  else
39148    input_to_shortpath="$new_path"
39149  fi
39150
39151  # Call helper function which possibly converts this using DOS-style short mode.
39152  # If so, the updated path is stored in $new_path.
39153  new_path="$input_to_shortpath"
39154
39155  input_path="$input_to_shortpath"
39156  # Check if we need to convert this using DOS-style short mode. If the path
39157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39158  # take no chances and rewrite it.
39159  # Note: m4 eats our [], so we need to use [ and ] instead.
39160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39161  if test "x$has_forbidden_chars" != x; then
39162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39163    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39164    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39165    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39166      # Going to short mode and back again did indeed matter. Since short mode is
39167      # case insensitive, let's make it lowercase to improve readability.
39168      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39169      # Now convert it back to Unix-stile (cygpath)
39170      input_path=`$CYGPATH -u "$shortmode_path"`
39171      new_path="$input_path"
39172    fi
39173  fi
39174
39175  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39176  if test "x$test_cygdrive_prefix" = x; then
39177    # As a simple fix, exclude /usr/bin since it's not a real path.
39178    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39179      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39180      # a path prefixed by /cygdrive for fixpath to work.
39181      new_path="$CYGWIN_ROOT_PATH$input_path"
39182    fi
39183  fi
39184
39185  # remove trailing .exe if any
39186  new_path="${new_path/%.exe/}"
39187
39188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39189
39190  # First separate the path from the arguments. This will split at the first
39191  # space.
39192  complete="$BUILD_CC"
39193  path="${complete%% *}"
39194  tmp="$complete EOL"
39195  arguments="${tmp#* }"
39196
39197  # Input might be given as Windows format, start by converting to
39198  # unix format.
39199  new_path="$path"
39200
39201  windows_path="$new_path"
39202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39203    unix_path=`$CYGPATH -u "$windows_path"`
39204    new_path="$unix_path"
39205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39207    new_path="$unix_path"
39208  fi
39209
39210
39211  # Now try to locate executable using which
39212  new_path=`$WHICH "$new_path" 2> /dev/null`
39213
39214  if test "x$new_path" = x; then
39215    # Oops. Which didn't find the executable.
39216    # The splitting of arguments from the executable at a space might have been incorrect,
39217    # since paths with space are more likely in Windows. Give it another try with the whole
39218    # argument.
39219    path="$complete"
39220    arguments="EOL"
39221    new_path="$path"
39222
39223  windows_path="$new_path"
39224  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39225    unix_path=`$CYGPATH -u "$windows_path"`
39226    new_path="$unix_path"
39227  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39228    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39229    new_path="$unix_path"
39230  fi
39231
39232
39233    new_path=`$WHICH "$new_path" 2> /dev/null`
39234
39235    if test "x$new_path" = x; then
39236      # It's still not found. Now this is an unrecoverable error.
39237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39238$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39239      has_space=`$ECHO "$complete" | $GREP " "`
39240      if test "x$has_space" != x; then
39241        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39242$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39243      fi
39244      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39245    fi
39246  fi
39247
39248  # Now new_path has a complete unix path to the binary
39249  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39250    # Keep paths in /bin as-is, but remove trailing .exe if any
39251    new_path="${new_path/%.exe/}"
39252    # Do not save /bin paths to all_fixpath_prefixes!
39253  else
39254    # Not in mixed or Windows style, start by that.
39255    new_path=`cmd //c echo $new_path`
39256
39257  input_path="$new_path"
39258  # Check if we need to convert this using DOS-style short mode. If the path
39259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39260  # take no chances and rewrite it.
39261  # Note: m4 eats our [], so we need to use [ and ] instead.
39262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39263  if test "x$has_forbidden_chars" != x; then
39264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39266  fi
39267
39268    # Output is in $new_path
39269
39270  windows_path="$new_path"
39271  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39272    unix_path=`$CYGPATH -u "$windows_path"`
39273    new_path="$unix_path"
39274  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39275    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39276    new_path="$unix_path"
39277  fi
39278
39279    # remove trailing .exe if any
39280    new_path="${new_path/%.exe/}"
39281
39282    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39283    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39284  fi
39285
39286  else
39287    # We're on a posix platform. Hooray! :)
39288    # First separate the path from the arguments. This will split at the first
39289    # space.
39290    complete="$BUILD_CC"
39291    path="${complete%% *}"
39292    tmp="$complete EOL"
39293    arguments="${tmp#* }"
39294
39295    # Cannot rely on the command "which" here since it doesn't always work.
39296    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39297    if test -z "$is_absolute_path"; then
39298      # Path to executable is not absolute. Find it.
39299      IFS_save="$IFS"
39300      IFS=:
39301      for p in $PATH; do
39302        if test -f "$p/$path" && test -x "$p/$path"; then
39303          new_path="$p/$path"
39304          break
39305        fi
39306      done
39307      IFS="$IFS_save"
39308    else
39309      # This is an absolute path, we can use it without further modifications.
39310      new_path="$path"
39311    fi
39312
39313    if test "x$new_path" = x; then
39314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39315$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39316      has_space=`$ECHO "$complete" | $GREP " "`
39317      if test "x$has_space" != x; then
39318        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39319$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39320      fi
39321      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39322    fi
39323  fi
39324
39325  # Now join together the path and the arguments once again
39326  if test "x$arguments" != xEOL; then
39327    new_complete="$new_path ${arguments% *}"
39328  else
39329    new_complete="$new_path"
39330  fi
39331
39332  if test "x$complete" != "x$new_complete"; then
39333    BUILD_CC="$new_complete"
39334    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39335$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39336  fi
39337
39338
39339
39340  # Publish this variable in the help.
39341
39342
39343  if test "x$BUILD_CXX" = x; then
39344    # The variable is not set by user, try to locate tool using the code snippet
39345    for ac_prog in cl CC g++
39346do
39347  # Extract the first word of "$ac_prog", so it can be a program name with args.
39348set dummy $ac_prog; ac_word=$2
39349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39350$as_echo_n "checking for $ac_word... " >&6; }
39351if ${ac_cv_path_BUILD_CXX+:} false; then :
39352  $as_echo_n "(cached) " >&6
39353else
39354  case $BUILD_CXX in
39355  [\\/]* | ?:[\\/]*)
39356  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39357  ;;
39358  *)
39359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39360for as_dir in $PATH
39361do
39362  IFS=$as_save_IFS
39363  test -z "$as_dir" && as_dir=.
39364    for ac_exec_ext in '' $ac_executable_extensions; do
39365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39366    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39368    break 2
39369  fi
39370done
39371  done
39372IFS=$as_save_IFS
39373
39374  ;;
39375esac
39376fi
39377BUILD_CXX=$ac_cv_path_BUILD_CXX
39378if test -n "$BUILD_CXX"; then
39379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39380$as_echo "$BUILD_CXX" >&6; }
39381else
39382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39383$as_echo "no" >&6; }
39384fi
39385
39386
39387  test -n "$BUILD_CXX" && break
39388done
39389
39390  else
39391    # The variable is set, but is it from the command line or the environment?
39392
39393    # Try to remove the string !BUILD_CXX! from our list.
39394    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39395    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39396      # If it failed, the variable was not from the command line. Ignore it,
39397      # but warn the user (except for BASH, which is always set by the calling BASH).
39398      if test "xBUILD_CXX" != xBASH; then
39399        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39400$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39401      fi
39402      # Try to locate tool using the code snippet
39403      for ac_prog in cl CC g++
39404do
39405  # Extract the first word of "$ac_prog", so it can be a program name with args.
39406set dummy $ac_prog; ac_word=$2
39407{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39408$as_echo_n "checking for $ac_word... " >&6; }
39409if ${ac_cv_path_BUILD_CXX+:} false; then :
39410  $as_echo_n "(cached) " >&6
39411else
39412  case $BUILD_CXX in
39413  [\\/]* | ?:[\\/]*)
39414  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39415  ;;
39416  *)
39417  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39418for as_dir in $PATH
39419do
39420  IFS=$as_save_IFS
39421  test -z "$as_dir" && as_dir=.
39422    for ac_exec_ext in '' $ac_executable_extensions; do
39423  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39424    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39425    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39426    break 2
39427  fi
39428done
39429  done
39430IFS=$as_save_IFS
39431
39432  ;;
39433esac
39434fi
39435BUILD_CXX=$ac_cv_path_BUILD_CXX
39436if test -n "$BUILD_CXX"; then
39437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39438$as_echo "$BUILD_CXX" >&6; }
39439else
39440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39441$as_echo "no" >&6; }
39442fi
39443
39444
39445  test -n "$BUILD_CXX" && break
39446done
39447
39448    else
39449      # If it succeeded, then it was overridden by the user. We will use it
39450      # for the tool.
39451
39452      # First remove it from the list of overridden variables, so we can test
39453      # for unknown variables in the end.
39454      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39455
39456      # Check if the provided tool contains a complete path.
39457      tool_specified="$BUILD_CXX"
39458      tool_basename="${tool_specified##*/}"
39459      if test "x$tool_basename" = "x$tool_specified"; then
39460        # A command without a complete path is provided, search $PATH.
39461        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39462$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39463        # Extract the first word of "$tool_basename", so it can be a program name with args.
39464set dummy $tool_basename; ac_word=$2
39465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39466$as_echo_n "checking for $ac_word... " >&6; }
39467if ${ac_cv_path_BUILD_CXX+:} false; then :
39468  $as_echo_n "(cached) " >&6
39469else
39470  case $BUILD_CXX in
39471  [\\/]* | ?:[\\/]*)
39472  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39473  ;;
39474  *)
39475  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39476for as_dir in $PATH
39477do
39478  IFS=$as_save_IFS
39479  test -z "$as_dir" && as_dir=.
39480    for ac_exec_ext in '' $ac_executable_extensions; do
39481  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39482    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39483    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39484    break 2
39485  fi
39486done
39487  done
39488IFS=$as_save_IFS
39489
39490  ;;
39491esac
39492fi
39493BUILD_CXX=$ac_cv_path_BUILD_CXX
39494if test -n "$BUILD_CXX"; then
39495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39496$as_echo "$BUILD_CXX" >&6; }
39497else
39498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39499$as_echo "no" >&6; }
39500fi
39501
39502
39503        if test "x$BUILD_CXX" = x; then
39504          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39505        fi
39506      else
39507        # Otherwise we believe it is a complete path. Use it as it is.
39508        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39509$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39510        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39511$as_echo_n "checking for BUILD_CXX... " >&6; }
39512        if test ! -x "$tool_specified"; then
39513          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39514$as_echo "not found" >&6; }
39515          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39516        fi
39517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39518$as_echo "$tool_specified" >&6; }
39519      fi
39520    fi
39521  fi
39522
39523
39524
39525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39526
39527  # First separate the path from the arguments. This will split at the first
39528  # space.
39529  complete="$BUILD_CXX"
39530  path="${complete%% *}"
39531  tmp="$complete EOL"
39532  arguments="${tmp#* }"
39533
39534  # Input might be given as Windows format, start by converting to
39535  # unix format.
39536  new_path=`$CYGPATH -u "$path"`
39537
39538  # Now try to locate executable using which
39539  new_path=`$WHICH "$new_path" 2> /dev/null`
39540  # bat and cmd files are not always considered executable in cygwin causing which
39541  # to not find them
39542  if test "x$new_path" = x \
39543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39545    new_path=`$CYGPATH -u "$path"`
39546  fi
39547  if test "x$new_path" = x; then
39548    # Oops. Which didn't find the executable.
39549    # The splitting of arguments from the executable at a space might have been incorrect,
39550    # since paths with space are more likely in Windows. Give it another try with the whole
39551    # argument.
39552    path="$complete"
39553    arguments="EOL"
39554    new_path=`$CYGPATH -u "$path"`
39555    new_path=`$WHICH "$new_path" 2> /dev/null`
39556    # bat and cmd files are not always considered executable in cygwin causing which
39557    # to not find them
39558    if test "x$new_path" = x \
39559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39561      new_path=`$CYGPATH -u "$path"`
39562    fi
39563    if test "x$new_path" = x; then
39564      # It's still not found. Now this is an unrecoverable error.
39565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39566$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39567      has_space=`$ECHO "$complete" | $GREP " "`
39568      if test "x$has_space" != x; then
39569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39571      fi
39572      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39573    fi
39574  fi
39575
39576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39579  # "foo.exe" is OK but "foo" is an error.
39580  #
39581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39582  # It is also a way to make sure we got the proper file name for the real test later on.
39583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39584  if test "x$test_shortpath" = x; then
39585    # Short path failed, file does not exist as specified.
39586    # Try adding .exe or .cmd
39587    if test -f "${new_path}.exe"; then
39588      input_to_shortpath="${new_path}.exe"
39589    elif test -f "${new_path}.cmd"; then
39590      input_to_shortpath="${new_path}.cmd"
39591    else
39592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39593$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39596      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39597    fi
39598  else
39599    input_to_shortpath="$new_path"
39600  fi
39601
39602  # Call helper function which possibly converts this using DOS-style short mode.
39603  # If so, the updated path is stored in $new_path.
39604  new_path="$input_to_shortpath"
39605
39606  input_path="$input_to_shortpath"
39607  # Check if we need to convert this using DOS-style short mode. If the path
39608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39609  # take no chances and rewrite it.
39610  # Note: m4 eats our [], so we need to use [ and ] instead.
39611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39612  if test "x$has_forbidden_chars" != x; then
39613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39617      # Going to short mode and back again did indeed matter. Since short mode is
39618      # case insensitive, let's make it lowercase to improve readability.
39619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39620      # Now convert it back to Unix-stile (cygpath)
39621      input_path=`$CYGPATH -u "$shortmode_path"`
39622      new_path="$input_path"
39623    fi
39624  fi
39625
39626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39627  if test "x$test_cygdrive_prefix" = x; then
39628    # As a simple fix, exclude /usr/bin since it's not a real path.
39629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39631      # a path prefixed by /cygdrive for fixpath to work.
39632      new_path="$CYGWIN_ROOT_PATH$input_path"
39633    fi
39634  fi
39635
39636  # remove trailing .exe if any
39637  new_path="${new_path/%.exe/}"
39638
39639  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39640
39641  # First separate the path from the arguments. This will split at the first
39642  # space.
39643  complete="$BUILD_CXX"
39644  path="${complete%% *}"
39645  tmp="$complete EOL"
39646  arguments="${tmp#* }"
39647
39648  # Input might be given as Windows format, start by converting to
39649  # unix format.
39650  new_path="$path"
39651
39652  windows_path="$new_path"
39653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39654    unix_path=`$CYGPATH -u "$windows_path"`
39655    new_path="$unix_path"
39656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39658    new_path="$unix_path"
39659  fi
39660
39661
39662  # Now try to locate executable using which
39663  new_path=`$WHICH "$new_path" 2> /dev/null`
39664
39665  if test "x$new_path" = x; then
39666    # Oops. Which didn't find the executable.
39667    # The splitting of arguments from the executable at a space might have been incorrect,
39668    # since paths with space are more likely in Windows. Give it another try with the whole
39669    # argument.
39670    path="$complete"
39671    arguments="EOL"
39672    new_path="$path"
39673
39674  windows_path="$new_path"
39675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39676    unix_path=`$CYGPATH -u "$windows_path"`
39677    new_path="$unix_path"
39678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39680    new_path="$unix_path"
39681  fi
39682
39683
39684    new_path=`$WHICH "$new_path" 2> /dev/null`
39685
39686    if test "x$new_path" = x; then
39687      # It's still not found. Now this is an unrecoverable error.
39688      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39689$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39690      has_space=`$ECHO "$complete" | $GREP " "`
39691      if test "x$has_space" != x; then
39692        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39693$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39694      fi
39695      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39696    fi
39697  fi
39698
39699  # Now new_path has a complete unix path to the binary
39700  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39701    # Keep paths in /bin as-is, but remove trailing .exe if any
39702    new_path="${new_path/%.exe/}"
39703    # Do not save /bin paths to all_fixpath_prefixes!
39704  else
39705    # Not in mixed or Windows style, start by that.
39706    new_path=`cmd //c echo $new_path`
39707
39708  input_path="$new_path"
39709  # Check if we need to convert this using DOS-style short mode. If the path
39710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39711  # take no chances and rewrite it.
39712  # Note: m4 eats our [], so we need to use [ and ] instead.
39713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39714  if test "x$has_forbidden_chars" != x; then
39715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39717  fi
39718
39719    # Output is in $new_path
39720
39721  windows_path="$new_path"
39722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39723    unix_path=`$CYGPATH -u "$windows_path"`
39724    new_path="$unix_path"
39725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39727    new_path="$unix_path"
39728  fi
39729
39730    # remove trailing .exe if any
39731    new_path="${new_path/%.exe/}"
39732
39733    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39734    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39735  fi
39736
39737  else
39738    # We're on a posix platform. Hooray! :)
39739    # First separate the path from the arguments. This will split at the first
39740    # space.
39741    complete="$BUILD_CXX"
39742    path="${complete%% *}"
39743    tmp="$complete EOL"
39744    arguments="${tmp#* }"
39745
39746    # Cannot rely on the command "which" here since it doesn't always work.
39747    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39748    if test -z "$is_absolute_path"; then
39749      # Path to executable is not absolute. Find it.
39750      IFS_save="$IFS"
39751      IFS=:
39752      for p in $PATH; do
39753        if test -f "$p/$path" && test -x "$p/$path"; then
39754          new_path="$p/$path"
39755          break
39756        fi
39757      done
39758      IFS="$IFS_save"
39759    else
39760      # This is an absolute path, we can use it without further modifications.
39761      new_path="$path"
39762    fi
39763
39764    if test "x$new_path" = x; then
39765      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39766$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39767      has_space=`$ECHO "$complete" | $GREP " "`
39768      if test "x$has_space" != x; then
39769        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39770$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39771      fi
39772      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39773    fi
39774  fi
39775
39776  # Now join together the path and the arguments once again
39777  if test "x$arguments" != xEOL; then
39778    new_complete="$new_path ${arguments% *}"
39779  else
39780    new_complete="$new_path"
39781  fi
39782
39783  if test "x$complete" != "x$new_complete"; then
39784    BUILD_CXX="$new_complete"
39785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39786$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39787  fi
39788
39789
39790
39791  # Publish this variable in the help.
39792
39793
39794  if test "x$BUILD_LD" = x; then
39795    # The variable is not set by user, try to locate tool using the code snippet
39796    for ac_prog in ld
39797do
39798  # Extract the first word of "$ac_prog", so it can be a program name with args.
39799set dummy $ac_prog; ac_word=$2
39800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39801$as_echo_n "checking for $ac_word... " >&6; }
39802if ${ac_cv_path_BUILD_LD+:} false; then :
39803  $as_echo_n "(cached) " >&6
39804else
39805  case $BUILD_LD in
39806  [\\/]* | ?:[\\/]*)
39807  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39808  ;;
39809  *)
39810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39811for as_dir in $PATH
39812do
39813  IFS=$as_save_IFS
39814  test -z "$as_dir" && as_dir=.
39815    for ac_exec_ext in '' $ac_executable_extensions; do
39816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39817    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39819    break 2
39820  fi
39821done
39822  done
39823IFS=$as_save_IFS
39824
39825  ;;
39826esac
39827fi
39828BUILD_LD=$ac_cv_path_BUILD_LD
39829if test -n "$BUILD_LD"; then
39830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39831$as_echo "$BUILD_LD" >&6; }
39832else
39833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39834$as_echo "no" >&6; }
39835fi
39836
39837
39838  test -n "$BUILD_LD" && break
39839done
39840
39841  else
39842    # The variable is set, but is it from the command line or the environment?
39843
39844    # Try to remove the string !BUILD_LD! from our list.
39845    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39846    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39847      # If it failed, the variable was not from the command line. Ignore it,
39848      # but warn the user (except for BASH, which is always set by the calling BASH).
39849      if test "xBUILD_LD" != xBASH; then
39850        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39851$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39852      fi
39853      # Try to locate tool using the code snippet
39854      for ac_prog in ld
39855do
39856  # Extract the first word of "$ac_prog", so it can be a program name with args.
39857set dummy $ac_prog; ac_word=$2
39858{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39859$as_echo_n "checking for $ac_word... " >&6; }
39860if ${ac_cv_path_BUILD_LD+:} false; then :
39861  $as_echo_n "(cached) " >&6
39862else
39863  case $BUILD_LD in
39864  [\\/]* | ?:[\\/]*)
39865  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39866  ;;
39867  *)
39868  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39869for as_dir in $PATH
39870do
39871  IFS=$as_save_IFS
39872  test -z "$as_dir" && as_dir=.
39873    for ac_exec_ext in '' $ac_executable_extensions; do
39874  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39875    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39876    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39877    break 2
39878  fi
39879done
39880  done
39881IFS=$as_save_IFS
39882
39883  ;;
39884esac
39885fi
39886BUILD_LD=$ac_cv_path_BUILD_LD
39887if test -n "$BUILD_LD"; then
39888  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39889$as_echo "$BUILD_LD" >&6; }
39890else
39891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39892$as_echo "no" >&6; }
39893fi
39894
39895
39896  test -n "$BUILD_LD" && break
39897done
39898
39899    else
39900      # If it succeeded, then it was overridden by the user. We will use it
39901      # for the tool.
39902
39903      # First remove it from the list of overridden variables, so we can test
39904      # for unknown variables in the end.
39905      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39906
39907      # Check if the provided tool contains a complete path.
39908      tool_specified="$BUILD_LD"
39909      tool_basename="${tool_specified##*/}"
39910      if test "x$tool_basename" = "x$tool_specified"; then
39911        # A command without a complete path is provided, search $PATH.
39912        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
39913$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
39914        # Extract the first word of "$tool_basename", so it can be a program name with args.
39915set dummy $tool_basename; ac_word=$2
39916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39917$as_echo_n "checking for $ac_word... " >&6; }
39918if ${ac_cv_path_BUILD_LD+:} false; then :
39919  $as_echo_n "(cached) " >&6
39920else
39921  case $BUILD_LD in
39922  [\\/]* | ?:[\\/]*)
39923  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39924  ;;
39925  *)
39926  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39927for as_dir in $PATH
39928do
39929  IFS=$as_save_IFS
39930  test -z "$as_dir" && as_dir=.
39931    for ac_exec_ext in '' $ac_executable_extensions; do
39932  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39933    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39934    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39935    break 2
39936  fi
39937done
39938  done
39939IFS=$as_save_IFS
39940
39941  ;;
39942esac
39943fi
39944BUILD_LD=$ac_cv_path_BUILD_LD
39945if test -n "$BUILD_LD"; then
39946  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39947$as_echo "$BUILD_LD" >&6; }
39948else
39949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39950$as_echo "no" >&6; }
39951fi
39952
39953
39954        if test "x$BUILD_LD" = x; then
39955          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39956        fi
39957      else
39958        # Otherwise we believe it is a complete path. Use it as it is.
39959        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
39960$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
39961        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
39962$as_echo_n "checking for BUILD_LD... " >&6; }
39963        if test ! -x "$tool_specified"; then
39964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39965$as_echo "not found" >&6; }
39966          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
39967        fi
39968        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39969$as_echo "$tool_specified" >&6; }
39970      fi
39971    fi
39972  fi
39973
39974
39975
39976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39977
39978  # First separate the path from the arguments. This will split at the first
39979  # space.
39980  complete="$BUILD_LD"
39981  path="${complete%% *}"
39982  tmp="$complete EOL"
39983  arguments="${tmp#* }"
39984
39985  # Input might be given as Windows format, start by converting to
39986  # unix format.
39987  new_path=`$CYGPATH -u "$path"`
39988
39989  # Now try to locate executable using which
39990  new_path=`$WHICH "$new_path" 2> /dev/null`
39991  # bat and cmd files are not always considered executable in cygwin causing which
39992  # to not find them
39993  if test "x$new_path" = x \
39994      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39995      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39996    new_path=`$CYGPATH -u "$path"`
39997  fi
39998  if test "x$new_path" = x; then
39999    # Oops. Which didn't find the executable.
40000    # The splitting of arguments from the executable at a space might have been incorrect,
40001    # since paths with space are more likely in Windows. Give it another try with the whole
40002    # argument.
40003    path="$complete"
40004    arguments="EOL"
40005    new_path=`$CYGPATH -u "$path"`
40006    new_path=`$WHICH "$new_path" 2> /dev/null`
40007    # bat and cmd files are not always considered executable in cygwin causing which
40008    # to not find them
40009    if test "x$new_path" = x \
40010        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40011        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40012      new_path=`$CYGPATH -u "$path"`
40013    fi
40014    if test "x$new_path" = x; then
40015      # It's still not found. Now this is an unrecoverable error.
40016      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40017$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40018      has_space=`$ECHO "$complete" | $GREP " "`
40019      if test "x$has_space" != x; then
40020        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40021$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40022      fi
40023      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40024    fi
40025  fi
40026
40027  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40028  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40029  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40030  # "foo.exe" is OK but "foo" is an error.
40031  #
40032  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40033  # It is also a way to make sure we got the proper file name for the real test later on.
40034  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40035  if test "x$test_shortpath" = x; then
40036    # Short path failed, file does not exist as specified.
40037    # Try adding .exe or .cmd
40038    if test -f "${new_path}.exe"; then
40039      input_to_shortpath="${new_path}.exe"
40040    elif test -f "${new_path}.cmd"; then
40041      input_to_shortpath="${new_path}.cmd"
40042    else
40043      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40044$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40045      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40046$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40047      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40048    fi
40049  else
40050    input_to_shortpath="$new_path"
40051  fi
40052
40053  # Call helper function which possibly converts this using DOS-style short mode.
40054  # If so, the updated path is stored in $new_path.
40055  new_path="$input_to_shortpath"
40056
40057  input_path="$input_to_shortpath"
40058  # Check if we need to convert this using DOS-style short mode. If the path
40059  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40060  # take no chances and rewrite it.
40061  # Note: m4 eats our [], so we need to use [ and ] instead.
40062  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40063  if test "x$has_forbidden_chars" != x; then
40064    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40065    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40066    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40067    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40068      # Going to short mode and back again did indeed matter. Since short mode is
40069      # case insensitive, let's make it lowercase to improve readability.
40070      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40071      # Now convert it back to Unix-stile (cygpath)
40072      input_path=`$CYGPATH -u "$shortmode_path"`
40073      new_path="$input_path"
40074    fi
40075  fi
40076
40077  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40078  if test "x$test_cygdrive_prefix" = x; then
40079    # As a simple fix, exclude /usr/bin since it's not a real path.
40080    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40081      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40082      # a path prefixed by /cygdrive for fixpath to work.
40083      new_path="$CYGWIN_ROOT_PATH$input_path"
40084    fi
40085  fi
40086
40087  # remove trailing .exe if any
40088  new_path="${new_path/%.exe/}"
40089
40090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40091
40092  # First separate the path from the arguments. This will split at the first
40093  # space.
40094  complete="$BUILD_LD"
40095  path="${complete%% *}"
40096  tmp="$complete EOL"
40097  arguments="${tmp#* }"
40098
40099  # Input might be given as Windows format, start by converting to
40100  # unix format.
40101  new_path="$path"
40102
40103  windows_path="$new_path"
40104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40105    unix_path=`$CYGPATH -u "$windows_path"`
40106    new_path="$unix_path"
40107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40109    new_path="$unix_path"
40110  fi
40111
40112
40113  # Now try to locate executable using which
40114  new_path=`$WHICH "$new_path" 2> /dev/null`
40115
40116  if test "x$new_path" = x; then
40117    # Oops. Which didn't find the executable.
40118    # The splitting of arguments from the executable at a space might have been incorrect,
40119    # since paths with space are more likely in Windows. Give it another try with the whole
40120    # argument.
40121    path="$complete"
40122    arguments="EOL"
40123    new_path="$path"
40124
40125  windows_path="$new_path"
40126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40127    unix_path=`$CYGPATH -u "$windows_path"`
40128    new_path="$unix_path"
40129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40131    new_path="$unix_path"
40132  fi
40133
40134
40135    new_path=`$WHICH "$new_path" 2> /dev/null`
40136
40137    if test "x$new_path" = x; then
40138      # It's still not found. Now this is an unrecoverable error.
40139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40140$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40141      has_space=`$ECHO "$complete" | $GREP " "`
40142      if test "x$has_space" != x; then
40143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40145      fi
40146      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40147    fi
40148  fi
40149
40150  # Now new_path has a complete unix path to the binary
40151  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40152    # Keep paths in /bin as-is, but remove trailing .exe if any
40153    new_path="${new_path/%.exe/}"
40154    # Do not save /bin paths to all_fixpath_prefixes!
40155  else
40156    # Not in mixed or Windows style, start by that.
40157    new_path=`cmd //c echo $new_path`
40158
40159  input_path="$new_path"
40160  # Check if we need to convert this using DOS-style short mode. If the path
40161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40162  # take no chances and rewrite it.
40163  # Note: m4 eats our [], so we need to use [ and ] instead.
40164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40165  if test "x$has_forbidden_chars" != x; then
40166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40168  fi
40169
40170    # Output is in $new_path
40171
40172  windows_path="$new_path"
40173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40174    unix_path=`$CYGPATH -u "$windows_path"`
40175    new_path="$unix_path"
40176  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40177    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40178    new_path="$unix_path"
40179  fi
40180
40181    # remove trailing .exe if any
40182    new_path="${new_path/%.exe/}"
40183
40184    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40185    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40186  fi
40187
40188  else
40189    # We're on a posix platform. Hooray! :)
40190    # First separate the path from the arguments. This will split at the first
40191    # space.
40192    complete="$BUILD_LD"
40193    path="${complete%% *}"
40194    tmp="$complete EOL"
40195    arguments="${tmp#* }"
40196
40197    # Cannot rely on the command "which" here since it doesn't always work.
40198    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40199    if test -z "$is_absolute_path"; then
40200      # Path to executable is not absolute. Find it.
40201      IFS_save="$IFS"
40202      IFS=:
40203      for p in $PATH; do
40204        if test -f "$p/$path" && test -x "$p/$path"; then
40205          new_path="$p/$path"
40206          break
40207        fi
40208      done
40209      IFS="$IFS_save"
40210    else
40211      # This is an absolute path, we can use it without further modifications.
40212      new_path="$path"
40213    fi
40214
40215    if test "x$new_path" = x; then
40216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40217$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40218      has_space=`$ECHO "$complete" | $GREP " "`
40219      if test "x$has_space" != x; then
40220        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40221$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40222      fi
40223      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40224    fi
40225  fi
40226
40227  # Now join together the path and the arguments once again
40228  if test "x$arguments" != xEOL; then
40229    new_complete="$new_path ${arguments% *}"
40230  else
40231    new_complete="$new_path"
40232  fi
40233
40234  if test "x$complete" != "x$new_complete"; then
40235    BUILD_LD="$new_complete"
40236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40237$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40238  fi
40239
40240  else
40241    # If we are not cross compiling, use the normal target compilers for
40242    # building the build platform executables.
40243    BUILD_CC="$CC"
40244    BUILD_CXX="$CXX"
40245    BUILD_LD="$LD"
40246  fi
40247
40248
40249
40250
40251
40252
40253  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40254    # For hotspot, we need these in Windows mixed path,
40255    # so rewrite them all. Need added .exe suffix.
40256    HOTSPOT_CXX="$CXX.exe"
40257    HOTSPOT_LD="$LD.exe"
40258    HOTSPOT_MT="$MT.exe"
40259    HOTSPOT_RC="$RC.exe"
40260
40261  unix_path="$HOTSPOT_CXX"
40262  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40263    windows_path=`$CYGPATH -m "$unix_path"`
40264    HOTSPOT_CXX="$windows_path"
40265  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40266    windows_path=`cmd //c echo $unix_path`
40267    HOTSPOT_CXX="$windows_path"
40268  fi
40269
40270
40271  unix_path="$HOTSPOT_LD"
40272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40273    windows_path=`$CYGPATH -m "$unix_path"`
40274    HOTSPOT_LD="$windows_path"
40275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40276    windows_path=`cmd //c echo $unix_path`
40277    HOTSPOT_LD="$windows_path"
40278  fi
40279
40280
40281  unix_path="$HOTSPOT_MT"
40282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40283    windows_path=`$CYGPATH -m "$unix_path"`
40284    HOTSPOT_MT="$windows_path"
40285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40286    windows_path=`cmd //c echo $unix_path`
40287    HOTSPOT_MT="$windows_path"
40288  fi
40289
40290
40291  unix_path="$HOTSPOT_RC"
40292  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40293    windows_path=`$CYGPATH -m "$unix_path"`
40294    HOTSPOT_RC="$windows_path"
40295  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40296    windows_path=`cmd //c echo $unix_path`
40297    HOTSPOT_RC="$windows_path"
40298  fi
40299
40300
40301
40302  else
40303    HOTSPOT_CXX="$CXX"
40304    HOTSPOT_LD="$LD"
40305  fi
40306
40307
40308
40309  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40310    USE_CLANG=true
40311  fi
40312
40313
40314  # LDEXE is the linker to use, when creating executables. Not really used.
40315  # FIXME: These should just be removed!
40316  LDEXE="$LD"
40317  LDEXECXX="$LDCXX"
40318
40319
40320
40321
40322
40323
40324  # The package path is used only on macosx?
40325  # FIXME: clean this up, and/or move it elsewhere.
40326  PACKAGE_PATH=/opt/local
40327
40328
40329  # Check for extra potential brokenness.
40330  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40331    # On Windows, double-check that we got the right compiler.
40332    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40333    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40334    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40335      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40336        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40337      fi
40338    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40339      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40340        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40341      fi
40342    fi
40343  fi
40344
40345  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40346    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40347    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40348    # This is later checked when setting flags.
40349
40350    # "-Og" suppported for GCC 4.8 and later
40351    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40352
40353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40354$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40355  supports=yes
40356
40357  saved_cflags="$CFLAGS"
40358  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40359  ac_ext=c
40360ac_cpp='$CPP $CPPFLAGS'
40361ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40362ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40363ac_compiler_gnu=$ac_cv_c_compiler_gnu
40364
40365  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40366/* end confdefs.h.  */
40367int i;
40368_ACEOF
40369if ac_fn_c_try_compile "$LINENO"; then :
40370
40371else
40372  supports=no
40373fi
40374rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40375  ac_ext=cpp
40376ac_cpp='$CXXCPP $CPPFLAGS'
40377ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40378ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40379ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40380
40381  CFLAGS="$saved_cflags"
40382
40383  saved_cxxflags="$CXXFLAGS"
40384  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40385  ac_ext=cpp
40386ac_cpp='$CXXCPP $CPPFLAGS'
40387ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40388ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40389ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40390
40391  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40392/* end confdefs.h.  */
40393int i;
40394_ACEOF
40395if ac_fn_cxx_try_compile "$LINENO"; then :
40396
40397else
40398  supports=no
40399fi
40400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40401  ac_ext=cpp
40402ac_cpp='$CXXCPP $CPPFLAGS'
40403ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40404ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40405ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40406
40407  CXXFLAGS="$saved_cxxflags"
40408
40409  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40410$as_echo "$supports" >&6; }
40411  if test "x$supports" = "xyes" ; then
40412    HAS_CFLAG_OPTIMIZE_DEBUG=true
40413  else
40414    HAS_CFLAG_OPTIMIZE_DEBUG=false
40415  fi
40416
40417
40418    # "-fsanitize=undefined" supported for GCC 4.9 and later
40419    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
40420
40421  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
40422$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
40423  supports=yes
40424
40425  saved_cflags="$CFLAGS"
40426  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40427  ac_ext=c
40428ac_cpp='$CPP $CPPFLAGS'
40429ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40430ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40431ac_compiler_gnu=$ac_cv_c_compiler_gnu
40432
40433  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40434/* end confdefs.h.  */
40435int i;
40436_ACEOF
40437if ac_fn_c_try_compile "$LINENO"; then :
40438
40439else
40440  supports=no
40441fi
40442rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40443  ac_ext=cpp
40444ac_cpp='$CXXCPP $CPPFLAGS'
40445ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40446ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40447ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40448
40449  CFLAGS="$saved_cflags"
40450
40451  saved_cxxflags="$CXXFLAGS"
40452  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40453  ac_ext=cpp
40454ac_cpp='$CXXCPP $CPPFLAGS'
40455ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40456ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40457ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40458
40459  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40460/* end confdefs.h.  */
40461int i;
40462_ACEOF
40463if ac_fn_cxx_try_compile "$LINENO"; then :
40464
40465else
40466  supports=no
40467fi
40468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40469  ac_ext=cpp
40470ac_cpp='$CXXCPP $CPPFLAGS'
40471ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40472ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40473ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40474
40475  CXXFLAGS="$saved_cxxflags"
40476
40477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40478$as_echo "$supports" >&6; }
40479  if test "x$supports" = "xyes" ; then
40480    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
40481  else
40482    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
40483  fi
40484
40485
40486    # "-z relro" supported in GNU binutils 2.17 and later
40487    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40488
40489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40490$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40491  supports=yes
40492
40493  saved_ldflags="$LDFLAGS"
40494  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40495  ac_ext=c
40496ac_cpp='$CPP $CPPFLAGS'
40497ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40498ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40499ac_compiler_gnu=$ac_cv_c_compiler_gnu
40500
40501  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40502/* end confdefs.h.  */
40503
40504int
40505main ()
40506{
40507
40508  ;
40509  return 0;
40510}
40511_ACEOF
40512if ac_fn_c_try_link "$LINENO"; then :
40513
40514else
40515  supports=no
40516fi
40517rm -f core conftest.err conftest.$ac_objext \
40518    conftest$ac_exeext conftest.$ac_ext
40519  ac_ext=cpp
40520ac_cpp='$CXXCPP $CPPFLAGS'
40521ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40522ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40523ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40524
40525  LDFLAGS="$saved_ldflags"
40526
40527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40528$as_echo "$supports" >&6; }
40529  if test "x$supports" = "xyes" ; then
40530    HAS_LINKER_RELRO=true
40531  else
40532    HAS_LINKER_RELRO=false
40533  fi
40534
40535
40536    # "-z now" supported in GNU binutils 2.11 and later
40537    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40538
40539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40540$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40541  supports=yes
40542
40543  saved_ldflags="$LDFLAGS"
40544  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40545  ac_ext=c
40546ac_cpp='$CPP $CPPFLAGS'
40547ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40548ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40549ac_compiler_gnu=$ac_cv_c_compiler_gnu
40550
40551  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40552/* end confdefs.h.  */
40553
40554int
40555main ()
40556{
40557
40558  ;
40559  return 0;
40560}
40561_ACEOF
40562if ac_fn_c_try_link "$LINENO"; then :
40563
40564else
40565  supports=no
40566fi
40567rm -f core conftest.err conftest.$ac_objext \
40568    conftest$ac_exeext conftest.$ac_ext
40569  ac_ext=cpp
40570ac_cpp='$CXXCPP $CPPFLAGS'
40571ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40572ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40573ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40574
40575  LDFLAGS="$saved_ldflags"
40576
40577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40578$as_echo "$supports" >&6; }
40579  if test "x$supports" = "xyes" ; then
40580    HAS_LINKER_NOW=true
40581  else
40582    HAS_LINKER_NOW=false
40583  fi
40584
40585  fi
40586
40587  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40588  # in executable.'
40589  USING_BROKEN_SUSE_LD=no
40590  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40591    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40592$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40593    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40594    $ECHO "int main() { }" > main.c
40595    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40597$as_echo "no" >&6; }
40598      USING_BROKEN_SUSE_LD=no
40599    else
40600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40601$as_echo "yes" >&6; }
40602      USING_BROKEN_SUSE_LD=yes
40603    fi
40604    rm -rf version-script.map main.c a.out
40605  fi
40606
40607
40608
40609# Setup the JTReg Regression Test Harness.
40610
40611
40612# Check whether --with-jtreg was given.
40613if test "${with_jtreg+set}" = set; then :
40614  withval=$with_jtreg;
40615else
40616  with_jtreg=no
40617fi
40618
40619
40620  if test "x$with_jtreg" = xno; then
40621    # jtreg disabled
40622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40623$as_echo_n "checking for jtreg... " >&6; }
40624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40625$as_echo "no" >&6; }
40626  else
40627    if test "x$with_jtreg" != xyes; then
40628      # with path specified.
40629      JT_HOME="$with_jtreg"
40630    fi
40631
40632    if test "x$JT_HOME" != x; then
40633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40634$as_echo_n "checking for jtreg... " >&6; }
40635
40636      # use JT_HOME enviroment var.
40637
40638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40639
40640  # Input might be given as Windows format, start by converting to
40641  # unix format.
40642  path="$JT_HOME"
40643  new_path=`$CYGPATH -u "$path"`
40644
40645  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40646  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40647  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40648  # "foo.exe" is OK but "foo" is an error.
40649  #
40650  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40651  # It is also a way to make sure we got the proper file name for the real test later on.
40652  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40653  if test "x$test_shortpath" = x; then
40654    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40655$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40656    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40657  fi
40658
40659  # Call helper function which possibly converts this using DOS-style short mode.
40660  # If so, the updated path is stored in $new_path.
40661
40662  input_path="$new_path"
40663  # Check if we need to convert this using DOS-style short mode. If the path
40664  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40665  # take no chances and rewrite it.
40666  # Note: m4 eats our [], so we need to use [ and ] instead.
40667  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40668  if test "x$has_forbidden_chars" != x; then
40669    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40670    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40671    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40672    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40673      # Going to short mode and back again did indeed matter. Since short mode is
40674      # case insensitive, let's make it lowercase to improve readability.
40675      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40676      # Now convert it back to Unix-stile (cygpath)
40677      input_path=`$CYGPATH -u "$shortmode_path"`
40678      new_path="$input_path"
40679    fi
40680  fi
40681
40682  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40683  if test "x$test_cygdrive_prefix" = x; then
40684    # As a simple fix, exclude /usr/bin since it's not a real path.
40685    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40686      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40687      # a path prefixed by /cygdrive for fixpath to work.
40688      new_path="$CYGWIN_ROOT_PATH$input_path"
40689    fi
40690  fi
40691
40692
40693  if test "x$path" != "x$new_path"; then
40694    JT_HOME="$new_path"
40695    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40696$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40697  fi
40698
40699  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40700
40701  path="$JT_HOME"
40702  has_colon=`$ECHO $path | $GREP ^.:`
40703  new_path="$path"
40704  if test "x$has_colon" = x; then
40705    # Not in mixed or Windows style, start by that.
40706    new_path=`cmd //c echo $path`
40707  fi
40708
40709
40710  input_path="$new_path"
40711  # Check if we need to convert this using DOS-style short mode. If the path
40712  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40713  # take no chances and rewrite it.
40714  # Note: m4 eats our [], so we need to use [ and ] instead.
40715  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40716  if test "x$has_forbidden_chars" != x; then
40717    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40718    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40719  fi
40720
40721
40722  windows_path="$new_path"
40723  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40724    unix_path=`$CYGPATH -u "$windows_path"`
40725    new_path="$unix_path"
40726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40727    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40728    new_path="$unix_path"
40729  fi
40730
40731  if test "x$path" != "x$new_path"; then
40732    JT_HOME="$new_path"
40733    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40734$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40735  fi
40736
40737  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40738  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40739
40740  else
40741    # We're on a posix platform. Hooray! :)
40742    path="$JT_HOME"
40743    has_space=`$ECHO "$path" | $GREP " "`
40744    if test "x$has_space" != x; then
40745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40746$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40747      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40748    fi
40749
40750    # Use eval to expand a potential ~
40751    eval path="$path"
40752    if test ! -f "$path" && test ! -d "$path"; then
40753      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40754    fi
40755
40756    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40757  fi
40758
40759
40760      # jtreg win32 script works for everybody
40761      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40762
40763      if test ! -f "$JTREGEXE"; then
40764        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40765      fi
40766
40767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40768$as_echo "$JTREGEXE" >&6; }
40769    else
40770      # try to find jtreg on path
40771
40772
40773
40774  # Publish this variable in the help.
40775
40776
40777  if test "x$JTREGEXE" = x; then
40778    # The variable is not set by user, try to locate tool using the code snippet
40779    for ac_prog in jtreg
40780do
40781  # Extract the first word of "$ac_prog", so it can be a program name with args.
40782set dummy $ac_prog; ac_word=$2
40783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40784$as_echo_n "checking for $ac_word... " >&6; }
40785if ${ac_cv_path_JTREGEXE+:} false; then :
40786  $as_echo_n "(cached) " >&6
40787else
40788  case $JTREGEXE in
40789  [\\/]* | ?:[\\/]*)
40790  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40791  ;;
40792  *)
40793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40794for as_dir in $PATH
40795do
40796  IFS=$as_save_IFS
40797  test -z "$as_dir" && as_dir=.
40798    for ac_exec_ext in '' $ac_executable_extensions; do
40799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40800    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40802    break 2
40803  fi
40804done
40805  done
40806IFS=$as_save_IFS
40807
40808  ;;
40809esac
40810fi
40811JTREGEXE=$ac_cv_path_JTREGEXE
40812if test -n "$JTREGEXE"; then
40813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40814$as_echo "$JTREGEXE" >&6; }
40815else
40816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40817$as_echo "no" >&6; }
40818fi
40819
40820
40821  test -n "$JTREGEXE" && break
40822done
40823
40824  else
40825    # The variable is set, but is it from the command line or the environment?
40826
40827    # Try to remove the string !JTREGEXE! from our list.
40828    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40829    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40830      # If it failed, the variable was not from the command line. Ignore it,
40831      # but warn the user (except for BASH, which is always set by the calling BASH).
40832      if test "xJTREGEXE" != xBASH; then
40833        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40834$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40835      fi
40836      # Try to locate tool using the code snippet
40837      for ac_prog in jtreg
40838do
40839  # Extract the first word of "$ac_prog", so it can be a program name with args.
40840set dummy $ac_prog; ac_word=$2
40841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40842$as_echo_n "checking for $ac_word... " >&6; }
40843if ${ac_cv_path_JTREGEXE+:} false; then :
40844  $as_echo_n "(cached) " >&6
40845else
40846  case $JTREGEXE in
40847  [\\/]* | ?:[\\/]*)
40848  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40849  ;;
40850  *)
40851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40852for as_dir in $PATH
40853do
40854  IFS=$as_save_IFS
40855  test -z "$as_dir" && as_dir=.
40856    for ac_exec_ext in '' $ac_executable_extensions; do
40857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40858    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40860    break 2
40861  fi
40862done
40863  done
40864IFS=$as_save_IFS
40865
40866  ;;
40867esac
40868fi
40869JTREGEXE=$ac_cv_path_JTREGEXE
40870if test -n "$JTREGEXE"; then
40871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40872$as_echo "$JTREGEXE" >&6; }
40873else
40874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40875$as_echo "no" >&6; }
40876fi
40877
40878
40879  test -n "$JTREGEXE" && break
40880done
40881
40882    else
40883      # If it succeeded, then it was overridden by the user. We will use it
40884      # for the tool.
40885
40886      # First remove it from the list of overridden variables, so we can test
40887      # for unknown variables in the end.
40888      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40889
40890      # Check if the provided tool contains a complete path.
40891      tool_specified="$JTREGEXE"
40892      tool_basename="${tool_specified##*/}"
40893      if test "x$tool_basename" = "x$tool_specified"; then
40894        # A command without a complete path is provided, search $PATH.
40895        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
40896$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
40897        # Extract the first word of "$tool_basename", so it can be a program name with args.
40898set dummy $tool_basename; ac_word=$2
40899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40900$as_echo_n "checking for $ac_word... " >&6; }
40901if ${ac_cv_path_JTREGEXE+:} false; then :
40902  $as_echo_n "(cached) " >&6
40903else
40904  case $JTREGEXE in
40905  [\\/]* | ?:[\\/]*)
40906  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40907  ;;
40908  *)
40909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40910for as_dir in $PATH
40911do
40912  IFS=$as_save_IFS
40913  test -z "$as_dir" && as_dir=.
40914    for ac_exec_ext in '' $ac_executable_extensions; do
40915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40916    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40918    break 2
40919  fi
40920done
40921  done
40922IFS=$as_save_IFS
40923
40924  ;;
40925esac
40926fi
40927JTREGEXE=$ac_cv_path_JTREGEXE
40928if test -n "$JTREGEXE"; then
40929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40930$as_echo "$JTREGEXE" >&6; }
40931else
40932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40933$as_echo "no" >&6; }
40934fi
40935
40936
40937        if test "x$JTREGEXE" = x; then
40938          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40939        fi
40940      else
40941        # Otherwise we believe it is a complete path. Use it as it is.
40942        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
40943$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
40944        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
40945$as_echo_n "checking for JTREGEXE... " >&6; }
40946        if test ! -x "$tool_specified"; then
40947          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40948$as_echo "not found" >&6; }
40949          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
40950        fi
40951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40952$as_echo "$tool_specified" >&6; }
40953      fi
40954    fi
40955  fi
40956
40957
40958
40959  if test "x$JTREGEXE" = x; then
40960    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
40961  fi
40962
40963
40964      JT_HOME="`$DIRNAME $JTREGEXE`"
40965    fi
40966  fi
40967
40968
40969
40970
40971
40972
40973  # Option used to tell the compiler whether to create 32- or 64-bit executables
40974  if test "x$TOOLCHAIN_TYPE" = xxlc; then
40975    COMPILER_TARGET_BITS_FLAG="-q"
40976  else
40977    COMPILER_TARGET_BITS_FLAG="-m"
40978  fi
40979
40980
40981  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
40982  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
40983    ARFLAGS="-r"
40984  elif test "x$OPENJDK_TARGET_OS" = xaix; then
40985    ARFLAGS="-X64"
40986  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
40987    # lib.exe is used as AR to create static libraries.
40988    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
40989  else
40990    ARFLAGS=""
40991  fi
40992
40993
40994  ## Setup strip.
40995  # FIXME: should this really be per platform, or should it be per toolchain type?
40996  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
40997  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
40998  if test "x$OPENJDK_TARGET_OS" = xlinux; then
40999    STRIPFLAGS="-g"
41000  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41001    STRIPFLAGS="-x"
41002  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41003    STRIPFLAGS="-S"
41004  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41005    STRIPFLAGS="-X32_64"
41006  fi
41007
41008  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41009    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41010  fi
41011
41012
41013  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41014    # FIXME: break out into MCSFLAGS
41015    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41016  fi
41017
41018
41019  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41020    CC_OUT_OPTION=-Fo
41021    EXE_OUT_OPTION=-out:
41022    LD_OUT_OPTION=-out:
41023    AR_OUT_OPTION=-out:
41024  else
41025    # The option used to specify the target .o,.a or .so file.
41026    # When compiling, how to specify the to be created object file.
41027    CC_OUT_OPTION='-o$(SPACE)'
41028    # When linking, how to specify the to be created executable.
41029    EXE_OUT_OPTION='-o$(SPACE)'
41030    # When linking, how to specify the to be created dynamically linkable library.
41031    LD_OUT_OPTION='-o$(SPACE)'
41032    # When archiving, how to specify the to be create static archive for object files.
41033    AR_OUT_OPTION='rcs$(SPACE)'
41034  fi
41035
41036
41037
41038
41039
41040  # On Windows, we need to set RC flags.
41041  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41042    RC_FLAGS="-nologo -l 0x409 -r"
41043    if test "x$VARIANT" = xOPT; then
41044      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41045    fi
41046
41047    # The version variables used to create RC_FLAGS may be overridden
41048    # in a custom configure script, or possibly the command line.
41049    # Let those variables be expanded at make time in spec.gmk.
41050    # The \$ are escaped to the shell, and the $(...) variables
41051    # are evaluated by make.
41052    RC_FLAGS="$RC_FLAGS \
41053        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41054        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41055        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41056        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41057        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41058        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41059        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41060  fi
41061
41062
41063  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41064    # silence copyright notice and other headers.
41065    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41066  fi
41067
41068  if test "x$SYSROOT" != "x"; then
41069    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41070      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41071        # Solaris Studio does not have a concept of sysroot. Instead we must
41072        # make sure the default include and lib dirs are appended to each
41073        # compile and link command line.
41074        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41075        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41076            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41077            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41078      fi
41079    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41080      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41081      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41082    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41083      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41084      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41085    fi
41086    # Propagate the sysroot args to hotspot
41087    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41088    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41089    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41090  fi
41091
41092
41093
41094
41095# FIXME: Currently we must test this after toolchain but before flags. Fix!
41096
41097# Now we can test some aspects on the target using configure macros.
41098
41099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41100$as_echo_n "checking for ANSI C header files... " >&6; }
41101if ${ac_cv_header_stdc+:} false; then :
41102  $as_echo_n "(cached) " >&6
41103else
41104  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41105/* end confdefs.h.  */
41106#include <stdlib.h>
41107#include <stdarg.h>
41108#include <string.h>
41109#include <float.h>
41110
41111int
41112main ()
41113{
41114
41115  ;
41116  return 0;
41117}
41118_ACEOF
41119if ac_fn_cxx_try_compile "$LINENO"; then :
41120  ac_cv_header_stdc=yes
41121else
41122  ac_cv_header_stdc=no
41123fi
41124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41125
41126if test $ac_cv_header_stdc = yes; then
41127  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41128  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41129/* end confdefs.h.  */
41130#include <string.h>
41131
41132_ACEOF
41133if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41134  $EGREP "memchr" >/dev/null 2>&1; then :
41135
41136else
41137  ac_cv_header_stdc=no
41138fi
41139rm -f conftest*
41140
41141fi
41142
41143if test $ac_cv_header_stdc = yes; then
41144  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41145  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41146/* end confdefs.h.  */
41147#include <stdlib.h>
41148
41149_ACEOF
41150if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41151  $EGREP "free" >/dev/null 2>&1; then :
41152
41153else
41154  ac_cv_header_stdc=no
41155fi
41156rm -f conftest*
41157
41158fi
41159
41160if test $ac_cv_header_stdc = yes; then
41161  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41162  if test "$cross_compiling" = yes; then :
41163  :
41164else
41165  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41166/* end confdefs.h.  */
41167#include <ctype.h>
41168#include <stdlib.h>
41169#if ((' ' & 0x0FF) == 0x020)
41170# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41171# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41172#else
41173# define ISLOWER(c) \
41174		   (('a' <= (c) && (c) <= 'i') \
41175		     || ('j' <= (c) && (c) <= 'r') \
41176		     || ('s' <= (c) && (c) <= 'z'))
41177# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41178#endif
41179
41180#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41181int
41182main ()
41183{
41184  int i;
41185  for (i = 0; i < 256; i++)
41186    if (XOR (islower (i), ISLOWER (i))
41187	|| toupper (i) != TOUPPER (i))
41188      return 2;
41189  return 0;
41190}
41191_ACEOF
41192if ac_fn_cxx_try_run "$LINENO"; then :
41193
41194else
41195  ac_cv_header_stdc=no
41196fi
41197rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41198  conftest.$ac_objext conftest.beam conftest.$ac_ext
41199fi
41200
41201fi
41202fi
41203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41204$as_echo "$ac_cv_header_stdc" >&6; }
41205if test $ac_cv_header_stdc = yes; then
41206
41207$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41208
41209fi
41210
41211# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41212for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41213		  inttypes.h stdint.h unistd.h
41214do :
41215  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41216ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41217"
41218if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41219  cat >>confdefs.h <<_ACEOF
41220#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41221_ACEOF
41222
41223fi
41224
41225done
41226
41227
41228
41229  ###############################################################################
41230  #
41231  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41232  # (The JVM can use 32 or 64 bit Java pointers but that decision
41233  # is made at runtime.)
41234  #
41235
41236  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41237    # Always specify -m flag on Solaris
41238    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41239
41240  # When we add flags to the "official" CFLAGS etc, we need to
41241  # keep track of these additions in ADDED_CFLAGS etc. These
41242  # will later be checked to make sure only controlled additions
41243  # have been made to CFLAGS etc.
41244  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41245  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41246  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41247
41248  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41249  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41250  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41251
41252  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41253  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41254  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41255
41256  elif test "x$COMPILE_TYPE" = xreduced; then
41257    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41258      # Specify -m if running reduced on other Posix platforms
41259
41260  # When we add flags to the "official" CFLAGS etc, we need to
41261  # keep track of these additions in ADDED_CFLAGS etc. These
41262  # will later be checked to make sure only controlled additions
41263  # have been made to CFLAGS etc.
41264  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41265  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41266  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41267
41268  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41269  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41270  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41271
41272  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41273  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41274  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41275
41276    fi
41277  fi
41278
41279  # Make compilation sanity check
41280  for ac_header in stdio.h
41281do :
41282  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41283if test "x$ac_cv_header_stdio_h" = xyes; then :
41284  cat >>confdefs.h <<_ACEOF
41285#define HAVE_STDIO_H 1
41286_ACEOF
41287
41288else
41289
41290    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41291$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41292    if test "x$COMPILE_TYPE" = xreduced; then
41293      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41294$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41295    elif test "x$COMPILE_TYPE" = xcross; then
41296      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41297$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41298    fi
41299    as_fn_error $? "Cannot continue." "$LINENO" 5
41300
41301fi
41302
41303done
41304
41305
41306  # The cast to long int works around a bug in the HP C Compiler
41307# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41308# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41309# This bug is HP SR number 8606223364.
41310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41311$as_echo_n "checking size of int *... " >&6; }
41312if ${ac_cv_sizeof_int_p+:} false; then :
41313  $as_echo_n "(cached) " >&6
41314else
41315  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41316
41317else
41318  if test "$ac_cv_type_int_p" = yes; then
41319     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41320$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41321as_fn_error 77 "cannot compute sizeof (int *)
41322See \`config.log' for more details" "$LINENO" 5; }
41323   else
41324     ac_cv_sizeof_int_p=0
41325   fi
41326fi
41327
41328fi
41329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41330$as_echo "$ac_cv_sizeof_int_p" >&6; }
41331
41332
41333
41334cat >>confdefs.h <<_ACEOF
41335#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41336_ACEOF
41337
41338
41339
41340  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41341  if test "x$ac_cv_sizeof_int_p" = x; then
41342    # The test failed, lets stick to the assumed value.
41343    { $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
41344$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41345  else
41346    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41347
41348    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41349      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41350      # Let's try to implicitely set the compilers target architecture and retry the test
41351      { $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
41352$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;}
41353      { $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
41354$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;}
41355
41356  # When we add flags to the "official" CFLAGS etc, we need to
41357  # keep track of these additions in ADDED_CFLAGS etc. These
41358  # will later be checked to make sure only controlled additions
41359  # have been made to CFLAGS etc.
41360  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41361  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41362  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41363
41364  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41365  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41366  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41367
41368  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41369  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41370  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41371
41372
41373      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41374      unset ac_cv_sizeof_int_p
41375      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41376      cat >>confdefs.h <<_ACEOF
41377#undef SIZEOF_INT_P
41378_ACEOF
41379
41380      # The cast to long int works around a bug in the HP C Compiler
41381# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41382# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41383# This bug is HP SR number 8606223364.
41384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41385$as_echo_n "checking size of int *... " >&6; }
41386if ${ac_cv_sizeof_int_p+:} false; then :
41387  $as_echo_n "(cached) " >&6
41388else
41389  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41390
41391else
41392  if test "$ac_cv_type_int_p" = yes; then
41393     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41394$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41395as_fn_error 77 "cannot compute sizeof (int *)
41396See \`config.log' for more details" "$LINENO" 5; }
41397   else
41398     ac_cv_sizeof_int_p=0
41399   fi
41400fi
41401
41402fi
41403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41404$as_echo "$ac_cv_sizeof_int_p" >&6; }
41405
41406
41407
41408cat >>confdefs.h <<_ACEOF
41409#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41410_ACEOF
41411
41412
41413
41414      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41415
41416      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41417        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
41418      fi
41419    fi
41420  fi
41421
41422  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41423$as_echo_n "checking for target address size... " >&6; }
41424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41425$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41426
41427
41428  ###############################################################################
41429  #
41430  # Is the target little of big endian?
41431  #
41432   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41433$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41434if ${ac_cv_c_bigendian+:} false; then :
41435  $as_echo_n "(cached) " >&6
41436else
41437  ac_cv_c_bigendian=unknown
41438    # See if we're dealing with a universal compiler.
41439    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41440/* end confdefs.h.  */
41441#ifndef __APPLE_CC__
41442	       not a universal capable compiler
41443	     #endif
41444	     typedef int dummy;
41445
41446_ACEOF
41447if ac_fn_cxx_try_compile "$LINENO"; then :
41448
41449	# Check for potential -arch flags.  It is not universal unless
41450	# there are at least two -arch flags with different values.
41451	ac_arch=
41452	ac_prev=
41453	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41454	 if test -n "$ac_prev"; then
41455	   case $ac_word in
41456	     i?86 | x86_64 | ppc | ppc64)
41457	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41458		 ac_arch=$ac_word
41459	       else
41460		 ac_cv_c_bigendian=universal
41461		 break
41462	       fi
41463	       ;;
41464	   esac
41465	   ac_prev=
41466	 elif test "x$ac_word" = "x-arch"; then
41467	   ac_prev=arch
41468	 fi
41469       done
41470fi
41471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41472    if test $ac_cv_c_bigendian = unknown; then
41473      # See if sys/param.h defines the BYTE_ORDER macro.
41474      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41475/* end confdefs.h.  */
41476#include <sys/types.h>
41477	     #include <sys/param.h>
41478
41479int
41480main ()
41481{
41482#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41483		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41484		     && LITTLE_ENDIAN)
41485	      bogus endian macros
41486	     #endif
41487
41488  ;
41489  return 0;
41490}
41491_ACEOF
41492if ac_fn_cxx_try_compile "$LINENO"; then :
41493  # It does; now see whether it defined to BIG_ENDIAN or not.
41494	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41495/* end confdefs.h.  */
41496#include <sys/types.h>
41497		#include <sys/param.h>
41498
41499int
41500main ()
41501{
41502#if BYTE_ORDER != BIG_ENDIAN
41503		 not big endian
41504		#endif
41505
41506  ;
41507  return 0;
41508}
41509_ACEOF
41510if ac_fn_cxx_try_compile "$LINENO"; then :
41511  ac_cv_c_bigendian=yes
41512else
41513  ac_cv_c_bigendian=no
41514fi
41515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41516fi
41517rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41518    fi
41519    if test $ac_cv_c_bigendian = unknown; then
41520      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41521      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41522/* end confdefs.h.  */
41523#include <limits.h>
41524
41525int
41526main ()
41527{
41528#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41529	      bogus endian macros
41530	     #endif
41531
41532  ;
41533  return 0;
41534}
41535_ACEOF
41536if ac_fn_cxx_try_compile "$LINENO"; then :
41537  # It does; now see whether it defined to _BIG_ENDIAN or not.
41538	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41539/* end confdefs.h.  */
41540#include <limits.h>
41541
41542int
41543main ()
41544{
41545#ifndef _BIG_ENDIAN
41546		 not big endian
41547		#endif
41548
41549  ;
41550  return 0;
41551}
41552_ACEOF
41553if ac_fn_cxx_try_compile "$LINENO"; then :
41554  ac_cv_c_bigendian=yes
41555else
41556  ac_cv_c_bigendian=no
41557fi
41558rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41559fi
41560rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41561    fi
41562    if test $ac_cv_c_bigendian = unknown; then
41563      # Compile a test program.
41564      if test "$cross_compiling" = yes; then :
41565  # Try to guess by grepping values from an object file.
41566	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41567/* end confdefs.h.  */
41568short int ascii_mm[] =
41569		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41570		short int ascii_ii[] =
41571		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41572		int use_ascii (int i) {
41573		  return ascii_mm[i] + ascii_ii[i];
41574		}
41575		short int ebcdic_ii[] =
41576		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41577		short int ebcdic_mm[] =
41578		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41579		int use_ebcdic (int i) {
41580		  return ebcdic_mm[i] + ebcdic_ii[i];
41581		}
41582		extern int foo;
41583
41584int
41585main ()
41586{
41587return use_ascii (foo) == use_ebcdic (foo);
41588  ;
41589  return 0;
41590}
41591_ACEOF
41592if ac_fn_cxx_try_compile "$LINENO"; then :
41593  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41594	      ac_cv_c_bigendian=yes
41595	    fi
41596	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41597	      if test "$ac_cv_c_bigendian" = unknown; then
41598		ac_cv_c_bigendian=no
41599	      else
41600		# finding both strings is unlikely to happen, but who knows?
41601		ac_cv_c_bigendian=unknown
41602	      fi
41603	    fi
41604fi
41605rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41606else
41607  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41608/* end confdefs.h.  */
41609$ac_includes_default
41610int
41611main ()
41612{
41613
41614	     /* Are we little or big endian?  From Harbison&Steele.  */
41615	     union
41616	     {
41617	       long int l;
41618	       char c[sizeof (long int)];
41619	     } u;
41620	     u.l = 1;
41621	     return u.c[sizeof (long int) - 1] == 1;
41622
41623  ;
41624  return 0;
41625}
41626_ACEOF
41627if ac_fn_cxx_try_run "$LINENO"; then :
41628  ac_cv_c_bigendian=no
41629else
41630  ac_cv_c_bigendian=yes
41631fi
41632rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41633  conftest.$ac_objext conftest.beam conftest.$ac_ext
41634fi
41635
41636    fi
41637fi
41638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41639$as_echo "$ac_cv_c_bigendian" >&6; }
41640 case $ac_cv_c_bigendian in #(
41641   yes)
41642     ENDIAN="big";; #(
41643   no)
41644     ENDIAN="little" ;; #(
41645   universal)
41646     ENDIAN="universal_endianness"
41647     ;; #(
41648   *)
41649     ENDIAN="unknown" ;;
41650 esac
41651
41652
41653  if test "x$ENDIAN" = xuniversal_endianness; then
41654    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41655  fi
41656  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41657    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
41658  fi
41659
41660
41661# Configure flags for the tools
41662
41663  ###############################################################################
41664  #
41665  # How to compile shared libraries.
41666  #
41667
41668  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41669    PICFLAG="-fPIC"
41670    C_FLAG_REORDER=''
41671    CXX_FLAG_REORDER=''
41672
41673    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41674      # Linking is different on MacOSX
41675      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41676      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41677      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41678      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41679      SET_SHARED_LIBRARY_MAPFILE=''
41680    else
41681      # Default works for linux, might work on other platforms as well.
41682      SHARED_LIBRARY_FLAGS='-shared'
41683      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41684      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41685      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41686      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41687    fi
41688  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41689    PICFLAG=''
41690    C_FLAG_REORDER=''
41691    CXX_FLAG_REORDER=''
41692
41693    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41694      # Linking is different on MacOSX
41695      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41696      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41697      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41698      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41699      SET_SHARED_LIBRARY_MAPFILE=''
41700    else
41701      # Default works for linux, might work on other platforms as well.
41702      SHARED_LIBRARY_FLAGS='-shared'
41703      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41704      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41705      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41706      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41707    fi
41708  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41709    PICFLAG="-KPIC"
41710    C_FLAG_REORDER='-xF'
41711    CXX_FLAG_REORDER='-xF'
41712    SHARED_LIBRARY_FLAGS="-G"
41713    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41714    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41715    SET_SHARED_LIBRARY_NAME=''
41716    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41717  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41718    PICFLAG="-qpic=large"
41719    C_FLAG_REORDER=''
41720    CXX_FLAG_REORDER=''
41721    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41722    SET_EXECUTABLE_ORIGIN=""
41723    SET_SHARED_LIBRARY_ORIGIN=''
41724    SET_SHARED_LIBRARY_NAME=''
41725    SET_SHARED_LIBRARY_MAPFILE=''
41726  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41727    PICFLAG=""
41728    C_FLAG_REORDER=''
41729    CXX_FLAG_REORDER=''
41730    SHARED_LIBRARY_FLAGS="-LD"
41731    SET_EXECUTABLE_ORIGIN=''
41732    SET_SHARED_LIBRARY_ORIGIN=''
41733    SET_SHARED_LIBRARY_NAME=''
41734    SET_SHARED_LIBRARY_MAPFILE=''
41735  fi
41736
41737
41738
41739
41740
41741
41742
41743
41744
41745  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41746    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41747    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41748    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41749  fi
41750  # The (cross) compiler is now configured, we can now test capabilities
41751  # of the target platform.
41752
41753
41754
41755  ###############################################################################
41756  #
41757  # Setup the opt flags for different compilers
41758  # and different operating systems.
41759  #
41760
41761  # FIXME: this was indirectly the old default, but just inherited.
41762  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41763  #   C_FLAG_DEPS="-MMD -MF"
41764  # fi
41765
41766  # Generate make dependency files
41767  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41768    C_FLAG_DEPS="-MMD -MF"
41769  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41770    C_FLAG_DEPS="-MMD -MF"
41771  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41772    C_FLAG_DEPS="-xMMD -xMF"
41773  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41774    C_FLAG_DEPS="-qmakedep=gcc -MF"
41775  fi
41776  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41777
41778
41779
41780  # Debug symbols
41781  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41782    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41783      # reduce from default "-g2" option to save space
41784      CFLAGS_DEBUG_SYMBOLS="-g1"
41785      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41786    else
41787      CFLAGS_DEBUG_SYMBOLS="-g"
41788      CXXFLAGS_DEBUG_SYMBOLS="-g"
41789    fi
41790  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41791    CFLAGS_DEBUG_SYMBOLS="-g"
41792    CXXFLAGS_DEBUG_SYMBOLS="-g"
41793  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41794    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41795    # FIXME: likely a bug, this disables debug symbols rather than enables them
41796    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41797  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41798    CFLAGS_DEBUG_SYMBOLS="-g"
41799    CXXFLAGS_DEBUG_SYMBOLS="-g"
41800  fi
41801
41802
41803
41804  # bounds, memory and behavior checking options
41805  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41806    case $DEBUG_LEVEL in
41807    release )
41808      # no adjustment
41809      ;;
41810    fastdebug )
41811      # Add compile time bounds checks.
41812      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41813      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41814      ;;
41815    slowdebug )
41816      # Add runtime bounds checks and symbol info.
41817      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
41818      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
41819      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
41820        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41821        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41822      fi
41823      ;;
41824    esac
41825  fi
41826
41827
41828
41829  # Optimization levels
41830  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41831    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41832
41833    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41834      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41835      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41836      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41837      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41838      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41839      C_O_FLAG_NONE="-xregs=no%frameptr"
41840      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41841      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41842      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41843      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41844      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41845      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41846        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41847        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41848      fi
41849    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41850      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41851      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41852      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41853      C_O_FLAG_DEBUG=""
41854      C_O_FLAG_NONE=""
41855      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41856      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41857      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41858      C_O_FLAG_DEBUG=""
41859      CXX_O_FLAG_NONE=""
41860    fi
41861  else
41862    # The remaining toolchains share opt flags between CC and CXX;
41863    # setup for C and duplicate afterwards.
41864    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41865      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41866        # On MacOSX we optimize for size, something
41867        # we should do for all platforms?
41868        C_O_FLAG_HIGHEST="-Os"
41869        C_O_FLAG_HI="-Os"
41870        C_O_FLAG_NORM="-Os"
41871      else
41872        C_O_FLAG_HIGHEST="-O3"
41873        C_O_FLAG_HI="-O3"
41874        C_O_FLAG_NORM="-O2"
41875      fi
41876      if test "x$HAS_CFLAG_OPTIMIZE_DEBUG" = "xtrue"; then
41877        C_O_FLAG_DEBUG="$CFLAG_OPTIMIZE_DEBUG_FLAG"
41878      else
41879        C_O_FLAG_DEBUG="-O0"
41880      fi
41881      C_O_FLAG_NONE="-O0"
41882    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41883      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41884        # On MacOSX we optimize for size, something
41885        # we should do for all platforms?
41886        C_O_FLAG_HIGHEST="-Os"
41887        C_O_FLAG_HI="-Os"
41888        C_O_FLAG_NORM="-Os"
41889      else
41890        C_O_FLAG_HIGHEST="-O3"
41891        C_O_FLAG_HI="-O3"
41892        C_O_FLAG_NORM="-O2"
41893      fi
41894      C_O_FLAG_DEBUG="-O0"
41895      C_O_FLAG_NONE="-O0"
41896    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41897      C_O_FLAG_HIGHEST="-O3"
41898      C_O_FLAG_HI="-O3 -qstrict"
41899      C_O_FLAG_NORM="-O2"
41900      C_O_FLAG_DEBUG="-qnoopt"
41901      C_O_FLAG_NONE="-qnoop"
41902    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41903      C_O_FLAG_HIGHEST="-O2"
41904      C_O_FLAG_HI="-O1"
41905      C_O_FLAG_NORM="-O1"
41906      C_O_FLAG_DEBUG="-Od"
41907      C_O_FLAG_NONE="-Od"
41908    fi
41909    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
41910    CXX_O_FLAG_HI="$C_O_FLAG_HI"
41911    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
41912    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
41913    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
41914  fi
41915
41916  # Adjust optimization flags according to debug level.
41917  case $DEBUG_LEVEL in
41918    release )
41919      # no adjustment
41920      ;;
41921    fastdebug )
41922      # Not quite so much optimization
41923      C_O_FLAG_HI="$C_O_FLAG_NORM"
41924      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
41925      ;;
41926    slowdebug )
41927      # Disable optimization
41928      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
41929      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
41930      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
41931      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
41932      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
41933      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
41934      ;;
41935  esac
41936
41937
41938
41939
41940
41941
41942
41943
41944
41945
41946
41947
41948
41949  # Special extras...
41950  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41951    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41952      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41953      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
41954    fi
41955  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41956    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
41957    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41958    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
41959  fi
41960
41961  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
41962    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
41963$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
41964  fi
41965
41966  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
41967    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
41968$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
41969  fi
41970
41971  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
41972    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
41973$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
41974  fi
41975
41976
41977# Check whether --with-extra-cflags was given.
41978if test "${with_extra_cflags+set}" = set; then :
41979  withval=$with_extra_cflags;
41980fi
41981
41982
41983
41984# Check whether --with-extra-cxxflags was given.
41985if test "${with_extra_cxxflags+set}" = set; then :
41986  withval=$with_extra_cxxflags;
41987fi
41988
41989
41990
41991# Check whether --with-extra-ldflags was given.
41992if test "${with_extra_ldflags+set}" = set; then :
41993  withval=$with_extra_ldflags;
41994fi
41995
41996
41997  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
41998  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
41999  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42000
42001  # Hotspot needs these set in their legacy form
42002  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42003  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42004  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42005
42006
42007
42008
42009
42010  ###############################################################################
42011  #
42012  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42013  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42014  #
42015
42016  # Setup compiler/platform specific flags into
42017  #    CFLAGS_JDK    - C Compiler flags
42018  #    CXXFLAGS_JDK  - C++ Compiler flags
42019  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42020  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42021    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42022        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42023    case $OPENJDK_TARGET_CPU_ARCH in
42024      arm )
42025        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42026        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42027        ;;
42028      ppc )
42029        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42030        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42031        ;;
42032      * )
42033        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42034        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42035        ;;
42036    esac
42037  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42038    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42039    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42040      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42041      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42042    fi
42043
42044    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42045    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42046  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42047    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42048    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42049  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42050    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42051    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42052    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42053    -DWIN32 -DIAL"
42054    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42055      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42056    else
42057      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42058    fi
42059  fi
42060
42061  ###############################################################################
42062
42063  # Adjust flags according to debug level.
42064  case $DEBUG_LEVEL in
42065    fastdebug | slowdebug )
42066      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42067      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42068      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42069      ;;
42070    release )
42071      ;;
42072    * )
42073      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42074      ;;
42075  esac
42076
42077  # Setup LP64
42078  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42079
42080  # Set some common defines. These works for all compilers, but assume
42081  # -D is universally accepted.
42082
42083  # Setup endianness
42084  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42085    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42086    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42087    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42088    #   Note: -Dmacro         is the same as    #define macro 1
42089    #         -Dmacro=        is the same as    #define macro
42090    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42091      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42092    else
42093      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42094    fi
42095  else
42096    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42097    # are defined in the system?
42098    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42099      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42100    else
42101      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42102    fi
42103  fi
42104
42105  # Setup target OS define. Use OS target name but in upper case.
42106  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42107  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42108
42109  # Setup target CPU
42110  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42111
42112  # Setup debug/release defines
42113  if test "x$DEBUG_LEVEL" = xrelease; then
42114    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42115    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42116      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42117    fi
42118  else
42119    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42120  fi
42121
42122  # Setup release name
42123  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42124
42125
42126  # Set some additional per-OS defines.
42127  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42128    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42129  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42130    # FIXME: PPC64 should not be here.
42131    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42132  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42133    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42134  fi
42135
42136  # Additional macosx handling
42137  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42138    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42139      # FIXME: This needs to be exported in spec.gmk due to closed legacy code.
42140      # FIXME: clean this up, and/or move it elsewhere.
42141
42142      # Setting these parameters makes it an error to link to macosx APIs that are
42143      # newer than the given OS version and makes the linked binaries compatible
42144      # even if built on a newer version of the OS.
42145      # The expected format is X.Y.Z
42146      MACOSX_VERSION_MIN=10.7.0
42147
42148
42149      # The macro takes the version with no dots, ex: 1070
42150      # Let the flags variables get resolved in make for easier override on make
42151      # command line.
42152      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42153      LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42154    fi
42155  fi
42156
42157  # Setup some hard coded includes
42158  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42159      -I${JDK_OUTPUTDIR}/include \
42160      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42161      -I${JDK_TOPDIR}/src/share/javavm/export \
42162      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42163      -I${JDK_TOPDIR}/src/share/native/common \
42164      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42165
42166  # The shared libraries are compiled using the picflag.
42167  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42168  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42169
42170  # Executable flags
42171  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42172  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42173
42174
42175
42176
42177
42178
42179  # Setup LDFLAGS et al.
42180  #
42181
42182  # Now this is odd. The JDK native libraries have to link against libjvm.so
42183  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42184  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42185  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42186  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42187  # libraries will link to whatever is in memory. Yuck.
42188  #
42189  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42190  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42191    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42192    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42193      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42194    fi
42195    # TODO: make -debug optional "--disable-full-debug-symbols"
42196    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42197  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42198    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42199    # We have previously set HAS_GNU_HASH if this is the case
42200    if test -n "$HAS_GNU_HASH"; then
42201      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42202    fi
42203    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42204      # And since we now know that the linker is gnu, then add -z defs, to forbid
42205      # undefined symbols in object files.
42206      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42207      case $DEBUG_LEVEL in
42208        release )
42209          # tell linker to optimize libraries.
42210          # Should this be supplied to the OSS linker as well?
42211          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42212          ;;
42213        slowdebug )
42214          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42215            # do relocations at load
42216            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42217            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42218          fi
42219          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42220            # mark relocations read only
42221            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42222            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42223          fi
42224          ;;
42225        fastdebug )
42226          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42227            # mark relocations read only
42228            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42229            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42230          fi
42231          ;;
42232        * )
42233          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42234          ;;
42235        esac
42236    fi
42237  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42238    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42239    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42240  fi
42241
42242  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42243    # If undefined behaviour detection is enabled then we need to tell linker.
42244    case $DEBUG_LEVEL in
42245      release | fastdebug )
42246        ;;
42247      slowdebug )
42248        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42249$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42250        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42251          # enable undefined behaviour checking
42252          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42253          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42254        fi
42255        ;;
42256      * )
42257        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42258        ;;
42259    esac
42260  fi
42261
42262  # Customize LDFLAGS for executables
42263
42264  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42265
42266  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42267    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42268      LDFLAGS_STACK_SIZE=1048576
42269    else
42270      LDFLAGS_STACK_SIZE=327680
42271    fi
42272    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42273  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42274    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42275  fi
42276
42277  # Customize LDFLAGS for libs
42278  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42279
42280  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42281    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42282    LDFLAGS_JDKLIB_SUFFIX=""
42283  else
42284    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42285        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42286
42287    # On some platforms (mac) the linker warns about non existing -L dirs.
42288    # Add server first if available. Linking aginst client does not always produce the same results.
42289    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42290    # Default to server for other variants.
42291    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42292      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42293    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42294      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42295    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42296      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42297    else
42298      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42299    fi
42300
42301    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42302    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42303      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42304    fi
42305  fi
42306
42307
42308
42309
42310
42311
42312
42313
42314  # Some Zero and Shark settings.
42315  # ZERO_ARCHFLAG tells the compiler which mode to build for
42316  case "${OPENJDK_TARGET_CPU}" in
42317    s390)
42318      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42319      ;;
42320    *)
42321      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42322  esac
42323
42324  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42325$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42326  supports=yes
42327
42328  saved_cflags="$CFLAGS"
42329  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42330  ac_ext=c
42331ac_cpp='$CPP $CPPFLAGS'
42332ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42333ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42334ac_compiler_gnu=$ac_cv_c_compiler_gnu
42335
42336  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42337/* end confdefs.h.  */
42338int i;
42339_ACEOF
42340if ac_fn_c_try_compile "$LINENO"; then :
42341
42342else
42343  supports=no
42344fi
42345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42346  ac_ext=cpp
42347ac_cpp='$CXXCPP $CPPFLAGS'
42348ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42349ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42350ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42351
42352  CFLAGS="$saved_cflags"
42353
42354  saved_cxxflags="$CXXFLAGS"
42355  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42356  ac_ext=cpp
42357ac_cpp='$CXXCPP $CPPFLAGS'
42358ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42359ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42360ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42361
42362  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42363/* end confdefs.h.  */
42364int i;
42365_ACEOF
42366if ac_fn_cxx_try_compile "$LINENO"; then :
42367
42368else
42369  supports=no
42370fi
42371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42372  ac_ext=cpp
42373ac_cpp='$CXXCPP $CPPFLAGS'
42374ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42375ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42376ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42377
42378  CXXFLAGS="$saved_cxxflags"
42379
42380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42381$as_echo "$supports" >&6; }
42382  if test "x$supports" = "xyes" ; then
42383    :
42384  else
42385    ZERO_ARCHFLAG=""
42386  fi
42387
42388
42389
42390  # Check that the compiler supports -mX (or -qX on AIX) flags
42391  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42392
42393  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42394$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42395  supports=yes
42396
42397  saved_cflags="$CFLAGS"
42398  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42399  ac_ext=c
42400ac_cpp='$CPP $CPPFLAGS'
42401ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42402ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42403ac_compiler_gnu=$ac_cv_c_compiler_gnu
42404
42405  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42406/* end confdefs.h.  */
42407int i;
42408_ACEOF
42409if ac_fn_c_try_compile "$LINENO"; then :
42410
42411else
42412  supports=no
42413fi
42414rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42415  ac_ext=cpp
42416ac_cpp='$CXXCPP $CPPFLAGS'
42417ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42418ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42419ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42420
42421  CFLAGS="$saved_cflags"
42422
42423  saved_cxxflags="$CXXFLAGS"
42424  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42425  ac_ext=cpp
42426ac_cpp='$CXXCPP $CPPFLAGS'
42427ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42428ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42429ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42430
42431  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42432/* end confdefs.h.  */
42433int i;
42434_ACEOF
42435if ac_fn_cxx_try_compile "$LINENO"; then :
42436
42437else
42438  supports=no
42439fi
42440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42441  ac_ext=cpp
42442ac_cpp='$CXXCPP $CPPFLAGS'
42443ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42444ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42445ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42446
42447  CXXFLAGS="$saved_cxxflags"
42448
42449  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42450$as_echo "$supports" >&6; }
42451  if test "x$supports" = "xyes" ; then
42452    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42453  else
42454    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42455  fi
42456
42457
42458
42459  case "${TOOLCHAIN_TYPE}" in
42460    microsoft)
42461      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42462      ;;
42463    solstudio)
42464      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42465      ;;
42466    gcc)
42467      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42468      ;;
42469    clang)
42470      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42471      ;;
42472  esac
42473
42474
42475
42476# Setup debug symbols (need objcopy from the toolchain for that)
42477
42478  #
42479  # ENABLE_DEBUG_SYMBOLS
42480  # This must be done after the toolchain is setup, since we're looking at objcopy.
42481  #
42482  # Check whether --enable-debug-symbols was given.
42483if test "${enable_debug_symbols+set}" = set; then :
42484  enableval=$enable_debug_symbols;
42485fi
42486
42487
42488  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42489$as_echo_n "checking if we should generate debug symbols... " >&6; }
42490
42491  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42492    # explicit enabling of enable-debug-symbols and can't find objcopy
42493    #   this is an error
42494    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42495  fi
42496
42497  if test "x$enable_debug_symbols" = "xyes"; then
42498    ENABLE_DEBUG_SYMBOLS=true
42499  elif test "x$enable_debug_symbols" = "xno"; then
42500    ENABLE_DEBUG_SYMBOLS=false
42501  else
42502    # Default is on if objcopy is found
42503    if test "x$OBJCOPY" != x; then
42504      ENABLE_DEBUG_SYMBOLS=true
42505    # MacOS X and Windows don't use objcopy but default is on for those OSes
42506    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42507      ENABLE_DEBUG_SYMBOLS=true
42508    else
42509      ENABLE_DEBUG_SYMBOLS=false
42510    fi
42511  fi
42512
42513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42514$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42515
42516  #
42517  # ZIP_DEBUGINFO_FILES
42518  #
42519  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42520$as_echo_n "checking if we should zip debug-info files... " >&6; }
42521  # Check whether --enable-zip-debug-info was given.
42522if test "${enable_zip_debug_info+set}" = set; then :
42523  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42524else
42525  enable_zip_debug_info="yes"
42526fi
42527
42528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42529$as_echo "${enable_zip_debug_info}" >&6; }
42530
42531  if test "x${enable_zip_debug_info}" = "xno"; then
42532    ZIP_DEBUGINFO_FILES=false
42533  else
42534    ZIP_DEBUGINFO_FILES=true
42535  fi
42536
42537
42538
42539
42540
42541###############################################################################
42542#
42543# Check dependencies for external and internal libraries.
42544#
42545###############################################################################
42546
42547# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42548
42549  # When using cygwin or msys, we need a wrapper binary that renames
42550  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42551  # @files and rewrites these too! This wrapper binary is
42552  # called fixpath.
42553  FIXPATH=
42554  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42556$as_echo_n "checking if fixpath can be created... " >&6; }
42557    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42558    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42559    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42560      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42561      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42562      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42563      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42564    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42565      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42566      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42567
42568      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42569      # @ was chosen as separator to minimize risk of other tools messing around with it
42570      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42571      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42572
42573      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42574    fi
42575    rm -f $OUTPUT_ROOT/fixpath*
42576    cd $OUTPUT_ROOT
42577    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42578    cd $CURDIR
42579
42580    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42581      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42582$as_echo "no" >&6; }
42583      cat $OUTPUT_ROOT/fixpath1.log
42584      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42585    fi
42586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42587$as_echo "yes" >&6; }
42588    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42589$as_echo_n "checking if fixpath.exe works... " >&6; }
42590    cd $OUTPUT_ROOT
42591    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42592    cd $CURDIR
42593    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42594      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42595$as_echo "no" >&6; }
42596      cat $OUTPUT_ROOT/fixpath2.log
42597      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42598    fi
42599    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42600$as_echo "yes" >&6; }
42601    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42602  fi
42603
42604
42605
42606
42607
42608
42609  ###############################################################################
42610  #
42611  # OS specific settings that we never will need to probe.
42612  #
42613  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42614    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42615$as_echo_n "checking what is not needed on Linux?... " >&6; }
42616    PULSE_NOT_NEEDED=yes
42617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42618$as_echo "pulse" >&6; }
42619  fi
42620
42621  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42622    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42623$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42624    ALSA_NOT_NEEDED=yes
42625    PULSE_NOT_NEEDED=yes
42626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42627$as_echo "alsa pulse" >&6; }
42628  fi
42629
42630  if test "x$OPENJDK_TARGET_OS" = xaix; then
42631    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42632$as_echo_n "checking what is not needed on AIX?... " >&6; }
42633    ALSA_NOT_NEEDED=yes
42634    PULSE_NOT_NEEDED=yes
42635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42636$as_echo "alsa pulse" >&6; }
42637  fi
42638
42639
42640  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42641    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42642$as_echo_n "checking what is not needed on Windows?... " >&6; }
42643    CUPS_NOT_NEEDED=yes
42644    ALSA_NOT_NEEDED=yes
42645    PULSE_NOT_NEEDED=yes
42646    X11_NOT_NEEDED=yes
42647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42648$as_echo "alsa cups pulse x11" >&6; }
42649  fi
42650
42651  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42652    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42653$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42654    ALSA_NOT_NEEDED=yes
42655    PULSE_NOT_NEEDED=yes
42656    X11_NOT_NEEDED=yes
42657    # If the java runtime framework is disabled, then we need X11.
42658    # This will be adjusted below.
42659    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42660$as_echo "alsa pulse x11" >&6; }
42661  fi
42662
42663  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42664    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42665$as_echo_n "checking what is not needed on bsd?... " >&6; }
42666    ALSA_NOT_NEEDED=yes
42667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42668$as_echo "alsa" >&6; }
42669  fi
42670
42671  if test "x$OPENJDK" = "xfalse"; then
42672    FREETYPE_NOT_NEEDED=yes
42673  fi
42674
42675  if test "x$SUPPORT_HEADFUL" = xno; then
42676    X11_NOT_NEEDED=yes
42677  fi
42678
42679  ###############################################################################
42680  #
42681  # Check for MacOSX support for OpenJDK.
42682  #
42683
42684
42685  # Check whether --enable-macosx-runtime-support was given.
42686if test "${enable_macosx_runtime_support+set}" = set; then :
42687  enableval=$enable_macosx_runtime_support;
42688fi
42689
42690  if test "x$enable_macosx_runtime_support" != x; then
42691    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&5
42692$as_echo "$as_me: WARNING: Option --enable-macosx-runtime-support is deprecated and will be ignored." >&2;}
42693  fi
42694
42695
42696  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mac OS X Java Framework" >&5
42697$as_echo_n "checking for Mac OS X Java Framework... " >&6; }
42698  if test -f /System/Library/Frameworks/JavaVM.framework/Frameworks/JavaRuntimeSupport.framework/Headers/JavaRuntimeSupport.h; then
42699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: /System/Library/Frameworks/JavaVM.framework" >&5
42700$as_echo "/System/Library/Frameworks/JavaVM.framework" >&6; }
42701  else
42702    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42703$as_echo "no" >&6; }
42704  fi
42705
42706
42707
42708  ###############################################################################
42709  #
42710  # Check for X Windows
42711  #
42712
42713  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42714  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42715  # --x-libraries for the sysroot, if that seems to be correct.
42716  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42717    if test "x$SYSROOT" != "x"; then
42718      if test "x$x_includes" = xNONE; then
42719        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42720          x_includes="$SYSROOT/usr/X11R6/include"
42721        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42722          x_includes="$SYSROOT/usr/include"
42723        fi
42724      fi
42725      if test "x$x_libraries" = xNONE; then
42726        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42727          x_libraries="$SYSROOT/usr/X11R6/lib"
42728        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42729          x_libraries="$SYSROOT/usr/lib64"
42730        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42731          x_libraries="$SYSROOT/usr/lib"
42732        fi
42733      fi
42734    fi
42735  fi
42736
42737  # Now let autoconf do it's magic
42738  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42739$as_echo_n "checking for X... " >&6; }
42740
42741
42742# Check whether --with-x was given.
42743if test "${with_x+set}" = set; then :
42744  withval=$with_x;
42745fi
42746
42747# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42748if test "x$with_x" = xno; then
42749  # The user explicitly disabled X.
42750  have_x=disabled
42751else
42752  case $x_includes,$x_libraries in #(
42753    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42754    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42755  $as_echo_n "(cached) " >&6
42756else
42757  # One or both of the vars are not set, and there is no cached value.
42758ac_x_includes=no ac_x_libraries=no
42759rm -f -r conftest.dir
42760if mkdir conftest.dir; then
42761  cd conftest.dir
42762  cat >Imakefile <<'_ACEOF'
42763incroot:
42764	@echo incroot='${INCROOT}'
42765usrlibdir:
42766	@echo usrlibdir='${USRLIBDIR}'
42767libdir:
42768	@echo libdir='${LIBDIR}'
42769_ACEOF
42770  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42771    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42772    for ac_var in incroot usrlibdir libdir; do
42773      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42774    done
42775    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42776    for ac_extension in a so sl dylib la dll; do
42777      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42778	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42779	ac_im_usrlibdir=$ac_im_libdir; break
42780      fi
42781    done
42782    # Screen out bogus values from the imake configuration.  They are
42783    # bogus both because they are the default anyway, and because
42784    # using them would break gcc on systems where it needs fixed includes.
42785    case $ac_im_incroot in
42786	/usr/include) ac_x_includes= ;;
42787	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42788    esac
42789    case $ac_im_usrlibdir in
42790	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42791	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42792    esac
42793  fi
42794  cd ..
42795  rm -f -r conftest.dir
42796fi
42797
42798# Standard set of common directories for X headers.
42799# Check X11 before X11Rn because it is often a symlink to the current release.
42800ac_x_header_dirs='
42801/usr/X11/include
42802/usr/X11R7/include
42803/usr/X11R6/include
42804/usr/X11R5/include
42805/usr/X11R4/include
42806
42807/usr/include/X11
42808/usr/include/X11R7
42809/usr/include/X11R6
42810/usr/include/X11R5
42811/usr/include/X11R4
42812
42813/usr/local/X11/include
42814/usr/local/X11R7/include
42815/usr/local/X11R6/include
42816/usr/local/X11R5/include
42817/usr/local/X11R4/include
42818
42819/usr/local/include/X11
42820/usr/local/include/X11R7
42821/usr/local/include/X11R6
42822/usr/local/include/X11R5
42823/usr/local/include/X11R4
42824
42825/usr/X386/include
42826/usr/x386/include
42827/usr/XFree86/include/X11
42828
42829/usr/include
42830/usr/local/include
42831/usr/unsupported/include
42832/usr/athena/include
42833/usr/local/x11r5/include
42834/usr/lpp/Xamples/include
42835
42836/usr/openwin/include
42837/usr/openwin/share/include'
42838
42839if test "$ac_x_includes" = no; then
42840  # Guess where to find include files, by looking for Xlib.h.
42841  # First, try using that file with no special directory specified.
42842  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42843/* end confdefs.h.  */
42844#include <X11/Xlib.h>
42845_ACEOF
42846if ac_fn_cxx_try_cpp "$LINENO"; then :
42847  # We can compile using X headers with no special include directory.
42848ac_x_includes=
42849else
42850  for ac_dir in $ac_x_header_dirs; do
42851  if test -r "$ac_dir/X11/Xlib.h"; then
42852    ac_x_includes=$ac_dir
42853    break
42854  fi
42855done
42856fi
42857rm -f conftest.err conftest.i conftest.$ac_ext
42858fi # $ac_x_includes = no
42859
42860if test "$ac_x_libraries" = no; then
42861  # Check for the libraries.
42862  # See if we find them without any special options.
42863  # Don't add to $LIBS permanently.
42864  ac_save_LIBS=$LIBS
42865  LIBS="-lX11 $LIBS"
42866  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42867/* end confdefs.h.  */
42868#include <X11/Xlib.h>
42869int
42870main ()
42871{
42872XrmInitialize ()
42873  ;
42874  return 0;
42875}
42876_ACEOF
42877if ac_fn_cxx_try_link "$LINENO"; then :
42878  LIBS=$ac_save_LIBS
42879# We can link X programs with no special library path.
42880ac_x_libraries=
42881else
42882  LIBS=$ac_save_LIBS
42883for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42884do
42885  # Don't even attempt the hair of trying to link an X program!
42886  for ac_extension in a so sl dylib la dll; do
42887    if test -r "$ac_dir/libX11.$ac_extension"; then
42888      ac_x_libraries=$ac_dir
42889      break 2
42890    fi
42891  done
42892done
42893fi
42894rm -f core conftest.err conftest.$ac_objext \
42895    conftest$ac_exeext conftest.$ac_ext
42896fi # $ac_x_libraries = no
42897
42898case $ac_x_includes,$ac_x_libraries in #(
42899  no,* | *,no | *\'*)
42900    # Didn't find X, or a directory has "'" in its name.
42901    ac_cv_have_x="have_x=no";; #(
42902  *)
42903    # Record where we found X for the cache.
42904    ac_cv_have_x="have_x=yes\
42905	ac_x_includes='$ac_x_includes'\
42906	ac_x_libraries='$ac_x_libraries'"
42907esac
42908fi
42909;; #(
42910    *) have_x=yes;;
42911  esac
42912  eval "$ac_cv_have_x"
42913fi # $with_x != no
42914
42915if test "$have_x" != yes; then
42916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
42917$as_echo "$have_x" >&6; }
42918  no_x=yes
42919else
42920  # If each of the values was on the command line, it overrides each guess.
42921  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
42922  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
42923  # Update the cache value to reflect the command line values.
42924  ac_cv_have_x="have_x=yes\
42925	ac_x_includes='$x_includes'\
42926	ac_x_libraries='$x_libraries'"
42927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
42928$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
42929fi
42930
42931  if test "$no_x" = yes; then
42932  # Not all programs may use this symbol, but it does not hurt to define it.
42933
42934$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
42935
42936  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
42937else
42938  if test -n "$x_includes"; then
42939    X_CFLAGS="$X_CFLAGS -I$x_includes"
42940  fi
42941
42942  # It would also be nice to do this for all -L options, not just this one.
42943  if test -n "$x_libraries"; then
42944    X_LIBS="$X_LIBS -L$x_libraries"
42945    # For Solaris; some versions of Sun CC require a space after -R and
42946    # others require no space.  Words are not sufficient . . . .
42947    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
42948$as_echo_n "checking whether -R must be followed by a space... " >&6; }
42949    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
42950    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
42951    ac_cxx_werror_flag=yes
42952    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42953/* end confdefs.h.  */
42954
42955int
42956main ()
42957{
42958
42959  ;
42960  return 0;
42961}
42962_ACEOF
42963if ac_fn_cxx_try_link "$LINENO"; then :
42964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42965$as_echo "no" >&6; }
42966       X_LIBS="$X_LIBS -R$x_libraries"
42967else
42968  LIBS="$ac_xsave_LIBS -R $x_libraries"
42969       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42970/* end confdefs.h.  */
42971
42972int
42973main ()
42974{
42975
42976  ;
42977  return 0;
42978}
42979_ACEOF
42980if ac_fn_cxx_try_link "$LINENO"; then :
42981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42982$as_echo "yes" >&6; }
42983	  X_LIBS="$X_LIBS -R $x_libraries"
42984else
42985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
42986$as_echo "neither works" >&6; }
42987fi
42988rm -f core conftest.err conftest.$ac_objext \
42989    conftest$ac_exeext conftest.$ac_ext
42990fi
42991rm -f core conftest.err conftest.$ac_objext \
42992    conftest$ac_exeext conftest.$ac_ext
42993    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
42994    LIBS=$ac_xsave_LIBS
42995  fi
42996
42997  # Check for system-dependent libraries X programs must link with.
42998  # Do this before checking for the system-independent R6 libraries
42999  # (-lICE), since we may need -lsocket or whatever for X linking.
43000
43001  if test "$ISC" = yes; then
43002    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43003  else
43004    # Martyn Johnson says this is needed for Ultrix, if the X
43005    # libraries were built with DECnet support.  And Karl Berry says
43006    # the Alpha needs dnet_stub (dnet does not exist).
43007    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43008    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43009/* end confdefs.h.  */
43010
43011/* Override any GCC internal prototype to avoid an error.
43012   Use char because int might match the return type of a GCC
43013   builtin and then its argument prototype would still apply.  */
43014#ifdef __cplusplus
43015extern "C"
43016#endif
43017char XOpenDisplay ();
43018int
43019main ()
43020{
43021return XOpenDisplay ();
43022  ;
43023  return 0;
43024}
43025_ACEOF
43026if ac_fn_cxx_try_link "$LINENO"; then :
43027
43028else
43029  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43030$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43031if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43032  $as_echo_n "(cached) " >&6
43033else
43034  ac_check_lib_save_LIBS=$LIBS
43035LIBS="-ldnet  $LIBS"
43036cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43037/* end confdefs.h.  */
43038
43039/* Override any GCC internal prototype to avoid an error.
43040   Use char because int might match the return type of a GCC
43041   builtin and then its argument prototype would still apply.  */
43042#ifdef __cplusplus
43043extern "C"
43044#endif
43045char dnet_ntoa ();
43046int
43047main ()
43048{
43049return dnet_ntoa ();
43050  ;
43051  return 0;
43052}
43053_ACEOF
43054if ac_fn_cxx_try_link "$LINENO"; then :
43055  ac_cv_lib_dnet_dnet_ntoa=yes
43056else
43057  ac_cv_lib_dnet_dnet_ntoa=no
43058fi
43059rm -f core conftest.err conftest.$ac_objext \
43060    conftest$ac_exeext conftest.$ac_ext
43061LIBS=$ac_check_lib_save_LIBS
43062fi
43063{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43064$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43065if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43066  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43067fi
43068
43069    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43071$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43072if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43073  $as_echo_n "(cached) " >&6
43074else
43075  ac_check_lib_save_LIBS=$LIBS
43076LIBS="-ldnet_stub  $LIBS"
43077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43078/* end confdefs.h.  */
43079
43080/* Override any GCC internal prototype to avoid an error.
43081   Use char because int might match the return type of a GCC
43082   builtin and then its argument prototype would still apply.  */
43083#ifdef __cplusplus
43084extern "C"
43085#endif
43086char dnet_ntoa ();
43087int
43088main ()
43089{
43090return dnet_ntoa ();
43091  ;
43092  return 0;
43093}
43094_ACEOF
43095if ac_fn_cxx_try_link "$LINENO"; then :
43096  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43097else
43098  ac_cv_lib_dnet_stub_dnet_ntoa=no
43099fi
43100rm -f core conftest.err conftest.$ac_objext \
43101    conftest$ac_exeext conftest.$ac_ext
43102LIBS=$ac_check_lib_save_LIBS
43103fi
43104{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43105$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43106if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43107  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43108fi
43109
43110    fi
43111fi
43112rm -f core conftest.err conftest.$ac_objext \
43113    conftest$ac_exeext conftest.$ac_ext
43114    LIBS="$ac_xsave_LIBS"
43115
43116    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43117    # to get the SysV transport functions.
43118    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43119    # needs -lnsl.
43120    # The nsl library prevents programs from opening the X display
43121    # on Irix 5.2, according to T.E. Dickey.
43122    # The functions gethostbyname, getservbyname, and inet_addr are
43123    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43124    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43125if test "x$ac_cv_func_gethostbyname" = xyes; then :
43126
43127fi
43128
43129    if test $ac_cv_func_gethostbyname = no; then
43130      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43131$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43132if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43133  $as_echo_n "(cached) " >&6
43134else
43135  ac_check_lib_save_LIBS=$LIBS
43136LIBS="-lnsl  $LIBS"
43137cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43138/* end confdefs.h.  */
43139
43140/* Override any GCC internal prototype to avoid an error.
43141   Use char because int might match the return type of a GCC
43142   builtin and then its argument prototype would still apply.  */
43143#ifdef __cplusplus
43144extern "C"
43145#endif
43146char gethostbyname ();
43147int
43148main ()
43149{
43150return gethostbyname ();
43151  ;
43152  return 0;
43153}
43154_ACEOF
43155if ac_fn_cxx_try_link "$LINENO"; then :
43156  ac_cv_lib_nsl_gethostbyname=yes
43157else
43158  ac_cv_lib_nsl_gethostbyname=no
43159fi
43160rm -f core conftest.err conftest.$ac_objext \
43161    conftest$ac_exeext conftest.$ac_ext
43162LIBS=$ac_check_lib_save_LIBS
43163fi
43164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43165$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43166if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43167  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43168fi
43169
43170      if test $ac_cv_lib_nsl_gethostbyname = no; then
43171	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43172$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43173if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43174  $as_echo_n "(cached) " >&6
43175else
43176  ac_check_lib_save_LIBS=$LIBS
43177LIBS="-lbsd  $LIBS"
43178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43179/* end confdefs.h.  */
43180
43181/* Override any GCC internal prototype to avoid an error.
43182   Use char because int might match the return type of a GCC
43183   builtin and then its argument prototype would still apply.  */
43184#ifdef __cplusplus
43185extern "C"
43186#endif
43187char gethostbyname ();
43188int
43189main ()
43190{
43191return gethostbyname ();
43192  ;
43193  return 0;
43194}
43195_ACEOF
43196if ac_fn_cxx_try_link "$LINENO"; then :
43197  ac_cv_lib_bsd_gethostbyname=yes
43198else
43199  ac_cv_lib_bsd_gethostbyname=no
43200fi
43201rm -f core conftest.err conftest.$ac_objext \
43202    conftest$ac_exeext conftest.$ac_ext
43203LIBS=$ac_check_lib_save_LIBS
43204fi
43205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43206$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43207if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43208  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43209fi
43210
43211      fi
43212    fi
43213
43214    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43215    # socket/setsockopt and other routines are undefined under SCO ODT
43216    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43217    # on later versions), says Simon Leinen: it contains gethostby*
43218    # variants that don't use the name server (or something).  -lsocket
43219    # must be given before -lnsl if both are needed.  We assume that
43220    # if connect needs -lnsl, so does gethostbyname.
43221    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43222if test "x$ac_cv_func_connect" = xyes; then :
43223
43224fi
43225
43226    if test $ac_cv_func_connect = no; then
43227      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43228$as_echo_n "checking for connect in -lsocket... " >&6; }
43229if ${ac_cv_lib_socket_connect+:} false; then :
43230  $as_echo_n "(cached) " >&6
43231else
43232  ac_check_lib_save_LIBS=$LIBS
43233LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43234cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43235/* end confdefs.h.  */
43236
43237/* Override any GCC internal prototype to avoid an error.
43238   Use char because int might match the return type of a GCC
43239   builtin and then its argument prototype would still apply.  */
43240#ifdef __cplusplus
43241extern "C"
43242#endif
43243char connect ();
43244int
43245main ()
43246{
43247return connect ();
43248  ;
43249  return 0;
43250}
43251_ACEOF
43252if ac_fn_cxx_try_link "$LINENO"; then :
43253  ac_cv_lib_socket_connect=yes
43254else
43255  ac_cv_lib_socket_connect=no
43256fi
43257rm -f core conftest.err conftest.$ac_objext \
43258    conftest$ac_exeext conftest.$ac_ext
43259LIBS=$ac_check_lib_save_LIBS
43260fi
43261{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43262$as_echo "$ac_cv_lib_socket_connect" >&6; }
43263if test "x$ac_cv_lib_socket_connect" = xyes; then :
43264  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43265fi
43266
43267    fi
43268
43269    # Guillermo Gomez says -lposix is necessary on A/UX.
43270    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43271if test "x$ac_cv_func_remove" = xyes; then :
43272
43273fi
43274
43275    if test $ac_cv_func_remove = no; then
43276      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43277$as_echo_n "checking for remove in -lposix... " >&6; }
43278if ${ac_cv_lib_posix_remove+:} false; then :
43279  $as_echo_n "(cached) " >&6
43280else
43281  ac_check_lib_save_LIBS=$LIBS
43282LIBS="-lposix  $LIBS"
43283cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43284/* end confdefs.h.  */
43285
43286/* Override any GCC internal prototype to avoid an error.
43287   Use char because int might match the return type of a GCC
43288   builtin and then its argument prototype would still apply.  */
43289#ifdef __cplusplus
43290extern "C"
43291#endif
43292char remove ();
43293int
43294main ()
43295{
43296return remove ();
43297  ;
43298  return 0;
43299}
43300_ACEOF
43301if ac_fn_cxx_try_link "$LINENO"; then :
43302  ac_cv_lib_posix_remove=yes
43303else
43304  ac_cv_lib_posix_remove=no
43305fi
43306rm -f core conftest.err conftest.$ac_objext \
43307    conftest$ac_exeext conftest.$ac_ext
43308LIBS=$ac_check_lib_save_LIBS
43309fi
43310{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43311$as_echo "$ac_cv_lib_posix_remove" >&6; }
43312if test "x$ac_cv_lib_posix_remove" = xyes; then :
43313  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43314fi
43315
43316    fi
43317
43318    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43319    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43320if test "x$ac_cv_func_shmat" = xyes; then :
43321
43322fi
43323
43324    if test $ac_cv_func_shmat = no; then
43325      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43326$as_echo_n "checking for shmat in -lipc... " >&6; }
43327if ${ac_cv_lib_ipc_shmat+:} false; then :
43328  $as_echo_n "(cached) " >&6
43329else
43330  ac_check_lib_save_LIBS=$LIBS
43331LIBS="-lipc  $LIBS"
43332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43333/* end confdefs.h.  */
43334
43335/* Override any GCC internal prototype to avoid an error.
43336   Use char because int might match the return type of a GCC
43337   builtin and then its argument prototype would still apply.  */
43338#ifdef __cplusplus
43339extern "C"
43340#endif
43341char shmat ();
43342int
43343main ()
43344{
43345return shmat ();
43346  ;
43347  return 0;
43348}
43349_ACEOF
43350if ac_fn_cxx_try_link "$LINENO"; then :
43351  ac_cv_lib_ipc_shmat=yes
43352else
43353  ac_cv_lib_ipc_shmat=no
43354fi
43355rm -f core conftest.err conftest.$ac_objext \
43356    conftest$ac_exeext conftest.$ac_ext
43357LIBS=$ac_check_lib_save_LIBS
43358fi
43359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43360$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43361if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43362  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43363fi
43364
43365    fi
43366  fi
43367
43368  # Check for libraries that X11R6 Xt/Xaw programs need.
43369  ac_save_LDFLAGS=$LDFLAGS
43370  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43371  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43372  # check for ICE first), but we must link in the order -lSM -lICE or
43373  # we get undefined symbols.  So assume we have SM if we have ICE.
43374  # These have to be linked with before -lX11, unlike the other
43375  # libraries we check for below, so use a different variable.
43376  # John Interrante, Karl Berry
43377  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43378$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43379if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43380  $as_echo_n "(cached) " >&6
43381else
43382  ac_check_lib_save_LIBS=$LIBS
43383LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43385/* end confdefs.h.  */
43386
43387/* Override any GCC internal prototype to avoid an error.
43388   Use char because int might match the return type of a GCC
43389   builtin and then its argument prototype would still apply.  */
43390#ifdef __cplusplus
43391extern "C"
43392#endif
43393char IceConnectionNumber ();
43394int
43395main ()
43396{
43397return IceConnectionNumber ();
43398  ;
43399  return 0;
43400}
43401_ACEOF
43402if ac_fn_cxx_try_link "$LINENO"; then :
43403  ac_cv_lib_ICE_IceConnectionNumber=yes
43404else
43405  ac_cv_lib_ICE_IceConnectionNumber=no
43406fi
43407rm -f core conftest.err conftest.$ac_objext \
43408    conftest$ac_exeext conftest.$ac_ext
43409LIBS=$ac_check_lib_save_LIBS
43410fi
43411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43412$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43413if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43414  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43415fi
43416
43417  LDFLAGS=$ac_save_LDFLAGS
43418
43419fi
43420
43421
43422  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43423  # this doesn't make sense so we remove it.
43424  if test "x$COMPILE_TYPE" = xcross; then
43425    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43426  fi
43427
43428  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43429
43430  # Print a helpful message on how to acquire the necessary build dependency.
43431  # x11 is the help tag: freetype, cups, pulse, alsa etc
43432  MISSING_DEPENDENCY=x11
43433
43434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43435    cygwin_help $MISSING_DEPENDENCY
43436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43437    msys_help $MISSING_DEPENDENCY
43438  else
43439    PKGHANDLER_COMMAND=
43440
43441    case $PKGHANDLER in
43442      apt-get)
43443        apt_help     $MISSING_DEPENDENCY ;;
43444      yum)
43445        yum_help     $MISSING_DEPENDENCY ;;
43446      port)
43447        port_help    $MISSING_DEPENDENCY ;;
43448      pkgutil)
43449        pkgutil_help $MISSING_DEPENDENCY ;;
43450      pkgadd)
43451        pkgadd_help  $MISSING_DEPENDENCY ;;
43452    esac
43453
43454    if test "x$PKGHANDLER_COMMAND" != x; then
43455      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43456    fi
43457  fi
43458
43459    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43460  fi
43461
43462  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43463    OPENWIN_HOME="/usr/openwin"
43464    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43465    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43466        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43467        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43468        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43469  fi
43470
43471  #
43472  # Weird Sol10 something check...TODO change to try compile
43473  #
43474  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43475    if test "`uname -r`" = "5.10"; then
43476      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43477        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43478      fi
43479    fi
43480  fi
43481
43482  ac_ext=c
43483ac_cpp='$CPP $CPPFLAGS'
43484ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43485ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43486ac_compiler_gnu=$ac_cv_c_compiler_gnu
43487
43488  OLD_CFLAGS="$CFLAGS"
43489  CFLAGS="$CFLAGS $X_CFLAGS"
43490
43491  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43492  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43493do :
43494  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43495ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43496        # include <X11/Xlib.h>
43497        # include <X11/Xutil.h>
43498
43499
43500"
43501if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43502  cat >>confdefs.h <<_ACEOF
43503#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43504_ACEOF
43505 X11_A_OK=yes
43506else
43507  X11_A_OK=no; break
43508fi
43509
43510done
43511
43512
43513  CFLAGS="$OLD_CFLAGS"
43514  ac_ext=cpp
43515ac_cpp='$CXXCPP $CPPFLAGS'
43516ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43517ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43518ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43519
43520
43521  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43522
43523  # Print a helpful message on how to acquire the necessary build dependency.
43524  # x11 is the help tag: freetype, cups, pulse, alsa etc
43525  MISSING_DEPENDENCY=x11
43526
43527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43528    cygwin_help $MISSING_DEPENDENCY
43529  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43530    msys_help $MISSING_DEPENDENCY
43531  else
43532    PKGHANDLER_COMMAND=
43533
43534    case $PKGHANDLER in
43535      apt-get)
43536        apt_help     $MISSING_DEPENDENCY ;;
43537      yum)
43538        yum_help     $MISSING_DEPENDENCY ;;
43539      port)
43540        port_help    $MISSING_DEPENDENCY ;;
43541      pkgutil)
43542        pkgutil_help $MISSING_DEPENDENCY ;;
43543      pkgadd)
43544        pkgadd_help  $MISSING_DEPENDENCY ;;
43545    esac
43546
43547    if test "x$PKGHANDLER_COMMAND" != x; then
43548      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43549    fi
43550  fi
43551
43552    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43553  fi
43554
43555
43556
43557
43558
43559
43560  ###############################################################################
43561  #
43562  # The common unix printing system cups is used to print from java.
43563  #
43564
43565# Check whether --with-cups was given.
43566if test "${with_cups+set}" = set; then :
43567  withval=$with_cups;
43568fi
43569
43570
43571# Check whether --with-cups-include was given.
43572if test "${with_cups_include+set}" = set; then :
43573  withval=$with_cups_include;
43574fi
43575
43576
43577  if test "x$CUPS_NOT_NEEDED" = xyes; then
43578    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43579      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43580$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43581    fi
43582    CUPS_CFLAGS=
43583  else
43584    CUPS_FOUND=no
43585
43586    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43587      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43588    fi
43589
43590    if test "x${with_cups}" != x; then
43591      CUPS_CFLAGS="-I${with_cups}/include"
43592      CUPS_FOUND=yes
43593    fi
43594    if test "x${with_cups_include}" != x; then
43595      CUPS_CFLAGS="-I${with_cups_include}"
43596      CUPS_FOUND=yes
43597    fi
43598    if test "x$CUPS_FOUND" = xno; then
43599
43600
43601  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43602    # Source the builddeps file again, to make sure it uses the latest variables!
43603    . $builddepsfile
43604    # Look for a target and build machine specific resource!
43605    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43606    if test "x$resource" = x; then
43607      # Ok, lets instead look for a target specific resource
43608      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43609    fi
43610    if test "x$resource" = x; then
43611      # Ok, lets instead look for a build specific resource
43612      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43613    fi
43614    if test "x$resource" = x; then
43615      # Ok, lets instead look for a generic resource
43616      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43617      resource=${builddep_cups}
43618    fi
43619    if test "x$resource" != x; then
43620      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43621$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43622      # If the resource in the builddeps.conf file is an existing directory,
43623      # for example /java/linux/cups
43624      if test -d ${resource}; then
43625        depdir=${resource}
43626      else
43627
43628  # cups is for example mymodule
43629  # $resource is for example libs/general/libmymod_1_2_3.zip
43630  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43631  # $with_builddeps_dir is for example /localhome/builddeps
43632  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43633  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43634  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43635  filename=`basename $resource`
43636  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43637  filebase=${filename%%.*}
43638  extension=${filename#*.}
43639  installdir=$with_builddeps_dir/$filebase
43640  if test ! -f $installdir/$filename.unpacked; then
43641    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43642$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43643    if test ! -d $installdir; then
43644      mkdir -p $installdir
43645    fi
43646    if test ! -d $installdir; then
43647      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43648    fi
43649    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43650    touch $tmpfile
43651    if test ! -f $tmpfile; then
43652      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43653    fi
43654
43655  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43656  # $tmpfile is the local file name for the downloaded file.
43657  VALID_TOOL=no
43658  if test "x$BDEPS_FTP" = xwget; then
43659    VALID_TOOL=yes
43660    wget -O $tmpfile $with_builddeps_server/$resource
43661  fi
43662  if test "x$BDEPS_FTP" = xlftp; then
43663    VALID_TOOL=yes
43664    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43665  fi
43666  if test "x$BDEPS_FTP" = xftp; then
43667    VALID_TOOL=yes
43668    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43669    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43670    FTPUSERPWD=${FTPSERVER%%@*}
43671    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43672      FTPUSER=${userpwd%%:*}
43673      FTPPWD=${userpwd#*@}
43674      FTPSERVER=${FTPSERVER#*@}
43675    else
43676      FTPUSER=ftp
43677      FTPPWD=ftp
43678    fi
43679    # the "pass" command does not work on some
43680    # ftp clients (read ftp.exe) but if it works,
43681    # passive mode is better!
43682    ( \
43683        echo "user $FTPUSER $FTPPWD"        ; \
43684        echo "pass"                         ; \
43685        echo "bin"                          ; \
43686        echo "get $FTPPATH $tmpfile"              ; \
43687    ) | ftp -in $FTPSERVER
43688  fi
43689  if test "x$VALID_TOOL" != xyes; then
43690    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43691  fi
43692
43693    mv $tmpfile $installdir/$filename
43694    if test ! -s $installdir/$filename; then
43695      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43696    fi
43697    case "$extension" in
43698      zip)  echo "Unzipping $installdir/$filename..."
43699        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43700        ;;
43701      tar.gz) echo "Untaring $installdir/$filename..."
43702        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43703        ;;
43704      tgz) echo "Untaring $installdir/$filename..."
43705        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43706        ;;
43707      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43708        ;;
43709    esac
43710  fi
43711  if test -f $installdir/$filename.unpacked; then
43712    depdir=$installdir
43713  fi
43714
43715      fi
43716      # Source the builddeps file again, because in the previous command, the depdir
43717      # was updated to point at the current build dependency install directory.
43718      . $builddepsfile
43719      # Now extract variables from the builddeps.conf files.
43720      theroot=${builddep_cups_ROOT}
43721      thecflags=${builddep_cups_CFLAGS}
43722      thelibs=${builddep_cups_LIBS}
43723      if test "x$depdir" = x; then
43724        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43725      fi
43726      CUPS=$depdir
43727      if test "x$theroot" != x; then
43728        CUPS="$theroot"
43729      fi
43730      if test "x$thecflags" != x; then
43731        CUPS_CFLAGS="$thecflags"
43732      fi
43733      if test "x$thelibs" != x; then
43734        CUPS_LIBS="$thelibs"
43735      fi
43736      CUPS_FOUND=yes
43737
43738    fi
43739
43740  fi
43741
43742    fi
43743    if test "x$CUPS_FOUND" = xno; then
43744      # Are the cups headers installed in the default /usr/include location?
43745      for ac_header in cups/cups.h cups/ppd.h
43746do :
43747  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43748ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43750  cat >>confdefs.h <<_ACEOF
43751#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43752_ACEOF
43753
43754            CUPS_FOUND=yes
43755            CUPS_CFLAGS=
43756            DEFAULT_CUPS=yes
43757
43758
43759fi
43760
43761done
43762
43763    fi
43764    if test "x$CUPS_FOUND" = xno; then
43765      # Getting nervous now? Lets poke around for standard Solaris third-party
43766      # package installation locations.
43767      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43768$as_echo_n "checking for cups headers... " >&6; }
43769      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43770        # An SFW package seems to be installed!
43771        CUPS_FOUND=yes
43772        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43773      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43774        # A CSW package seems to be installed!
43775        CUPS_FOUND=yes
43776        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43777      fi
43778      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43779$as_echo "$CUPS_FOUND" >&6; }
43780    fi
43781    if test "x$CUPS_FOUND" = xno; then
43782
43783  # Print a helpful message on how to acquire the necessary build dependency.
43784  # cups is the help tag: freetype, cups, pulse, alsa etc
43785  MISSING_DEPENDENCY=cups
43786
43787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43788    cygwin_help $MISSING_DEPENDENCY
43789  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43790    msys_help $MISSING_DEPENDENCY
43791  else
43792    PKGHANDLER_COMMAND=
43793
43794    case $PKGHANDLER in
43795      apt-get)
43796        apt_help     $MISSING_DEPENDENCY ;;
43797      yum)
43798        yum_help     $MISSING_DEPENDENCY ;;
43799      port)
43800        port_help    $MISSING_DEPENDENCY ;;
43801      pkgutil)
43802        pkgutil_help $MISSING_DEPENDENCY ;;
43803      pkgadd)
43804        pkgadd_help  $MISSING_DEPENDENCY ;;
43805    esac
43806
43807    if test "x$PKGHANDLER_COMMAND" != x; then
43808      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43809    fi
43810  fi
43811
43812      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43813    fi
43814  fi
43815
43816
43817
43818
43819
43820
43821  ###############################################################################
43822  #
43823  # The ubiquitous freetype library is used to render fonts.
43824  #
43825
43826# Check whether --with-freetype was given.
43827if test "${with_freetype+set}" = set; then :
43828  withval=$with_freetype;
43829fi
43830
43831
43832# Check whether --with-freetype-include was given.
43833if test "${with_freetype_include+set}" = set; then :
43834  withval=$with_freetype_include;
43835fi
43836
43837
43838# Check whether --with-freetype-lib was given.
43839if test "${with_freetype_lib+set}" = set; then :
43840  withval=$with_freetype_lib;
43841fi
43842
43843  # Check whether --enable-freetype-bundling was given.
43844if test "${enable_freetype_bundling+set}" = set; then :
43845  enableval=$enable_freetype_bundling;
43846fi
43847
43848
43849  FREETYPE_CFLAGS=
43850  FREETYPE_LIBS=
43851  FREETYPE_BUNDLE_LIB_PATH=
43852
43853  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43854    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43855      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43856$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43857    fi
43858    if test "x$enable_freetype_bundling" != x; then
43859      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43860$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43861    fi
43862  else
43863    # freetype is needed to build; go get it!
43864
43865    BUNDLE_FREETYPE="$enable_freetype_bundling"
43866
43867    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43868      # User has specified settings
43869
43870      if test "x$BUNDLE_FREETYPE" = x; then
43871        # If not specified, default is to bundle freetype
43872        BUNDLE_FREETYPE=yes
43873      fi
43874
43875      if test "x$with_freetype" != x; then
43876        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43877        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43878      fi
43879
43880      # Allow --with-freetype-lib and --with-freetype-include to override
43881      if test "x$with_freetype_include" != x; then
43882        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43883      fi
43884      if test "x$with_freetype_lib" != x; then
43885        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43886      fi
43887
43888      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43889        # Okay, we got it. Check that it works.
43890
43891  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43892  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43893  METHOD="--with-freetype"
43894
43895  # First check if the files exists.
43896  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
43897    # We found an arbitrary include file. That's a good sign.
43898    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
43899$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
43900    FOUND_FREETYPE=yes
43901
43902    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
43903    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
43904      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
43905$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
43906      FOUND_FREETYPE=no
43907    else
43908      if test "x$OPENJDK_TARGET_OS" = xwindows; then
43909        # On Windows, we will need both .lib and .dll file.
43910        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
43911          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
43912$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
43913          FOUND_FREETYPE=no
43914        fi
43915      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
43916          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
43917        # Found lib in isa dir, use that instead.
43918        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
43919      fi
43920    fi
43921  fi
43922
43923  if test "x$FOUND_FREETYPE" = xyes; then
43924
43925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43926
43927  # Input might be given as Windows format, start by converting to
43928  # unix format.
43929  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43930  new_path=`$CYGPATH -u "$path"`
43931
43932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43935  # "foo.exe" is OK but "foo" is an error.
43936  #
43937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43938  # It is also a way to make sure we got the proper file name for the real test later on.
43939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43940  if test "x$test_shortpath" = x; then
43941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
43942$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
43943    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
43944  fi
43945
43946  # Call helper function which possibly converts this using DOS-style short mode.
43947  # If so, the updated path is stored in $new_path.
43948
43949  input_path="$new_path"
43950  # Check if we need to convert this using DOS-style short mode. If the path
43951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43952  # take no chances and rewrite it.
43953  # Note: m4 eats our [], so we need to use [ and ] instead.
43954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43955  if test "x$has_forbidden_chars" != x; then
43956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43960      # Going to short mode and back again did indeed matter. Since short mode is
43961      # case insensitive, let's make it lowercase to improve readability.
43962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43963      # Now convert it back to Unix-stile (cygpath)
43964      input_path=`$CYGPATH -u "$shortmode_path"`
43965      new_path="$input_path"
43966    fi
43967  fi
43968
43969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43970  if test "x$test_cygdrive_prefix" = x; then
43971    # As a simple fix, exclude /usr/bin since it's not a real path.
43972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43974      # a path prefixed by /cygdrive for fixpath to work.
43975      new_path="$CYGWIN_ROOT_PATH$input_path"
43976    fi
43977  fi
43978
43979
43980  if test "x$path" != "x$new_path"; then
43981    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
43982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
43983$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
43984  fi
43985
43986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43987
43988  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43989  has_colon=`$ECHO $path | $GREP ^.:`
43990  new_path="$path"
43991  if test "x$has_colon" = x; then
43992    # Not in mixed or Windows style, start by that.
43993    new_path=`cmd //c echo $path`
43994  fi
43995
43996
43997  input_path="$new_path"
43998  # Check if we need to convert this using DOS-style short mode. If the path
43999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44000  # take no chances and rewrite it.
44001  # Note: m4 eats our [], so we need to use [ and ] instead.
44002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44003  if test "x$has_forbidden_chars" != x; then
44004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44006  fi
44007
44008
44009  windows_path="$new_path"
44010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44011    unix_path=`$CYGPATH -u "$windows_path"`
44012    new_path="$unix_path"
44013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44015    new_path="$unix_path"
44016  fi
44017
44018  if test "x$path" != "x$new_path"; then
44019    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44021$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44022  fi
44023
44024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44026
44027  else
44028    # We're on a posix platform. Hooray! :)
44029    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44030    has_space=`$ECHO "$path" | $GREP " "`
44031    if test "x$has_space" != x; then
44032      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44033$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44034      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44035    fi
44036
44037    # Use eval to expand a potential ~
44038    eval path="$path"
44039    if test ! -f "$path" && test ! -d "$path"; then
44040      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44041    fi
44042
44043    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44044  fi
44045
44046
44047  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44048
44049  # Input might be given as Windows format, start by converting to
44050  # unix format.
44051  path="$POTENTIAL_FREETYPE_LIB_PATH"
44052  new_path=`$CYGPATH -u "$path"`
44053
44054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44057  # "foo.exe" is OK but "foo" is an error.
44058  #
44059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44060  # It is also a way to make sure we got the proper file name for the real test later on.
44061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44062  if test "x$test_shortpath" = x; then
44063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44064$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44065    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44066  fi
44067
44068  # Call helper function which possibly converts this using DOS-style short mode.
44069  # If so, the updated path is stored in $new_path.
44070
44071  input_path="$new_path"
44072  # Check if we need to convert this using DOS-style short mode. If the path
44073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44074  # take no chances and rewrite it.
44075  # Note: m4 eats our [], so we need to use [ and ] instead.
44076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44077  if test "x$has_forbidden_chars" != x; then
44078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44082      # Going to short mode and back again did indeed matter. Since short mode is
44083      # case insensitive, let's make it lowercase to improve readability.
44084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44085      # Now convert it back to Unix-stile (cygpath)
44086      input_path=`$CYGPATH -u "$shortmode_path"`
44087      new_path="$input_path"
44088    fi
44089  fi
44090
44091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44092  if test "x$test_cygdrive_prefix" = x; then
44093    # As a simple fix, exclude /usr/bin since it's not a real path.
44094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44096      # a path prefixed by /cygdrive for fixpath to work.
44097      new_path="$CYGWIN_ROOT_PATH$input_path"
44098    fi
44099  fi
44100
44101
44102  if test "x$path" != "x$new_path"; then
44103    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44106  fi
44107
44108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44109
44110  path="$POTENTIAL_FREETYPE_LIB_PATH"
44111  has_colon=`$ECHO $path | $GREP ^.:`
44112  new_path="$path"
44113  if test "x$has_colon" = x; then
44114    # Not in mixed or Windows style, start by that.
44115    new_path=`cmd //c echo $path`
44116  fi
44117
44118
44119  input_path="$new_path"
44120  # Check if we need to convert this using DOS-style short mode. If the path
44121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44122  # take no chances and rewrite it.
44123  # Note: m4 eats our [], so we need to use [ and ] instead.
44124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44125  if test "x$has_forbidden_chars" != x; then
44126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44128  fi
44129
44130
44131  windows_path="$new_path"
44132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44133    unix_path=`$CYGPATH -u "$windows_path"`
44134    new_path="$unix_path"
44135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44137    new_path="$unix_path"
44138  fi
44139
44140  if test "x$path" != "x$new_path"; then
44141    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44143$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44144  fi
44145
44146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44148
44149  else
44150    # We're on a posix platform. Hooray! :)
44151    path="$POTENTIAL_FREETYPE_LIB_PATH"
44152    has_space=`$ECHO "$path" | $GREP " "`
44153    if test "x$has_space" != x; then
44154      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44155$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44156      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44157    fi
44158
44159    # Use eval to expand a potential ~
44160    eval path="$path"
44161    if test ! -f "$path" && test ! -d "$path"; then
44162      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44163    fi
44164
44165    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44166  fi
44167
44168
44169    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44170    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44171$as_echo_n "checking for freetype includes... " >&6; }
44172    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44173$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44174    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44175    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44176$as_echo_n "checking for freetype libraries... " >&6; }
44177    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44178$as_echo "$FREETYPE_LIB_PATH" >&6; }
44179  fi
44180
44181        if test "x$FOUND_FREETYPE" != xyes; then
44182          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44183        fi
44184      else
44185        # User specified only one of lib or include. This is an error.
44186        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44187          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44188$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44189          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44190        else
44191          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44192$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44193          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44194        fi
44195      fi
44196    else
44197      # User did not specify settings, but we need freetype. Try to locate it.
44198
44199      if test "x$BUNDLE_FREETYPE" = x; then
44200        # If not specified, default is to bundle freetype only on windows
44201        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44202          BUNDLE_FREETYPE=yes
44203        else
44204          BUNDLE_FREETYPE=no
44205        fi
44206      fi
44207
44208      if test "x$FOUND_FREETYPE" != xyes; then
44209        # Check builddeps
44210
44211
44212  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44213    # Source the builddeps file again, to make sure it uses the latest variables!
44214    . $builddepsfile
44215    # Look for a target and build machine specific resource!
44216    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44217    if test "x$resource" = x; then
44218      # Ok, lets instead look for a target specific resource
44219      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44220    fi
44221    if test "x$resource" = x; then
44222      # Ok, lets instead look for a build specific resource
44223      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44224    fi
44225    if test "x$resource" = x; then
44226      # Ok, lets instead look for a generic resource
44227      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44228      resource=${builddep_freetype2}
44229    fi
44230    if test "x$resource" != x; then
44231      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44232$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44233      # If the resource in the builddeps.conf file is an existing directory,
44234      # for example /java/linux/cups
44235      if test -d ${resource}; then
44236        depdir=${resource}
44237      else
44238
44239  # freetype2 is for example mymodule
44240  # $resource is for example libs/general/libmymod_1_2_3.zip
44241  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44242  # $with_builddeps_dir is for example /localhome/builddeps
44243  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44244  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44245  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44246  filename=`basename $resource`
44247  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44248  filebase=${filename%%.*}
44249  extension=${filename#*.}
44250  installdir=$with_builddeps_dir/$filebase
44251  if test ! -f $installdir/$filename.unpacked; then
44252    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44253$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44254    if test ! -d $installdir; then
44255      mkdir -p $installdir
44256    fi
44257    if test ! -d $installdir; then
44258      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44259    fi
44260    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44261    touch $tmpfile
44262    if test ! -f $tmpfile; then
44263      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44264    fi
44265
44266  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44267  # $tmpfile is the local file name for the downloaded file.
44268  VALID_TOOL=no
44269  if test "x$BDEPS_FTP" = xwget; then
44270    VALID_TOOL=yes
44271    wget -O $tmpfile $with_builddeps_server/$resource
44272  fi
44273  if test "x$BDEPS_FTP" = xlftp; then
44274    VALID_TOOL=yes
44275    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44276  fi
44277  if test "x$BDEPS_FTP" = xftp; then
44278    VALID_TOOL=yes
44279    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44280    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44281    FTPUSERPWD=${FTPSERVER%%@*}
44282    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44283      FTPUSER=${userpwd%%:*}
44284      FTPPWD=${userpwd#*@}
44285      FTPSERVER=${FTPSERVER#*@}
44286    else
44287      FTPUSER=ftp
44288      FTPPWD=ftp
44289    fi
44290    # the "pass" command does not work on some
44291    # ftp clients (read ftp.exe) but if it works,
44292    # passive mode is better!
44293    ( \
44294        echo "user $FTPUSER $FTPPWD"        ; \
44295        echo "pass"                         ; \
44296        echo "bin"                          ; \
44297        echo "get $FTPPATH $tmpfile"              ; \
44298    ) | ftp -in $FTPSERVER
44299  fi
44300  if test "x$VALID_TOOL" != xyes; then
44301    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44302  fi
44303
44304    mv $tmpfile $installdir/$filename
44305    if test ! -s $installdir/$filename; then
44306      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44307    fi
44308    case "$extension" in
44309      zip)  echo "Unzipping $installdir/$filename..."
44310        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44311        ;;
44312      tar.gz) echo "Untaring $installdir/$filename..."
44313        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44314        ;;
44315      tgz) echo "Untaring $installdir/$filename..."
44316        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44317        ;;
44318      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44319        ;;
44320    esac
44321  fi
44322  if test -f $installdir/$filename.unpacked; then
44323    depdir=$installdir
44324  fi
44325
44326      fi
44327      # Source the builddeps file again, because in the previous command, the depdir
44328      # was updated to point at the current build dependency install directory.
44329      . $builddepsfile
44330      # Now extract variables from the builddeps.conf files.
44331      theroot=${builddep_freetype2_ROOT}
44332      thecflags=${builddep_freetype2_CFLAGS}
44333      thelibs=${builddep_freetype2_LIBS}
44334      if test "x$depdir" = x; then
44335        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44336      fi
44337      FREETYPE=$depdir
44338      if test "x$theroot" != x; then
44339        FREETYPE="$theroot"
44340      fi
44341      if test "x$thecflags" != x; then
44342        FREETYPE_CFLAGS="$thecflags"
44343      fi
44344      if test "x$thelibs" != x; then
44345        FREETYPE_LIBS="$thelibs"
44346      fi
44347      FOUND_FREETYPE=yes
44348      else FOUND_FREETYPE=no
44349
44350    fi
44351    else FOUND_FREETYPE=no
44352
44353  fi
44354
44355        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44356        if test "x$FOUND_FREETYPE" = xyes; then
44357          if test "x$BUNDLE_FREETYPE" = xyes; then
44358            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44359$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44360            FOUND_FREETYPE=no
44361          else
44362            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44363$as_echo_n "checking for freetype... " >&6; }
44364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44365$as_echo "yes (using builddeps)" >&6; }
44366          fi
44367        fi
44368      fi
44369
44370      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44371      if test "x$SYSROOT" = x; then
44372        if test "x$FOUND_FREETYPE" != xyes; then
44373          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44374          if test "x$PKG_CONFIG" != x; then
44375
44376pkg_failed=no
44377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44378$as_echo_n "checking for FREETYPE... " >&6; }
44379
44380if test -n "$FREETYPE_CFLAGS"; then
44381    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44382 elif test -n "$PKG_CONFIG"; then
44383    if test -n "$PKG_CONFIG" && \
44384    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44385  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44386  ac_status=$?
44387  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44388  test $ac_status = 0; }; then
44389  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44390else
44391  pkg_failed=yes
44392fi
44393 else
44394    pkg_failed=untried
44395fi
44396if test -n "$FREETYPE_LIBS"; then
44397    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44398 elif test -n "$PKG_CONFIG"; then
44399    if test -n "$PKG_CONFIG" && \
44400    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44401  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44402  ac_status=$?
44403  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44404  test $ac_status = 0; }; then
44405  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44406else
44407  pkg_failed=yes
44408fi
44409 else
44410    pkg_failed=untried
44411fi
44412
44413
44414
44415if test $pkg_failed = yes; then
44416
44417if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44418        _pkg_short_errors_supported=yes
44419else
44420        _pkg_short_errors_supported=no
44421fi
44422        if test $_pkg_short_errors_supported = yes; then
44423	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44424        else
44425	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44426        fi
44427	# Put the nasty error message in config.log where it belongs
44428	echo "$FREETYPE_PKG_ERRORS" >&5
44429
44430	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44431$as_echo "no" >&6; }
44432                FOUND_FREETYPE=no
44433elif test $pkg_failed = untried; then
44434	FOUND_FREETYPE=no
44435else
44436	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44437	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44438        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44439$as_echo "yes" >&6; }
44440	FOUND_FREETYPE=yes
44441fi
44442            if test "x$FOUND_FREETYPE" = xyes; then
44443              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44444              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44445              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44446              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44447                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44448              fi
44449              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44450              if test "x$BUNDLE_FREETYPE" = xyes; then
44451                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44452$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44453                FOUND_FREETYPE=no
44454              else
44455                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44456$as_echo_n "checking for freetype... " >&6; }
44457                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44458$as_echo "yes (using pkg-config)" >&6; }
44459              fi
44460            fi
44461          fi
44462        fi
44463      fi
44464
44465      if test "x$FOUND_FREETYPE" != xyes; then
44466        # Check in well-known locations
44467        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44468          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44469
44470  windows_path="$FREETYPE_BASE_DIR"
44471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44472    unix_path=`$CYGPATH -u "$windows_path"`
44473    FREETYPE_BASE_DIR="$unix_path"
44474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44476    FREETYPE_BASE_DIR="$unix_path"
44477  fi
44478
44479
44480  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44481  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44482  METHOD="well-known location"
44483
44484  # First check if the files exists.
44485  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44486    # We found an arbitrary include file. That's a good sign.
44487    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44488$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44489    FOUND_FREETYPE=yes
44490
44491    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44492    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44493      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44494$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44495      FOUND_FREETYPE=no
44496    else
44497      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44498        # On Windows, we will need both .lib and .dll file.
44499        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44500          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44501$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44502          FOUND_FREETYPE=no
44503        fi
44504      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44505          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44506        # Found lib in isa dir, use that instead.
44507        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44508      fi
44509    fi
44510  fi
44511
44512  if test "x$FOUND_FREETYPE" = xyes; then
44513
44514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44515
44516  # Input might be given as Windows format, start by converting to
44517  # unix format.
44518  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44519  new_path=`$CYGPATH -u "$path"`
44520
44521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44524  # "foo.exe" is OK but "foo" is an error.
44525  #
44526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44527  # It is also a way to make sure we got the proper file name for the real test later on.
44528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44529  if test "x$test_shortpath" = x; then
44530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44533  fi
44534
44535  # Call helper function which possibly converts this using DOS-style short mode.
44536  # If so, the updated path is stored in $new_path.
44537
44538  input_path="$new_path"
44539  # Check if we need to convert this using DOS-style short mode. If the path
44540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44541  # take no chances and rewrite it.
44542  # Note: m4 eats our [], so we need to use [ and ] instead.
44543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44544  if test "x$has_forbidden_chars" != x; then
44545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44549      # Going to short mode and back again did indeed matter. Since short mode is
44550      # case insensitive, let's make it lowercase to improve readability.
44551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44552      # Now convert it back to Unix-stile (cygpath)
44553      input_path=`$CYGPATH -u "$shortmode_path"`
44554      new_path="$input_path"
44555    fi
44556  fi
44557
44558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44559  if test "x$test_cygdrive_prefix" = x; then
44560    # As a simple fix, exclude /usr/bin since it's not a real path.
44561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44563      # a path prefixed by /cygdrive for fixpath to work.
44564      new_path="$CYGWIN_ROOT_PATH$input_path"
44565    fi
44566  fi
44567
44568
44569  if test "x$path" != "x$new_path"; then
44570    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44573  fi
44574
44575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44576
44577  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44578  has_colon=`$ECHO $path | $GREP ^.:`
44579  new_path="$path"
44580  if test "x$has_colon" = x; then
44581    # Not in mixed or Windows style, start by that.
44582    new_path=`cmd //c echo $path`
44583  fi
44584
44585
44586  input_path="$new_path"
44587  # Check if we need to convert this using DOS-style short mode. If the path
44588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44589  # take no chances and rewrite it.
44590  # Note: m4 eats our [], so we need to use [ and ] instead.
44591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44592  if test "x$has_forbidden_chars" != x; then
44593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44595  fi
44596
44597
44598  windows_path="$new_path"
44599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44600    unix_path=`$CYGPATH -u "$windows_path"`
44601    new_path="$unix_path"
44602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44604    new_path="$unix_path"
44605  fi
44606
44607  if test "x$path" != "x$new_path"; then
44608    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44611  fi
44612
44613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44615
44616  else
44617    # We're on a posix platform. Hooray! :)
44618    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44619    has_space=`$ECHO "$path" | $GREP " "`
44620    if test "x$has_space" != x; then
44621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44624    fi
44625
44626    # Use eval to expand a potential ~
44627    eval path="$path"
44628    if test ! -f "$path" && test ! -d "$path"; then
44629      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44630    fi
44631
44632    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44633  fi
44634
44635
44636  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44637
44638  # Input might be given as Windows format, start by converting to
44639  # unix format.
44640  path="$POTENTIAL_FREETYPE_LIB_PATH"
44641  new_path=`$CYGPATH -u "$path"`
44642
44643  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44644  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44645  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44646  # "foo.exe" is OK but "foo" is an error.
44647  #
44648  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44649  # It is also a way to make sure we got the proper file name for the real test later on.
44650  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44651  if test "x$test_shortpath" = x; then
44652    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44653$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44654    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44655  fi
44656
44657  # Call helper function which possibly converts this using DOS-style short mode.
44658  # If so, the updated path is stored in $new_path.
44659
44660  input_path="$new_path"
44661  # Check if we need to convert this using DOS-style short mode. If the path
44662  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44663  # take no chances and rewrite it.
44664  # Note: m4 eats our [], so we need to use [ and ] instead.
44665  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44666  if test "x$has_forbidden_chars" != x; then
44667    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44668    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44669    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44670    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44671      # Going to short mode and back again did indeed matter. Since short mode is
44672      # case insensitive, let's make it lowercase to improve readability.
44673      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44674      # Now convert it back to Unix-stile (cygpath)
44675      input_path=`$CYGPATH -u "$shortmode_path"`
44676      new_path="$input_path"
44677    fi
44678  fi
44679
44680  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44681  if test "x$test_cygdrive_prefix" = x; then
44682    # As a simple fix, exclude /usr/bin since it's not a real path.
44683    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44684      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44685      # a path prefixed by /cygdrive for fixpath to work.
44686      new_path="$CYGWIN_ROOT_PATH$input_path"
44687    fi
44688  fi
44689
44690
44691  if test "x$path" != "x$new_path"; then
44692    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44693    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44694$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44695  fi
44696
44697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44698
44699  path="$POTENTIAL_FREETYPE_LIB_PATH"
44700  has_colon=`$ECHO $path | $GREP ^.:`
44701  new_path="$path"
44702  if test "x$has_colon" = x; then
44703    # Not in mixed or Windows style, start by that.
44704    new_path=`cmd //c echo $path`
44705  fi
44706
44707
44708  input_path="$new_path"
44709  # Check if we need to convert this using DOS-style short mode. If the path
44710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44711  # take no chances and rewrite it.
44712  # Note: m4 eats our [], so we need to use [ and ] instead.
44713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44714  if test "x$has_forbidden_chars" != x; then
44715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44716    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44717  fi
44718
44719
44720  windows_path="$new_path"
44721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44722    unix_path=`$CYGPATH -u "$windows_path"`
44723    new_path="$unix_path"
44724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44726    new_path="$unix_path"
44727  fi
44728
44729  if test "x$path" != "x$new_path"; then
44730    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44732$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44733  fi
44734
44735  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44736  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44737
44738  else
44739    # We're on a posix platform. Hooray! :)
44740    path="$POTENTIAL_FREETYPE_LIB_PATH"
44741    has_space=`$ECHO "$path" | $GREP " "`
44742    if test "x$has_space" != x; then
44743      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44744$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44745      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44746    fi
44747
44748    # Use eval to expand a potential ~
44749    eval path="$path"
44750    if test ! -f "$path" && test ! -d "$path"; then
44751      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44752    fi
44753
44754    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44755  fi
44756
44757
44758    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44760$as_echo_n "checking for freetype includes... " >&6; }
44761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44762$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44763    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44765$as_echo_n "checking for freetype libraries... " >&6; }
44766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44767$as_echo "$FREETYPE_LIB_PATH" >&6; }
44768  fi
44769
44770          if test "x$FOUND_FREETYPE" != xyes; then
44771            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44772
44773  windows_path="$FREETYPE_BASE_DIR"
44774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44775    unix_path=`$CYGPATH -u "$windows_path"`
44776    FREETYPE_BASE_DIR="$unix_path"
44777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44779    FREETYPE_BASE_DIR="$unix_path"
44780  fi
44781
44782
44783  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44784  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44785  METHOD="well-known location"
44786
44787  # First check if the files exists.
44788  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44789    # We found an arbitrary include file. That's a good sign.
44790    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44791$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44792    FOUND_FREETYPE=yes
44793
44794    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44795    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44796      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44797$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44798      FOUND_FREETYPE=no
44799    else
44800      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44801        # On Windows, we will need both .lib and .dll file.
44802        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44803          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44804$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44805          FOUND_FREETYPE=no
44806        fi
44807      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44808          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44809        # Found lib in isa dir, use that instead.
44810        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44811      fi
44812    fi
44813  fi
44814
44815  if test "x$FOUND_FREETYPE" = xyes; then
44816
44817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44818
44819  # Input might be given as Windows format, start by converting to
44820  # unix format.
44821  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44822  new_path=`$CYGPATH -u "$path"`
44823
44824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44827  # "foo.exe" is OK but "foo" is an error.
44828  #
44829  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44830  # It is also a way to make sure we got the proper file name for the real test later on.
44831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44832  if test "x$test_shortpath" = x; then
44833    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44834$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44835    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44836  fi
44837
44838  # Call helper function which possibly converts this using DOS-style short mode.
44839  # If so, the updated path is stored in $new_path.
44840
44841  input_path="$new_path"
44842  # Check if we need to convert this using DOS-style short mode. If the path
44843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44844  # take no chances and rewrite it.
44845  # Note: m4 eats our [], so we need to use [ and ] instead.
44846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44847  if test "x$has_forbidden_chars" != x; then
44848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44852      # Going to short mode and back again did indeed matter. Since short mode is
44853      # case insensitive, let's make it lowercase to improve readability.
44854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44855      # Now convert it back to Unix-stile (cygpath)
44856      input_path=`$CYGPATH -u "$shortmode_path"`
44857      new_path="$input_path"
44858    fi
44859  fi
44860
44861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44862  if test "x$test_cygdrive_prefix" = x; then
44863    # As a simple fix, exclude /usr/bin since it's not a real path.
44864    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44866      # a path prefixed by /cygdrive for fixpath to work.
44867      new_path="$CYGWIN_ROOT_PATH$input_path"
44868    fi
44869  fi
44870
44871
44872  if test "x$path" != "x$new_path"; then
44873    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44874    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44875$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44876  fi
44877
44878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44879
44880  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44881  has_colon=`$ECHO $path | $GREP ^.:`
44882  new_path="$path"
44883  if test "x$has_colon" = x; then
44884    # Not in mixed or Windows style, start by that.
44885    new_path=`cmd //c echo $path`
44886  fi
44887
44888
44889  input_path="$new_path"
44890  # Check if we need to convert this using DOS-style short mode. If the path
44891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44892  # take no chances and rewrite it.
44893  # Note: m4 eats our [], so we need to use [ and ] instead.
44894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44895  if test "x$has_forbidden_chars" != x; then
44896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44897    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44898  fi
44899
44900
44901  windows_path="$new_path"
44902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44903    unix_path=`$CYGPATH -u "$windows_path"`
44904    new_path="$unix_path"
44905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44907    new_path="$unix_path"
44908  fi
44909
44910  if test "x$path" != "x$new_path"; then
44911    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44914  fi
44915
44916  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44917  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44918
44919  else
44920    # We're on a posix platform. Hooray! :)
44921    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44922    has_space=`$ECHO "$path" | $GREP " "`
44923    if test "x$has_space" != x; then
44924      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44925$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44926      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44927    fi
44928
44929    # Use eval to expand a potential ~
44930    eval path="$path"
44931    if test ! -f "$path" && test ! -d "$path"; then
44932      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44933    fi
44934
44935    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44936  fi
44937
44938
44939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44940
44941  # Input might be given as Windows format, start by converting to
44942  # unix format.
44943  path="$POTENTIAL_FREETYPE_LIB_PATH"
44944  new_path=`$CYGPATH -u "$path"`
44945
44946  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44947  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44948  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44949  # "foo.exe" is OK but "foo" is an error.
44950  #
44951  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44952  # It is also a way to make sure we got the proper file name for the real test later on.
44953  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44954  if test "x$test_shortpath" = x; then
44955    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44956$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44957    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44958  fi
44959
44960  # Call helper function which possibly converts this using DOS-style short mode.
44961  # If so, the updated path is stored in $new_path.
44962
44963  input_path="$new_path"
44964  # Check if we need to convert this using DOS-style short mode. If the path
44965  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44966  # take no chances and rewrite it.
44967  # Note: m4 eats our [], so we need to use [ and ] instead.
44968  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44969  if test "x$has_forbidden_chars" != x; then
44970    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44971    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44972    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44973    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44974      # Going to short mode and back again did indeed matter. Since short mode is
44975      # case insensitive, let's make it lowercase to improve readability.
44976      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44977      # Now convert it back to Unix-stile (cygpath)
44978      input_path=`$CYGPATH -u "$shortmode_path"`
44979      new_path="$input_path"
44980    fi
44981  fi
44982
44983  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44984  if test "x$test_cygdrive_prefix" = x; then
44985    # As a simple fix, exclude /usr/bin since it's not a real path.
44986    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44987      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44988      # a path prefixed by /cygdrive for fixpath to work.
44989      new_path="$CYGWIN_ROOT_PATH$input_path"
44990    fi
44991  fi
44992
44993
44994  if test "x$path" != "x$new_path"; then
44995    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44996    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44997$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44998  fi
44999
45000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45001
45002  path="$POTENTIAL_FREETYPE_LIB_PATH"
45003  has_colon=`$ECHO $path | $GREP ^.:`
45004  new_path="$path"
45005  if test "x$has_colon" = x; then
45006    # Not in mixed or Windows style, start by that.
45007    new_path=`cmd //c echo $path`
45008  fi
45009
45010
45011  input_path="$new_path"
45012  # Check if we need to convert this using DOS-style short mode. If the path
45013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45014  # take no chances and rewrite it.
45015  # Note: m4 eats our [], so we need to use [ and ] instead.
45016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45017  if test "x$has_forbidden_chars" != x; then
45018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45019    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45020  fi
45021
45022
45023  windows_path="$new_path"
45024  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45025    unix_path=`$CYGPATH -u "$windows_path"`
45026    new_path="$unix_path"
45027  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45028    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45029    new_path="$unix_path"
45030  fi
45031
45032  if test "x$path" != "x$new_path"; then
45033    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45034    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45035$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45036  fi
45037
45038  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45039  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45040
45041  else
45042    # We're on a posix platform. Hooray! :)
45043    path="$POTENTIAL_FREETYPE_LIB_PATH"
45044    has_space=`$ECHO "$path" | $GREP " "`
45045    if test "x$has_space" != x; then
45046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45048      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45049    fi
45050
45051    # Use eval to expand a potential ~
45052    eval path="$path"
45053    if test ! -f "$path" && test ! -d "$path"; then
45054      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45055    fi
45056
45057    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45058  fi
45059
45060
45061    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45062    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45063$as_echo_n "checking for freetype includes... " >&6; }
45064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45065$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45066    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45067    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45068$as_echo_n "checking for freetype libraries... " >&6; }
45069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45070$as_echo "$FREETYPE_LIB_PATH" >&6; }
45071  fi
45072
45073          fi
45074        else
45075          FREETYPE_BASE_DIR="$SYSROOT/usr"
45076
45077  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45078  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45079  METHOD="well-known location"
45080
45081  # First check if the files exists.
45082  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45083    # We found an arbitrary include file. That's a good sign.
45084    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45085$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45086    FOUND_FREETYPE=yes
45087
45088    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45089    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45090      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45091$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45092      FOUND_FREETYPE=no
45093    else
45094      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45095        # On Windows, we will need both .lib and .dll file.
45096        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45097          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45098$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45099          FOUND_FREETYPE=no
45100        fi
45101      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45102          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45103        # Found lib in isa dir, use that instead.
45104        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45105      fi
45106    fi
45107  fi
45108
45109  if test "x$FOUND_FREETYPE" = xyes; then
45110
45111  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45112
45113  # Input might be given as Windows format, start by converting to
45114  # unix format.
45115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45116  new_path=`$CYGPATH -u "$path"`
45117
45118  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45119  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45120  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45121  # "foo.exe" is OK but "foo" is an error.
45122  #
45123  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45124  # It is also a way to make sure we got the proper file name for the real test later on.
45125  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45126  if test "x$test_shortpath" = x; then
45127    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45128$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45129    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45130  fi
45131
45132  # Call helper function which possibly converts this using DOS-style short mode.
45133  # If so, the updated path is stored in $new_path.
45134
45135  input_path="$new_path"
45136  # Check if we need to convert this using DOS-style short mode. If the path
45137  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45138  # take no chances and rewrite it.
45139  # Note: m4 eats our [], so we need to use [ and ] instead.
45140  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45141  if test "x$has_forbidden_chars" != x; then
45142    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45143    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45144    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45145    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45146      # Going to short mode and back again did indeed matter. Since short mode is
45147      # case insensitive, let's make it lowercase to improve readability.
45148      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45149      # Now convert it back to Unix-stile (cygpath)
45150      input_path=`$CYGPATH -u "$shortmode_path"`
45151      new_path="$input_path"
45152    fi
45153  fi
45154
45155  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45156  if test "x$test_cygdrive_prefix" = x; then
45157    # As a simple fix, exclude /usr/bin since it's not a real path.
45158    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45159      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45160      # a path prefixed by /cygdrive for fixpath to work.
45161      new_path="$CYGWIN_ROOT_PATH$input_path"
45162    fi
45163  fi
45164
45165
45166  if test "x$path" != "x$new_path"; then
45167    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45170  fi
45171
45172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45173
45174  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45175  has_colon=`$ECHO $path | $GREP ^.:`
45176  new_path="$path"
45177  if test "x$has_colon" = x; then
45178    # Not in mixed or Windows style, start by that.
45179    new_path=`cmd //c echo $path`
45180  fi
45181
45182
45183  input_path="$new_path"
45184  # Check if we need to convert this using DOS-style short mode. If the path
45185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45186  # take no chances and rewrite it.
45187  # Note: m4 eats our [], so we need to use [ and ] instead.
45188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45189  if test "x$has_forbidden_chars" != x; then
45190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45191    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45192  fi
45193
45194
45195  windows_path="$new_path"
45196  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45197    unix_path=`$CYGPATH -u "$windows_path"`
45198    new_path="$unix_path"
45199  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45200    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45201    new_path="$unix_path"
45202  fi
45203
45204  if test "x$path" != "x$new_path"; then
45205    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45206    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45207$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45208  fi
45209
45210  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45211  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45212
45213  else
45214    # We're on a posix platform. Hooray! :)
45215    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45216    has_space=`$ECHO "$path" | $GREP " "`
45217    if test "x$has_space" != x; then
45218      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45219$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45220      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45221    fi
45222
45223    # Use eval to expand a potential ~
45224    eval path="$path"
45225    if test ! -f "$path" && test ! -d "$path"; then
45226      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45227    fi
45228
45229    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45230  fi
45231
45232
45233  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45234
45235  # Input might be given as Windows format, start by converting to
45236  # unix format.
45237  path="$POTENTIAL_FREETYPE_LIB_PATH"
45238  new_path=`$CYGPATH -u "$path"`
45239
45240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45243  # "foo.exe" is OK but "foo" is an error.
45244  #
45245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45246  # It is also a way to make sure we got the proper file name for the real test later on.
45247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45248  if test "x$test_shortpath" = x; then
45249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45250$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45251    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45252  fi
45253
45254  # Call helper function which possibly converts this using DOS-style short mode.
45255  # If so, the updated path is stored in $new_path.
45256
45257  input_path="$new_path"
45258  # Check if we need to convert this using DOS-style short mode. If the path
45259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45260  # take no chances and rewrite it.
45261  # Note: m4 eats our [], so we need to use [ and ] instead.
45262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45263  if test "x$has_forbidden_chars" != x; then
45264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45268      # Going to short mode and back again did indeed matter. Since short mode is
45269      # case insensitive, let's make it lowercase to improve readability.
45270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45271      # Now convert it back to Unix-stile (cygpath)
45272      input_path=`$CYGPATH -u "$shortmode_path"`
45273      new_path="$input_path"
45274    fi
45275  fi
45276
45277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45278  if test "x$test_cygdrive_prefix" = x; then
45279    # As a simple fix, exclude /usr/bin since it's not a real path.
45280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45282      # a path prefixed by /cygdrive for fixpath to work.
45283      new_path="$CYGWIN_ROOT_PATH$input_path"
45284    fi
45285  fi
45286
45287
45288  if test "x$path" != "x$new_path"; then
45289    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45292  fi
45293
45294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45295
45296  path="$POTENTIAL_FREETYPE_LIB_PATH"
45297  has_colon=`$ECHO $path | $GREP ^.:`
45298  new_path="$path"
45299  if test "x$has_colon" = x; then
45300    # Not in mixed or Windows style, start by that.
45301    new_path=`cmd //c echo $path`
45302  fi
45303
45304
45305  input_path="$new_path"
45306  # Check if we need to convert this using DOS-style short mode. If the path
45307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45308  # take no chances and rewrite it.
45309  # Note: m4 eats our [], so we need to use [ and ] instead.
45310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45311  if test "x$has_forbidden_chars" != x; then
45312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45314  fi
45315
45316
45317  windows_path="$new_path"
45318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45319    unix_path=`$CYGPATH -u "$windows_path"`
45320    new_path="$unix_path"
45321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45323    new_path="$unix_path"
45324  fi
45325
45326  if test "x$path" != "x$new_path"; then
45327    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45330  fi
45331
45332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45334
45335  else
45336    # We're on a posix platform. Hooray! :)
45337    path="$POTENTIAL_FREETYPE_LIB_PATH"
45338    has_space=`$ECHO "$path" | $GREP " "`
45339    if test "x$has_space" != x; then
45340      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45342      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45343    fi
45344
45345    # Use eval to expand a potential ~
45346    eval path="$path"
45347    if test ! -f "$path" && test ! -d "$path"; then
45348      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45349    fi
45350
45351    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45352  fi
45353
45354
45355    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45356    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45357$as_echo_n "checking for freetype includes... " >&6; }
45358    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45359$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45360    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45361    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45362$as_echo_n "checking for freetype libraries... " >&6; }
45363    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45364$as_echo "$FREETYPE_LIB_PATH" >&6; }
45365  fi
45366
45367
45368          if test "x$FOUND_FREETYPE" != xyes; then
45369            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45370
45371  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45372  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45373  METHOD="well-known location"
45374
45375  # First check if the files exists.
45376  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45377    # We found an arbitrary include file. That's a good sign.
45378    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45379$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45380    FOUND_FREETYPE=yes
45381
45382    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45383    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45384      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45385$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45386      FOUND_FREETYPE=no
45387    else
45388      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45389        # On Windows, we will need both .lib and .dll file.
45390        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45391          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45392$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45393          FOUND_FREETYPE=no
45394        fi
45395      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45396          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45397        # Found lib in isa dir, use that instead.
45398        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45399      fi
45400    fi
45401  fi
45402
45403  if test "x$FOUND_FREETYPE" = xyes; then
45404
45405  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45406
45407  # Input might be given as Windows format, start by converting to
45408  # unix format.
45409  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45410  new_path=`$CYGPATH -u "$path"`
45411
45412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45415  # "foo.exe" is OK but "foo" is an error.
45416  #
45417  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45418  # It is also a way to make sure we got the proper file name for the real test later on.
45419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45420  if test "x$test_shortpath" = x; then
45421    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45422$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45423    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45424  fi
45425
45426  # Call helper function which possibly converts this using DOS-style short mode.
45427  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45438    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45439    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45440      # Going to short mode and back again did indeed matter. Since short mode is
45441      # case insensitive, let's make it lowercase to improve readability.
45442      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45443      # Now convert it back to Unix-stile (cygpath)
45444      input_path=`$CYGPATH -u "$shortmode_path"`
45445      new_path="$input_path"
45446    fi
45447  fi
45448
45449  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45450  if test "x$test_cygdrive_prefix" = x; then
45451    # As a simple fix, exclude /usr/bin since it's not a real path.
45452    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45453      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45454      # a path prefixed by /cygdrive for fixpath to work.
45455      new_path="$CYGWIN_ROOT_PATH$input_path"
45456    fi
45457  fi
45458
45459
45460  if test "x$path" != "x$new_path"; then
45461    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45463$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45464  fi
45465
45466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45467
45468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45469  has_colon=`$ECHO $path | $GREP ^.:`
45470  new_path="$path"
45471  if test "x$has_colon" = x; then
45472    # Not in mixed or Windows style, start by that.
45473    new_path=`cmd //c echo $path`
45474  fi
45475
45476
45477  input_path="$new_path"
45478  # Check if we need to convert this using DOS-style short mode. If the path
45479  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45480  # take no chances and rewrite it.
45481  # Note: m4 eats our [], so we need to use [ and ] instead.
45482  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45483  if test "x$has_forbidden_chars" != x; then
45484    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45485    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45486  fi
45487
45488
45489  windows_path="$new_path"
45490  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45491    unix_path=`$CYGPATH -u "$windows_path"`
45492    new_path="$unix_path"
45493  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45494    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45495    new_path="$unix_path"
45496  fi
45497
45498  if test "x$path" != "x$new_path"; then
45499    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45500    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45501$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45502  fi
45503
45504  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45505  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45506
45507  else
45508    # We're on a posix platform. Hooray! :)
45509    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45510    has_space=`$ECHO "$path" | $GREP " "`
45511    if test "x$has_space" != x; then
45512      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45513$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45514      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45515    fi
45516
45517    # Use eval to expand a potential ~
45518    eval path="$path"
45519    if test ! -f "$path" && test ! -d "$path"; then
45520      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45521    fi
45522
45523    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45524  fi
45525
45526
45527  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45528
45529  # Input might be given as Windows format, start by converting to
45530  # unix format.
45531  path="$POTENTIAL_FREETYPE_LIB_PATH"
45532  new_path=`$CYGPATH -u "$path"`
45533
45534  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45535  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45536  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45537  # "foo.exe" is OK but "foo" is an error.
45538  #
45539  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45540  # It is also a way to make sure we got the proper file name for the real test later on.
45541  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45542  if test "x$test_shortpath" = x; then
45543    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45544$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45545    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45546  fi
45547
45548  # Call helper function which possibly converts this using DOS-style short mode.
45549  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45560    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45561    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45562      # Going to short mode and back again did indeed matter. Since short mode is
45563      # case insensitive, let's make it lowercase to improve readability.
45564      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45565      # Now convert it back to Unix-stile (cygpath)
45566      input_path=`$CYGPATH -u "$shortmode_path"`
45567      new_path="$input_path"
45568    fi
45569  fi
45570
45571  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45572  if test "x$test_cygdrive_prefix" = x; then
45573    # As a simple fix, exclude /usr/bin since it's not a real path.
45574    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45575      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45576      # a path prefixed by /cygdrive for fixpath to work.
45577      new_path="$CYGWIN_ROOT_PATH$input_path"
45578    fi
45579  fi
45580
45581
45582  if test "x$path" != "x$new_path"; then
45583    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45584    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45585$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45586  fi
45587
45588  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45589
45590  path="$POTENTIAL_FREETYPE_LIB_PATH"
45591  has_colon=`$ECHO $path | $GREP ^.:`
45592  new_path="$path"
45593  if test "x$has_colon" = x; then
45594    # Not in mixed or Windows style, start by that.
45595    new_path=`cmd //c echo $path`
45596  fi
45597
45598
45599  input_path="$new_path"
45600  # Check if we need to convert this using DOS-style short mode. If the path
45601  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45602  # take no chances and rewrite it.
45603  # Note: m4 eats our [], so we need to use [ and ] instead.
45604  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45605  if test "x$has_forbidden_chars" != x; then
45606    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45607    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45608  fi
45609
45610
45611  windows_path="$new_path"
45612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45613    unix_path=`$CYGPATH -u "$windows_path"`
45614    new_path="$unix_path"
45615  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45616    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45617    new_path="$unix_path"
45618  fi
45619
45620  if test "x$path" != "x$new_path"; then
45621    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45623$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45624  fi
45625
45626  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45627  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45628
45629  else
45630    # We're on a posix platform. Hooray! :)
45631    path="$POTENTIAL_FREETYPE_LIB_PATH"
45632    has_space=`$ECHO "$path" | $GREP " "`
45633    if test "x$has_space" != x; then
45634      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45635$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45636      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45637    fi
45638
45639    # Use eval to expand a potential ~
45640    eval path="$path"
45641    if test ! -f "$path" && test ! -d "$path"; then
45642      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45643    fi
45644
45645    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45646  fi
45647
45648
45649    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45650    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45651$as_echo_n "checking for freetype includes... " >&6; }
45652    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45653$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45654    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45656$as_echo_n "checking for freetype libraries... " >&6; }
45657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45658$as_echo "$FREETYPE_LIB_PATH" >&6; }
45659  fi
45660
45661          fi
45662
45663          if test "x$FOUND_FREETYPE" != xyes; then
45664            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45665
45666  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45667  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45668  METHOD="well-known location"
45669
45670  # First check if the files exists.
45671  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45672    # We found an arbitrary include file. That's a good sign.
45673    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45674$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45675    FOUND_FREETYPE=yes
45676
45677    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45678    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45679      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45680$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45681      FOUND_FREETYPE=no
45682    else
45683      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45684        # On Windows, we will need both .lib and .dll file.
45685        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45686          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45687$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45688          FOUND_FREETYPE=no
45689        fi
45690      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45691          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45692        # Found lib in isa dir, use that instead.
45693        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45694      fi
45695    fi
45696  fi
45697
45698  if test "x$FOUND_FREETYPE" = xyes; then
45699
45700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45701
45702  # Input might be given as Windows format, start by converting to
45703  # unix format.
45704  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45705  new_path=`$CYGPATH -u "$path"`
45706
45707  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45708  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45709  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45710  # "foo.exe" is OK but "foo" is an error.
45711  #
45712  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45713  # It is also a way to make sure we got the proper file name for the real test later on.
45714  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45715  if test "x$test_shortpath" = x; then
45716    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45717$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45718    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45719  fi
45720
45721  # Call helper function which possibly converts this using DOS-style short mode.
45722  # If so, the updated path is stored in $new_path.
45723
45724  input_path="$new_path"
45725  # Check if we need to convert this using DOS-style short mode. If the path
45726  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45727  # take no chances and rewrite it.
45728  # Note: m4 eats our [], so we need to use [ and ] instead.
45729  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45730  if test "x$has_forbidden_chars" != x; then
45731    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45732    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45733    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45734    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45735      # Going to short mode and back again did indeed matter. Since short mode is
45736      # case insensitive, let's make it lowercase to improve readability.
45737      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45738      # Now convert it back to Unix-stile (cygpath)
45739      input_path=`$CYGPATH -u "$shortmode_path"`
45740      new_path="$input_path"
45741    fi
45742  fi
45743
45744  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45745  if test "x$test_cygdrive_prefix" = x; then
45746    # As a simple fix, exclude /usr/bin since it's not a real path.
45747    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45748      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45749      # a path prefixed by /cygdrive for fixpath to work.
45750      new_path="$CYGWIN_ROOT_PATH$input_path"
45751    fi
45752  fi
45753
45754
45755  if test "x$path" != "x$new_path"; then
45756    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45757    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45758$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45759  fi
45760
45761  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45762
45763  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45764  has_colon=`$ECHO $path | $GREP ^.:`
45765  new_path="$path"
45766  if test "x$has_colon" = x; then
45767    # Not in mixed or Windows style, start by that.
45768    new_path=`cmd //c echo $path`
45769  fi
45770
45771
45772  input_path="$new_path"
45773  # Check if we need to convert this using DOS-style short mode. If the path
45774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45775  # take no chances and rewrite it.
45776  # Note: m4 eats our [], so we need to use [ and ] instead.
45777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45778  if test "x$has_forbidden_chars" != x; then
45779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45780    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45781  fi
45782
45783
45784  windows_path="$new_path"
45785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45786    unix_path=`$CYGPATH -u "$windows_path"`
45787    new_path="$unix_path"
45788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45789    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45790    new_path="$unix_path"
45791  fi
45792
45793  if test "x$path" != "x$new_path"; then
45794    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45796$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45797  fi
45798
45799  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45800  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45801
45802  else
45803    # We're on a posix platform. Hooray! :)
45804    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45805    has_space=`$ECHO "$path" | $GREP " "`
45806    if test "x$has_space" != x; then
45807      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45808$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45809      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45810    fi
45811
45812    # Use eval to expand a potential ~
45813    eval path="$path"
45814    if test ! -f "$path" && test ! -d "$path"; then
45815      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45816    fi
45817
45818    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45819  fi
45820
45821
45822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45823
45824  # Input might be given as Windows format, start by converting to
45825  # unix format.
45826  path="$POTENTIAL_FREETYPE_LIB_PATH"
45827  new_path=`$CYGPATH -u "$path"`
45828
45829  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45830  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45831  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45832  # "foo.exe" is OK but "foo" is an error.
45833  #
45834  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45835  # It is also a way to make sure we got the proper file name for the real test later on.
45836  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45837  if test "x$test_shortpath" = x; then
45838    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45840    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45841  fi
45842
45843  # Call helper function which possibly converts this using DOS-style short mode.
45844  # If so, the updated path is stored in $new_path.
45845
45846  input_path="$new_path"
45847  # Check if we need to convert this using DOS-style short mode. If the path
45848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45849  # take no chances and rewrite it.
45850  # Note: m4 eats our [], so we need to use [ and ] instead.
45851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45852  if test "x$has_forbidden_chars" != x; then
45853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45854    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45855    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45856    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45857      # Going to short mode and back again did indeed matter. Since short mode is
45858      # case insensitive, let's make it lowercase to improve readability.
45859      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45860      # Now convert it back to Unix-stile (cygpath)
45861      input_path=`$CYGPATH -u "$shortmode_path"`
45862      new_path="$input_path"
45863    fi
45864  fi
45865
45866  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45867  if test "x$test_cygdrive_prefix" = x; then
45868    # As a simple fix, exclude /usr/bin since it's not a real path.
45869    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45870      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45871      # a path prefixed by /cygdrive for fixpath to work.
45872      new_path="$CYGWIN_ROOT_PATH$input_path"
45873    fi
45874  fi
45875
45876
45877  if test "x$path" != "x$new_path"; then
45878    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45880$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45881  fi
45882
45883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45884
45885  path="$POTENTIAL_FREETYPE_LIB_PATH"
45886  has_colon=`$ECHO $path | $GREP ^.:`
45887  new_path="$path"
45888  if test "x$has_colon" = x; then
45889    # Not in mixed or Windows style, start by that.
45890    new_path=`cmd //c echo $path`
45891  fi
45892
45893
45894  input_path="$new_path"
45895  # Check if we need to convert this using DOS-style short mode. If the path
45896  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45897  # take no chances and rewrite it.
45898  # Note: m4 eats our [], so we need to use [ and ] instead.
45899  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45900  if test "x$has_forbidden_chars" != x; then
45901    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45902    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45903  fi
45904
45905
45906  windows_path="$new_path"
45907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45908    unix_path=`$CYGPATH -u "$windows_path"`
45909    new_path="$unix_path"
45910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45912    new_path="$unix_path"
45913  fi
45914
45915  if test "x$path" != "x$new_path"; then
45916    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45919  fi
45920
45921  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45922  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45923
45924  else
45925    # We're on a posix platform. Hooray! :)
45926    path="$POTENTIAL_FREETYPE_LIB_PATH"
45927    has_space=`$ECHO "$path" | $GREP " "`
45928    if test "x$has_space" != x; then
45929      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45930$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45931      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45932    fi
45933
45934    # Use eval to expand a potential ~
45935    eval path="$path"
45936    if test ! -f "$path" && test ! -d "$path"; then
45937      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45938    fi
45939
45940    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45941  fi
45942
45943
45944    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45946$as_echo_n "checking for freetype includes... " >&6; }
45947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45948$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45949    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45950    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45951$as_echo_n "checking for freetype libraries... " >&6; }
45952    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45953$as_echo "$FREETYPE_LIB_PATH" >&6; }
45954  fi
45955
45956          fi
45957
45958          if test "x$FOUND_FREETYPE" != xyes; then
45959            FREETYPE_BASE_DIR="$SYSROOT/usr"
45960            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
45961
45962  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45963  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
45964  METHOD="well-known location"
45965
45966  # First check if the files exists.
45967  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45968    # We found an arbitrary include file. That's a good sign.
45969    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45970$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45971    FOUND_FREETYPE=yes
45972
45973    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45974    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45975      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45976$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45977      FOUND_FREETYPE=no
45978    else
45979      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45980        # On Windows, we will need both .lib and .dll file.
45981        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45982          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45983$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45984          FOUND_FREETYPE=no
45985        fi
45986      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45987          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45988        # Found lib in isa dir, use that instead.
45989        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45990      fi
45991    fi
45992  fi
45993
45994  if test "x$FOUND_FREETYPE" = xyes; then
45995
45996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45997
45998  # Input might be given as Windows format, start by converting to
45999  # unix format.
46000  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46001  new_path=`$CYGPATH -u "$path"`
46002
46003  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46004  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46005  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46006  # "foo.exe" is OK but "foo" is an error.
46007  #
46008  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46009  # It is also a way to make sure we got the proper file name for the real test later on.
46010  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46011  if test "x$test_shortpath" = x; then
46012    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46013$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46014    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46015  fi
46016
46017  # Call helper function which possibly converts this using DOS-style short mode.
46018  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46029    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46030    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46031      # Going to short mode and back again did indeed matter. Since short mode is
46032      # case insensitive, let's make it lowercase to improve readability.
46033      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46034      # Now convert it back to Unix-stile (cygpath)
46035      input_path=`$CYGPATH -u "$shortmode_path"`
46036      new_path="$input_path"
46037    fi
46038  fi
46039
46040  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46041  if test "x$test_cygdrive_prefix" = x; then
46042    # As a simple fix, exclude /usr/bin since it's not a real path.
46043    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46044      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46045      # a path prefixed by /cygdrive for fixpath to work.
46046      new_path="$CYGWIN_ROOT_PATH$input_path"
46047    fi
46048  fi
46049
46050
46051  if test "x$path" != "x$new_path"; then
46052    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46053    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46054$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46055  fi
46056
46057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46058
46059  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46060  has_colon=`$ECHO $path | $GREP ^.:`
46061  new_path="$path"
46062  if test "x$has_colon" = x; then
46063    # Not in mixed or Windows style, start by that.
46064    new_path=`cmd //c echo $path`
46065  fi
46066
46067
46068  input_path="$new_path"
46069  # Check if we need to convert this using DOS-style short mode. If the path
46070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46071  # take no chances and rewrite it.
46072  # Note: m4 eats our [], so we need to use [ and ] instead.
46073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46074  if test "x$has_forbidden_chars" != x; then
46075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46076    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46077  fi
46078
46079
46080  windows_path="$new_path"
46081  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46082    unix_path=`$CYGPATH -u "$windows_path"`
46083    new_path="$unix_path"
46084  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46085    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46086    new_path="$unix_path"
46087  fi
46088
46089  if test "x$path" != "x$new_path"; then
46090    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46091    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46092$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46093  fi
46094
46095  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46096  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46097
46098  else
46099    # We're on a posix platform. Hooray! :)
46100    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46101    has_space=`$ECHO "$path" | $GREP " "`
46102    if test "x$has_space" != x; then
46103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46104$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46105      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46106    fi
46107
46108    # Use eval to expand a potential ~
46109    eval path="$path"
46110    if test ! -f "$path" && test ! -d "$path"; then
46111      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46112    fi
46113
46114    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46115  fi
46116
46117
46118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46119
46120  # Input might be given as Windows format, start by converting to
46121  # unix format.
46122  path="$POTENTIAL_FREETYPE_LIB_PATH"
46123  new_path=`$CYGPATH -u "$path"`
46124
46125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46128  # "foo.exe" is OK but "foo" is an error.
46129  #
46130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46131  # It is also a way to make sure we got the proper file name for the real test later on.
46132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46133  if test "x$test_shortpath" = x; then
46134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46135$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46136    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46137  fi
46138
46139  # Call helper function which possibly converts this using DOS-style short mode.
46140  # If so, the updated path is stored in $new_path.
46141
46142  input_path="$new_path"
46143  # Check if we need to convert this using DOS-style short mode. If the path
46144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46145  # take no chances and rewrite it.
46146  # Note: m4 eats our [], so we need to use [ and ] instead.
46147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46148  if test "x$has_forbidden_chars" != x; then
46149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46153      # Going to short mode and back again did indeed matter. Since short mode is
46154      # case insensitive, let's make it lowercase to improve readability.
46155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46156      # Now convert it back to Unix-stile (cygpath)
46157      input_path=`$CYGPATH -u "$shortmode_path"`
46158      new_path="$input_path"
46159    fi
46160  fi
46161
46162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46163  if test "x$test_cygdrive_prefix" = x; then
46164    # As a simple fix, exclude /usr/bin since it's not a real path.
46165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46167      # a path prefixed by /cygdrive for fixpath to work.
46168      new_path="$CYGWIN_ROOT_PATH$input_path"
46169    fi
46170  fi
46171
46172
46173  if test "x$path" != "x$new_path"; then
46174    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46176$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46177  fi
46178
46179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46180
46181  path="$POTENTIAL_FREETYPE_LIB_PATH"
46182  has_colon=`$ECHO $path | $GREP ^.:`
46183  new_path="$path"
46184  if test "x$has_colon" = x; then
46185    # Not in mixed or Windows style, start by that.
46186    new_path=`cmd //c echo $path`
46187  fi
46188
46189
46190  input_path="$new_path"
46191  # Check if we need to convert this using DOS-style short mode. If the path
46192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46193  # take no chances and rewrite it.
46194  # Note: m4 eats our [], so we need to use [ and ] instead.
46195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46196  if test "x$has_forbidden_chars" != x; then
46197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46199  fi
46200
46201
46202  windows_path="$new_path"
46203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46204    unix_path=`$CYGPATH -u "$windows_path"`
46205    new_path="$unix_path"
46206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46208    new_path="$unix_path"
46209  fi
46210
46211  if test "x$path" != "x$new_path"; then
46212    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46214$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46215  fi
46216
46217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46219
46220  else
46221    # We're on a posix platform. Hooray! :)
46222    path="$POTENTIAL_FREETYPE_LIB_PATH"
46223    has_space=`$ECHO "$path" | $GREP " "`
46224    if test "x$has_space" != x; then
46225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46226$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46227      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46228    fi
46229
46230    # Use eval to expand a potential ~
46231    eval path="$path"
46232    if test ! -f "$path" && test ! -d "$path"; then
46233      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46234    fi
46235
46236    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46237  fi
46238
46239
46240    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46241    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46242$as_echo_n "checking for freetype includes... " >&6; }
46243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46244$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46245    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46246    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46247$as_echo_n "checking for freetype libraries... " >&6; }
46248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46249$as_echo "$FREETYPE_LIB_PATH" >&6; }
46250  fi
46251
46252            else
46253
46254  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46255  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46256  METHOD="well-known location"
46257
46258  # First check if the files exists.
46259  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46260    # We found an arbitrary include file. That's a good sign.
46261    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46262$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46263    FOUND_FREETYPE=yes
46264
46265    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46266    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46267      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46268$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46269      FOUND_FREETYPE=no
46270    else
46271      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46272        # On Windows, we will need both .lib and .dll file.
46273        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46274          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46275$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46276          FOUND_FREETYPE=no
46277        fi
46278      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46279          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46280        # Found lib in isa dir, use that instead.
46281        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46282      fi
46283    fi
46284  fi
46285
46286  if test "x$FOUND_FREETYPE" = xyes; then
46287
46288  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46289
46290  # Input might be given as Windows format, start by converting to
46291  # unix format.
46292  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46293  new_path=`$CYGPATH -u "$path"`
46294
46295  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46296  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46297  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46298  # "foo.exe" is OK but "foo" is an error.
46299  #
46300  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46301  # It is also a way to make sure we got the proper file name for the real test later on.
46302  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46303  if test "x$test_shortpath" = x; then
46304    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46306    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46307  fi
46308
46309  # Call helper function which possibly converts this using DOS-style short mode.
46310  # If so, the updated path is stored in $new_path.
46311
46312  input_path="$new_path"
46313  # Check if we need to convert this using DOS-style short mode. If the path
46314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46315  # take no chances and rewrite it.
46316  # Note: m4 eats our [], so we need to use [ and ] instead.
46317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46318  if test "x$has_forbidden_chars" != x; then
46319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46323      # Going to short mode and back again did indeed matter. Since short mode is
46324      # case insensitive, let's make it lowercase to improve readability.
46325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46326      # Now convert it back to Unix-stile (cygpath)
46327      input_path=`$CYGPATH -u "$shortmode_path"`
46328      new_path="$input_path"
46329    fi
46330  fi
46331
46332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46333  if test "x$test_cygdrive_prefix" = x; then
46334    # As a simple fix, exclude /usr/bin since it's not a real path.
46335    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46337      # a path prefixed by /cygdrive for fixpath to work.
46338      new_path="$CYGWIN_ROOT_PATH$input_path"
46339    fi
46340  fi
46341
46342
46343  if test "x$path" != "x$new_path"; then
46344    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46345    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46346$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46347  fi
46348
46349  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46350
46351  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46352  has_colon=`$ECHO $path | $GREP ^.:`
46353  new_path="$path"
46354  if test "x$has_colon" = x; then
46355    # Not in mixed or Windows style, start by that.
46356    new_path=`cmd //c echo $path`
46357  fi
46358
46359
46360  input_path="$new_path"
46361  # Check if we need to convert this using DOS-style short mode. If the path
46362  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46363  # take no chances and rewrite it.
46364  # Note: m4 eats our [], so we need to use [ and ] instead.
46365  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46366  if test "x$has_forbidden_chars" != x; then
46367    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46368    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46369  fi
46370
46371
46372  windows_path="$new_path"
46373  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46374    unix_path=`$CYGPATH -u "$windows_path"`
46375    new_path="$unix_path"
46376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46377    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46378    new_path="$unix_path"
46379  fi
46380
46381  if test "x$path" != "x$new_path"; then
46382    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46383    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46384$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46385  fi
46386
46387  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46388  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46389
46390  else
46391    # We're on a posix platform. Hooray! :)
46392    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46393    has_space=`$ECHO "$path" | $GREP " "`
46394    if test "x$has_space" != x; then
46395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46396$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46397      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46398    fi
46399
46400    # Use eval to expand a potential ~
46401    eval path="$path"
46402    if test ! -f "$path" && test ! -d "$path"; then
46403      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46404    fi
46405
46406    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46407  fi
46408
46409
46410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46411
46412  # Input might be given as Windows format, start by converting to
46413  # unix format.
46414  path="$POTENTIAL_FREETYPE_LIB_PATH"
46415  new_path=`$CYGPATH -u "$path"`
46416
46417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46420  # "foo.exe" is OK but "foo" is an error.
46421  #
46422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46423  # It is also a way to make sure we got the proper file name for the real test later on.
46424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46425  if test "x$test_shortpath" = x; then
46426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46427$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46428    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46429  fi
46430
46431  # Call helper function which possibly converts this using DOS-style short mode.
46432  # If so, the updated path is stored in $new_path.
46433
46434  input_path="$new_path"
46435  # Check if we need to convert this using DOS-style short mode. If the path
46436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46437  # take no chances and rewrite it.
46438  # Note: m4 eats our [], so we need to use [ and ] instead.
46439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46440  if test "x$has_forbidden_chars" != x; then
46441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46445      # Going to short mode and back again did indeed matter. Since short mode is
46446      # case insensitive, let's make it lowercase to improve readability.
46447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46448      # Now convert it back to Unix-stile (cygpath)
46449      input_path=`$CYGPATH -u "$shortmode_path"`
46450      new_path="$input_path"
46451    fi
46452  fi
46453
46454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46455  if test "x$test_cygdrive_prefix" = x; then
46456    # As a simple fix, exclude /usr/bin since it's not a real path.
46457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46459      # a path prefixed by /cygdrive for fixpath to work.
46460      new_path="$CYGWIN_ROOT_PATH$input_path"
46461    fi
46462  fi
46463
46464
46465  if test "x$path" != "x$new_path"; then
46466    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46468$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46469  fi
46470
46471  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46472
46473  path="$POTENTIAL_FREETYPE_LIB_PATH"
46474  has_colon=`$ECHO $path | $GREP ^.:`
46475  new_path="$path"
46476  if test "x$has_colon" = x; then
46477    # Not in mixed or Windows style, start by that.
46478    new_path=`cmd //c echo $path`
46479  fi
46480
46481
46482  input_path="$new_path"
46483  # Check if we need to convert this using DOS-style short mode. If the path
46484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46485  # take no chances and rewrite it.
46486  # Note: m4 eats our [], so we need to use [ and ] instead.
46487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46488  if test "x$has_forbidden_chars" != x; then
46489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46491  fi
46492
46493
46494  windows_path="$new_path"
46495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46496    unix_path=`$CYGPATH -u "$windows_path"`
46497    new_path="$unix_path"
46498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46500    new_path="$unix_path"
46501  fi
46502
46503  if test "x$path" != "x$new_path"; then
46504    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46506$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46507  fi
46508
46509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46511
46512  else
46513    # We're on a posix platform. Hooray! :)
46514    path="$POTENTIAL_FREETYPE_LIB_PATH"
46515    has_space=`$ECHO "$path" | $GREP " "`
46516    if test "x$has_space" != x; then
46517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46518$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46519      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46520    fi
46521
46522    # Use eval to expand a potential ~
46523    eval path="$path"
46524    if test ! -f "$path" && test ! -d "$path"; then
46525      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46526    fi
46527
46528    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46529  fi
46530
46531
46532    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46534$as_echo_n "checking for freetype includes... " >&6; }
46535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46536$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46537    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46539$as_echo_n "checking for freetype libraries... " >&6; }
46540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46541$as_echo "$FREETYPE_LIB_PATH" >&6; }
46542  fi
46543
46544              if test "x$FOUND_FREETYPE" != xyes; then
46545
46546  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46547  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46548  METHOD="well-known location"
46549
46550  # First check if the files exists.
46551  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46552    # We found an arbitrary include file. That's a good sign.
46553    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46554$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46555    FOUND_FREETYPE=yes
46556
46557    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46558    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46559      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46560$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46561      FOUND_FREETYPE=no
46562    else
46563      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46564        # On Windows, we will need both .lib and .dll file.
46565        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46566          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46567$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46568          FOUND_FREETYPE=no
46569        fi
46570      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46571          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46572        # Found lib in isa dir, use that instead.
46573        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46574      fi
46575    fi
46576  fi
46577
46578  if test "x$FOUND_FREETYPE" = xyes; then
46579
46580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46581
46582  # Input might be given as Windows format, start by converting to
46583  # unix format.
46584  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46585  new_path=`$CYGPATH -u "$path"`
46586
46587  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46588  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46589  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46590  # "foo.exe" is OK but "foo" is an error.
46591  #
46592  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46593  # It is also a way to make sure we got the proper file name for the real test later on.
46594  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46595  if test "x$test_shortpath" = x; then
46596    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46597$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46598    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46599  fi
46600
46601  # Call helper function which possibly converts this using DOS-style short mode.
46602  # If so, the updated path is stored in $new_path.
46603
46604  input_path="$new_path"
46605  # Check if we need to convert this using DOS-style short mode. If the path
46606  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46607  # take no chances and rewrite it.
46608  # Note: m4 eats our [], so we need to use [ and ] instead.
46609  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46610  if test "x$has_forbidden_chars" != x; then
46611    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46612    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46613    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46614    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46615      # Going to short mode and back again did indeed matter. Since short mode is
46616      # case insensitive, let's make it lowercase to improve readability.
46617      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46618      # Now convert it back to Unix-stile (cygpath)
46619      input_path=`$CYGPATH -u "$shortmode_path"`
46620      new_path="$input_path"
46621    fi
46622  fi
46623
46624  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46625  if test "x$test_cygdrive_prefix" = x; then
46626    # As a simple fix, exclude /usr/bin since it's not a real path.
46627    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46628      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46629      # a path prefixed by /cygdrive for fixpath to work.
46630      new_path="$CYGWIN_ROOT_PATH$input_path"
46631    fi
46632  fi
46633
46634
46635  if test "x$path" != "x$new_path"; then
46636    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46637    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46638$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46639  fi
46640
46641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46642
46643  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46644  has_colon=`$ECHO $path | $GREP ^.:`
46645  new_path="$path"
46646  if test "x$has_colon" = x; then
46647    # Not in mixed or Windows style, start by that.
46648    new_path=`cmd //c echo $path`
46649  fi
46650
46651
46652  input_path="$new_path"
46653  # Check if we need to convert this using DOS-style short mode. If the path
46654  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46655  # take no chances and rewrite it.
46656  # Note: m4 eats our [], so we need to use [ and ] instead.
46657  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46658  if test "x$has_forbidden_chars" != x; then
46659    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46660    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46661  fi
46662
46663
46664  windows_path="$new_path"
46665  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46666    unix_path=`$CYGPATH -u "$windows_path"`
46667    new_path="$unix_path"
46668  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46669    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46670    new_path="$unix_path"
46671  fi
46672
46673  if test "x$path" != "x$new_path"; then
46674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46677  fi
46678
46679  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46680  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46681
46682  else
46683    # We're on a posix platform. Hooray! :)
46684    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46685    has_space=`$ECHO "$path" | $GREP " "`
46686    if test "x$has_space" != x; then
46687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46688$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46689      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46690    fi
46691
46692    # Use eval to expand a potential ~
46693    eval path="$path"
46694    if test ! -f "$path" && test ! -d "$path"; then
46695      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46696    fi
46697
46698    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46699  fi
46700
46701
46702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46703
46704  # Input might be given as Windows format, start by converting to
46705  # unix format.
46706  path="$POTENTIAL_FREETYPE_LIB_PATH"
46707  new_path=`$CYGPATH -u "$path"`
46708
46709  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46710  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46711  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46712  # "foo.exe" is OK but "foo" is an error.
46713  #
46714  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46715  # It is also a way to make sure we got the proper file name for the real test later on.
46716  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46717  if test "x$test_shortpath" = x; then
46718    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46719$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46720    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46721  fi
46722
46723  # Call helper function which possibly converts this using DOS-style short mode.
46724  # If so, the updated path is stored in $new_path.
46725
46726  input_path="$new_path"
46727  # Check if we need to convert this using DOS-style short mode. If the path
46728  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46729  # take no chances and rewrite it.
46730  # Note: m4 eats our [], so we need to use [ and ] instead.
46731  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46732  if test "x$has_forbidden_chars" != x; then
46733    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46734    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46735    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46736    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46737      # Going to short mode and back again did indeed matter. Since short mode is
46738      # case insensitive, let's make it lowercase to improve readability.
46739      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46740      # Now convert it back to Unix-stile (cygpath)
46741      input_path=`$CYGPATH -u "$shortmode_path"`
46742      new_path="$input_path"
46743    fi
46744  fi
46745
46746  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46747  if test "x$test_cygdrive_prefix" = x; then
46748    # As a simple fix, exclude /usr/bin since it's not a real path.
46749    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46750      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46751      # a path prefixed by /cygdrive for fixpath to work.
46752      new_path="$CYGWIN_ROOT_PATH$input_path"
46753    fi
46754  fi
46755
46756
46757  if test "x$path" != "x$new_path"; then
46758    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46759    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46760$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46761  fi
46762
46763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46764
46765  path="$POTENTIAL_FREETYPE_LIB_PATH"
46766  has_colon=`$ECHO $path | $GREP ^.:`
46767  new_path="$path"
46768  if test "x$has_colon" = x; then
46769    # Not in mixed or Windows style, start by that.
46770    new_path=`cmd //c echo $path`
46771  fi
46772
46773
46774  input_path="$new_path"
46775  # Check if we need to convert this using DOS-style short mode. If the path
46776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46777  # take no chances and rewrite it.
46778  # Note: m4 eats our [], so we need to use [ and ] instead.
46779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46780  if test "x$has_forbidden_chars" != x; then
46781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46783  fi
46784
46785
46786  windows_path="$new_path"
46787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46788    unix_path=`$CYGPATH -u "$windows_path"`
46789    new_path="$unix_path"
46790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46792    new_path="$unix_path"
46793  fi
46794
46795  if test "x$path" != "x$new_path"; then
46796    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46799  fi
46800
46801  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46802  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46803
46804  else
46805    # We're on a posix platform. Hooray! :)
46806    path="$POTENTIAL_FREETYPE_LIB_PATH"
46807    has_space=`$ECHO "$path" | $GREP " "`
46808    if test "x$has_space" != x; then
46809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46810$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46811      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46812    fi
46813
46814    # Use eval to expand a potential ~
46815    eval path="$path"
46816    if test ! -f "$path" && test ! -d "$path"; then
46817      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46818    fi
46819
46820    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46821  fi
46822
46823
46824    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46826$as_echo_n "checking for freetype includes... " >&6; }
46827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46828$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46829    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46830    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46831$as_echo_n "checking for freetype libraries... " >&6; }
46832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46833$as_echo "$FREETYPE_LIB_PATH" >&6; }
46834  fi
46835
46836              fi
46837            fi
46838          fi
46839        fi
46840      fi # end check in well-known locations
46841
46842      if test "x$FOUND_FREETYPE" != xyes; then
46843
46844  # Print a helpful message on how to acquire the necessary build dependency.
46845  # freetype is the help tag: freetype, cups, pulse, alsa etc
46846  MISSING_DEPENDENCY=freetype
46847
46848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46849    cygwin_help $MISSING_DEPENDENCY
46850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46851    msys_help $MISSING_DEPENDENCY
46852  else
46853    PKGHANDLER_COMMAND=
46854
46855    case $PKGHANDLER in
46856      apt-get)
46857        apt_help     $MISSING_DEPENDENCY ;;
46858      yum)
46859        yum_help     $MISSING_DEPENDENCY ;;
46860      port)
46861        port_help    $MISSING_DEPENDENCY ;;
46862      pkgutil)
46863        pkgutil_help $MISSING_DEPENDENCY ;;
46864      pkgadd)
46865        pkgadd_help  $MISSING_DEPENDENCY ;;
46866    esac
46867
46868    if test "x$PKGHANDLER_COMMAND" != x; then
46869      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46870    fi
46871  fi
46872
46873        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46874      fi
46875    fi # end user specified settings
46876
46877    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46878    if test "x$FREETYPE_CFLAGS" = x; then
46879
46880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46881
46882  # Input might be given as Windows format, start by converting to
46883  # unix format.
46884  path="$FREETYPE_INCLUDE_PATH"
46885  new_path=`$CYGPATH -u "$path"`
46886
46887  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46888  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46889  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46890  # "foo.exe" is OK but "foo" is an error.
46891  #
46892  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46893  # It is also a way to make sure we got the proper file name for the real test later on.
46894  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46895  if test "x$test_shortpath" = x; then
46896    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46897$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46898    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
46899  fi
46900
46901  # Call helper function which possibly converts this using DOS-style short mode.
46902  # If so, the updated path is stored in $new_path.
46903
46904  input_path="$new_path"
46905  # Check if we need to convert this using DOS-style short mode. If the path
46906  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46907  # take no chances and rewrite it.
46908  # Note: m4 eats our [], so we need to use [ and ] instead.
46909  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46910  if test "x$has_forbidden_chars" != x; then
46911    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46912    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46913    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46914    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46915      # Going to short mode and back again did indeed matter. Since short mode is
46916      # case insensitive, let's make it lowercase to improve readability.
46917      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46918      # Now convert it back to Unix-stile (cygpath)
46919      input_path=`$CYGPATH -u "$shortmode_path"`
46920      new_path="$input_path"
46921    fi
46922  fi
46923
46924  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46925  if test "x$test_cygdrive_prefix" = x; then
46926    # As a simple fix, exclude /usr/bin since it's not a real path.
46927    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46928      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46929      # a path prefixed by /cygdrive for fixpath to work.
46930      new_path="$CYGWIN_ROOT_PATH$input_path"
46931    fi
46932  fi
46933
46934
46935  if test "x$path" != "x$new_path"; then
46936    FREETYPE_INCLUDE_PATH="$new_path"
46937    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46938$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46939  fi
46940
46941  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46942
46943  path="$FREETYPE_INCLUDE_PATH"
46944  has_colon=`$ECHO $path | $GREP ^.:`
46945  new_path="$path"
46946  if test "x$has_colon" = x; then
46947    # Not in mixed or Windows style, start by that.
46948    new_path=`cmd //c echo $path`
46949  fi
46950
46951
46952  input_path="$new_path"
46953  # Check if we need to convert this using DOS-style short mode. If the path
46954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46955  # take no chances and rewrite it.
46956  # Note: m4 eats our [], so we need to use [ and ] instead.
46957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46958  if test "x$has_forbidden_chars" != x; then
46959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46961  fi
46962
46963
46964  windows_path="$new_path"
46965  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46966    unix_path=`$CYGPATH -u "$windows_path"`
46967    new_path="$unix_path"
46968  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46969    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46970    new_path="$unix_path"
46971  fi
46972
46973  if test "x$path" != "x$new_path"; then
46974    FREETYPE_INCLUDE_PATH="$new_path"
46975    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46976$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46977  fi
46978
46979  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46980  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46981
46982  else
46983    # We're on a posix platform. Hooray! :)
46984    path="$FREETYPE_INCLUDE_PATH"
46985    has_space=`$ECHO "$path" | $GREP " "`
46986    if test "x$has_space" != x; then
46987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46988$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46989      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46990    fi
46991
46992    # Use eval to expand a potential ~
46993    eval path="$path"
46994    if test ! -f "$path" && test ! -d "$path"; then
46995      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46996    fi
46997
46998    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46999  fi
47000
47001      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47002        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47003      else
47004        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47005      fi
47006    fi
47007
47008    if test "x$FREETYPE_LIBS" = x; then
47009
47010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47011
47012  # Input might be given as Windows format, start by converting to
47013  # unix format.
47014  path="$FREETYPE_LIB_PATH"
47015  new_path=`$CYGPATH -u "$path"`
47016
47017  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47018  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47019  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47020  # "foo.exe" is OK but "foo" is an error.
47021  #
47022  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47023  # It is also a way to make sure we got the proper file name for the real test later on.
47024  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47025  if test "x$test_shortpath" = x; then
47026    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47027$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47028    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47029  fi
47030
47031  # Call helper function which possibly converts this using DOS-style short mode.
47032  # If so, the updated path is stored in $new_path.
47033
47034  input_path="$new_path"
47035  # Check if we need to convert this using DOS-style short mode. If the path
47036  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47037  # take no chances and rewrite it.
47038  # Note: m4 eats our [], so we need to use [ and ] instead.
47039  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47040  if test "x$has_forbidden_chars" != x; then
47041    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47042    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47043    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47044    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47045      # Going to short mode and back again did indeed matter. Since short mode is
47046      # case insensitive, let's make it lowercase to improve readability.
47047      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47048      # Now convert it back to Unix-stile (cygpath)
47049      input_path=`$CYGPATH -u "$shortmode_path"`
47050      new_path="$input_path"
47051    fi
47052  fi
47053
47054  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47055  if test "x$test_cygdrive_prefix" = x; then
47056    # As a simple fix, exclude /usr/bin since it's not a real path.
47057    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47058      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47059      # a path prefixed by /cygdrive for fixpath to work.
47060      new_path="$CYGWIN_ROOT_PATH$input_path"
47061    fi
47062  fi
47063
47064
47065  if test "x$path" != "x$new_path"; then
47066    FREETYPE_LIB_PATH="$new_path"
47067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47068$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47069  fi
47070
47071  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47072
47073  path="$FREETYPE_LIB_PATH"
47074  has_colon=`$ECHO $path | $GREP ^.:`
47075  new_path="$path"
47076  if test "x$has_colon" = x; then
47077    # Not in mixed or Windows style, start by that.
47078    new_path=`cmd //c echo $path`
47079  fi
47080
47081
47082  input_path="$new_path"
47083  # Check if we need to convert this using DOS-style short mode. If the path
47084  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47085  # take no chances and rewrite it.
47086  # Note: m4 eats our [], so we need to use [ and ] instead.
47087  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47088  if test "x$has_forbidden_chars" != x; then
47089    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47090    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47091  fi
47092
47093
47094  windows_path="$new_path"
47095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47096    unix_path=`$CYGPATH -u "$windows_path"`
47097    new_path="$unix_path"
47098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47100    new_path="$unix_path"
47101  fi
47102
47103  if test "x$path" != "x$new_path"; then
47104    FREETYPE_LIB_PATH="$new_path"
47105    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47106$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47107  fi
47108
47109  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47110  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47111
47112  else
47113    # We're on a posix platform. Hooray! :)
47114    path="$FREETYPE_LIB_PATH"
47115    has_space=`$ECHO "$path" | $GREP " "`
47116    if test "x$has_space" != x; then
47117      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47118$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47119      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47120    fi
47121
47122    # Use eval to expand a potential ~
47123    eval path="$path"
47124    if test ! -f "$path" && test ! -d "$path"; then
47125      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47126    fi
47127
47128    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47129  fi
47130
47131      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47132        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47133      else
47134        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47135      fi
47136    fi
47137
47138    # Try to compile it
47139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47140$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47141    ac_ext=cpp
47142ac_cpp='$CXXCPP $CPPFLAGS'
47143ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47144ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47145ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47146
47147    PREV_CXXCFLAGS="$CXXFLAGS"
47148    PREV_LIBS="$LIBS"
47149    PREV_CXX="$CXX"
47150    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47151    LIBS="$LIBS $FREETYPE_LIBS"
47152    CXX="$FIXPATH $CXX"
47153    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47154/* end confdefs.h.  */
47155
47156          #include<ft2build.h>
47157          #include FT_FREETYPE_H
47158          int main () {
47159            FT_Init_FreeType(NULL);
47160            return 0;
47161          }
47162
47163_ACEOF
47164if ac_fn_cxx_try_link "$LINENO"; then :
47165
47166          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47167$as_echo "yes" >&6; }
47168
47169else
47170
47171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47172$as_echo "no" >&6; }
47173          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47174$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47175          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47176$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47177
47178
47179  # Print a helpful message on how to acquire the necessary build dependency.
47180  # freetype is the help tag: freetype, cups, pulse, alsa etc
47181  MISSING_DEPENDENCY=freetype
47182
47183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47184    cygwin_help $MISSING_DEPENDENCY
47185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47186    msys_help $MISSING_DEPENDENCY
47187  else
47188    PKGHANDLER_COMMAND=
47189
47190    case $PKGHANDLER in
47191      apt-get)
47192        apt_help     $MISSING_DEPENDENCY ;;
47193      yum)
47194        yum_help     $MISSING_DEPENDENCY ;;
47195      port)
47196        port_help    $MISSING_DEPENDENCY ;;
47197      pkgutil)
47198        pkgutil_help $MISSING_DEPENDENCY ;;
47199      pkgadd)
47200        pkgadd_help  $MISSING_DEPENDENCY ;;
47201    esac
47202
47203    if test "x$PKGHANDLER_COMMAND" != x; then
47204      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47205    fi
47206  fi
47207
47208
47209          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47210
47211
47212fi
47213rm -f core conftest.err conftest.$ac_objext \
47214    conftest$ac_exeext conftest.$ac_ext
47215    CXXCFLAGS="$PREV_CXXFLAGS"
47216    LIBS="$PREV_LIBS"
47217    CXX="$PREV_CXX"
47218    ac_ext=cpp
47219ac_cpp='$CXXCPP $CPPFLAGS'
47220ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47221ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47222ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47223
47224
47225    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47226$as_echo_n "checking if we should bundle freetype... " >&6; }
47227    if test "x$BUNDLE_FREETYPE" = xyes; then
47228      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47229    fi
47230    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47231$as_echo "$BUNDLE_FREETYPE" >&6; }
47232
47233  fi # end freetype needed
47234
47235
47236
47237
47238
47239
47240
47241  ###############################################################################
47242  #
47243  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47244  #
47245
47246# Check whether --with-alsa was given.
47247if test "${with_alsa+set}" = set; then :
47248  withval=$with_alsa;
47249fi
47250
47251
47252# Check whether --with-alsa-include was given.
47253if test "${with_alsa_include+set}" = set; then :
47254  withval=$with_alsa_include;
47255fi
47256
47257
47258# Check whether --with-alsa-lib was given.
47259if test "${with_alsa_lib+set}" = set; then :
47260  withval=$with_alsa_lib;
47261fi
47262
47263
47264  if test "x$ALSA_NOT_NEEDED" = xyes; then
47265    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47266      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47267$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47268    fi
47269    ALSA_CFLAGS=
47270    ALSA_LIBS=
47271  else
47272    ALSA_FOUND=no
47273
47274    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47275      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47276    fi
47277
47278    if test "x${with_alsa}" != x; then
47279      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47280      ALSA_CFLAGS="-I${with_alsa}/include"
47281      ALSA_FOUND=yes
47282    fi
47283    if test "x${with_alsa_include}" != x; then
47284      ALSA_CFLAGS="-I${with_alsa_include}"
47285      ALSA_FOUND=yes
47286    fi
47287    if test "x${with_alsa_lib}" != x; then
47288      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47289      ALSA_FOUND=yes
47290    fi
47291    if test "x$ALSA_FOUND" = xno; then
47292
47293
47294  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47295    # Source the builddeps file again, to make sure it uses the latest variables!
47296    . $builddepsfile
47297    # Look for a target and build machine specific resource!
47298    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47299    if test "x$resource" = x; then
47300      # Ok, lets instead look for a target specific resource
47301      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47302    fi
47303    if test "x$resource" = x; then
47304      # Ok, lets instead look for a build specific resource
47305      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47306    fi
47307    if test "x$resource" = x; then
47308      # Ok, lets instead look for a generic resource
47309      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47310      resource=${builddep_alsa}
47311    fi
47312    if test "x$resource" != x; then
47313      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47314$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47315      # If the resource in the builddeps.conf file is an existing directory,
47316      # for example /java/linux/cups
47317      if test -d ${resource}; then
47318        depdir=${resource}
47319      else
47320
47321  # alsa is for example mymodule
47322  # $resource is for example libs/general/libmymod_1_2_3.zip
47323  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47324  # $with_builddeps_dir is for example /localhome/builddeps
47325  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47326  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47327  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47328  filename=`basename $resource`
47329  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47330  filebase=${filename%%.*}
47331  extension=${filename#*.}
47332  installdir=$with_builddeps_dir/$filebase
47333  if test ! -f $installdir/$filename.unpacked; then
47334    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47335$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47336    if test ! -d $installdir; then
47337      mkdir -p $installdir
47338    fi
47339    if test ! -d $installdir; then
47340      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47341    fi
47342    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47343    touch $tmpfile
47344    if test ! -f $tmpfile; then
47345      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47346    fi
47347
47348  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47349  # $tmpfile is the local file name for the downloaded file.
47350  VALID_TOOL=no
47351  if test "x$BDEPS_FTP" = xwget; then
47352    VALID_TOOL=yes
47353    wget -O $tmpfile $with_builddeps_server/$resource
47354  fi
47355  if test "x$BDEPS_FTP" = xlftp; then
47356    VALID_TOOL=yes
47357    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47358  fi
47359  if test "x$BDEPS_FTP" = xftp; then
47360    VALID_TOOL=yes
47361    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47362    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47363    FTPUSERPWD=${FTPSERVER%%@*}
47364    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47365      FTPUSER=${userpwd%%:*}
47366      FTPPWD=${userpwd#*@}
47367      FTPSERVER=${FTPSERVER#*@}
47368    else
47369      FTPUSER=ftp
47370      FTPPWD=ftp
47371    fi
47372    # the "pass" command does not work on some
47373    # ftp clients (read ftp.exe) but if it works,
47374    # passive mode is better!
47375    ( \
47376        echo "user $FTPUSER $FTPPWD"        ; \
47377        echo "pass"                         ; \
47378        echo "bin"                          ; \
47379        echo "get $FTPPATH $tmpfile"              ; \
47380    ) | ftp -in $FTPSERVER
47381  fi
47382  if test "x$VALID_TOOL" != xyes; then
47383    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47384  fi
47385
47386    mv $tmpfile $installdir/$filename
47387    if test ! -s $installdir/$filename; then
47388      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47389    fi
47390    case "$extension" in
47391      zip)  echo "Unzipping $installdir/$filename..."
47392        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47393        ;;
47394      tar.gz) echo "Untaring $installdir/$filename..."
47395        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47396        ;;
47397      tgz) echo "Untaring $installdir/$filename..."
47398        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47399        ;;
47400      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47401        ;;
47402    esac
47403  fi
47404  if test -f $installdir/$filename.unpacked; then
47405    depdir=$installdir
47406  fi
47407
47408      fi
47409      # Source the builddeps file again, because in the previous command, the depdir
47410      # was updated to point at the current build dependency install directory.
47411      . $builddepsfile
47412      # Now extract variables from the builddeps.conf files.
47413      theroot=${builddep_alsa_ROOT}
47414      thecflags=${builddep_alsa_CFLAGS}
47415      thelibs=${builddep_alsa_LIBS}
47416      if test "x$depdir" = x; then
47417        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47418      fi
47419      ALSA=$depdir
47420      if test "x$theroot" != x; then
47421        ALSA="$theroot"
47422      fi
47423      if test "x$thecflags" != x; then
47424        ALSA_CFLAGS="$thecflags"
47425      fi
47426      if test "x$thelibs" != x; then
47427        ALSA_LIBS="$thelibs"
47428      fi
47429      ALSA_FOUND=yes
47430      else ALSA_FOUND=no
47431
47432    fi
47433    else ALSA_FOUND=no
47434
47435  fi
47436
47437    fi
47438    # Do not try pkg-config if we have a sysroot set.
47439    if test "x$SYSROOT" = x; then
47440      if test "x$ALSA_FOUND" = xno; then
47441
47442pkg_failed=no
47443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47444$as_echo_n "checking for ALSA... " >&6; }
47445
47446if test -n "$ALSA_CFLAGS"; then
47447    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47448 elif test -n "$PKG_CONFIG"; then
47449    if test -n "$PKG_CONFIG" && \
47450    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47451  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47452  ac_status=$?
47453  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47454  test $ac_status = 0; }; then
47455  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47456else
47457  pkg_failed=yes
47458fi
47459 else
47460    pkg_failed=untried
47461fi
47462if test -n "$ALSA_LIBS"; then
47463    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47464 elif test -n "$PKG_CONFIG"; then
47465    if test -n "$PKG_CONFIG" && \
47466    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47467  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47468  ac_status=$?
47469  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47470  test $ac_status = 0; }; then
47471  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47472else
47473  pkg_failed=yes
47474fi
47475 else
47476    pkg_failed=untried
47477fi
47478
47479
47480
47481if test $pkg_failed = yes; then
47482
47483if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47484        _pkg_short_errors_supported=yes
47485else
47486        _pkg_short_errors_supported=no
47487fi
47488        if test $_pkg_short_errors_supported = yes; then
47489	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47490        else
47491	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47492        fi
47493	# Put the nasty error message in config.log where it belongs
47494	echo "$ALSA_PKG_ERRORS" >&5
47495
47496	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47497$as_echo "no" >&6; }
47498                ALSA_FOUND=no
47499elif test $pkg_failed = untried; then
47500	ALSA_FOUND=no
47501else
47502	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47503	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47505$as_echo "yes" >&6; }
47506	ALSA_FOUND=yes
47507fi
47508      fi
47509    fi
47510    if test "x$ALSA_FOUND" = xno; then
47511      for ac_header in alsa/asoundlib.h
47512do :
47513  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47514if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47515  cat >>confdefs.h <<_ACEOF
47516#define HAVE_ALSA_ASOUNDLIB_H 1
47517_ACEOF
47518
47519            ALSA_FOUND=yes
47520            ALSA_CFLAGS=-Iignoreme
47521            ALSA_LIBS=-lasound
47522            DEFAULT_ALSA=yes
47523
47524else
47525  ALSA_FOUND=no
47526fi
47527
47528done
47529
47530    fi
47531    if test "x$ALSA_FOUND" = xno; then
47532
47533  # Print a helpful message on how to acquire the necessary build dependency.
47534  # alsa is the help tag: freetype, cups, pulse, alsa etc
47535  MISSING_DEPENDENCY=alsa
47536
47537  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47538    cygwin_help $MISSING_DEPENDENCY
47539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47540    msys_help $MISSING_DEPENDENCY
47541  else
47542    PKGHANDLER_COMMAND=
47543
47544    case $PKGHANDLER in
47545      apt-get)
47546        apt_help     $MISSING_DEPENDENCY ;;
47547      yum)
47548        yum_help     $MISSING_DEPENDENCY ;;
47549      port)
47550        port_help    $MISSING_DEPENDENCY ;;
47551      pkgutil)
47552        pkgutil_help $MISSING_DEPENDENCY ;;
47553      pkgadd)
47554        pkgadd_help  $MISSING_DEPENDENCY ;;
47555    esac
47556
47557    if test "x$PKGHANDLER_COMMAND" != x; then
47558      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47559    fi
47560  fi
47561
47562      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47563    fi
47564  fi
47565
47566
47567
47568
47569
47570
47571  ###############################################################################
47572  #
47573  # Check for the jpeg library
47574  #
47575
47576  USE_EXTERNAL_LIBJPEG=true
47577  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -ljpeg" >&5
47578$as_echo_n "checking for main in -ljpeg... " >&6; }
47579if ${ac_cv_lib_jpeg_main+:} false; then :
47580  $as_echo_n "(cached) " >&6
47581else
47582  ac_check_lib_save_LIBS=$LIBS
47583LIBS="-ljpeg  $LIBS"
47584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47585/* end confdefs.h.  */
47586
47587
47588int
47589main ()
47590{
47591return main ();
47592  ;
47593  return 0;
47594}
47595_ACEOF
47596if ac_fn_cxx_try_link "$LINENO"; then :
47597  ac_cv_lib_jpeg_main=yes
47598else
47599  ac_cv_lib_jpeg_main=no
47600fi
47601rm -f core conftest.err conftest.$ac_objext \
47602    conftest$ac_exeext conftest.$ac_ext
47603LIBS=$ac_check_lib_save_LIBS
47604fi
47605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_main" >&5
47606$as_echo "$ac_cv_lib_jpeg_main" >&6; }
47607if test "x$ac_cv_lib_jpeg_main" = xyes; then :
47608  cat >>confdefs.h <<_ACEOF
47609#define HAVE_LIBJPEG 1
47610_ACEOF
47611
47612  LIBS="-ljpeg $LIBS"
47613
47614else
47615   USE_EXTERNAL_LIBJPEG=false
47616      { $as_echo "$as_me:${as_lineno-$LINENO}: Will use jpeg decoder bundled with the OpenJDK source" >&5
47617$as_echo "$as_me: Will use jpeg decoder bundled with the OpenJDK source" >&6;}
47618
47619fi
47620
47621
47622
47623  ###############################################################################
47624  #
47625  # Check for the gif library
47626  #
47627
47628
47629# Check whether --with-giflib was given.
47630if test "${with_giflib+set}" = set; then :
47631  withval=$with_giflib;
47632fi
47633
47634
47635
47636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47637$as_echo_n "checking for which giflib to use... " >&6; }
47638
47639  # default is bundled
47640  DEFAULT_GIFLIB=bundled
47641
47642  #
47643  # if user didn't specify, use DEFAULT_GIFLIB
47644  #
47645  if test "x${with_giflib}" = "x"; then
47646    with_giflib=${DEFAULT_GIFLIB}
47647  fi
47648
47649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47650$as_echo "${with_giflib}" >&6; }
47651
47652  if test "x${with_giflib}" = "xbundled"; then
47653    USE_EXTERNAL_LIBGIF=false
47654  elif test "x${with_giflib}" = "xsystem"; then
47655    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47656if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47657
47658else
47659   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47660fi
47661
47662
47663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47664$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47665if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47666  $as_echo_n "(cached) " >&6
47667else
47668  ac_check_lib_save_LIBS=$LIBS
47669LIBS="-lgif  $LIBS"
47670cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47671/* end confdefs.h.  */
47672
47673/* Override any GCC internal prototype to avoid an error.
47674   Use char because int might match the return type of a GCC
47675   builtin and then its argument prototype would still apply.  */
47676#ifdef __cplusplus
47677extern "C"
47678#endif
47679char DGifGetCode ();
47680int
47681main ()
47682{
47683return DGifGetCode ();
47684  ;
47685  return 0;
47686}
47687_ACEOF
47688if ac_fn_cxx_try_link "$LINENO"; then :
47689  ac_cv_lib_gif_DGifGetCode=yes
47690else
47691  ac_cv_lib_gif_DGifGetCode=no
47692fi
47693rm -f core conftest.err conftest.$ac_objext \
47694    conftest$ac_exeext conftest.$ac_ext
47695LIBS=$ac_check_lib_save_LIBS
47696fi
47697{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47698$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47699if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47700  cat >>confdefs.h <<_ACEOF
47701#define HAVE_LIBGIF 1
47702_ACEOF
47703
47704  LIBS="-lgif $LIBS"
47705
47706else
47707   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47708fi
47709
47710
47711    USE_EXTERNAL_LIBGIF=true
47712  else
47713    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47714  fi
47715
47716
47717  ###############################################################################
47718  #
47719  # Check for the lcms2 library
47720  #
47721
47722
47723# Check whether --with-lcms was given.
47724if test "${with_lcms+set}" = set; then :
47725  withval=$with_lcms;
47726fi
47727
47728
47729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47730$as_echo_n "checking for which lcms to use... " >&6; }
47731
47732  DEFAULT_LCMS=bundled
47733
47734  #
47735  # If user didn't specify, use DEFAULT_LCMS
47736  #
47737  if test "x${with_lcms}" = "x"; then
47738      with_lcms=${DEFAULT_LCMS}
47739  fi
47740
47741  if test "x${with_lcms}" = "xbundled"; then
47742    USE_EXTERNAL_LCMS=false
47743    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47744$as_echo "bundled" >&6; }
47745  elif test "x${with_lcms}" = "xsystem"; then
47746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47747$as_echo "system" >&6; }
47748
47749pkg_failed=no
47750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47751$as_echo_n "checking for LCMS... " >&6; }
47752
47753if test -n "$LCMS_CFLAGS"; then
47754    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47755 elif test -n "$PKG_CONFIG"; then
47756    if test -n "$PKG_CONFIG" && \
47757    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47758  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47759  ac_status=$?
47760  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47761  test $ac_status = 0; }; then
47762  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47763else
47764  pkg_failed=yes
47765fi
47766 else
47767    pkg_failed=untried
47768fi
47769if test -n "$LCMS_LIBS"; then
47770    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47771 elif test -n "$PKG_CONFIG"; then
47772    if test -n "$PKG_CONFIG" && \
47773    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47774  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47775  ac_status=$?
47776  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47777  test $ac_status = 0; }; then
47778  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47779else
47780  pkg_failed=yes
47781fi
47782 else
47783    pkg_failed=untried
47784fi
47785
47786
47787
47788if test $pkg_failed = yes; then
47789
47790if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47791        _pkg_short_errors_supported=yes
47792else
47793        _pkg_short_errors_supported=no
47794fi
47795        if test $_pkg_short_errors_supported = yes; then
47796	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47797        else
47798	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47799        fi
47800	# Put the nasty error message in config.log where it belongs
47801	echo "$LCMS_PKG_ERRORS" >&5
47802
47803	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47804$as_echo "no" >&6; }
47805                LCMS_FOUND=no
47806elif test $pkg_failed = untried; then
47807	LCMS_FOUND=no
47808else
47809	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47810	LCMS_LIBS=$pkg_cv_LCMS_LIBS
47811        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47812$as_echo "yes" >&6; }
47813	LCMS_FOUND=yes
47814fi
47815    if test "x${LCMS_FOUND}" = "xyes"; then
47816      USE_EXTERNAL_LCMS=true
47817    else
47818      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
47819    fi
47820  else
47821    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
47822  fi
47823
47824
47825
47826  ###############################################################################
47827  #
47828  # Check for the png library
47829  #
47830
47831
47832# Check whether --with-libpng was given.
47833if test "${with_libpng+set}" = set; then :
47834  withval=$with_libpng;
47835fi
47836
47837
47838
47839  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47840$as_echo_n "checking for which libpng to use... " >&6; }
47841
47842  # default is bundled
47843  DEFAULT_LIBPNG=bundled
47844
47845  #
47846  # if user didn't specify, use DEFAULT_LIBPNG
47847  #
47848  if test "x${with_libpng}" = "x"; then
47849      with_libpng=${DEFAULT_LIBPNG}
47850  fi
47851
47852  if test "x${with_libpng}" = "xbundled"; then
47853      USE_EXTERNAL_LIBPNG=false
47854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47855$as_echo "bundled" >&6; }
47856  elif test "x${with_libpng}" = "xsystem"; then
47857
47858pkg_failed=no
47859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
47860$as_echo_n "checking for PNG... " >&6; }
47861
47862if test -n "$PNG_CFLAGS"; then
47863    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
47864 elif test -n "$PKG_CONFIG"; then
47865    if test -n "$PKG_CONFIG" && \
47866    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47867  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47868  ac_status=$?
47869  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47870  test $ac_status = 0; }; then
47871  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
47872else
47873  pkg_failed=yes
47874fi
47875 else
47876    pkg_failed=untried
47877fi
47878if test -n "$PNG_LIBS"; then
47879    pkg_cv_PNG_LIBS="$PNG_LIBS"
47880 elif test -n "$PKG_CONFIG"; then
47881    if test -n "$PKG_CONFIG" && \
47882    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
47883  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
47884  ac_status=$?
47885  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47886  test $ac_status = 0; }; then
47887  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
47888else
47889  pkg_failed=yes
47890fi
47891 else
47892    pkg_failed=untried
47893fi
47894
47895
47896
47897if test $pkg_failed = yes; then
47898
47899if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47900        _pkg_short_errors_supported=yes
47901else
47902        _pkg_short_errors_supported=no
47903fi
47904        if test $_pkg_short_errors_supported = yes; then
47905	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
47906        else
47907	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
47908        fi
47909	# Put the nasty error message in config.log where it belongs
47910	echo "$PNG_PKG_ERRORS" >&5
47911
47912	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47913$as_echo "no" >&6; }
47914                 LIBPNG_FOUND=no
47915elif test $pkg_failed = untried; then
47916	 LIBPNG_FOUND=no
47917else
47918	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
47919	PNG_LIBS=$pkg_cv_PNG_LIBS
47920        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47921$as_echo "yes" >&6; }
47922	 LIBPNG_FOUND=yes
47923fi
47924      if test "x${LIBPNG_FOUND}" = "xyes"; then
47925          USE_EXTERNAL_LIBPNG=true
47926          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47927$as_echo "system" >&6; }
47928      else
47929          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
47930$as_echo "system not found" >&6; }
47931          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
47932      fi
47933  else
47934      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
47935  fi
47936
47937
47938  ###############################################################################
47939  #
47940  # Check for the zlib library
47941  #
47942
47943
47944# Check whether --with-zlib was given.
47945if test "${with_zlib+set}" = set; then :
47946  withval=$with_zlib;
47947fi
47948
47949
47950  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
47951$as_echo_n "checking for compress in -lz... " >&6; }
47952if ${ac_cv_lib_z_compress+:} false; then :
47953  $as_echo_n "(cached) " >&6
47954else
47955  ac_check_lib_save_LIBS=$LIBS
47956LIBS="-lz  $LIBS"
47957cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47958/* end confdefs.h.  */
47959
47960/* Override any GCC internal prototype to avoid an error.
47961   Use char because int might match the return type of a GCC
47962   builtin and then its argument prototype would still apply.  */
47963#ifdef __cplusplus
47964extern "C"
47965#endif
47966char compress ();
47967int
47968main ()
47969{
47970return compress ();
47971  ;
47972  return 0;
47973}
47974_ACEOF
47975if ac_fn_cxx_try_link "$LINENO"; then :
47976  ac_cv_lib_z_compress=yes
47977else
47978  ac_cv_lib_z_compress=no
47979fi
47980rm -f core conftest.err conftest.$ac_objext \
47981    conftest$ac_exeext conftest.$ac_ext
47982LIBS=$ac_check_lib_save_LIBS
47983fi
47984{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
47985$as_echo "$ac_cv_lib_z_compress" >&6; }
47986if test "x$ac_cv_lib_z_compress" = xyes; then :
47987   ZLIB_FOUND=yes
47988else
47989   ZLIB_FOUND=no
47990fi
47991
47992
47993  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
47994$as_echo_n "checking for which zlib to use... " >&6; }
47995
47996  DEFAULT_ZLIB=bundled
47997  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47998    #
47999    # On macosx default is system...on others default is
48000    #
48001    DEFAULT_ZLIB=system
48002  fi
48003
48004  if test "x${ZLIB_FOUND}" != "xyes"; then
48005    #
48006    # If we don't find any system...set default to bundled
48007    #
48008    DEFAULT_ZLIB=bundled
48009  fi
48010
48011  #
48012  # If user didn't specify, use DEFAULT_ZLIB
48013  #
48014  if test "x${with_zlib}" = "x"; then
48015    with_zlib=${DEFAULT_ZLIB}
48016  fi
48017
48018  if test "x${with_zlib}" = "xbundled"; then
48019    USE_EXTERNAL_LIBZ=false
48020    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48021$as_echo "bundled" >&6; }
48022  elif test "x${with_zlib}" = "xsystem"; then
48023    if test "x${ZLIB_FOUND}" = "xyes"; then
48024      USE_EXTERNAL_LIBZ=true
48025      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48026$as_echo "system" >&6; }
48027    else
48028      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48029$as_echo "system not found" >&6; }
48030      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48031    fi
48032  else
48033    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48034  fi
48035
48036
48037
48038  ###############################################################################
48039  LIBZIP_CAN_USE_MMAP=true
48040
48041
48042
48043  ###############################################################################
48044  #
48045  # Check if altzone exists in time.h
48046  #
48047
48048  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48049/* end confdefs.h.  */
48050#include <time.h>
48051int
48052main ()
48053{
48054return (int)altzone;
48055  ;
48056  return 0;
48057}
48058_ACEOF
48059if ac_fn_cxx_try_link "$LINENO"; then :
48060  has_altzone=yes
48061else
48062  has_altzone=no
48063fi
48064rm -f core conftest.err conftest.$ac_objext \
48065    conftest$ac_exeext conftest.$ac_ext
48066  if test "x$has_altzone" = xyes; then
48067
48068$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48069
48070  fi
48071
48072  ###############################################################################
48073  #
48074  # Check the maths library
48075  #
48076
48077  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48078$as_echo_n "checking for cos in -lm... " >&6; }
48079if ${ac_cv_lib_m_cos+:} false; then :
48080  $as_echo_n "(cached) " >&6
48081else
48082  ac_check_lib_save_LIBS=$LIBS
48083LIBS="-lm  $LIBS"
48084cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48085/* end confdefs.h.  */
48086
48087/* Override any GCC internal prototype to avoid an error.
48088   Use char because int might match the return type of a GCC
48089   builtin and then its argument prototype would still apply.  */
48090#ifdef __cplusplus
48091extern "C"
48092#endif
48093char cos ();
48094int
48095main ()
48096{
48097return cos ();
48098  ;
48099  return 0;
48100}
48101_ACEOF
48102if ac_fn_cxx_try_link "$LINENO"; then :
48103  ac_cv_lib_m_cos=yes
48104else
48105  ac_cv_lib_m_cos=no
48106fi
48107rm -f core conftest.err conftest.$ac_objext \
48108    conftest$ac_exeext conftest.$ac_ext
48109LIBS=$ac_check_lib_save_LIBS
48110fi
48111{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48112$as_echo "$ac_cv_lib_m_cos" >&6; }
48113if test "x$ac_cv_lib_m_cos" = xyes; then :
48114  cat >>confdefs.h <<_ACEOF
48115#define HAVE_LIBM 1
48116_ACEOF
48117
48118  LIBS="-lm $LIBS"
48119
48120else
48121
48122        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48123$as_echo "$as_me: Maths library was not found" >&6;}
48124
48125
48126fi
48127
48128
48129
48130  ###############################################################################
48131  #
48132  # Check for libdl.so
48133
48134  save_LIBS="$LIBS"
48135  LIBS=""
48136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48137$as_echo_n "checking for dlopen in -ldl... " >&6; }
48138if ${ac_cv_lib_dl_dlopen+:} false; then :
48139  $as_echo_n "(cached) " >&6
48140else
48141  ac_check_lib_save_LIBS=$LIBS
48142LIBS="-ldl  $LIBS"
48143cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48144/* end confdefs.h.  */
48145
48146/* Override any GCC internal prototype to avoid an error.
48147   Use char because int might match the return type of a GCC
48148   builtin and then its argument prototype would still apply.  */
48149#ifdef __cplusplus
48150extern "C"
48151#endif
48152char dlopen ();
48153int
48154main ()
48155{
48156return dlopen ();
48157  ;
48158  return 0;
48159}
48160_ACEOF
48161if ac_fn_cxx_try_link "$LINENO"; then :
48162  ac_cv_lib_dl_dlopen=yes
48163else
48164  ac_cv_lib_dl_dlopen=no
48165fi
48166rm -f core conftest.err conftest.$ac_objext \
48167    conftest$ac_exeext conftest.$ac_ext
48168LIBS=$ac_check_lib_save_LIBS
48169fi
48170{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48171$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48172if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48173  cat >>confdefs.h <<_ACEOF
48174#define HAVE_LIBDL 1
48175_ACEOF
48176
48177  LIBS="-ldl $LIBS"
48178
48179fi
48180
48181  LIBDL="$LIBS"
48182
48183  LIBS="$save_LIBS"
48184
48185
48186  ###############################################################################
48187  #
48188  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48189  # dynamic build is configured on command line.
48190  #
48191
48192# Check whether --with-stdc++lib was given.
48193if test "${with_stdc__lib+set}" = set; then :
48194  withval=$with_stdc__lib;
48195        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48196                && test "x$with_stdc__lib" != xdefault; then
48197          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48198        fi
48199
48200else
48201  with_stdc__lib=default
48202
48203fi
48204
48205
48206  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48207    # Test if -lstdc++ works.
48208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48209$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48210    ac_ext=cpp
48211ac_cpp='$CXXCPP $CPPFLAGS'
48212ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48213ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48214ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48215
48216    OLD_CXXFLAGS="$CXXFLAGS"
48217    CXXFLAGS="$CXXFLAGS -lstdc++"
48218    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48219/* end confdefs.h.  */
48220
48221int
48222main ()
48223{
48224return 0;
48225  ;
48226  return 0;
48227}
48228_ACEOF
48229if ac_fn_cxx_try_link "$LINENO"; then :
48230  has_dynamic_libstdcxx=yes
48231else
48232  has_dynamic_libstdcxx=no
48233fi
48234rm -f core conftest.err conftest.$ac_objext \
48235    conftest$ac_exeext conftest.$ac_ext
48236    CXXFLAGS="$OLD_CXXFLAGS"
48237    ac_ext=cpp
48238ac_cpp='$CXXCPP $CPPFLAGS'
48239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48242
48243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48244$as_echo "$has_dynamic_libstdcxx" >&6; }
48245
48246    # Test if stdc++ can be linked statically.
48247    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48248$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48249    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48250    ac_ext=cpp
48251ac_cpp='$CXXCPP $CPPFLAGS'
48252ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48253ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48254ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48255
48256    OLD_LIBS="$LIBS"
48257    OLD_CXX="$CXX"
48258    LIBS="$STATIC_STDCXX_FLAGS"
48259    CXX="$CC"
48260    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48261/* end confdefs.h.  */
48262
48263int
48264main ()
48265{
48266return 0;
48267  ;
48268  return 0;
48269}
48270_ACEOF
48271if ac_fn_cxx_try_link "$LINENO"; then :
48272  has_static_libstdcxx=yes
48273else
48274  has_static_libstdcxx=no
48275fi
48276rm -f core conftest.err conftest.$ac_objext \
48277    conftest$ac_exeext conftest.$ac_ext
48278    LIBS="$OLD_LIBS"
48279    CXX="$OLD_CXX"
48280    ac_ext=cpp
48281ac_cpp='$CXXCPP $CPPFLAGS'
48282ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48283ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48284ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48285
48286    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48287$as_echo "$has_static_libstdcxx" >&6; }
48288
48289    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48290      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48291    fi
48292
48293    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48294      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48295    fi
48296
48297    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48298      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48299    fi
48300
48301    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48302$as_echo_n "checking how to link with libstdc++... " >&6; }
48303    # If dynamic was requested, it's available since it would fail above otherwise.
48304    # If dynamic wasn't requested, go with static unless it isn't available.
48305    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48306      LIBCXX="$LIBCXX -lstdc++"
48307      LDCXX="$CXX"
48308      STATIC_CXX_SETTING="STATIC_CXX=false"
48309      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48310$as_echo "dynamic" >&6; }
48311    else
48312      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48313      LDCXX="$CC"
48314      STATIC_CXX_SETTING="STATIC_CXX=true"
48315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48316$as_echo "static" >&6; }
48317    fi
48318  fi
48319
48320
48321  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48322    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48323
48324pkg_failed=no
48325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48326$as_echo_n "checking for LIBFFI... " >&6; }
48327
48328if test -n "$LIBFFI_CFLAGS"; then
48329    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48330 elif test -n "$PKG_CONFIG"; then
48331    if test -n "$PKG_CONFIG" && \
48332    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48333  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48334  ac_status=$?
48335  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48336  test $ac_status = 0; }; then
48337  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48338else
48339  pkg_failed=yes
48340fi
48341 else
48342    pkg_failed=untried
48343fi
48344if test -n "$LIBFFI_LIBS"; then
48345    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48346 elif test -n "$PKG_CONFIG"; then
48347    if test -n "$PKG_CONFIG" && \
48348    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48349  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48350  ac_status=$?
48351  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48352  test $ac_status = 0; }; then
48353  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48354else
48355  pkg_failed=yes
48356fi
48357 else
48358    pkg_failed=untried
48359fi
48360
48361
48362
48363if test $pkg_failed = yes; then
48364
48365if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48366        _pkg_short_errors_supported=yes
48367else
48368        _pkg_short_errors_supported=no
48369fi
48370        if test $_pkg_short_errors_supported = yes; then
48371	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48372        else
48373	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48374        fi
48375	# Put the nasty error message in config.log where it belongs
48376	echo "$LIBFFI_PKG_ERRORS" >&5
48377
48378	as_fn_error $? "Package requirements (libffi) were not met:
48379
48380$LIBFFI_PKG_ERRORS
48381
48382Consider adjusting the PKG_CONFIG_PATH environment variable if you
48383installed software in a non-standard prefix.
48384
48385Alternatively, you may set the environment variables LIBFFI_CFLAGS
48386and LIBFFI_LIBS to avoid the need to call pkg-config.
48387See the pkg-config man page for more details.
48388" "$LINENO" 5
48389elif test $pkg_failed = untried; then
48390	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48391$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48392as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48393is in your PATH or set the PKG_CONFIG environment variable to the full
48394path to pkg-config.
48395
48396Alternatively, you may set the environment variables LIBFFI_CFLAGS
48397and LIBFFI_LIBS to avoid the need to call pkg-config.
48398See the pkg-config man page for more details.
48399
48400To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48401See \`config.log' for more details" "$LINENO" 5; }
48402else
48403	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48404	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48406$as_echo "yes" >&6; }
48407	:
48408fi
48409
48410  fi
48411
48412  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48413    # Extract the first word of "llvm-config", so it can be a program name with args.
48414set dummy llvm-config; ac_word=$2
48415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48416$as_echo_n "checking for $ac_word... " >&6; }
48417if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48418  $as_echo_n "(cached) " >&6
48419else
48420  if test -n "$LLVM_CONFIG"; then
48421  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48422else
48423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48424for as_dir in $PATH
48425do
48426  IFS=$as_save_IFS
48427  test -z "$as_dir" && as_dir=.
48428    for ac_exec_ext in '' $ac_executable_extensions; do
48429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48430    ac_cv_prog_LLVM_CONFIG="llvm-config"
48431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48432    break 2
48433  fi
48434done
48435  done
48436IFS=$as_save_IFS
48437
48438fi
48439fi
48440LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48441if test -n "$LLVM_CONFIG"; then
48442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48443$as_echo "$LLVM_CONFIG" >&6; }
48444else
48445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48446$as_echo "no" >&6; }
48447fi
48448
48449
48450
48451    if test "x$LLVM_CONFIG" != xllvm-config; then
48452      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48453    fi
48454
48455    llvm_components="jit mcjit engine nativecodegen native"
48456    unset LLVM_CFLAGS
48457    for flag in $("$LLVM_CONFIG" --cxxflags); do
48458      if echo "${flag}" | grep -q '^-[ID]'; then
48459        if test "${flag}" != "-D_DEBUG" ; then
48460          if test "${LLVM_CFLAGS}" != "" ; then
48461            LLVM_CFLAGS="${LLVM_CFLAGS} "
48462          fi
48463          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48464        fi
48465      fi
48466    done
48467    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48468    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48469
48470    unset LLVM_LDFLAGS
48471    for flag in $("${LLVM_CONFIG}" --ldflags); do
48472      if echo "${flag}" | grep -q '^-L'; then
48473        if test "${LLVM_LDFLAGS}" != ""; then
48474          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48475        fi
48476        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48477      fi
48478    done
48479
48480    unset LLVM_LIBS
48481    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48482      if echo "${flag}" | grep -q '^-l'; then
48483        if test "${LLVM_LIBS}" != ""; then
48484          LLVM_LIBS="${LLVM_LIBS} "
48485        fi
48486        LLVM_LIBS="${LLVM_LIBS}${flag}"
48487      fi
48488    done
48489
48490
48491
48492
48493  fi
48494
48495  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48496  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48497    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48498  fi
48499
48500  # TODO better (platform agnostic) test
48501  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48502    LIBCXX="-lstdc++"
48503  fi
48504
48505
48506
48507
48508  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48509
48510
48511# Check whether --with-msvcr-dll was given.
48512if test "${with_msvcr_dll+set}" = set; then :
48513  withval=$with_msvcr_dll;
48514fi
48515
48516
48517  if test "x$with_msvcr_dll" != x; then
48518    # If given explicitely by user, do not probe. If not present, fail directly.
48519
48520  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48521  METHOD="--with-msvcr-dll"
48522  if test -e "$POSSIBLE_MSVCR_DLL"; then
48523    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48524$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48525
48526    # Need to check if the found msvcr is correct architecture
48527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48528$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48529    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48530    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48531      CORRECT_MSVCR_ARCH=386
48532    else
48533      CORRECT_MSVCR_ARCH=x86-64
48534    fi
48535    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48536      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48537$as_echo "ok" >&6; }
48538      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48539      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48540$as_echo_n "checking for msvcr100.dll... " >&6; }
48541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48542$as_echo "$MSVCR_DLL" >&6; }
48543    else
48544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48545$as_echo "incorrect, ignoring" >&6; }
48546      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48547$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48548    fi
48549  fi
48550
48551    if test "x$MSVCR_DLL" = x; then
48552      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48553    fi
48554  fi
48555
48556  if test "x$MSVCR_DLL" = x; then
48557    # Probe: Using well-known location from Visual Studio 10.0
48558    if test "x$VCINSTALLDIR" != x; then
48559      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48560
48561  windows_path="$CYGWIN_VC_INSTALL_DIR"
48562  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48563    unix_path=`$CYGPATH -u "$windows_path"`
48564    CYGWIN_VC_INSTALL_DIR="$unix_path"
48565  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48566    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48567    CYGWIN_VC_INSTALL_DIR="$unix_path"
48568  fi
48569
48570      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48571        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48572      else
48573        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48574      fi
48575
48576  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48577  METHOD="well-known location in VCINSTALLDIR"
48578  if test -e "$POSSIBLE_MSVCR_DLL"; then
48579    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48580$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48581
48582    # Need to check if the found msvcr is correct architecture
48583    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48584$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48585    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48586    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48587      CORRECT_MSVCR_ARCH=386
48588    else
48589      CORRECT_MSVCR_ARCH=x86-64
48590    fi
48591    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48592      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48593$as_echo "ok" >&6; }
48594      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48595      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48596$as_echo_n "checking for msvcr100.dll... " >&6; }
48597      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48598$as_echo "$MSVCR_DLL" >&6; }
48599    else
48600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48601$as_echo "incorrect, ignoring" >&6; }
48602      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48603$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48604    fi
48605  fi
48606
48607    fi
48608  fi
48609
48610  if test "x$MSVCR_DLL" = x; then
48611    # Probe: Check in the Boot JDK directory.
48612    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48613
48614  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48615  METHOD="well-known location in Boot JDK"
48616  if test -e "$POSSIBLE_MSVCR_DLL"; then
48617    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48618$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48619
48620    # Need to check if the found msvcr is correct architecture
48621    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48622$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48623    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48624    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48625      CORRECT_MSVCR_ARCH=386
48626    else
48627      CORRECT_MSVCR_ARCH=x86-64
48628    fi
48629    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48630      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48631$as_echo "ok" >&6; }
48632      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48633      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48634$as_echo_n "checking for msvcr100.dll... " >&6; }
48635      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48636$as_echo "$MSVCR_DLL" >&6; }
48637    else
48638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48639$as_echo "incorrect, ignoring" >&6; }
48640      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48641$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48642    fi
48643  fi
48644
48645  fi
48646
48647  if test "x$MSVCR_DLL" = x; then
48648    # Probe: Look in the Windows system32 directory
48649    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48650
48651  windows_path="$CYGWIN_SYSTEMROOT"
48652  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48653    unix_path=`$CYGPATH -u "$windows_path"`
48654    CYGWIN_SYSTEMROOT="$unix_path"
48655  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48656    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48657    CYGWIN_SYSTEMROOT="$unix_path"
48658  fi
48659
48660    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48661
48662  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48663  METHOD="well-known location in SYSTEMROOT"
48664  if test -e "$POSSIBLE_MSVCR_DLL"; then
48665    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48666$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48667
48668    # Need to check if the found msvcr is correct architecture
48669    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48670$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48671    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48672    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48673      CORRECT_MSVCR_ARCH=386
48674    else
48675      CORRECT_MSVCR_ARCH=x86-64
48676    fi
48677    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48678      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48679$as_echo "ok" >&6; }
48680      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48682$as_echo_n "checking for msvcr100.dll... " >&6; }
48683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48684$as_echo "$MSVCR_DLL" >&6; }
48685    else
48686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48687$as_echo "incorrect, ignoring" >&6; }
48688      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48689$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48690    fi
48691  fi
48692
48693  fi
48694
48695  if test "x$MSVCR_DLL" = x; then
48696    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48697    if test "x$VS100COMNTOOLS" != x; then
48698      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48699
48700  windows_path="$CYGWIN_VS_TOOLS_DIR"
48701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48702    unix_path=`$CYGPATH -u "$windows_path"`
48703    CYGWIN_VS_TOOLS_DIR="$unix_path"
48704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48706    CYGWIN_VS_TOOLS_DIR="$unix_path"
48707  fi
48708
48709      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48710        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48711      else
48712        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48713      fi
48714
48715  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48716  METHOD="search of VS100COMNTOOLS"
48717  if test -e "$POSSIBLE_MSVCR_DLL"; then
48718    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48719$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48720
48721    # Need to check if the found msvcr is correct architecture
48722    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48723$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48724    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48725    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48726      CORRECT_MSVCR_ARCH=386
48727    else
48728      CORRECT_MSVCR_ARCH=x86-64
48729    fi
48730    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48731      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48732$as_echo "ok" >&6; }
48733      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48734      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48735$as_echo_n "checking for msvcr100.dll... " >&6; }
48736      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48737$as_echo "$MSVCR_DLL" >&6; }
48738    else
48739      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48740$as_echo "incorrect, ignoring" >&6; }
48741      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48742$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48743    fi
48744  fi
48745
48746    fi
48747  fi
48748
48749  if test "x$MSVCR_DLL" = x; then
48750    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48751    # (This was the original behaviour; kept since it might turn up something)
48752    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48753      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48754        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48755      else
48756        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48757        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48758          # We're grasping at straws now...
48759          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48760        fi
48761      fi
48762
48763
48764  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48765  METHOD="search of VCINSTALLDIR"
48766  if test -e "$POSSIBLE_MSVCR_DLL"; then
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48768$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48769
48770    # Need to check if the found msvcr is correct architecture
48771    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48772$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48773    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48774    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48775      CORRECT_MSVCR_ARCH=386
48776    else
48777      CORRECT_MSVCR_ARCH=x86-64
48778    fi
48779    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48780      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48781$as_echo "ok" >&6; }
48782      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48783      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48784$as_echo_n "checking for msvcr100.dll... " >&6; }
48785      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48786$as_echo "$MSVCR_DLL" >&6; }
48787    else
48788      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48789$as_echo "incorrect, ignoring" >&6; }
48790      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48791$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48792    fi
48793  fi
48794
48795    fi
48796  fi
48797
48798  if test "x$MSVCR_DLL" = x; then
48799    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48800$as_echo_n "checking for msvcr100.dll... " >&6; }
48801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48802$as_echo "no" >&6; }
48803    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48804  fi
48805
48806
48807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48808
48809  # Input might be given as Windows format, start by converting to
48810  # unix format.
48811  path="$MSVCR_DLL"
48812  new_path=`$CYGPATH -u "$path"`
48813
48814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48817  # "foo.exe" is OK but "foo" is an error.
48818  #
48819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48820  # It is also a way to make sure we got the proper file name for the real test later on.
48821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48822  if test "x$test_shortpath" = x; then
48823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48824$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48825    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48826  fi
48827
48828  # Call helper function which possibly converts this using DOS-style short mode.
48829  # If so, the updated path is stored in $new_path.
48830
48831  input_path="$new_path"
48832  # Check if we need to convert this using DOS-style short mode. If the path
48833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48834  # take no chances and rewrite it.
48835  # Note: m4 eats our [], so we need to use [ and ] instead.
48836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48837  if test "x$has_forbidden_chars" != x; then
48838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48842      # Going to short mode and back again did indeed matter. Since short mode is
48843      # case insensitive, let's make it lowercase to improve readability.
48844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48845      # Now convert it back to Unix-stile (cygpath)
48846      input_path=`$CYGPATH -u "$shortmode_path"`
48847      new_path="$input_path"
48848    fi
48849  fi
48850
48851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48852  if test "x$test_cygdrive_prefix" = x; then
48853    # As a simple fix, exclude /usr/bin since it's not a real path.
48854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48856      # a path prefixed by /cygdrive for fixpath to work.
48857      new_path="$CYGWIN_ROOT_PATH$input_path"
48858    fi
48859  fi
48860
48861
48862  if test "x$path" != "x$new_path"; then
48863    MSVCR_DLL="$new_path"
48864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48865$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48866  fi
48867
48868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48869
48870  path="$MSVCR_DLL"
48871  has_colon=`$ECHO $path | $GREP ^.:`
48872  new_path="$path"
48873  if test "x$has_colon" = x; then
48874    # Not in mixed or Windows style, start by that.
48875    new_path=`cmd //c echo $path`
48876  fi
48877
48878
48879  input_path="$new_path"
48880  # Check if we need to convert this using DOS-style short mode. If the path
48881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48882  # take no chances and rewrite it.
48883  # Note: m4 eats our [], so we need to use [ and ] instead.
48884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48885  if test "x$has_forbidden_chars" != x; then
48886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48888  fi
48889
48890
48891  windows_path="$new_path"
48892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48893    unix_path=`$CYGPATH -u "$windows_path"`
48894    new_path="$unix_path"
48895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48897    new_path="$unix_path"
48898  fi
48899
48900  if test "x$path" != "x$new_path"; then
48901    MSVCR_DLL="$new_path"
48902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
48903$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
48904  fi
48905
48906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48908
48909  else
48910    # We're on a posix platform. Hooray! :)
48911    path="$MSVCR_DLL"
48912    has_space=`$ECHO "$path" | $GREP " "`
48913    if test "x$has_space" != x; then
48914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48915$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48917    fi
48918
48919    # Use eval to expand a potential ~
48920    eval path="$path"
48921    if test ! -f "$path" && test ! -d "$path"; then
48922      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
48923    fi
48924
48925    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
48926  fi
48927
48928
48929
48930
48931# Check whether --with-dxsdk was given.
48932if test "${with_dxsdk+set}" = set; then :
48933  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
48934$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
48935fi
48936
48937
48938
48939
48940# Check whether --with-dxsdk-lib was given.
48941if test "${with_dxsdk_lib+set}" = set; then :
48942  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
48943$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
48944fi
48945
48946
48947
48948
48949# Check whether --with-dxsdk-include was given.
48950if test "${with_dxsdk_include+set}" = set; then :
48951  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
48952$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
48953fi
48954
48955
48956  fi
48957
48958
48959
48960###############################################################################
48961#
48962# We need to do some final tweaking, when everything else is done.
48963#
48964###############################################################################
48965
48966
48967  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
48968
48969
48970  # The name of the Service Agent jar.
48971  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
48972  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48973    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
48974  fi
48975
48976
48977
48978    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
48979$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
48980
48981    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
48982      ENABLE_INTREE_EC=yes
48983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48984$as_echo "yes" >&6; }
48985    else
48986      ENABLE_INTREE_EC=no
48987      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48988$as_echo "no" >&6; }
48989    fi
48990
48991
48992
48993
48994###############################################################################
48995#
48996# Configure parts of the build that only affect the build performance,
48997# not the result.
48998#
48999###############################################################################
49000
49001
49002  # How many cores do we have on this build system?
49003
49004# Check whether --with-num-cores was given.
49005if test "${with_num_cores+set}" = set; then :
49006  withval=$with_num_cores;
49007fi
49008
49009  if test "x$with_num_cores" = x; then
49010    # The number of cores were not specified, try to probe them.
49011
49012  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49013$as_echo_n "checking for number of cores... " >&6; }
49014  NUM_CORES=1
49015  FOUND_CORES=no
49016
49017  if test -f /proc/cpuinfo; then
49018    # Looks like a Linux (or cygwin) system
49019    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49020    FOUND_CORES=yes
49021  elif test -x /usr/sbin/psrinfo; then
49022    # Looks like a Solaris system
49023    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49024    FOUND_CORES=yes
49025  elif test -x /usr/sbin/system_profiler; then
49026    # Looks like a MacOSX system
49027    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49028    FOUND_CORES=yes
49029  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49030    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49031    FOUND_CORES=yes
49032  elif test -n "$NUMBER_OF_PROCESSORS"; then
49033    # On windows, look in the env
49034    NUM_CORES=$NUMBER_OF_PROCESSORS
49035    FOUND_CORES=yes
49036  fi
49037
49038  if test "x$FOUND_CORES" = xyes; then
49039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49040$as_echo "$NUM_CORES" >&6; }
49041  else
49042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49043$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49044    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49045$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49046  fi
49047
49048  else
49049    NUM_CORES=$with_num_cores
49050  fi
49051
49052
49053
49054  # How much memory do we have on this build system?
49055
49056# Check whether --with-memory-size was given.
49057if test "${with_memory_size+set}" = set; then :
49058  withval=$with_memory_size;
49059fi
49060
49061  if test "x$with_memory_size" = x; then
49062    # The memory size was not specified, try to probe it.
49063
49064  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49065$as_echo_n "checking for memory size... " >&6; }
49066  # Default to 1024 MB
49067  MEMORY_SIZE=1024
49068  FOUND_MEM=no
49069
49070  if test -f /proc/meminfo; then
49071    # Looks like a Linux (or cygwin) system
49072    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49073    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49074    FOUND_MEM=yes
49075  elif test -x /usr/sbin/prtconf; then
49076    # Looks like a Solaris or AIX system
49077    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49078    FOUND_MEM=yes
49079  elif test -x /usr/sbin/system_profiler; then
49080    # Looks like a MacOSX system
49081    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49082    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49083    FOUND_MEM=yes
49084  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49085    # Windows, but without cygwin
49086    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49087    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49088    FOUND_MEM=yes
49089  fi
49090
49091  if test "x$FOUND_MEM" = xyes; then
49092    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49093$as_echo "$MEMORY_SIZE MB" >&6; }
49094  else
49095    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49096$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49097    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49098$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49099  fi
49100
49101  else
49102    MEMORY_SIZE=$with_memory_size
49103  fi
49104
49105
49106
49107  # Provide a decent default number of parallel jobs for make depending on
49108  # number of cores, amount of memory and machine architecture.
49109
49110# Check whether --with-jobs was given.
49111if test "${with_jobs+set}" = set; then :
49112  withval=$with_jobs;
49113fi
49114
49115  if test "x$with_jobs" = x; then
49116    # Number of jobs was not specified, calculate.
49117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49118$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49119    # Approximate memory in GB, rounding up a bit.
49120    memory_gb=`expr $MEMORY_SIZE / 1100`
49121    # Pick the lowest of memory in gb and number of cores.
49122    if test "$memory_gb" -lt "$NUM_CORES"; then
49123      JOBS="$memory_gb"
49124    else
49125      JOBS="$NUM_CORES"
49126      # On bigger machines, leave some room for other processes to run
49127      if test "$JOBS" -gt "4"; then
49128        JOBS=`expr $JOBS '*' 90 / 100`
49129      fi
49130    fi
49131    # Cap number of jobs to 16
49132    if test "$JOBS" -gt "16"; then
49133      JOBS=16
49134    fi
49135    if test "$JOBS" -eq "0"; then
49136      JOBS=1
49137    fi
49138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49139$as_echo "$JOBS" >&6; }
49140  else
49141    JOBS=$with_jobs
49142  fi
49143
49144
49145
49146# Setup smart javac (after cores and memory have been setup)
49147
49148
49149# Check whether --with-sjavac-server-java was given.
49150if test "${with_sjavac_server_java+set}" = set; then :
49151  withval=$with_sjavac_server_java;
49152fi
49153
49154
49155  if test "x$with_sjavac_server_java" != x; then
49156    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49157    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49158    if test "x$FOUND_VERSION" = x; then
49159      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49160    fi
49161  else
49162    SJAVAC_SERVER_JAVA=""
49163    # Hotspot specific options.
49164
49165  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49166  $ECHO "Command: $JAVA -verbosegc -version" >&5
49167  OUTPUT=`$JAVA -verbosegc -version 2>&1`
49168  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49169  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49170  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49171    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49172    JVM_ARG_OK=true
49173  else
49174    $ECHO "Arg failed:" >&5
49175    $ECHO "$OUTPUT" >&5
49176    JVM_ARG_OK=false
49177  fi
49178
49179    # JRockit specific options.
49180
49181  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49182  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49183  OUTPUT=`$JAVA -Xverbose:gc -version 2>&1`
49184  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49185  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49186  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49187    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xverbose:gc"
49188    JVM_ARG_OK=true
49189  else
49190    $ECHO "Arg failed:" >&5
49191    $ECHO "$OUTPUT" >&5
49192    JVM_ARG_OK=false
49193  fi
49194
49195    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49196  fi
49197
49198
49199  if test "$MEMORY_SIZE" -gt "2500"; then
49200
49201  $ECHO "Check if jvm arg is ok: -d64" >&5
49202  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49203  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49204  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49205  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49206  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49207    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49208    JVM_ARG_OK=true
49209  else
49210    $ECHO "Arg failed:" >&5
49211    $ECHO "$OUTPUT" >&5
49212    JVM_ARG_OK=false
49213  fi
49214
49215    if test "$JVM_ARG_OK" = true; then
49216      JVM_64BIT=true
49217      JVM_ARG_OK=false
49218    fi
49219  fi
49220
49221  if test "$JVM_64BIT" = true; then
49222    if test "$MEMORY_SIZE" -gt "17000"; then
49223
49224  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49225  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49226  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49227  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49228  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49229  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49230    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
49231    JVM_ARG_OK=true
49232  else
49233    $ECHO "Arg failed:" >&5
49234    $ECHO "$OUTPUT" >&5
49235    JVM_ARG_OK=false
49236  fi
49237
49238    fi
49239    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
49240
49241  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
49242  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
49243  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
49244  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49245  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49246  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49247    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
49248    JVM_ARG_OK=true
49249  else
49250    $ECHO "Arg failed:" >&5
49251    $ECHO "$OUTPUT" >&5
49252    JVM_ARG_OK=false
49253  fi
49254
49255    fi
49256    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
49257
49258  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
49259  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
49260  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
49261  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49262  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49263  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49264    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
49265    JVM_ARG_OK=true
49266  else
49267    $ECHO "Arg failed:" >&5
49268    $ECHO "$OUTPUT" >&5
49269    JVM_ARG_OK=false
49270  fi
49271
49272    fi
49273    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
49274
49275  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
49276  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
49277  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
49278  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49279  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49280  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49281    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
49282    JVM_ARG_OK=true
49283  else
49284    $ECHO "Arg failed:" >&5
49285    $ECHO "$OUTPUT" >&5
49286    JVM_ARG_OK=false
49287  fi
49288
49289    fi
49290  fi
49291  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
49292
49293  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
49294  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
49295  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
49296  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49297  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49298  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49299    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
49300    JVM_ARG_OK=true
49301  else
49302    $ECHO "Arg failed:" >&5
49303    $ECHO "$OUTPUT" >&5
49304    JVM_ARG_OK=false
49305  fi
49306
49307  fi
49308  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
49309
49310  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
49311  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
49312  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
49313  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49314  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49315  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49316    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
49317    JVM_ARG_OK=true
49318  else
49319    $ECHO "Arg failed:" >&5
49320    $ECHO "$OUTPUT" >&5
49321    JVM_ARG_OK=false
49322  fi
49323
49324  fi
49325  if test "$JVM_ARG_OK" = false; then
49326
49327  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
49328  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
49329  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
49330  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49331  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49332  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49333    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
49334    JVM_ARG_OK=true
49335  else
49336    $ECHO "Arg failed:" >&5
49337    $ECHO "$OUTPUT" >&5
49338    JVM_ARG_OK=false
49339  fi
49340
49341  fi
49342
49343  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
49344$as_echo_n "checking whether to use sjavac... " >&6; }
49345  # Check whether --enable-sjavac was given.
49346if test "${enable_sjavac+set}" = set; then :
49347  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
49348else
49349  ENABLE_SJAVAC='no'
49350fi
49351
49352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
49353$as_echo "$ENABLE_SJAVAC" >&6; }
49354
49355
49356  if test "x$ENABLE_SJAVAC" = xyes; then
49357    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
49358  else
49359    SJAVAC_SERVER_DIR=
49360  fi
49361
49362
49363
49364# Can the C/C++ compiler use precompiled headers?
49365
49366
49367  ###############################################################################
49368  #
49369  # Can the C/C++ compiler use precompiled headers?
49370  #
49371  # Check whether --enable-precompiled-headers was given.
49372if test "${enable_precompiled_headers+set}" = set; then :
49373  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
49374else
49375  ENABLE_PRECOMPH=yes
49376fi
49377
49378
49379  USE_PRECOMPILED_HEADER=1
49380  if test "x$ENABLE_PRECOMPH" = xno; then
49381    USE_PRECOMPILED_HEADER=0
49382  fi
49383
49384  if test "x$ENABLE_PRECOMPH" = xyes; then
49385    # Check that the compiler actually supports precomp headers.
49386    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49387      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
49388$as_echo_n "checking that precompiled headers work... " >&6; }
49389      echo "int alfa();" > conftest.h
49390      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
49391      if test ! -f conftest.hpp.gch; then
49392        USE_PRECOMPILED_HEADER=0
49393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49394$as_echo "no" >&6; }
49395      else
49396        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49397$as_echo "yes" >&6; }
49398      fi
49399      rm -f conftest.h conftest.hpp.gch
49400    fi
49401  fi
49402
49403
49404
49405
49406# Setup use of ccache, if available
49407
49408  # Check whether --enable-ccache was given.
49409if test "${enable_ccache+set}" = set; then :
49410  enableval=$enable_ccache;
49411fi
49412
49413
49414  CCACHE=
49415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
49416$as_echo_n "checking is ccache enabled... " >&6; }
49417  ENABLE_CCACHE=$enable_ccache
49418  if test "x$enable_ccache" = xyes; then
49419    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49420$as_echo "yes" >&6; }
49421    OLD_PATH="$PATH"
49422    if test "x$TOOLCHAIN_PATH" != x; then
49423      PATH=$TOOLCHAIN_PATH:$PATH
49424    fi
49425
49426
49427
49428  # Publish this variable in the help.
49429
49430
49431  if test "x$CCACHE" = x; then
49432    # The variable is not set by user, try to locate tool using the code snippet
49433    for ac_prog in ccache
49434do
49435  # Extract the first word of "$ac_prog", so it can be a program name with args.
49436set dummy $ac_prog; ac_word=$2
49437{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49438$as_echo_n "checking for $ac_word... " >&6; }
49439if ${ac_cv_path_CCACHE+:} false; then :
49440  $as_echo_n "(cached) " >&6
49441else
49442  case $CCACHE in
49443  [\\/]* | ?:[\\/]*)
49444  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49445  ;;
49446  *)
49447  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49448for as_dir in $PATH
49449do
49450  IFS=$as_save_IFS
49451  test -z "$as_dir" && as_dir=.
49452    for ac_exec_ext in '' $ac_executable_extensions; do
49453  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49454    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49455    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49456    break 2
49457  fi
49458done
49459  done
49460IFS=$as_save_IFS
49461
49462  ;;
49463esac
49464fi
49465CCACHE=$ac_cv_path_CCACHE
49466if test -n "$CCACHE"; then
49467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49468$as_echo "$CCACHE" >&6; }
49469else
49470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49471$as_echo "no" >&6; }
49472fi
49473
49474
49475  test -n "$CCACHE" && break
49476done
49477
49478  else
49479    # The variable is set, but is it from the command line or the environment?
49480
49481    # Try to remove the string !CCACHE! from our list.
49482    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
49483    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49484      # If it failed, the variable was not from the command line. Ignore it,
49485      # but warn the user (except for BASH, which is always set by the calling BASH).
49486      if test "xCCACHE" != xBASH; then
49487        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
49488$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
49489      fi
49490      # Try to locate tool using the code snippet
49491      for ac_prog in ccache
49492do
49493  # Extract the first word of "$ac_prog", so it can be a program name with args.
49494set dummy $ac_prog; ac_word=$2
49495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49496$as_echo_n "checking for $ac_word... " >&6; }
49497if ${ac_cv_path_CCACHE+:} false; then :
49498  $as_echo_n "(cached) " >&6
49499else
49500  case $CCACHE in
49501  [\\/]* | ?:[\\/]*)
49502  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49503  ;;
49504  *)
49505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49506for as_dir in $PATH
49507do
49508  IFS=$as_save_IFS
49509  test -z "$as_dir" && as_dir=.
49510    for ac_exec_ext in '' $ac_executable_extensions; do
49511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49512    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49514    break 2
49515  fi
49516done
49517  done
49518IFS=$as_save_IFS
49519
49520  ;;
49521esac
49522fi
49523CCACHE=$ac_cv_path_CCACHE
49524if test -n "$CCACHE"; then
49525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49526$as_echo "$CCACHE" >&6; }
49527else
49528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49529$as_echo "no" >&6; }
49530fi
49531
49532
49533  test -n "$CCACHE" && break
49534done
49535
49536    else
49537      # If it succeeded, then it was overridden by the user. We will use it
49538      # for the tool.
49539
49540      # First remove it from the list of overridden variables, so we can test
49541      # for unknown variables in the end.
49542      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49543
49544      # Check if the provided tool contains a complete path.
49545      tool_specified="$CCACHE"
49546      tool_basename="${tool_specified##*/}"
49547      if test "x$tool_basename" = "x$tool_specified"; then
49548        # A command without a complete path is provided, search $PATH.
49549        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49550$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49551        # Extract the first word of "$tool_basename", so it can be a program name with args.
49552set dummy $tool_basename; ac_word=$2
49553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49554$as_echo_n "checking for $ac_word... " >&6; }
49555if ${ac_cv_path_CCACHE+:} false; then :
49556  $as_echo_n "(cached) " >&6
49557else
49558  case $CCACHE in
49559  [\\/]* | ?:[\\/]*)
49560  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49561  ;;
49562  *)
49563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49564for as_dir in $PATH
49565do
49566  IFS=$as_save_IFS
49567  test -z "$as_dir" && as_dir=.
49568    for ac_exec_ext in '' $ac_executable_extensions; do
49569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49570    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49572    break 2
49573  fi
49574done
49575  done
49576IFS=$as_save_IFS
49577
49578  ;;
49579esac
49580fi
49581CCACHE=$ac_cv_path_CCACHE
49582if test -n "$CCACHE"; then
49583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49584$as_echo "$CCACHE" >&6; }
49585else
49586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49587$as_echo "no" >&6; }
49588fi
49589
49590
49591        if test "x$CCACHE" = x; then
49592          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49593        fi
49594      else
49595        # Otherwise we believe it is a complete path. Use it as it is.
49596        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49597$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49598        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49599$as_echo_n "checking for CCACHE... " >&6; }
49600        if test ! -x "$tool_specified"; then
49601          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49602$as_echo "not found" >&6; }
49603          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49604        fi
49605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49606$as_echo "$tool_specified" >&6; }
49607      fi
49608    fi
49609  fi
49610
49611
49612
49613  if test "x$CCACHE" = x; then
49614    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49615  fi
49616
49617
49618    CCACHE_STATUS="enabled"
49619    PATH="$OLD_PATH"
49620  elif test "x$enable_ccache" = xno; then
49621    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49622$as_echo "no, explicitly disabled" >&6; }
49623  elif test "x$enable_ccache" = x; then
49624    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49625$as_echo "no" >&6; }
49626  else
49627    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49628$as_echo "unknown" >&6; }
49629    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49630  fi
49631
49632
49633
49634# Check whether --with-ccache-dir was given.
49635if test "${with_ccache_dir+set}" = set; then :
49636  withval=$with_ccache_dir;
49637fi
49638
49639
49640  if test "x$with_ccache_dir" != x; then
49641    # When using a non home ccache directory, assume the use is to share ccache files
49642    # with other users. Thus change the umask.
49643    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49644    if test "x$CCACHE" = x; then
49645      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49646$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49647    fi
49648  fi
49649
49650  if test "x$CCACHE" != x; then
49651
49652  if test "x$CCACHE" != x; then
49653    # Only use ccache if it is 3.1.4 or later, which supports
49654    # precompiled headers.
49655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49656$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49657    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49658    if test "x$HAS_GOOD_CCACHE" = x; then
49659      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49660$as_echo "no, disabling ccache" >&6; }
49661      CCACHE=
49662      CCACHE_STATUS="disabled"
49663    else
49664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49665$as_echo "yes" >&6; }
49666      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49667$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49668      PUSHED_FLAGS="$CXXFLAGS"
49669      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49670      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49671/* end confdefs.h.  */
49672
49673int
49674main ()
49675{
49676
49677  ;
49678  return 0;
49679}
49680_ACEOF
49681if ac_fn_cxx_try_compile "$LINENO"; then :
49682  CC_KNOWS_CCACHE_TRICK=yes
49683else
49684  CC_KNOWS_CCACHE_TRICK=no
49685fi
49686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49687      CXXFLAGS="$PUSHED_FLAGS"
49688      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49690$as_echo "yes" >&6; }
49691      else
49692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49693$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49694        CCACHE=
49695        CCACHE_STATUS="disabled"
49696      fi
49697    fi
49698  fi
49699
49700  if test "x$CCACHE" != x; then
49701    CCACHE_SLOPPINESS=time_macros
49702    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49703    CCACHE_FLAGS=-fpch-preprocess
49704
49705    if test "x$SET_CCACHE_DIR" != x; then
49706      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49707      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49708    fi
49709  fi
49710
49711  fi
49712
49713
49714###############################################################################
49715#
49716# And now the finish...
49717#
49718###############################################################################
49719
49720# Check for some common pitfalls
49721
49722  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49723    file_to_test="$SRC_ROOT/LICENSE"
49724    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49725      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
49726    fi
49727  fi
49728
49729
49730  # Did user specify any unknown variables?
49731
49732  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49733    # Replace the separating ! with spaces before presenting for end user.
49734    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49735    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49736$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49737  fi
49738
49739
49740  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49741$as_echo_n "checking if build directory is on local disk... " >&6; }
49742
49743  # df -l lists only local disks; if the given directory is not found then
49744  # a non-zero exit code is given
49745  if test "x$DF" = x; then
49746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49747      # msys does not have df; use Windows "net use" instead.
49748      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49749      if test "x$IS_NETWORK_DISK" = x; then
49750        OUTPUT_DIR_IS_LOCAL="yes"
49751      else
49752        OUTPUT_DIR_IS_LOCAL="no"
49753      fi
49754    else
49755      # No df here, say it's local
49756      OUTPUT_DIR_IS_LOCAL="yes"
49757    fi
49758  else
49759    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49760      OUTPUT_DIR_IS_LOCAL="yes"
49761    else
49762      OUTPUT_DIR_IS_LOCAL="no"
49763    fi
49764  fi
49765
49766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49767$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49768
49769
49770
49771  # Check if the user has any old-style ALT_ variables set.
49772  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49773
49774  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49775  # Since we can't properly handle the dependencies for this, warn the user about the situation
49776  if test -e $OUTPUT_ROOT/spec.gmk; then
49777    IS_RECONFIGURE=yes
49778  else
49779    IS_RECONFIGURE=no
49780  fi
49781
49782
49783# At the end, call the custom hook. (Dummy macro if no custom sources available)
49784
49785
49786# We're messing a bit with internal autoconf variables to put the config.status
49787# in the output directory instead of the current directory.
49788CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49789
49790# Create the actual output files. Now the main work of configure is done.
49791cat >confcache <<\_ACEOF
49792# This file is a shell script that caches the results of configure
49793# tests run on this system so they can be shared between configure
49794# scripts and configure runs, see configure's option --config-cache.
49795# It is not useful on other systems.  If it contains results you don't
49796# want to keep, you may remove or edit it.
49797#
49798# config.status only pays attention to the cache file if you give it
49799# the --recheck option to rerun configure.
49800#
49801# `ac_cv_env_foo' variables (set or unset) will be overridden when
49802# loading this file, other *unset* `ac_cv_foo' will be assigned the
49803# following values.
49804
49805_ACEOF
49806
49807# The following way of writing the cache mishandles newlines in values,
49808# but we know of no workaround that is simple, portable, and efficient.
49809# So, we kill variables containing newlines.
49810# Ultrix sh set writes to stderr and can't be redirected directly,
49811# and sets the high bit in the cache file unless we assign to the vars.
49812(
49813  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49814    eval ac_val=\$$ac_var
49815    case $ac_val in #(
49816    *${as_nl}*)
49817      case $ac_var in #(
49818      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49819$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49820      esac
49821      case $ac_var in #(
49822      _ | IFS | as_nl) ;; #(
49823      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49824      *) { eval $ac_var=; unset $ac_var;} ;;
49825      esac ;;
49826    esac
49827  done
49828
49829  (set) 2>&1 |
49830    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49831    *${as_nl}ac_space=\ *)
49832      # `set' does not quote correctly, so add quotes: double-quote
49833      # substitution turns \\\\ into \\, and sed turns \\ into \.
49834      sed -n \
49835	"s/'/'\\\\''/g;
49836	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49837      ;; #(
49838    *)
49839      # `set' quotes correctly as required by POSIX, so do not add quotes.
49840      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49841      ;;
49842    esac |
49843    sort
49844) |
49845  sed '
49846     /^ac_cv_env_/b end
49847     t clear
49848     :clear
49849     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49850     t end
49851     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49852     :end' >>confcache
49853if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
49854  if test -w "$cache_file"; then
49855    if test "x$cache_file" != "x/dev/null"; then
49856      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
49857$as_echo "$as_me: updating cache $cache_file" >&6;}
49858      if test ! -f "$cache_file" || test -h "$cache_file"; then
49859	cat confcache >"$cache_file"
49860      else
49861        case $cache_file in #(
49862        */* | ?:*)
49863	  mv -f confcache "$cache_file"$$ &&
49864	  mv -f "$cache_file"$$ "$cache_file" ;; #(
49865        *)
49866	  mv -f confcache "$cache_file" ;;
49867	esac
49868      fi
49869    fi
49870  else
49871    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
49872$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
49873  fi
49874fi
49875rm -f confcache
49876
49877test "x$prefix" = xNONE && prefix=$ac_default_prefix
49878# Let make expand exec_prefix.
49879test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49880
49881DEFS=-DHAVE_CONFIG_H
49882
49883ac_libobjs=
49884ac_ltlibobjs=
49885U=
49886for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
49887  # 1. Remove the extension, and $U if already installed.
49888  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
49889  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
49890  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
49891  #    will be set to the directory where LIBOBJS objects are built.
49892  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
49893  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
49894done
49895LIBOBJS=$ac_libobjs
49896
49897LTLIBOBJS=$ac_ltlibobjs
49898
49899
49900
49901: "${CONFIG_STATUS=./config.status}"
49902ac_write_fail=0
49903ac_clean_files_save=$ac_clean_files
49904ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49905{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
49906$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
49907as_write_fail=0
49908cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
49909#! $SHELL
49910# Generated by $as_me.
49911# Run this file to recreate the current configuration.
49912# Compiler output produced by configure, useful for debugging
49913# configure, is in config.log if it exists.
49914
49915debug=false
49916ac_cs_recheck=false
49917ac_cs_silent=false
49918
49919SHELL=\${CONFIG_SHELL-$SHELL}
49920export SHELL
49921_ASEOF
49922cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
49923## -------------------- ##
49924## M4sh Initialization. ##
49925## -------------------- ##
49926
49927# Be more Bourne compatible
49928DUALCASE=1; export DUALCASE # for MKS sh
49929if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
49930  emulate sh
49931  NULLCMD=:
49932  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
49933  # is contrary to our usage.  Disable this feature.
49934  alias -g '${1+"$@"}'='"$@"'
49935  setopt NO_GLOB_SUBST
49936else
49937  case `(set -o) 2>/dev/null` in #(
49938  *posix*) :
49939    set -o posix ;; #(
49940  *) :
49941     ;;
49942esac
49943fi
49944
49945
49946as_nl='
49947'
49948export as_nl
49949# Printing a long string crashes Solaris 7 /usr/bin/printf.
49950as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
49951as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
49952as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49953# Prefer a ksh shell builtin over an external printf program on Solaris,
49954# but without wasting forks for bash or zsh.
49955if test -z "$BASH_VERSION$ZSH_VERSION" \
49956    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
49957  as_echo='print -r --'
49958  as_echo_n='print -rn --'
49959elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
49960  as_echo='printf %s\n'
49961  as_echo_n='printf %s'
49962else
49963  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
49964    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
49965    as_echo_n='/usr/ucb/echo -n'
49966  else
49967    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
49968    as_echo_n_body='eval
49969      arg=$1;
49970      case $arg in #(
49971      *"$as_nl"*)
49972	expr "X$arg" : "X\\(.*\\)$as_nl";
49973	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
49974      esac;
49975      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
49976    '
49977    export as_echo_n_body
49978    as_echo_n='sh -c $as_echo_n_body as_echo'
49979  fi
49980  export as_echo_body
49981  as_echo='sh -c $as_echo_body as_echo'
49982fi
49983
49984# The user is always right.
49985if test "${PATH_SEPARATOR+set}" != set; then
49986  PATH_SEPARATOR=:
49987  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
49988    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
49989      PATH_SEPARATOR=';'
49990  }
49991fi
49992
49993
49994# IFS
49995# We need space, tab and new line, in precisely that order.  Quoting is
49996# there to prevent editors from complaining about space-tab.
49997# (If _AS_PATH_WALK were called with IFS unset, it would disable word
49998# splitting by setting IFS to empty value.)
49999IFS=" ""	$as_nl"
50000
50001# Find who we are.  Look in the path if we contain no directory separator.
50002as_myself=
50003case $0 in #((
50004  *[\\/]* ) as_myself=$0 ;;
50005  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50006for as_dir in $PATH
50007do
50008  IFS=$as_save_IFS
50009  test -z "$as_dir" && as_dir=.
50010    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50011  done
50012IFS=$as_save_IFS
50013
50014     ;;
50015esac
50016# We did not find ourselves, most probably we were run as `sh COMMAND'
50017# in which case we are not to be found in the path.
50018if test "x$as_myself" = x; then
50019  as_myself=$0
50020fi
50021if test ! -f "$as_myself"; then
50022  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50023  exit 1
50024fi
50025
50026# Unset variables that we do not need and which cause bugs (e.g. in
50027# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50028# suppresses any "Segmentation fault" message there.  '((' could
50029# trigger a bug in pdksh 5.2.14.
50030for as_var in BASH_ENV ENV MAIL MAILPATH
50031do eval test x\${$as_var+set} = xset \
50032  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50033done
50034PS1='$ '
50035PS2='> '
50036PS4='+ '
50037
50038# NLS nuisances.
50039LC_ALL=C
50040export LC_ALL
50041LANGUAGE=C
50042export LANGUAGE
50043
50044# CDPATH.
50045(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50046
50047
50048# as_fn_error STATUS ERROR [LINENO LOG_FD]
50049# ----------------------------------------
50050# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50051# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50052# script with STATUS, using 1 if that was 0.
50053as_fn_error ()
50054{
50055  as_status=$1; test $as_status -eq 0 && as_status=1
50056  if test "$4"; then
50057    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50058    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50059  fi
50060  $as_echo "$as_me: error: $2" >&2
50061  as_fn_exit $as_status
50062} # as_fn_error
50063
50064
50065# as_fn_set_status STATUS
50066# -----------------------
50067# Set $? to STATUS, without forking.
50068as_fn_set_status ()
50069{
50070  return $1
50071} # as_fn_set_status
50072
50073# as_fn_exit STATUS
50074# -----------------
50075# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50076as_fn_exit ()
50077{
50078  set +e
50079  as_fn_set_status $1
50080  exit $1
50081} # as_fn_exit
50082
50083# as_fn_unset VAR
50084# ---------------
50085# Portably unset VAR.
50086as_fn_unset ()
50087{
50088  { eval $1=; unset $1;}
50089}
50090as_unset=as_fn_unset
50091# as_fn_append VAR VALUE
50092# ----------------------
50093# Append the text in VALUE to the end of the definition contained in VAR. Take
50094# advantage of any shell optimizations that allow amortized linear growth over
50095# repeated appends, instead of the typical quadratic growth present in naive
50096# implementations.
50097if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50098  eval 'as_fn_append ()
50099  {
50100    eval $1+=\$2
50101  }'
50102else
50103  as_fn_append ()
50104  {
50105    eval $1=\$$1\$2
50106  }
50107fi # as_fn_append
50108
50109# as_fn_arith ARG...
50110# ------------------
50111# Perform arithmetic evaluation on the ARGs, and store the result in the
50112# global $as_val. Take advantage of shells that can avoid forks. The arguments
50113# must be portable across $(()) and expr.
50114if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50115  eval 'as_fn_arith ()
50116  {
50117    as_val=$(( $* ))
50118  }'
50119else
50120  as_fn_arith ()
50121  {
50122    as_val=`expr "$@" || test $? -eq 1`
50123  }
50124fi # as_fn_arith
50125
50126
50127if expr a : '\(a\)' >/dev/null 2>&1 &&
50128   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50129  as_expr=expr
50130else
50131  as_expr=false
50132fi
50133
50134if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50135  as_basename=basename
50136else
50137  as_basename=false
50138fi
50139
50140if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50141  as_dirname=dirname
50142else
50143  as_dirname=false
50144fi
50145
50146as_me=`$as_basename -- "$0" ||
50147$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50148	 X"$0" : 'X\(//\)$' \| \
50149	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50150$as_echo X/"$0" |
50151    sed '/^.*\/\([^/][^/]*\)\/*$/{
50152	    s//\1/
50153	    q
50154	  }
50155	  /^X\/\(\/\/\)$/{
50156	    s//\1/
50157	    q
50158	  }
50159	  /^X\/\(\/\).*/{
50160	    s//\1/
50161	    q
50162	  }
50163	  s/.*/./; q'`
50164
50165# Avoid depending upon Character Ranges.
50166as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50167as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50168as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50169as_cr_digits='0123456789'
50170as_cr_alnum=$as_cr_Letters$as_cr_digits
50171
50172ECHO_C= ECHO_N= ECHO_T=
50173case `echo -n x` in #(((((
50174-n*)
50175  case `echo 'xy\c'` in
50176  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50177  xy)  ECHO_C='\c';;
50178  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50179       ECHO_T='	';;
50180  esac;;
50181*)
50182  ECHO_N='-n';;
50183esac
50184
50185rm -f conf$$ conf$$.exe conf$$.file
50186if test -d conf$$.dir; then
50187  rm -f conf$$.dir/conf$$.file
50188else
50189  rm -f conf$$.dir
50190  mkdir conf$$.dir 2>/dev/null
50191fi
50192if (echo >conf$$.file) 2>/dev/null; then
50193  if ln -s conf$$.file conf$$ 2>/dev/null; then
50194    as_ln_s='ln -s'
50195    # ... but there are two gotchas:
50196    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50197    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50198    # In both cases, we have to default to `cp -pR'.
50199    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50200      as_ln_s='cp -pR'
50201  elif ln conf$$.file conf$$ 2>/dev/null; then
50202    as_ln_s=ln
50203  else
50204    as_ln_s='cp -pR'
50205  fi
50206else
50207  as_ln_s='cp -pR'
50208fi
50209rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50210rmdir conf$$.dir 2>/dev/null
50211
50212
50213# as_fn_mkdir_p
50214# -------------
50215# Create "$as_dir" as a directory, including parents if necessary.
50216as_fn_mkdir_p ()
50217{
50218
50219  case $as_dir in #(
50220  -*) as_dir=./$as_dir;;
50221  esac
50222  test -d "$as_dir" || eval $as_mkdir_p || {
50223    as_dirs=
50224    while :; do
50225      case $as_dir in #(
50226      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50227      *) as_qdir=$as_dir;;
50228      esac
50229      as_dirs="'$as_qdir' $as_dirs"
50230      as_dir=`$as_dirname -- "$as_dir" ||
50231$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50232	 X"$as_dir" : 'X\(//\)[^/]' \| \
50233	 X"$as_dir" : 'X\(//\)$' \| \
50234	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
50235$as_echo X"$as_dir" |
50236    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50237	    s//\1/
50238	    q
50239	  }
50240	  /^X\(\/\/\)[^/].*/{
50241	    s//\1/
50242	    q
50243	  }
50244	  /^X\(\/\/\)$/{
50245	    s//\1/
50246	    q
50247	  }
50248	  /^X\(\/\).*/{
50249	    s//\1/
50250	    q
50251	  }
50252	  s/.*/./; q'`
50253      test -d "$as_dir" && break
50254    done
50255    test -z "$as_dirs" || eval "mkdir $as_dirs"
50256  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
50257
50258
50259} # as_fn_mkdir_p
50260if mkdir -p . 2>/dev/null; then
50261  as_mkdir_p='mkdir -p "$as_dir"'
50262else
50263  test -d ./-p && rmdir ./-p
50264  as_mkdir_p=false
50265fi
50266
50267
50268# as_fn_executable_p FILE
50269# -----------------------
50270# Test if FILE is an executable regular file.
50271as_fn_executable_p ()
50272{
50273  test -f "$1" && test -x "$1"
50274} # as_fn_executable_p
50275as_test_x='test -x'
50276as_executable_p=as_fn_executable_p
50277
50278# Sed expression to map a string onto a valid CPP name.
50279as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
50280
50281# Sed expression to map a string onto a valid variable name.
50282as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
50283
50284
50285exec 6>&1
50286## ----------------------------------- ##
50287## Main body of $CONFIG_STATUS script. ##
50288## ----------------------------------- ##
50289_ASEOF
50290test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
50291
50292cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50293# Save the log message, to keep $0 and so on meaningful, and to
50294# report actual input values of CONFIG_FILES etc. instead of their
50295# values after options handling.
50296ac_log="
50297This file was extended by OpenJDK $as_me jdk9, which was
50298generated by GNU Autoconf 2.69.  Invocation command line was
50299
50300  CONFIG_FILES    = $CONFIG_FILES
50301  CONFIG_HEADERS  = $CONFIG_HEADERS
50302  CONFIG_LINKS    = $CONFIG_LINKS
50303  CONFIG_COMMANDS = $CONFIG_COMMANDS
50304  $ $0 $@
50305
50306on `(hostname || uname -n) 2>/dev/null | sed 1q`
50307"
50308
50309_ACEOF
50310
50311case $ac_config_files in *"
50312"*) set x $ac_config_files; shift; ac_config_files=$*;;
50313esac
50314
50315case $ac_config_headers in *"
50316"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
50317esac
50318
50319
50320cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50321# Files that config.status was made for.
50322config_files="$ac_config_files"
50323config_headers="$ac_config_headers"
50324
50325_ACEOF
50326
50327cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50328ac_cs_usage="\
50329\`$as_me' instantiates files and other configuration actions
50330from templates according to the current configuration.  Unless the files
50331and actions are specified as TAGs, all are instantiated by default.
50332
50333Usage: $0 [OPTION]... [TAG]...
50334
50335  -h, --help       print this help, then exit
50336  -V, --version    print version number and configuration settings, then exit
50337      --config     print configuration, then exit
50338  -q, --quiet, --silent
50339                   do not print progress messages
50340  -d, --debug      don't remove temporary files
50341      --recheck    update $as_me by reconfiguring in the same conditions
50342      --file=FILE[:TEMPLATE]
50343                   instantiate the configuration file FILE
50344      --header=FILE[:TEMPLATE]
50345                   instantiate the configuration header FILE
50346
50347Configuration files:
50348$config_files
50349
50350Configuration headers:
50351$config_headers
50352
50353Report bugs to <build-dev@openjdk.java.net>.
50354OpenJDK home page: <http://openjdk.java.net>."
50355
50356_ACEOF
50357cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50358ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
50359ac_cs_version="\\
50360OpenJDK config.status jdk9
50361configured by $0, generated by GNU Autoconf 2.69,
50362  with options \\"\$ac_cs_config\\"
50363
50364Copyright (C) 2012 Free Software Foundation, Inc.
50365This config.status script is free software; the Free Software Foundation
50366gives unlimited permission to copy, distribute and modify it."
50367
50368ac_pwd='$ac_pwd'
50369srcdir='$srcdir'
50370AWK='$AWK'
50371test -n "\$AWK" || AWK=awk
50372_ACEOF
50373
50374cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50375# The default lists apply if the user does not specify any file.
50376ac_need_defaults=:
50377while test $# != 0
50378do
50379  case $1 in
50380  --*=?*)
50381    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50382    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
50383    ac_shift=:
50384    ;;
50385  --*=)
50386    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50387    ac_optarg=
50388    ac_shift=:
50389    ;;
50390  *)
50391    ac_option=$1
50392    ac_optarg=$2
50393    ac_shift=shift
50394    ;;
50395  esac
50396
50397  case $ac_option in
50398  # Handling of the options.
50399  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50400    ac_cs_recheck=: ;;
50401  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50402    $as_echo "$ac_cs_version"; exit ;;
50403  --config | --confi | --conf | --con | --co | --c )
50404    $as_echo "$ac_cs_config"; exit ;;
50405  --debug | --debu | --deb | --de | --d | -d )
50406    debug=: ;;
50407  --file | --fil | --fi | --f )
50408    $ac_shift
50409    case $ac_optarg in
50410    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50411    '') as_fn_error $? "missing file argument" ;;
50412    esac
50413    as_fn_append CONFIG_FILES " '$ac_optarg'"
50414    ac_need_defaults=false;;
50415  --header | --heade | --head | --hea )
50416    $ac_shift
50417    case $ac_optarg in
50418    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50419    esac
50420    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50421    ac_need_defaults=false;;
50422  --he | --h)
50423    # Conflict between --help and --header
50424    as_fn_error $? "ambiguous option: \`$1'
50425Try \`$0 --help' for more information.";;
50426  --help | --hel | -h )
50427    $as_echo "$ac_cs_usage"; exit ;;
50428  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50429  | -silent | --silent | --silen | --sile | --sil | --si | --s)
50430    ac_cs_silent=: ;;
50431
50432  # This is an error.
50433  -*) as_fn_error $? "unrecognized option: \`$1'
50434Try \`$0 --help' for more information." ;;
50435
50436  *) as_fn_append ac_config_targets " $1"
50437     ac_need_defaults=false ;;
50438
50439  esac
50440  shift
50441done
50442
50443ac_configure_extra_args=
50444
50445if $ac_cs_silent; then
50446  exec 6>/dev/null
50447  ac_configure_extra_args="$ac_configure_extra_args --silent"
50448fi
50449
50450_ACEOF
50451cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50452if \$ac_cs_recheck; then
50453  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50454  shift
50455  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
50456  CONFIG_SHELL='$SHELL'
50457  export CONFIG_SHELL
50458  exec "\$@"
50459fi
50460
50461_ACEOF
50462cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50463exec 5>>config.log
50464{
50465  echo
50466  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50467## Running $as_me. ##
50468_ASBOX
50469  $as_echo "$ac_log"
50470} >&5
50471
50472_ACEOF
50473cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50474_ACEOF
50475
50476cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50477
50478# Handling of arguments.
50479for ac_config_target in $ac_config_targets
50480do
50481  case $ac_config_target in
50482    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
50483    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
50484    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
50485    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
50486    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
50487    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
50488    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
50489
50490  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
50491  esac
50492done
50493
50494
50495# If the user did not use the arguments to specify the items to instantiate,
50496# then the envvar interface is used.  Set only those that are not.
50497# We use the long form for the default assignment because of an extremely
50498# bizarre bug on SunOS 4.1.3.
50499if $ac_need_defaults; then
50500  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50501  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50502fi
50503
50504# Have a temporary directory for convenience.  Make it in the build tree
50505# simply because there is no reason against having it here, and in addition,
50506# creating and moving files from /tmp can sometimes cause problems.
50507# Hook for its removal unless debugging.
50508# Note that there is a small window in which the directory will not be cleaned:
50509# after its creation but before its name has been assigned to `$tmp'.
50510$debug ||
50511{
50512  tmp= ac_tmp=
50513  trap 'exit_status=$?
50514  : "${ac_tmp:=$tmp}"
50515  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50516' 0
50517  trap 'as_fn_exit 1' 1 2 13 15
50518}
50519# Create a (secure) tmp directory for tmp files.
50520
50521{
50522  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50523  test -d "$tmp"
50524}  ||
50525{
50526  tmp=./conf$$-$RANDOM
50527  (umask 077 && mkdir "$tmp")
50528} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50529ac_tmp=$tmp
50530
50531# Set up the scripts for CONFIG_FILES section.
50532# No need to generate them if there are no CONFIG_FILES.
50533# This happens for instance with `./config.status config.h'.
50534if test -n "$CONFIG_FILES"; then
50535
50536
50537ac_cr=`echo X | tr X '\015'`
50538# On cygwin, bash can eat \r inside `` if the user requested igncr.
50539# But we know of no other shell where ac_cr would be empty at this
50540# point, so we can use a bashism as a fallback.
50541if test "x$ac_cr" = x; then
50542  eval ac_cr=\$\'\\r\'
50543fi
50544ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50545if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50546  ac_cs_awk_cr='\\r'
50547else
50548  ac_cs_awk_cr=$ac_cr
50549fi
50550
50551echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50552_ACEOF
50553
50554
50555{
50556  echo "cat >conf$$subs.awk <<_ACEOF" &&
50557  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50558  echo "_ACEOF"
50559} >conf$$subs.sh ||
50560  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50561ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50562ac_delim='%!_!# '
50563for ac_last_try in false false false false false :; do
50564  . ./conf$$subs.sh ||
50565    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50566
50567  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50568  if test $ac_delim_n = $ac_delim_num; then
50569    break
50570  elif $ac_last_try; then
50571    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50572  else
50573    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50574  fi
50575done
50576rm -f conf$$subs.sh
50577
50578cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50579cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50580_ACEOF
50581sed -n '
50582h
50583s/^/S["/; s/!.*/"]=/
50584p
50585g
50586s/^[^!]*!//
50587:repl
50588t repl
50589s/'"$ac_delim"'$//
50590t delim
50591:nl
50592h
50593s/\(.\{148\}\)..*/\1/
50594t more1
50595s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50596p
50597n
50598b repl
50599:more1
50600s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50601p
50602g
50603s/.\{148\}//
50604t nl
50605:delim
50606h
50607s/\(.\{148\}\)..*/\1/
50608t more2
50609s/["\\]/\\&/g; s/^/"/; s/$/"/
50610p
50611b
50612:more2
50613s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50614p
50615g
50616s/.\{148\}//
50617t delim
50618' <conf$$subs.awk | sed '
50619/^[^""]/{
50620  N
50621  s/\n//
50622}
50623' >>$CONFIG_STATUS || ac_write_fail=1
50624rm -f conf$$subs.awk
50625cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50626_ACAWK
50627cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50628  for (key in S) S_is_set[key] = 1
50629  FS = ""
50630
50631}
50632{
50633  line = $ 0
50634  nfields = split(line, field, "@")
50635  substed = 0
50636  len = length(field[1])
50637  for (i = 2; i < nfields; i++) {
50638    key = field[i]
50639    keylen = length(key)
50640    if (S_is_set[key]) {
50641      value = S[key]
50642      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50643      len += length(value) + length(field[++i])
50644      substed = 1
50645    } else
50646      len += 1 + keylen
50647  }
50648
50649  print line
50650}
50651
50652_ACAWK
50653_ACEOF
50654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50655if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50656  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50657else
50658  cat
50659fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50660  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50661_ACEOF
50662
50663# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50664# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50665# trailing colons and then remove the whole line if VPATH becomes empty
50666# (actually we leave an empty line to preserve line numbers).
50667if test "x$srcdir" = x.; then
50668  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50669h
50670s///
50671s/^/:/
50672s/[	 ]*$/:/
50673s/:\$(srcdir):/:/g
50674s/:\${srcdir}:/:/g
50675s/:@srcdir@:/:/g
50676s/^:*//
50677s/:*$//
50678x
50679s/\(=[	 ]*\).*/\1/
50680G
50681s/\n//
50682s/^[^=]*=[	 ]*$//
50683}'
50684fi
50685
50686cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50687fi # test -n "$CONFIG_FILES"
50688
50689# Set up the scripts for CONFIG_HEADERS section.
50690# No need to generate them if there are no CONFIG_HEADERS.
50691# This happens for instance with `./config.status Makefile'.
50692if test -n "$CONFIG_HEADERS"; then
50693cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50694BEGIN {
50695_ACEOF
50696
50697# Transform confdefs.h into an awk script `defines.awk', embedded as
50698# here-document in config.status, that substitutes the proper values into
50699# config.h.in to produce config.h.
50700
50701# Create a delimiter string that does not exist in confdefs.h, to ease
50702# handling of long lines.
50703ac_delim='%!_!# '
50704for ac_last_try in false false :; do
50705  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50706  if test -z "$ac_tt"; then
50707    break
50708  elif $ac_last_try; then
50709    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50710  else
50711    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50712  fi
50713done
50714
50715# For the awk script, D is an array of macro values keyed by name,
50716# likewise P contains macro parameters if any.  Preserve backslash
50717# newline sequences.
50718
50719ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50720sed -n '
50721s/.\{148\}/&'"$ac_delim"'/g
50722t rset
50723:rset
50724s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50725t def
50726d
50727:def
50728s/\\$//
50729t bsnl
50730s/["\\]/\\&/g
50731s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50732D["\1"]=" \3"/p
50733s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50734d
50735:bsnl
50736s/["\\]/\\&/g
50737s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50738D["\1"]=" \3\\\\\\n"\\/p
50739t cont
50740s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50741t cont
50742d
50743:cont
50744n
50745s/.\{148\}/&'"$ac_delim"'/g
50746t clear
50747:clear
50748s/\\$//
50749t bsnlc
50750s/["\\]/\\&/g; s/^/"/; s/$/"/p
50751d
50752:bsnlc
50753s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50754b cont
50755' <confdefs.h | sed '
50756s/'"$ac_delim"'/"\\\
50757"/g' >>$CONFIG_STATUS || ac_write_fail=1
50758
50759cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50760  for (key in D) D_is_set[key] = 1
50761  FS = ""
50762}
50763/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50764  line = \$ 0
50765  split(line, arg, " ")
50766  if (arg[1] == "#") {
50767    defundef = arg[2]
50768    mac1 = arg[3]
50769  } else {
50770    defundef = substr(arg[1], 2)
50771    mac1 = arg[2]
50772  }
50773  split(mac1, mac2, "(") #)
50774  macro = mac2[1]
50775  prefix = substr(line, 1, index(line, defundef) - 1)
50776  if (D_is_set[macro]) {
50777    # Preserve the white space surrounding the "#".
50778    print prefix "define", macro P[macro] D[macro]
50779    next
50780  } else {
50781    # Replace #undef with comments.  This is necessary, for example,
50782    # in the case of _POSIX_SOURCE, which is predefined and required
50783    # on some systems where configure will not decide to define it.
50784    if (defundef == "undef") {
50785      print "/*", prefix defundef, macro, "*/"
50786      next
50787    }
50788  }
50789}
50790{ print }
50791_ACAWK
50792_ACEOF
50793cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50794  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50795fi # test -n "$CONFIG_HEADERS"
50796
50797
50798eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50799shift
50800for ac_tag
50801do
50802  case $ac_tag in
50803  :[FHLC]) ac_mode=$ac_tag; continue;;
50804  esac
50805  case $ac_mode$ac_tag in
50806  :[FHL]*:*);;
50807  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50808  :[FH]-) ac_tag=-:-;;
50809  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50810  esac
50811  ac_save_IFS=$IFS
50812  IFS=:
50813  set x $ac_tag
50814  IFS=$ac_save_IFS
50815  shift
50816  ac_file=$1
50817  shift
50818
50819  case $ac_mode in
50820  :L) ac_source=$1;;
50821  :[FH])
50822    ac_file_inputs=
50823    for ac_f
50824    do
50825      case $ac_f in
50826      -) ac_f="$ac_tmp/stdin";;
50827      *) # Look for the file first in the build tree, then in the source tree
50828	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50829	 # because $ac_f cannot contain `:'.
50830	 test -f "$ac_f" ||
50831	   case $ac_f in
50832	   [\\/$]*) false;;
50833	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50834	   esac ||
50835	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50836      esac
50837      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50838      as_fn_append ac_file_inputs " '$ac_f'"
50839    done
50840
50841    # Let's still pretend it is `configure' which instantiates (i.e., don't
50842    # use $as_me), people would be surprised to read:
50843    #    /* config.h.  Generated by config.status.  */
50844    configure_input='Generated from '`
50845	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50846	`' by configure.'
50847    if test x"$ac_file" != x-; then
50848      configure_input="$ac_file.  $configure_input"
50849      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50850$as_echo "$as_me: creating $ac_file" >&6;}
50851    fi
50852    # Neutralize special characters interpreted by sed in replacement strings.
50853    case $configure_input in #(
50854    *\&* | *\|* | *\\* )
50855       ac_sed_conf_input=`$as_echo "$configure_input" |
50856       sed 's/[\\\\&|]/\\\\&/g'`;; #(
50857    *) ac_sed_conf_input=$configure_input;;
50858    esac
50859
50860    case $ac_tag in
50861    *:-:* | *:-) cat >"$ac_tmp/stdin" \
50862      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
50863    esac
50864    ;;
50865  esac
50866
50867  ac_dir=`$as_dirname -- "$ac_file" ||
50868$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50869	 X"$ac_file" : 'X\(//\)[^/]' \| \
50870	 X"$ac_file" : 'X\(//\)$' \| \
50871	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
50872$as_echo X"$ac_file" |
50873    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50874	    s//\1/
50875	    q
50876	  }
50877	  /^X\(\/\/\)[^/].*/{
50878	    s//\1/
50879	    q
50880	  }
50881	  /^X\(\/\/\)$/{
50882	    s//\1/
50883	    q
50884	  }
50885	  /^X\(\/\).*/{
50886	    s//\1/
50887	    q
50888	  }
50889	  s/.*/./; q'`
50890  as_dir="$ac_dir"; as_fn_mkdir_p
50891  ac_builddir=.
50892
50893case "$ac_dir" in
50894.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
50895*)
50896  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
50897  # A ".." for each directory in $ac_dir_suffix.
50898  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
50899  case $ac_top_builddir_sub in
50900  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
50901  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
50902  esac ;;
50903esac
50904ac_abs_top_builddir=$ac_pwd
50905ac_abs_builddir=$ac_pwd$ac_dir_suffix
50906# for backward compatibility:
50907ac_top_builddir=$ac_top_build_prefix
50908
50909case $srcdir in
50910  .)  # We are building in place.
50911    ac_srcdir=.
50912    ac_top_srcdir=$ac_top_builddir_sub
50913    ac_abs_top_srcdir=$ac_pwd ;;
50914  [\\/]* | ?:[\\/]* )  # Absolute name.
50915    ac_srcdir=$srcdir$ac_dir_suffix;
50916    ac_top_srcdir=$srcdir
50917    ac_abs_top_srcdir=$srcdir ;;
50918  *) # Relative name.
50919    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
50920    ac_top_srcdir=$ac_top_build_prefix$srcdir
50921    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
50922esac
50923ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
50924
50925
50926  case $ac_mode in
50927  :F)
50928  #
50929  # CONFIG_FILE
50930  #
50931
50932_ACEOF
50933
50934cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50935# If the template does not know about datarootdir, expand it.
50936# FIXME: This hack should be removed a few years after 2.60.
50937ac_datarootdir_hack=; ac_datarootdir_seen=
50938ac_sed_dataroot='
50939/datarootdir/ {
50940  p
50941  q
50942}
50943/@datadir@/p
50944/@docdir@/p
50945/@infodir@/p
50946/@localedir@/p
50947/@mandir@/p'
50948case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
50949*datarootdir*) ac_datarootdir_seen=yes;;
50950*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
50951  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
50952$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
50953_ACEOF
50954cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50955  ac_datarootdir_hack='
50956  s&@datadir@&$datadir&g
50957  s&@docdir@&$docdir&g
50958  s&@infodir@&$infodir&g
50959  s&@localedir@&$localedir&g
50960  s&@mandir@&$mandir&g
50961  s&\\\${datarootdir}&$datarootdir&g' ;;
50962esac
50963_ACEOF
50964
50965# Neutralize VPATH when `$srcdir' = `.'.
50966# Shell code in configure.ac might set extrasub.
50967# FIXME: do we really want to maintain this feature?
50968cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50969ac_sed_extra="$ac_vpsub
50970$extrasub
50971_ACEOF
50972cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50973:t
50974/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
50975s|@configure_input@|$ac_sed_conf_input|;t t
50976s&@top_builddir@&$ac_top_builddir_sub&;t t
50977s&@top_build_prefix@&$ac_top_build_prefix&;t t
50978s&@srcdir@&$ac_srcdir&;t t
50979s&@abs_srcdir@&$ac_abs_srcdir&;t t
50980s&@top_srcdir@&$ac_top_srcdir&;t t
50981s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
50982s&@builddir@&$ac_builddir&;t t
50983s&@abs_builddir@&$ac_abs_builddir&;t t
50984s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
50985$ac_datarootdir_hack
50986"
50987eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
50988  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
50989
50990test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
50991  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
50992  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
50993      "$ac_tmp/out"`; test -z "$ac_out"; } &&
50994  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50995which seems to be undefined.  Please make sure it is defined" >&5
50996$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
50997which seems to be undefined.  Please make sure it is defined" >&2;}
50998
50999  rm -f "$ac_tmp/stdin"
51000  case $ac_file in
51001  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51002  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51003  esac \
51004  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51005 ;;
51006  :H)
51007  #
51008  # CONFIG_HEADER
51009  #
51010  if test x"$ac_file" != x-; then
51011    {
51012      $as_echo "/* $configure_input  */" \
51013      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51014    } >"$ac_tmp/config.h" \
51015      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51016    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51017      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51018$as_echo "$as_me: $ac_file is unchanged" >&6;}
51019    else
51020      rm -f "$ac_file"
51021      mv "$ac_tmp/config.h" "$ac_file" \
51022	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51023    fi
51024  else
51025    $as_echo "/* $configure_input  */" \
51026      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51027      || as_fn_error $? "could not create -" "$LINENO" 5
51028  fi
51029 ;;
51030
51031
51032  esac
51033
51034done # for ac_tag
51035
51036
51037as_fn_exit 0
51038_ACEOF
51039ac_clean_files=$ac_clean_files_save
51040
51041test $ac_write_fail = 0 ||
51042  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51043
51044
51045# configure is writing to config.log, and then calls config.status.
51046# config.status does its own redirection, appending to config.log.
51047# Unfortunately, on DOS this fails, as config.log is still kept open
51048# by configure, so config.status won't be able to write to it; its
51049# output is simply discarded.  So we exec the FD to /dev/null,
51050# effectively closing config.log, so it can be properly (re)opened and
51051# appended to by config.status.  When coming back to configure, we
51052# need to make the FD available again.
51053if test "$no_create" != yes; then
51054  ac_cs_success=:
51055  ac_config_status_args=
51056  test "$silent" = yes &&
51057    ac_config_status_args="$ac_config_status_args --quiet"
51058  exec 5>/dev/null
51059  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51060  exec 5>>config.log
51061  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51062  # would make configure fail if this is the last instruction.
51063  $ac_cs_success || as_fn_exit 1
51064fi
51065if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51066  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51067$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51068fi
51069
51070
51071# Try to move the config.log file to the output directory.
51072if test -e ./config.log; then
51073  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51074fi
51075
51076# Make the compare script executable
51077$CHMOD +x $OUTPUT_ROOT/compare.sh
51078
51079# Finally output some useful information to the user
51080
51081  # Finally output some useful information to the user
51082
51083  printf "\n"
51084  printf "====================================================\n"
51085  if test "x$no_create" != "xyes"; then
51086    if test "x$IS_RECONFIGURE" != "xyes"; then
51087      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51088    else
51089      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51090    fi
51091  else
51092    if test "x$IS_RECONFIGURE" != "xyes"; then
51093      printf "A configuration has been successfully checked but not created\n"
51094    else
51095      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51096    fi
51097  fi
51098  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51099    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51100  else
51101    printf "using default settings.\n"
51102  fi
51103
51104  printf "\n"
51105  printf "Configuration summary:\n"
51106  printf "* Debug level:    $DEBUG_LEVEL\n"
51107  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51108  printf "* JDK variant:    $JDK_VARIANT\n"
51109  printf "* JVM variants:   $with_jvm_variants\n"
51110  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51111
51112  printf "\n"
51113  printf "Tools summary:\n"
51114  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51115    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51116  fi
51117  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51118  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51119  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51120  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51121
51122  printf "\n"
51123  printf "Build performance summary:\n"
51124  printf "* Cores to use:   $JOBS\n"
51125  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51126  if test "x$CCACHE_STATUS" != "x"; then
51127    printf "* ccache status:  $CCACHE_STATUS\n"
51128  fi
51129  printf "\n"
51130
51131  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51132    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51133    printf "will result in longer build times.\n"
51134    printf "\n"
51135  fi
51136
51137  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51138    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51139    printf "These are not respected, and will be ignored. It is recommended\n"
51140    printf "that you clean your environment. The following variables are set:\n"
51141    printf "$FOUND_ALT_VARIABLES\n"
51142    printf "\n"
51143  fi
51144
51145  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51146    printf "WARNING: Your build output directory is not on a local disk.\n"
51147    printf "This will severely degrade build performance!\n"
51148    printf "It is recommended that you create an output directory on a local disk,\n"
51149    printf "and run the configure script again from that directory.\n"
51150    printf "\n"
51151  fi
51152
51153  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51154    printf "WARNING: The result of this configuration has overridden an older\n"
51155    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51156    printf "proper build. Failure to do so might result in strange build problems.\n"
51157    printf "\n"
51158  fi
51159
51160  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51161    printf "WARNING: The result of this configuration was not saved.\n"
51162    printf "You should run without '--no-create | -n' to create the configuration.\n"
51163    printf "\n"
51164  fi
51165
51166