generated-configure.sh revision 1081:fd8ea978b212
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
877SDKROOT
878XCODEBUILD
879BUILD_VARIANT_RELEASE
880DEBUG_CLASSFILES
881FASTDEBUG
882VARIANT
883DEBUG_LEVEL
884MACOSX_UNIVERSAL
885INCLUDE_SA
886JVM_VARIANT_CORE
887JVM_VARIANT_ZEROSHARK
888JVM_VARIANT_ZERO
889JVM_VARIANT_KERNEL
890JVM_VARIANT_MINIMAL1
891JVM_VARIANT_CLIENT
892JVM_VARIANT_SERVER
893JVM_VARIANTS
894JVM_INTERPRETER
895JDK_VARIANT
896SET_OPENJDK
897BUILD_LOG_WRAPPER
898BUILD_LOG_PREVIOUS
899BUILD_LOG
900TOPDIR
901PATH_SEP
902ZERO_ARCHDEF
903DEFINE_CROSS_COMPILE_ARCH
904LP64
905OPENJDK_TARGET_OS_EXPORT_DIR
906OPENJDK_TARGET_OS_API_DIR
907OPENJDK_TARGET_CPU_JLI_CFLAGS
908OPENJDK_TARGET_CPU_OSARCH
909OPENJDK_TARGET_CPU_ISADIR
910OPENJDK_TARGET_CPU_LIBDIR
911OPENJDK_TARGET_CPU_LEGACY_LIB
912OPENJDK_TARGET_CPU_LEGACY
913REQUIRED_OS_VERSION
914REQUIRED_OS_NAME
915COMPILE_TYPE
916OPENJDK_TARGET_CPU_ENDIAN
917OPENJDK_TARGET_CPU_BITS
918OPENJDK_TARGET_CPU_ARCH
919OPENJDK_TARGET_CPU
920OPENJDK_TARGET_OS_API
921OPENJDK_TARGET_OS
922OPENJDK_BUILD_CPU_ENDIAN
923OPENJDK_BUILD_CPU_BITS
924OPENJDK_BUILD_CPU_ARCH
925OPENJDK_BUILD_CPU
926OPENJDK_BUILD_OS_API
927OPENJDK_BUILD_OS
928OPENJDK_BUILD_AUTOCONF_NAME
929OPENJDK_TARGET_AUTOCONF_NAME
930target_os
931target_vendor
932target_cpu
933target
934host_os
935host_vendor
936host_cpu
937host
938build_os
939build_vendor
940build_cpu
941build
942SETFILE
943DF
944READLINK
945CYGPATH
946SED
947FGREP
948EGREP
949GREP
950AWK
951XARGS
952WHICH
953WC
954UNIQ
955UNAME
956TR
957TOUCH
958TEE
959TAR
960TAIL
961SORT
962SH
963RM
964PRINTF
965NAWK
966MV
967MKTEMP
968MKDIR
969LS
970LN
971HEAD
972FIND
973FILE
974EXPR
975ECHO
976DIRNAME
977DIFF
978DATE
979CUT
980CPIO
981CP
982COMM
983CMP
984CHMOD
985CAT
986BASH
987BASENAME
988DATE_WHEN_CONFIGURED
989CONFIGURE_COMMAND_LINE
990target_alias
991host_alias
992build_alias
993LIBS
994ECHO_T
995ECHO_N
996ECHO_C
997DEFS
998mandir
999localedir
1000libdir
1001psdir
1002pdfdir
1003dvidir
1004htmldir
1005infodir
1006docdir
1007oldincludedir
1008includedir
1009localstatedir
1010sharedstatedir
1011sysconfdir
1012datadir
1013datarootdir
1014libexecdir
1015sbindir
1016bindir
1017program_transform_name
1018prefix
1019exec_prefix
1020PACKAGE_URL
1021PACKAGE_BUGREPORT
1022PACKAGE_STRING
1023PACKAGE_VERSION
1024PACKAGE_TARNAME
1025PACKAGE_NAME
1026PATH_SEPARATOR
1027SHELL'
1028ac_subst_files=''
1029ac_user_opts='
1030enable_option_checking
1031with_target_bits
1032enable_openjdk_only
1033with_custom_make_dir
1034with_jdk_variant
1035with_jvm_interpreter
1036with_jvm_variants
1037enable_debug
1038with_debug_level
1039with_devkit
1040with_sys_root
1041with_sysroot
1042with_tools_dir
1043with_toolchain_path
1044with_extra_path
1045with_sdk_name
1046with_conf_name
1047with_builddeps_conf
1048with_builddeps_server
1049with_builddeps_dir
1050with_builddeps_group
1051enable_headful
1052enable_hotspot_test_in_build
1053with_cacerts_file
1054enable_unlimited_crypto
1055enable_rmiconnector_iiop
1056with_milestone
1057with_update_version
1058with_user_release_suffix
1059with_build_number
1060with_boot_jdk
1061with_boot_jdk_jvmargs
1062with_add_source_root
1063with_override_source_root
1064with_adds_and_overrides
1065with_override_langtools
1066with_override_corba
1067with_override_jaxp
1068with_override_jaxws
1069with_override_hotspot
1070with_override_nashorn
1071with_override_jdk
1072with_import_hotspot
1073with_toolchain_type
1074with_jtreg
1075with_extra_cflags
1076with_extra_cxxflags
1077with_extra_ldflags
1078enable_debug_symbols
1079enable_zip_debug_info
1080with_x
1081with_cups
1082with_cups_include
1083with_freetype
1084with_freetype_include
1085with_freetype_lib
1086enable_freetype_bundling
1087with_alsa
1088with_alsa_include
1089with_alsa_lib
1090with_libjpeg
1091with_giflib
1092with_lcms
1093with_libpng
1094with_zlib
1095with_stdc__lib
1096with_msvcr_dll
1097with_dxsdk
1098with_dxsdk_lib
1099with_dxsdk_include
1100with_num_cores
1101with_memory_size
1102with_jobs
1103with_sjavac_server_java
1104enable_sjavac
1105enable_precompiled_headers
1106enable_ccache
1107with_ccache_dir
1108'
1109      ac_precious_vars='build_alias
1110host_alias
1111target_alias
1112BASENAME
1113BASH
1114CAT
1115CHMOD
1116CMP
1117COMM
1118CP
1119CPIO
1120CUT
1121DATE
1122DIFF
1123DIRNAME
1124ECHO
1125EXPR
1126FILE
1127FIND
1128HEAD
1129LN
1130LS
1131MKDIR
1132MKTEMP
1133MV
1134NAWK
1135PRINTF
1136RM
1137SH
1138SORT
1139TAIL
1140TAR
1141TEE
1142TOUCH
1143TR
1144UNAME
1145UNIQ
1146WC
1147WHICH
1148XARGS
1149AWK
1150GREP
1151EGREP
1152FGREP
1153SED
1154CYGPATH
1155READLINK
1156DF
1157SETFILE
1158UNZIP
1159ZIP
1160LDD
1161OTOOL
1162READELF
1163HG
1164STAT
1165TIME
1166DSYMUTIL
1167XATTR
1168CODESIGN
1169PKG_CONFIG
1170JAVA
1171JAVAC
1172JAVAH
1173JAR
1174NATIVE2ASCII
1175JARSIGNER
1176CC
1177CFLAGS
1178LDFLAGS
1179LIBS
1180CPPFLAGS
1181CXX
1182CXXFLAGS
1183CCC
1184CPP
1185CXXCPP
1186AS
1187AR
1188OBJC
1189OBJCFLAGS
1190LIPO
1191STRIP
1192NM
1193GNM
1194MCS
1195OBJCOPY
1196OBJDUMP
1197BUILD_CC
1198BUILD_CXX
1199BUILD_LD
1200JTREGEXE
1201XMKMF
1202FREETYPE_CFLAGS
1203FREETYPE_LIBS
1204ALSA_CFLAGS
1205ALSA_LIBS
1206LCMS_CFLAGS
1207LCMS_LIBS
1208PNG_CFLAGS
1209PNG_LIBS
1210LIBFFI_CFLAGS
1211LIBFFI_LIBS
1212CCACHE'
1213
1214
1215# Initialize some variables set by options.
1216ac_init_help=
1217ac_init_version=false
1218ac_unrecognized_opts=
1219ac_unrecognized_sep=
1220# The variables have the same names as the options, with
1221# dashes changed to underlines.
1222cache_file=/dev/null
1223exec_prefix=NONE
1224no_create=
1225no_recursion=
1226prefix=NONE
1227program_prefix=NONE
1228program_suffix=NONE
1229program_transform_name=s,x,x,
1230silent=
1231site=
1232srcdir=
1233verbose=
1234x_includes=NONE
1235x_libraries=NONE
1236
1237# Installation directory options.
1238# These are left unexpanded so users can "make install exec_prefix=/foo"
1239# and all the variables that are supposed to be based on exec_prefix
1240# by default will actually change.
1241# Use braces instead of parens because sh, perl, etc. also accept them.
1242# (The list follows the same order as the GNU Coding Standards.)
1243bindir='${exec_prefix}/bin'
1244sbindir='${exec_prefix}/sbin'
1245libexecdir='${exec_prefix}/libexec'
1246datarootdir='${prefix}/share'
1247datadir='${datarootdir}'
1248sysconfdir='${prefix}/etc'
1249sharedstatedir='${prefix}/com'
1250localstatedir='${prefix}/var'
1251includedir='${prefix}/include'
1252oldincludedir='/usr/include'
1253docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1254infodir='${datarootdir}/info'
1255htmldir='${docdir}'
1256dvidir='${docdir}'
1257pdfdir='${docdir}'
1258psdir='${docdir}'
1259libdir='${exec_prefix}/lib'
1260localedir='${datarootdir}/locale'
1261mandir='${datarootdir}/man'
1262
1263ac_prev=
1264ac_dashdash=
1265for ac_option
1266do
1267  # If the previous option needs an argument, assign it.
1268  if test -n "$ac_prev"; then
1269    eval $ac_prev=\$ac_option
1270    ac_prev=
1271    continue
1272  fi
1273
1274  case $ac_option in
1275  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1276  *=)   ac_optarg= ;;
1277  *)    ac_optarg=yes ;;
1278  esac
1279
1280  # Accept the important Cygnus configure options, so we can diagnose typos.
1281
1282  case $ac_dashdash$ac_option in
1283  --)
1284    ac_dashdash=yes ;;
1285
1286  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1287    ac_prev=bindir ;;
1288  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1289    bindir=$ac_optarg ;;
1290
1291  -build | --build | --buil | --bui | --bu)
1292    ac_prev=build_alias ;;
1293  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1294    build_alias=$ac_optarg ;;
1295
1296  -cache-file | --cache-file | --cache-fil | --cache-fi \
1297  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1298    ac_prev=cache_file ;;
1299  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1300  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1301    cache_file=$ac_optarg ;;
1302
1303  --config-cache | -C)
1304    cache_file=config.cache ;;
1305
1306  -datadir | --datadir | --datadi | --datad)
1307    ac_prev=datadir ;;
1308  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1309    datadir=$ac_optarg ;;
1310
1311  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1312  | --dataroo | --dataro | --datar)
1313    ac_prev=datarootdir ;;
1314  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1315  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1316    datarootdir=$ac_optarg ;;
1317
1318  -disable-* | --disable-*)
1319    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1320    # Reject names that are not valid shell variable names.
1321    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1322      as_fn_error $? "invalid feature name: $ac_useropt"
1323    ac_useropt_orig=$ac_useropt
1324    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1325    case $ac_user_opts in
1326      *"
1327"enable_$ac_useropt"
1328"*) ;;
1329      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1330	 ac_unrecognized_sep=', ';;
1331    esac
1332    eval enable_$ac_useropt=no ;;
1333
1334  -docdir | --docdir | --docdi | --doc | --do)
1335    ac_prev=docdir ;;
1336  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1337    docdir=$ac_optarg ;;
1338
1339  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1340    ac_prev=dvidir ;;
1341  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1342    dvidir=$ac_optarg ;;
1343
1344  -enable-* | --enable-*)
1345    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1346    # Reject names that are not valid shell variable names.
1347    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1348      as_fn_error $? "invalid feature name: $ac_useropt"
1349    ac_useropt_orig=$ac_useropt
1350    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1351    case $ac_user_opts in
1352      *"
1353"enable_$ac_useropt"
1354"*) ;;
1355      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1356	 ac_unrecognized_sep=', ';;
1357    esac
1358    eval enable_$ac_useropt=\$ac_optarg ;;
1359
1360  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1361  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1362  | --exec | --exe | --ex)
1363    ac_prev=exec_prefix ;;
1364  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1365  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1366  | --exec=* | --exe=* | --ex=*)
1367    exec_prefix=$ac_optarg ;;
1368
1369  -gas | --gas | --ga | --g)
1370    # Obsolete; use --with-gas.
1371    with_gas=yes ;;
1372
1373  -help | --help | --hel | --he | -h)
1374    ac_init_help=long ;;
1375  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1376    ac_init_help=recursive ;;
1377  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1378    ac_init_help=short ;;
1379
1380  -host | --host | --hos | --ho)
1381    ac_prev=host_alias ;;
1382  -host=* | --host=* | --hos=* | --ho=*)
1383    host_alias=$ac_optarg ;;
1384
1385  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1386    ac_prev=htmldir ;;
1387  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1388  | --ht=*)
1389    htmldir=$ac_optarg ;;
1390
1391  -includedir | --includedir | --includedi | --included | --include \
1392  | --includ | --inclu | --incl | --inc)
1393    ac_prev=includedir ;;
1394  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1395  | --includ=* | --inclu=* | --incl=* | --inc=*)
1396    includedir=$ac_optarg ;;
1397
1398  -infodir | --infodir | --infodi | --infod | --info | --inf)
1399    ac_prev=infodir ;;
1400  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1401    infodir=$ac_optarg ;;
1402
1403  -libdir | --libdir | --libdi | --libd)
1404    ac_prev=libdir ;;
1405  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1406    libdir=$ac_optarg ;;
1407
1408  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1409  | --libexe | --libex | --libe)
1410    ac_prev=libexecdir ;;
1411  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1412  | --libexe=* | --libex=* | --libe=*)
1413    libexecdir=$ac_optarg ;;
1414
1415  -localedir | --localedir | --localedi | --localed | --locale)
1416    ac_prev=localedir ;;
1417  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1418    localedir=$ac_optarg ;;
1419
1420  -localstatedir | --localstatedir | --localstatedi | --localstated \
1421  | --localstate | --localstat | --localsta | --localst | --locals)
1422    ac_prev=localstatedir ;;
1423  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1424  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1425    localstatedir=$ac_optarg ;;
1426
1427  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1428    ac_prev=mandir ;;
1429  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1430    mandir=$ac_optarg ;;
1431
1432  -nfp | --nfp | --nf)
1433    # Obsolete; use --without-fp.
1434    with_fp=no ;;
1435
1436  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1437  | --no-cr | --no-c | -n)
1438    no_create=yes ;;
1439
1440  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1441  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1442    no_recursion=yes ;;
1443
1444  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1445  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1446  | --oldin | --oldi | --old | --ol | --o)
1447    ac_prev=oldincludedir ;;
1448  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1449  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1450  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1451    oldincludedir=$ac_optarg ;;
1452
1453  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1454    ac_prev=prefix ;;
1455  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1456    prefix=$ac_optarg ;;
1457
1458  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1459  | --program-pre | --program-pr | --program-p)
1460    ac_prev=program_prefix ;;
1461  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1462  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1463    program_prefix=$ac_optarg ;;
1464
1465  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1466  | --program-suf | --program-su | --program-s)
1467    ac_prev=program_suffix ;;
1468  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1469  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1470    program_suffix=$ac_optarg ;;
1471
1472  -program-transform-name | --program-transform-name \
1473  | --program-transform-nam | --program-transform-na \
1474  | --program-transform-n | --program-transform- \
1475  | --program-transform | --program-transfor \
1476  | --program-transfo | --program-transf \
1477  | --program-trans | --program-tran \
1478  | --progr-tra | --program-tr | --program-t)
1479    ac_prev=program_transform_name ;;
1480  -program-transform-name=* | --program-transform-name=* \
1481  | --program-transform-nam=* | --program-transform-na=* \
1482  | --program-transform-n=* | --program-transform-=* \
1483  | --program-transform=* | --program-transfor=* \
1484  | --program-transfo=* | --program-transf=* \
1485  | --program-trans=* | --program-tran=* \
1486  | --progr-tra=* | --program-tr=* | --program-t=*)
1487    program_transform_name=$ac_optarg ;;
1488
1489  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1490    ac_prev=pdfdir ;;
1491  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1492    pdfdir=$ac_optarg ;;
1493
1494  -psdir | --psdir | --psdi | --psd | --ps)
1495    ac_prev=psdir ;;
1496  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1497    psdir=$ac_optarg ;;
1498
1499  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1500  | -silent | --silent | --silen | --sile | --sil)
1501    silent=yes ;;
1502
1503  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1504    ac_prev=sbindir ;;
1505  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1506  | --sbi=* | --sb=*)
1507    sbindir=$ac_optarg ;;
1508
1509  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1510  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1511  | --sharedst | --shareds | --shared | --share | --shar \
1512  | --sha | --sh)
1513    ac_prev=sharedstatedir ;;
1514  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1515  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1516  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1517  | --sha=* | --sh=*)
1518    sharedstatedir=$ac_optarg ;;
1519
1520  -site | --site | --sit)
1521    ac_prev=site ;;
1522  -site=* | --site=* | --sit=*)
1523    site=$ac_optarg ;;
1524
1525  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1526    ac_prev=srcdir ;;
1527  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1528    srcdir=$ac_optarg ;;
1529
1530  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1531  | --syscon | --sysco | --sysc | --sys | --sy)
1532    ac_prev=sysconfdir ;;
1533  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1534  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1535    sysconfdir=$ac_optarg ;;
1536
1537  -target | --target | --targe | --targ | --tar | --ta | --t)
1538    ac_prev=target_alias ;;
1539  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1540    target_alias=$ac_optarg ;;
1541
1542  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1543    verbose=yes ;;
1544
1545  -version | --version | --versio | --versi | --vers | -V)
1546    ac_init_version=: ;;
1547
1548  -with-* | --with-*)
1549    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1550    # Reject names that are not valid shell variable names.
1551    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1552      as_fn_error $? "invalid package name: $ac_useropt"
1553    ac_useropt_orig=$ac_useropt
1554    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1555    case $ac_user_opts in
1556      *"
1557"with_$ac_useropt"
1558"*) ;;
1559      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1560	 ac_unrecognized_sep=', ';;
1561    esac
1562    eval with_$ac_useropt=\$ac_optarg ;;
1563
1564  -without-* | --without-*)
1565    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1566    # Reject names that are not valid shell variable names.
1567    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1568      as_fn_error $? "invalid package name: $ac_useropt"
1569    ac_useropt_orig=$ac_useropt
1570    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1571    case $ac_user_opts in
1572      *"
1573"with_$ac_useropt"
1574"*) ;;
1575      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1576	 ac_unrecognized_sep=', ';;
1577    esac
1578    eval with_$ac_useropt=no ;;
1579
1580  --x)
1581    # Obsolete; use --with-x.
1582    with_x=yes ;;
1583
1584  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1585  | --x-incl | --x-inc | --x-in | --x-i)
1586    ac_prev=x_includes ;;
1587  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1588  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1589    x_includes=$ac_optarg ;;
1590
1591  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1592  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1593    ac_prev=x_libraries ;;
1594  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1595  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1596    x_libraries=$ac_optarg ;;
1597
1598  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1599Try \`$0 --help' for more information"
1600    ;;
1601
1602  *=*)
1603    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1604    # Reject names that are not valid shell variable names.
1605    case $ac_envvar in #(
1606      '' | [0-9]* | *[!_$as_cr_alnum]* )
1607      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1608    esac
1609    eval $ac_envvar=\$ac_optarg
1610    export $ac_envvar ;;
1611
1612  *)
1613    # FIXME: should be removed in autoconf 3.0.
1614    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1615    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1616      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1617    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1618    ;;
1619
1620  esac
1621done
1622
1623if test -n "$ac_prev"; then
1624  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1625  as_fn_error $? "missing argument to $ac_option"
1626fi
1627
1628if test -n "$ac_unrecognized_opts"; then
1629  case $enable_option_checking in
1630    no) ;;
1631    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1632    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1633  esac
1634fi
1635
1636# Check all directory arguments for consistency.
1637for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1638		datadir sysconfdir sharedstatedir localstatedir includedir \
1639		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1640		libdir localedir mandir
1641do
1642  eval ac_val=\$$ac_var
1643  # Remove trailing slashes.
1644  case $ac_val in
1645    */ )
1646      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1647      eval $ac_var=\$ac_val;;
1648  esac
1649  # Be sure to have absolute directory names.
1650  case $ac_val in
1651    [\\/$]* | ?:[\\/]* )  continue;;
1652    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1653  esac
1654  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1655done
1656
1657# There might be people who depend on the old broken behavior: `$host'
1658# used to hold the argument of --host etc.
1659# FIXME: To remove some day.
1660build=$build_alias
1661host=$host_alias
1662target=$target_alias
1663
1664# FIXME: To remove some day.
1665if test "x$host_alias" != x; then
1666  if test "x$build_alias" = x; then
1667    cross_compiling=maybe
1668  elif test "x$build_alias" != "x$host_alias"; then
1669    cross_compiling=yes
1670  fi
1671fi
1672
1673ac_tool_prefix=
1674test -n "$host_alias" && ac_tool_prefix=$host_alias-
1675
1676test "$silent" = yes && exec 6>/dev/null
1677
1678
1679ac_pwd=`pwd` && test -n "$ac_pwd" &&
1680ac_ls_di=`ls -di .` &&
1681ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1682  as_fn_error $? "working directory cannot be determined"
1683test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1684  as_fn_error $? "pwd does not report name of working directory"
1685
1686
1687# Find the source files, if location was not specified.
1688if test -z "$srcdir"; then
1689  ac_srcdir_defaulted=yes
1690  # Try the directory containing this script, then the parent directory.
1691  ac_confdir=`$as_dirname -- "$as_myself" ||
1692$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1693	 X"$as_myself" : 'X\(//\)[^/]' \| \
1694	 X"$as_myself" : 'X\(//\)$' \| \
1695	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1696$as_echo X"$as_myself" |
1697    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1698	    s//\1/
1699	    q
1700	  }
1701	  /^X\(\/\/\)[^/].*/{
1702	    s//\1/
1703	    q
1704	  }
1705	  /^X\(\/\/\)$/{
1706	    s//\1/
1707	    q
1708	  }
1709	  /^X\(\/\).*/{
1710	    s//\1/
1711	    q
1712	  }
1713	  s/.*/./; q'`
1714  srcdir=$ac_confdir
1715  if test ! -r "$srcdir/$ac_unique_file"; then
1716    srcdir=..
1717  fi
1718else
1719  ac_srcdir_defaulted=no
1720fi
1721if test ! -r "$srcdir/$ac_unique_file"; then
1722  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1723  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1724fi
1725ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1726ac_abs_confdir=`(
1727	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1728	pwd)`
1729# When building in place, set srcdir=.
1730if test "$ac_abs_confdir" = "$ac_pwd"; then
1731  srcdir=.
1732fi
1733# Remove unnecessary trailing slashes from srcdir.
1734# Double slashes in file names in object file debugging info
1735# mess up M-x gdb in Emacs.
1736case $srcdir in
1737*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1738esac
1739for ac_var in $ac_precious_vars; do
1740  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1741  eval ac_env_${ac_var}_value=\$${ac_var}
1742  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1743  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1744done
1745
1746#
1747# Report the --help message.
1748#
1749if test "$ac_init_help" = "long"; then
1750  # Omit some internal or obsolete options to make the list less imposing.
1751  # This message is too long to be a string in the A/UX 3.1 sh.
1752  cat <<_ACEOF
1753\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1754
1755Usage: $0 [OPTION]... [VAR=VALUE]...
1756
1757To assign environment variables (e.g., CC, CFLAGS...), specify them as
1758VAR=VALUE.  See below for descriptions of some of the useful variables.
1759
1760Defaults for the options are specified in brackets.
1761
1762Configuration:
1763  -h, --help              display this help and exit
1764      --help=short        display options specific to this package
1765      --help=recursive    display the short help of all the included packages
1766  -V, --version           display version information and exit
1767  -q, --quiet, --silent   do not print \`checking ...' messages
1768      --cache-file=FILE   cache test results in FILE [disabled]
1769  -C, --config-cache      alias for \`--cache-file=config.cache'
1770  -n, --no-create         do not create output files
1771      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1772
1773Installation directories:
1774  --prefix=PREFIX         install architecture-independent files in PREFIX
1775                          [$ac_default_prefix]
1776  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1777                          [PREFIX]
1778
1779By default, \`make install' will install all the files in
1780\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1781an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1782for instance \`--prefix=\$HOME'.
1783
1784For better control, use the options below.
1785
1786Fine tuning of the installation directories:
1787  --bindir=DIR            user executables [EPREFIX/bin]
1788  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1789  --libexecdir=DIR        program executables [EPREFIX/libexec]
1790  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1791  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1792  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1793  --libdir=DIR            object code libraries [EPREFIX/lib]
1794  --includedir=DIR        C header files [PREFIX/include]
1795  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1796  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1797  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1798  --infodir=DIR           info documentation [DATAROOTDIR/info]
1799  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1800  --mandir=DIR            man documentation [DATAROOTDIR/man]
1801  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1802  --htmldir=DIR           html documentation [DOCDIR]
1803  --dvidir=DIR            dvi documentation [DOCDIR]
1804  --pdfdir=DIR            pdf documentation [DOCDIR]
1805  --psdir=DIR             ps documentation [DOCDIR]
1806_ACEOF
1807
1808  cat <<\_ACEOF
1809
1810X features:
1811  --x-includes=DIR    X include files are in DIR
1812  --x-libraries=DIR   X library files are in DIR
1813
1814System types:
1815  --build=BUILD     configure for building on BUILD [guessed]
1816  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1817  --target=TARGET   configure for building compilers for TARGET [HOST]
1818_ACEOF
1819fi
1820
1821if test -n "$ac_init_help"; then
1822  case $ac_init_help in
1823     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1824   esac
1825  cat <<\_ACEOF
1826
1827Optional Features:
1828  --disable-option-checking  ignore unrecognized --enable/--with options
1829  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1830  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1831  --enable-openjdk-only   suppress building custom source even if present
1832                          [disabled]
1833  --enable-debug          set the debug level to fastdebug (shorthand for
1834                          --with-debug-level=fastdebug) [disabled]
1835  --disable-headful       disable building headful support (graphical UI
1836                          support) [enabled]
1837  --enable-hotspot-test-in-build
1838                          run the Queens test after Hotspot build [disabled]
1839  --enable-unlimited-crypto
1840                          Enable unlimited crypto policy [disabled]
1841  --enable-rmiconnector-iiop
1842                          enable the JMX RMIConnector iiop transport
1843                          [disabled]
1844  --disable-debug-symbols disable generation of debug symbols [enabled]
1845  --disable-zip-debug-info
1846                          disable zipping of debug-info files [enabled]
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-sdk-name         use the platform SDK of the given name. [macosx]
1882  --with-conf-name        use this as the name of the configuration [generated
1883                          from important configuration options]
1884  --with-builddeps-conf   use this configuration file for the builddeps
1885  --with-builddeps-server download and use build dependencies from this server
1886                          url
1887  --with-builddeps-dir    store downloaded build dependencies here
1888                          [/localhome/builddeps]
1889  --with-builddeps-group  chgrp the downloaded build dependencies to this
1890                          group
1891  --with-cacerts-file     specify alternative cacerts file
1892  --with-milestone        Set milestone value for build [internal]
1893  --with-update-version   Set update version value for build [b00]
1894  --with-user-release-suffix
1895                          Add a custom string to the version string if build
1896                          number is not set.[username_builddateb00]
1897  --with-build-number     Set build number value for build [b00]
1898  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
1899  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
1900                          invocations of boot JDK, overriding the default
1901                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
1902                          -enableassertions"
1903  --with-add-source-root  for each and every source directory, look in this
1904                          additional source root for the same directory; if it
1905                          exists and have files in it, include it in the build
1906  --with-override-source-root
1907                          for each and every source directory, look in this
1908                          override source root for the same directory; if it
1909                          exists, use that directory instead and ignore the
1910                          directory in the original source root
1911  --with-adds-and-overrides
1912                          use the subdirs 'adds' and 'overrides' in the
1913                          specified directory as add-source-root and
1914                          override-source-root
1915  --with-override-langtools
1916                          use this langtools dir for the build
1917  --with-override-corba   use this corba dir for the build
1918  --with-override-jaxp    use this jaxp dir for the build
1919  --with-override-jaxws   use this jaxws dir for the build
1920  --with-override-hotspot use this hotspot dir for the build
1921  --with-override-nashorn use this nashorn dir for the build
1922  --with-override-jdk     use this jdk dir for the build
1923  --with-import-hotspot   import hotspot binaries from this jdk image or
1924                          hotspot build dist dir instead of building from
1925                          source
1926  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
1927                          to show possible values [platform dependent]
1928  --with-jtreg            Regression Test Harness [probed]
1929  --with-extra-cflags     extra flags to be used when compiling jdk c-files
1930  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
1931  --with-extra-ldflags    extra flags to be used when linking jdk
1932  --with-x                use the X Window System
1933  --with-cups             specify prefix directory for the cups package
1934                          (expecting the headers under PATH/include)
1935  --with-cups-include     specify directory for the cups include files
1936  --with-freetype         specify prefix directory for the freetype package
1937                          (expecting the libraries under PATH/lib and the
1938                          headers under PATH/include)
1939  --with-freetype-include specify directory for the freetype include files
1940  --with-freetype-lib     specify directory for the freetype library
1941  --with-alsa             specify prefix directory for the alsa package
1942                          (expecting the libraries under PATH/lib and the
1943                          headers under PATH/include)
1944  --with-alsa-include     specify directory for the alsa include files
1945  --with-alsa-lib         specify directory for the alsa library
1946  --with-libjpeg          use libjpeg from build system or OpenJDK source
1947                          (system, bundled) [bundled]
1948  --with-giflib           use giflib from build system or OpenJDK source
1949                          (system, bundled) [bundled]
1950  --with-lcms             use lcms2 from build system or OpenJDK source
1951                          (system, bundled) [bundled]
1952  --with-libpng           use libpng from build system or OpenJDK source
1953                          (system, bundled) [bundled]
1954  --with-zlib             use zlib from build system or OpenJDK source
1955                          (system, bundled) [bundled]
1956  --with-stdc++lib=<static>,<dynamic>,<default>
1957                          force linking of the C++ runtime on Linux to either
1958                          static or dynamic, default is static with dynamic as
1959                          fallback
1960  --with-msvcr-dll        copy this msvcr100.dll into the built JDK (Windows
1961                          only) [probed]
1962  --with-dxsdk            Deprecated. Option is kept for backwards
1963                          compatibility and is ignored
1964  --with-dxsdk-lib        Deprecated. Option is kept for backwards
1965                          compatibility and is ignored
1966  --with-dxsdk-include    Deprecated. Option is kept for backwards
1967                          compatibility and is ignored
1968  --with-num-cores        number of cores in the build system, e.g.
1969                          --with-num-cores=8 [probed]
1970  --with-memory-size      memory (in MB) available in the build system, e.g.
1971                          --with-memory-size=1024 [probed]
1972  --with-jobs             number of parallel jobs to let make run [calculated
1973                          based on cores and memory]
1974  --with-sjavac-server-java
1975                          use this java binary for running the sjavac
1976                          background server [Boot JDK java]
1977  --with-ccache-dir       where to store ccache files [~/.ccache]
1978
1979Some influential environment variables:
1980  BASENAME    Override default value for BASENAME
1981  BASH        Override default value for BASH
1982  CAT         Override default value for CAT
1983  CHMOD       Override default value for CHMOD
1984  CMP         Override default value for CMP
1985  COMM        Override default value for COMM
1986  CP          Override default value for CP
1987  CPIO        Override default value for CPIO
1988  CUT         Override default value for CUT
1989  DATE        Override default value for DATE
1990  DIFF        Override default value for DIFF
1991  DIRNAME     Override default value for DIRNAME
1992  ECHO        Override default value for ECHO
1993  EXPR        Override default value for EXPR
1994  FILE        Override default value for FILE
1995  FIND        Override default value for FIND
1996  HEAD        Override default value for HEAD
1997  LN          Override default value for LN
1998  LS          Override default value for LS
1999  MKDIR       Override default value for MKDIR
2000  MKTEMP      Override default value for MKTEMP
2001  MV          Override default value for MV
2002  NAWK        Override default value for NAWK
2003  PRINTF      Override default value for PRINTF
2004  RM          Override default value for RM
2005  SH          Override default value for SH
2006  SORT        Override default value for SORT
2007  TAIL        Override default value for TAIL
2008  TAR         Override default value for TAR
2009  TEE         Override default value for TEE
2010  TOUCH       Override default value for TOUCH
2011  TR          Override default value for TR
2012  UNAME       Override default value for UNAME
2013  UNIQ        Override default value for UNIQ
2014  WC          Override default value for WC
2015  WHICH       Override default value for WHICH
2016  XARGS       Override default value for XARGS
2017  AWK         Override default value for AWK
2018  GREP        Override default value for GREP
2019  EGREP       Override default value for EGREP
2020  FGREP       Override default value for FGREP
2021  SED         Override default value for SED
2022  CYGPATH     Override default value for CYGPATH
2023  READLINK    Override default value for READLINK
2024  DF          Override default value for DF
2025  SETFILE     Override default value for SETFILE
2026  UNZIP       Override default value for UNZIP
2027  ZIP         Override default value for ZIP
2028  LDD         Override default value for LDD
2029  OTOOL       Override default value for OTOOL
2030  READELF     Override default value for READELF
2031  HG          Override default value for HG
2032  STAT        Override default value for STAT
2033  TIME        Override default value for TIME
2034  DSYMUTIL    Override default value for DSYMUTIL
2035  XATTR       Override default value for XATTR
2036  CODESIGN    Override default value for CODESIGN
2037  PKG_CONFIG  path to pkg-config utility
2038  JAVA        Override default value for JAVA
2039  JAVAC       Override default value for JAVAC
2040  JAVAH       Override default value for JAVAH
2041  JAR         Override default value for JAR
2042  NATIVE2ASCII
2043              Override default value for NATIVE2ASCII
2044  JARSIGNER   Override default value for JARSIGNER
2045  CC          C compiler command
2046  CFLAGS      C compiler flags
2047  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2048              nonstandard directory <lib dir>
2049  LIBS        libraries to pass to the linker, e.g. -l<library>
2050  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2051              you have headers in a nonstandard directory <include dir>
2052  CXX         C++ compiler command
2053  CXXFLAGS    C++ compiler flags
2054  CPP         C preprocessor
2055  CXXCPP      C++ preprocessor
2056  AS          Override default value for AS
2057  AR          Override default value for AR
2058  OBJC        Objective C compiler command
2059  OBJCFLAGS   Objective C compiler flags
2060  LIPO        Override default value for LIPO
2061  STRIP       Override default value for STRIP
2062  NM          Override default value for NM
2063  GNM         Override default value for GNM
2064  MCS         Override default value for MCS
2065  OBJCOPY     Override default value for OBJCOPY
2066  OBJDUMP     Override default value for OBJDUMP
2067  BUILD_CC    Override default value for BUILD_CC
2068  BUILD_CXX   Override default value for BUILD_CXX
2069  BUILD_LD    Override default value for BUILD_LD
2070  JTREGEXE    Override default value for JTREGEXE
2071  XMKMF       Path to xmkmf, Makefile generator for X Window System
2072  FREETYPE_CFLAGS
2073              C compiler flags for FREETYPE, overriding pkg-config
2074  FREETYPE_LIBS
2075              linker flags for FREETYPE, overriding pkg-config
2076  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2077  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2078  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2079  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2080  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2081  PNG_LIBS    linker flags for PNG, overriding pkg-config
2082  LIBFFI_CFLAGS
2083              C compiler flags for LIBFFI, overriding pkg-config
2084  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2085  CCACHE      Override default value for CCACHE
2086
2087Use these variables to override the choices made by `configure' or to help
2088it to find libraries and programs with nonstandard names/locations.
2089
2090Report bugs to <build-dev@openjdk.java.net>.
2091OpenJDK home page: <http://openjdk.java.net>.
2092_ACEOF
2093ac_status=$?
2094fi
2095
2096if test "$ac_init_help" = "recursive"; then
2097  # If there are subdirs, report their specific --help.
2098  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2099    test -d "$ac_dir" ||
2100      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2101      continue
2102    ac_builddir=.
2103
2104case "$ac_dir" in
2105.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2106*)
2107  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2108  # A ".." for each directory in $ac_dir_suffix.
2109  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2110  case $ac_top_builddir_sub in
2111  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2112  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2113  esac ;;
2114esac
2115ac_abs_top_builddir=$ac_pwd
2116ac_abs_builddir=$ac_pwd$ac_dir_suffix
2117# for backward compatibility:
2118ac_top_builddir=$ac_top_build_prefix
2119
2120case $srcdir in
2121  .)  # We are building in place.
2122    ac_srcdir=.
2123    ac_top_srcdir=$ac_top_builddir_sub
2124    ac_abs_top_srcdir=$ac_pwd ;;
2125  [\\/]* | ?:[\\/]* )  # Absolute name.
2126    ac_srcdir=$srcdir$ac_dir_suffix;
2127    ac_top_srcdir=$srcdir
2128    ac_abs_top_srcdir=$srcdir ;;
2129  *) # Relative name.
2130    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2131    ac_top_srcdir=$ac_top_build_prefix$srcdir
2132    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2133esac
2134ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2135
2136    cd "$ac_dir" || { ac_status=$?; continue; }
2137    # Check for guested configure.
2138    if test -f "$ac_srcdir/configure.gnu"; then
2139      echo &&
2140      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2141    elif test -f "$ac_srcdir/configure"; then
2142      echo &&
2143      $SHELL "$ac_srcdir/configure" --help=recursive
2144    else
2145      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2146    fi || ac_status=$?
2147    cd "$ac_pwd" || { ac_status=$?; break; }
2148  done
2149fi
2150
2151test -n "$ac_init_help" && exit $ac_status
2152if $ac_init_version; then
2153  cat <<\_ACEOF
2154OpenJDK configure jdk9
2155generated by GNU Autoconf 2.69
2156
2157Copyright (C) 2012 Free Software Foundation, Inc.
2158This configure script is free software; the Free Software Foundation
2159gives unlimited permission to copy, distribute and modify it.
2160_ACEOF
2161  exit
2162fi
2163
2164## ------------------------ ##
2165## Autoconf initialization. ##
2166## ------------------------ ##
2167
2168# ac_fn_c_try_compile LINENO
2169# --------------------------
2170# Try to compile conftest.$ac_ext, and return whether this succeeded.
2171ac_fn_c_try_compile ()
2172{
2173  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2174  rm -f conftest.$ac_objext
2175  if { { ac_try="$ac_compile"
2176case "(($ac_try" in
2177  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2178  *) ac_try_echo=$ac_try;;
2179esac
2180eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2181$as_echo "$ac_try_echo"; } >&5
2182  (eval "$ac_compile") 2>conftest.err
2183  ac_status=$?
2184  if test -s conftest.err; then
2185    grep -v '^ *+' conftest.err >conftest.er1
2186    cat conftest.er1 >&5
2187    mv -f conftest.er1 conftest.err
2188  fi
2189  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2190  test $ac_status = 0; } && {
2191	 test -z "$ac_c_werror_flag" ||
2192	 test ! -s conftest.err
2193       } && test -s conftest.$ac_objext; then :
2194  ac_retval=0
2195else
2196  $as_echo "$as_me: failed program was:" >&5
2197sed 's/^/| /' conftest.$ac_ext >&5
2198
2199	ac_retval=1
2200fi
2201  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2202  as_fn_set_status $ac_retval
2203
2204} # ac_fn_c_try_compile
2205
2206# ac_fn_cxx_try_compile LINENO
2207# ----------------------------
2208# Try to compile conftest.$ac_ext, and return whether this succeeded.
2209ac_fn_cxx_try_compile ()
2210{
2211  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2212  rm -f conftest.$ac_objext
2213  if { { ac_try="$ac_compile"
2214case "(($ac_try" in
2215  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2216  *) ac_try_echo=$ac_try;;
2217esac
2218eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2219$as_echo "$ac_try_echo"; } >&5
2220  (eval "$ac_compile") 2>conftest.err
2221  ac_status=$?
2222  if test -s conftest.err; then
2223    grep -v '^ *+' conftest.err >conftest.er1
2224    cat conftest.er1 >&5
2225    mv -f conftest.er1 conftest.err
2226  fi
2227  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2228  test $ac_status = 0; } && {
2229	 test -z "$ac_cxx_werror_flag" ||
2230	 test ! -s conftest.err
2231       } && test -s conftest.$ac_objext; then :
2232  ac_retval=0
2233else
2234  $as_echo "$as_me: failed program was:" >&5
2235sed 's/^/| /' conftest.$ac_ext >&5
2236
2237	ac_retval=1
2238fi
2239  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2240  as_fn_set_status $ac_retval
2241
2242} # ac_fn_cxx_try_compile
2243
2244# ac_fn_c_try_cpp LINENO
2245# ----------------------
2246# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2247ac_fn_c_try_cpp ()
2248{
2249  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2250  if { { ac_try="$ac_cpp conftest.$ac_ext"
2251case "(($ac_try" in
2252  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2253  *) ac_try_echo=$ac_try;;
2254esac
2255eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2256$as_echo "$ac_try_echo"; } >&5
2257  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2258  ac_status=$?
2259  if test -s conftest.err; then
2260    grep -v '^ *+' conftest.err >conftest.er1
2261    cat conftest.er1 >&5
2262    mv -f conftest.er1 conftest.err
2263  fi
2264  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2265  test $ac_status = 0; } > conftest.i && {
2266	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2267	 test ! -s conftest.err
2268       }; then :
2269  ac_retval=0
2270else
2271  $as_echo "$as_me: failed program was:" >&5
2272sed 's/^/| /' conftest.$ac_ext >&5
2273
2274    ac_retval=1
2275fi
2276  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2277  as_fn_set_status $ac_retval
2278
2279} # ac_fn_c_try_cpp
2280
2281# ac_fn_cxx_try_cpp LINENO
2282# ------------------------
2283# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2284ac_fn_cxx_try_cpp ()
2285{
2286  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2287  if { { ac_try="$ac_cpp conftest.$ac_ext"
2288case "(($ac_try" in
2289  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2290  *) ac_try_echo=$ac_try;;
2291esac
2292eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2293$as_echo "$ac_try_echo"; } >&5
2294  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2295  ac_status=$?
2296  if test -s conftest.err; then
2297    grep -v '^ *+' conftest.err >conftest.er1
2298    cat conftest.er1 >&5
2299    mv -f conftest.er1 conftest.err
2300  fi
2301  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2302  test $ac_status = 0; } > conftest.i && {
2303	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2304	 test ! -s conftest.err
2305       }; then :
2306  ac_retval=0
2307else
2308  $as_echo "$as_me: failed program was:" >&5
2309sed 's/^/| /' conftest.$ac_ext >&5
2310
2311    ac_retval=1
2312fi
2313  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2314  as_fn_set_status $ac_retval
2315
2316} # ac_fn_cxx_try_cpp
2317
2318# ac_fn_objc_try_compile LINENO
2319# -----------------------------
2320# Try to compile conftest.$ac_ext, and return whether this succeeded.
2321ac_fn_objc_try_compile ()
2322{
2323  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324  rm -f conftest.$ac_objext
2325  if { { ac_try="$ac_compile"
2326case "(($ac_try" in
2327  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2328  *) ac_try_echo=$ac_try;;
2329esac
2330eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2331$as_echo "$ac_try_echo"; } >&5
2332  (eval "$ac_compile") 2>conftest.err
2333  ac_status=$?
2334  if test -s conftest.err; then
2335    grep -v '^ *+' conftest.err >conftest.er1
2336    cat conftest.er1 >&5
2337    mv -f conftest.er1 conftest.err
2338  fi
2339  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2340  test $ac_status = 0; } && {
2341	 test -z "$ac_objc_werror_flag" ||
2342	 test ! -s conftest.err
2343       } && test -s conftest.$ac_objext; then :
2344  ac_retval=0
2345else
2346  $as_echo "$as_me: failed program was:" >&5
2347sed 's/^/| /' conftest.$ac_ext >&5
2348
2349	ac_retval=1
2350fi
2351  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2352  as_fn_set_status $ac_retval
2353
2354} # ac_fn_objc_try_compile
2355
2356# ac_fn_c_try_link LINENO
2357# -----------------------
2358# Try to link conftest.$ac_ext, and return whether this succeeded.
2359ac_fn_c_try_link ()
2360{
2361  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2362  rm -f conftest.$ac_objext conftest$ac_exeext
2363  if { { ac_try="$ac_link"
2364case "(($ac_try" in
2365  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2366  *) ac_try_echo=$ac_try;;
2367esac
2368eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2369$as_echo "$ac_try_echo"; } >&5
2370  (eval "$ac_link") 2>conftest.err
2371  ac_status=$?
2372  if test -s conftest.err; then
2373    grep -v '^ *+' conftest.err >conftest.er1
2374    cat conftest.er1 >&5
2375    mv -f conftest.er1 conftest.err
2376  fi
2377  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2378  test $ac_status = 0; } && {
2379	 test -z "$ac_c_werror_flag" ||
2380	 test ! -s conftest.err
2381       } && test -s conftest$ac_exeext && {
2382	 test "$cross_compiling" = yes ||
2383	 test -x conftest$ac_exeext
2384       }; then :
2385  ac_retval=0
2386else
2387  $as_echo "$as_me: failed program was:" >&5
2388sed 's/^/| /' conftest.$ac_ext >&5
2389
2390	ac_retval=1
2391fi
2392  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2393  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2394  # interfere with the next link command; also delete a directory that is
2395  # left behind by Apple's compiler.  We do this before executing the actions.
2396  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2397  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2398  as_fn_set_status $ac_retval
2399
2400} # ac_fn_c_try_link
2401
2402# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2403# ---------------------------------------------------------
2404# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2405# the include files in INCLUDES and setting the cache variable VAR
2406# accordingly.
2407ac_fn_cxx_check_header_mongrel ()
2408{
2409  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2410  if eval \${$3+:} false; then :
2411  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2412$as_echo_n "checking for $2... " >&6; }
2413if eval \${$3+:} false; then :
2414  $as_echo_n "(cached) " >&6
2415fi
2416eval ac_res=\$$3
2417	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2418$as_echo "$ac_res" >&6; }
2419else
2420  # Is the header compilable?
2421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2422$as_echo_n "checking $2 usability... " >&6; }
2423cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2424/* end confdefs.h.  */
2425$4
2426#include <$2>
2427_ACEOF
2428if ac_fn_cxx_try_compile "$LINENO"; then :
2429  ac_header_compiler=yes
2430else
2431  ac_header_compiler=no
2432fi
2433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2435$as_echo "$ac_header_compiler" >&6; }
2436
2437# Is the header present?
2438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2439$as_echo_n "checking $2 presence... " >&6; }
2440cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2441/* end confdefs.h.  */
2442#include <$2>
2443_ACEOF
2444if ac_fn_cxx_try_cpp "$LINENO"; then :
2445  ac_header_preproc=yes
2446else
2447  ac_header_preproc=no
2448fi
2449rm -f conftest.err conftest.i conftest.$ac_ext
2450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2451$as_echo "$ac_header_preproc" >&6; }
2452
2453# So?  What about this header?
2454case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2455  yes:no: )
2456    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2457$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2458    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2459$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2460    ;;
2461  no:yes:* )
2462    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2463$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2464    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2465$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2466    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2467$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2468    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2469$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2470    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2471$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2472( $as_echo "## ----------------------------------------- ##
2473## Report this to build-dev@openjdk.java.net ##
2474## ----------------------------------------- ##"
2475     ) | sed "s/^/$as_me: WARNING:     /" >&2
2476    ;;
2477esac
2478  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2479$as_echo_n "checking for $2... " >&6; }
2480if eval \${$3+:} false; then :
2481  $as_echo_n "(cached) " >&6
2482else
2483  eval "$3=\$ac_header_compiler"
2484fi
2485eval ac_res=\$$3
2486	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2487$as_echo "$ac_res" >&6; }
2488fi
2489  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2490
2491} # ac_fn_cxx_check_header_mongrel
2492
2493# ac_fn_cxx_try_run LINENO
2494# ------------------------
2495# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2496# that executables *can* be run.
2497ac_fn_cxx_try_run ()
2498{
2499  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2500  if { { ac_try="$ac_link"
2501case "(($ac_try" in
2502  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2503  *) ac_try_echo=$ac_try;;
2504esac
2505eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2506$as_echo "$ac_try_echo"; } >&5
2507  (eval "$ac_link") 2>&5
2508  ac_status=$?
2509  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2510  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2511  { { case "(($ac_try" in
2512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513  *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517  (eval "$ac_try") 2>&5
2518  ac_status=$?
2519  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2520  test $ac_status = 0; }; }; then :
2521  ac_retval=0
2522else
2523  $as_echo "$as_me: program exited with status $ac_status" >&5
2524       $as_echo "$as_me: failed program was:" >&5
2525sed 's/^/| /' conftest.$ac_ext >&5
2526
2527       ac_retval=$ac_status
2528fi
2529  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2530  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2531  as_fn_set_status $ac_retval
2532
2533} # ac_fn_cxx_try_run
2534
2535# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2536# ---------------------------------------------------------
2537# Tests whether HEADER exists and can be compiled using the include files in
2538# INCLUDES, setting the cache variable VAR accordingly.
2539ac_fn_cxx_check_header_compile ()
2540{
2541  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2542  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2543$as_echo_n "checking for $2... " >&6; }
2544if eval \${$3+:} false; then :
2545  $as_echo_n "(cached) " >&6
2546else
2547  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2548/* end confdefs.h.  */
2549$4
2550#include <$2>
2551_ACEOF
2552if ac_fn_cxx_try_compile "$LINENO"; then :
2553  eval "$3=yes"
2554else
2555  eval "$3=no"
2556fi
2557rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2558fi
2559eval ac_res=\$$3
2560	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2561$as_echo "$ac_res" >&6; }
2562  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2563
2564} # ac_fn_cxx_check_header_compile
2565
2566# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2567# ----------------------------------------------
2568# Tries to find the compile-time value of EXPR in a program that includes
2569# INCLUDES, setting VAR accordingly. Returns whether the value could be
2570# computed
2571ac_fn_cxx_compute_int ()
2572{
2573  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2574  if test "$cross_compiling" = yes; then
2575    # Depending upon the size, compute the lo and hi bounds.
2576cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2577/* end confdefs.h.  */
2578$4
2579int
2580main ()
2581{
2582static int test_array [1 - 2 * !(($2) >= 0)];
2583test_array [0] = 0;
2584return test_array [0];
2585
2586  ;
2587  return 0;
2588}
2589_ACEOF
2590if ac_fn_cxx_try_compile "$LINENO"; then :
2591  ac_lo=0 ac_mid=0
2592  while :; do
2593    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2594/* end confdefs.h.  */
2595$4
2596int
2597main ()
2598{
2599static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2600test_array [0] = 0;
2601return test_array [0];
2602
2603  ;
2604  return 0;
2605}
2606_ACEOF
2607if ac_fn_cxx_try_compile "$LINENO"; then :
2608  ac_hi=$ac_mid; break
2609else
2610  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2611			if test $ac_lo -le $ac_mid; then
2612			  ac_lo= ac_hi=
2613			  break
2614			fi
2615			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2616fi
2617rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2618  done
2619else
2620  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2621/* end confdefs.h.  */
2622$4
2623int
2624main ()
2625{
2626static int test_array [1 - 2 * !(($2) < 0)];
2627test_array [0] = 0;
2628return test_array [0];
2629
2630  ;
2631  return 0;
2632}
2633_ACEOF
2634if ac_fn_cxx_try_compile "$LINENO"; then :
2635  ac_hi=-1 ac_mid=-1
2636  while :; do
2637    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2638/* end confdefs.h.  */
2639$4
2640int
2641main ()
2642{
2643static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2644test_array [0] = 0;
2645return test_array [0];
2646
2647  ;
2648  return 0;
2649}
2650_ACEOF
2651if ac_fn_cxx_try_compile "$LINENO"; then :
2652  ac_lo=$ac_mid; break
2653else
2654  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2655			if test $ac_mid -le $ac_hi; then
2656			  ac_lo= ac_hi=
2657			  break
2658			fi
2659			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2660fi
2661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2662  done
2663else
2664  ac_lo= ac_hi=
2665fi
2666rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2667fi
2668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2669# Binary search between lo and hi bounds.
2670while test "x$ac_lo" != "x$ac_hi"; do
2671  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2672  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2673/* end confdefs.h.  */
2674$4
2675int
2676main ()
2677{
2678static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2679test_array [0] = 0;
2680return test_array [0];
2681
2682  ;
2683  return 0;
2684}
2685_ACEOF
2686if ac_fn_cxx_try_compile "$LINENO"; then :
2687  ac_hi=$ac_mid
2688else
2689  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2690fi
2691rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692done
2693case $ac_lo in #((
2694?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2695'') ac_retval=1 ;;
2696esac
2697  else
2698    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2699/* end confdefs.h.  */
2700$4
2701static long int longval () { return $2; }
2702static unsigned long int ulongval () { return $2; }
2703#include <stdio.h>
2704#include <stdlib.h>
2705int
2706main ()
2707{
2708
2709  FILE *f = fopen ("conftest.val", "w");
2710  if (! f)
2711    return 1;
2712  if (($2) < 0)
2713    {
2714      long int i = longval ();
2715      if (i != ($2))
2716	return 1;
2717      fprintf (f, "%ld", i);
2718    }
2719  else
2720    {
2721      unsigned long int i = ulongval ();
2722      if (i != ($2))
2723	return 1;
2724      fprintf (f, "%lu", i);
2725    }
2726  /* Do not output a trailing newline, as this causes \r\n confusion
2727     on some platforms.  */
2728  return ferror (f) || fclose (f) != 0;
2729
2730  ;
2731  return 0;
2732}
2733_ACEOF
2734if ac_fn_cxx_try_run "$LINENO"; then :
2735  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2736else
2737  ac_retval=1
2738fi
2739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2740  conftest.$ac_objext conftest.beam conftest.$ac_ext
2741rm -f conftest.val
2742
2743  fi
2744  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2745  as_fn_set_status $ac_retval
2746
2747} # ac_fn_cxx_compute_int
2748
2749# ac_fn_cxx_try_link LINENO
2750# -------------------------
2751# Try to link conftest.$ac_ext, and return whether this succeeded.
2752ac_fn_cxx_try_link ()
2753{
2754  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2755  rm -f conftest.$ac_objext conftest$ac_exeext
2756  if { { ac_try="$ac_link"
2757case "(($ac_try" in
2758  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2759  *) ac_try_echo=$ac_try;;
2760esac
2761eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2762$as_echo "$ac_try_echo"; } >&5
2763  (eval "$ac_link") 2>conftest.err
2764  ac_status=$?
2765  if test -s conftest.err; then
2766    grep -v '^ *+' conftest.err >conftest.er1
2767    cat conftest.er1 >&5
2768    mv -f conftest.er1 conftest.err
2769  fi
2770  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2771  test $ac_status = 0; } && {
2772	 test -z "$ac_cxx_werror_flag" ||
2773	 test ! -s conftest.err
2774       } && test -s conftest$ac_exeext && {
2775	 test "$cross_compiling" = yes ||
2776	 test -x conftest$ac_exeext
2777       }; then :
2778  ac_retval=0
2779else
2780  $as_echo "$as_me: failed program was:" >&5
2781sed 's/^/| /' conftest.$ac_ext >&5
2782
2783	ac_retval=1
2784fi
2785  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2786  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2787  # interfere with the next link command; also delete a directory that is
2788  # left behind by Apple's compiler.  We do this before executing the actions.
2789  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2790  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791  as_fn_set_status $ac_retval
2792
2793} # ac_fn_cxx_try_link
2794
2795# ac_fn_cxx_check_func LINENO FUNC VAR
2796# ------------------------------------
2797# Tests whether FUNC exists, setting the cache variable VAR accordingly
2798ac_fn_cxx_check_func ()
2799{
2800  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2802$as_echo_n "checking for $2... " >&6; }
2803if eval \${$3+:} false; then :
2804  $as_echo_n "(cached) " >&6
2805else
2806  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2807/* end confdefs.h.  */
2808/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2809   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2810#define $2 innocuous_$2
2811
2812/* System header to define __stub macros and hopefully few prototypes,
2813    which can conflict with char $2 (); below.
2814    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2815    <limits.h> exists even on freestanding compilers.  */
2816
2817#ifdef __STDC__
2818# include <limits.h>
2819#else
2820# include <assert.h>
2821#endif
2822
2823#undef $2
2824
2825/* Override any GCC internal prototype to avoid an error.
2826   Use char because int might match the return type of a GCC
2827   builtin and then its argument prototype would still apply.  */
2828#ifdef __cplusplus
2829extern "C"
2830#endif
2831char $2 ();
2832/* The GNU C library defines this for functions which it implements
2833    to always fail with ENOSYS.  Some functions are actually named
2834    something starting with __ and the normal name is an alias.  */
2835#if defined __stub_$2 || defined __stub___$2
2836choke me
2837#endif
2838
2839int
2840main ()
2841{
2842return $2 ();
2843  ;
2844  return 0;
2845}
2846_ACEOF
2847if ac_fn_cxx_try_link "$LINENO"; then :
2848  eval "$3=yes"
2849else
2850  eval "$3=no"
2851fi
2852rm -f core conftest.err conftest.$ac_objext \
2853    conftest$ac_exeext conftest.$ac_ext
2854fi
2855eval ac_res=\$$3
2856	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2857$as_echo "$ac_res" >&6; }
2858  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2859
2860} # ac_fn_cxx_check_func
2861
2862# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2863# -------------------------------------------------------
2864# Tests whether HEADER exists and can be compiled using the include files in
2865# INCLUDES, setting the cache variable VAR accordingly.
2866ac_fn_c_check_header_compile ()
2867{
2868  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2869  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2870$as_echo_n "checking for $2... " >&6; }
2871if eval \${$3+:} false; then :
2872  $as_echo_n "(cached) " >&6
2873else
2874  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2875/* end confdefs.h.  */
2876$4
2877#include <$2>
2878_ACEOF
2879if ac_fn_c_try_compile "$LINENO"; then :
2880  eval "$3=yes"
2881else
2882  eval "$3=no"
2883fi
2884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2885fi
2886eval ac_res=\$$3
2887	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2888$as_echo "$ac_res" >&6; }
2889  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2890
2891} # ac_fn_c_check_header_compile
2892cat >config.log <<_ACEOF
2893This file contains any messages produced by compilers while
2894running configure, to aid debugging if configure makes a mistake.
2895
2896It was created by OpenJDK $as_me jdk9, which was
2897generated by GNU Autoconf 2.69.  Invocation command line was
2898
2899  $ $0 $@
2900
2901_ACEOF
2902exec 5>>config.log
2903{
2904cat <<_ASUNAME
2905## --------- ##
2906## Platform. ##
2907## --------- ##
2908
2909hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2910uname -m = `(uname -m) 2>/dev/null || echo unknown`
2911uname -r = `(uname -r) 2>/dev/null || echo unknown`
2912uname -s = `(uname -s) 2>/dev/null || echo unknown`
2913uname -v = `(uname -v) 2>/dev/null || echo unknown`
2914
2915/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2916/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2917
2918/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2919/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2920/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2921/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2922/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2923/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2924/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2925
2926_ASUNAME
2927
2928as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2929for as_dir in $PATH
2930do
2931  IFS=$as_save_IFS
2932  test -z "$as_dir" && as_dir=.
2933    $as_echo "PATH: $as_dir"
2934  done
2935IFS=$as_save_IFS
2936
2937} >&5
2938
2939cat >&5 <<_ACEOF
2940
2941
2942## ----------- ##
2943## Core tests. ##
2944## ----------- ##
2945
2946_ACEOF
2947
2948
2949# Keep a trace of the command line.
2950# Strip out --no-create and --no-recursion so they do not pile up.
2951# Strip out --silent because we don't want to record it for future runs.
2952# Also quote any args containing shell meta-characters.
2953# Make two passes to allow for proper duplicate-argument suppression.
2954ac_configure_args=
2955ac_configure_args0=
2956ac_configure_args1=
2957ac_must_keep_next=false
2958for ac_pass in 1 2
2959do
2960  for ac_arg
2961  do
2962    case $ac_arg in
2963    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2964    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2965    | -silent | --silent | --silen | --sile | --sil)
2966      continue ;;
2967    *\'*)
2968      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2969    esac
2970    case $ac_pass in
2971    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2972    2)
2973      as_fn_append ac_configure_args1 " '$ac_arg'"
2974      if test $ac_must_keep_next = true; then
2975	ac_must_keep_next=false # Got value, back to normal.
2976      else
2977	case $ac_arg in
2978	  *=* | --config-cache | -C | -disable-* | --disable-* \
2979	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2980	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2981	  | -with-* | --with-* | -without-* | --without-* | --x)
2982	    case "$ac_configure_args0 " in
2983	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2984	    esac
2985	    ;;
2986	  -* ) ac_must_keep_next=true ;;
2987	esac
2988      fi
2989      as_fn_append ac_configure_args " '$ac_arg'"
2990      ;;
2991    esac
2992  done
2993done
2994{ ac_configure_args0=; unset ac_configure_args0;}
2995{ ac_configure_args1=; unset ac_configure_args1;}
2996
2997# When interrupted or exit'd, cleanup temporary files, and complete
2998# config.log.  We remove comments because anyway the quotes in there
2999# would cause problems or look ugly.
3000# WARNING: Use '\'' to represent an apostrophe within the trap.
3001# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3002trap 'exit_status=$?
3003  # Save into config.log some information that might help in debugging.
3004  {
3005    echo
3006
3007    $as_echo "## ---------------- ##
3008## Cache variables. ##
3009## ---------------- ##"
3010    echo
3011    # The following way of writing the cache mishandles newlines in values,
3012(
3013  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3014    eval ac_val=\$$ac_var
3015    case $ac_val in #(
3016    *${as_nl}*)
3017      case $ac_var in #(
3018      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3019$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3020      esac
3021      case $ac_var in #(
3022      _ | IFS | as_nl) ;; #(
3023      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3024      *) { eval $ac_var=; unset $ac_var;} ;;
3025      esac ;;
3026    esac
3027  done
3028  (set) 2>&1 |
3029    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3030    *${as_nl}ac_space=\ *)
3031      sed -n \
3032	"s/'\''/'\''\\\\'\'''\''/g;
3033	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3034      ;; #(
3035    *)
3036      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3037      ;;
3038    esac |
3039    sort
3040)
3041    echo
3042
3043    $as_echo "## ----------------- ##
3044## Output variables. ##
3045## ----------------- ##"
3046    echo
3047    for ac_var in $ac_subst_vars
3048    do
3049      eval ac_val=\$$ac_var
3050      case $ac_val in
3051      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3052      esac
3053      $as_echo "$ac_var='\''$ac_val'\''"
3054    done | sort
3055    echo
3056
3057    if test -n "$ac_subst_files"; then
3058      $as_echo "## ------------------- ##
3059## File substitutions. ##
3060## ------------------- ##"
3061      echo
3062      for ac_var in $ac_subst_files
3063      do
3064	eval ac_val=\$$ac_var
3065	case $ac_val in
3066	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3067	esac
3068	$as_echo "$ac_var='\''$ac_val'\''"
3069      done | sort
3070      echo
3071    fi
3072
3073    if test -s confdefs.h; then
3074      $as_echo "## ----------- ##
3075## confdefs.h. ##
3076## ----------- ##"
3077      echo
3078      cat confdefs.h
3079      echo
3080    fi
3081    test "$ac_signal" != 0 &&
3082      $as_echo "$as_me: caught signal $ac_signal"
3083    $as_echo "$as_me: exit $exit_status"
3084  } >&5
3085  rm -f core *.core core.conftest.* &&
3086    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3087    exit $exit_status
3088' 0
3089for ac_signal in 1 2 13 15; do
3090  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3091done
3092ac_signal=0
3093
3094# confdefs.h avoids OS command line length limits that DEFS can exceed.
3095rm -f -r conftest* confdefs.h
3096
3097$as_echo "/* confdefs.h */" > confdefs.h
3098
3099# Predefined preprocessor variables.
3100
3101cat >>confdefs.h <<_ACEOF
3102#define PACKAGE_NAME "$PACKAGE_NAME"
3103_ACEOF
3104
3105cat >>confdefs.h <<_ACEOF
3106#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3107_ACEOF
3108
3109cat >>confdefs.h <<_ACEOF
3110#define PACKAGE_VERSION "$PACKAGE_VERSION"
3111_ACEOF
3112
3113cat >>confdefs.h <<_ACEOF
3114#define PACKAGE_STRING "$PACKAGE_STRING"
3115_ACEOF
3116
3117cat >>confdefs.h <<_ACEOF
3118#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3119_ACEOF
3120
3121cat >>confdefs.h <<_ACEOF
3122#define PACKAGE_URL "$PACKAGE_URL"
3123_ACEOF
3124
3125
3126# Let the site file select an alternate cache file if it wants to.
3127# Prefer an explicitly selected file to automatically selected ones.
3128ac_site_file1=NONE
3129ac_site_file2=NONE
3130if test -n "$CONFIG_SITE"; then
3131  # We do not want a PATH search for config.site.
3132  case $CONFIG_SITE in #((
3133    -*)  ac_site_file1=./$CONFIG_SITE;;
3134    */*) ac_site_file1=$CONFIG_SITE;;
3135    *)   ac_site_file1=./$CONFIG_SITE;;
3136  esac
3137elif test "x$prefix" != xNONE; then
3138  ac_site_file1=$prefix/share/config.site
3139  ac_site_file2=$prefix/etc/config.site
3140else
3141  ac_site_file1=$ac_default_prefix/share/config.site
3142  ac_site_file2=$ac_default_prefix/etc/config.site
3143fi
3144for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3145do
3146  test "x$ac_site_file" = xNONE && continue
3147  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3148    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3149$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3150    sed 's/^/| /' "$ac_site_file" >&5
3151    . "$ac_site_file" \
3152      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3153$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3154as_fn_error $? "failed to load site script $ac_site_file
3155See \`config.log' for more details" "$LINENO" 5; }
3156  fi
3157done
3158
3159if test -r "$cache_file"; then
3160  # Some versions of bash will fail to source /dev/null (special files
3161  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3162  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3163    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3164$as_echo "$as_me: loading cache $cache_file" >&6;}
3165    case $cache_file in
3166      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3167      *)                      . "./$cache_file";;
3168    esac
3169  fi
3170else
3171  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3172$as_echo "$as_me: creating cache $cache_file" >&6;}
3173  >$cache_file
3174fi
3175
3176# Check that the precious variables saved in the cache have kept the same
3177# value.
3178ac_cache_corrupted=false
3179for ac_var in $ac_precious_vars; do
3180  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3181  eval ac_new_set=\$ac_env_${ac_var}_set
3182  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3183  eval ac_new_val=\$ac_env_${ac_var}_value
3184  case $ac_old_set,$ac_new_set in
3185    set,)
3186      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3187$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3188      ac_cache_corrupted=: ;;
3189    ,set)
3190      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3191$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3192      ac_cache_corrupted=: ;;
3193    ,);;
3194    *)
3195      if test "x$ac_old_val" != "x$ac_new_val"; then
3196	# differences in whitespace do not lead to failure.
3197	ac_old_val_w=`echo x $ac_old_val`
3198	ac_new_val_w=`echo x $ac_new_val`
3199	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3200	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3201$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3202	  ac_cache_corrupted=:
3203	else
3204	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3205$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3206	  eval $ac_var=\$ac_old_val
3207	fi
3208	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3209$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3210	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3211$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3212      fi;;
3213  esac
3214  # Pass precious variables to config.status.
3215  if test "$ac_new_set" = set; then
3216    case $ac_new_val in
3217    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3218    *) ac_arg=$ac_var=$ac_new_val ;;
3219    esac
3220    case " $ac_configure_args " in
3221      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3222      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3223    esac
3224  fi
3225done
3226if $ac_cache_corrupted; then
3227  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3228$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3229  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3230$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3231  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3232fi
3233## -------------------- ##
3234## Main body of script. ##
3235## -------------------- ##
3236
3237ac_ext=c
3238ac_cpp='$CPP $CPPFLAGS'
3239ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3240ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3241ac_compiler_gnu=$ac_cv_c_compiler_gnu
3242
3243
3244
3245ac_aux_dir=
3246for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3247  if test -f "$ac_dir/install-sh"; then
3248    ac_aux_dir=$ac_dir
3249    ac_install_sh="$ac_aux_dir/install-sh -c"
3250    break
3251  elif test -f "$ac_dir/install.sh"; then
3252    ac_aux_dir=$ac_dir
3253    ac_install_sh="$ac_aux_dir/install.sh -c"
3254    break
3255  elif test -f "$ac_dir/shtool"; then
3256    ac_aux_dir=$ac_dir
3257    ac_install_sh="$ac_aux_dir/shtool install -c"
3258    break
3259  fi
3260done
3261if test -z "$ac_aux_dir"; then
3262  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
3263fi
3264
3265# These three variables are undocumented and unsupported,
3266# and are intended to be withdrawn in a future Autoconf release.
3267# They can cause serious problems if a builder's source tree is in a directory
3268# whose full name contains unusual characters.
3269ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3270ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3271ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3272
3273
3274# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3275
3276#
3277# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3278# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3279#
3280# This code is free software; you can redistribute it and/or modify it
3281# under the terms of the GNU General Public License version 2 only, as
3282# published by the Free Software Foundation.  Oracle designates this
3283# particular file as subject to the "Classpath" exception as provided
3284# by Oracle in the LICENSE file that accompanied this code.
3285#
3286# This code is distributed in the hope that it will be useful, but WITHOUT
3287# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3288# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3289# version 2 for more details (a copy is included in the LICENSE file that
3290# accompanied this code).
3291#
3292# You should have received a copy of the GNU General Public License version
3293# 2 along with this work; if not, write to the Free Software Foundation,
3294# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3295#
3296# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3297# or visit www.oracle.com if you need additional information or have any
3298# questions.
3299#
3300
3301#
3302# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3303#
3304# This program is free software; you can redistribute it and/or modify
3305# it under the terms of the GNU General Public License as published by
3306# the Free Software Foundation; either version 2 of the License, or
3307# (at your option) any later version.
3308#
3309# This program is distributed in the hope that it will be useful, but
3310# WITHOUT ANY WARRANTY; without even the implied warranty of
3311# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3312# General Public License for more details.
3313#
3314# You should have received a copy of the GNU General Public License
3315# along with this program; if not, write to the Free Software
3316# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3317#
3318# As a special exception to the GNU General Public License, if you
3319# distribute this file as part of a program that contains a
3320# configuration script generated by Autoconf, you may include it under
3321# the same distribution terms that you use for the rest of that program.
3322
3323# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3324# ----------------------------------
3325# PKG_PROG_PKG_CONFIG
3326
3327# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3328#
3329# Check to see whether a particular set of modules exists.  Similar
3330# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3331#
3332#
3333# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3334# this or PKG_CHECK_MODULES is called, or make sure to call
3335# PKG_CHECK_EXISTS manually
3336# --------------------------------------------------------------
3337
3338
3339
3340# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3341# ---------------------------------------------
3342# _PKG_CONFIG
3343
3344# _PKG_SHORT_ERRORS_SUPPORTED
3345# -----------------------------
3346# _PKG_SHORT_ERRORS_SUPPORTED
3347
3348
3349# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3350# [ACTION-IF-NOT-FOUND])
3351#
3352#
3353# Note that if there is a possibility the first call to
3354# PKG_CHECK_MODULES might not happen, you should be sure to include an
3355# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3356#
3357#
3358# --------------------------------------------------------------
3359# PKG_CHECK_MODULES
3360
3361
3362# Include these first...
3363#
3364# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3365# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3366#
3367# This code is free software; you can redistribute it and/or modify it
3368# under the terms of the GNU General Public License version 2 only, as
3369# published by the Free Software Foundation.  Oracle designates this
3370# particular file as subject to the "Classpath" exception as provided
3371# by Oracle in the LICENSE file that accompanied this code.
3372#
3373# This code is distributed in the hope that it will be useful, but WITHOUT
3374# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3375# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3376# version 2 for more details (a copy is included in the LICENSE file that
3377# accompanied this code).
3378#
3379# You should have received a copy of the GNU General Public License version
3380# 2 along with this work; if not, write to the Free Software Foundation,
3381# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3382#
3383# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3384# or visit www.oracle.com if you need additional information or have any
3385# questions.
3386#
3387
3388# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3389# If so, then append $1 to $2 \
3390# Also set JVM_ARG_OK to true/false depending on outcome.
3391
3392
3393# Appends a string to a path variable, only adding the : when needed.
3394
3395
3396# Prepends a string to a path variable, only adding the : when needed.
3397
3398
3399# This will make sure the given variable points to a full and proper
3400# path. This means:
3401# 1) There will be no spaces in the path. On posix platforms,
3402#    spaces in the path will result in an error. On Windows,
3403#    the path will be rewritten using short-style to be space-free.
3404# 2) The path will be absolute, and it will be in unix-style (on
3405#     cygwin).
3406# $1: The name of the variable to fix
3407
3408
3409# This will make sure the given variable points to a executable
3410# with a full and proper path. This means:
3411# 1) There will be no spaces in the path. On posix platforms,
3412#    spaces in the path will result in an error. On Windows,
3413#    the path will be rewritten using short-style to be space-free.
3414# 2) The path will be absolute, and it will be in unix-style (on
3415#     cygwin).
3416# Any arguments given to the executable is preserved.
3417# If the input variable does not have a directory specification, then
3418# it need to be in the PATH.
3419# $1: The name of the variable to fix
3420
3421
3422
3423
3424# Register a --with argument but mark it as deprecated
3425# $1: The name of the with argument to deprecate, not including --with-
3426
3427
3428# Register a --enable argument but mark it as deprecated
3429# $1: The name of the with argument to deprecate, not including --enable-
3430# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3431
3432
3433
3434
3435# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3436# $1: variable to check
3437
3438
3439# Check that there are no unprocessed overridden variables left.
3440# If so, they are an incorrect argument and we will exit with an error.
3441
3442
3443# Setup a tool for the given variable. If correctly specified by the user,
3444# use that value, otherwise search for the tool using the supplied code snippet.
3445# $1: variable to set
3446# $2: code snippet to call to look for the tool
3447
3448
3449# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3450# $1: variable to set
3451# $2: executable name (or list of names) to look for
3452
3453
3454# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3455# $1: variable to set
3456# $2: executable name (or list of names) to look for
3457
3458
3459# Like BASIC_PATH_PROGS but fails if no tool was found.
3460# $1: variable to set
3461# $2: executable name (or list of names) to look for
3462
3463
3464# Like BASIC_SETUP_TOOL but fails if no tool was found.
3465# $1: variable to set
3466# $2: autoconf macro to call to look for the special tool
3467
3468
3469# Setup the most fundamental tools that relies on not much else to set up,
3470# but is used by much of the early bootstrap code.
3471
3472
3473# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483#%%% Simple tools %%%
3484
3485# Check if we have found a usable version of make
3486# $1: the path to a potential make binary (or empty)
3487# $2: the description on how we found this
3488
3489
3490# Goes looking for a usable version of GNU make.
3491
3492
3493
3494
3495
3496
3497# Check if build directory is on local disk. If not possible to determine,
3498# we prefer to claim it's local.
3499# Argument 1: directory to test
3500# Argument 2: what to do if it is on local disk
3501# Argument 3: what to do otherwise (remote disk or failure)
3502
3503
3504# Check that source files have basic read permissions set. This might
3505# not be the case in cygwin in certain conditions.
3506
3507
3508
3509
3510#
3511# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3512# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3513#
3514# This code is free software; you can redistribute it and/or modify it
3515# under the terms of the GNU General Public License version 2 only, as
3516# published by the Free Software Foundation.  Oracle designates this
3517# particular file as subject to the "Classpath" exception as provided
3518# by Oracle in the LICENSE file that accompanied this code.
3519#
3520# This code is distributed in the hope that it will be useful, but WITHOUT
3521# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3522# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3523# version 2 for more details (a copy is included in the LICENSE file that
3524# accompanied this code).
3525#
3526# You should have received a copy of the GNU General Public License version
3527# 2 along with this work; if not, write to the Free Software Foundation,
3528# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3529#
3530# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3531# or visit www.oracle.com if you need additional information or have any
3532# questions.
3533#
3534
3535
3536
3537
3538
3539# Helper function which possibly converts a path using DOS-style short mode.
3540# If so, the updated path is stored in $new_path.
3541# $1: The path to check
3542
3543
3544# Helper function which possibly converts a path using DOS-style short mode.
3545# If so, the updated path is stored in $new_path.
3546# $1: The path to check
3547
3548
3549# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3550# and could probably be heavily simplified. However, all changes in this
3551# area tend to need lot of testing in different scenarios, and in lack of
3552# proper unit testing, cleaning this up has not been deemed worth the effort
3553# at the moment.
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3564
3565
3566
3567
3568#
3569# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3570# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3571#
3572# This code is free software; you can redistribute it and/or modify it
3573# under the terms of the GNU General Public License version 2 only, as
3574# published by the Free Software Foundation.  Oracle designates this
3575# particular file as subject to the "Classpath" exception as provided
3576# by Oracle in the LICENSE file that accompanied this code.
3577#
3578# This code is distributed in the hope that it will be useful, but WITHOUT
3579# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3580# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3581# version 2 for more details (a copy is included in the LICENSE file that
3582# accompanied this code).
3583#
3584# You should have received a copy of the GNU General Public License version
3585# 2 along with this work; if not, write to the Free Software Foundation,
3586# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3587#
3588# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3589# or visit www.oracle.com if you need additional information or have any
3590# questions.
3591#
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603# ... then the rest
3604#
3605# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3606# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3607#
3608# This code is free software; you can redistribute it and/or modify it
3609# under the terms of the GNU General Public License version 2 only, as
3610# published by the Free Software Foundation.  Oracle designates this
3611# particular file as subject to the "Classpath" exception as provided
3612# by Oracle in the LICENSE file that accompanied this code.
3613#
3614# This code is distributed in the hope that it will be useful, but WITHOUT
3615# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3616# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3617# version 2 for more details (a copy is included in the LICENSE file that
3618# accompanied this code).
3619#
3620# You should have received a copy of the GNU General Public License version
3621# 2 along with this work; if not, write to the Free Software Foundation,
3622# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3623#
3624# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3625# or visit www.oracle.com if you need additional information or have any
3626# questions.
3627#
3628
3629########################################################################
3630# This file handles detection of the Boot JDK. The Boot JDK detection
3631# process has been developed as a response to solve a complex real-world
3632# problem. Initially, it was simple, but it has grown as platform after
3633# platform, idiosyncracy after idiosyncracy has been supported.
3634#
3635# The basic idea is this:
3636# 1) You need an acceptable *) JDK to use as a Boot JDK
3637# 2) There are several ways to locate a JDK, that are mostly platform
3638#    dependent **)
3639# 3) You can have multiple JDKs installed
3640# 4) If possible, configure should try to dig out an acceptable JDK
3641#    automatically, without having to resort to command-line options
3642#
3643# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3644#     javac) and not a JRE, etc.
3645#
3646# **) On Windows we typically use a well-known path.
3647#     On MacOSX we typically use the tool java_home.
3648#     On Linux we typically find javac in the $PATH, and then follow a
3649#     chain of symlinks that often ends up in a real JDK.
3650#
3651# This leads to the code where we check in different ways to locate a
3652# JDK, and if one is found, check if it is acceptable. If not, we print
3653# our reasons for rejecting it (useful when debugging non-working
3654# configure situations) and continue checking the next one.
3655########################################################################
3656
3657# Execute the check given as argument, and verify the result
3658# If the Boot JDK was previously found, do nothing
3659# $1 A command line (typically autoconf macro) to execute
3660
3661
3662# Test: Is bootjdk explicitely set by command line arguments?
3663
3664
3665# Test: Is bootjdk available from builddeps?
3666
3667
3668# Test: Is $JAVA_HOME set?
3669
3670
3671# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3672
3673
3674# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3675# $1: Argument to the java_home binary (optional)
3676
3677
3678# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3679
3680
3681# Look for a jdk in the given path. If there are multiple, try to select the newest.
3682# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3683# $1 = Path to directory containing jdk installations.
3684# $2 = String to append to the found JDK directory to get the proper JDK home
3685
3686
3687# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3688# environmental variable as base for where to look.
3689# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3690
3691
3692# Test: Is there a JDK installed in default, well-known locations?
3693
3694
3695# Check that a command-line tool in the Boot JDK is correct
3696# $1 = name of variable to assign
3697# $2 = name of binary
3698
3699
3700###############################################################################
3701#
3702# We need a Boot JDK to bootstrap the build.
3703#
3704
3705
3706
3707
3708
3709#
3710# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3711# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3712#
3713# This code is free software; you can redistribute it and/or modify it
3714# under the terms of the GNU General Public License version 2 only, as
3715# published by the Free Software Foundation.  Oracle designates this
3716# particular file as subject to the "Classpath" exception as provided
3717# by Oracle in the LICENSE file that accompanied this code.
3718#
3719# This code is distributed in the hope that it will be useful, but WITHOUT
3720# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3721# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3722# version 2 for more details (a copy is included in the LICENSE file that
3723# accompanied this code).
3724#
3725# You should have received a copy of the GNU General Public License version
3726# 2 along with this work; if not, write to the Free Software Foundation,
3727# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3728#
3729# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3730# or visit www.oracle.com if you need additional information or have any
3731# questions.
3732#
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753#
3754# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3756#
3757# This code is free software; you can redistribute it and/or modify it
3758# under the terms of the GNU General Public License version 2 only, as
3759# published by the Free Software Foundation.  Oracle designates this
3760# particular file as subject to the "Classpath" exception as provided
3761# by Oracle in the LICENSE file that accompanied this code.
3762#
3763# This code is distributed in the hope that it will be useful, but WITHOUT
3764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3766# version 2 for more details (a copy is included in the LICENSE file that
3767# accompanied this code).
3768#
3769# You should have received a copy of the GNU General Public License version
3770# 2 along with this work; if not, write to the Free Software Foundation,
3771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3772#
3773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3774# or visit www.oracle.com if you need additional information or have any
3775# questions.
3776#
3777
3778
3779
3780
3781
3782# Documentation on common flags used for solstudio in HIGHEST.
3783#
3784# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
3785#          done with care, there are some assumptions below that need to
3786#          be understood about the use of pointers, and IEEE behavior.
3787#
3788# -fns: Use non-standard floating point mode (not IEEE 754)
3789# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
3790# -fsingle: Use single precision floating point with 'float'
3791# -xalias_level=basic: Assume memory references via basic pointer types do not alias
3792#   (Source with excessing pointer casting and data access with mixed
3793#    pointer types are not recommended)
3794# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
3795#   (If you expect perfect errno behavior, do not use this)
3796# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
3797# -xrestrict: Pointer parameters to functions do not overlap
3798#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
3799#    If you pass in multiple pointers to the same data, do not use this)
3800# -xlibmil: Inline some library routines
3801#   (If you expect perfect errno behavior, do not use this)
3802# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
3803#   (If you expect perfect errno behavior, do not use this)
3804#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
3805
3806    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
3807    # Bug?
3808    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
3809    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
3810    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
3811    #fi
3812
3813
3814
3815
3816
3817# FLAGS_COMPILER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3818#                                   [RUN-IF-FALSE])
3819# ------------------------------------------------------------
3820# Check that the c and c++ compilers support an argument
3821
3822
3823# FLAGS_LINKER_CHECK_ARGUMENTS([ARGUMENT], [RUN-IF-TRUE],
3824#                                    [RUN-IF-FALSE])
3825# ------------------------------------------------------------
3826# Check that the linker support an argument
3827
3828
3829
3830
3831#
3832# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3833# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3834#
3835# This code is free software; you can redistribute it and/or modify it
3836# under the terms of the GNU General Public License version 2 only, as
3837# published by the Free Software Foundation.  Oracle designates this
3838# particular file as subject to the "Classpath" exception as provided
3839# by Oracle in the LICENSE file that accompanied this code.
3840#
3841# This code is distributed in the hope that it will be useful, but WITHOUT
3842# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3843# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3844# version 2 for more details (a copy is included in the LICENSE file that
3845# accompanied this code).
3846#
3847# You should have received a copy of the GNU General Public License version
3848# 2 along with this work; if not, write to the Free Software Foundation,
3849# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3850#
3851# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3852# or visit www.oracle.com if you need additional information or have any
3853# questions.
3854#
3855
3856
3857
3858
3859
3860cygwin_help() {
3861  case $1 in
3862    unzip)
3863      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
3864      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3865      ;;
3866    zip)
3867      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
3868      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3869      ;;
3870    make)
3871      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
3872      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
3873      ;;
3874    freetype)
3875      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
3876        HELP_MSG="To install freetype, run:
3877wget \"http://gnuwin32.sourceforge.net/downlinks/freetype.php\" -O /tmp/freetype-setup.exe
3878chmod +x /tmp/freetype-setup.exe
3879/tmp/freetype-setup.exe
3880Follow GUI prompts, and install to default directory \"C:\Program Files (x86)\GnuWin32\".
3881After installation, locate lib/libfreetype.dll.a and make a copy with the name freetype.dll."
3882      else
3883        HELP_MSG="You need to build a 64-bit version of freetype.
3884This is not readily available.
3885You can find source code and build instructions on
3886http://www.freetype.org/
3887If you put the resulting build in \"C:\Program Files\GnuWin32\", it will be found automatically."
3888      fi
3889      ;;
3890  esac
3891}
3892
3893msys_help() {
3894  PKGHANDLER_COMMAND=""
3895}
3896
3897apt_help() {
3898  case $1 in
3899    devkit)
3900      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
3901    openjdk)
3902      PKGHANDLER_COMMAND="sudo apt-get install openjdk-7-jdk" ;;
3903    alsa)
3904      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
3905    cups)
3906      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
3907    freetype)
3908      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
3909    pulse)
3910      PKGHANDLER_COMMAND="sudo apt-get install libpulse-dev" ;;
3911    x11)
3912      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
3913    ccache)
3914      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
3915  esac
3916}
3917
3918yum_help() {
3919  case $1 in
3920    devkit)
3921      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
3922    openjdk)
3923      PKGHANDLER_COMMAND="sudo yum install java-1.7.0-openjdk" ;;
3924    alsa)
3925      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
3926    cups)
3927      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
3928    freetype)
3929      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
3930    pulse)
3931      PKGHANDLER_COMMAND="sudo yum install pulseaudio-libs-devel" ;;
3932    x11)
3933      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel" ;;
3934    ccache)
3935      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
3936  esac
3937}
3938
3939port_help() {
3940  PKGHANDLER_COMMAND=""
3941}
3942
3943pkgutil_help() {
3944  PKGHANDLER_COMMAND=""
3945}
3946
3947pkgadd_help() {
3948  PKGHANDLER_COMMAND=""
3949}
3950
3951# This function will check if we're called from the "configure" wrapper while
3952# printing --help. If so, we will print out additional information that can
3953# only be extracted within the autoconf script, and then exit. This must be
3954# called at the very beginning in configure.ac.
3955
3956
3957
3958
3959#
3960# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
3961# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3962#
3963# This code is free software; you can redistribute it and/or modify it
3964# under the terms of the GNU General Public License version 2 only, as
3965# published by the Free Software Foundation.  Oracle designates this
3966# particular file as subject to the "Classpath" exception as provided
3967# by Oracle in the LICENSE file that accompanied this code.
3968#
3969# This code is distributed in the hope that it will be useful, but WITHOUT
3970# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3971# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3972# version 2 for more details (a copy is included in the LICENSE file that
3973# accompanied this code).
3974#
3975# You should have received a copy of the GNU General Public License version
3976# 2 along with this work; if not, write to the Free Software Foundation,
3977# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3978#
3979# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3980# or visit www.oracle.com if you need additional information or have any
3981# questions.
3982#
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993###############################################################################
3994#
3995# Should we build only OpenJDK even if closed sources are present?
3996#
3997
3998
3999
4000
4001###############################################################################
4002#
4003# Setup version numbers
4004#
4005
4006
4007
4008
4009
4010
4011#
4012# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4013# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4014#
4015# This code is free software; you can redistribute it and/or modify it
4016# under the terms of the GNU General Public License version 2 only, as
4017# published by the Free Software Foundation.  Oracle designates this
4018# particular file as subject to the "Classpath" exception as provided
4019# by Oracle in the LICENSE file that accompanied this code.
4020#
4021# This code is distributed in the hope that it will be useful, but WITHOUT
4022# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4023# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4024# version 2 for more details (a copy is included in the LICENSE file that
4025# accompanied this code).
4026#
4027# You should have received a copy of the GNU General Public License version
4028# 2 along with this work; if not, write to the Free Software Foundation,
4029# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4030#
4031# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4032# or visit www.oracle.com if you need additional information or have any
4033# questions.
4034#
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054#
4055# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4056# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4057#
4058# This code is free software; you can redistribute it and/or modify it
4059# under the terms of the GNU General Public License version 2 only, as
4060# published by the Free Software Foundation.  Oracle designates this
4061# particular file as subject to the "Classpath" exception as provided
4062# by Oracle in the LICENSE file that accompanied this code.
4063#
4064# This code is distributed in the hope that it will be useful, but WITHOUT
4065# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4066# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4067# version 2 for more details (a copy is included in the LICENSE file that
4068# accompanied this code).
4069#
4070# You should have received a copy of the GNU General Public License version
4071# 2 along with this work; if not, write to the Free Software Foundation,
4072# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4073#
4074# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4075# or visit www.oracle.com if you need additional information or have any
4076# questions.
4077#
4078
4079# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4080# Converts autoconf style CPU name to OpenJDK style, into
4081# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4082
4083
4084# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4085# Converts autoconf style OS name to OpenJDK style, into
4086# VAR_OS and VAR_OS_API.
4087
4088
4089# Expects $host_os $host_cpu $build_os and $build_cpu
4090# and $with_target_bits to have been setup!
4091#
4092# Translate the standard triplet(quadruplet) definition
4093# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4094# OPENJDK_BUILD_OS, etc.
4095
4096
4097# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4098# accordingly. Must be done after setting up build and target system, but before
4099# doing anything else with these values.
4100
4101
4102# Setup the legacy variables, for controlling the old makefiles.
4103#
4104
4105
4106
4107
4108#%%% Build and target systems %%%
4109
4110
4111
4112
4113# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4114# Add -mX to various FLAGS variables.
4115
4116
4117
4118
4119
4120
4121#
4122# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4123# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4124#
4125# This code is free software; you can redistribute it and/or modify it
4126# under the terms of the GNU General Public License version 2 only, as
4127# published by the Free Software Foundation.  Oracle designates this
4128# particular file as subject to the "Classpath" exception as provided
4129# by Oracle in the LICENSE file that accompanied this code.
4130#
4131# This code is distributed in the hope that it will be useful, but WITHOUT
4132# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4133# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4134# version 2 for more details (a copy is included in the LICENSE file that
4135# accompanied this code).
4136#
4137# You should have received a copy of the GNU General Public License version
4138# 2 along with this work; if not, write to the Free Software Foundation,
4139# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4140#
4141# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4142# or visit www.oracle.com if you need additional information or have any
4143# questions.
4144#
4145
4146
4147
4148
4149
4150
4151
4152
4153#
4154# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
4155# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4156#
4157# This code is free software; you can redistribute it and/or modify it
4158# under the terms of the GNU General Public License version 2 only, as
4159# published by the Free Software Foundation.  Oracle designates this
4160# particular file as subject to the "Classpath" exception as provided
4161# by Oracle in the LICENSE file that accompanied this code.
4162#
4163# This code is distributed in the hope that it will be useful, but WITHOUT
4164# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4165# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4166# version 2 for more details (a copy is included in the LICENSE file that
4167# accompanied this code).
4168#
4169# You should have received a copy of the GNU General Public License version
4170# 2 along with this work; if not, write to the Free Software Foundation,
4171# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4172#
4173# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4174# or visit www.oracle.com if you need additional information or have any
4175# questions.
4176#
4177
4178########################################################################
4179# This file is responsible for detecting, verifying and setting up the
4180# toolchain, i.e. the compiler, linker and related utilities. It will setup
4181# proper paths to the binaries, but it will not setup any flags.
4182#
4183# The binaries used is determined by the toolchain type, which is the family of
4184# compilers and related tools that are used.
4185########################################################################
4186
4187
4188# All valid toolchains, regardless of platform (used by help.m4)
4189VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4190
4191# These toolchains are valid on different platforms
4192VALID_TOOLCHAINS_linux="gcc clang"
4193VALID_TOOLCHAINS_solaris="solstudio"
4194VALID_TOOLCHAINS_macosx="gcc clang"
4195VALID_TOOLCHAINS_aix="xlc"
4196VALID_TOOLCHAINS_windows="microsoft"
4197
4198# Toolchain descriptions
4199TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4200TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4201TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4202TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4203TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4204
4205# Setup a number of variables describing how native output files are
4206# named on this platform/toolchain.
4207
4208
4209# Determine which toolchain type to use, and make sure it is valid for this
4210# platform. Setup various information about the selected toolchain.
4211
4212
4213# Before we start detecting the toolchain executables, we might need some
4214# special setup, e.g. additional paths etc.
4215
4216
4217# Restore path, etc
4218
4219
4220# Check if a compiler is of the toolchain type we expect, and save the version
4221# information from it. If the compiler does not match the expected type,
4222# this function will abort using AC_MSG_ERROR. If it matches, the version will
4223# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4224# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4225#
4226# $1 = compiler to test (CC or CXX)
4227# $2 = human readable name of compiler (C or C++)
4228
4229
4230# Try to locate the given C or C++ compiler in the path, or otherwise.
4231#
4232# $1 = compiler to test (CC or CXX)
4233# $2 = human readable name of compiler (C or C++)
4234# $3 = list of compiler names to search for
4235
4236
4237# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4238# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4239# archiver (AR). Verify that the compilers are correct according to the
4240# toolchain type.
4241
4242
4243# Setup additional tools that is considered a part of the toolchain, but not the
4244# core part. Many of these are highly platform-specific and do not exist,
4245# and/or are not needed on all platforms.
4246
4247
4248# Setup the build tools (i.e, the compiler and linker used to build programs
4249# that should be run on the build platform, not the target platform, as a build
4250# helper). Since the non-cross-compile case uses the normal, target compilers
4251# for this, we can only do this after these have been setup.
4252
4253
4254# Setup legacy variables that are still needed as alternative ways to refer to
4255# parts of the toolchain.
4256
4257
4258# Do some additional checks on the detected tools.
4259
4260
4261# Setup the JTReg Regression Test Harness.
4262
4263
4264#
4265# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4266# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4267#
4268# This code is free software; you can redistribute it and/or modify it
4269# under the terms of the GNU General Public License version 2 only, as
4270# published by the Free Software Foundation.  Oracle designates this
4271# particular file as subject to the "Classpath" exception as provided
4272# by Oracle in the LICENSE file that accompanied this code.
4273#
4274# This code is distributed in the hope that it will be useful, but WITHOUT
4275# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4276# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4277# version 2 for more details (a copy is included in the LICENSE file that
4278# accompanied this code).
4279#
4280# You should have received a copy of the GNU General Public License version
4281# 2 along with this work; if not, write to the Free Software Foundation,
4282# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4283#
4284# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4285# or visit www.oracle.com if you need additional information or have any
4286# questions.
4287#
4288
4289
4290
4291
4292
4293
4294
4295# Check if the VS env variables were setup prior to running configure.
4296# If not, then find vcvarsall.bat and run it automatically, and integrate
4297# the set env variables into the spec file.
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308# This line needs to be here, verbatim, after all includes and the dummy hook
4309# definitions. It is replaced with custom functionality when building
4310# custom sources.
4311#CUSTOM_AUTOCONF_INCLUDE
4312
4313# Do not change or remove the following line, it is needed for consistency checks:
4314DATE_WHEN_GENERATED=1403110135
4315
4316###############################################################################
4317#
4318# Initialization / Boot-strapping
4319#
4320# The bootstrapping process needs to solve the "chicken or the egg" problem,
4321# thus it jumps back and forth, each time gaining something needed later on.
4322#
4323###############################################################################
4324
4325# If we are requested to print additional help, do that and then exit.
4326# This must be the very first call.
4327
4328  if test "x$CONFIGURE_PRINT_TOOLCHAIN_LIST" != x; then
4329    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
4330    $PRINTF "Which are valid to use depends on the build platform.\n"
4331    for toolchain in $VALID_TOOLCHAINS_all; do
4332      # Use indirect variable referencing
4333      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
4334      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
4335      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
4336    done
4337
4338    # And now exit directly
4339    exit 0
4340  fi
4341
4342
4343# Basic initialization that must happen first of all in the normal process.
4344
4345  # Save the original command line. This is passed to us by the wrapper configure script.
4346
4347  DATE_WHEN_CONFIGURED=`LANG=C date`
4348
4349  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
4350$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
4351  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
4352$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
4353
4354
4355  # Start with tools that do not need have cross compilation support
4356  # and can be expected to be found in the default PATH. These tools are
4357  # used by configure. Nor are these tools expected to be found in the
4358  # devkit from the builddeps server either, since they are
4359  # needed to download the devkit.
4360
4361  # First are all the simple required tools.
4362
4363
4364
4365  # Publish this variable in the help.
4366
4367
4368  if test "x$BASENAME" = x; then
4369    # The variable is not set by user, try to locate tool using the code snippet
4370    for ac_prog in basename
4371do
4372  # Extract the first word of "$ac_prog", so it can be a program name with args.
4373set dummy $ac_prog; ac_word=$2
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4375$as_echo_n "checking for $ac_word... " >&6; }
4376if ${ac_cv_path_BASENAME+:} false; then :
4377  $as_echo_n "(cached) " >&6
4378else
4379  case $BASENAME in
4380  [\\/]* | ?:[\\/]*)
4381  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4382  ;;
4383  *)
4384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4385for as_dir in $PATH
4386do
4387  IFS=$as_save_IFS
4388  test -z "$as_dir" && as_dir=.
4389    for ac_exec_ext in '' $ac_executable_extensions; do
4390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4391    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4393    break 2
4394  fi
4395done
4396  done
4397IFS=$as_save_IFS
4398
4399  ;;
4400esac
4401fi
4402BASENAME=$ac_cv_path_BASENAME
4403if test -n "$BASENAME"; then
4404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4405$as_echo "$BASENAME" >&6; }
4406else
4407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4408$as_echo "no" >&6; }
4409fi
4410
4411
4412  test -n "$BASENAME" && break
4413done
4414
4415  else
4416    # The variable is set, but is it from the command line or the environment?
4417
4418    # Try to remove the string !BASENAME! from our list.
4419    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
4420    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4421      # If it failed, the variable was not from the command line. Ignore it,
4422      # but warn the user (except for BASH, which is always set by the calling BASH).
4423      if test "xBASENAME" != xBASH; then
4424        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
4425$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
4426      fi
4427      # Try to locate tool using the code snippet
4428      for ac_prog in basename
4429do
4430  # Extract the first word of "$ac_prog", so it can be a program name with args.
4431set dummy $ac_prog; ac_word=$2
4432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4433$as_echo_n "checking for $ac_word... " >&6; }
4434if ${ac_cv_path_BASENAME+:} false; then :
4435  $as_echo_n "(cached) " >&6
4436else
4437  case $BASENAME in
4438  [\\/]* | ?:[\\/]*)
4439  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4440  ;;
4441  *)
4442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4443for as_dir in $PATH
4444do
4445  IFS=$as_save_IFS
4446  test -z "$as_dir" && as_dir=.
4447    for ac_exec_ext in '' $ac_executable_extensions; do
4448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4449    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4451    break 2
4452  fi
4453done
4454  done
4455IFS=$as_save_IFS
4456
4457  ;;
4458esac
4459fi
4460BASENAME=$ac_cv_path_BASENAME
4461if test -n "$BASENAME"; then
4462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4463$as_echo "$BASENAME" >&6; }
4464else
4465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4466$as_echo "no" >&6; }
4467fi
4468
4469
4470  test -n "$BASENAME" && break
4471done
4472
4473    else
4474      # If it succeeded, then it was overridden by the user. We will use it
4475      # for the tool.
4476
4477      # First remove it from the list of overridden variables, so we can test
4478      # for unknown variables in the end.
4479      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4480
4481      # Check if the provided tool contains a complete path.
4482      tool_specified="$BASENAME"
4483      tool_basename="${tool_specified##*/}"
4484      if test "x$tool_basename" = "x$tool_specified"; then
4485        # A command without a complete path is provided, search $PATH.
4486        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
4487$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
4488        # Extract the first word of "$tool_basename", so it can be a program name with args.
4489set dummy $tool_basename; ac_word=$2
4490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4491$as_echo_n "checking for $ac_word... " >&6; }
4492if ${ac_cv_path_BASENAME+:} false; then :
4493  $as_echo_n "(cached) " >&6
4494else
4495  case $BASENAME in
4496  [\\/]* | ?:[\\/]*)
4497  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
4498  ;;
4499  *)
4500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4501for as_dir in $PATH
4502do
4503  IFS=$as_save_IFS
4504  test -z "$as_dir" && as_dir=.
4505    for ac_exec_ext in '' $ac_executable_extensions; do
4506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4507    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
4508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4509    break 2
4510  fi
4511done
4512  done
4513IFS=$as_save_IFS
4514
4515  ;;
4516esac
4517fi
4518BASENAME=$ac_cv_path_BASENAME
4519if test -n "$BASENAME"; then
4520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
4521$as_echo "$BASENAME" >&6; }
4522else
4523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4524$as_echo "no" >&6; }
4525fi
4526
4527
4528        if test "x$BASENAME" = x; then
4529          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4530        fi
4531      else
4532        # Otherwise we believe it is a complete path. Use it as it is.
4533        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
4534$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
4535        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
4536$as_echo_n "checking for BASENAME... " >&6; }
4537        if test ! -x "$tool_specified"; then
4538          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4539$as_echo "not found" >&6; }
4540          as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
4541        fi
4542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4543$as_echo "$tool_specified" >&6; }
4544      fi
4545    fi
4546  fi
4547
4548
4549
4550  if test "x$BASENAME" = x; then
4551    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
4552  fi
4553
4554
4555
4556
4557
4558  # Publish this variable in the help.
4559
4560
4561  if test "x$BASH" = x; then
4562    # The variable is not set by user, try to locate tool using the code snippet
4563    for ac_prog in bash
4564do
4565  # Extract the first word of "$ac_prog", so it can be a program name with args.
4566set dummy $ac_prog; ac_word=$2
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; }
4569if ${ac_cv_path_BASH+:} false; then :
4570  $as_echo_n "(cached) " >&6
4571else
4572  case $BASH in
4573  [\\/]* | ?:[\\/]*)
4574  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4575  ;;
4576  *)
4577  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580  IFS=$as_save_IFS
4581  test -z "$as_dir" && as_dir=.
4582    for ac_exec_ext in '' $ac_executable_extensions; do
4583  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4585    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586    break 2
4587  fi
4588done
4589  done
4590IFS=$as_save_IFS
4591
4592  ;;
4593esac
4594fi
4595BASH=$ac_cv_path_BASH
4596if test -n "$BASH"; then
4597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4598$as_echo "$BASH" >&6; }
4599else
4600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601$as_echo "no" >&6; }
4602fi
4603
4604
4605  test -n "$BASH" && break
4606done
4607
4608  else
4609    # The variable is set, but is it from the command line or the environment?
4610
4611    # Try to remove the string !BASH! from our list.
4612    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
4613    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4614      # If it failed, the variable was not from the command line. Ignore it,
4615      # but warn the user (except for BASH, which is always set by the calling BASH).
4616      if test "xBASH" != xBASH; then
4617        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
4618$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
4619      fi
4620      # Try to locate tool using the code snippet
4621      for ac_prog in bash
4622do
4623  # Extract the first word of "$ac_prog", so it can be a program name with args.
4624set dummy $ac_prog; ac_word=$2
4625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4626$as_echo_n "checking for $ac_word... " >&6; }
4627if ${ac_cv_path_BASH+:} false; then :
4628  $as_echo_n "(cached) " >&6
4629else
4630  case $BASH in
4631  [\\/]* | ?:[\\/]*)
4632  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4633  ;;
4634  *)
4635  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4636for as_dir in $PATH
4637do
4638  IFS=$as_save_IFS
4639  test -z "$as_dir" && as_dir=.
4640    for ac_exec_ext in '' $ac_executable_extensions; do
4641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4642    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4644    break 2
4645  fi
4646done
4647  done
4648IFS=$as_save_IFS
4649
4650  ;;
4651esac
4652fi
4653BASH=$ac_cv_path_BASH
4654if test -n "$BASH"; then
4655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4656$as_echo "$BASH" >&6; }
4657else
4658  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4659$as_echo "no" >&6; }
4660fi
4661
4662
4663  test -n "$BASH" && break
4664done
4665
4666    else
4667      # If it succeeded, then it was overridden by the user. We will use it
4668      # for the tool.
4669
4670      # First remove it from the list of overridden variables, so we can test
4671      # for unknown variables in the end.
4672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4673
4674      # Check if the provided tool contains a complete path.
4675      tool_specified="$BASH"
4676      tool_basename="${tool_specified##*/}"
4677      if test "x$tool_basename" = "x$tool_specified"; then
4678        # A command without a complete path is provided, search $PATH.
4679        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
4680$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
4681        # Extract the first word of "$tool_basename", so it can be a program name with args.
4682set dummy $tool_basename; ac_word=$2
4683{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4684$as_echo_n "checking for $ac_word... " >&6; }
4685if ${ac_cv_path_BASH+:} false; then :
4686  $as_echo_n "(cached) " >&6
4687else
4688  case $BASH in
4689  [\\/]* | ?:[\\/]*)
4690  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
4691  ;;
4692  *)
4693  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4694for as_dir in $PATH
4695do
4696  IFS=$as_save_IFS
4697  test -z "$as_dir" && as_dir=.
4698    for ac_exec_ext in '' $ac_executable_extensions; do
4699  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4700    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
4701    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4702    break 2
4703  fi
4704done
4705  done
4706IFS=$as_save_IFS
4707
4708  ;;
4709esac
4710fi
4711BASH=$ac_cv_path_BASH
4712if test -n "$BASH"; then
4713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
4714$as_echo "$BASH" >&6; }
4715else
4716  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4717$as_echo "no" >&6; }
4718fi
4719
4720
4721        if test "x$BASH" = x; then
4722          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4723        fi
4724      else
4725        # Otherwise we believe it is a complete path. Use it as it is.
4726        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
4727$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
4728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
4729$as_echo_n "checking for BASH... " >&6; }
4730        if test ! -x "$tool_specified"; then
4731          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4732$as_echo "not found" >&6; }
4733          as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
4734        fi
4735        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4736$as_echo "$tool_specified" >&6; }
4737      fi
4738    fi
4739  fi
4740
4741
4742
4743  if test "x$BASH" = x; then
4744    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
4745  fi
4746
4747
4748
4749
4750
4751  # Publish this variable in the help.
4752
4753
4754  if test "x$CAT" = x; then
4755    # The variable is not set by user, try to locate tool using the code snippet
4756    for ac_prog in cat
4757do
4758  # Extract the first word of "$ac_prog", so it can be a program name with args.
4759set dummy $ac_prog; ac_word=$2
4760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4761$as_echo_n "checking for $ac_word... " >&6; }
4762if ${ac_cv_path_CAT+:} false; then :
4763  $as_echo_n "(cached) " >&6
4764else
4765  case $CAT in
4766  [\\/]* | ?:[\\/]*)
4767  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4768  ;;
4769  *)
4770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4771for as_dir in $PATH
4772do
4773  IFS=$as_save_IFS
4774  test -z "$as_dir" && as_dir=.
4775    for ac_exec_ext in '' $ac_executable_extensions; do
4776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4777    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4779    break 2
4780  fi
4781done
4782  done
4783IFS=$as_save_IFS
4784
4785  ;;
4786esac
4787fi
4788CAT=$ac_cv_path_CAT
4789if test -n "$CAT"; then
4790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4791$as_echo "$CAT" >&6; }
4792else
4793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4794$as_echo "no" >&6; }
4795fi
4796
4797
4798  test -n "$CAT" && break
4799done
4800
4801  else
4802    # The variable is set, but is it from the command line or the environment?
4803
4804    # Try to remove the string !CAT! from our list.
4805    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
4806    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
4807      # If it failed, the variable was not from the command line. Ignore it,
4808      # but warn the user (except for BASH, which is always set by the calling BASH).
4809      if test "xCAT" != xBASH; then
4810        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
4811$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
4812      fi
4813      # Try to locate tool using the code snippet
4814      for ac_prog in cat
4815do
4816  # Extract the first word of "$ac_prog", so it can be a program name with args.
4817set dummy $ac_prog; ac_word=$2
4818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819$as_echo_n "checking for $ac_word... " >&6; }
4820if ${ac_cv_path_CAT+:} false; then :
4821  $as_echo_n "(cached) " >&6
4822else
4823  case $CAT in
4824  [\\/]* | ?:[\\/]*)
4825  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4826  ;;
4827  *)
4828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829for as_dir in $PATH
4830do
4831  IFS=$as_save_IFS
4832  test -z "$as_dir" && as_dir=.
4833    for ac_exec_ext in '' $ac_executable_extensions; do
4834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4835    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837    break 2
4838  fi
4839done
4840  done
4841IFS=$as_save_IFS
4842
4843  ;;
4844esac
4845fi
4846CAT=$ac_cv_path_CAT
4847if test -n "$CAT"; then
4848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4849$as_echo "$CAT" >&6; }
4850else
4851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852$as_echo "no" >&6; }
4853fi
4854
4855
4856  test -n "$CAT" && break
4857done
4858
4859    else
4860      # If it succeeded, then it was overridden by the user. We will use it
4861      # for the tool.
4862
4863      # First remove it from the list of overridden variables, so we can test
4864      # for unknown variables in the end.
4865      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
4866
4867      # Check if the provided tool contains a complete path.
4868      tool_specified="$CAT"
4869      tool_basename="${tool_specified##*/}"
4870      if test "x$tool_basename" = "x$tool_specified"; then
4871        # A command without a complete path is provided, search $PATH.
4872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
4873$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
4874        # Extract the first word of "$tool_basename", so it can be a program name with args.
4875set dummy $tool_basename; ac_word=$2
4876{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4877$as_echo_n "checking for $ac_word... " >&6; }
4878if ${ac_cv_path_CAT+:} false; then :
4879  $as_echo_n "(cached) " >&6
4880else
4881  case $CAT in
4882  [\\/]* | ?:[\\/]*)
4883  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4884  ;;
4885  *)
4886  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4887for as_dir in $PATH
4888do
4889  IFS=$as_save_IFS
4890  test -z "$as_dir" && as_dir=.
4891    for ac_exec_ext in '' $ac_executable_extensions; do
4892  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4893    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4894    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4895    break 2
4896  fi
4897done
4898  done
4899IFS=$as_save_IFS
4900
4901  ;;
4902esac
4903fi
4904CAT=$ac_cv_path_CAT
4905if test -n "$CAT"; then
4906  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4907$as_echo "$CAT" >&6; }
4908else
4909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4910$as_echo "no" >&6; }
4911fi
4912
4913
4914        if test "x$CAT" = x; then
4915          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
4916        fi
4917      else
4918        # Otherwise we believe it is a complete path. Use it as it is.
4919        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
4920$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
4921        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
4922$as_echo_n "checking for CAT... " >&6; }
4923        if test ! -x "$tool_specified"; then
4924          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
4925$as_echo "not found" >&6; }
4926          as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
4927        fi
4928        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
4929$as_echo "$tool_specified" >&6; }
4930      fi
4931    fi
4932  fi
4933
4934
4935
4936  if test "x$CAT" = x; then
4937    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
4938  fi
4939
4940
4941
4942
4943
4944  # Publish this variable in the help.
4945
4946
4947  if test "x$CHMOD" = x; then
4948    # The variable is not set by user, try to locate tool using the code snippet
4949    for ac_prog in chmod
4950do
4951  # Extract the first word of "$ac_prog", so it can be a program name with args.
4952set dummy $ac_prog; ac_word=$2
4953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4954$as_echo_n "checking for $ac_word... " >&6; }
4955if ${ac_cv_path_CHMOD+:} false; then :
4956  $as_echo_n "(cached) " >&6
4957else
4958  case $CHMOD in
4959  [\\/]* | ?:[\\/]*)
4960  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
4961  ;;
4962  *)
4963  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4964for as_dir in $PATH
4965do
4966  IFS=$as_save_IFS
4967  test -z "$as_dir" && as_dir=.
4968    for ac_exec_ext in '' $ac_executable_extensions; do
4969  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4970    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
4971    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4972    break 2
4973  fi
4974done
4975  done
4976IFS=$as_save_IFS
4977
4978  ;;
4979esac
4980fi
4981CHMOD=$ac_cv_path_CHMOD
4982if test -n "$CHMOD"; then
4983  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
4984$as_echo "$CHMOD" >&6; }
4985else
4986  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987$as_echo "no" >&6; }
4988fi
4989
4990
4991  test -n "$CHMOD" && break
4992done
4993
4994  else
4995    # The variable is set, but is it from the command line or the environment?
4996
4997    # Try to remove the string !CHMOD! from our list.
4998    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
4999    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5000      # If it failed, the variable was not from the command line. Ignore it,
5001      # but warn the user (except for BASH, which is always set by the calling BASH).
5002      if test "xCHMOD" != xBASH; then
5003        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5004$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5005      fi
5006      # Try to locate tool using the code snippet
5007      for ac_prog in chmod
5008do
5009  # Extract the first word of "$ac_prog", so it can be a program name with args.
5010set dummy $ac_prog; ac_word=$2
5011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5012$as_echo_n "checking for $ac_word... " >&6; }
5013if ${ac_cv_path_CHMOD+:} false; then :
5014  $as_echo_n "(cached) " >&6
5015else
5016  case $CHMOD in
5017  [\\/]* | ?:[\\/]*)
5018  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5019  ;;
5020  *)
5021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5022for as_dir in $PATH
5023do
5024  IFS=$as_save_IFS
5025  test -z "$as_dir" && as_dir=.
5026    for ac_exec_ext in '' $ac_executable_extensions; do
5027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5028    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5030    break 2
5031  fi
5032done
5033  done
5034IFS=$as_save_IFS
5035
5036  ;;
5037esac
5038fi
5039CHMOD=$ac_cv_path_CHMOD
5040if test -n "$CHMOD"; then
5041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5042$as_echo "$CHMOD" >&6; }
5043else
5044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5045$as_echo "no" >&6; }
5046fi
5047
5048
5049  test -n "$CHMOD" && break
5050done
5051
5052    else
5053      # If it succeeded, then it was overridden by the user. We will use it
5054      # for the tool.
5055
5056      # First remove it from the list of overridden variables, so we can test
5057      # for unknown variables in the end.
5058      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5059
5060      # Check if the provided tool contains a complete path.
5061      tool_specified="$CHMOD"
5062      tool_basename="${tool_specified##*/}"
5063      if test "x$tool_basename" = "x$tool_specified"; then
5064        # A command without a complete path is provided, search $PATH.
5065        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5066$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5067        # Extract the first word of "$tool_basename", so it can be a program name with args.
5068set dummy $tool_basename; ac_word=$2
5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5070$as_echo_n "checking for $ac_word... " >&6; }
5071if ${ac_cv_path_CHMOD+:} false; then :
5072  $as_echo_n "(cached) " >&6
5073else
5074  case $CHMOD in
5075  [\\/]* | ?:[\\/]*)
5076  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5077  ;;
5078  *)
5079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5080for as_dir in $PATH
5081do
5082  IFS=$as_save_IFS
5083  test -z "$as_dir" && as_dir=.
5084    for ac_exec_ext in '' $ac_executable_extensions; do
5085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5086    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5088    break 2
5089  fi
5090done
5091  done
5092IFS=$as_save_IFS
5093
5094  ;;
5095esac
5096fi
5097CHMOD=$ac_cv_path_CHMOD
5098if test -n "$CHMOD"; then
5099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5100$as_echo "$CHMOD" >&6; }
5101else
5102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5103$as_echo "no" >&6; }
5104fi
5105
5106
5107        if test "x$CHMOD" = x; then
5108          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5109        fi
5110      else
5111        # Otherwise we believe it is a complete path. Use it as it is.
5112        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5113$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5115$as_echo_n "checking for CHMOD... " >&6; }
5116        if test ! -x "$tool_specified"; then
5117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5118$as_echo "not found" >&6; }
5119          as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5120        fi
5121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5122$as_echo "$tool_specified" >&6; }
5123      fi
5124    fi
5125  fi
5126
5127
5128
5129  if test "x$CHMOD" = x; then
5130    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5131  fi
5132
5133
5134
5135
5136
5137  # Publish this variable in the help.
5138
5139
5140  if test "x$CMP" = x; then
5141    # The variable is not set by user, try to locate tool using the code snippet
5142    for ac_prog in cmp
5143do
5144  # Extract the first word of "$ac_prog", so it can be a program name with args.
5145set dummy $ac_prog; ac_word=$2
5146{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5147$as_echo_n "checking for $ac_word... " >&6; }
5148if ${ac_cv_path_CMP+:} false; then :
5149  $as_echo_n "(cached) " >&6
5150else
5151  case $CMP in
5152  [\\/]* | ?:[\\/]*)
5153  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5154  ;;
5155  *)
5156  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5157for as_dir in $PATH
5158do
5159  IFS=$as_save_IFS
5160  test -z "$as_dir" && as_dir=.
5161    for ac_exec_ext in '' $ac_executable_extensions; do
5162  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5163    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5164    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5165    break 2
5166  fi
5167done
5168  done
5169IFS=$as_save_IFS
5170
5171  ;;
5172esac
5173fi
5174CMP=$ac_cv_path_CMP
5175if test -n "$CMP"; then
5176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5177$as_echo "$CMP" >&6; }
5178else
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5180$as_echo "no" >&6; }
5181fi
5182
5183
5184  test -n "$CMP" && break
5185done
5186
5187  else
5188    # The variable is set, but is it from the command line or the environment?
5189
5190    # Try to remove the string !CMP! from our list.
5191    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
5192    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5193      # If it failed, the variable was not from the command line. Ignore it,
5194      # but warn the user (except for BASH, which is always set by the calling BASH).
5195      if test "xCMP" != xBASH; then
5196        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
5197$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
5198      fi
5199      # Try to locate tool using the code snippet
5200      for ac_prog in cmp
5201do
5202  # Extract the first word of "$ac_prog", so it can be a program name with args.
5203set dummy $ac_prog; ac_word=$2
5204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5205$as_echo_n "checking for $ac_word... " >&6; }
5206if ${ac_cv_path_CMP+:} false; then :
5207  $as_echo_n "(cached) " >&6
5208else
5209  case $CMP in
5210  [\\/]* | ?:[\\/]*)
5211  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5212  ;;
5213  *)
5214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5215for as_dir in $PATH
5216do
5217  IFS=$as_save_IFS
5218  test -z "$as_dir" && as_dir=.
5219    for ac_exec_ext in '' $ac_executable_extensions; do
5220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5221    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5223    break 2
5224  fi
5225done
5226  done
5227IFS=$as_save_IFS
5228
5229  ;;
5230esac
5231fi
5232CMP=$ac_cv_path_CMP
5233if test -n "$CMP"; then
5234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5235$as_echo "$CMP" >&6; }
5236else
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5238$as_echo "no" >&6; }
5239fi
5240
5241
5242  test -n "$CMP" && break
5243done
5244
5245    else
5246      # If it succeeded, then it was overridden by the user. We will use it
5247      # for the tool.
5248
5249      # First remove it from the list of overridden variables, so we can test
5250      # for unknown variables in the end.
5251      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5252
5253      # Check if the provided tool contains a complete path.
5254      tool_specified="$CMP"
5255      tool_basename="${tool_specified##*/}"
5256      if test "x$tool_basename" = "x$tool_specified"; then
5257        # A command without a complete path is provided, search $PATH.
5258        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
5259$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
5260        # Extract the first word of "$tool_basename", so it can be a program name with args.
5261set dummy $tool_basename; ac_word=$2
5262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5263$as_echo_n "checking for $ac_word... " >&6; }
5264if ${ac_cv_path_CMP+:} false; then :
5265  $as_echo_n "(cached) " >&6
5266else
5267  case $CMP in
5268  [\\/]* | ?:[\\/]*)
5269  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5270  ;;
5271  *)
5272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5273for as_dir in $PATH
5274do
5275  IFS=$as_save_IFS
5276  test -z "$as_dir" && as_dir=.
5277    for ac_exec_ext in '' $ac_executable_extensions; do
5278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5279    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5281    break 2
5282  fi
5283done
5284  done
5285IFS=$as_save_IFS
5286
5287  ;;
5288esac
5289fi
5290CMP=$ac_cv_path_CMP
5291if test -n "$CMP"; then
5292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5293$as_echo "$CMP" >&6; }
5294else
5295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5296$as_echo "no" >&6; }
5297fi
5298
5299
5300        if test "x$CMP" = x; then
5301          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5302        fi
5303      else
5304        # Otherwise we believe it is a complete path. Use it as it is.
5305        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
5306$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
5307        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
5308$as_echo_n "checking for CMP... " >&6; }
5309        if test ! -x "$tool_specified"; then
5310          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5311$as_echo "not found" >&6; }
5312          as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
5313        fi
5314        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5315$as_echo "$tool_specified" >&6; }
5316      fi
5317    fi
5318  fi
5319
5320
5321
5322  if test "x$CMP" = x; then
5323    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
5324  fi
5325
5326
5327
5328
5329
5330  # Publish this variable in the help.
5331
5332
5333  if test "x$COMM" = x; then
5334    # The variable is not set by user, try to locate tool using the code snippet
5335    for ac_prog in comm
5336do
5337  # Extract the first word of "$ac_prog", so it can be a program name with args.
5338set dummy $ac_prog; ac_word=$2
5339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5340$as_echo_n "checking for $ac_word... " >&6; }
5341if ${ac_cv_path_COMM+:} false; then :
5342  $as_echo_n "(cached) " >&6
5343else
5344  case $COMM in
5345  [\\/]* | ?:[\\/]*)
5346  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5347  ;;
5348  *)
5349  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5350for as_dir in $PATH
5351do
5352  IFS=$as_save_IFS
5353  test -z "$as_dir" && as_dir=.
5354    for ac_exec_ext in '' $ac_executable_extensions; do
5355  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5356    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5357    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5358    break 2
5359  fi
5360done
5361  done
5362IFS=$as_save_IFS
5363
5364  ;;
5365esac
5366fi
5367COMM=$ac_cv_path_COMM
5368if test -n "$COMM"; then
5369  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5370$as_echo "$COMM" >&6; }
5371else
5372  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5373$as_echo "no" >&6; }
5374fi
5375
5376
5377  test -n "$COMM" && break
5378done
5379
5380  else
5381    # The variable is set, but is it from the command line or the environment?
5382
5383    # Try to remove the string !COMM! from our list.
5384    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
5385    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5386      # If it failed, the variable was not from the command line. Ignore it,
5387      # but warn the user (except for BASH, which is always set by the calling BASH).
5388      if test "xCOMM" != xBASH; then
5389        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
5390$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
5391      fi
5392      # Try to locate tool using the code snippet
5393      for ac_prog in comm
5394do
5395  # Extract the first word of "$ac_prog", so it can be a program name with args.
5396set dummy $ac_prog; ac_word=$2
5397{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5398$as_echo_n "checking for $ac_word... " >&6; }
5399if ${ac_cv_path_COMM+:} false; then :
5400  $as_echo_n "(cached) " >&6
5401else
5402  case $COMM in
5403  [\\/]* | ?:[\\/]*)
5404  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5405  ;;
5406  *)
5407  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5408for as_dir in $PATH
5409do
5410  IFS=$as_save_IFS
5411  test -z "$as_dir" && as_dir=.
5412    for ac_exec_ext in '' $ac_executable_extensions; do
5413  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5414    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5415    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5416    break 2
5417  fi
5418done
5419  done
5420IFS=$as_save_IFS
5421
5422  ;;
5423esac
5424fi
5425COMM=$ac_cv_path_COMM
5426if test -n "$COMM"; then
5427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5428$as_echo "$COMM" >&6; }
5429else
5430  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5431$as_echo "no" >&6; }
5432fi
5433
5434
5435  test -n "$COMM" && break
5436done
5437
5438    else
5439      # If it succeeded, then it was overridden by the user. We will use it
5440      # for the tool.
5441
5442      # First remove it from the list of overridden variables, so we can test
5443      # for unknown variables in the end.
5444      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5445
5446      # Check if the provided tool contains a complete path.
5447      tool_specified="$COMM"
5448      tool_basename="${tool_specified##*/}"
5449      if test "x$tool_basename" = "x$tool_specified"; then
5450        # A command without a complete path is provided, search $PATH.
5451        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
5452$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
5453        # Extract the first word of "$tool_basename", so it can be a program name with args.
5454set dummy $tool_basename; ac_word=$2
5455{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5456$as_echo_n "checking for $ac_word... " >&6; }
5457if ${ac_cv_path_COMM+:} false; then :
5458  $as_echo_n "(cached) " >&6
5459else
5460  case $COMM in
5461  [\\/]* | ?:[\\/]*)
5462  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
5463  ;;
5464  *)
5465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5466for as_dir in $PATH
5467do
5468  IFS=$as_save_IFS
5469  test -z "$as_dir" && as_dir=.
5470    for ac_exec_ext in '' $ac_executable_extensions; do
5471  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5472    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
5473    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5474    break 2
5475  fi
5476done
5477  done
5478IFS=$as_save_IFS
5479
5480  ;;
5481esac
5482fi
5483COMM=$ac_cv_path_COMM
5484if test -n "$COMM"; then
5485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
5486$as_echo "$COMM" >&6; }
5487else
5488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5489$as_echo "no" >&6; }
5490fi
5491
5492
5493        if test "x$COMM" = x; then
5494          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5495        fi
5496      else
5497        # Otherwise we believe it is a complete path. Use it as it is.
5498        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
5499$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
5500        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
5501$as_echo_n "checking for COMM... " >&6; }
5502        if test ! -x "$tool_specified"; then
5503          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5504$as_echo "not found" >&6; }
5505          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
5506        fi
5507        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5508$as_echo "$tool_specified" >&6; }
5509      fi
5510    fi
5511  fi
5512
5513
5514
5515  if test "x$COMM" = x; then
5516    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
5517  fi
5518
5519
5520
5521
5522
5523  # Publish this variable in the help.
5524
5525
5526  if test "x$CP" = x; then
5527    # The variable is not set by user, try to locate tool using the code snippet
5528    for ac_prog in cp
5529do
5530  # Extract the first word of "$ac_prog", so it can be a program name with args.
5531set dummy $ac_prog; ac_word=$2
5532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5533$as_echo_n "checking for $ac_word... " >&6; }
5534if ${ac_cv_path_CP+:} false; then :
5535  $as_echo_n "(cached) " >&6
5536else
5537  case $CP in
5538  [\\/]* | ?:[\\/]*)
5539  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5540  ;;
5541  *)
5542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5543for as_dir in $PATH
5544do
5545  IFS=$as_save_IFS
5546  test -z "$as_dir" && as_dir=.
5547    for ac_exec_ext in '' $ac_executable_extensions; do
5548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5549    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5551    break 2
5552  fi
5553done
5554  done
5555IFS=$as_save_IFS
5556
5557  ;;
5558esac
5559fi
5560CP=$ac_cv_path_CP
5561if test -n "$CP"; then
5562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5563$as_echo "$CP" >&6; }
5564else
5565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5566$as_echo "no" >&6; }
5567fi
5568
5569
5570  test -n "$CP" && break
5571done
5572
5573  else
5574    # The variable is set, but is it from the command line or the environment?
5575
5576    # Try to remove the string !CP! from our list.
5577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
5578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5579      # If it failed, the variable was not from the command line. Ignore it,
5580      # but warn the user (except for BASH, which is always set by the calling BASH).
5581      if test "xCP" != xBASH; then
5582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
5583$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
5584      fi
5585      # Try to locate tool using the code snippet
5586      for ac_prog in cp
5587do
5588  # Extract the first word of "$ac_prog", so it can be a program name with args.
5589set dummy $ac_prog; ac_word=$2
5590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5591$as_echo_n "checking for $ac_word... " >&6; }
5592if ${ac_cv_path_CP+:} false; then :
5593  $as_echo_n "(cached) " >&6
5594else
5595  case $CP in
5596  [\\/]* | ?:[\\/]*)
5597  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5598  ;;
5599  *)
5600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5601for as_dir in $PATH
5602do
5603  IFS=$as_save_IFS
5604  test -z "$as_dir" && as_dir=.
5605    for ac_exec_ext in '' $ac_executable_extensions; do
5606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5607    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5609    break 2
5610  fi
5611done
5612  done
5613IFS=$as_save_IFS
5614
5615  ;;
5616esac
5617fi
5618CP=$ac_cv_path_CP
5619if test -n "$CP"; then
5620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5621$as_echo "$CP" >&6; }
5622else
5623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5624$as_echo "no" >&6; }
5625fi
5626
5627
5628  test -n "$CP" && break
5629done
5630
5631    else
5632      # If it succeeded, then it was overridden by the user. We will use it
5633      # for the tool.
5634
5635      # First remove it from the list of overridden variables, so we can test
5636      # for unknown variables in the end.
5637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5638
5639      # Check if the provided tool contains a complete path.
5640      tool_specified="$CP"
5641      tool_basename="${tool_specified##*/}"
5642      if test "x$tool_basename" = "x$tool_specified"; then
5643        # A command without a complete path is provided, search $PATH.
5644        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
5645$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
5646        # Extract the first word of "$tool_basename", so it can be a program name with args.
5647set dummy $tool_basename; ac_word=$2
5648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5649$as_echo_n "checking for $ac_word... " >&6; }
5650if ${ac_cv_path_CP+:} false; then :
5651  $as_echo_n "(cached) " >&6
5652else
5653  case $CP in
5654  [\\/]* | ?:[\\/]*)
5655  ac_cv_path_CP="$CP" # Let the user override the test with a path.
5656  ;;
5657  *)
5658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5659for as_dir in $PATH
5660do
5661  IFS=$as_save_IFS
5662  test -z "$as_dir" && as_dir=.
5663    for ac_exec_ext in '' $ac_executable_extensions; do
5664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5665    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
5666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5667    break 2
5668  fi
5669done
5670  done
5671IFS=$as_save_IFS
5672
5673  ;;
5674esac
5675fi
5676CP=$ac_cv_path_CP
5677if test -n "$CP"; then
5678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
5679$as_echo "$CP" >&6; }
5680else
5681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5682$as_echo "no" >&6; }
5683fi
5684
5685
5686        if test "x$CP" = x; then
5687          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5688        fi
5689      else
5690        # Otherwise we believe it is a complete path. Use it as it is.
5691        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
5692$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
5693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
5694$as_echo_n "checking for CP... " >&6; }
5695        if test ! -x "$tool_specified"; then
5696          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5697$as_echo "not found" >&6; }
5698          as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
5699        fi
5700        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5701$as_echo "$tool_specified" >&6; }
5702      fi
5703    fi
5704  fi
5705
5706
5707
5708  if test "x$CP" = x; then
5709    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
5710  fi
5711
5712
5713
5714
5715
5716  # Publish this variable in the help.
5717
5718
5719  if test "x$CPIO" = x; then
5720    # The variable is not set by user, try to locate tool using the code snippet
5721    for ac_prog in cpio
5722do
5723  # Extract the first word of "$ac_prog", so it can be a program name with args.
5724set dummy $ac_prog; ac_word=$2
5725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5726$as_echo_n "checking for $ac_word... " >&6; }
5727if ${ac_cv_path_CPIO+:} false; then :
5728  $as_echo_n "(cached) " >&6
5729else
5730  case $CPIO in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5736for as_dir in $PATH
5737do
5738  IFS=$as_save_IFS
5739  test -z "$as_dir" && as_dir=.
5740    for ac_exec_ext in '' $ac_executable_extensions; do
5741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5742    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5744    break 2
5745  fi
5746done
5747  done
5748IFS=$as_save_IFS
5749
5750  ;;
5751esac
5752fi
5753CPIO=$ac_cv_path_CPIO
5754if test -n "$CPIO"; then
5755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5756$as_echo "$CPIO" >&6; }
5757else
5758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5759$as_echo "no" >&6; }
5760fi
5761
5762
5763  test -n "$CPIO" && break
5764done
5765
5766  else
5767    # The variable is set, but is it from the command line or the environment?
5768
5769    # Try to remove the string !CPIO! from our list.
5770    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
5771    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5772      # If it failed, the variable was not from the command line. Ignore it,
5773      # but warn the user (except for BASH, which is always set by the calling BASH).
5774      if test "xCPIO" != xBASH; then
5775        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
5776$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
5777      fi
5778      # Try to locate tool using the code snippet
5779      for ac_prog in cpio
5780do
5781  # Extract the first word of "$ac_prog", so it can be a program name with args.
5782set dummy $ac_prog; ac_word=$2
5783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5784$as_echo_n "checking for $ac_word... " >&6; }
5785if ${ac_cv_path_CPIO+:} false; then :
5786  $as_echo_n "(cached) " >&6
5787else
5788  case $CPIO in
5789  [\\/]* | ?:[\\/]*)
5790  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5791  ;;
5792  *)
5793  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5794for as_dir in $PATH
5795do
5796  IFS=$as_save_IFS
5797  test -z "$as_dir" && as_dir=.
5798    for ac_exec_ext in '' $ac_executable_extensions; do
5799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5800    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5802    break 2
5803  fi
5804done
5805  done
5806IFS=$as_save_IFS
5807
5808  ;;
5809esac
5810fi
5811CPIO=$ac_cv_path_CPIO
5812if test -n "$CPIO"; then
5813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5814$as_echo "$CPIO" >&6; }
5815else
5816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817$as_echo "no" >&6; }
5818fi
5819
5820
5821  test -n "$CPIO" && break
5822done
5823
5824    else
5825      # If it succeeded, then it was overridden by the user. We will use it
5826      # for the tool.
5827
5828      # First remove it from the list of overridden variables, so we can test
5829      # for unknown variables in the end.
5830      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5831
5832      # Check if the provided tool contains a complete path.
5833      tool_specified="$CPIO"
5834      tool_basename="${tool_specified##*/}"
5835      if test "x$tool_basename" = "x$tool_specified"; then
5836        # A command without a complete path is provided, search $PATH.
5837        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
5838$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
5839        # Extract the first word of "$tool_basename", so it can be a program name with args.
5840set dummy $tool_basename; ac_word=$2
5841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5842$as_echo_n "checking for $ac_word... " >&6; }
5843if ${ac_cv_path_CPIO+:} false; then :
5844  $as_echo_n "(cached) " >&6
5845else
5846  case $CPIO in
5847  [\\/]* | ?:[\\/]*)
5848  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
5849  ;;
5850  *)
5851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5852for as_dir in $PATH
5853do
5854  IFS=$as_save_IFS
5855  test -z "$as_dir" && as_dir=.
5856    for ac_exec_ext in '' $ac_executable_extensions; do
5857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5858    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
5859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5860    break 2
5861  fi
5862done
5863  done
5864IFS=$as_save_IFS
5865
5866  ;;
5867esac
5868fi
5869CPIO=$ac_cv_path_CPIO
5870if test -n "$CPIO"; then
5871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
5872$as_echo "$CPIO" >&6; }
5873else
5874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5875$as_echo "no" >&6; }
5876fi
5877
5878
5879        if test "x$CPIO" = x; then
5880          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5881        fi
5882      else
5883        # Otherwise we believe it is a complete path. Use it as it is.
5884        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
5885$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
5886        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
5887$as_echo_n "checking for CPIO... " >&6; }
5888        if test ! -x "$tool_specified"; then
5889          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5890$as_echo "not found" >&6; }
5891          as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
5892        fi
5893        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5894$as_echo "$tool_specified" >&6; }
5895      fi
5896    fi
5897  fi
5898
5899
5900
5901  if test "x$CPIO" = x; then
5902    as_fn_error $? "Could not find required tool for CPIO" "$LINENO" 5
5903  fi
5904
5905
5906
5907
5908
5909  # Publish this variable in the help.
5910
5911
5912  if test "x$CUT" = x; then
5913    # The variable is not set by user, try to locate tool using the code snippet
5914    for ac_prog in cut
5915do
5916  # Extract the first word of "$ac_prog", so it can be a program name with args.
5917set dummy $ac_prog; ac_word=$2
5918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5919$as_echo_n "checking for $ac_word... " >&6; }
5920if ${ac_cv_path_CUT+:} false; then :
5921  $as_echo_n "(cached) " >&6
5922else
5923  case $CUT in
5924  [\\/]* | ?:[\\/]*)
5925  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5926  ;;
5927  *)
5928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5929for as_dir in $PATH
5930do
5931  IFS=$as_save_IFS
5932  test -z "$as_dir" && as_dir=.
5933    for ac_exec_ext in '' $ac_executable_extensions; do
5934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5935    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5937    break 2
5938  fi
5939done
5940  done
5941IFS=$as_save_IFS
5942
5943  ;;
5944esac
5945fi
5946CUT=$ac_cv_path_CUT
5947if test -n "$CUT"; then
5948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
5949$as_echo "$CUT" >&6; }
5950else
5951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5952$as_echo "no" >&6; }
5953fi
5954
5955
5956  test -n "$CUT" && break
5957done
5958
5959  else
5960    # The variable is set, but is it from the command line or the environment?
5961
5962    # Try to remove the string !CUT! from our list.
5963    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
5964    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5965      # If it failed, the variable was not from the command line. Ignore it,
5966      # but warn the user (except for BASH, which is always set by the calling BASH).
5967      if test "xCUT" != xBASH; then
5968        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
5969$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
5970      fi
5971      # Try to locate tool using the code snippet
5972      for ac_prog in cut
5973do
5974  # Extract the first word of "$ac_prog", so it can be a program name with args.
5975set dummy $ac_prog; ac_word=$2
5976{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5977$as_echo_n "checking for $ac_word... " >&6; }
5978if ${ac_cv_path_CUT+:} false; then :
5979  $as_echo_n "(cached) " >&6
5980else
5981  case $CUT in
5982  [\\/]* | ?:[\\/]*)
5983  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
5984  ;;
5985  *)
5986  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5987for as_dir in $PATH
5988do
5989  IFS=$as_save_IFS
5990  test -z "$as_dir" && as_dir=.
5991    for ac_exec_ext in '' $ac_executable_extensions; do
5992  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5993    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
5994    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5995    break 2
5996  fi
5997done
5998  done
5999IFS=$as_save_IFS
6000
6001  ;;
6002esac
6003fi
6004CUT=$ac_cv_path_CUT
6005if test -n "$CUT"; then
6006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6007$as_echo "$CUT" >&6; }
6008else
6009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011fi
6012
6013
6014  test -n "$CUT" && break
6015done
6016
6017    else
6018      # If it succeeded, then it was overridden by the user. We will use it
6019      # for the tool.
6020
6021      # First remove it from the list of overridden variables, so we can test
6022      # for unknown variables in the end.
6023      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6024
6025      # Check if the provided tool contains a complete path.
6026      tool_specified="$CUT"
6027      tool_basename="${tool_specified##*/}"
6028      if test "x$tool_basename" = "x$tool_specified"; then
6029        # A command without a complete path is provided, search $PATH.
6030        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6031$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6032        # Extract the first word of "$tool_basename", so it can be a program name with args.
6033set dummy $tool_basename; ac_word=$2
6034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6035$as_echo_n "checking for $ac_word... " >&6; }
6036if ${ac_cv_path_CUT+:} false; then :
6037  $as_echo_n "(cached) " >&6
6038else
6039  case $CUT in
6040  [\\/]* | ?:[\\/]*)
6041  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6042  ;;
6043  *)
6044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6045for as_dir in $PATH
6046do
6047  IFS=$as_save_IFS
6048  test -z "$as_dir" && as_dir=.
6049    for ac_exec_ext in '' $ac_executable_extensions; do
6050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6051    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6053    break 2
6054  fi
6055done
6056  done
6057IFS=$as_save_IFS
6058
6059  ;;
6060esac
6061fi
6062CUT=$ac_cv_path_CUT
6063if test -n "$CUT"; then
6064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6065$as_echo "$CUT" >&6; }
6066else
6067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
6069fi
6070
6071
6072        if test "x$CUT" = x; then
6073          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6074        fi
6075      else
6076        # Otherwise we believe it is a complete path. Use it as it is.
6077        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6078$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6079        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6080$as_echo_n "checking for CUT... " >&6; }
6081        if test ! -x "$tool_specified"; then
6082          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6083$as_echo "not found" >&6; }
6084          as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6085        fi
6086        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6087$as_echo "$tool_specified" >&6; }
6088      fi
6089    fi
6090  fi
6091
6092
6093
6094  if test "x$CUT" = x; then
6095    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6096  fi
6097
6098
6099
6100
6101
6102  # Publish this variable in the help.
6103
6104
6105  if test "x$DATE" = x; then
6106    # The variable is not set by user, try to locate tool using the code snippet
6107    for ac_prog in date
6108do
6109  # Extract the first word of "$ac_prog", so it can be a program name with args.
6110set dummy $ac_prog; ac_word=$2
6111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6112$as_echo_n "checking for $ac_word... " >&6; }
6113if ${ac_cv_path_DATE+:} false; then :
6114  $as_echo_n "(cached) " >&6
6115else
6116  case $DATE in
6117  [\\/]* | ?:[\\/]*)
6118  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6119  ;;
6120  *)
6121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6122for as_dir in $PATH
6123do
6124  IFS=$as_save_IFS
6125  test -z "$as_dir" && as_dir=.
6126    for ac_exec_ext in '' $ac_executable_extensions; do
6127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6128    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6130    break 2
6131  fi
6132done
6133  done
6134IFS=$as_save_IFS
6135
6136  ;;
6137esac
6138fi
6139DATE=$ac_cv_path_DATE
6140if test -n "$DATE"; then
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6142$as_echo "$DATE" >&6; }
6143else
6144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6145$as_echo "no" >&6; }
6146fi
6147
6148
6149  test -n "$DATE" && break
6150done
6151
6152  else
6153    # The variable is set, but is it from the command line or the environment?
6154
6155    # Try to remove the string !DATE! from our list.
6156    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6157    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6158      # If it failed, the variable was not from the command line. Ignore it,
6159      # but warn the user (except for BASH, which is always set by the calling BASH).
6160      if test "xDATE" != xBASH; then
6161        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6162$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6163      fi
6164      # Try to locate tool using the code snippet
6165      for ac_prog in date
6166do
6167  # Extract the first word of "$ac_prog", so it can be a program name with args.
6168set dummy $ac_prog; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_path_DATE+:} false; then :
6172  $as_echo_n "(cached) " >&6
6173else
6174  case $DATE in
6175  [\\/]* | ?:[\\/]*)
6176  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6177  ;;
6178  *)
6179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182  IFS=$as_save_IFS
6183  test -z "$as_dir" && as_dir=.
6184    for ac_exec_ext in '' $ac_executable_extensions; do
6185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188    break 2
6189  fi
6190done
6191  done
6192IFS=$as_save_IFS
6193
6194  ;;
6195esac
6196fi
6197DATE=$ac_cv_path_DATE
6198if test -n "$DATE"; then
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6200$as_echo "$DATE" >&6; }
6201else
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
6204fi
6205
6206
6207  test -n "$DATE" && break
6208done
6209
6210    else
6211      # If it succeeded, then it was overridden by the user. We will use it
6212      # for the tool.
6213
6214      # First remove it from the list of overridden variables, so we can test
6215      # for unknown variables in the end.
6216      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6217
6218      # Check if the provided tool contains a complete path.
6219      tool_specified="$DATE"
6220      tool_basename="${tool_specified##*/}"
6221      if test "x$tool_basename" = "x$tool_specified"; then
6222        # A command without a complete path is provided, search $PATH.
6223        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6224$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6225        # Extract the first word of "$tool_basename", so it can be a program name with args.
6226set dummy $tool_basename; ac_word=$2
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228$as_echo_n "checking for $ac_word... " >&6; }
6229if ${ac_cv_path_DATE+:} false; then :
6230  $as_echo_n "(cached) " >&6
6231else
6232  case $DATE in
6233  [\\/]* | ?:[\\/]*)
6234  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6235  ;;
6236  *)
6237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238for as_dir in $PATH
6239do
6240  IFS=$as_save_IFS
6241  test -z "$as_dir" && as_dir=.
6242    for ac_exec_ext in '' $ac_executable_extensions; do
6243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6244    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246    break 2
6247  fi
6248done
6249  done
6250IFS=$as_save_IFS
6251
6252  ;;
6253esac
6254fi
6255DATE=$ac_cv_path_DATE
6256if test -n "$DATE"; then
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6258$as_echo "$DATE" >&6; }
6259else
6260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6261$as_echo "no" >&6; }
6262fi
6263
6264
6265        if test "x$DATE" = x; then
6266          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6267        fi
6268      else
6269        # Otherwise we believe it is a complete path. Use it as it is.
6270        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6271$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6272        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6273$as_echo_n "checking for DATE... " >&6; }
6274        if test ! -x "$tool_specified"; then
6275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6276$as_echo "not found" >&6; }
6277          as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6278        fi
6279        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6280$as_echo "$tool_specified" >&6; }
6281      fi
6282    fi
6283  fi
6284
6285
6286
6287  if test "x$DATE" = x; then
6288    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6289  fi
6290
6291
6292
6293
6294
6295  # Publish this variable in the help.
6296
6297
6298  if test "x$DIFF" = x; then
6299    # The variable is not set by user, try to locate tool using the code snippet
6300    for ac_prog in gdiff diff
6301do
6302  # Extract the first word of "$ac_prog", so it can be a program name with args.
6303set dummy $ac_prog; ac_word=$2
6304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6305$as_echo_n "checking for $ac_word... " >&6; }
6306if ${ac_cv_path_DIFF+:} false; then :
6307  $as_echo_n "(cached) " >&6
6308else
6309  case $DIFF in
6310  [\\/]* | ?:[\\/]*)
6311  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6312  ;;
6313  *)
6314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6315for as_dir in $PATH
6316do
6317  IFS=$as_save_IFS
6318  test -z "$as_dir" && as_dir=.
6319    for ac_exec_ext in '' $ac_executable_extensions; do
6320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6321    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6323    break 2
6324  fi
6325done
6326  done
6327IFS=$as_save_IFS
6328
6329  ;;
6330esac
6331fi
6332DIFF=$ac_cv_path_DIFF
6333if test -n "$DIFF"; then
6334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6335$as_echo "$DIFF" >&6; }
6336else
6337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6338$as_echo "no" >&6; }
6339fi
6340
6341
6342  test -n "$DIFF" && break
6343done
6344
6345  else
6346    # The variable is set, but is it from the command line or the environment?
6347
6348    # Try to remove the string !DIFF! from our list.
6349    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
6350    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6351      # If it failed, the variable was not from the command line. Ignore it,
6352      # but warn the user (except for BASH, which is always set by the calling BASH).
6353      if test "xDIFF" != xBASH; then
6354        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
6355$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
6356      fi
6357      # Try to locate tool using the code snippet
6358      for ac_prog in gdiff diff
6359do
6360  # Extract the first word of "$ac_prog", so it can be a program name with args.
6361set dummy $ac_prog; ac_word=$2
6362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6363$as_echo_n "checking for $ac_word... " >&6; }
6364if ${ac_cv_path_DIFF+:} false; then :
6365  $as_echo_n "(cached) " >&6
6366else
6367  case $DIFF in
6368  [\\/]* | ?:[\\/]*)
6369  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6370  ;;
6371  *)
6372  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6373for as_dir in $PATH
6374do
6375  IFS=$as_save_IFS
6376  test -z "$as_dir" && as_dir=.
6377    for ac_exec_ext in '' $ac_executable_extensions; do
6378  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6379    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6380    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6381    break 2
6382  fi
6383done
6384  done
6385IFS=$as_save_IFS
6386
6387  ;;
6388esac
6389fi
6390DIFF=$ac_cv_path_DIFF
6391if test -n "$DIFF"; then
6392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6393$as_echo "$DIFF" >&6; }
6394else
6395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6396$as_echo "no" >&6; }
6397fi
6398
6399
6400  test -n "$DIFF" && break
6401done
6402
6403    else
6404      # If it succeeded, then it was overridden by the user. We will use it
6405      # for the tool.
6406
6407      # First remove it from the list of overridden variables, so we can test
6408      # for unknown variables in the end.
6409      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6410
6411      # Check if the provided tool contains a complete path.
6412      tool_specified="$DIFF"
6413      tool_basename="${tool_specified##*/}"
6414      if test "x$tool_basename" = "x$tool_specified"; then
6415        # A command without a complete path is provided, search $PATH.
6416        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
6417$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
6418        # Extract the first word of "$tool_basename", so it can be a program name with args.
6419set dummy $tool_basename; ac_word=$2
6420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6421$as_echo_n "checking for $ac_word... " >&6; }
6422if ${ac_cv_path_DIFF+:} false; then :
6423  $as_echo_n "(cached) " >&6
6424else
6425  case $DIFF in
6426  [\\/]* | ?:[\\/]*)
6427  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6428  ;;
6429  *)
6430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6431for as_dir in $PATH
6432do
6433  IFS=$as_save_IFS
6434  test -z "$as_dir" && as_dir=.
6435    for ac_exec_ext in '' $ac_executable_extensions; do
6436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6437    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
6438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6439    break 2
6440  fi
6441done
6442  done
6443IFS=$as_save_IFS
6444
6445  ;;
6446esac
6447fi
6448DIFF=$ac_cv_path_DIFF
6449if test -n "$DIFF"; then
6450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
6451$as_echo "$DIFF" >&6; }
6452else
6453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6454$as_echo "no" >&6; }
6455fi
6456
6457
6458        if test "x$DIFF" = x; then
6459          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6460        fi
6461      else
6462        # Otherwise we believe it is a complete path. Use it as it is.
6463        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
6464$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
6465        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
6466$as_echo_n "checking for DIFF... " >&6; }
6467        if test ! -x "$tool_specified"; then
6468          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6469$as_echo "not found" >&6; }
6470          as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
6471        fi
6472        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6473$as_echo "$tool_specified" >&6; }
6474      fi
6475    fi
6476  fi
6477
6478
6479
6480  if test "x$DIFF" = x; then
6481    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
6482  fi
6483
6484
6485
6486
6487
6488  # Publish this variable in the help.
6489
6490
6491  if test "x$DIRNAME" = x; then
6492    # The variable is not set by user, try to locate tool using the code snippet
6493    for ac_prog in dirname
6494do
6495  # Extract the first word of "$ac_prog", so it can be a program name with args.
6496set dummy $ac_prog; ac_word=$2
6497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6498$as_echo_n "checking for $ac_word... " >&6; }
6499if ${ac_cv_path_DIRNAME+:} false; then :
6500  $as_echo_n "(cached) " >&6
6501else
6502  case $DIRNAME in
6503  [\\/]* | ?:[\\/]*)
6504  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6505  ;;
6506  *)
6507  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6508for as_dir in $PATH
6509do
6510  IFS=$as_save_IFS
6511  test -z "$as_dir" && as_dir=.
6512    for ac_exec_ext in '' $ac_executable_extensions; do
6513  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6514    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6515    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6516    break 2
6517  fi
6518done
6519  done
6520IFS=$as_save_IFS
6521
6522  ;;
6523esac
6524fi
6525DIRNAME=$ac_cv_path_DIRNAME
6526if test -n "$DIRNAME"; then
6527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6528$as_echo "$DIRNAME" >&6; }
6529else
6530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6531$as_echo "no" >&6; }
6532fi
6533
6534
6535  test -n "$DIRNAME" && break
6536done
6537
6538  else
6539    # The variable is set, but is it from the command line or the environment?
6540
6541    # Try to remove the string !DIRNAME! from our list.
6542    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
6543    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6544      # If it failed, the variable was not from the command line. Ignore it,
6545      # but warn the user (except for BASH, which is always set by the calling BASH).
6546      if test "xDIRNAME" != xBASH; then
6547        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
6548$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
6549      fi
6550      # Try to locate tool using the code snippet
6551      for ac_prog in dirname
6552do
6553  # Extract the first word of "$ac_prog", so it can be a program name with args.
6554set dummy $ac_prog; ac_word=$2
6555{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6556$as_echo_n "checking for $ac_word... " >&6; }
6557if ${ac_cv_path_DIRNAME+:} false; then :
6558  $as_echo_n "(cached) " >&6
6559else
6560  case $DIRNAME in
6561  [\\/]* | ?:[\\/]*)
6562  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6563  ;;
6564  *)
6565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6566for as_dir in $PATH
6567do
6568  IFS=$as_save_IFS
6569  test -z "$as_dir" && as_dir=.
6570    for ac_exec_ext in '' $ac_executable_extensions; do
6571  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6572    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6573    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6574    break 2
6575  fi
6576done
6577  done
6578IFS=$as_save_IFS
6579
6580  ;;
6581esac
6582fi
6583DIRNAME=$ac_cv_path_DIRNAME
6584if test -n "$DIRNAME"; then
6585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6586$as_echo "$DIRNAME" >&6; }
6587else
6588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6589$as_echo "no" >&6; }
6590fi
6591
6592
6593  test -n "$DIRNAME" && break
6594done
6595
6596    else
6597      # If it succeeded, then it was overridden by the user. We will use it
6598      # for the tool.
6599
6600      # First remove it from the list of overridden variables, so we can test
6601      # for unknown variables in the end.
6602      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6603
6604      # Check if the provided tool contains a complete path.
6605      tool_specified="$DIRNAME"
6606      tool_basename="${tool_specified##*/}"
6607      if test "x$tool_basename" = "x$tool_specified"; then
6608        # A command without a complete path is provided, search $PATH.
6609        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
6610$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
6611        # Extract the first word of "$tool_basename", so it can be a program name with args.
6612set dummy $tool_basename; ac_word=$2
6613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6614$as_echo_n "checking for $ac_word... " >&6; }
6615if ${ac_cv_path_DIRNAME+:} false; then :
6616  $as_echo_n "(cached) " >&6
6617else
6618  case $DIRNAME in
6619  [\\/]* | ?:[\\/]*)
6620  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
6621  ;;
6622  *)
6623  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6624for as_dir in $PATH
6625do
6626  IFS=$as_save_IFS
6627  test -z "$as_dir" && as_dir=.
6628    for ac_exec_ext in '' $ac_executable_extensions; do
6629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6630    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
6631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6632    break 2
6633  fi
6634done
6635  done
6636IFS=$as_save_IFS
6637
6638  ;;
6639esac
6640fi
6641DIRNAME=$ac_cv_path_DIRNAME
6642if test -n "$DIRNAME"; then
6643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
6644$as_echo "$DIRNAME" >&6; }
6645else
6646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6647$as_echo "no" >&6; }
6648fi
6649
6650
6651        if test "x$DIRNAME" = x; then
6652          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6653        fi
6654      else
6655        # Otherwise we believe it is a complete path. Use it as it is.
6656        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
6657$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
6658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
6659$as_echo_n "checking for DIRNAME... " >&6; }
6660        if test ! -x "$tool_specified"; then
6661          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6662$as_echo "not found" >&6; }
6663          as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
6664        fi
6665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6666$as_echo "$tool_specified" >&6; }
6667      fi
6668    fi
6669  fi
6670
6671
6672
6673  if test "x$DIRNAME" = x; then
6674    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
6675  fi
6676
6677
6678
6679
6680
6681  # Publish this variable in the help.
6682
6683
6684  if test "x$ECHO" = x; then
6685    # The variable is not set by user, try to locate tool using the code snippet
6686    for ac_prog in echo
6687do
6688  # Extract the first word of "$ac_prog", so it can be a program name with args.
6689set dummy $ac_prog; ac_word=$2
6690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6691$as_echo_n "checking for $ac_word... " >&6; }
6692if ${ac_cv_path_ECHO+:} false; then :
6693  $as_echo_n "(cached) " >&6
6694else
6695  case $ECHO in
6696  [\\/]* | ?:[\\/]*)
6697  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6698  ;;
6699  *)
6700  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6701for as_dir in $PATH
6702do
6703  IFS=$as_save_IFS
6704  test -z "$as_dir" && as_dir=.
6705    for ac_exec_ext in '' $ac_executable_extensions; do
6706  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6707    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6708    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6709    break 2
6710  fi
6711done
6712  done
6713IFS=$as_save_IFS
6714
6715  ;;
6716esac
6717fi
6718ECHO=$ac_cv_path_ECHO
6719if test -n "$ECHO"; then
6720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6721$as_echo "$ECHO" >&6; }
6722else
6723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6724$as_echo "no" >&6; }
6725fi
6726
6727
6728  test -n "$ECHO" && break
6729done
6730
6731  else
6732    # The variable is set, but is it from the command line or the environment?
6733
6734    # Try to remove the string !ECHO! from our list.
6735    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
6736    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6737      # If it failed, the variable was not from the command line. Ignore it,
6738      # but warn the user (except for BASH, which is always set by the calling BASH).
6739      if test "xECHO" != xBASH; then
6740        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
6741$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
6742      fi
6743      # Try to locate tool using the code snippet
6744      for ac_prog in echo
6745do
6746  # Extract the first word of "$ac_prog", so it can be a program name with args.
6747set dummy $ac_prog; ac_word=$2
6748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6749$as_echo_n "checking for $ac_word... " >&6; }
6750if ${ac_cv_path_ECHO+:} false; then :
6751  $as_echo_n "(cached) " >&6
6752else
6753  case $ECHO in
6754  [\\/]* | ?:[\\/]*)
6755  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6756  ;;
6757  *)
6758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6759for as_dir in $PATH
6760do
6761  IFS=$as_save_IFS
6762  test -z "$as_dir" && as_dir=.
6763    for ac_exec_ext in '' $ac_executable_extensions; do
6764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6765    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6767    break 2
6768  fi
6769done
6770  done
6771IFS=$as_save_IFS
6772
6773  ;;
6774esac
6775fi
6776ECHO=$ac_cv_path_ECHO
6777if test -n "$ECHO"; then
6778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6779$as_echo "$ECHO" >&6; }
6780else
6781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6782$as_echo "no" >&6; }
6783fi
6784
6785
6786  test -n "$ECHO" && break
6787done
6788
6789    else
6790      # If it succeeded, then it was overridden by the user. We will use it
6791      # for the tool.
6792
6793      # First remove it from the list of overridden variables, so we can test
6794      # for unknown variables in the end.
6795      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6796
6797      # Check if the provided tool contains a complete path.
6798      tool_specified="$ECHO"
6799      tool_basename="${tool_specified##*/}"
6800      if test "x$tool_basename" = "x$tool_specified"; then
6801        # A command without a complete path is provided, search $PATH.
6802        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
6803$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
6804        # Extract the first word of "$tool_basename", so it can be a program name with args.
6805set dummy $tool_basename; ac_word=$2
6806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6807$as_echo_n "checking for $ac_word... " >&6; }
6808if ${ac_cv_path_ECHO+:} false; then :
6809  $as_echo_n "(cached) " >&6
6810else
6811  case $ECHO in
6812  [\\/]* | ?:[\\/]*)
6813  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
6814  ;;
6815  *)
6816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6817for as_dir in $PATH
6818do
6819  IFS=$as_save_IFS
6820  test -z "$as_dir" && as_dir=.
6821    for ac_exec_ext in '' $ac_executable_extensions; do
6822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6823    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
6824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6825    break 2
6826  fi
6827done
6828  done
6829IFS=$as_save_IFS
6830
6831  ;;
6832esac
6833fi
6834ECHO=$ac_cv_path_ECHO
6835if test -n "$ECHO"; then
6836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
6837$as_echo "$ECHO" >&6; }
6838else
6839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6840$as_echo "no" >&6; }
6841fi
6842
6843
6844        if test "x$ECHO" = x; then
6845          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6846        fi
6847      else
6848        # Otherwise we believe it is a complete path. Use it as it is.
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
6850$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
6851        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
6852$as_echo_n "checking for ECHO... " >&6; }
6853        if test ! -x "$tool_specified"; then
6854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6855$as_echo "not found" >&6; }
6856          as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
6857        fi
6858        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6859$as_echo "$tool_specified" >&6; }
6860      fi
6861    fi
6862  fi
6863
6864
6865
6866  if test "x$ECHO" = x; then
6867    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
6868  fi
6869
6870
6871
6872
6873
6874  # Publish this variable in the help.
6875
6876
6877  if test "x$EXPR" = x; then
6878    # The variable is not set by user, try to locate tool using the code snippet
6879    for ac_prog in expr
6880do
6881  # Extract the first word of "$ac_prog", so it can be a program name with args.
6882set dummy $ac_prog; ac_word=$2
6883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6884$as_echo_n "checking for $ac_word... " >&6; }
6885if ${ac_cv_path_EXPR+:} false; then :
6886  $as_echo_n "(cached) " >&6
6887else
6888  case $EXPR in
6889  [\\/]* | ?:[\\/]*)
6890  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6891  ;;
6892  *)
6893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6894for as_dir in $PATH
6895do
6896  IFS=$as_save_IFS
6897  test -z "$as_dir" && as_dir=.
6898    for ac_exec_ext in '' $ac_executable_extensions; do
6899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6900    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6902    break 2
6903  fi
6904done
6905  done
6906IFS=$as_save_IFS
6907
6908  ;;
6909esac
6910fi
6911EXPR=$ac_cv_path_EXPR
6912if test -n "$EXPR"; then
6913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6914$as_echo "$EXPR" >&6; }
6915else
6916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6917$as_echo "no" >&6; }
6918fi
6919
6920
6921  test -n "$EXPR" && break
6922done
6923
6924  else
6925    # The variable is set, but is it from the command line or the environment?
6926
6927    # Try to remove the string !EXPR! from our list.
6928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
6929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6930      # If it failed, the variable was not from the command line. Ignore it,
6931      # but warn the user (except for BASH, which is always set by the calling BASH).
6932      if test "xEXPR" != xBASH; then
6933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
6934$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
6935      fi
6936      # Try to locate tool using the code snippet
6937      for ac_prog in expr
6938do
6939  # Extract the first word of "$ac_prog", so it can be a program name with args.
6940set dummy $ac_prog; ac_word=$2
6941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6942$as_echo_n "checking for $ac_word... " >&6; }
6943if ${ac_cv_path_EXPR+:} false; then :
6944  $as_echo_n "(cached) " >&6
6945else
6946  case $EXPR in
6947  [\\/]* | ?:[\\/]*)
6948  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
6949  ;;
6950  *)
6951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6952for as_dir in $PATH
6953do
6954  IFS=$as_save_IFS
6955  test -z "$as_dir" && as_dir=.
6956    for ac_exec_ext in '' $ac_executable_extensions; do
6957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6958    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
6959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6960    break 2
6961  fi
6962done
6963  done
6964IFS=$as_save_IFS
6965
6966  ;;
6967esac
6968fi
6969EXPR=$ac_cv_path_EXPR
6970if test -n "$EXPR"; then
6971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
6972$as_echo "$EXPR" >&6; }
6973else
6974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6975$as_echo "no" >&6; }
6976fi
6977
6978
6979  test -n "$EXPR" && break
6980done
6981
6982    else
6983      # If it succeeded, then it was overridden by the user. We will use it
6984      # for the tool.
6985
6986      # First remove it from the list of overridden variables, so we can test
6987      # for unknown variables in the end.
6988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6989
6990      # Check if the provided tool contains a complete path.
6991      tool_specified="$EXPR"
6992      tool_basename="${tool_specified##*/}"
6993      if test "x$tool_basename" = "x$tool_specified"; then
6994        # A command without a complete path is provided, search $PATH.
6995        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
6996$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
6997        # Extract the first word of "$tool_basename", so it can be a program name with args.
6998set dummy $tool_basename; ac_word=$2
6999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7000$as_echo_n "checking for $ac_word... " >&6; }
7001if ${ac_cv_path_EXPR+:} false; then :
7002  $as_echo_n "(cached) " >&6
7003else
7004  case $EXPR in
7005  [\\/]* | ?:[\\/]*)
7006  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7007  ;;
7008  *)
7009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7010for as_dir in $PATH
7011do
7012  IFS=$as_save_IFS
7013  test -z "$as_dir" && as_dir=.
7014    for ac_exec_ext in '' $ac_executable_extensions; do
7015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7016    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7018    break 2
7019  fi
7020done
7021  done
7022IFS=$as_save_IFS
7023
7024  ;;
7025esac
7026fi
7027EXPR=$ac_cv_path_EXPR
7028if test -n "$EXPR"; then
7029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7030$as_echo "$EXPR" >&6; }
7031else
7032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7033$as_echo "no" >&6; }
7034fi
7035
7036
7037        if test "x$EXPR" = x; then
7038          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7039        fi
7040      else
7041        # Otherwise we believe it is a complete path. Use it as it is.
7042        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7043$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7044        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7045$as_echo_n "checking for EXPR... " >&6; }
7046        if test ! -x "$tool_specified"; then
7047          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7048$as_echo "not found" >&6; }
7049          as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7050        fi
7051        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7052$as_echo "$tool_specified" >&6; }
7053      fi
7054    fi
7055  fi
7056
7057
7058
7059  if test "x$EXPR" = x; then
7060    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7061  fi
7062
7063
7064
7065
7066
7067  # Publish this variable in the help.
7068
7069
7070  if test "x$FILE" = x; then
7071    # The variable is not set by user, try to locate tool using the code snippet
7072    for ac_prog in file
7073do
7074  # Extract the first word of "$ac_prog", so it can be a program name with args.
7075set dummy $ac_prog; ac_word=$2
7076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7077$as_echo_n "checking for $ac_word... " >&6; }
7078if ${ac_cv_path_FILE+:} false; then :
7079  $as_echo_n "(cached) " >&6
7080else
7081  case $FILE in
7082  [\\/]* | ?:[\\/]*)
7083  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7084  ;;
7085  *)
7086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7087for as_dir in $PATH
7088do
7089  IFS=$as_save_IFS
7090  test -z "$as_dir" && as_dir=.
7091    for ac_exec_ext in '' $ac_executable_extensions; do
7092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7093    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7095    break 2
7096  fi
7097done
7098  done
7099IFS=$as_save_IFS
7100
7101  ;;
7102esac
7103fi
7104FILE=$ac_cv_path_FILE
7105if test -n "$FILE"; then
7106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7107$as_echo "$FILE" >&6; }
7108else
7109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7110$as_echo "no" >&6; }
7111fi
7112
7113
7114  test -n "$FILE" && break
7115done
7116
7117  else
7118    # The variable is set, but is it from the command line or the environment?
7119
7120    # Try to remove the string !FILE! from our list.
7121    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7122    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7123      # If it failed, the variable was not from the command line. Ignore it,
7124      # but warn the user (except for BASH, which is always set by the calling BASH).
7125      if test "xFILE" != xBASH; then
7126        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7127$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7128      fi
7129      # Try to locate tool using the code snippet
7130      for ac_prog in file
7131do
7132  # Extract the first word of "$ac_prog", so it can be a program name with args.
7133set dummy $ac_prog; ac_word=$2
7134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7135$as_echo_n "checking for $ac_word... " >&6; }
7136if ${ac_cv_path_FILE+:} false; then :
7137  $as_echo_n "(cached) " >&6
7138else
7139  case $FILE in
7140  [\\/]* | ?:[\\/]*)
7141  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7142  ;;
7143  *)
7144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7145for as_dir in $PATH
7146do
7147  IFS=$as_save_IFS
7148  test -z "$as_dir" && as_dir=.
7149    for ac_exec_ext in '' $ac_executable_extensions; do
7150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7151    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7153    break 2
7154  fi
7155done
7156  done
7157IFS=$as_save_IFS
7158
7159  ;;
7160esac
7161fi
7162FILE=$ac_cv_path_FILE
7163if test -n "$FILE"; then
7164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7165$as_echo "$FILE" >&6; }
7166else
7167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7168$as_echo "no" >&6; }
7169fi
7170
7171
7172  test -n "$FILE" && break
7173done
7174
7175    else
7176      # If it succeeded, then it was overridden by the user. We will use it
7177      # for the tool.
7178
7179      # First remove it from the list of overridden variables, so we can test
7180      # for unknown variables in the end.
7181      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7182
7183      # Check if the provided tool contains a complete path.
7184      tool_specified="$FILE"
7185      tool_basename="${tool_specified##*/}"
7186      if test "x$tool_basename" = "x$tool_specified"; then
7187        # A command without a complete path is provided, search $PATH.
7188        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7189$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7190        # Extract the first word of "$tool_basename", so it can be a program name with args.
7191set dummy $tool_basename; ac_word=$2
7192{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7193$as_echo_n "checking for $ac_word... " >&6; }
7194if ${ac_cv_path_FILE+:} false; then :
7195  $as_echo_n "(cached) " >&6
7196else
7197  case $FILE in
7198  [\\/]* | ?:[\\/]*)
7199  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7200  ;;
7201  *)
7202  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7203for as_dir in $PATH
7204do
7205  IFS=$as_save_IFS
7206  test -z "$as_dir" && as_dir=.
7207    for ac_exec_ext in '' $ac_executable_extensions; do
7208  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7209    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7210    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7211    break 2
7212  fi
7213done
7214  done
7215IFS=$as_save_IFS
7216
7217  ;;
7218esac
7219fi
7220FILE=$ac_cv_path_FILE
7221if test -n "$FILE"; then
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7223$as_echo "$FILE" >&6; }
7224else
7225  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7226$as_echo "no" >&6; }
7227fi
7228
7229
7230        if test "x$FILE" = x; then
7231          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7232        fi
7233      else
7234        # Otherwise we believe it is a complete path. Use it as it is.
7235        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7236$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7238$as_echo_n "checking for FILE... " >&6; }
7239        if test ! -x "$tool_specified"; then
7240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7241$as_echo "not found" >&6; }
7242          as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7243        fi
7244        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7245$as_echo "$tool_specified" >&6; }
7246      fi
7247    fi
7248  fi
7249
7250
7251
7252  if test "x$FILE" = x; then
7253    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7254  fi
7255
7256
7257
7258
7259
7260  # Publish this variable in the help.
7261
7262
7263  if test "x$FIND" = x; then
7264    # The variable is not set by user, try to locate tool using the code snippet
7265    for ac_prog in find
7266do
7267  # Extract the first word of "$ac_prog", so it can be a program name with args.
7268set dummy $ac_prog; ac_word=$2
7269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7270$as_echo_n "checking for $ac_word... " >&6; }
7271if ${ac_cv_path_FIND+:} false; then :
7272  $as_echo_n "(cached) " >&6
7273else
7274  case $FIND in
7275  [\\/]* | ?:[\\/]*)
7276  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7277  ;;
7278  *)
7279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7280for as_dir in $PATH
7281do
7282  IFS=$as_save_IFS
7283  test -z "$as_dir" && as_dir=.
7284    for ac_exec_ext in '' $ac_executable_extensions; do
7285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7286    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7288    break 2
7289  fi
7290done
7291  done
7292IFS=$as_save_IFS
7293
7294  ;;
7295esac
7296fi
7297FIND=$ac_cv_path_FIND
7298if test -n "$FIND"; then
7299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7300$as_echo "$FIND" >&6; }
7301else
7302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7303$as_echo "no" >&6; }
7304fi
7305
7306
7307  test -n "$FIND" && break
7308done
7309
7310  else
7311    # The variable is set, but is it from the command line or the environment?
7312
7313    # Try to remove the string !FIND! from our list.
7314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
7315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7316      # If it failed, the variable was not from the command line. Ignore it,
7317      # but warn the user (except for BASH, which is always set by the calling BASH).
7318      if test "xFIND" != xBASH; then
7319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
7320$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
7321      fi
7322      # Try to locate tool using the code snippet
7323      for ac_prog in find
7324do
7325  # Extract the first word of "$ac_prog", so it can be a program name with args.
7326set dummy $ac_prog; ac_word=$2
7327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7328$as_echo_n "checking for $ac_word... " >&6; }
7329if ${ac_cv_path_FIND+:} false; then :
7330  $as_echo_n "(cached) " >&6
7331else
7332  case $FIND in
7333  [\\/]* | ?:[\\/]*)
7334  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7335  ;;
7336  *)
7337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7338for as_dir in $PATH
7339do
7340  IFS=$as_save_IFS
7341  test -z "$as_dir" && as_dir=.
7342    for ac_exec_ext in '' $ac_executable_extensions; do
7343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7344    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7346    break 2
7347  fi
7348done
7349  done
7350IFS=$as_save_IFS
7351
7352  ;;
7353esac
7354fi
7355FIND=$ac_cv_path_FIND
7356if test -n "$FIND"; then
7357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7358$as_echo "$FIND" >&6; }
7359else
7360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7361$as_echo "no" >&6; }
7362fi
7363
7364
7365  test -n "$FIND" && break
7366done
7367
7368    else
7369      # If it succeeded, then it was overridden by the user. We will use it
7370      # for the tool.
7371
7372      # First remove it from the list of overridden variables, so we can test
7373      # for unknown variables in the end.
7374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7375
7376      # Check if the provided tool contains a complete path.
7377      tool_specified="$FIND"
7378      tool_basename="${tool_specified##*/}"
7379      if test "x$tool_basename" = "x$tool_specified"; then
7380        # A command without a complete path is provided, search $PATH.
7381        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
7382$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
7383        # Extract the first word of "$tool_basename", so it can be a program name with args.
7384set dummy $tool_basename; ac_word=$2
7385{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7386$as_echo_n "checking for $ac_word... " >&6; }
7387if ${ac_cv_path_FIND+:} false; then :
7388  $as_echo_n "(cached) " >&6
7389else
7390  case $FIND in
7391  [\\/]* | ?:[\\/]*)
7392  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
7393  ;;
7394  *)
7395  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7396for as_dir in $PATH
7397do
7398  IFS=$as_save_IFS
7399  test -z "$as_dir" && as_dir=.
7400    for ac_exec_ext in '' $ac_executable_extensions; do
7401  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7402    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
7403    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7404    break 2
7405  fi
7406done
7407  done
7408IFS=$as_save_IFS
7409
7410  ;;
7411esac
7412fi
7413FIND=$ac_cv_path_FIND
7414if test -n "$FIND"; then
7415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
7416$as_echo "$FIND" >&6; }
7417else
7418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7419$as_echo "no" >&6; }
7420fi
7421
7422
7423        if test "x$FIND" = x; then
7424          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7425        fi
7426      else
7427        # Otherwise we believe it is a complete path. Use it as it is.
7428        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
7429$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
7430        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
7431$as_echo_n "checking for FIND... " >&6; }
7432        if test ! -x "$tool_specified"; then
7433          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7434$as_echo "not found" >&6; }
7435          as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
7436        fi
7437        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7438$as_echo "$tool_specified" >&6; }
7439      fi
7440    fi
7441  fi
7442
7443
7444
7445  if test "x$FIND" = x; then
7446    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
7447  fi
7448
7449
7450
7451
7452
7453  # Publish this variable in the help.
7454
7455
7456  if test "x$HEAD" = x; then
7457    # The variable is not set by user, try to locate tool using the code snippet
7458    for ac_prog in head
7459do
7460  # Extract the first word of "$ac_prog", so it can be a program name with args.
7461set dummy $ac_prog; ac_word=$2
7462{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7463$as_echo_n "checking for $ac_word... " >&6; }
7464if ${ac_cv_path_HEAD+:} false; then :
7465  $as_echo_n "(cached) " >&6
7466else
7467  case $HEAD in
7468  [\\/]* | ?:[\\/]*)
7469  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7470  ;;
7471  *)
7472  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7473for as_dir in $PATH
7474do
7475  IFS=$as_save_IFS
7476  test -z "$as_dir" && as_dir=.
7477    for ac_exec_ext in '' $ac_executable_extensions; do
7478  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7479    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7480    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7481    break 2
7482  fi
7483done
7484  done
7485IFS=$as_save_IFS
7486
7487  ;;
7488esac
7489fi
7490HEAD=$ac_cv_path_HEAD
7491if test -n "$HEAD"; then
7492  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7493$as_echo "$HEAD" >&6; }
7494else
7495  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7496$as_echo "no" >&6; }
7497fi
7498
7499
7500  test -n "$HEAD" && break
7501done
7502
7503  else
7504    # The variable is set, but is it from the command line or the environment?
7505
7506    # Try to remove the string !HEAD! from our list.
7507    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
7508    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7509      # If it failed, the variable was not from the command line. Ignore it,
7510      # but warn the user (except for BASH, which is always set by the calling BASH).
7511      if test "xHEAD" != xBASH; then
7512        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
7513$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
7514      fi
7515      # Try to locate tool using the code snippet
7516      for ac_prog in head
7517do
7518  # Extract the first word of "$ac_prog", so it can be a program name with args.
7519set dummy $ac_prog; ac_word=$2
7520{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7521$as_echo_n "checking for $ac_word... " >&6; }
7522if ${ac_cv_path_HEAD+:} false; then :
7523  $as_echo_n "(cached) " >&6
7524else
7525  case $HEAD in
7526  [\\/]* | ?:[\\/]*)
7527  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7528  ;;
7529  *)
7530  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7531for as_dir in $PATH
7532do
7533  IFS=$as_save_IFS
7534  test -z "$as_dir" && as_dir=.
7535    for ac_exec_ext in '' $ac_executable_extensions; do
7536  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7537    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7538    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7539    break 2
7540  fi
7541done
7542  done
7543IFS=$as_save_IFS
7544
7545  ;;
7546esac
7547fi
7548HEAD=$ac_cv_path_HEAD
7549if test -n "$HEAD"; then
7550  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7551$as_echo "$HEAD" >&6; }
7552else
7553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7554$as_echo "no" >&6; }
7555fi
7556
7557
7558  test -n "$HEAD" && break
7559done
7560
7561    else
7562      # If it succeeded, then it was overridden by the user. We will use it
7563      # for the tool.
7564
7565      # First remove it from the list of overridden variables, so we can test
7566      # for unknown variables in the end.
7567      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7568
7569      # Check if the provided tool contains a complete path.
7570      tool_specified="$HEAD"
7571      tool_basename="${tool_specified##*/}"
7572      if test "x$tool_basename" = "x$tool_specified"; then
7573        # A command without a complete path is provided, search $PATH.
7574        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
7575$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
7576        # Extract the first word of "$tool_basename", so it can be a program name with args.
7577set dummy $tool_basename; ac_word=$2
7578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7579$as_echo_n "checking for $ac_word... " >&6; }
7580if ${ac_cv_path_HEAD+:} false; then :
7581  $as_echo_n "(cached) " >&6
7582else
7583  case $HEAD in
7584  [\\/]* | ?:[\\/]*)
7585  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
7586  ;;
7587  *)
7588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7589for as_dir in $PATH
7590do
7591  IFS=$as_save_IFS
7592  test -z "$as_dir" && as_dir=.
7593    for ac_exec_ext in '' $ac_executable_extensions; do
7594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7595    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
7596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7597    break 2
7598  fi
7599done
7600  done
7601IFS=$as_save_IFS
7602
7603  ;;
7604esac
7605fi
7606HEAD=$ac_cv_path_HEAD
7607if test -n "$HEAD"; then
7608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
7609$as_echo "$HEAD" >&6; }
7610else
7611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7612$as_echo "no" >&6; }
7613fi
7614
7615
7616        if test "x$HEAD" = x; then
7617          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7618        fi
7619      else
7620        # Otherwise we believe it is a complete path. Use it as it is.
7621        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
7622$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
7623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
7624$as_echo_n "checking for HEAD... " >&6; }
7625        if test ! -x "$tool_specified"; then
7626          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7627$as_echo "not found" >&6; }
7628          as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
7629        fi
7630        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7631$as_echo "$tool_specified" >&6; }
7632      fi
7633    fi
7634  fi
7635
7636
7637
7638  if test "x$HEAD" = x; then
7639    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
7640  fi
7641
7642
7643
7644
7645
7646  # Publish this variable in the help.
7647
7648
7649  if test "x$LN" = x; then
7650    # The variable is not set by user, try to locate tool using the code snippet
7651    for ac_prog in ln
7652do
7653  # Extract the first word of "$ac_prog", so it can be a program name with args.
7654set dummy $ac_prog; ac_word=$2
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656$as_echo_n "checking for $ac_word... " >&6; }
7657if ${ac_cv_path_LN+:} false; then :
7658  $as_echo_n "(cached) " >&6
7659else
7660  case $LN in
7661  [\\/]* | ?:[\\/]*)
7662  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7663  ;;
7664  *)
7665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7666for as_dir in $PATH
7667do
7668  IFS=$as_save_IFS
7669  test -z "$as_dir" && as_dir=.
7670    for ac_exec_ext in '' $ac_executable_extensions; do
7671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7672    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7674    break 2
7675  fi
7676done
7677  done
7678IFS=$as_save_IFS
7679
7680  ;;
7681esac
7682fi
7683LN=$ac_cv_path_LN
7684if test -n "$LN"; then
7685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7686$as_echo "$LN" >&6; }
7687else
7688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689$as_echo "no" >&6; }
7690fi
7691
7692
7693  test -n "$LN" && break
7694done
7695
7696  else
7697    # The variable is set, but is it from the command line or the environment?
7698
7699    # Try to remove the string !LN! from our list.
7700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
7701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7702      # If it failed, the variable was not from the command line. Ignore it,
7703      # but warn the user (except for BASH, which is always set by the calling BASH).
7704      if test "xLN" != xBASH; then
7705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
7706$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
7707      fi
7708      # Try to locate tool using the code snippet
7709      for ac_prog in ln
7710do
7711  # Extract the first word of "$ac_prog", so it can be a program name with args.
7712set dummy $ac_prog; ac_word=$2
7713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7714$as_echo_n "checking for $ac_word... " >&6; }
7715if ${ac_cv_path_LN+:} false; then :
7716  $as_echo_n "(cached) " >&6
7717else
7718  case $LN in
7719  [\\/]* | ?:[\\/]*)
7720  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7721  ;;
7722  *)
7723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7724for as_dir in $PATH
7725do
7726  IFS=$as_save_IFS
7727  test -z "$as_dir" && as_dir=.
7728    for ac_exec_ext in '' $ac_executable_extensions; do
7729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7730    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7732    break 2
7733  fi
7734done
7735  done
7736IFS=$as_save_IFS
7737
7738  ;;
7739esac
7740fi
7741LN=$ac_cv_path_LN
7742if test -n "$LN"; then
7743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7744$as_echo "$LN" >&6; }
7745else
7746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7747$as_echo "no" >&6; }
7748fi
7749
7750
7751  test -n "$LN" && break
7752done
7753
7754    else
7755      # If it succeeded, then it was overridden by the user. We will use it
7756      # for the tool.
7757
7758      # First remove it from the list of overridden variables, so we can test
7759      # for unknown variables in the end.
7760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7761
7762      # Check if the provided tool contains a complete path.
7763      tool_specified="$LN"
7764      tool_basename="${tool_specified##*/}"
7765      if test "x$tool_basename" = "x$tool_specified"; then
7766        # A command without a complete path is provided, search $PATH.
7767        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
7768$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
7769        # Extract the first word of "$tool_basename", so it can be a program name with args.
7770set dummy $tool_basename; ac_word=$2
7771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7772$as_echo_n "checking for $ac_word... " >&6; }
7773if ${ac_cv_path_LN+:} false; then :
7774  $as_echo_n "(cached) " >&6
7775else
7776  case $LN in
7777  [\\/]* | ?:[\\/]*)
7778  ac_cv_path_LN="$LN" # Let the user override the test with a path.
7779  ;;
7780  *)
7781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7782for as_dir in $PATH
7783do
7784  IFS=$as_save_IFS
7785  test -z "$as_dir" && as_dir=.
7786    for ac_exec_ext in '' $ac_executable_extensions; do
7787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7788    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
7789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7790    break 2
7791  fi
7792done
7793  done
7794IFS=$as_save_IFS
7795
7796  ;;
7797esac
7798fi
7799LN=$ac_cv_path_LN
7800if test -n "$LN"; then
7801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
7802$as_echo "$LN" >&6; }
7803else
7804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7805$as_echo "no" >&6; }
7806fi
7807
7808
7809        if test "x$LN" = x; then
7810          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7811        fi
7812      else
7813        # Otherwise we believe it is a complete path. Use it as it is.
7814        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
7815$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
7816        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
7817$as_echo_n "checking for LN... " >&6; }
7818        if test ! -x "$tool_specified"; then
7819          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7820$as_echo "not found" >&6; }
7821          as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
7822        fi
7823        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7824$as_echo "$tool_specified" >&6; }
7825      fi
7826    fi
7827  fi
7828
7829
7830
7831  if test "x$LN" = x; then
7832    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
7833  fi
7834
7835
7836
7837
7838
7839  # Publish this variable in the help.
7840
7841
7842  if test "x$LS" = x; then
7843    # The variable is not set by user, try to locate tool using the code snippet
7844    for ac_prog in ls
7845do
7846  # Extract the first word of "$ac_prog", so it can be a program name with args.
7847set dummy $ac_prog; ac_word=$2
7848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7849$as_echo_n "checking for $ac_word... " >&6; }
7850if ${ac_cv_path_LS+:} false; then :
7851  $as_echo_n "(cached) " >&6
7852else
7853  case $LS in
7854  [\\/]* | ?:[\\/]*)
7855  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7856  ;;
7857  *)
7858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7859for as_dir in $PATH
7860do
7861  IFS=$as_save_IFS
7862  test -z "$as_dir" && as_dir=.
7863    for ac_exec_ext in '' $ac_executable_extensions; do
7864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7865    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7867    break 2
7868  fi
7869done
7870  done
7871IFS=$as_save_IFS
7872
7873  ;;
7874esac
7875fi
7876LS=$ac_cv_path_LS
7877if test -n "$LS"; then
7878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7879$as_echo "$LS" >&6; }
7880else
7881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7882$as_echo "no" >&6; }
7883fi
7884
7885
7886  test -n "$LS" && break
7887done
7888
7889  else
7890    # The variable is set, but is it from the command line or the environment?
7891
7892    # Try to remove the string !LS! from our list.
7893    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
7894    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7895      # If it failed, the variable was not from the command line. Ignore it,
7896      # but warn the user (except for BASH, which is always set by the calling BASH).
7897      if test "xLS" != xBASH; then
7898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
7899$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
7900      fi
7901      # Try to locate tool using the code snippet
7902      for ac_prog in ls
7903do
7904  # Extract the first word of "$ac_prog", so it can be a program name with args.
7905set dummy $ac_prog; ac_word=$2
7906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7907$as_echo_n "checking for $ac_word... " >&6; }
7908if ${ac_cv_path_LS+:} false; then :
7909  $as_echo_n "(cached) " >&6
7910else
7911  case $LS in
7912  [\\/]* | ?:[\\/]*)
7913  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7914  ;;
7915  *)
7916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7917for as_dir in $PATH
7918do
7919  IFS=$as_save_IFS
7920  test -z "$as_dir" && as_dir=.
7921    for ac_exec_ext in '' $ac_executable_extensions; do
7922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7923    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7925    break 2
7926  fi
7927done
7928  done
7929IFS=$as_save_IFS
7930
7931  ;;
7932esac
7933fi
7934LS=$ac_cv_path_LS
7935if test -n "$LS"; then
7936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7937$as_echo "$LS" >&6; }
7938else
7939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7940$as_echo "no" >&6; }
7941fi
7942
7943
7944  test -n "$LS" && break
7945done
7946
7947    else
7948      # If it succeeded, then it was overridden by the user. We will use it
7949      # for the tool.
7950
7951      # First remove it from the list of overridden variables, so we can test
7952      # for unknown variables in the end.
7953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7954
7955      # Check if the provided tool contains a complete path.
7956      tool_specified="$LS"
7957      tool_basename="${tool_specified##*/}"
7958      if test "x$tool_basename" = "x$tool_specified"; then
7959        # A command without a complete path is provided, search $PATH.
7960        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
7961$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
7962        # Extract the first word of "$tool_basename", so it can be a program name with args.
7963set dummy $tool_basename; ac_word=$2
7964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7965$as_echo_n "checking for $ac_word... " >&6; }
7966if ${ac_cv_path_LS+:} false; then :
7967  $as_echo_n "(cached) " >&6
7968else
7969  case $LS in
7970  [\\/]* | ?:[\\/]*)
7971  ac_cv_path_LS="$LS" # Let the user override the test with a path.
7972  ;;
7973  *)
7974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7975for as_dir in $PATH
7976do
7977  IFS=$as_save_IFS
7978  test -z "$as_dir" && as_dir=.
7979    for ac_exec_ext in '' $ac_executable_extensions; do
7980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7981    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
7982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7983    break 2
7984  fi
7985done
7986  done
7987IFS=$as_save_IFS
7988
7989  ;;
7990esac
7991fi
7992LS=$ac_cv_path_LS
7993if test -n "$LS"; then
7994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
7995$as_echo "$LS" >&6; }
7996else
7997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7998$as_echo "no" >&6; }
7999fi
8000
8001
8002        if test "x$LS" = x; then
8003          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8004        fi
8005      else
8006        # Otherwise we believe it is a complete path. Use it as it is.
8007        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8008$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8009        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8010$as_echo_n "checking for LS... " >&6; }
8011        if test ! -x "$tool_specified"; then
8012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8013$as_echo "not found" >&6; }
8014          as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8015        fi
8016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8017$as_echo "$tool_specified" >&6; }
8018      fi
8019    fi
8020  fi
8021
8022
8023
8024  if test "x$LS" = x; then
8025    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8026  fi
8027
8028
8029
8030
8031
8032  # Publish this variable in the help.
8033
8034
8035  if test "x$MKDIR" = x; then
8036    # The variable is not set by user, try to locate tool using the code snippet
8037    for ac_prog in mkdir
8038do
8039  # Extract the first word of "$ac_prog", so it can be a program name with args.
8040set dummy $ac_prog; ac_word=$2
8041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8042$as_echo_n "checking for $ac_word... " >&6; }
8043if ${ac_cv_path_MKDIR+:} false; then :
8044  $as_echo_n "(cached) " >&6
8045else
8046  case $MKDIR in
8047  [\\/]* | ?:[\\/]*)
8048  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8049  ;;
8050  *)
8051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8052for as_dir in $PATH
8053do
8054  IFS=$as_save_IFS
8055  test -z "$as_dir" && as_dir=.
8056    for ac_exec_ext in '' $ac_executable_extensions; do
8057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8058    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8060    break 2
8061  fi
8062done
8063  done
8064IFS=$as_save_IFS
8065
8066  ;;
8067esac
8068fi
8069MKDIR=$ac_cv_path_MKDIR
8070if test -n "$MKDIR"; then
8071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8072$as_echo "$MKDIR" >&6; }
8073else
8074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8075$as_echo "no" >&6; }
8076fi
8077
8078
8079  test -n "$MKDIR" && break
8080done
8081
8082  else
8083    # The variable is set, but is it from the command line or the environment?
8084
8085    # Try to remove the string !MKDIR! from our list.
8086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8088      # If it failed, the variable was not from the command line. Ignore it,
8089      # but warn the user (except for BASH, which is always set by the calling BASH).
8090      if test "xMKDIR" != xBASH; then
8091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8092$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8093      fi
8094      # Try to locate tool using the code snippet
8095      for ac_prog in mkdir
8096do
8097  # Extract the first word of "$ac_prog", so it can be a program name with args.
8098set dummy $ac_prog; ac_word=$2
8099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8100$as_echo_n "checking for $ac_word... " >&6; }
8101if ${ac_cv_path_MKDIR+:} false; then :
8102  $as_echo_n "(cached) " >&6
8103else
8104  case $MKDIR in
8105  [\\/]* | ?:[\\/]*)
8106  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8107  ;;
8108  *)
8109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8110for as_dir in $PATH
8111do
8112  IFS=$as_save_IFS
8113  test -z "$as_dir" && as_dir=.
8114    for ac_exec_ext in '' $ac_executable_extensions; do
8115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8116    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8118    break 2
8119  fi
8120done
8121  done
8122IFS=$as_save_IFS
8123
8124  ;;
8125esac
8126fi
8127MKDIR=$ac_cv_path_MKDIR
8128if test -n "$MKDIR"; then
8129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8130$as_echo "$MKDIR" >&6; }
8131else
8132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8133$as_echo "no" >&6; }
8134fi
8135
8136
8137  test -n "$MKDIR" && break
8138done
8139
8140    else
8141      # If it succeeded, then it was overridden by the user. We will use it
8142      # for the tool.
8143
8144      # First remove it from the list of overridden variables, so we can test
8145      # for unknown variables in the end.
8146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8147
8148      # Check if the provided tool contains a complete path.
8149      tool_specified="$MKDIR"
8150      tool_basename="${tool_specified##*/}"
8151      if test "x$tool_basename" = "x$tool_specified"; then
8152        # A command without a complete path is provided, search $PATH.
8153        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8154$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8155        # Extract the first word of "$tool_basename", so it can be a program name with args.
8156set dummy $tool_basename; ac_word=$2
8157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8158$as_echo_n "checking for $ac_word... " >&6; }
8159if ${ac_cv_path_MKDIR+:} false; then :
8160  $as_echo_n "(cached) " >&6
8161else
8162  case $MKDIR in
8163  [\\/]* | ?:[\\/]*)
8164  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8165  ;;
8166  *)
8167  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8168for as_dir in $PATH
8169do
8170  IFS=$as_save_IFS
8171  test -z "$as_dir" && as_dir=.
8172    for ac_exec_ext in '' $ac_executable_extensions; do
8173  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8174    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8175    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8176    break 2
8177  fi
8178done
8179  done
8180IFS=$as_save_IFS
8181
8182  ;;
8183esac
8184fi
8185MKDIR=$ac_cv_path_MKDIR
8186if test -n "$MKDIR"; then
8187  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8188$as_echo "$MKDIR" >&6; }
8189else
8190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8191$as_echo "no" >&6; }
8192fi
8193
8194
8195        if test "x$MKDIR" = x; then
8196          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8197        fi
8198      else
8199        # Otherwise we believe it is a complete path. Use it as it is.
8200        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8201$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8202        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8203$as_echo_n "checking for MKDIR... " >&6; }
8204        if test ! -x "$tool_specified"; then
8205          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8206$as_echo "not found" >&6; }
8207          as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8208        fi
8209        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8210$as_echo "$tool_specified" >&6; }
8211      fi
8212    fi
8213  fi
8214
8215
8216
8217  if test "x$MKDIR" = x; then
8218    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
8219  fi
8220
8221
8222
8223
8224
8225  # Publish this variable in the help.
8226
8227
8228  if test "x$MKTEMP" = x; then
8229    # The variable is not set by user, try to locate tool using the code snippet
8230    for ac_prog in mktemp
8231do
8232  # Extract the first word of "$ac_prog", so it can be a program name with args.
8233set dummy $ac_prog; ac_word=$2
8234{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8235$as_echo_n "checking for $ac_word... " >&6; }
8236if ${ac_cv_path_MKTEMP+:} false; then :
8237  $as_echo_n "(cached) " >&6
8238else
8239  case $MKTEMP in
8240  [\\/]* | ?:[\\/]*)
8241  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8242  ;;
8243  *)
8244  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8245for as_dir in $PATH
8246do
8247  IFS=$as_save_IFS
8248  test -z "$as_dir" && as_dir=.
8249    for ac_exec_ext in '' $ac_executable_extensions; do
8250  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8251    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8252    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8253    break 2
8254  fi
8255done
8256  done
8257IFS=$as_save_IFS
8258
8259  ;;
8260esac
8261fi
8262MKTEMP=$ac_cv_path_MKTEMP
8263if test -n "$MKTEMP"; then
8264  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8265$as_echo "$MKTEMP" >&6; }
8266else
8267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8268$as_echo "no" >&6; }
8269fi
8270
8271
8272  test -n "$MKTEMP" && break
8273done
8274
8275  else
8276    # The variable is set, but is it from the command line or the environment?
8277
8278    # Try to remove the string !MKTEMP! from our list.
8279    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
8280    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8281      # If it failed, the variable was not from the command line. Ignore it,
8282      # but warn the user (except for BASH, which is always set by the calling BASH).
8283      if test "xMKTEMP" != xBASH; then
8284        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
8285$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
8286      fi
8287      # Try to locate tool using the code snippet
8288      for ac_prog in mktemp
8289do
8290  # Extract the first word of "$ac_prog", so it can be a program name with args.
8291set dummy $ac_prog; ac_word=$2
8292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8293$as_echo_n "checking for $ac_word... " >&6; }
8294if ${ac_cv_path_MKTEMP+:} false; then :
8295  $as_echo_n "(cached) " >&6
8296else
8297  case $MKTEMP in
8298  [\\/]* | ?:[\\/]*)
8299  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8300  ;;
8301  *)
8302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8303for as_dir in $PATH
8304do
8305  IFS=$as_save_IFS
8306  test -z "$as_dir" && as_dir=.
8307    for ac_exec_ext in '' $ac_executable_extensions; do
8308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8309    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8311    break 2
8312  fi
8313done
8314  done
8315IFS=$as_save_IFS
8316
8317  ;;
8318esac
8319fi
8320MKTEMP=$ac_cv_path_MKTEMP
8321if test -n "$MKTEMP"; then
8322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8323$as_echo "$MKTEMP" >&6; }
8324else
8325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8326$as_echo "no" >&6; }
8327fi
8328
8329
8330  test -n "$MKTEMP" && break
8331done
8332
8333    else
8334      # If it succeeded, then it was overridden by the user. We will use it
8335      # for the tool.
8336
8337      # First remove it from the list of overridden variables, so we can test
8338      # for unknown variables in the end.
8339      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8340
8341      # Check if the provided tool contains a complete path.
8342      tool_specified="$MKTEMP"
8343      tool_basename="${tool_specified##*/}"
8344      if test "x$tool_basename" = "x$tool_specified"; then
8345        # A command without a complete path is provided, search $PATH.
8346        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
8347$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
8348        # Extract the first word of "$tool_basename", so it can be a program name with args.
8349set dummy $tool_basename; ac_word=$2
8350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8351$as_echo_n "checking for $ac_word... " >&6; }
8352if ${ac_cv_path_MKTEMP+:} false; then :
8353  $as_echo_n "(cached) " >&6
8354else
8355  case $MKTEMP in
8356  [\\/]* | ?:[\\/]*)
8357  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
8358  ;;
8359  *)
8360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8361for as_dir in $PATH
8362do
8363  IFS=$as_save_IFS
8364  test -z "$as_dir" && as_dir=.
8365    for ac_exec_ext in '' $ac_executable_extensions; do
8366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8367    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
8368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8369    break 2
8370  fi
8371done
8372  done
8373IFS=$as_save_IFS
8374
8375  ;;
8376esac
8377fi
8378MKTEMP=$ac_cv_path_MKTEMP
8379if test -n "$MKTEMP"; then
8380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
8381$as_echo "$MKTEMP" >&6; }
8382else
8383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8384$as_echo "no" >&6; }
8385fi
8386
8387
8388        if test "x$MKTEMP" = x; then
8389          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8390        fi
8391      else
8392        # Otherwise we believe it is a complete path. Use it as it is.
8393        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
8394$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
8395        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
8396$as_echo_n "checking for MKTEMP... " >&6; }
8397        if test ! -x "$tool_specified"; then
8398          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8399$as_echo "not found" >&6; }
8400          as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
8401        fi
8402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8403$as_echo "$tool_specified" >&6; }
8404      fi
8405    fi
8406  fi
8407
8408
8409
8410  if test "x$MKTEMP" = x; then
8411    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
8412  fi
8413
8414
8415
8416
8417
8418  # Publish this variable in the help.
8419
8420
8421  if test "x$MV" = x; then
8422    # The variable is not set by user, try to locate tool using the code snippet
8423    for ac_prog in mv
8424do
8425  # Extract the first word of "$ac_prog", so it can be a program name with args.
8426set dummy $ac_prog; ac_word=$2
8427{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8428$as_echo_n "checking for $ac_word... " >&6; }
8429if ${ac_cv_path_MV+:} false; then :
8430  $as_echo_n "(cached) " >&6
8431else
8432  case $MV in
8433  [\\/]* | ?:[\\/]*)
8434  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8435  ;;
8436  *)
8437  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8438for as_dir in $PATH
8439do
8440  IFS=$as_save_IFS
8441  test -z "$as_dir" && as_dir=.
8442    for ac_exec_ext in '' $ac_executable_extensions; do
8443  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8444    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8445    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8446    break 2
8447  fi
8448done
8449  done
8450IFS=$as_save_IFS
8451
8452  ;;
8453esac
8454fi
8455MV=$ac_cv_path_MV
8456if test -n "$MV"; then
8457  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8458$as_echo "$MV" >&6; }
8459else
8460  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8461$as_echo "no" >&6; }
8462fi
8463
8464
8465  test -n "$MV" && break
8466done
8467
8468  else
8469    # The variable is set, but is it from the command line or the environment?
8470
8471    # Try to remove the string !MV! from our list.
8472    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
8473    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8474      # If it failed, the variable was not from the command line. Ignore it,
8475      # but warn the user (except for BASH, which is always set by the calling BASH).
8476      if test "xMV" != xBASH; then
8477        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
8478$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
8479      fi
8480      # Try to locate tool using the code snippet
8481      for ac_prog in mv
8482do
8483  # Extract the first word of "$ac_prog", so it can be a program name with args.
8484set dummy $ac_prog; ac_word=$2
8485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8486$as_echo_n "checking for $ac_word... " >&6; }
8487if ${ac_cv_path_MV+:} false; then :
8488  $as_echo_n "(cached) " >&6
8489else
8490  case $MV in
8491  [\\/]* | ?:[\\/]*)
8492  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8493  ;;
8494  *)
8495  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8496for as_dir in $PATH
8497do
8498  IFS=$as_save_IFS
8499  test -z "$as_dir" && as_dir=.
8500    for ac_exec_ext in '' $ac_executable_extensions; do
8501  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8502    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8503    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8504    break 2
8505  fi
8506done
8507  done
8508IFS=$as_save_IFS
8509
8510  ;;
8511esac
8512fi
8513MV=$ac_cv_path_MV
8514if test -n "$MV"; then
8515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8516$as_echo "$MV" >&6; }
8517else
8518  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8519$as_echo "no" >&6; }
8520fi
8521
8522
8523  test -n "$MV" && break
8524done
8525
8526    else
8527      # If it succeeded, then it was overridden by the user. We will use it
8528      # for the tool.
8529
8530      # First remove it from the list of overridden variables, so we can test
8531      # for unknown variables in the end.
8532      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8533
8534      # Check if the provided tool contains a complete path.
8535      tool_specified="$MV"
8536      tool_basename="${tool_specified##*/}"
8537      if test "x$tool_basename" = "x$tool_specified"; then
8538        # A command without a complete path is provided, search $PATH.
8539        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
8540$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
8541        # Extract the first word of "$tool_basename", so it can be a program name with args.
8542set dummy $tool_basename; ac_word=$2
8543{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8544$as_echo_n "checking for $ac_word... " >&6; }
8545if ${ac_cv_path_MV+:} false; then :
8546  $as_echo_n "(cached) " >&6
8547else
8548  case $MV in
8549  [\\/]* | ?:[\\/]*)
8550  ac_cv_path_MV="$MV" # Let the user override the test with a path.
8551  ;;
8552  *)
8553  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8554for as_dir in $PATH
8555do
8556  IFS=$as_save_IFS
8557  test -z "$as_dir" && as_dir=.
8558    for ac_exec_ext in '' $ac_executable_extensions; do
8559  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8560    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
8561    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8562    break 2
8563  fi
8564done
8565  done
8566IFS=$as_save_IFS
8567
8568  ;;
8569esac
8570fi
8571MV=$ac_cv_path_MV
8572if test -n "$MV"; then
8573  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
8574$as_echo "$MV" >&6; }
8575else
8576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8577$as_echo "no" >&6; }
8578fi
8579
8580
8581        if test "x$MV" = x; then
8582          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8583        fi
8584      else
8585        # Otherwise we believe it is a complete path. Use it as it is.
8586        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
8587$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
8588        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
8589$as_echo_n "checking for MV... " >&6; }
8590        if test ! -x "$tool_specified"; then
8591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8592$as_echo "not found" >&6; }
8593          as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
8594        fi
8595        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8596$as_echo "$tool_specified" >&6; }
8597      fi
8598    fi
8599  fi
8600
8601
8602
8603  if test "x$MV" = x; then
8604    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
8605  fi
8606
8607
8608
8609
8610
8611  # Publish this variable in the help.
8612
8613
8614  if test "x$NAWK" = x; then
8615    # The variable is not set by user, try to locate tool using the code snippet
8616    for ac_prog in nawk gawk awk
8617do
8618  # Extract the first word of "$ac_prog", so it can be a program name with args.
8619set dummy $ac_prog; ac_word=$2
8620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8621$as_echo_n "checking for $ac_word... " >&6; }
8622if ${ac_cv_path_NAWK+:} false; then :
8623  $as_echo_n "(cached) " >&6
8624else
8625  case $NAWK in
8626  [\\/]* | ?:[\\/]*)
8627  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8628  ;;
8629  *)
8630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8631for as_dir in $PATH
8632do
8633  IFS=$as_save_IFS
8634  test -z "$as_dir" && as_dir=.
8635    for ac_exec_ext in '' $ac_executable_extensions; do
8636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8637    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8639    break 2
8640  fi
8641done
8642  done
8643IFS=$as_save_IFS
8644
8645  ;;
8646esac
8647fi
8648NAWK=$ac_cv_path_NAWK
8649if test -n "$NAWK"; then
8650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8651$as_echo "$NAWK" >&6; }
8652else
8653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8654$as_echo "no" >&6; }
8655fi
8656
8657
8658  test -n "$NAWK" && break
8659done
8660
8661  else
8662    # The variable is set, but is it from the command line or the environment?
8663
8664    # Try to remove the string !NAWK! from our list.
8665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
8666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8667      # If it failed, the variable was not from the command line. Ignore it,
8668      # but warn the user (except for BASH, which is always set by the calling BASH).
8669      if test "xNAWK" != xBASH; then
8670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
8671$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
8672      fi
8673      # Try to locate tool using the code snippet
8674      for ac_prog in nawk gawk awk
8675do
8676  # Extract the first word of "$ac_prog", so it can be a program name with args.
8677set dummy $ac_prog; ac_word=$2
8678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8679$as_echo_n "checking for $ac_word... " >&6; }
8680if ${ac_cv_path_NAWK+:} false; then :
8681  $as_echo_n "(cached) " >&6
8682else
8683  case $NAWK in
8684  [\\/]* | ?:[\\/]*)
8685  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8686  ;;
8687  *)
8688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8689for as_dir in $PATH
8690do
8691  IFS=$as_save_IFS
8692  test -z "$as_dir" && as_dir=.
8693    for ac_exec_ext in '' $ac_executable_extensions; do
8694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8695    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8697    break 2
8698  fi
8699done
8700  done
8701IFS=$as_save_IFS
8702
8703  ;;
8704esac
8705fi
8706NAWK=$ac_cv_path_NAWK
8707if test -n "$NAWK"; then
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8709$as_echo "$NAWK" >&6; }
8710else
8711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8712$as_echo "no" >&6; }
8713fi
8714
8715
8716  test -n "$NAWK" && break
8717done
8718
8719    else
8720      # If it succeeded, then it was overridden by the user. We will use it
8721      # for the tool.
8722
8723      # First remove it from the list of overridden variables, so we can test
8724      # for unknown variables in the end.
8725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8726
8727      # Check if the provided tool contains a complete path.
8728      tool_specified="$NAWK"
8729      tool_basename="${tool_specified##*/}"
8730      if test "x$tool_basename" = "x$tool_specified"; then
8731        # A command without a complete path is provided, search $PATH.
8732        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
8733$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
8734        # Extract the first word of "$tool_basename", so it can be a program name with args.
8735set dummy $tool_basename; ac_word=$2
8736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8737$as_echo_n "checking for $ac_word... " >&6; }
8738if ${ac_cv_path_NAWK+:} false; then :
8739  $as_echo_n "(cached) " >&6
8740else
8741  case $NAWK in
8742  [\\/]* | ?:[\\/]*)
8743  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
8744  ;;
8745  *)
8746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8747for as_dir in $PATH
8748do
8749  IFS=$as_save_IFS
8750  test -z "$as_dir" && as_dir=.
8751    for ac_exec_ext in '' $ac_executable_extensions; do
8752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8753    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
8754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8755    break 2
8756  fi
8757done
8758  done
8759IFS=$as_save_IFS
8760
8761  ;;
8762esac
8763fi
8764NAWK=$ac_cv_path_NAWK
8765if test -n "$NAWK"; then
8766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
8767$as_echo "$NAWK" >&6; }
8768else
8769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8770$as_echo "no" >&6; }
8771fi
8772
8773
8774        if test "x$NAWK" = x; then
8775          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8776        fi
8777      else
8778        # Otherwise we believe it is a complete path. Use it as it is.
8779        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
8780$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
8781        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
8782$as_echo_n "checking for NAWK... " >&6; }
8783        if test ! -x "$tool_specified"; then
8784          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8785$as_echo "not found" >&6; }
8786          as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
8787        fi
8788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8789$as_echo "$tool_specified" >&6; }
8790      fi
8791    fi
8792  fi
8793
8794
8795
8796  if test "x$NAWK" = x; then
8797    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
8798  fi
8799
8800
8801
8802
8803
8804  # Publish this variable in the help.
8805
8806
8807  if test "x$PRINTF" = x; then
8808    # The variable is not set by user, try to locate tool using the code snippet
8809    for ac_prog in printf
8810do
8811  # Extract the first word of "$ac_prog", so it can be a program name with args.
8812set dummy $ac_prog; ac_word=$2
8813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8814$as_echo_n "checking for $ac_word... " >&6; }
8815if ${ac_cv_path_PRINTF+:} false; then :
8816  $as_echo_n "(cached) " >&6
8817else
8818  case $PRINTF in
8819  [\\/]* | ?:[\\/]*)
8820  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8821  ;;
8822  *)
8823  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8824for as_dir in $PATH
8825do
8826  IFS=$as_save_IFS
8827  test -z "$as_dir" && as_dir=.
8828    for ac_exec_ext in '' $ac_executable_extensions; do
8829  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8830    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8831    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8832    break 2
8833  fi
8834done
8835  done
8836IFS=$as_save_IFS
8837
8838  ;;
8839esac
8840fi
8841PRINTF=$ac_cv_path_PRINTF
8842if test -n "$PRINTF"; then
8843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8844$as_echo "$PRINTF" >&6; }
8845else
8846  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8847$as_echo "no" >&6; }
8848fi
8849
8850
8851  test -n "$PRINTF" && break
8852done
8853
8854  else
8855    # The variable is set, but is it from the command line or the environment?
8856
8857    # Try to remove the string !PRINTF! from our list.
8858    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
8859    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8860      # If it failed, the variable was not from the command line. Ignore it,
8861      # but warn the user (except for BASH, which is always set by the calling BASH).
8862      if test "xPRINTF" != xBASH; then
8863        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
8864$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
8865      fi
8866      # Try to locate tool using the code snippet
8867      for ac_prog in printf
8868do
8869  # Extract the first word of "$ac_prog", so it can be a program name with args.
8870set dummy $ac_prog; ac_word=$2
8871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8872$as_echo_n "checking for $ac_word... " >&6; }
8873if ${ac_cv_path_PRINTF+:} false; then :
8874  $as_echo_n "(cached) " >&6
8875else
8876  case $PRINTF in
8877  [\\/]* | ?:[\\/]*)
8878  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8879  ;;
8880  *)
8881  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8882for as_dir in $PATH
8883do
8884  IFS=$as_save_IFS
8885  test -z "$as_dir" && as_dir=.
8886    for ac_exec_ext in '' $ac_executable_extensions; do
8887  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8888    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8889    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8890    break 2
8891  fi
8892done
8893  done
8894IFS=$as_save_IFS
8895
8896  ;;
8897esac
8898fi
8899PRINTF=$ac_cv_path_PRINTF
8900if test -n "$PRINTF"; then
8901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8902$as_echo "$PRINTF" >&6; }
8903else
8904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8905$as_echo "no" >&6; }
8906fi
8907
8908
8909  test -n "$PRINTF" && break
8910done
8911
8912    else
8913      # If it succeeded, then it was overridden by the user. We will use it
8914      # for the tool.
8915
8916      # First remove it from the list of overridden variables, so we can test
8917      # for unknown variables in the end.
8918      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8919
8920      # Check if the provided tool contains a complete path.
8921      tool_specified="$PRINTF"
8922      tool_basename="${tool_specified##*/}"
8923      if test "x$tool_basename" = "x$tool_specified"; then
8924        # A command without a complete path is provided, search $PATH.
8925        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
8926$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
8927        # Extract the first word of "$tool_basename", so it can be a program name with args.
8928set dummy $tool_basename; ac_word=$2
8929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8930$as_echo_n "checking for $ac_word... " >&6; }
8931if ${ac_cv_path_PRINTF+:} false; then :
8932  $as_echo_n "(cached) " >&6
8933else
8934  case $PRINTF in
8935  [\\/]* | ?:[\\/]*)
8936  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
8937  ;;
8938  *)
8939  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8940for as_dir in $PATH
8941do
8942  IFS=$as_save_IFS
8943  test -z "$as_dir" && as_dir=.
8944    for ac_exec_ext in '' $ac_executable_extensions; do
8945  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8946    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
8947    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8948    break 2
8949  fi
8950done
8951  done
8952IFS=$as_save_IFS
8953
8954  ;;
8955esac
8956fi
8957PRINTF=$ac_cv_path_PRINTF
8958if test -n "$PRINTF"; then
8959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
8960$as_echo "$PRINTF" >&6; }
8961else
8962  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8963$as_echo "no" >&6; }
8964fi
8965
8966
8967        if test "x$PRINTF" = x; then
8968          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8969        fi
8970      else
8971        # Otherwise we believe it is a complete path. Use it as it is.
8972        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
8973$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
8974        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
8975$as_echo_n "checking for PRINTF... " >&6; }
8976        if test ! -x "$tool_specified"; then
8977          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8978$as_echo "not found" >&6; }
8979          as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
8980        fi
8981        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8982$as_echo "$tool_specified" >&6; }
8983      fi
8984    fi
8985  fi
8986
8987
8988
8989  if test "x$PRINTF" = x; then
8990    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
8991  fi
8992
8993
8994
8995
8996
8997  # Publish this variable in the help.
8998
8999
9000  if test "x$RM" = x; then
9001    # The variable is not set by user, try to locate tool using the code snippet
9002    for ac_prog in rm
9003do
9004  # Extract the first word of "$ac_prog", so it can be a program name with args.
9005set dummy $ac_prog; ac_word=$2
9006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9007$as_echo_n "checking for $ac_word... " >&6; }
9008if ${ac_cv_path_RM+:} false; then :
9009  $as_echo_n "(cached) " >&6
9010else
9011  case $RM in
9012  [\\/]* | ?:[\\/]*)
9013  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9014  ;;
9015  *)
9016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9017for as_dir in $PATH
9018do
9019  IFS=$as_save_IFS
9020  test -z "$as_dir" && as_dir=.
9021    for ac_exec_ext in '' $ac_executable_extensions; do
9022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9023    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9025    break 2
9026  fi
9027done
9028  done
9029IFS=$as_save_IFS
9030
9031  ;;
9032esac
9033fi
9034RM=$ac_cv_path_RM
9035if test -n "$RM"; then
9036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9037$as_echo "$RM" >&6; }
9038else
9039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9040$as_echo "no" >&6; }
9041fi
9042
9043
9044  test -n "$RM" && break
9045done
9046
9047  else
9048    # The variable is set, but is it from the command line or the environment?
9049
9050    # Try to remove the string !RM! from our list.
9051    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9052    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9053      # If it failed, the variable was not from the command line. Ignore it,
9054      # but warn the user (except for BASH, which is always set by the calling BASH).
9055      if test "xRM" != xBASH; then
9056        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9057$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9058      fi
9059      # Try to locate tool using the code snippet
9060      for ac_prog in rm
9061do
9062  # Extract the first word of "$ac_prog", so it can be a program name with args.
9063set dummy $ac_prog; ac_word=$2
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9065$as_echo_n "checking for $ac_word... " >&6; }
9066if ${ac_cv_path_RM+:} false; then :
9067  $as_echo_n "(cached) " >&6
9068else
9069  case $RM in
9070  [\\/]* | ?:[\\/]*)
9071  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9072  ;;
9073  *)
9074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9075for as_dir in $PATH
9076do
9077  IFS=$as_save_IFS
9078  test -z "$as_dir" && as_dir=.
9079    for ac_exec_ext in '' $ac_executable_extensions; do
9080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9081    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9083    break 2
9084  fi
9085done
9086  done
9087IFS=$as_save_IFS
9088
9089  ;;
9090esac
9091fi
9092RM=$ac_cv_path_RM
9093if test -n "$RM"; then
9094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9095$as_echo "$RM" >&6; }
9096else
9097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9098$as_echo "no" >&6; }
9099fi
9100
9101
9102  test -n "$RM" && break
9103done
9104
9105    else
9106      # If it succeeded, then it was overridden by the user. We will use it
9107      # for the tool.
9108
9109      # First remove it from the list of overridden variables, so we can test
9110      # for unknown variables in the end.
9111      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9112
9113      # Check if the provided tool contains a complete path.
9114      tool_specified="$RM"
9115      tool_basename="${tool_specified##*/}"
9116      if test "x$tool_basename" = "x$tool_specified"; then
9117        # A command without a complete path is provided, search $PATH.
9118        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9119$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9120        # Extract the first word of "$tool_basename", so it can be a program name with args.
9121set dummy $tool_basename; ac_word=$2
9122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9123$as_echo_n "checking for $ac_word... " >&6; }
9124if ${ac_cv_path_RM+:} false; then :
9125  $as_echo_n "(cached) " >&6
9126else
9127  case $RM in
9128  [\\/]* | ?:[\\/]*)
9129  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9130  ;;
9131  *)
9132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9133for as_dir in $PATH
9134do
9135  IFS=$as_save_IFS
9136  test -z "$as_dir" && as_dir=.
9137    for ac_exec_ext in '' $ac_executable_extensions; do
9138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9139    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9141    break 2
9142  fi
9143done
9144  done
9145IFS=$as_save_IFS
9146
9147  ;;
9148esac
9149fi
9150RM=$ac_cv_path_RM
9151if test -n "$RM"; then
9152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9153$as_echo "$RM" >&6; }
9154else
9155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9156$as_echo "no" >&6; }
9157fi
9158
9159
9160        if test "x$RM" = x; then
9161          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9162        fi
9163      else
9164        # Otherwise we believe it is a complete path. Use it as it is.
9165        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
9166$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
9167        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9168$as_echo_n "checking for RM... " >&6; }
9169        if test ! -x "$tool_specified"; then
9170          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9171$as_echo "not found" >&6; }
9172          as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
9173        fi
9174        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9175$as_echo "$tool_specified" >&6; }
9176      fi
9177    fi
9178  fi
9179
9180
9181
9182  if test "x$RM" = x; then
9183    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
9184  fi
9185
9186
9187
9188
9189
9190  # Publish this variable in the help.
9191
9192
9193  if test "x$SH" = x; then
9194    # The variable is not set by user, try to locate tool using the code snippet
9195    for ac_prog in sh
9196do
9197  # Extract the first word of "$ac_prog", so it can be a program name with args.
9198set dummy $ac_prog; ac_word=$2
9199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9200$as_echo_n "checking for $ac_word... " >&6; }
9201if ${ac_cv_path_SH+:} false; then :
9202  $as_echo_n "(cached) " >&6
9203else
9204  case $SH in
9205  [\\/]* | ?:[\\/]*)
9206  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9207  ;;
9208  *)
9209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9210for as_dir in $PATH
9211do
9212  IFS=$as_save_IFS
9213  test -z "$as_dir" && as_dir=.
9214    for ac_exec_ext in '' $ac_executable_extensions; do
9215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9216    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9218    break 2
9219  fi
9220done
9221  done
9222IFS=$as_save_IFS
9223
9224  ;;
9225esac
9226fi
9227SH=$ac_cv_path_SH
9228if test -n "$SH"; then
9229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9230$as_echo "$SH" >&6; }
9231else
9232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9233$as_echo "no" >&6; }
9234fi
9235
9236
9237  test -n "$SH" && break
9238done
9239
9240  else
9241    # The variable is set, but is it from the command line or the environment?
9242
9243    # Try to remove the string !SH! from our list.
9244    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
9245    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9246      # If it failed, the variable was not from the command line. Ignore it,
9247      # but warn the user (except for BASH, which is always set by the calling BASH).
9248      if test "xSH" != xBASH; then
9249        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
9250$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
9251      fi
9252      # Try to locate tool using the code snippet
9253      for ac_prog in sh
9254do
9255  # Extract the first word of "$ac_prog", so it can be a program name with args.
9256set dummy $ac_prog; ac_word=$2
9257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9258$as_echo_n "checking for $ac_word... " >&6; }
9259if ${ac_cv_path_SH+:} false; then :
9260  $as_echo_n "(cached) " >&6
9261else
9262  case $SH in
9263  [\\/]* | ?:[\\/]*)
9264  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9265  ;;
9266  *)
9267  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9268for as_dir in $PATH
9269do
9270  IFS=$as_save_IFS
9271  test -z "$as_dir" && as_dir=.
9272    for ac_exec_ext in '' $ac_executable_extensions; do
9273  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9274    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9275    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9276    break 2
9277  fi
9278done
9279  done
9280IFS=$as_save_IFS
9281
9282  ;;
9283esac
9284fi
9285SH=$ac_cv_path_SH
9286if test -n "$SH"; then
9287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9288$as_echo "$SH" >&6; }
9289else
9290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9291$as_echo "no" >&6; }
9292fi
9293
9294
9295  test -n "$SH" && break
9296done
9297
9298    else
9299      # If it succeeded, then it was overridden by the user. We will use it
9300      # for the tool.
9301
9302      # First remove it from the list of overridden variables, so we can test
9303      # for unknown variables in the end.
9304      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9305
9306      # Check if the provided tool contains a complete path.
9307      tool_specified="$SH"
9308      tool_basename="${tool_specified##*/}"
9309      if test "x$tool_basename" = "x$tool_specified"; then
9310        # A command without a complete path is provided, search $PATH.
9311        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
9312$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
9313        # Extract the first word of "$tool_basename", so it can be a program name with args.
9314set dummy $tool_basename; ac_word=$2
9315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9316$as_echo_n "checking for $ac_word... " >&6; }
9317if ${ac_cv_path_SH+:} false; then :
9318  $as_echo_n "(cached) " >&6
9319else
9320  case $SH in
9321  [\\/]* | ?:[\\/]*)
9322  ac_cv_path_SH="$SH" # Let the user override the test with a path.
9323  ;;
9324  *)
9325  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9326for as_dir in $PATH
9327do
9328  IFS=$as_save_IFS
9329  test -z "$as_dir" && as_dir=.
9330    for ac_exec_ext in '' $ac_executable_extensions; do
9331  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9332    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
9333    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9334    break 2
9335  fi
9336done
9337  done
9338IFS=$as_save_IFS
9339
9340  ;;
9341esac
9342fi
9343SH=$ac_cv_path_SH
9344if test -n "$SH"; then
9345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
9346$as_echo "$SH" >&6; }
9347else
9348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9349$as_echo "no" >&6; }
9350fi
9351
9352
9353        if test "x$SH" = x; then
9354          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9355        fi
9356      else
9357        # Otherwise we believe it is a complete path. Use it as it is.
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
9359$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
9361$as_echo_n "checking for SH... " >&6; }
9362        if test ! -x "$tool_specified"; then
9363          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9364$as_echo "not found" >&6; }
9365          as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
9366        fi
9367        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9368$as_echo "$tool_specified" >&6; }
9369      fi
9370    fi
9371  fi
9372
9373
9374
9375  if test "x$SH" = x; then
9376    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
9377  fi
9378
9379
9380
9381
9382
9383  # Publish this variable in the help.
9384
9385
9386  if test "x$SORT" = x; then
9387    # The variable is not set by user, try to locate tool using the code snippet
9388    for ac_prog in sort
9389do
9390  # Extract the first word of "$ac_prog", so it can be a program name with args.
9391set dummy $ac_prog; ac_word=$2
9392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9393$as_echo_n "checking for $ac_word... " >&6; }
9394if ${ac_cv_path_SORT+:} false; then :
9395  $as_echo_n "(cached) " >&6
9396else
9397  case $SORT in
9398  [\\/]* | ?:[\\/]*)
9399  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9400  ;;
9401  *)
9402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9403for as_dir in $PATH
9404do
9405  IFS=$as_save_IFS
9406  test -z "$as_dir" && as_dir=.
9407    for ac_exec_ext in '' $ac_executable_extensions; do
9408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9409    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9411    break 2
9412  fi
9413done
9414  done
9415IFS=$as_save_IFS
9416
9417  ;;
9418esac
9419fi
9420SORT=$ac_cv_path_SORT
9421if test -n "$SORT"; then
9422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9423$as_echo "$SORT" >&6; }
9424else
9425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9426$as_echo "no" >&6; }
9427fi
9428
9429
9430  test -n "$SORT" && break
9431done
9432
9433  else
9434    # The variable is set, but is it from the command line or the environment?
9435
9436    # Try to remove the string !SORT! from our list.
9437    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
9438    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9439      # If it failed, the variable was not from the command line. Ignore it,
9440      # but warn the user (except for BASH, which is always set by the calling BASH).
9441      if test "xSORT" != xBASH; then
9442        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
9443$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
9444      fi
9445      # Try to locate tool using the code snippet
9446      for ac_prog in sort
9447do
9448  # Extract the first word of "$ac_prog", so it can be a program name with args.
9449set dummy $ac_prog; ac_word=$2
9450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9451$as_echo_n "checking for $ac_word... " >&6; }
9452if ${ac_cv_path_SORT+:} false; then :
9453  $as_echo_n "(cached) " >&6
9454else
9455  case $SORT in
9456  [\\/]* | ?:[\\/]*)
9457  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9458  ;;
9459  *)
9460  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9461for as_dir in $PATH
9462do
9463  IFS=$as_save_IFS
9464  test -z "$as_dir" && as_dir=.
9465    for ac_exec_ext in '' $ac_executable_extensions; do
9466  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9467    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9468    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9469    break 2
9470  fi
9471done
9472  done
9473IFS=$as_save_IFS
9474
9475  ;;
9476esac
9477fi
9478SORT=$ac_cv_path_SORT
9479if test -n "$SORT"; then
9480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9481$as_echo "$SORT" >&6; }
9482else
9483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9484$as_echo "no" >&6; }
9485fi
9486
9487
9488  test -n "$SORT" && break
9489done
9490
9491    else
9492      # If it succeeded, then it was overridden by the user. We will use it
9493      # for the tool.
9494
9495      # First remove it from the list of overridden variables, so we can test
9496      # for unknown variables in the end.
9497      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9498
9499      # Check if the provided tool contains a complete path.
9500      tool_specified="$SORT"
9501      tool_basename="${tool_specified##*/}"
9502      if test "x$tool_basename" = "x$tool_specified"; then
9503        # A command without a complete path is provided, search $PATH.
9504        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
9505$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
9506        # Extract the first word of "$tool_basename", so it can be a program name with args.
9507set dummy $tool_basename; ac_word=$2
9508{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9509$as_echo_n "checking for $ac_word... " >&6; }
9510if ${ac_cv_path_SORT+:} false; then :
9511  $as_echo_n "(cached) " >&6
9512else
9513  case $SORT in
9514  [\\/]* | ?:[\\/]*)
9515  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
9516  ;;
9517  *)
9518  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9519for as_dir in $PATH
9520do
9521  IFS=$as_save_IFS
9522  test -z "$as_dir" && as_dir=.
9523    for ac_exec_ext in '' $ac_executable_extensions; do
9524  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9525    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
9526    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9527    break 2
9528  fi
9529done
9530  done
9531IFS=$as_save_IFS
9532
9533  ;;
9534esac
9535fi
9536SORT=$ac_cv_path_SORT
9537if test -n "$SORT"; then
9538  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
9539$as_echo "$SORT" >&6; }
9540else
9541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9542$as_echo "no" >&6; }
9543fi
9544
9545
9546        if test "x$SORT" = x; then
9547          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9548        fi
9549      else
9550        # Otherwise we believe it is a complete path. Use it as it is.
9551        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
9552$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
9553        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
9554$as_echo_n "checking for SORT... " >&6; }
9555        if test ! -x "$tool_specified"; then
9556          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9557$as_echo "not found" >&6; }
9558          as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
9559        fi
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9561$as_echo "$tool_specified" >&6; }
9562      fi
9563    fi
9564  fi
9565
9566
9567
9568  if test "x$SORT" = x; then
9569    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
9570  fi
9571
9572
9573
9574
9575
9576  # Publish this variable in the help.
9577
9578
9579  if test "x$TAIL" = x; then
9580    # The variable is not set by user, try to locate tool using the code snippet
9581    for ac_prog in tail
9582do
9583  # Extract the first word of "$ac_prog", so it can be a program name with args.
9584set dummy $ac_prog; ac_word=$2
9585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9586$as_echo_n "checking for $ac_word... " >&6; }
9587if ${ac_cv_path_TAIL+:} false; then :
9588  $as_echo_n "(cached) " >&6
9589else
9590  case $TAIL in
9591  [\\/]* | ?:[\\/]*)
9592  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9593  ;;
9594  *)
9595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9596for as_dir in $PATH
9597do
9598  IFS=$as_save_IFS
9599  test -z "$as_dir" && as_dir=.
9600    for ac_exec_ext in '' $ac_executable_extensions; do
9601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9602    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9604    break 2
9605  fi
9606done
9607  done
9608IFS=$as_save_IFS
9609
9610  ;;
9611esac
9612fi
9613TAIL=$ac_cv_path_TAIL
9614if test -n "$TAIL"; then
9615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9616$as_echo "$TAIL" >&6; }
9617else
9618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9619$as_echo "no" >&6; }
9620fi
9621
9622
9623  test -n "$TAIL" && break
9624done
9625
9626  else
9627    # The variable is set, but is it from the command line or the environment?
9628
9629    # Try to remove the string !TAIL! from our list.
9630    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
9631    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9632      # If it failed, the variable was not from the command line. Ignore it,
9633      # but warn the user (except for BASH, which is always set by the calling BASH).
9634      if test "xTAIL" != xBASH; then
9635        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
9636$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
9637      fi
9638      # Try to locate tool using the code snippet
9639      for ac_prog in tail
9640do
9641  # Extract the first word of "$ac_prog", so it can be a program name with args.
9642set dummy $ac_prog; ac_word=$2
9643{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9644$as_echo_n "checking for $ac_word... " >&6; }
9645if ${ac_cv_path_TAIL+:} false; then :
9646  $as_echo_n "(cached) " >&6
9647else
9648  case $TAIL in
9649  [\\/]* | ?:[\\/]*)
9650  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9651  ;;
9652  *)
9653  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9654for as_dir in $PATH
9655do
9656  IFS=$as_save_IFS
9657  test -z "$as_dir" && as_dir=.
9658    for ac_exec_ext in '' $ac_executable_extensions; do
9659  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9660    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9661    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9662    break 2
9663  fi
9664done
9665  done
9666IFS=$as_save_IFS
9667
9668  ;;
9669esac
9670fi
9671TAIL=$ac_cv_path_TAIL
9672if test -n "$TAIL"; then
9673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9674$as_echo "$TAIL" >&6; }
9675else
9676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9677$as_echo "no" >&6; }
9678fi
9679
9680
9681  test -n "$TAIL" && break
9682done
9683
9684    else
9685      # If it succeeded, then it was overridden by the user. We will use it
9686      # for the tool.
9687
9688      # First remove it from the list of overridden variables, so we can test
9689      # for unknown variables in the end.
9690      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9691
9692      # Check if the provided tool contains a complete path.
9693      tool_specified="$TAIL"
9694      tool_basename="${tool_specified##*/}"
9695      if test "x$tool_basename" = "x$tool_specified"; then
9696        # A command without a complete path is provided, search $PATH.
9697        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
9698$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
9699        # Extract the first word of "$tool_basename", so it can be a program name with args.
9700set dummy $tool_basename; ac_word=$2
9701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9702$as_echo_n "checking for $ac_word... " >&6; }
9703if ${ac_cv_path_TAIL+:} false; then :
9704  $as_echo_n "(cached) " >&6
9705else
9706  case $TAIL in
9707  [\\/]* | ?:[\\/]*)
9708  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
9709  ;;
9710  *)
9711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9712for as_dir in $PATH
9713do
9714  IFS=$as_save_IFS
9715  test -z "$as_dir" && as_dir=.
9716    for ac_exec_ext in '' $ac_executable_extensions; do
9717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9718    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
9719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9720    break 2
9721  fi
9722done
9723  done
9724IFS=$as_save_IFS
9725
9726  ;;
9727esac
9728fi
9729TAIL=$ac_cv_path_TAIL
9730if test -n "$TAIL"; then
9731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
9732$as_echo "$TAIL" >&6; }
9733else
9734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9735$as_echo "no" >&6; }
9736fi
9737
9738
9739        if test "x$TAIL" = x; then
9740          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9741        fi
9742      else
9743        # Otherwise we believe it is a complete path. Use it as it is.
9744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
9745$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
9746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
9747$as_echo_n "checking for TAIL... " >&6; }
9748        if test ! -x "$tool_specified"; then
9749          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9750$as_echo "not found" >&6; }
9751          as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
9752        fi
9753        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9754$as_echo "$tool_specified" >&6; }
9755      fi
9756    fi
9757  fi
9758
9759
9760
9761  if test "x$TAIL" = x; then
9762    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
9763  fi
9764
9765
9766
9767
9768
9769  # Publish this variable in the help.
9770
9771
9772  if test "x$TAR" = x; then
9773    # The variable is not set by user, try to locate tool using the code snippet
9774    for ac_prog in tar
9775do
9776  # Extract the first word of "$ac_prog", so it can be a program name with args.
9777set dummy $ac_prog; ac_word=$2
9778{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9779$as_echo_n "checking for $ac_word... " >&6; }
9780if ${ac_cv_path_TAR+:} false; then :
9781  $as_echo_n "(cached) " >&6
9782else
9783  case $TAR in
9784  [\\/]* | ?:[\\/]*)
9785  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9786  ;;
9787  *)
9788  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9789for as_dir in $PATH
9790do
9791  IFS=$as_save_IFS
9792  test -z "$as_dir" && as_dir=.
9793    for ac_exec_ext in '' $ac_executable_extensions; do
9794  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9795    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9796    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9797    break 2
9798  fi
9799done
9800  done
9801IFS=$as_save_IFS
9802
9803  ;;
9804esac
9805fi
9806TAR=$ac_cv_path_TAR
9807if test -n "$TAR"; then
9808  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9809$as_echo "$TAR" >&6; }
9810else
9811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9812$as_echo "no" >&6; }
9813fi
9814
9815
9816  test -n "$TAR" && break
9817done
9818
9819  else
9820    # The variable is set, but is it from the command line or the environment?
9821
9822    # Try to remove the string !TAR! from our list.
9823    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
9824    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9825      # If it failed, the variable was not from the command line. Ignore it,
9826      # but warn the user (except for BASH, which is always set by the calling BASH).
9827      if test "xTAR" != xBASH; then
9828        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
9829$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
9830      fi
9831      # Try to locate tool using the code snippet
9832      for ac_prog in tar
9833do
9834  # Extract the first word of "$ac_prog", so it can be a program name with args.
9835set dummy $ac_prog; ac_word=$2
9836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9837$as_echo_n "checking for $ac_word... " >&6; }
9838if ${ac_cv_path_TAR+:} false; then :
9839  $as_echo_n "(cached) " >&6
9840else
9841  case $TAR in
9842  [\\/]* | ?:[\\/]*)
9843  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9844  ;;
9845  *)
9846  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9847for as_dir in $PATH
9848do
9849  IFS=$as_save_IFS
9850  test -z "$as_dir" && as_dir=.
9851    for ac_exec_ext in '' $ac_executable_extensions; do
9852  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9853    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9854    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9855    break 2
9856  fi
9857done
9858  done
9859IFS=$as_save_IFS
9860
9861  ;;
9862esac
9863fi
9864TAR=$ac_cv_path_TAR
9865if test -n "$TAR"; then
9866  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9867$as_echo "$TAR" >&6; }
9868else
9869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9870$as_echo "no" >&6; }
9871fi
9872
9873
9874  test -n "$TAR" && break
9875done
9876
9877    else
9878      # If it succeeded, then it was overridden by the user. We will use it
9879      # for the tool.
9880
9881      # First remove it from the list of overridden variables, so we can test
9882      # for unknown variables in the end.
9883      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9884
9885      # Check if the provided tool contains a complete path.
9886      tool_specified="$TAR"
9887      tool_basename="${tool_specified##*/}"
9888      if test "x$tool_basename" = "x$tool_specified"; then
9889        # A command without a complete path is provided, search $PATH.
9890        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
9891$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
9892        # Extract the first word of "$tool_basename", so it can be a program name with args.
9893set dummy $tool_basename; ac_word=$2
9894{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9895$as_echo_n "checking for $ac_word... " >&6; }
9896if ${ac_cv_path_TAR+:} false; then :
9897  $as_echo_n "(cached) " >&6
9898else
9899  case $TAR in
9900  [\\/]* | ?:[\\/]*)
9901  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
9902  ;;
9903  *)
9904  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9905for as_dir in $PATH
9906do
9907  IFS=$as_save_IFS
9908  test -z "$as_dir" && as_dir=.
9909    for ac_exec_ext in '' $ac_executable_extensions; do
9910  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9911    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
9912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9913    break 2
9914  fi
9915done
9916  done
9917IFS=$as_save_IFS
9918
9919  ;;
9920esac
9921fi
9922TAR=$ac_cv_path_TAR
9923if test -n "$TAR"; then
9924  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
9925$as_echo "$TAR" >&6; }
9926else
9927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9928$as_echo "no" >&6; }
9929fi
9930
9931
9932        if test "x$TAR" = x; then
9933          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9934        fi
9935      else
9936        # Otherwise we believe it is a complete path. Use it as it is.
9937        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
9938$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
9939        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
9940$as_echo_n "checking for TAR... " >&6; }
9941        if test ! -x "$tool_specified"; then
9942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9943$as_echo "not found" >&6; }
9944          as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
9945        fi
9946        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9947$as_echo "$tool_specified" >&6; }
9948      fi
9949    fi
9950  fi
9951
9952
9953
9954  if test "x$TAR" = x; then
9955    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
9956  fi
9957
9958
9959
9960
9961
9962  # Publish this variable in the help.
9963
9964
9965  if test "x$TEE" = x; then
9966    # The variable is not set by user, try to locate tool using the code snippet
9967    for ac_prog in tee
9968do
9969  # Extract the first word of "$ac_prog", so it can be a program name with args.
9970set dummy $ac_prog; ac_word=$2
9971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9972$as_echo_n "checking for $ac_word... " >&6; }
9973if ${ac_cv_path_TEE+:} false; then :
9974  $as_echo_n "(cached) " >&6
9975else
9976  case $TEE in
9977  [\\/]* | ?:[\\/]*)
9978  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
9979  ;;
9980  *)
9981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9982for as_dir in $PATH
9983do
9984  IFS=$as_save_IFS
9985  test -z "$as_dir" && as_dir=.
9986    for ac_exec_ext in '' $ac_executable_extensions; do
9987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9988    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
9989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9990    break 2
9991  fi
9992done
9993  done
9994IFS=$as_save_IFS
9995
9996  ;;
9997esac
9998fi
9999TEE=$ac_cv_path_TEE
10000if test -n "$TEE"; then
10001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10002$as_echo "$TEE" >&6; }
10003else
10004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10005$as_echo "no" >&6; }
10006fi
10007
10008
10009  test -n "$TEE" && break
10010done
10011
10012  else
10013    # The variable is set, but is it from the command line or the environment?
10014
10015    # Try to remove the string !TEE! from our list.
10016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
10017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10018      # If it failed, the variable was not from the command line. Ignore it,
10019      # but warn the user (except for BASH, which is always set by the calling BASH).
10020      if test "xTEE" != xBASH; then
10021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
10022$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
10023      fi
10024      # Try to locate tool using the code snippet
10025      for ac_prog in tee
10026do
10027  # Extract the first word of "$ac_prog", so it can be a program name with args.
10028set dummy $ac_prog; ac_word=$2
10029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10030$as_echo_n "checking for $ac_word... " >&6; }
10031if ${ac_cv_path_TEE+:} false; then :
10032  $as_echo_n "(cached) " >&6
10033else
10034  case $TEE in
10035  [\\/]* | ?:[\\/]*)
10036  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10037  ;;
10038  *)
10039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10040for as_dir in $PATH
10041do
10042  IFS=$as_save_IFS
10043  test -z "$as_dir" && as_dir=.
10044    for ac_exec_ext in '' $ac_executable_extensions; do
10045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10046    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10048    break 2
10049  fi
10050done
10051  done
10052IFS=$as_save_IFS
10053
10054  ;;
10055esac
10056fi
10057TEE=$ac_cv_path_TEE
10058if test -n "$TEE"; then
10059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10060$as_echo "$TEE" >&6; }
10061else
10062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10063$as_echo "no" >&6; }
10064fi
10065
10066
10067  test -n "$TEE" && break
10068done
10069
10070    else
10071      # If it succeeded, then it was overridden by the user. We will use it
10072      # for the tool.
10073
10074      # First remove it from the list of overridden variables, so we can test
10075      # for unknown variables in the end.
10076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10077
10078      # Check if the provided tool contains a complete path.
10079      tool_specified="$TEE"
10080      tool_basename="${tool_specified##*/}"
10081      if test "x$tool_basename" = "x$tool_specified"; then
10082        # A command without a complete path is provided, search $PATH.
10083        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
10084$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
10085        # Extract the first word of "$tool_basename", so it can be a program name with args.
10086set dummy $tool_basename; ac_word=$2
10087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10088$as_echo_n "checking for $ac_word... " >&6; }
10089if ${ac_cv_path_TEE+:} false; then :
10090  $as_echo_n "(cached) " >&6
10091else
10092  case $TEE in
10093  [\\/]* | ?:[\\/]*)
10094  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
10095  ;;
10096  *)
10097  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10098for as_dir in $PATH
10099do
10100  IFS=$as_save_IFS
10101  test -z "$as_dir" && as_dir=.
10102    for ac_exec_ext in '' $ac_executable_extensions; do
10103  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10104    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
10105    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10106    break 2
10107  fi
10108done
10109  done
10110IFS=$as_save_IFS
10111
10112  ;;
10113esac
10114fi
10115TEE=$ac_cv_path_TEE
10116if test -n "$TEE"; then
10117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
10118$as_echo "$TEE" >&6; }
10119else
10120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10121$as_echo "no" >&6; }
10122fi
10123
10124
10125        if test "x$TEE" = x; then
10126          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10127        fi
10128      else
10129        # Otherwise we believe it is a complete path. Use it as it is.
10130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
10131$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
10132        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
10133$as_echo_n "checking for TEE... " >&6; }
10134        if test ! -x "$tool_specified"; then
10135          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10136$as_echo "not found" >&6; }
10137          as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
10138        fi
10139        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10140$as_echo "$tool_specified" >&6; }
10141      fi
10142    fi
10143  fi
10144
10145
10146
10147  if test "x$TEE" = x; then
10148    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
10149  fi
10150
10151
10152
10153
10154
10155  # Publish this variable in the help.
10156
10157
10158  if test "x$TOUCH" = x; then
10159    # The variable is not set by user, try to locate tool using the code snippet
10160    for ac_prog in touch
10161do
10162  # Extract the first word of "$ac_prog", so it can be a program name with args.
10163set dummy $ac_prog; ac_word=$2
10164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10165$as_echo_n "checking for $ac_word... " >&6; }
10166if ${ac_cv_path_TOUCH+:} false; then :
10167  $as_echo_n "(cached) " >&6
10168else
10169  case $TOUCH in
10170  [\\/]* | ?:[\\/]*)
10171  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10172  ;;
10173  *)
10174  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10175for as_dir in $PATH
10176do
10177  IFS=$as_save_IFS
10178  test -z "$as_dir" && as_dir=.
10179    for ac_exec_ext in '' $ac_executable_extensions; do
10180  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10181    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10182    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10183    break 2
10184  fi
10185done
10186  done
10187IFS=$as_save_IFS
10188
10189  ;;
10190esac
10191fi
10192TOUCH=$ac_cv_path_TOUCH
10193if test -n "$TOUCH"; then
10194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10195$as_echo "$TOUCH" >&6; }
10196else
10197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10198$as_echo "no" >&6; }
10199fi
10200
10201
10202  test -n "$TOUCH" && break
10203done
10204
10205  else
10206    # The variable is set, but is it from the command line or the environment?
10207
10208    # Try to remove the string !TOUCH! from our list.
10209    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
10210    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10211      # If it failed, the variable was not from the command line. Ignore it,
10212      # but warn the user (except for BASH, which is always set by the calling BASH).
10213      if test "xTOUCH" != xBASH; then
10214        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
10215$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
10216      fi
10217      # Try to locate tool using the code snippet
10218      for ac_prog in touch
10219do
10220  # Extract the first word of "$ac_prog", so it can be a program name with args.
10221set dummy $ac_prog; ac_word=$2
10222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10223$as_echo_n "checking for $ac_word... " >&6; }
10224if ${ac_cv_path_TOUCH+:} false; then :
10225  $as_echo_n "(cached) " >&6
10226else
10227  case $TOUCH in
10228  [\\/]* | ?:[\\/]*)
10229  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10230  ;;
10231  *)
10232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10233for as_dir in $PATH
10234do
10235  IFS=$as_save_IFS
10236  test -z "$as_dir" && as_dir=.
10237    for ac_exec_ext in '' $ac_executable_extensions; do
10238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10239    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10241    break 2
10242  fi
10243done
10244  done
10245IFS=$as_save_IFS
10246
10247  ;;
10248esac
10249fi
10250TOUCH=$ac_cv_path_TOUCH
10251if test -n "$TOUCH"; then
10252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10253$as_echo "$TOUCH" >&6; }
10254else
10255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10256$as_echo "no" >&6; }
10257fi
10258
10259
10260  test -n "$TOUCH" && break
10261done
10262
10263    else
10264      # If it succeeded, then it was overridden by the user. We will use it
10265      # for the tool.
10266
10267      # First remove it from the list of overridden variables, so we can test
10268      # for unknown variables in the end.
10269      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10270
10271      # Check if the provided tool contains a complete path.
10272      tool_specified="$TOUCH"
10273      tool_basename="${tool_specified##*/}"
10274      if test "x$tool_basename" = "x$tool_specified"; then
10275        # A command without a complete path is provided, search $PATH.
10276        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
10277$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
10278        # Extract the first word of "$tool_basename", so it can be a program name with args.
10279set dummy $tool_basename; ac_word=$2
10280{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10281$as_echo_n "checking for $ac_word... " >&6; }
10282if ${ac_cv_path_TOUCH+:} false; then :
10283  $as_echo_n "(cached) " >&6
10284else
10285  case $TOUCH in
10286  [\\/]* | ?:[\\/]*)
10287  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
10288  ;;
10289  *)
10290  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10291for as_dir in $PATH
10292do
10293  IFS=$as_save_IFS
10294  test -z "$as_dir" && as_dir=.
10295    for ac_exec_ext in '' $ac_executable_extensions; do
10296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10297    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
10298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10299    break 2
10300  fi
10301done
10302  done
10303IFS=$as_save_IFS
10304
10305  ;;
10306esac
10307fi
10308TOUCH=$ac_cv_path_TOUCH
10309if test -n "$TOUCH"; then
10310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
10311$as_echo "$TOUCH" >&6; }
10312else
10313  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10314$as_echo "no" >&6; }
10315fi
10316
10317
10318        if test "x$TOUCH" = x; then
10319          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10320        fi
10321      else
10322        # Otherwise we believe it is a complete path. Use it as it is.
10323        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
10324$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
10325        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
10326$as_echo_n "checking for TOUCH... " >&6; }
10327        if test ! -x "$tool_specified"; then
10328          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10329$as_echo "not found" >&6; }
10330          as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
10331        fi
10332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10333$as_echo "$tool_specified" >&6; }
10334      fi
10335    fi
10336  fi
10337
10338
10339
10340  if test "x$TOUCH" = x; then
10341    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
10342  fi
10343
10344
10345
10346
10347
10348  # Publish this variable in the help.
10349
10350
10351  if test "x$TR" = x; then
10352    # The variable is not set by user, try to locate tool using the code snippet
10353    for ac_prog in tr
10354do
10355  # Extract the first word of "$ac_prog", so it can be a program name with args.
10356set dummy $ac_prog; ac_word=$2
10357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10358$as_echo_n "checking for $ac_word... " >&6; }
10359if ${ac_cv_path_TR+:} false; then :
10360  $as_echo_n "(cached) " >&6
10361else
10362  case $TR in
10363  [\\/]* | ?:[\\/]*)
10364  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10365  ;;
10366  *)
10367  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10368for as_dir in $PATH
10369do
10370  IFS=$as_save_IFS
10371  test -z "$as_dir" && as_dir=.
10372    for ac_exec_ext in '' $ac_executable_extensions; do
10373  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10374    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10375    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10376    break 2
10377  fi
10378done
10379  done
10380IFS=$as_save_IFS
10381
10382  ;;
10383esac
10384fi
10385TR=$ac_cv_path_TR
10386if test -n "$TR"; then
10387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10388$as_echo "$TR" >&6; }
10389else
10390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10391$as_echo "no" >&6; }
10392fi
10393
10394
10395  test -n "$TR" && break
10396done
10397
10398  else
10399    # The variable is set, but is it from the command line or the environment?
10400
10401    # Try to remove the string !TR! from our list.
10402    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
10403    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10404      # If it failed, the variable was not from the command line. Ignore it,
10405      # but warn the user (except for BASH, which is always set by the calling BASH).
10406      if test "xTR" != xBASH; then
10407        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
10408$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
10409      fi
10410      # Try to locate tool using the code snippet
10411      for ac_prog in tr
10412do
10413  # Extract the first word of "$ac_prog", so it can be a program name with args.
10414set dummy $ac_prog; ac_word=$2
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416$as_echo_n "checking for $ac_word... " >&6; }
10417if ${ac_cv_path_TR+:} false; then :
10418  $as_echo_n "(cached) " >&6
10419else
10420  case $TR in
10421  [\\/]* | ?:[\\/]*)
10422  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10423  ;;
10424  *)
10425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426for as_dir in $PATH
10427do
10428  IFS=$as_save_IFS
10429  test -z "$as_dir" && as_dir=.
10430    for ac_exec_ext in '' $ac_executable_extensions; do
10431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434    break 2
10435  fi
10436done
10437  done
10438IFS=$as_save_IFS
10439
10440  ;;
10441esac
10442fi
10443TR=$ac_cv_path_TR
10444if test -n "$TR"; then
10445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10446$as_echo "$TR" >&6; }
10447else
10448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
10450fi
10451
10452
10453  test -n "$TR" && break
10454done
10455
10456    else
10457      # If it succeeded, then it was overridden by the user. We will use it
10458      # for the tool.
10459
10460      # First remove it from the list of overridden variables, so we can test
10461      # for unknown variables in the end.
10462      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10463
10464      # Check if the provided tool contains a complete path.
10465      tool_specified="$TR"
10466      tool_basename="${tool_specified##*/}"
10467      if test "x$tool_basename" = "x$tool_specified"; then
10468        # A command without a complete path is provided, search $PATH.
10469        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
10470$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
10471        # Extract the first word of "$tool_basename", so it can be a program name with args.
10472set dummy $tool_basename; ac_word=$2
10473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10474$as_echo_n "checking for $ac_word... " >&6; }
10475if ${ac_cv_path_TR+:} false; then :
10476  $as_echo_n "(cached) " >&6
10477else
10478  case $TR in
10479  [\\/]* | ?:[\\/]*)
10480  ac_cv_path_TR="$TR" # Let the user override the test with a path.
10481  ;;
10482  *)
10483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10484for as_dir in $PATH
10485do
10486  IFS=$as_save_IFS
10487  test -z "$as_dir" && as_dir=.
10488    for ac_exec_ext in '' $ac_executable_extensions; do
10489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10490    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
10491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10492    break 2
10493  fi
10494done
10495  done
10496IFS=$as_save_IFS
10497
10498  ;;
10499esac
10500fi
10501TR=$ac_cv_path_TR
10502if test -n "$TR"; then
10503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
10504$as_echo "$TR" >&6; }
10505else
10506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10507$as_echo "no" >&6; }
10508fi
10509
10510
10511        if test "x$TR" = x; then
10512          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10513        fi
10514      else
10515        # Otherwise we believe it is a complete path. Use it as it is.
10516        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
10517$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
10518        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
10519$as_echo_n "checking for TR... " >&6; }
10520        if test ! -x "$tool_specified"; then
10521          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10522$as_echo "not found" >&6; }
10523          as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
10524        fi
10525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10526$as_echo "$tool_specified" >&6; }
10527      fi
10528    fi
10529  fi
10530
10531
10532
10533  if test "x$TR" = x; then
10534    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
10535  fi
10536
10537
10538
10539
10540
10541  # Publish this variable in the help.
10542
10543
10544  if test "x$UNAME" = x; then
10545    # The variable is not set by user, try to locate tool using the code snippet
10546    for ac_prog in uname
10547do
10548  # Extract the first word of "$ac_prog", so it can be a program name with args.
10549set dummy $ac_prog; ac_word=$2
10550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10551$as_echo_n "checking for $ac_word... " >&6; }
10552if ${ac_cv_path_UNAME+:} false; then :
10553  $as_echo_n "(cached) " >&6
10554else
10555  case $UNAME in
10556  [\\/]* | ?:[\\/]*)
10557  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10558  ;;
10559  *)
10560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10561for as_dir in $PATH
10562do
10563  IFS=$as_save_IFS
10564  test -z "$as_dir" && as_dir=.
10565    for ac_exec_ext in '' $ac_executable_extensions; do
10566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10567    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10569    break 2
10570  fi
10571done
10572  done
10573IFS=$as_save_IFS
10574
10575  ;;
10576esac
10577fi
10578UNAME=$ac_cv_path_UNAME
10579if test -n "$UNAME"; then
10580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10581$as_echo "$UNAME" >&6; }
10582else
10583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10584$as_echo "no" >&6; }
10585fi
10586
10587
10588  test -n "$UNAME" && break
10589done
10590
10591  else
10592    # The variable is set, but is it from the command line or the environment?
10593
10594    # Try to remove the string !UNAME! from our list.
10595    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
10596    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10597      # If it failed, the variable was not from the command line. Ignore it,
10598      # but warn the user (except for BASH, which is always set by the calling BASH).
10599      if test "xUNAME" != xBASH; then
10600        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
10601$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
10602      fi
10603      # Try to locate tool using the code snippet
10604      for ac_prog in uname
10605do
10606  # Extract the first word of "$ac_prog", so it can be a program name with args.
10607set dummy $ac_prog; ac_word=$2
10608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10609$as_echo_n "checking for $ac_word... " >&6; }
10610if ${ac_cv_path_UNAME+:} false; then :
10611  $as_echo_n "(cached) " >&6
10612else
10613  case $UNAME in
10614  [\\/]* | ?:[\\/]*)
10615  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10616  ;;
10617  *)
10618  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10619for as_dir in $PATH
10620do
10621  IFS=$as_save_IFS
10622  test -z "$as_dir" && as_dir=.
10623    for ac_exec_ext in '' $ac_executable_extensions; do
10624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10625    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10627    break 2
10628  fi
10629done
10630  done
10631IFS=$as_save_IFS
10632
10633  ;;
10634esac
10635fi
10636UNAME=$ac_cv_path_UNAME
10637if test -n "$UNAME"; then
10638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10639$as_echo "$UNAME" >&6; }
10640else
10641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642$as_echo "no" >&6; }
10643fi
10644
10645
10646  test -n "$UNAME" && break
10647done
10648
10649    else
10650      # If it succeeded, then it was overridden by the user. We will use it
10651      # for the tool.
10652
10653      # First remove it from the list of overridden variables, so we can test
10654      # for unknown variables in the end.
10655      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10656
10657      # Check if the provided tool contains a complete path.
10658      tool_specified="$UNAME"
10659      tool_basename="${tool_specified##*/}"
10660      if test "x$tool_basename" = "x$tool_specified"; then
10661        # A command without a complete path is provided, search $PATH.
10662        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
10663$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
10664        # Extract the first word of "$tool_basename", so it can be a program name with args.
10665set dummy $tool_basename; ac_word=$2
10666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10667$as_echo_n "checking for $ac_word... " >&6; }
10668if ${ac_cv_path_UNAME+:} false; then :
10669  $as_echo_n "(cached) " >&6
10670else
10671  case $UNAME in
10672  [\\/]* | ?:[\\/]*)
10673  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
10674  ;;
10675  *)
10676  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10677for as_dir in $PATH
10678do
10679  IFS=$as_save_IFS
10680  test -z "$as_dir" && as_dir=.
10681    for ac_exec_ext in '' $ac_executable_extensions; do
10682  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10683    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
10684    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10685    break 2
10686  fi
10687done
10688  done
10689IFS=$as_save_IFS
10690
10691  ;;
10692esac
10693fi
10694UNAME=$ac_cv_path_UNAME
10695if test -n "$UNAME"; then
10696  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
10697$as_echo "$UNAME" >&6; }
10698else
10699  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10700$as_echo "no" >&6; }
10701fi
10702
10703
10704        if test "x$UNAME" = x; then
10705          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10706        fi
10707      else
10708        # Otherwise we believe it is a complete path. Use it as it is.
10709        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
10710$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
10711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
10712$as_echo_n "checking for UNAME... " >&6; }
10713        if test ! -x "$tool_specified"; then
10714          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10715$as_echo "not found" >&6; }
10716          as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
10717        fi
10718        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10719$as_echo "$tool_specified" >&6; }
10720      fi
10721    fi
10722  fi
10723
10724
10725
10726  if test "x$UNAME" = x; then
10727    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
10728  fi
10729
10730
10731
10732
10733
10734  # Publish this variable in the help.
10735
10736
10737  if test "x$UNIQ" = x; then
10738    # The variable is not set by user, try to locate tool using the code snippet
10739    for ac_prog in uniq
10740do
10741  # Extract the first word of "$ac_prog", so it can be a program name with args.
10742set dummy $ac_prog; ac_word=$2
10743{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10744$as_echo_n "checking for $ac_word... " >&6; }
10745if ${ac_cv_path_UNIQ+:} false; then :
10746  $as_echo_n "(cached) " >&6
10747else
10748  case $UNIQ in
10749  [\\/]* | ?:[\\/]*)
10750  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10751  ;;
10752  *)
10753  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10754for as_dir in $PATH
10755do
10756  IFS=$as_save_IFS
10757  test -z "$as_dir" && as_dir=.
10758    for ac_exec_ext in '' $ac_executable_extensions; do
10759  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10760    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10761    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10762    break 2
10763  fi
10764done
10765  done
10766IFS=$as_save_IFS
10767
10768  ;;
10769esac
10770fi
10771UNIQ=$ac_cv_path_UNIQ
10772if test -n "$UNIQ"; then
10773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10774$as_echo "$UNIQ" >&6; }
10775else
10776  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10777$as_echo "no" >&6; }
10778fi
10779
10780
10781  test -n "$UNIQ" && break
10782done
10783
10784  else
10785    # The variable is set, but is it from the command line or the environment?
10786
10787    # Try to remove the string !UNIQ! from our list.
10788    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
10789    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10790      # If it failed, the variable was not from the command line. Ignore it,
10791      # but warn the user (except for BASH, which is always set by the calling BASH).
10792      if test "xUNIQ" != xBASH; then
10793        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
10794$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
10795      fi
10796      # Try to locate tool using the code snippet
10797      for ac_prog in uniq
10798do
10799  # Extract the first word of "$ac_prog", so it can be a program name with args.
10800set dummy $ac_prog; ac_word=$2
10801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10802$as_echo_n "checking for $ac_word... " >&6; }
10803if ${ac_cv_path_UNIQ+:} false; then :
10804  $as_echo_n "(cached) " >&6
10805else
10806  case $UNIQ in
10807  [\\/]* | ?:[\\/]*)
10808  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10809  ;;
10810  *)
10811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10812for as_dir in $PATH
10813do
10814  IFS=$as_save_IFS
10815  test -z "$as_dir" && as_dir=.
10816    for ac_exec_ext in '' $ac_executable_extensions; do
10817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10818    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10820    break 2
10821  fi
10822done
10823  done
10824IFS=$as_save_IFS
10825
10826  ;;
10827esac
10828fi
10829UNIQ=$ac_cv_path_UNIQ
10830if test -n "$UNIQ"; then
10831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10832$as_echo "$UNIQ" >&6; }
10833else
10834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10835$as_echo "no" >&6; }
10836fi
10837
10838
10839  test -n "$UNIQ" && break
10840done
10841
10842    else
10843      # If it succeeded, then it was overridden by the user. We will use it
10844      # for the tool.
10845
10846      # First remove it from the list of overridden variables, so we can test
10847      # for unknown variables in the end.
10848      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10849
10850      # Check if the provided tool contains a complete path.
10851      tool_specified="$UNIQ"
10852      tool_basename="${tool_specified##*/}"
10853      if test "x$tool_basename" = "x$tool_specified"; then
10854        # A command without a complete path is provided, search $PATH.
10855        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
10856$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
10857        # Extract the first word of "$tool_basename", so it can be a program name with args.
10858set dummy $tool_basename; ac_word=$2
10859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10860$as_echo_n "checking for $ac_word... " >&6; }
10861if ${ac_cv_path_UNIQ+:} false; then :
10862  $as_echo_n "(cached) " >&6
10863else
10864  case $UNIQ in
10865  [\\/]* | ?:[\\/]*)
10866  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
10867  ;;
10868  *)
10869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10870for as_dir in $PATH
10871do
10872  IFS=$as_save_IFS
10873  test -z "$as_dir" && as_dir=.
10874    for ac_exec_ext in '' $ac_executable_extensions; do
10875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10876    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
10877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10878    break 2
10879  fi
10880done
10881  done
10882IFS=$as_save_IFS
10883
10884  ;;
10885esac
10886fi
10887UNIQ=$ac_cv_path_UNIQ
10888if test -n "$UNIQ"; then
10889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
10890$as_echo "$UNIQ" >&6; }
10891else
10892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10893$as_echo "no" >&6; }
10894fi
10895
10896
10897        if test "x$UNIQ" = x; then
10898          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10899        fi
10900      else
10901        # Otherwise we believe it is a complete path. Use it as it is.
10902        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
10903$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
10904        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
10905$as_echo_n "checking for UNIQ... " >&6; }
10906        if test ! -x "$tool_specified"; then
10907          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10908$as_echo "not found" >&6; }
10909          as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
10910        fi
10911        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10912$as_echo "$tool_specified" >&6; }
10913      fi
10914    fi
10915  fi
10916
10917
10918
10919  if test "x$UNIQ" = x; then
10920    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
10921  fi
10922
10923
10924
10925
10926
10927  # Publish this variable in the help.
10928
10929
10930  if test "x$WC" = x; then
10931    # The variable is not set by user, try to locate tool using the code snippet
10932    for ac_prog in wc
10933do
10934  # Extract the first word of "$ac_prog", so it can be a program name with args.
10935set dummy $ac_prog; ac_word=$2
10936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10937$as_echo_n "checking for $ac_word... " >&6; }
10938if ${ac_cv_path_WC+:} false; then :
10939  $as_echo_n "(cached) " >&6
10940else
10941  case $WC in
10942  [\\/]* | ?:[\\/]*)
10943  ac_cv_path_WC="$WC" # Let the user override the test with a path.
10944  ;;
10945  *)
10946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10947for as_dir in $PATH
10948do
10949  IFS=$as_save_IFS
10950  test -z "$as_dir" && as_dir=.
10951    for ac_exec_ext in '' $ac_executable_extensions; do
10952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10953    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
10954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10955    break 2
10956  fi
10957done
10958  done
10959IFS=$as_save_IFS
10960
10961  ;;
10962esac
10963fi
10964WC=$ac_cv_path_WC
10965if test -n "$WC"; then
10966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
10967$as_echo "$WC" >&6; }
10968else
10969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10970$as_echo "no" >&6; }
10971fi
10972
10973
10974  test -n "$WC" && break
10975done
10976
10977  else
10978    # The variable is set, but is it from the command line or the environment?
10979
10980    # Try to remove the string !WC! from our list.
10981    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
10982    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10983      # If it failed, the variable was not from the command line. Ignore it,
10984      # but warn the user (except for BASH, which is always set by the calling BASH).
10985      if test "xWC" != xBASH; then
10986        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
10987$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
10988      fi
10989      # Try to locate tool using the code snippet
10990      for ac_prog in wc
10991do
10992  # Extract the first word of "$ac_prog", so it can be a program name with args.
10993set dummy $ac_prog; ac_word=$2
10994{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10995$as_echo_n "checking for $ac_word... " >&6; }
10996if ${ac_cv_path_WC+:} false; then :
10997  $as_echo_n "(cached) " >&6
10998else
10999  case $WC in
11000  [\\/]* | ?:[\\/]*)
11001  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11002  ;;
11003  *)
11004  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11005for as_dir in $PATH
11006do
11007  IFS=$as_save_IFS
11008  test -z "$as_dir" && as_dir=.
11009    for ac_exec_ext in '' $ac_executable_extensions; do
11010  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11011    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11012    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11013    break 2
11014  fi
11015done
11016  done
11017IFS=$as_save_IFS
11018
11019  ;;
11020esac
11021fi
11022WC=$ac_cv_path_WC
11023if test -n "$WC"; then
11024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11025$as_echo "$WC" >&6; }
11026else
11027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11028$as_echo "no" >&6; }
11029fi
11030
11031
11032  test -n "$WC" && break
11033done
11034
11035    else
11036      # If it succeeded, then it was overridden by the user. We will use it
11037      # for the tool.
11038
11039      # First remove it from the list of overridden variables, so we can test
11040      # for unknown variables in the end.
11041      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11042
11043      # Check if the provided tool contains a complete path.
11044      tool_specified="$WC"
11045      tool_basename="${tool_specified##*/}"
11046      if test "x$tool_basename" = "x$tool_specified"; then
11047        # A command without a complete path is provided, search $PATH.
11048        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
11049$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
11050        # Extract the first word of "$tool_basename", so it can be a program name with args.
11051set dummy $tool_basename; ac_word=$2
11052{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11053$as_echo_n "checking for $ac_word... " >&6; }
11054if ${ac_cv_path_WC+:} false; then :
11055  $as_echo_n "(cached) " >&6
11056else
11057  case $WC in
11058  [\\/]* | ?:[\\/]*)
11059  ac_cv_path_WC="$WC" # Let the user override the test with a path.
11060  ;;
11061  *)
11062  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11063for as_dir in $PATH
11064do
11065  IFS=$as_save_IFS
11066  test -z "$as_dir" && as_dir=.
11067    for ac_exec_ext in '' $ac_executable_extensions; do
11068  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11069    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
11070    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11071    break 2
11072  fi
11073done
11074  done
11075IFS=$as_save_IFS
11076
11077  ;;
11078esac
11079fi
11080WC=$ac_cv_path_WC
11081if test -n "$WC"; then
11082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
11083$as_echo "$WC" >&6; }
11084else
11085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11086$as_echo "no" >&6; }
11087fi
11088
11089
11090        if test "x$WC" = x; then
11091          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11092        fi
11093      else
11094        # Otherwise we believe it is a complete path. Use it as it is.
11095        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
11096$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
11097        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
11098$as_echo_n "checking for WC... " >&6; }
11099        if test ! -x "$tool_specified"; then
11100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11101$as_echo "not found" >&6; }
11102          as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
11103        fi
11104        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11105$as_echo "$tool_specified" >&6; }
11106      fi
11107    fi
11108  fi
11109
11110
11111
11112  if test "x$WC" = x; then
11113    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
11114  fi
11115
11116
11117
11118
11119
11120  # Publish this variable in the help.
11121
11122
11123  if test "x$WHICH" = x; then
11124    # The variable is not set by user, try to locate tool using the code snippet
11125    for ac_prog in which
11126do
11127  # Extract the first word of "$ac_prog", so it can be a program name with args.
11128set dummy $ac_prog; ac_word=$2
11129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11130$as_echo_n "checking for $ac_word... " >&6; }
11131if ${ac_cv_path_WHICH+:} false; then :
11132  $as_echo_n "(cached) " >&6
11133else
11134  case $WHICH in
11135  [\\/]* | ?:[\\/]*)
11136  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11137  ;;
11138  *)
11139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11140for as_dir in $PATH
11141do
11142  IFS=$as_save_IFS
11143  test -z "$as_dir" && as_dir=.
11144    for ac_exec_ext in '' $ac_executable_extensions; do
11145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11146    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11148    break 2
11149  fi
11150done
11151  done
11152IFS=$as_save_IFS
11153
11154  ;;
11155esac
11156fi
11157WHICH=$ac_cv_path_WHICH
11158if test -n "$WHICH"; then
11159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11160$as_echo "$WHICH" >&6; }
11161else
11162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11163$as_echo "no" >&6; }
11164fi
11165
11166
11167  test -n "$WHICH" && break
11168done
11169
11170  else
11171    # The variable is set, but is it from the command line or the environment?
11172
11173    # Try to remove the string !WHICH! from our list.
11174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
11175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11176      # If it failed, the variable was not from the command line. Ignore it,
11177      # but warn the user (except for BASH, which is always set by the calling BASH).
11178      if test "xWHICH" != xBASH; then
11179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
11180$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
11181      fi
11182      # Try to locate tool using the code snippet
11183      for ac_prog in which
11184do
11185  # Extract the first word of "$ac_prog", so it can be a program name with args.
11186set dummy $ac_prog; ac_word=$2
11187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11188$as_echo_n "checking for $ac_word... " >&6; }
11189if ${ac_cv_path_WHICH+:} false; then :
11190  $as_echo_n "(cached) " >&6
11191else
11192  case $WHICH in
11193  [\\/]* | ?:[\\/]*)
11194  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11195  ;;
11196  *)
11197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11198for as_dir in $PATH
11199do
11200  IFS=$as_save_IFS
11201  test -z "$as_dir" && as_dir=.
11202    for ac_exec_ext in '' $ac_executable_extensions; do
11203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11204    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11206    break 2
11207  fi
11208done
11209  done
11210IFS=$as_save_IFS
11211
11212  ;;
11213esac
11214fi
11215WHICH=$ac_cv_path_WHICH
11216if test -n "$WHICH"; then
11217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11218$as_echo "$WHICH" >&6; }
11219else
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11221$as_echo "no" >&6; }
11222fi
11223
11224
11225  test -n "$WHICH" && break
11226done
11227
11228    else
11229      # If it succeeded, then it was overridden by the user. We will use it
11230      # for the tool.
11231
11232      # First remove it from the list of overridden variables, so we can test
11233      # for unknown variables in the end.
11234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11235
11236      # Check if the provided tool contains a complete path.
11237      tool_specified="$WHICH"
11238      tool_basename="${tool_specified##*/}"
11239      if test "x$tool_basename" = "x$tool_specified"; then
11240        # A command without a complete path is provided, search $PATH.
11241        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
11242$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
11243        # Extract the first word of "$tool_basename", so it can be a program name with args.
11244set dummy $tool_basename; ac_word=$2
11245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11246$as_echo_n "checking for $ac_word... " >&6; }
11247if ${ac_cv_path_WHICH+:} false; then :
11248  $as_echo_n "(cached) " >&6
11249else
11250  case $WHICH in
11251  [\\/]* | ?:[\\/]*)
11252  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
11253  ;;
11254  *)
11255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11256for as_dir in $PATH
11257do
11258  IFS=$as_save_IFS
11259  test -z "$as_dir" && as_dir=.
11260    for ac_exec_ext in '' $ac_executable_extensions; do
11261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11262    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
11263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11264    break 2
11265  fi
11266done
11267  done
11268IFS=$as_save_IFS
11269
11270  ;;
11271esac
11272fi
11273WHICH=$ac_cv_path_WHICH
11274if test -n "$WHICH"; then
11275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
11276$as_echo "$WHICH" >&6; }
11277else
11278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11279$as_echo "no" >&6; }
11280fi
11281
11282
11283        if test "x$WHICH" = x; then
11284          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11285        fi
11286      else
11287        # Otherwise we believe it is a complete path. Use it as it is.
11288        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
11289$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
11290        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
11291$as_echo_n "checking for WHICH... " >&6; }
11292        if test ! -x "$tool_specified"; then
11293          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11294$as_echo "not found" >&6; }
11295          as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
11296        fi
11297        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11298$as_echo "$tool_specified" >&6; }
11299      fi
11300    fi
11301  fi
11302
11303
11304
11305  if test "x$WHICH" = x; then
11306    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
11307  fi
11308
11309
11310
11311
11312
11313  # Publish this variable in the help.
11314
11315
11316  if test "x$XARGS" = x; then
11317    # The variable is not set by user, try to locate tool using the code snippet
11318    for ac_prog in xargs
11319do
11320  # Extract the first word of "$ac_prog", so it can be a program name with args.
11321set dummy $ac_prog; ac_word=$2
11322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11323$as_echo_n "checking for $ac_word... " >&6; }
11324if ${ac_cv_path_XARGS+:} false; then :
11325  $as_echo_n "(cached) " >&6
11326else
11327  case $XARGS in
11328  [\\/]* | ?:[\\/]*)
11329  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11330  ;;
11331  *)
11332  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11333for as_dir in $PATH
11334do
11335  IFS=$as_save_IFS
11336  test -z "$as_dir" && as_dir=.
11337    for ac_exec_ext in '' $ac_executable_extensions; do
11338  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11339    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11340    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11341    break 2
11342  fi
11343done
11344  done
11345IFS=$as_save_IFS
11346
11347  ;;
11348esac
11349fi
11350XARGS=$ac_cv_path_XARGS
11351if test -n "$XARGS"; then
11352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11353$as_echo "$XARGS" >&6; }
11354else
11355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11356$as_echo "no" >&6; }
11357fi
11358
11359
11360  test -n "$XARGS" && break
11361done
11362
11363  else
11364    # The variable is set, but is it from the command line or the environment?
11365
11366    # Try to remove the string !XARGS! from our list.
11367    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
11368    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11369      # If it failed, the variable was not from the command line. Ignore it,
11370      # but warn the user (except for BASH, which is always set by the calling BASH).
11371      if test "xXARGS" != xBASH; then
11372        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
11373$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
11374      fi
11375      # Try to locate tool using the code snippet
11376      for ac_prog in xargs
11377do
11378  # Extract the first word of "$ac_prog", so it can be a program name with args.
11379set dummy $ac_prog; ac_word=$2
11380{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11381$as_echo_n "checking for $ac_word... " >&6; }
11382if ${ac_cv_path_XARGS+:} false; then :
11383  $as_echo_n "(cached) " >&6
11384else
11385  case $XARGS in
11386  [\\/]* | ?:[\\/]*)
11387  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11388  ;;
11389  *)
11390  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11391for as_dir in $PATH
11392do
11393  IFS=$as_save_IFS
11394  test -z "$as_dir" && as_dir=.
11395    for ac_exec_ext in '' $ac_executable_extensions; do
11396  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11397    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11398    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11399    break 2
11400  fi
11401done
11402  done
11403IFS=$as_save_IFS
11404
11405  ;;
11406esac
11407fi
11408XARGS=$ac_cv_path_XARGS
11409if test -n "$XARGS"; then
11410  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11411$as_echo "$XARGS" >&6; }
11412else
11413  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11414$as_echo "no" >&6; }
11415fi
11416
11417
11418  test -n "$XARGS" && break
11419done
11420
11421    else
11422      # If it succeeded, then it was overridden by the user. We will use it
11423      # for the tool.
11424
11425      # First remove it from the list of overridden variables, so we can test
11426      # for unknown variables in the end.
11427      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11428
11429      # Check if the provided tool contains a complete path.
11430      tool_specified="$XARGS"
11431      tool_basename="${tool_specified##*/}"
11432      if test "x$tool_basename" = "x$tool_specified"; then
11433        # A command without a complete path is provided, search $PATH.
11434        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
11435$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
11436        # Extract the first word of "$tool_basename", so it can be a program name with args.
11437set dummy $tool_basename; ac_word=$2
11438{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11439$as_echo_n "checking for $ac_word... " >&6; }
11440if ${ac_cv_path_XARGS+:} false; then :
11441  $as_echo_n "(cached) " >&6
11442else
11443  case $XARGS in
11444  [\\/]* | ?:[\\/]*)
11445  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
11446  ;;
11447  *)
11448  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11449for as_dir in $PATH
11450do
11451  IFS=$as_save_IFS
11452  test -z "$as_dir" && as_dir=.
11453    for ac_exec_ext in '' $ac_executable_extensions; do
11454  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11455    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
11456    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11457    break 2
11458  fi
11459done
11460  done
11461IFS=$as_save_IFS
11462
11463  ;;
11464esac
11465fi
11466XARGS=$ac_cv_path_XARGS
11467if test -n "$XARGS"; then
11468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
11469$as_echo "$XARGS" >&6; }
11470else
11471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11472$as_echo "no" >&6; }
11473fi
11474
11475
11476        if test "x$XARGS" = x; then
11477          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11478        fi
11479      else
11480        # Otherwise we believe it is a complete path. Use it as it is.
11481        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
11482$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
11483        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
11484$as_echo_n "checking for XARGS... " >&6; }
11485        if test ! -x "$tool_specified"; then
11486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11487$as_echo "not found" >&6; }
11488          as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
11489        fi
11490        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11491$as_echo "$tool_specified" >&6; }
11492      fi
11493    fi
11494  fi
11495
11496
11497
11498  if test "x$XARGS" = x; then
11499    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
11500  fi
11501
11502
11503
11504  # Then required tools that require some special treatment.
11505
11506
11507  # Publish this variable in the help.
11508
11509
11510  if test "x$AWK" = x; then
11511    # The variable is not set by user, try to locate tool using the code snippet
11512    for ac_prog in gawk mawk nawk awk
11513do
11514  # Extract the first word of "$ac_prog", so it can be a program name with args.
11515set dummy $ac_prog; ac_word=$2
11516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11517$as_echo_n "checking for $ac_word... " >&6; }
11518if ${ac_cv_prog_AWK+:} false; then :
11519  $as_echo_n "(cached) " >&6
11520else
11521  if test -n "$AWK"; then
11522  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11523else
11524as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11525for as_dir in $PATH
11526do
11527  IFS=$as_save_IFS
11528  test -z "$as_dir" && as_dir=.
11529    for ac_exec_ext in '' $ac_executable_extensions; do
11530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11531    ac_cv_prog_AWK="$ac_prog"
11532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11533    break 2
11534  fi
11535done
11536  done
11537IFS=$as_save_IFS
11538
11539fi
11540fi
11541AWK=$ac_cv_prog_AWK
11542if test -n "$AWK"; then
11543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11544$as_echo "$AWK" >&6; }
11545else
11546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11547$as_echo "no" >&6; }
11548fi
11549
11550
11551  test -n "$AWK" && break
11552done
11553
11554  else
11555    # The variable is set, but is it from the command line or the environment?
11556
11557    # Try to remove the string !AWK! from our list.
11558    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
11559    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11560      # If it failed, the variable was not from the command line. Ignore it,
11561      # but warn the user (except for BASH, which is always set by the calling BASH).
11562      if test "xAWK" != xBASH; then
11563        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
11564$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
11565      fi
11566      # Try to locate tool using the code snippet
11567      for ac_prog in gawk mawk nawk awk
11568do
11569  # Extract the first word of "$ac_prog", so it can be a program name with args.
11570set dummy $ac_prog; ac_word=$2
11571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11572$as_echo_n "checking for $ac_word... " >&6; }
11573if ${ac_cv_prog_AWK+:} false; then :
11574  $as_echo_n "(cached) " >&6
11575else
11576  if test -n "$AWK"; then
11577  ac_cv_prog_AWK="$AWK" # Let the user override the test.
11578else
11579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11580for as_dir in $PATH
11581do
11582  IFS=$as_save_IFS
11583  test -z "$as_dir" && as_dir=.
11584    for ac_exec_ext in '' $ac_executable_extensions; do
11585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11586    ac_cv_prog_AWK="$ac_prog"
11587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11588    break 2
11589  fi
11590done
11591  done
11592IFS=$as_save_IFS
11593
11594fi
11595fi
11596AWK=$ac_cv_prog_AWK
11597if test -n "$AWK"; then
11598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11599$as_echo "$AWK" >&6; }
11600else
11601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11602$as_echo "no" >&6; }
11603fi
11604
11605
11606  test -n "$AWK" && break
11607done
11608
11609    else
11610      # If it succeeded, then it was overridden by the user. We will use it
11611      # for the tool.
11612
11613      # First remove it from the list of overridden variables, so we can test
11614      # for unknown variables in the end.
11615      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11616
11617      # Check if the provided tool contains a complete path.
11618      tool_specified="$AWK"
11619      tool_basename="${tool_specified##*/}"
11620      if test "x$tool_basename" = "x$tool_specified"; then
11621        # A command without a complete path is provided, search $PATH.
11622        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
11623$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
11624        # Extract the first word of "$tool_basename", so it can be a program name with args.
11625set dummy $tool_basename; ac_word=$2
11626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11627$as_echo_n "checking for $ac_word... " >&6; }
11628if ${ac_cv_path_AWK+:} false; then :
11629  $as_echo_n "(cached) " >&6
11630else
11631  case $AWK in
11632  [\\/]* | ?:[\\/]*)
11633  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
11634  ;;
11635  *)
11636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11637for as_dir in $PATH
11638do
11639  IFS=$as_save_IFS
11640  test -z "$as_dir" && as_dir=.
11641    for ac_exec_ext in '' $ac_executable_extensions; do
11642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11643    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
11644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11645    break 2
11646  fi
11647done
11648  done
11649IFS=$as_save_IFS
11650
11651  ;;
11652esac
11653fi
11654AWK=$ac_cv_path_AWK
11655if test -n "$AWK"; then
11656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
11657$as_echo "$AWK" >&6; }
11658else
11659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
11661fi
11662
11663
11664        if test "x$AWK" = x; then
11665          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11666        fi
11667      else
11668        # Otherwise we believe it is a complete path. Use it as it is.
11669        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
11670$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
11671        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
11672$as_echo_n "checking for AWK... " >&6; }
11673        if test ! -x "$tool_specified"; then
11674          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11675$as_echo "not found" >&6; }
11676          as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
11677        fi
11678        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11679$as_echo "$tool_specified" >&6; }
11680      fi
11681    fi
11682  fi
11683
11684
11685  if test "x$AWK" = x; then
11686    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
11687  fi
11688
11689
11690
11691
11692  # Publish this variable in the help.
11693
11694
11695  if test "x$GREP" = x; then
11696    # The variable is not set by user, try to locate tool using the code snippet
11697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11698$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11699if ${ac_cv_path_GREP+:} false; then :
11700  $as_echo_n "(cached) " >&6
11701else
11702  if test -z "$GREP"; then
11703  ac_path_GREP_found=false
11704  # Loop through the user's path and test for each of PROGNAME-LIST
11705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11706for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11707do
11708  IFS=$as_save_IFS
11709  test -z "$as_dir" && as_dir=.
11710    for ac_prog in grep ggrep; do
11711    for ac_exec_ext in '' $ac_executable_extensions; do
11712      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11713      as_fn_executable_p "$ac_path_GREP" || continue
11714# Check for GNU ac_path_GREP and select it if it is found.
11715  # Check for GNU $ac_path_GREP
11716case `"$ac_path_GREP" --version 2>&1` in
11717*GNU*)
11718  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11719*)
11720  ac_count=0
11721  $as_echo_n 0123456789 >"conftest.in"
11722  while :
11723  do
11724    cat "conftest.in" "conftest.in" >"conftest.tmp"
11725    mv "conftest.tmp" "conftest.in"
11726    cp "conftest.in" "conftest.nl"
11727    $as_echo 'GREP' >> "conftest.nl"
11728    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11729    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11730    as_fn_arith $ac_count + 1 && ac_count=$as_val
11731    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11732      # Best one so far, save it but keep looking for a better one
11733      ac_cv_path_GREP="$ac_path_GREP"
11734      ac_path_GREP_max=$ac_count
11735    fi
11736    # 10*(2^10) chars as input seems more than enough
11737    test $ac_count -gt 10 && break
11738  done
11739  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11740esac
11741
11742      $ac_path_GREP_found && break 3
11743    done
11744  done
11745  done
11746IFS=$as_save_IFS
11747  if test -z "$ac_cv_path_GREP"; then
11748    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11749  fi
11750else
11751  ac_cv_path_GREP=$GREP
11752fi
11753
11754fi
11755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11756$as_echo "$ac_cv_path_GREP" >&6; }
11757 GREP="$ac_cv_path_GREP"
11758
11759
11760  else
11761    # The variable is set, but is it from the command line or the environment?
11762
11763    # Try to remove the string !GREP! from our list.
11764    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
11765    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11766      # If it failed, the variable was not from the command line. Ignore it,
11767      # but warn the user (except for BASH, which is always set by the calling BASH).
11768      if test "xGREP" != xBASH; then
11769        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
11770$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
11771      fi
11772      # Try to locate tool using the code snippet
11773      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
11774$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
11775if ${ac_cv_path_GREP+:} false; then :
11776  $as_echo_n "(cached) " >&6
11777else
11778  if test -z "$GREP"; then
11779  ac_path_GREP_found=false
11780  # Loop through the user's path and test for each of PROGNAME-LIST
11781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11782for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11783do
11784  IFS=$as_save_IFS
11785  test -z "$as_dir" && as_dir=.
11786    for ac_prog in grep ggrep; do
11787    for ac_exec_ext in '' $ac_executable_extensions; do
11788      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
11789      as_fn_executable_p "$ac_path_GREP" || continue
11790# Check for GNU ac_path_GREP and select it if it is found.
11791  # Check for GNU $ac_path_GREP
11792case `"$ac_path_GREP" --version 2>&1` in
11793*GNU*)
11794  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
11795*)
11796  ac_count=0
11797  $as_echo_n 0123456789 >"conftest.in"
11798  while :
11799  do
11800    cat "conftest.in" "conftest.in" >"conftest.tmp"
11801    mv "conftest.tmp" "conftest.in"
11802    cp "conftest.in" "conftest.nl"
11803    $as_echo 'GREP' >> "conftest.nl"
11804    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11805    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11806    as_fn_arith $ac_count + 1 && ac_count=$as_val
11807    if test $ac_count -gt ${ac_path_GREP_max-0}; then
11808      # Best one so far, save it but keep looking for a better one
11809      ac_cv_path_GREP="$ac_path_GREP"
11810      ac_path_GREP_max=$ac_count
11811    fi
11812    # 10*(2^10) chars as input seems more than enough
11813    test $ac_count -gt 10 && break
11814  done
11815  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11816esac
11817
11818      $ac_path_GREP_found && break 3
11819    done
11820  done
11821  done
11822IFS=$as_save_IFS
11823  if test -z "$ac_cv_path_GREP"; then
11824    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11825  fi
11826else
11827  ac_cv_path_GREP=$GREP
11828fi
11829
11830fi
11831{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
11832$as_echo "$ac_cv_path_GREP" >&6; }
11833 GREP="$ac_cv_path_GREP"
11834
11835
11836    else
11837      # If it succeeded, then it was overridden by the user. We will use it
11838      # for the tool.
11839
11840      # First remove it from the list of overridden variables, so we can test
11841      # for unknown variables in the end.
11842      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11843
11844      # Check if the provided tool contains a complete path.
11845      tool_specified="$GREP"
11846      tool_basename="${tool_specified##*/}"
11847      if test "x$tool_basename" = "x$tool_specified"; then
11848        # A command without a complete path is provided, search $PATH.
11849        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
11850$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
11851        # Extract the first word of "$tool_basename", so it can be a program name with args.
11852set dummy $tool_basename; ac_word=$2
11853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11854$as_echo_n "checking for $ac_word... " >&6; }
11855if ${ac_cv_path_GREP+:} false; then :
11856  $as_echo_n "(cached) " >&6
11857else
11858  case $GREP in
11859  [\\/]* | ?:[\\/]*)
11860  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
11861  ;;
11862  *)
11863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11864for as_dir in $PATH
11865do
11866  IFS=$as_save_IFS
11867  test -z "$as_dir" && as_dir=.
11868    for ac_exec_ext in '' $ac_executable_extensions; do
11869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11870    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
11871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11872    break 2
11873  fi
11874done
11875  done
11876IFS=$as_save_IFS
11877
11878  ;;
11879esac
11880fi
11881GREP=$ac_cv_path_GREP
11882if test -n "$GREP"; then
11883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
11884$as_echo "$GREP" >&6; }
11885else
11886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11887$as_echo "no" >&6; }
11888fi
11889
11890
11891        if test "x$GREP" = x; then
11892          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11893        fi
11894      else
11895        # Otherwise we believe it is a complete path. Use it as it is.
11896        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
11897$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
11898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
11899$as_echo_n "checking for GREP... " >&6; }
11900        if test ! -x "$tool_specified"; then
11901          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11902$as_echo "not found" >&6; }
11903          as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
11904        fi
11905        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11906$as_echo "$tool_specified" >&6; }
11907      fi
11908    fi
11909  fi
11910
11911
11912  if test "x$GREP" = x; then
11913    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
11914  fi
11915
11916
11917
11918
11919  # Publish this variable in the help.
11920
11921
11922  if test "x$EGREP" = x; then
11923    # The variable is not set by user, try to locate tool using the code snippet
11924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
11925$as_echo_n "checking for egrep... " >&6; }
11926if ${ac_cv_path_EGREP+:} false; then :
11927  $as_echo_n "(cached) " >&6
11928else
11929  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
11930   then ac_cv_path_EGREP="$GREP -E"
11931   else
11932     if test -z "$EGREP"; then
11933  ac_path_EGREP_found=false
11934  # Loop through the user's path and test for each of PROGNAME-LIST
11935  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11936for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
11937do
11938  IFS=$as_save_IFS
11939  test -z "$as_dir" && as_dir=.
11940    for ac_prog in egrep; do
11941    for ac_exec_ext in '' $ac_executable_extensions; do
11942      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
11943      as_fn_executable_p "$ac_path_EGREP" || continue
11944# Check for GNU ac_path_EGREP and select it if it is found.
11945  # Check for GNU $ac_path_EGREP
11946case `"$ac_path_EGREP" --version 2>&1` in
11947*GNU*)
11948  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
11949*)
11950  ac_count=0
11951  $as_echo_n 0123456789 >"conftest.in"
11952  while :
11953  do
11954    cat "conftest.in" "conftest.in" >"conftest.tmp"
11955    mv "conftest.tmp" "conftest.in"
11956    cp "conftest.in" "conftest.nl"
11957    $as_echo 'EGREP' >> "conftest.nl"
11958    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
11959    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
11960    as_fn_arith $ac_count + 1 && ac_count=$as_val
11961    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
11962      # Best one so far, save it but keep looking for a better one
11963      ac_cv_path_EGREP="$ac_path_EGREP"
11964      ac_path_EGREP_max=$ac_count
11965    fi
11966    # 10*(2^10) chars as input seems more than enough
11967    test $ac_count -gt 10 && break
11968  done
11969  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
11970esac
11971
11972      $ac_path_EGREP_found && break 3
11973    done
11974  done
11975  done
11976IFS=$as_save_IFS
11977  if test -z "$ac_cv_path_EGREP"; then
11978    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
11979  fi
11980else
11981  ac_cv_path_EGREP=$EGREP
11982fi
11983
11984   fi
11985fi
11986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
11987$as_echo "$ac_cv_path_EGREP" >&6; }
11988 EGREP="$ac_cv_path_EGREP"
11989
11990
11991  else
11992    # The variable is set, but is it from the command line or the environment?
11993
11994    # Try to remove the string !EGREP! from our list.
11995    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
11996    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11997      # If it failed, the variable was not from the command line. Ignore it,
11998      # but warn the user (except for BASH, which is always set by the calling BASH).
11999      if test "xEGREP" != xBASH; then
12000        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
12001$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
12002      fi
12003      # Try to locate tool using the code snippet
12004      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
12005$as_echo_n "checking for egrep... " >&6; }
12006if ${ac_cv_path_EGREP+:} false; then :
12007  $as_echo_n "(cached) " >&6
12008else
12009  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
12010   then ac_cv_path_EGREP="$GREP -E"
12011   else
12012     if test -z "$EGREP"; then
12013  ac_path_EGREP_found=false
12014  # Loop through the user's path and test for each of PROGNAME-LIST
12015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12016for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12017do
12018  IFS=$as_save_IFS
12019  test -z "$as_dir" && as_dir=.
12020    for ac_prog in egrep; do
12021    for ac_exec_ext in '' $ac_executable_extensions; do
12022      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
12023      as_fn_executable_p "$ac_path_EGREP" || continue
12024# Check for GNU ac_path_EGREP and select it if it is found.
12025  # Check for GNU $ac_path_EGREP
12026case `"$ac_path_EGREP" --version 2>&1` in
12027*GNU*)
12028  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
12029*)
12030  ac_count=0
12031  $as_echo_n 0123456789 >"conftest.in"
12032  while :
12033  do
12034    cat "conftest.in" "conftest.in" >"conftest.tmp"
12035    mv "conftest.tmp" "conftest.in"
12036    cp "conftest.in" "conftest.nl"
12037    $as_echo 'EGREP' >> "conftest.nl"
12038    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12039    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12040    as_fn_arith $ac_count + 1 && ac_count=$as_val
12041    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
12042      # Best one so far, save it but keep looking for a better one
12043      ac_cv_path_EGREP="$ac_path_EGREP"
12044      ac_path_EGREP_max=$ac_count
12045    fi
12046    # 10*(2^10) chars as input seems more than enough
12047    test $ac_count -gt 10 && break
12048  done
12049  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12050esac
12051
12052      $ac_path_EGREP_found && break 3
12053    done
12054  done
12055  done
12056IFS=$as_save_IFS
12057  if test -z "$ac_cv_path_EGREP"; then
12058    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12059  fi
12060else
12061  ac_cv_path_EGREP=$EGREP
12062fi
12063
12064   fi
12065fi
12066{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
12067$as_echo "$ac_cv_path_EGREP" >&6; }
12068 EGREP="$ac_cv_path_EGREP"
12069
12070
12071    else
12072      # If it succeeded, then it was overridden by the user. We will use it
12073      # for the tool.
12074
12075      # First remove it from the list of overridden variables, so we can test
12076      # for unknown variables in the end.
12077      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12078
12079      # Check if the provided tool contains a complete path.
12080      tool_specified="$EGREP"
12081      tool_basename="${tool_specified##*/}"
12082      if test "x$tool_basename" = "x$tool_specified"; then
12083        # A command without a complete path is provided, search $PATH.
12084        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
12085$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
12086        # Extract the first word of "$tool_basename", so it can be a program name with args.
12087set dummy $tool_basename; ac_word=$2
12088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12089$as_echo_n "checking for $ac_word... " >&6; }
12090if ${ac_cv_path_EGREP+:} false; then :
12091  $as_echo_n "(cached) " >&6
12092else
12093  case $EGREP in
12094  [\\/]* | ?:[\\/]*)
12095  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
12096  ;;
12097  *)
12098  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12099for as_dir in $PATH
12100do
12101  IFS=$as_save_IFS
12102  test -z "$as_dir" && as_dir=.
12103    for ac_exec_ext in '' $ac_executable_extensions; do
12104  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12105    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
12106    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12107    break 2
12108  fi
12109done
12110  done
12111IFS=$as_save_IFS
12112
12113  ;;
12114esac
12115fi
12116EGREP=$ac_cv_path_EGREP
12117if test -n "$EGREP"; then
12118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
12119$as_echo "$EGREP" >&6; }
12120else
12121  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12122$as_echo "no" >&6; }
12123fi
12124
12125
12126        if test "x$EGREP" = x; then
12127          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12128        fi
12129      else
12130        # Otherwise we believe it is a complete path. Use it as it is.
12131        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
12132$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
12133        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
12134$as_echo_n "checking for EGREP... " >&6; }
12135        if test ! -x "$tool_specified"; then
12136          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12137$as_echo "not found" >&6; }
12138          as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12139        fi
12140        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12141$as_echo "$tool_specified" >&6; }
12142      fi
12143    fi
12144  fi
12145
12146
12147  if test "x$EGREP" = x; then
12148    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
12149  fi
12150
12151
12152
12153
12154  # Publish this variable in the help.
12155
12156
12157  if test "x$FGREP" = x; then
12158    # The variable is not set by user, try to locate tool using the code snippet
12159    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12160$as_echo_n "checking for fgrep... " >&6; }
12161if ${ac_cv_path_FGREP+:} false; then :
12162  $as_echo_n "(cached) " >&6
12163else
12164  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12165   then ac_cv_path_FGREP="$GREP -F"
12166   else
12167     if test -z "$FGREP"; then
12168  ac_path_FGREP_found=false
12169  # Loop through the user's path and test for each of PROGNAME-LIST
12170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12171for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12172do
12173  IFS=$as_save_IFS
12174  test -z "$as_dir" && as_dir=.
12175    for ac_prog in fgrep; do
12176    for ac_exec_ext in '' $ac_executable_extensions; do
12177      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12178      as_fn_executable_p "$ac_path_FGREP" || continue
12179# Check for GNU ac_path_FGREP and select it if it is found.
12180  # Check for GNU $ac_path_FGREP
12181case `"$ac_path_FGREP" --version 2>&1` in
12182*GNU*)
12183  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12184*)
12185  ac_count=0
12186  $as_echo_n 0123456789 >"conftest.in"
12187  while :
12188  do
12189    cat "conftest.in" "conftest.in" >"conftest.tmp"
12190    mv "conftest.tmp" "conftest.in"
12191    cp "conftest.in" "conftest.nl"
12192    $as_echo 'FGREP' >> "conftest.nl"
12193    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12194    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12195    as_fn_arith $ac_count + 1 && ac_count=$as_val
12196    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12197      # Best one so far, save it but keep looking for a better one
12198      ac_cv_path_FGREP="$ac_path_FGREP"
12199      ac_path_FGREP_max=$ac_count
12200    fi
12201    # 10*(2^10) chars as input seems more than enough
12202    test $ac_count -gt 10 && break
12203  done
12204  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12205esac
12206
12207      $ac_path_FGREP_found && break 3
12208    done
12209  done
12210  done
12211IFS=$as_save_IFS
12212  if test -z "$ac_cv_path_FGREP"; then
12213    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12214  fi
12215else
12216  ac_cv_path_FGREP=$FGREP
12217fi
12218
12219   fi
12220fi
12221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12222$as_echo "$ac_cv_path_FGREP" >&6; }
12223 FGREP="$ac_cv_path_FGREP"
12224
12225
12226  else
12227    # The variable is set, but is it from the command line or the environment?
12228
12229    # Try to remove the string !FGREP! from our list.
12230    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
12231    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12232      # If it failed, the variable was not from the command line. Ignore it,
12233      # but warn the user (except for BASH, which is always set by the calling BASH).
12234      if test "xFGREP" != xBASH; then
12235        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
12236$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
12237      fi
12238      # Try to locate tool using the code snippet
12239      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
12240$as_echo_n "checking for fgrep... " >&6; }
12241if ${ac_cv_path_FGREP+:} false; then :
12242  $as_echo_n "(cached) " >&6
12243else
12244  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
12245   then ac_cv_path_FGREP="$GREP -F"
12246   else
12247     if test -z "$FGREP"; then
12248  ac_path_FGREP_found=false
12249  # Loop through the user's path and test for each of PROGNAME-LIST
12250  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12251for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12252do
12253  IFS=$as_save_IFS
12254  test -z "$as_dir" && as_dir=.
12255    for ac_prog in fgrep; do
12256    for ac_exec_ext in '' $ac_executable_extensions; do
12257      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
12258      as_fn_executable_p "$ac_path_FGREP" || continue
12259# Check for GNU ac_path_FGREP and select it if it is found.
12260  # Check for GNU $ac_path_FGREP
12261case `"$ac_path_FGREP" --version 2>&1` in
12262*GNU*)
12263  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
12264*)
12265  ac_count=0
12266  $as_echo_n 0123456789 >"conftest.in"
12267  while :
12268  do
12269    cat "conftest.in" "conftest.in" >"conftest.tmp"
12270    mv "conftest.tmp" "conftest.in"
12271    cp "conftest.in" "conftest.nl"
12272    $as_echo 'FGREP' >> "conftest.nl"
12273    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
12274    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12275    as_fn_arith $ac_count + 1 && ac_count=$as_val
12276    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
12277      # Best one so far, save it but keep looking for a better one
12278      ac_cv_path_FGREP="$ac_path_FGREP"
12279      ac_path_FGREP_max=$ac_count
12280    fi
12281    # 10*(2^10) chars as input seems more than enough
12282    test $ac_count -gt 10 && break
12283  done
12284  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12285esac
12286
12287      $ac_path_FGREP_found && break 3
12288    done
12289  done
12290  done
12291IFS=$as_save_IFS
12292  if test -z "$ac_cv_path_FGREP"; then
12293    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12294  fi
12295else
12296  ac_cv_path_FGREP=$FGREP
12297fi
12298
12299   fi
12300fi
12301{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
12302$as_echo "$ac_cv_path_FGREP" >&6; }
12303 FGREP="$ac_cv_path_FGREP"
12304
12305
12306    else
12307      # If it succeeded, then it was overridden by the user. We will use it
12308      # for the tool.
12309
12310      # First remove it from the list of overridden variables, so we can test
12311      # for unknown variables in the end.
12312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12313
12314      # Check if the provided tool contains a complete path.
12315      tool_specified="$FGREP"
12316      tool_basename="${tool_specified##*/}"
12317      if test "x$tool_basename" = "x$tool_specified"; then
12318        # A command without a complete path is provided, search $PATH.
12319        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
12320$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
12321        # Extract the first word of "$tool_basename", so it can be a program name with args.
12322set dummy $tool_basename; ac_word=$2
12323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12324$as_echo_n "checking for $ac_word... " >&6; }
12325if ${ac_cv_path_FGREP+:} false; then :
12326  $as_echo_n "(cached) " >&6
12327else
12328  case $FGREP in
12329  [\\/]* | ?:[\\/]*)
12330  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
12331  ;;
12332  *)
12333  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12334for as_dir in $PATH
12335do
12336  IFS=$as_save_IFS
12337  test -z "$as_dir" && as_dir=.
12338    for ac_exec_ext in '' $ac_executable_extensions; do
12339  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12340    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
12341    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12342    break 2
12343  fi
12344done
12345  done
12346IFS=$as_save_IFS
12347
12348  ;;
12349esac
12350fi
12351FGREP=$ac_cv_path_FGREP
12352if test -n "$FGREP"; then
12353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
12354$as_echo "$FGREP" >&6; }
12355else
12356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12357$as_echo "no" >&6; }
12358fi
12359
12360
12361        if test "x$FGREP" = x; then
12362          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12363        fi
12364      else
12365        # Otherwise we believe it is a complete path. Use it as it is.
12366        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
12367$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
12368        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
12369$as_echo_n "checking for FGREP... " >&6; }
12370        if test ! -x "$tool_specified"; then
12371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12372$as_echo "not found" >&6; }
12373          as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
12374        fi
12375        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12376$as_echo "$tool_specified" >&6; }
12377      fi
12378    fi
12379  fi
12380
12381
12382  if test "x$FGREP" = x; then
12383    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
12384  fi
12385
12386
12387
12388
12389  # Publish this variable in the help.
12390
12391
12392  if test "x$SED" = x; then
12393    # The variable is not set by user, try to locate tool using the code snippet
12394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12395$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12396if ${ac_cv_path_SED+:} false; then :
12397  $as_echo_n "(cached) " >&6
12398else
12399            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12400     for ac_i in 1 2 3 4 5 6 7; do
12401       ac_script="$ac_script$as_nl$ac_script"
12402     done
12403     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12404     { ac_script=; unset ac_script;}
12405     if test -z "$SED"; then
12406  ac_path_SED_found=false
12407  # Loop through the user's path and test for each of PROGNAME-LIST
12408  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12409for as_dir in $PATH
12410do
12411  IFS=$as_save_IFS
12412  test -z "$as_dir" && as_dir=.
12413    for ac_prog in sed gsed; do
12414    for ac_exec_ext in '' $ac_executable_extensions; do
12415      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12416      as_fn_executable_p "$ac_path_SED" || continue
12417# Check for GNU ac_path_SED and select it if it is found.
12418  # Check for GNU $ac_path_SED
12419case `"$ac_path_SED" --version 2>&1` in
12420*GNU*)
12421  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12422*)
12423  ac_count=0
12424  $as_echo_n 0123456789 >"conftest.in"
12425  while :
12426  do
12427    cat "conftest.in" "conftest.in" >"conftest.tmp"
12428    mv "conftest.tmp" "conftest.in"
12429    cp "conftest.in" "conftest.nl"
12430    $as_echo '' >> "conftest.nl"
12431    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12432    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12433    as_fn_arith $ac_count + 1 && ac_count=$as_val
12434    if test $ac_count -gt ${ac_path_SED_max-0}; then
12435      # Best one so far, save it but keep looking for a better one
12436      ac_cv_path_SED="$ac_path_SED"
12437      ac_path_SED_max=$ac_count
12438    fi
12439    # 10*(2^10) chars as input seems more than enough
12440    test $ac_count -gt 10 && break
12441  done
12442  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12443esac
12444
12445      $ac_path_SED_found && break 3
12446    done
12447  done
12448  done
12449IFS=$as_save_IFS
12450  if test -z "$ac_cv_path_SED"; then
12451    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12452  fi
12453else
12454  ac_cv_path_SED=$SED
12455fi
12456
12457fi
12458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12459$as_echo "$ac_cv_path_SED" >&6; }
12460 SED="$ac_cv_path_SED"
12461  rm -f conftest.sed
12462
12463  else
12464    # The variable is set, but is it from the command line or the environment?
12465
12466    # Try to remove the string !SED! from our list.
12467    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
12468    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12469      # If it failed, the variable was not from the command line. Ignore it,
12470      # but warn the user (except for BASH, which is always set by the calling BASH).
12471      if test "xSED" != xBASH; then
12472        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
12473$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
12474      fi
12475      # Try to locate tool using the code snippet
12476      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12477$as_echo_n "checking for a sed that does not truncate output... " >&6; }
12478if ${ac_cv_path_SED+:} false; then :
12479  $as_echo_n "(cached) " >&6
12480else
12481            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12482     for ac_i in 1 2 3 4 5 6 7; do
12483       ac_script="$ac_script$as_nl$ac_script"
12484     done
12485     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12486     { ac_script=; unset ac_script;}
12487     if test -z "$SED"; then
12488  ac_path_SED_found=false
12489  # Loop through the user's path and test for each of PROGNAME-LIST
12490  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12491for as_dir in $PATH
12492do
12493  IFS=$as_save_IFS
12494  test -z "$as_dir" && as_dir=.
12495    for ac_prog in sed gsed; do
12496    for ac_exec_ext in '' $ac_executable_extensions; do
12497      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12498      as_fn_executable_p "$ac_path_SED" || continue
12499# Check for GNU ac_path_SED and select it if it is found.
12500  # Check for GNU $ac_path_SED
12501case `"$ac_path_SED" --version 2>&1` in
12502*GNU*)
12503  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12504*)
12505  ac_count=0
12506  $as_echo_n 0123456789 >"conftest.in"
12507  while :
12508  do
12509    cat "conftest.in" "conftest.in" >"conftest.tmp"
12510    mv "conftest.tmp" "conftest.in"
12511    cp "conftest.in" "conftest.nl"
12512    $as_echo '' >> "conftest.nl"
12513    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12514    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12515    as_fn_arith $ac_count + 1 && ac_count=$as_val
12516    if test $ac_count -gt ${ac_path_SED_max-0}; then
12517      # Best one so far, save it but keep looking for a better one
12518      ac_cv_path_SED="$ac_path_SED"
12519      ac_path_SED_max=$ac_count
12520    fi
12521    # 10*(2^10) chars as input seems more than enough
12522    test $ac_count -gt 10 && break
12523  done
12524  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12525esac
12526
12527      $ac_path_SED_found && break 3
12528    done
12529  done
12530  done
12531IFS=$as_save_IFS
12532  if test -z "$ac_cv_path_SED"; then
12533    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12534  fi
12535else
12536  ac_cv_path_SED=$SED
12537fi
12538
12539fi
12540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12541$as_echo "$ac_cv_path_SED" >&6; }
12542 SED="$ac_cv_path_SED"
12543  rm -f conftest.sed
12544
12545    else
12546      # If it succeeded, then it was overridden by the user. We will use it
12547      # for the tool.
12548
12549      # First remove it from the list of overridden variables, so we can test
12550      # for unknown variables in the end.
12551      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12552
12553      # Check if the provided tool contains a complete path.
12554      tool_specified="$SED"
12555      tool_basename="${tool_specified##*/}"
12556      if test "x$tool_basename" = "x$tool_specified"; then
12557        # A command without a complete path is provided, search $PATH.
12558        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
12559$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
12560        # Extract the first word of "$tool_basename", so it can be a program name with args.
12561set dummy $tool_basename; ac_word=$2
12562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12563$as_echo_n "checking for $ac_word... " >&6; }
12564if ${ac_cv_path_SED+:} false; then :
12565  $as_echo_n "(cached) " >&6
12566else
12567  case $SED in
12568  [\\/]* | ?:[\\/]*)
12569  ac_cv_path_SED="$SED" # Let the user override the test with a path.
12570  ;;
12571  *)
12572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12573for as_dir in $PATH
12574do
12575  IFS=$as_save_IFS
12576  test -z "$as_dir" && as_dir=.
12577    for ac_exec_ext in '' $ac_executable_extensions; do
12578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12579    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
12580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12581    break 2
12582  fi
12583done
12584  done
12585IFS=$as_save_IFS
12586
12587  ;;
12588esac
12589fi
12590SED=$ac_cv_path_SED
12591if test -n "$SED"; then
12592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
12593$as_echo "$SED" >&6; }
12594else
12595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12596$as_echo "no" >&6; }
12597fi
12598
12599
12600        if test "x$SED" = x; then
12601          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12602        fi
12603      else
12604        # Otherwise we believe it is a complete path. Use it as it is.
12605        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
12606$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
12607        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
12608$as_echo_n "checking for SED... " >&6; }
12609        if test ! -x "$tool_specified"; then
12610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12611$as_echo "not found" >&6; }
12612          as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
12613        fi
12614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12615$as_echo "$tool_specified" >&6; }
12616      fi
12617    fi
12618  fi
12619
12620
12621  if test "x$SED" = x; then
12622    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
12623  fi
12624
12625
12626
12627  # Always force rm.
12628  RM="$RM -f"
12629
12630  # pwd behaves differently on various platforms and some don't support the -L flag.
12631  # Always use the bash builtin pwd to get uniform behavior.
12632  THEPWDCMD=pwd
12633
12634  # These are not required on all platforms
12635
12636
12637  # Publish this variable in the help.
12638
12639
12640  if test "x$CYGPATH" = x; then
12641    # The variable is not set by user, try to locate tool using the code snippet
12642    for ac_prog in cygpath
12643do
12644  # Extract the first word of "$ac_prog", so it can be a program name with args.
12645set dummy $ac_prog; ac_word=$2
12646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12647$as_echo_n "checking for $ac_word... " >&6; }
12648if ${ac_cv_path_CYGPATH+:} false; then :
12649  $as_echo_n "(cached) " >&6
12650else
12651  case $CYGPATH in
12652  [\\/]* | ?:[\\/]*)
12653  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12654  ;;
12655  *)
12656  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12657for as_dir in $PATH
12658do
12659  IFS=$as_save_IFS
12660  test -z "$as_dir" && as_dir=.
12661    for ac_exec_ext in '' $ac_executable_extensions; do
12662  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12663    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12664    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12665    break 2
12666  fi
12667done
12668  done
12669IFS=$as_save_IFS
12670
12671  ;;
12672esac
12673fi
12674CYGPATH=$ac_cv_path_CYGPATH
12675if test -n "$CYGPATH"; then
12676  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12677$as_echo "$CYGPATH" >&6; }
12678else
12679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12680$as_echo "no" >&6; }
12681fi
12682
12683
12684  test -n "$CYGPATH" && break
12685done
12686
12687  else
12688    # The variable is set, but is it from the command line or the environment?
12689
12690    # Try to remove the string !CYGPATH! from our list.
12691    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
12692    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12693      # If it failed, the variable was not from the command line. Ignore it,
12694      # but warn the user (except for BASH, which is always set by the calling BASH).
12695      if test "xCYGPATH" != xBASH; then
12696        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
12697$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
12698      fi
12699      # Try to locate tool using the code snippet
12700      for ac_prog in cygpath
12701do
12702  # Extract the first word of "$ac_prog", so it can be a program name with args.
12703set dummy $ac_prog; ac_word=$2
12704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12705$as_echo_n "checking for $ac_word... " >&6; }
12706if ${ac_cv_path_CYGPATH+:} false; then :
12707  $as_echo_n "(cached) " >&6
12708else
12709  case $CYGPATH in
12710  [\\/]* | ?:[\\/]*)
12711  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12712  ;;
12713  *)
12714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12715for as_dir in $PATH
12716do
12717  IFS=$as_save_IFS
12718  test -z "$as_dir" && as_dir=.
12719    for ac_exec_ext in '' $ac_executable_extensions; do
12720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12721    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12723    break 2
12724  fi
12725done
12726  done
12727IFS=$as_save_IFS
12728
12729  ;;
12730esac
12731fi
12732CYGPATH=$ac_cv_path_CYGPATH
12733if test -n "$CYGPATH"; then
12734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12735$as_echo "$CYGPATH" >&6; }
12736else
12737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12738$as_echo "no" >&6; }
12739fi
12740
12741
12742  test -n "$CYGPATH" && break
12743done
12744
12745    else
12746      # If it succeeded, then it was overridden by the user. We will use it
12747      # for the tool.
12748
12749      # First remove it from the list of overridden variables, so we can test
12750      # for unknown variables in the end.
12751      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12752
12753      # Check if the provided tool contains a complete path.
12754      tool_specified="$CYGPATH"
12755      tool_basename="${tool_specified##*/}"
12756      if test "x$tool_basename" = "x$tool_specified"; then
12757        # A command without a complete path is provided, search $PATH.
12758        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
12759$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
12760        # Extract the first word of "$tool_basename", so it can be a program name with args.
12761set dummy $tool_basename; ac_word=$2
12762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12763$as_echo_n "checking for $ac_word... " >&6; }
12764if ${ac_cv_path_CYGPATH+:} false; then :
12765  $as_echo_n "(cached) " >&6
12766else
12767  case $CYGPATH in
12768  [\\/]* | ?:[\\/]*)
12769  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
12770  ;;
12771  *)
12772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12773for as_dir in $PATH
12774do
12775  IFS=$as_save_IFS
12776  test -z "$as_dir" && as_dir=.
12777    for ac_exec_ext in '' $ac_executable_extensions; do
12778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12779    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
12780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12781    break 2
12782  fi
12783done
12784  done
12785IFS=$as_save_IFS
12786
12787  ;;
12788esac
12789fi
12790CYGPATH=$ac_cv_path_CYGPATH
12791if test -n "$CYGPATH"; then
12792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
12793$as_echo "$CYGPATH" >&6; }
12794else
12795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12796$as_echo "no" >&6; }
12797fi
12798
12799
12800        if test "x$CYGPATH" = x; then
12801          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12802        fi
12803      else
12804        # Otherwise we believe it is a complete path. Use it as it is.
12805        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
12806$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
12807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
12808$as_echo_n "checking for CYGPATH... " >&6; }
12809        if test ! -x "$tool_specified"; then
12810          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12811$as_echo "not found" >&6; }
12812          as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
12813        fi
12814        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12815$as_echo "$tool_specified" >&6; }
12816      fi
12817    fi
12818  fi
12819
12820
12821
12822
12823  # Publish this variable in the help.
12824
12825
12826  if test "x$READLINK" = x; then
12827    # The variable is not set by user, try to locate tool using the code snippet
12828    for ac_prog in greadlink readlink
12829do
12830  # Extract the first word of "$ac_prog", so it can be a program name with args.
12831set dummy $ac_prog; ac_word=$2
12832{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12833$as_echo_n "checking for $ac_word... " >&6; }
12834if ${ac_cv_path_READLINK+:} false; then :
12835  $as_echo_n "(cached) " >&6
12836else
12837  case $READLINK in
12838  [\\/]* | ?:[\\/]*)
12839  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12840  ;;
12841  *)
12842  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12843for as_dir in $PATH
12844do
12845  IFS=$as_save_IFS
12846  test -z "$as_dir" && as_dir=.
12847    for ac_exec_ext in '' $ac_executable_extensions; do
12848  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12849    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12850    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12851    break 2
12852  fi
12853done
12854  done
12855IFS=$as_save_IFS
12856
12857  ;;
12858esac
12859fi
12860READLINK=$ac_cv_path_READLINK
12861if test -n "$READLINK"; then
12862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12863$as_echo "$READLINK" >&6; }
12864else
12865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12866$as_echo "no" >&6; }
12867fi
12868
12869
12870  test -n "$READLINK" && break
12871done
12872
12873  else
12874    # The variable is set, but is it from the command line or the environment?
12875
12876    # Try to remove the string !READLINK! from our list.
12877    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
12878    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12879      # If it failed, the variable was not from the command line. Ignore it,
12880      # but warn the user (except for BASH, which is always set by the calling BASH).
12881      if test "xREADLINK" != xBASH; then
12882        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
12883$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
12884      fi
12885      # Try to locate tool using the code snippet
12886      for ac_prog in greadlink readlink
12887do
12888  # Extract the first word of "$ac_prog", so it can be a program name with args.
12889set dummy $ac_prog; ac_word=$2
12890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12891$as_echo_n "checking for $ac_word... " >&6; }
12892if ${ac_cv_path_READLINK+:} false; then :
12893  $as_echo_n "(cached) " >&6
12894else
12895  case $READLINK in
12896  [\\/]* | ?:[\\/]*)
12897  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12898  ;;
12899  *)
12900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12901for as_dir in $PATH
12902do
12903  IFS=$as_save_IFS
12904  test -z "$as_dir" && as_dir=.
12905    for ac_exec_ext in '' $ac_executable_extensions; do
12906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12907    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12909    break 2
12910  fi
12911done
12912  done
12913IFS=$as_save_IFS
12914
12915  ;;
12916esac
12917fi
12918READLINK=$ac_cv_path_READLINK
12919if test -n "$READLINK"; then
12920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12921$as_echo "$READLINK" >&6; }
12922else
12923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12924$as_echo "no" >&6; }
12925fi
12926
12927
12928  test -n "$READLINK" && break
12929done
12930
12931    else
12932      # If it succeeded, then it was overridden by the user. We will use it
12933      # for the tool.
12934
12935      # First remove it from the list of overridden variables, so we can test
12936      # for unknown variables in the end.
12937      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12938
12939      # Check if the provided tool contains a complete path.
12940      tool_specified="$READLINK"
12941      tool_basename="${tool_specified##*/}"
12942      if test "x$tool_basename" = "x$tool_specified"; then
12943        # A command without a complete path is provided, search $PATH.
12944        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
12945$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
12946        # Extract the first word of "$tool_basename", so it can be a program name with args.
12947set dummy $tool_basename; ac_word=$2
12948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12949$as_echo_n "checking for $ac_word... " >&6; }
12950if ${ac_cv_path_READLINK+:} false; then :
12951  $as_echo_n "(cached) " >&6
12952else
12953  case $READLINK in
12954  [\\/]* | ?:[\\/]*)
12955  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
12956  ;;
12957  *)
12958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12959for as_dir in $PATH
12960do
12961  IFS=$as_save_IFS
12962  test -z "$as_dir" && as_dir=.
12963    for ac_exec_ext in '' $ac_executable_extensions; do
12964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12965    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
12966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12967    break 2
12968  fi
12969done
12970  done
12971IFS=$as_save_IFS
12972
12973  ;;
12974esac
12975fi
12976READLINK=$ac_cv_path_READLINK
12977if test -n "$READLINK"; then
12978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
12979$as_echo "$READLINK" >&6; }
12980else
12981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12982$as_echo "no" >&6; }
12983fi
12984
12985
12986        if test "x$READLINK" = x; then
12987          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12988        fi
12989      else
12990        # Otherwise we believe it is a complete path. Use it as it is.
12991        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
12992$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
12993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
12994$as_echo_n "checking for READLINK... " >&6; }
12995        if test ! -x "$tool_specified"; then
12996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12997$as_echo "not found" >&6; }
12998          as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
12999        fi
13000        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13001$as_echo "$tool_specified" >&6; }
13002      fi
13003    fi
13004  fi
13005
13006
13007
13008
13009  # Publish this variable in the help.
13010
13011
13012  if test "x$DF" = x; then
13013    # The variable is not set by user, try to locate tool using the code snippet
13014    for ac_prog in df
13015do
13016  # Extract the first word of "$ac_prog", so it can be a program name with args.
13017set dummy $ac_prog; ac_word=$2
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13019$as_echo_n "checking for $ac_word... " >&6; }
13020if ${ac_cv_path_DF+:} false; then :
13021  $as_echo_n "(cached) " >&6
13022else
13023  case $DF in
13024  [\\/]* | ?:[\\/]*)
13025  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13026  ;;
13027  *)
13028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13029for as_dir in $PATH
13030do
13031  IFS=$as_save_IFS
13032  test -z "$as_dir" && as_dir=.
13033    for ac_exec_ext in '' $ac_executable_extensions; do
13034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13035    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13037    break 2
13038  fi
13039done
13040  done
13041IFS=$as_save_IFS
13042
13043  ;;
13044esac
13045fi
13046DF=$ac_cv_path_DF
13047if test -n "$DF"; then
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13049$as_echo "$DF" >&6; }
13050else
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13052$as_echo "no" >&6; }
13053fi
13054
13055
13056  test -n "$DF" && break
13057done
13058
13059  else
13060    # The variable is set, but is it from the command line or the environment?
13061
13062    # Try to remove the string !DF! from our list.
13063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
13064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13065      # If it failed, the variable was not from the command line. Ignore it,
13066      # but warn the user (except for BASH, which is always set by the calling BASH).
13067      if test "xDF" != xBASH; then
13068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
13069$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
13070      fi
13071      # Try to locate tool using the code snippet
13072      for ac_prog in df
13073do
13074  # Extract the first word of "$ac_prog", so it can be a program name with args.
13075set dummy $ac_prog; ac_word=$2
13076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13077$as_echo_n "checking for $ac_word... " >&6; }
13078if ${ac_cv_path_DF+:} false; then :
13079  $as_echo_n "(cached) " >&6
13080else
13081  case $DF in
13082  [\\/]* | ?:[\\/]*)
13083  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13084  ;;
13085  *)
13086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13087for as_dir in $PATH
13088do
13089  IFS=$as_save_IFS
13090  test -z "$as_dir" && as_dir=.
13091    for ac_exec_ext in '' $ac_executable_extensions; do
13092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13093    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13095    break 2
13096  fi
13097done
13098  done
13099IFS=$as_save_IFS
13100
13101  ;;
13102esac
13103fi
13104DF=$ac_cv_path_DF
13105if test -n "$DF"; then
13106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13107$as_echo "$DF" >&6; }
13108else
13109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13110$as_echo "no" >&6; }
13111fi
13112
13113
13114  test -n "$DF" && break
13115done
13116
13117    else
13118      # If it succeeded, then it was overridden by the user. We will use it
13119      # for the tool.
13120
13121      # First remove it from the list of overridden variables, so we can test
13122      # for unknown variables in the end.
13123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13124
13125      # Check if the provided tool contains a complete path.
13126      tool_specified="$DF"
13127      tool_basename="${tool_specified##*/}"
13128      if test "x$tool_basename" = "x$tool_specified"; then
13129        # A command without a complete path is provided, search $PATH.
13130        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
13131$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
13132        # Extract the first word of "$tool_basename", so it can be a program name with args.
13133set dummy $tool_basename; ac_word=$2
13134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13135$as_echo_n "checking for $ac_word... " >&6; }
13136if ${ac_cv_path_DF+:} false; then :
13137  $as_echo_n "(cached) " >&6
13138else
13139  case $DF in
13140  [\\/]* | ?:[\\/]*)
13141  ac_cv_path_DF="$DF" # Let the user override the test with a path.
13142  ;;
13143  *)
13144  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13145for as_dir in $PATH
13146do
13147  IFS=$as_save_IFS
13148  test -z "$as_dir" && as_dir=.
13149    for ac_exec_ext in '' $ac_executable_extensions; do
13150  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13151    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
13152    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13153    break 2
13154  fi
13155done
13156  done
13157IFS=$as_save_IFS
13158
13159  ;;
13160esac
13161fi
13162DF=$ac_cv_path_DF
13163if test -n "$DF"; then
13164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
13165$as_echo "$DF" >&6; }
13166else
13167  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13168$as_echo "no" >&6; }
13169fi
13170
13171
13172        if test "x$DF" = x; then
13173          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13174        fi
13175      else
13176        # Otherwise we believe it is a complete path. Use it as it is.
13177        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
13178$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
13179        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
13180$as_echo_n "checking for DF... " >&6; }
13181        if test ! -x "$tool_specified"; then
13182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13183$as_echo "not found" >&6; }
13184          as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
13185        fi
13186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13187$as_echo "$tool_specified" >&6; }
13188      fi
13189    fi
13190  fi
13191
13192
13193
13194
13195  # Publish this variable in the help.
13196
13197
13198  if test "x$SETFILE" = x; then
13199    # The variable is not set by user, try to locate tool using the code snippet
13200    for ac_prog in SetFile
13201do
13202  # Extract the first word of "$ac_prog", so it can be a program name with args.
13203set dummy $ac_prog; ac_word=$2
13204{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13205$as_echo_n "checking for $ac_word... " >&6; }
13206if ${ac_cv_path_SETFILE+:} false; then :
13207  $as_echo_n "(cached) " >&6
13208else
13209  case $SETFILE in
13210  [\\/]* | ?:[\\/]*)
13211  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13212  ;;
13213  *)
13214  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13215for as_dir in $PATH
13216do
13217  IFS=$as_save_IFS
13218  test -z "$as_dir" && as_dir=.
13219    for ac_exec_ext in '' $ac_executable_extensions; do
13220  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13221    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13222    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13223    break 2
13224  fi
13225done
13226  done
13227IFS=$as_save_IFS
13228
13229  ;;
13230esac
13231fi
13232SETFILE=$ac_cv_path_SETFILE
13233if test -n "$SETFILE"; then
13234  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13235$as_echo "$SETFILE" >&6; }
13236else
13237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13238$as_echo "no" >&6; }
13239fi
13240
13241
13242  test -n "$SETFILE" && break
13243done
13244
13245  else
13246    # The variable is set, but is it from the command line or the environment?
13247
13248    # Try to remove the string !SETFILE! from our list.
13249    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
13250    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13251      # If it failed, the variable was not from the command line. Ignore it,
13252      # but warn the user (except for BASH, which is always set by the calling BASH).
13253      if test "xSETFILE" != xBASH; then
13254        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
13255$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
13256      fi
13257      # Try to locate tool using the code snippet
13258      for ac_prog in SetFile
13259do
13260  # Extract the first word of "$ac_prog", so it can be a program name with args.
13261set dummy $ac_prog; ac_word=$2
13262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13263$as_echo_n "checking for $ac_word... " >&6; }
13264if ${ac_cv_path_SETFILE+:} false; then :
13265  $as_echo_n "(cached) " >&6
13266else
13267  case $SETFILE in
13268  [\\/]* | ?:[\\/]*)
13269  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13270  ;;
13271  *)
13272  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13273for as_dir in $PATH
13274do
13275  IFS=$as_save_IFS
13276  test -z "$as_dir" && as_dir=.
13277    for ac_exec_ext in '' $ac_executable_extensions; do
13278  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13279    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13280    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13281    break 2
13282  fi
13283done
13284  done
13285IFS=$as_save_IFS
13286
13287  ;;
13288esac
13289fi
13290SETFILE=$ac_cv_path_SETFILE
13291if test -n "$SETFILE"; then
13292  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13293$as_echo "$SETFILE" >&6; }
13294else
13295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13296$as_echo "no" >&6; }
13297fi
13298
13299
13300  test -n "$SETFILE" && break
13301done
13302
13303    else
13304      # If it succeeded, then it was overridden by the user. We will use it
13305      # for the tool.
13306
13307      # First remove it from the list of overridden variables, so we can test
13308      # for unknown variables in the end.
13309      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13310
13311      # Check if the provided tool contains a complete path.
13312      tool_specified="$SETFILE"
13313      tool_basename="${tool_specified##*/}"
13314      if test "x$tool_basename" = "x$tool_specified"; then
13315        # A command without a complete path is provided, search $PATH.
13316        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
13317$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
13318        # Extract the first word of "$tool_basename", so it can be a program name with args.
13319set dummy $tool_basename; ac_word=$2
13320{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13321$as_echo_n "checking for $ac_word... " >&6; }
13322if ${ac_cv_path_SETFILE+:} false; then :
13323  $as_echo_n "(cached) " >&6
13324else
13325  case $SETFILE in
13326  [\\/]* | ?:[\\/]*)
13327  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
13328  ;;
13329  *)
13330  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13331for as_dir in $PATH
13332do
13333  IFS=$as_save_IFS
13334  test -z "$as_dir" && as_dir=.
13335    for ac_exec_ext in '' $ac_executable_extensions; do
13336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13337    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
13338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13339    break 2
13340  fi
13341done
13342  done
13343IFS=$as_save_IFS
13344
13345  ;;
13346esac
13347fi
13348SETFILE=$ac_cv_path_SETFILE
13349if test -n "$SETFILE"; then
13350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
13351$as_echo "$SETFILE" >&6; }
13352else
13353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13354$as_echo "no" >&6; }
13355fi
13356
13357
13358        if test "x$SETFILE" = x; then
13359          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13360        fi
13361      else
13362        # Otherwise we believe it is a complete path. Use it as it is.
13363        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
13364$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
13365        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
13366$as_echo_n "checking for SETFILE... " >&6; }
13367        if test ! -x "$tool_specified"; then
13368          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13369$as_echo "not found" >&6; }
13370          as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
13371        fi
13372        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13373$as_echo "$tool_specified" >&6; }
13374      fi
13375    fi
13376  fi
13377
13378
13379
13380
13381# Now we can determine OpenJDK build and target platforms. This is required to
13382# have early on.
13383# Make sure we can run config.sub.
13384$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
13385  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
13386
13387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
13388$as_echo_n "checking build system type... " >&6; }
13389if ${ac_cv_build+:} false; then :
13390  $as_echo_n "(cached) " >&6
13391else
13392  ac_build_alias=$build_alias
13393test "x$ac_build_alias" = x &&
13394  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
13395test "x$ac_build_alias" = x &&
13396  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
13397ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
13398  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
13399
13400fi
13401{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
13402$as_echo "$ac_cv_build" >&6; }
13403case $ac_cv_build in
13404*-*-*) ;;
13405*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
13406esac
13407build=$ac_cv_build
13408ac_save_IFS=$IFS; IFS='-'
13409set x $ac_cv_build
13410shift
13411build_cpu=$1
13412build_vendor=$2
13413shift; shift
13414# Remember, the first character of IFS is used to create $*,
13415# except with old shells:
13416build_os=$*
13417IFS=$ac_save_IFS
13418case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
13419
13420
13421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
13422$as_echo_n "checking host system type... " >&6; }
13423if ${ac_cv_host+:} false; then :
13424  $as_echo_n "(cached) " >&6
13425else
13426  if test "x$host_alias" = x; then
13427  ac_cv_host=$ac_cv_build
13428else
13429  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
13430    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
13431fi
13432
13433fi
13434{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
13435$as_echo "$ac_cv_host" >&6; }
13436case $ac_cv_host in
13437*-*-*) ;;
13438*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
13439esac
13440host=$ac_cv_host
13441ac_save_IFS=$IFS; IFS='-'
13442set x $ac_cv_host
13443shift
13444host_cpu=$1
13445host_vendor=$2
13446shift; shift
13447# Remember, the first character of IFS is used to create $*,
13448# except with old shells:
13449host_os=$*
13450IFS=$ac_save_IFS
13451case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
13452
13453
13454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
13455$as_echo_n "checking target system type... " >&6; }
13456if ${ac_cv_target+:} false; then :
13457  $as_echo_n "(cached) " >&6
13458else
13459  if test "x$target_alias" = x; then
13460  ac_cv_target=$ac_cv_host
13461else
13462  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
13463    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
13464fi
13465
13466fi
13467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
13468$as_echo "$ac_cv_target" >&6; }
13469case $ac_cv_target in
13470*-*-*) ;;
13471*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
13472esac
13473target=$ac_cv_target
13474ac_save_IFS=$IFS; IFS='-'
13475set x $ac_cv_target
13476shift
13477target_cpu=$1
13478target_vendor=$2
13479shift; shift
13480# Remember, the first character of IFS is used to create $*,
13481# except with old shells:
13482target_os=$*
13483IFS=$ac_save_IFS
13484case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
13485
13486
13487# The aliases save the names the user supplied, while $host etc.
13488# will get canonicalized.
13489test -n "$target_alias" &&
13490  test "$program_prefix$program_suffix$program_transform_name" = \
13491    NONENONEs,x,x, &&
13492  program_prefix=${target_alias}-
13493
13494  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
13495  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
13496  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
13497  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
13498  # to use the configure naming style.
13499
13500
13501
13502
13503
13504  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
13505  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
13506  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
13507  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
13508  OPENJDK_TARGET_AUTOCONF_NAME="$host"
13509  OPENJDK_BUILD_AUTOCONF_NAME="$build"
13510
13511
13512
13513  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13514
13515  case "$build_os" in
13516    *linux*)
13517      VAR_OS=linux
13518      VAR_OS_API=posix
13519      VAR_OS_ENV=linux
13520      ;;
13521    *solaris*)
13522      VAR_OS=solaris
13523      VAR_OS_API=posix
13524      VAR_OS_ENV=solaris
13525      ;;
13526    *darwin*)
13527      VAR_OS=macosx
13528      VAR_OS_API=posix
13529      VAR_OS_ENV=macosx
13530      ;;
13531    *bsd*)
13532      VAR_OS=bsd
13533      VAR_OS_API=posix
13534      VAR_OS_ENV=bsd
13535      ;;
13536    *cygwin*)
13537      VAR_OS=windows
13538      VAR_OS_API=winapi
13539      VAR_OS_ENV=windows.cygwin
13540      ;;
13541    *mingw*)
13542      VAR_OS=windows
13543      VAR_OS_API=winapi
13544      VAR_OS_ENV=windows.msys
13545      ;;
13546    *aix*)
13547      VAR_OS=aix
13548      VAR_OS_API=posix
13549      VAR_OS_ENV=aix
13550      ;;
13551    *)
13552      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
13553      ;;
13554  esac
13555
13556
13557  # First argument is the cpu name from the trip/quad
13558  case "$build_cpu" in
13559    x86_64)
13560      VAR_CPU=x86_64
13561      VAR_CPU_ARCH=x86
13562      VAR_CPU_BITS=64
13563      VAR_CPU_ENDIAN=little
13564      ;;
13565    i?86)
13566      VAR_CPU=x86
13567      VAR_CPU_ARCH=x86
13568      VAR_CPU_BITS=32
13569      VAR_CPU_ENDIAN=little
13570      ;;
13571    arm*)
13572      VAR_CPU=arm
13573      VAR_CPU_ARCH=arm
13574      VAR_CPU_BITS=32
13575      VAR_CPU_ENDIAN=little
13576      ;;
13577    powerpc)
13578      VAR_CPU=ppc
13579      VAR_CPU_ARCH=ppc
13580      VAR_CPU_BITS=32
13581      VAR_CPU_ENDIAN=big
13582      ;;
13583    powerpc64)
13584      VAR_CPU=ppc64
13585      VAR_CPU_ARCH=ppc
13586      VAR_CPU_BITS=64
13587      VAR_CPU_ENDIAN=big
13588      ;;
13589    powerpc64le)
13590      VAR_CPU=ppc64
13591      VAR_CPU_ARCH=ppc
13592      VAR_CPU_BITS=64
13593      VAR_CPU_ENDIAN=little
13594      ;;
13595    s390)
13596      VAR_CPU=s390
13597      VAR_CPU_ARCH=s390
13598      VAR_CPU_BITS=32
13599      VAR_CPU_ENDIAN=big
13600      ;;
13601    s390x)
13602      VAR_CPU=s390x
13603      VAR_CPU_ARCH=s390
13604      VAR_CPU_BITS=64
13605      VAR_CPU_ENDIAN=big
13606      ;;
13607    sparc)
13608      VAR_CPU=sparc
13609      VAR_CPU_ARCH=sparc
13610      VAR_CPU_BITS=32
13611      VAR_CPU_ENDIAN=big
13612      ;;
13613    sparcv9)
13614      VAR_CPU=sparcv9
13615      VAR_CPU_ARCH=sparc
13616      VAR_CPU_BITS=64
13617      VAR_CPU_ENDIAN=big
13618      ;;
13619    *)
13620      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
13621      ;;
13622  esac
13623
13624  # ..and setup our own variables. (Do this explicitely to facilitate searching)
13625  OPENJDK_BUILD_OS="$VAR_OS"
13626  OPENJDK_BUILD_OS_API="$VAR_OS_API"
13627  OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
13628  OPENJDK_BUILD_CPU="$VAR_CPU"
13629  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
13630  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
13631  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13632
13633
13634
13635
13636
13637
13638
13639  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
13640$as_echo_n "checking openjdk-build os-cpu... " >&6; }
13641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
13642$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
13643
13644  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
13645
13646  case "$host_os" in
13647    *linux*)
13648      VAR_OS=linux
13649      VAR_OS_API=posix
13650      VAR_OS_ENV=linux
13651      ;;
13652    *solaris*)
13653      VAR_OS=solaris
13654      VAR_OS_API=posix
13655      VAR_OS_ENV=solaris
13656      ;;
13657    *darwin*)
13658      VAR_OS=macosx
13659      VAR_OS_API=posix
13660      VAR_OS_ENV=macosx
13661      ;;
13662    *bsd*)
13663      VAR_OS=bsd
13664      VAR_OS_API=posix
13665      VAR_OS_ENV=bsd
13666      ;;
13667    *cygwin*)
13668      VAR_OS=windows
13669      VAR_OS_API=winapi
13670      VAR_OS_ENV=windows.cygwin
13671      ;;
13672    *mingw*)
13673      VAR_OS=windows
13674      VAR_OS_API=winapi
13675      VAR_OS_ENV=windows.msys
13676      ;;
13677    *aix*)
13678      VAR_OS=aix
13679      VAR_OS_API=posix
13680      VAR_OS_ENV=aix
13681      ;;
13682    *)
13683      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
13684      ;;
13685  esac
13686
13687
13688  # First argument is the cpu name from the trip/quad
13689  case "$host_cpu" in
13690    x86_64)
13691      VAR_CPU=x86_64
13692      VAR_CPU_ARCH=x86
13693      VAR_CPU_BITS=64
13694      VAR_CPU_ENDIAN=little
13695      ;;
13696    i?86)
13697      VAR_CPU=x86
13698      VAR_CPU_ARCH=x86
13699      VAR_CPU_BITS=32
13700      VAR_CPU_ENDIAN=little
13701      ;;
13702    arm*)
13703      VAR_CPU=arm
13704      VAR_CPU_ARCH=arm
13705      VAR_CPU_BITS=32
13706      VAR_CPU_ENDIAN=little
13707      ;;
13708    powerpc)
13709      VAR_CPU=ppc
13710      VAR_CPU_ARCH=ppc
13711      VAR_CPU_BITS=32
13712      VAR_CPU_ENDIAN=big
13713      ;;
13714    powerpc64)
13715      VAR_CPU=ppc64
13716      VAR_CPU_ARCH=ppc
13717      VAR_CPU_BITS=64
13718      VAR_CPU_ENDIAN=big
13719      ;;
13720    powerpc64le)
13721      VAR_CPU=ppc64
13722      VAR_CPU_ARCH=ppc
13723      VAR_CPU_BITS=64
13724      VAR_CPU_ENDIAN=little
13725      ;;
13726    s390)
13727      VAR_CPU=s390
13728      VAR_CPU_ARCH=s390
13729      VAR_CPU_BITS=32
13730      VAR_CPU_ENDIAN=big
13731      ;;
13732    s390x)
13733      VAR_CPU=s390x
13734      VAR_CPU_ARCH=s390
13735      VAR_CPU_BITS=64
13736      VAR_CPU_ENDIAN=big
13737      ;;
13738    sparc)
13739      VAR_CPU=sparc
13740      VAR_CPU_ARCH=sparc
13741      VAR_CPU_BITS=32
13742      VAR_CPU_ENDIAN=big
13743      ;;
13744    sparcv9)
13745      VAR_CPU=sparcv9
13746      VAR_CPU_ARCH=sparc
13747      VAR_CPU_BITS=64
13748      VAR_CPU_ENDIAN=big
13749      ;;
13750    *)
13751      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
13752      ;;
13753  esac
13754
13755  # ... and setup our own variables. (Do this explicitely to facilitate searching)
13756  OPENJDK_TARGET_OS="$VAR_OS"
13757  OPENJDK_TARGET_OS_API="$VAR_OS_API"
13758  OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
13759  OPENJDK_TARGET_CPU="$VAR_CPU"
13760  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
13761  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
13762  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
13763
13764
13765
13766
13767
13768
13769
13770  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
13771$as_echo_n "checking openjdk-target os-cpu... " >&6; }
13772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
13773$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
13774
13775
13776
13777# Check whether --with-target-bits was given.
13778if test "${with_target_bits+set}" = set; then :
13779  withval=$with_target_bits;
13780fi
13781
13782
13783  # We have three types of compiles:
13784  # native  == normal compilation, target system == build system
13785  # cross   == traditional cross compilation, target system != build system; special toolchain needed
13786  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
13787  #
13788  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
13789    # We're doing a proper cross-compilation
13790    COMPILE_TYPE="cross"
13791  else
13792    COMPILE_TYPE="native"
13793  fi
13794
13795  if test "x$with_target_bits" != x; then
13796    if test "x$COMPILE_TYPE" = "xcross"; then
13797      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
13798    fi
13799
13800    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13801      # A reduced build is requested
13802      COMPILE_TYPE="reduced"
13803      OPENJDK_TARGET_CPU_BITS=32
13804      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
13805        OPENJDK_TARGET_CPU=x86
13806      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
13807        OPENJDK_TARGET_CPU=sparc
13808      else
13809        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
13810      fi
13811    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
13812      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
13813    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
13814      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
13815$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
13816    else
13817      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
13818    fi
13819  fi
13820
13821
13822  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
13823$as_echo_n "checking compilation type... " >&6; }
13824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
13825$as_echo "$COMPILE_TYPE" >&6; }
13826
13827
13828  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
13829    REQUIRED_OS_NAME=SunOS
13830    REQUIRED_OS_VERSION=5.10
13831  fi
13832  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
13833    REQUIRED_OS_NAME=Linux
13834    REQUIRED_OS_VERSION=2.6
13835  fi
13836  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13837    REQUIRED_OS_NAME=Windows
13838    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
13839      REQUIRED_OS_VERSION=5.2
13840    else
13841      REQUIRED_OS_VERSION=5.1
13842    fi
13843  fi
13844  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
13845    REQUIRED_OS_NAME=Darwin
13846    REQUIRED_OS_VERSION=11.2
13847  fi
13848
13849
13850
13851
13852
13853  # Also store the legacy naming of the cpu.
13854  # Ie i586 and amd64 instead of x86 and x86_64
13855  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
13856  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13857    OPENJDK_TARGET_CPU_LEGACY="i586"
13858  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13859    # On all platforms except MacOSX replace x86_64 with amd64.
13860    OPENJDK_TARGET_CPU_LEGACY="amd64"
13861  fi
13862
13863
13864  # And the second legacy naming of the cpu.
13865  # Ie i386 and amd64 instead of x86 and x86_64.
13866  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
13867  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13868    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
13869  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13870    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
13871  fi
13872
13873
13874  # This is the name of the cpu (but using i386 and amd64 instead of
13875  # x86 and x86_64, respectively), preceeded by a /, to be used when
13876  # locating libraries. On macosx, it's empty, though.
13877  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
13878  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13879    OPENJDK_TARGET_CPU_LIBDIR=""
13880  fi
13881
13882
13883  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
13884  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
13885  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
13886  OPENJDK_TARGET_CPU_ISADIR=""
13887  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13888    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13889      OPENJDK_TARGET_CPU_ISADIR="/amd64"
13890    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
13891      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
13892    fi
13893  fi
13894
13895
13896  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
13897  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
13898  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
13899    # On linux only, we replace x86 with i386.
13900    OPENJDK_TARGET_CPU_OSARCH="i386"
13901  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13902    # On all platforms except macosx, we replace x86_64 with amd64.
13903    OPENJDK_TARGET_CPU_OSARCH="amd64"
13904  fi
13905
13906
13907  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
13908  if test "x$OPENJDK_TARGET_CPU" = xx86; then
13909    OPENJDK_TARGET_CPU_JLI="i386"
13910  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
13911    # On all platforms except macosx, we replace x86_64 with amd64.
13912    OPENJDK_TARGET_CPU_JLI="amd64"
13913  fi
13914  # Now setup the -D flags for building libjli.
13915  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
13916  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
13917    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
13918      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
13919    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
13920      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
13921    fi
13922  fi
13923
13924
13925  # Setup OPENJDK_TARGET_OS_API_DIR, used in source paths.
13926  if test "x$OPENJDK_TARGET_OS_API" = xposix; then
13927    OPENJDK_TARGET_OS_API_DIR="solaris"
13928  fi
13929  if test "x$OPENJDK_TARGET_OS_API" = xwinapi; then
13930    OPENJDK_TARGET_OS_API_DIR="windows"
13931  fi
13932
13933
13934  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
13935      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
13936  else
13937      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_API_DIR}
13938  fi
13939
13940
13941  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
13942    A_LP64="LP64:="
13943    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
13944    # unpack200.exe
13945    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
13946      ADD_LP64="-D_LP64=1"
13947    fi
13948  fi
13949  LP64=$A_LP64
13950
13951
13952  if test "x$COMPILE_TYPE" = "xcross"; then
13953    # FIXME: ... or should this include reduced builds..?
13954    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
13955  else
13956    DEFINE_CROSS_COMPILE_ARCH=""
13957  fi
13958
13959
13960  # ZERO_ARCHDEF is used to enable architecture-specific code
13961  case "${OPENJDK_TARGET_CPU}" in
13962    ppc*)    ZERO_ARCHDEF=PPC   ;;
13963    s390*)   ZERO_ARCHDEF=S390  ;;
13964    sparc*)  ZERO_ARCHDEF=SPARC ;;
13965    x86_64*) ZERO_ARCHDEF=AMD64 ;;
13966    x86)     ZERO_ARCHDEF=IA32  ;;
13967    *)      ZERO_ARCHDEF=$(echo "${OPENJDK_TARGET_CPU_LEGACY_LIB}" | tr a-z A-Z)
13968  esac
13969
13970
13971
13972
13973# Continue setting up basic stuff. Most remaining code require fundamental tools.
13974
13975  # Save the current directory this script was started from
13976  CURDIR="$PWD"
13977
13978  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
13979    PATH_SEP=";"
13980
13981  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
13982  if test $SRC_ROOT_LENGTH -gt 100; then
13983    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
13984  fi
13985
13986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
13987    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
13988$as_echo_n "checking cygwin release... " >&6; }
13989    CYGWIN_VERSION=`$UNAME -r`
13990    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
13991$as_echo "$CYGWIN_VERSION" >&6; }
13992    WINDOWS_ENV_VENDOR='cygwin'
13993    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
13994
13995    CYGWIN_VERSION_OK=`$ECHO $CYGWIN_VERSION | $GREP ^1.7.`
13996    if test "x$CYGWIN_VERSION_OK" = x; then
13997      { $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
13998$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;}
13999      as_fn_error $? "Cannot continue" "$LINENO" 5
14000    fi
14001    if test "x$CYGPATH" = x; then
14002      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
14003    fi
14004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
14005$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
14006    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14007    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
14008    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
14009    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
14010    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
14011$as_echo "$CYGWIN_ROOT_PATH" >&6; }
14012    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
14013    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
14014    if test "x$test_cygdrive_prefix" = x; then
14015      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
14016    fi
14017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14018    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
14019$as_echo_n "checking msys release... " >&6; }
14020    MSYS_VERSION=`$UNAME -r`
14021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
14022$as_echo "$MSYS_VERSION" >&6; }
14023
14024    WINDOWS_ENV_VENDOR='msys'
14025    WINDOWS_ENV_VERSION="$MSYS_VERSION"
14026
14027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
14028$as_echo_n "checking msys root directory as unix-style path... " >&6; }
14029    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
14030    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
14031
14032  windows_path="$MSYS_ROOT_PATH"
14033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14034    unix_path=`$CYGPATH -u "$windows_path"`
14035    MSYS_ROOT_PATH="$unix_path"
14036  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14037    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14038    MSYS_ROOT_PATH="$unix_path"
14039  fi
14040
14041    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
14042$as_echo "$MSYS_ROOT_PATH" >&6; }
14043    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
14044  else
14045    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
14046  fi
14047
14048  # Test if windows or unix (cygwin/msys) find is first in path.
14049  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
14050$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
14051  FIND_BINARY_OUTPUT=`find --version 2>&1`
14052  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
14053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
14054$as_echo "unix style" >&6; }
14055  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
14056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
14057$as_echo "Windows" >&6; }
14058    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
14059$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
14060    { $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
14061$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
14062    as_fn_error $? "Cannot continue" "$LINENO" 5
14063  else
14064    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
14065$as_echo "unknown" >&6; }
14066    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
14067$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
14068  fi
14069
14070  else
14071    PATH_SEP=":"
14072  fi
14073
14074
14075  # We get the top-level directory from the supporting wrappers.
14076  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
14077$as_echo_n "checking for top-level directory... " >&6; }
14078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
14079$as_echo "$TOPDIR" >&6; }
14080
14081
14082  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
14083
14084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14085
14086  # Input might be given as Windows format, start by converting to
14087  # unix format.
14088  path="$CURDIR"
14089  new_path=`$CYGPATH -u "$path"`
14090
14091  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14092  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14093  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14094  # "foo.exe" is OK but "foo" is an error.
14095  #
14096  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14097  # It is also a way to make sure we got the proper file name for the real test later on.
14098  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14099  if test "x$test_shortpath" = x; then
14100    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14101$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14102    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
14103  fi
14104
14105  # Call helper function which possibly converts this using DOS-style short mode.
14106  # If so, the updated path is stored in $new_path.
14107
14108  input_path="$new_path"
14109  # Check if we need to convert this using DOS-style short mode. If the path
14110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14111  # take no chances and rewrite it.
14112  # Note: m4 eats our [], so we need to use [ and ] instead.
14113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14114  if test "x$has_forbidden_chars" != x; then
14115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14116    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14117    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14118    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14119      # Going to short mode and back again did indeed matter. Since short mode is
14120      # case insensitive, let's make it lowercase to improve readability.
14121      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14122      # Now convert it back to Unix-stile (cygpath)
14123      input_path=`$CYGPATH -u "$shortmode_path"`
14124      new_path="$input_path"
14125    fi
14126  fi
14127
14128  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14129  if test "x$test_cygdrive_prefix" = x; then
14130    # As a simple fix, exclude /usr/bin since it's not a real path.
14131    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14132      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14133      # a path prefixed by /cygdrive for fixpath to work.
14134      new_path="$CYGWIN_ROOT_PATH$input_path"
14135    fi
14136  fi
14137
14138
14139  if test "x$path" != "x$new_path"; then
14140    CURDIR="$new_path"
14141    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14142$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14143  fi
14144
14145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14146
14147  path="$CURDIR"
14148  has_colon=`$ECHO $path | $GREP ^.:`
14149  new_path="$path"
14150  if test "x$has_colon" = x; then
14151    # Not in mixed or Windows style, start by that.
14152    new_path=`cmd //c echo $path`
14153  fi
14154
14155
14156  input_path="$new_path"
14157  # Check if we need to convert this using DOS-style short mode. If the path
14158  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14159  # take no chances and rewrite it.
14160  # Note: m4 eats our [], so we need to use [ and ] instead.
14161  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14162  if test "x$has_forbidden_chars" != x; then
14163    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14164    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14165  fi
14166
14167
14168  windows_path="$new_path"
14169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14170    unix_path=`$CYGPATH -u "$windows_path"`
14171    new_path="$unix_path"
14172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14174    new_path="$unix_path"
14175  fi
14176
14177  if test "x$path" != "x$new_path"; then
14178    CURDIR="$new_path"
14179    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
14180$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
14181  fi
14182
14183  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14184  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14185
14186  else
14187    # We're on a posix platform. Hooray! :)
14188    path="$CURDIR"
14189    has_space=`$ECHO "$path" | $GREP " "`
14190    if test "x$has_space" != x; then
14191      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
14192$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
14193      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14194    fi
14195
14196    # Use eval to expand a potential ~
14197    eval path="$path"
14198    if test ! -f "$path" && test ! -d "$path"; then
14199      as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14200    fi
14201
14202    CURDIR="`cd "$path"; $THEPWDCMD -L`"
14203  fi
14204
14205
14206  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14207
14208  # Input might be given as Windows format, start by converting to
14209  # unix format.
14210  path="$TOPDIR"
14211  new_path=`$CYGPATH -u "$path"`
14212
14213  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14214  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14215  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14216  # "foo.exe" is OK but "foo" is an error.
14217  #
14218  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14219  # It is also a way to make sure we got the proper file name for the real test later on.
14220  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14221  if test "x$test_shortpath" = x; then
14222    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14223$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14224    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
14225  fi
14226
14227  # Call helper function which possibly converts this using DOS-style short mode.
14228  # If so, the updated path is stored in $new_path.
14229
14230  input_path="$new_path"
14231  # Check if we need to convert this using DOS-style short mode. If the path
14232  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14233  # take no chances and rewrite it.
14234  # Note: m4 eats our [], so we need to use [ and ] instead.
14235  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14236  if test "x$has_forbidden_chars" != x; then
14237    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14238    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14239    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14240    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14241      # Going to short mode and back again did indeed matter. Since short mode is
14242      # case insensitive, let's make it lowercase to improve readability.
14243      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14244      # Now convert it back to Unix-stile (cygpath)
14245      input_path=`$CYGPATH -u "$shortmode_path"`
14246      new_path="$input_path"
14247    fi
14248  fi
14249
14250  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14251  if test "x$test_cygdrive_prefix" = x; then
14252    # As a simple fix, exclude /usr/bin since it's not a real path.
14253    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14254      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14255      # a path prefixed by /cygdrive for fixpath to work.
14256      new_path="$CYGWIN_ROOT_PATH$input_path"
14257    fi
14258  fi
14259
14260
14261  if test "x$path" != "x$new_path"; then
14262    TOPDIR="$new_path"
14263    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14264$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14265  fi
14266
14267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14268
14269  path="$TOPDIR"
14270  has_colon=`$ECHO $path | $GREP ^.:`
14271  new_path="$path"
14272  if test "x$has_colon" = x; then
14273    # Not in mixed or Windows style, start by that.
14274    new_path=`cmd //c echo $path`
14275  fi
14276
14277
14278  input_path="$new_path"
14279  # Check if we need to convert this using DOS-style short mode. If the path
14280  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14281  # take no chances and rewrite it.
14282  # Note: m4 eats our [], so we need to use [ and ] instead.
14283  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14284  if test "x$has_forbidden_chars" != x; then
14285    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14286    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14287  fi
14288
14289
14290  windows_path="$new_path"
14291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14292    unix_path=`$CYGPATH -u "$windows_path"`
14293    new_path="$unix_path"
14294  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14295    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14296    new_path="$unix_path"
14297  fi
14298
14299  if test "x$path" != "x$new_path"; then
14300    TOPDIR="$new_path"
14301    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
14302$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
14303  fi
14304
14305  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14306  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14307
14308  else
14309    # We're on a posix platform. Hooray! :)
14310    path="$TOPDIR"
14311    has_space=`$ECHO "$path" | $GREP " "`
14312    if test "x$has_space" != x; then
14313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
14314$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
14315      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14316    fi
14317
14318    # Use eval to expand a potential ~
14319    eval path="$path"
14320    if test ! -f "$path" && test ! -d "$path"; then
14321      as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
14322    fi
14323
14324    TOPDIR="`cd "$path"; $THEPWDCMD -L`"
14325  fi
14326
14327  # SRC_ROOT is a traditional alias for TOPDIR.
14328  SRC_ROOT=$TOPDIR
14329
14330  # Locate the directory of this script.
14331  AUTOCONF_DIR=$TOPDIR/common/autoconf
14332
14333
14334  # Setup default logging of stdout and stderr to build.log in the output root.
14335  BUILD_LOG='$(OUTPUT_ROOT)/build.log'
14336  BUILD_LOG_PREVIOUS='$(OUTPUT_ROOT)/build.log.old'
14337  BUILD_LOG_WRAPPER='$(BASH) $(SRC_ROOT)/common/bin/logger.sh $(BUILD_LOG)'
14338
14339
14340
14341
14342
14343# Check if it's a pure open build or if custom sources are to be used.
14344
14345  # Check whether --enable-openjdk-only was given.
14346if test "${enable_openjdk_only+set}" = set; then :
14347  enableval=$enable_openjdk_only;
14348else
14349  enable_openjdk_only="no"
14350fi
14351
14352
14353  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
14354$as_echo_n "checking for presence of closed sources... " >&6; }
14355  if test -d "$SRC_ROOT/jdk/src/closed"; then
14356    CLOSED_SOURCE_PRESENT=yes
14357  else
14358    CLOSED_SOURCE_PRESENT=no
14359  fi
14360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
14361$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
14362
14363  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
14364$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
14365  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
14366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
14367$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
14368
14369  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
14370    OPENJDK=true
14371    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14372      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
14373$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
14374    fi
14375  else
14376    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
14377      OPENJDK=true
14378    else
14379      OPENJDK=false
14380    fi
14381  fi
14382
14383  if test "x$OPENJDK" = "xtrue"; then
14384    SET_OPENJDK="OPENJDK=true"
14385  fi
14386
14387
14388
14389  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
14390  # the IncludeCustomExtension macro.
14391
14392
14393# Check whether --with-custom-make-dir was given.
14394if test "${with_custom_make_dir+set}" = set; then :
14395  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
14396$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
14397fi
14398
14399
14400
14401
14402# These are needed to be able to create a configuration name (and thus the output directory)
14403
14404  ###############################################################################
14405  #
14406  # Check which variant of the JDK that we want to build.
14407  # Currently we have:
14408  #    normal:   standard edition
14409  # but the custom make system may add other variants
14410  #
14411  # Effectively the JDK variant gives a name to a specific set of
14412  # modules to compile into the JDK. In the future, these modules
14413  # might even be Jigsaw modules.
14414  #
14415  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
14416$as_echo_n "checking which variant of the JDK to build... " >&6; }
14417
14418# Check whether --with-jdk-variant was given.
14419if test "${with_jdk_variant+set}" = set; then :
14420  withval=$with_jdk_variant;
14421fi
14422
14423
14424  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
14425    JDK_VARIANT="normal"
14426  else
14427    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
14428  fi
14429
14430
14431
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
14433$as_echo "$JDK_VARIANT" >&6; }
14434
14435
14436###############################################################################
14437#
14438# Check which interpreter of the JVM we want to build.
14439# Currently we have:
14440#    template: Template interpreter (the default)
14441#    cpp     : C++ interpreter
14442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which interpreter of the JVM to build" >&5
14443$as_echo_n "checking which interpreter of the JVM to build... " >&6; }
14444
14445# Check whether --with-jvm-interpreter was given.
14446if test "${with_jvm_interpreter+set}" = set; then :
14447  withval=$with_jvm_interpreter;
14448fi
14449
14450
14451if test "x$with_jvm_interpreter" = x; then
14452     with_jvm_interpreter="template"
14453fi
14454
14455JVM_INTERPRETER="$with_jvm_interpreter"
14456
14457if test "x$JVM_INTERPRETER" != xtemplate && test "x$JVM_INTERPRETER" != xcpp; then
14458   as_fn_error $? "The available JVM interpreters are: template, cpp" "$LINENO" 5
14459fi
14460
14461
14462
14463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_interpreter" >&5
14464$as_echo "$with_jvm_interpreter" >&6; }
14465
14466
14467
14468  ###############################################################################
14469  #
14470  # Check which variants of the JVM that we want to build.
14471  # Currently we have:
14472  #    server: normal interpreter and a tiered C1/C2 compiler
14473  #    client: normal interpreter and C1 (no C2 compiler) (only 32-bit platforms)
14474  #    minimal1: reduced form of client with optional VM services and features stripped out
14475  #    kernel: kernel footprint JVM that passes the TCK without major performance problems,
14476  #             ie normal interpreter and C1, only the serial GC, kernel jvmti etc
14477  #    zero: no machine code interpreter, no compiler
14478  #    zeroshark: zero interpreter and shark/llvm compiler backend
14479#    core: interpreter only, no compiler (only works on some platforms)
14480  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
14481$as_echo_n "checking which variants of the JVM to build... " >&6; }
14482
14483# Check whether --with-jvm-variants was given.
14484if test "${with_jvm_variants+set}" = set; then :
14485  withval=$with_jvm_variants;
14486fi
14487
14488
14489  if test "x$with_jvm_variants" = x; then
14490    with_jvm_variants="server"
14491  fi
14492
14493  JVM_VARIANTS=",$with_jvm_variants,"
14494  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,//'`
14495
14496  if test "x$TEST_VARIANTS" != "x,"; then
14497     as_fn_error $? "The available JVM variants are: server, client, minimal1, kernel, zero, zeroshark, core" "$LINENO" 5
14498  fi
14499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_jvm_variants" >&5
14500$as_echo "$with_jvm_variants" >&6; }
14501
14502  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
14503  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
14504  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS" | $SED -e '/,minimal1,/!s/.*/false/g' -e '/,minimal1,/s/.*/true/g'`
14505  JVM_VARIANT_KERNEL=`$ECHO "$JVM_VARIANTS" | $SED -e '/,kernel,/!s/.*/false/g' -e '/,kernel,/s/.*/true/g'`
14506  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
14507  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
14508  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
14509
14510  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14511    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14512      as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
14513    fi
14514  fi
14515  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14516    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14517      as_fn_error $? "You cannot build a kernel JVM for a 64-bit machine." "$LINENO" 5
14518    fi
14519  fi
14520  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14521    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
14522      as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
14523    fi
14524  fi
14525
14526  # Replace the commas with AND for use in the build directory name.
14527  ANDED_JVM_VARIANTS=`$ECHO "$JVM_VARIANTS" | $SED -e 's/^,//' -e 's/,$//' -e 's/,/AND/g'`
14528  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/'`
14529  if test "x$COUNT_VARIANTS" != "x,1"; then
14530    BUILDING_MULTIPLE_JVM_VARIANTS=yes
14531  else
14532    BUILDING_MULTIPLE_JVM_VARIANTS=no
14533  fi
14534
14535
14536
14537
14538
14539
14540
14541
14542
14543
14544  INCLUDE_SA=true
14545  if test "x$JVM_VARIANT_ZERO" = xtrue ; then
14546    INCLUDE_SA=false
14547  fi
14548  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue ; then
14549    INCLUDE_SA=false
14550  fi
14551  if test "x$VAR_CPU" = xppc64 ; then
14552    INCLUDE_SA=false
14553  fi
14554
14555
14556  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
14557    MACOSX_UNIVERSAL="true"
14558  fi
14559
14560
14561
14562
14563  ###############################################################################
14564  #
14565  # Set the debug level
14566  #    release: no debug information, all optimizations, no asserts.
14567  #    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
14568  #    fastdebug: debug information (-g), all optimizations, all asserts
14569  #    slowdebug: debug information (-g), no optimizations, all asserts
14570  #
14571  DEBUG_LEVEL="release"
14572  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
14573$as_echo_n "checking which debug level to use... " >&6; }
14574  # Check whether --enable-debug was given.
14575if test "${enable_debug+set}" = set; then :
14576  enableval=$enable_debug;
14577        ENABLE_DEBUG="${enableval}"
14578        DEBUG_LEVEL="fastdebug"
14579
14580else
14581  ENABLE_DEBUG="no"
14582fi
14583
14584
14585
14586# Check whether --with-debug-level was given.
14587if test "${with_debug_level+set}" = set; then :
14588  withval=$with_debug_level;
14589        DEBUG_LEVEL="${withval}"
14590        if test "x$ENABLE_DEBUG" = xyes; then
14591          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
14592        fi
14593
14594fi
14595
14596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
14597$as_echo "$DEBUG_LEVEL" >&6; }
14598
14599  if test "x$DEBUG_LEVEL" != xrelease && \
14600      test "x$DEBUG_LEVEL" != xoptimized && \
14601      test "x$DEBUG_LEVEL" != xfastdebug && \
14602      test "x$DEBUG_LEVEL" != xslowdebug; then
14603    as_fn_error $? "Allowed debug levels are: release, fastdebug and slowdebug" "$LINENO" 5
14604  fi
14605
14606
14607  ###############################################################################
14608  #
14609  # Setup legacy vars/targets and new vars to deal with different debug levels.
14610  #
14611
14612  case $DEBUG_LEVEL in
14613    release )
14614      VARIANT="OPT"
14615      FASTDEBUG="false"
14616      DEBUG_CLASSFILES="false"
14617      BUILD_VARIANT_RELEASE=""
14618      HOTSPOT_DEBUG_LEVEL="product"
14619      HOTSPOT_EXPORT="product"
14620      ;;
14621    fastdebug )
14622      VARIANT="DBG"
14623      FASTDEBUG="true"
14624      DEBUG_CLASSFILES="true"
14625      BUILD_VARIANT_RELEASE="-fastdebug"
14626      HOTSPOT_DEBUG_LEVEL="fastdebug"
14627      HOTSPOT_EXPORT="fastdebug"
14628      ;;
14629    slowdebug )
14630      VARIANT="DBG"
14631      FASTDEBUG="false"
14632      DEBUG_CLASSFILES="true"
14633      BUILD_VARIANT_RELEASE="-debug"
14634      HOTSPOT_DEBUG_LEVEL="jvmg"
14635      HOTSPOT_EXPORT="debug"
14636      ;;
14637    optimized )
14638      VARIANT="OPT"
14639      FASTDEBUG="false"
14640      DEBUG_CLASSFILES="false"
14641      BUILD_VARIANT_RELEASE="-optimized"
14642      HOTSPOT_DEBUG_LEVEL="optimized"
14643      HOTSPOT_EXPORT="optimized"
14644      ;;
14645  esac
14646
14647  # The debug level 'optimized' is a little special because it is currently only
14648  # applicable to the HotSpot build where it means to build a completely
14649  # optimized version of the VM without any debugging code (like for the
14650  # 'release' debug level which is called 'product' in the HotSpot build) but
14651  # with the exception that it can contain additional code which is otherwise
14652  # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
14653  # test new and/or experimental features which are not intended for customer
14654  # shipment. Because these new features need to be tested and benchmarked in
14655  # real world scenarios, we want to build the containing JDK at the 'release'
14656  # debug level.
14657  if test "x$DEBUG_LEVEL" = xoptimized; then
14658    DEBUG_LEVEL="release"
14659  fi
14660
14661  #####
14662  # Generate the legacy makefile targets for hotspot.
14663  # The hotspot api for selecting the build artifacts, really, needs to be improved.
14664  # JDK-7195896 will fix this on the hotspot side by using the JVM_VARIANT_* variables to
14665  # determine what needs to be built. All we will need to set here is all_product, all_fastdebug etc
14666  # But until then ...
14667  HOTSPOT_TARGET=""
14668
14669  if test "x$JVM_VARIANT_SERVER" = xtrue; then
14670    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
14671  fi
14672
14673  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
14674    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
14675  fi
14676
14677  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
14678    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
14679  fi
14680
14681  if test "x$JVM_VARIANT_KERNEL" = xtrue; then
14682    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}kernel "
14683  fi
14684
14685  if test "x$JVM_VARIANT_ZERO" = xtrue; then
14686    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
14687  fi
14688
14689  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
14690    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
14691  fi
14692
14693  if test "x$JVM_VARIANT_CORE" = xtrue; then
14694    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
14695  fi
14696
14697  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_EXPORT"
14698
14699  # On Macosx universal binaries are produced, but they only contain
14700  # 64 bit intel. This invalidates control of which jvms are built
14701  # from configure, but only server is valid anyway. Fix this
14702  # when hotspot makefiles are rewritten.
14703  if test "x$MACOSX_UNIVERSAL" = xtrue; then
14704    HOTSPOT_TARGET=universal_${HOTSPOT_EXPORT}
14705  fi
14706
14707  #####
14708
14709
14710
14711
14712
14713
14714
14715
14716# With basic setup done, call the custom early hook.
14717
14718
14719# Check if we have devkits, extra paths or sysroot set.
14720
14721
14722# Check whether --with-devkit was given.
14723if test "${with_devkit+set}" = set; then :
14724  withval=$with_devkit;
14725
14726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14727
14728  # Input might be given as Windows format, start by converting to
14729  # unix format.
14730  path="$with_devkit"
14731  new_path=`$CYGPATH -u "$path"`
14732
14733  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
14734  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
14735  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
14736  # "foo.exe" is OK but "foo" is an error.
14737  #
14738  # This test is therefore slightly more accurate than "test -f" to check for file precense.
14739  # It is also a way to make sure we got the proper file name for the real test later on.
14740  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
14741  if test "x$test_shortpath" = x; then
14742    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14743$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14744    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
14745  fi
14746
14747  # Call helper function which possibly converts this using DOS-style short mode.
14748  # If so, the updated path is stored in $new_path.
14749
14750  input_path="$new_path"
14751  # Check if we need to convert this using DOS-style short mode. If the path
14752  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14753  # take no chances and rewrite it.
14754  # Note: m4 eats our [], so we need to use [ and ] instead.
14755  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
14756  if test "x$has_forbidden_chars" != x; then
14757    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14758    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
14759    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
14760    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
14761      # Going to short mode and back again did indeed matter. Since short mode is
14762      # case insensitive, let's make it lowercase to improve readability.
14763      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14764      # Now convert it back to Unix-stile (cygpath)
14765      input_path=`$CYGPATH -u "$shortmode_path"`
14766      new_path="$input_path"
14767    fi
14768  fi
14769
14770  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
14771  if test "x$test_cygdrive_prefix" = x; then
14772    # As a simple fix, exclude /usr/bin since it's not a real path.
14773    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
14774      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
14775      # a path prefixed by /cygdrive for fixpath to work.
14776      new_path="$CYGWIN_ROOT_PATH$input_path"
14777    fi
14778  fi
14779
14780
14781  if test "x$path" != "x$new_path"; then
14782    with_devkit="$new_path"
14783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14784$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14785  fi
14786
14787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14788
14789  path="$with_devkit"
14790  has_colon=`$ECHO $path | $GREP ^.:`
14791  new_path="$path"
14792  if test "x$has_colon" = x; then
14793    # Not in mixed or Windows style, start by that.
14794    new_path=`cmd //c echo $path`
14795  fi
14796
14797
14798  input_path="$new_path"
14799  # Check if we need to convert this using DOS-style short mode. If the path
14800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
14801  # take no chances and rewrite it.
14802  # Note: m4 eats our [], so we need to use [ and ] instead.
14803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
14804  if test "x$has_forbidden_chars" != x; then
14805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
14806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
14807  fi
14808
14809
14810  windows_path="$new_path"
14811  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
14812    unix_path=`$CYGPATH -u "$windows_path"`
14813    new_path="$unix_path"
14814  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
14815    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
14816    new_path="$unix_path"
14817  fi
14818
14819  if test "x$path" != "x$new_path"; then
14820    with_devkit="$new_path"
14821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
14822$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
14823  fi
14824
14825  # Save the first 10 bytes of this path to the storage, so fixpath can work.
14826  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
14827
14828  else
14829    # We're on a posix platform. Hooray! :)
14830    path="$with_devkit"
14831    has_space=`$ECHO "$path" | $GREP " "`
14832    if test "x$has_space" != x; then
14833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
14834$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
14835      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
14836    fi
14837
14838    # Use eval to expand a potential ~
14839    eval path="$path"
14840    if test ! -f "$path" && test ! -d "$path"; then
14841      as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
14842    fi
14843
14844    with_devkit="`cd "$path"; $THEPWDCMD -L`"
14845  fi
14846
14847        DEVKIT_ROOT="$with_devkit"
14848        # Check for a meta data info file in the root of the devkit
14849        if test -f "$DEVKIT_ROOT/devkit.info"; then
14850          # This potentially sets the following:
14851          # DEVKIT_NAME: A descriptive name of the devkit
14852          # DEVKIT_TOOLCHAIN_PATH: Corresponds to --with-toolchain-path
14853          # DEVKIT_EXTRA_PATH: Corresponds to --with-extra-path
14854          # DEVKIT_SYSROOT: Corresponds to --with-sysroot
14855          . $DEVKIT_ROOT/devkit.info
14856        fi
14857
14858        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
14859$as_echo_n "checking for devkit... " >&6; }
14860        if test "x$DEVKIT_NAME" != x; then
14861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
14862$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
14863        else
14864          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
14865$as_echo "$DEVKIT_ROOT" >&6; }
14866        fi
14867
14868        if test "x$DEVKIT_EXTRA_PATH" != x; then
14869
14870  if test "x$DEVKIT_EXTRA_PATH" != x; then
14871    if test "x$EXTRA_PATH" = x; then
14872      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
14873    else
14874      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
14875    fi
14876  fi
14877
14878        fi
14879
14880        # Fallback default of just /bin if DEVKIT_PATH is not defined
14881        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
14882          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
14883        fi
14884
14885  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
14886    if test "x$TOOLCHAIN_PATH" = x; then
14887      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
14888    else
14889      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
14890    fi
14891  fi
14892
14893
14894        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
14895        # places for backwards compatiblity.
14896        if test "x$DEVKIT_SYSROOT" != x; then
14897          SYSROOT="$DEVKIT_SYSROOT"
14898        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
14899          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
14900        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
14901          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
14902        fi
14903
14904
14905fi
14906
14907
14908  # You can force the sysroot if the sysroot encoded into the compiler tools
14909  # is not correct.
14910
14911# Check whether --with-sys-root was given.
14912if test "${with_sys_root+set}" = set; then :
14913  withval=$with_sys_root; SYSROOT=$with_sys_root
14914
14915fi
14916
14917
14918
14919# Check whether --with-sysroot was given.
14920if test "${with_sysroot+set}" = set; then :
14921  withval=$with_sysroot; SYSROOT=$with_sysroot
14922
14923fi
14924
14925
14926
14927# Check whether --with-tools-dir was given.
14928if test "${with_tools_dir+set}" = set; then :
14929  withval=$with_tools_dir;
14930  if test "x$with_tools_dir" != x; then
14931    if test "x$TOOLCHAIN_PATH" = x; then
14932      TOOLCHAIN_PATH="$with_tools_dir"
14933    else
14934      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
14935    fi
14936  fi
14937
14938
14939fi
14940
14941
14942
14943# Check whether --with-toolchain-path was given.
14944if test "${with_toolchain_path+set}" = set; then :
14945  withval=$with_toolchain_path;
14946  if test "x$with_toolchain_path" != x; then
14947    if test "x$TOOLCHAIN_PATH" = x; then
14948      TOOLCHAIN_PATH="$with_toolchain_path"
14949    else
14950      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
14951    fi
14952  fi
14953
14954
14955fi
14956
14957
14958
14959# Check whether --with-extra-path was given.
14960if test "${with_extra_path+set}" = set; then :
14961  withval=$with_extra_path;
14962  if test "x$with_extra_path" != x; then
14963    if test "x$EXTRA_PATH" = x; then
14964      EXTRA_PATH="$with_extra_path"
14965    else
14966      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
14967    fi
14968  fi
14969
14970
14971fi
14972
14973
14974  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
14975    # detect if Xcode is installed by running xcodebuild -version
14976    # if no Xcode installed, xcodebuild exits with 1
14977    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
14978    if /usr/bin/xcodebuild -version >/dev/null 2>&1; then
14979      # We need to use xcodebuild in the toolchain dir provided by the user, this will
14980      # fall back on the stub binary in /usr/bin/xcodebuild
14981      # Extract the first word of "xcodebuild", so it can be a program name with args.
14982set dummy xcodebuild; ac_word=$2
14983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14984$as_echo_n "checking for $ac_word... " >&6; }
14985if ${ac_cv_path_XCODEBUILD+:} false; then :
14986  $as_echo_n "(cached) " >&6
14987else
14988  case $XCODEBUILD in
14989  [\\/]* | ?:[\\/]*)
14990  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
14991  ;;
14992  *)
14993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14994for as_dir in $TOOLCHAIN_PATH
14995do
14996  IFS=$as_save_IFS
14997  test -z "$as_dir" && as_dir=.
14998    for ac_exec_ext in '' $ac_executable_extensions; do
14999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15000    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
15001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15002    break 2
15003  fi
15004done
15005  done
15006IFS=$as_save_IFS
15007
15008  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
15009  ;;
15010esac
15011fi
15012XCODEBUILD=$ac_cv_path_XCODEBUILD
15013if test -n "$XCODEBUILD"; then
15014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
15015$as_echo "$XCODEBUILD" >&6; }
15016else
15017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15018$as_echo "no" >&6; }
15019fi
15020
15021
15022    else
15023      # this should result in SYSROOT being empty, unless --with-sysroot is provided
15024      # when only the command line tools are installed there are no SDKs, so headers
15025      # are copied into the system frameworks
15026      XCODEBUILD=
15027
15028    fi
15029
15030    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
15031$as_echo_n "checking for sdk name... " >&6; }
15032
15033# Check whether --with-sdk-name was given.
15034if test "${with_sdk_name+set}" = set; then :
15035  withval=$with_sdk_name; SDKNAME=$with_sdk_name
15036
15037fi
15038
15039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
15040$as_echo "$SDKNAME" >&6; }
15041
15042    # if toolchain path is specified then don't rely on system headers, they may not compile
15043    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
15044    test -z "$TOOLCHAIN_PATH" && \
15045      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
15046
15047    if test -z "$SYSROOT"; then
15048      if test -n "$XCODEBUILD"; then
15049        # if we don't have system headers, use default SDK name (last resort)
15050        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15051          SDKNAME=${SDKNAME:-macosx}
15052        fi
15053
15054        if test -n "$SDKNAME"; then
15055          # Call xcodebuild to determine SYSROOT
15056          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
15057        fi
15058      else
15059        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
15060          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
15061        fi
15062      fi
15063    else
15064      # warn user if --with-sdk-name was also set
15065      if test -n "$with_sdk_name"; then
15066        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
15067$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
15068      fi
15069    fi
15070
15071    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
15072      # If no system framework headers, then SYSROOT must be set, or we won't build
15073      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
15074    fi
15075
15076    # Perform a basic sanity test
15077    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
15078      if test -z "$SYSROOT"; then
15079        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
15080      else
15081        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
15082      fi
15083    fi
15084
15085    # set SDKROOT too, Xcode tools will pick it up
15086    SDKROOT=$SYSROOT
15087
15088  fi
15089
15090  # Prepend the extra path to the global path
15091
15092  if test "x$EXTRA_PATH" != x; then
15093    if test "x$PATH" = x; then
15094      PATH="$EXTRA_PATH"
15095    else
15096      PATH="$EXTRA_PATH:$PATH"
15097    fi
15098  fi
15099
15100
15101  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
15102    # Add extra search paths on solaris for utilities like ar and as etc...
15103    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin"
15104  fi
15105
15106  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
15107$as_echo_n "checking for sysroot... " >&6; }
15108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
15109$as_echo "$SYSROOT" >&6; }
15110  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
15111$as_echo_n "checking for toolchain path... " >&6; }
15112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
15113$as_echo "$TOOLCHAIN_PATH" >&6; }
15114  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
15115$as_echo_n "checking for extra path... " >&6; }
15116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
15117$as_echo "$EXTRA_PATH" >&6; }
15118
15119
15120# To properly create a configuration name, we need to have the OpenJDK target
15121# and options (variants and debug level) parsed.
15122
15123
15124
15125# Check whether --with-conf-name was given.
15126if test "${with_conf_name+set}" = set; then :
15127  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
15128fi
15129
15130
15131  # Test from where we are running configure, in or outside of src root.
15132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
15133$as_echo_n "checking where to store configuration... " >&6; }
15134  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
15135      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
15136      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
15137    # We are running configure from the src root.
15138    # Create a default ./build/target-variant-debuglevel output root.
15139    if test "x${CONF_NAME}" = x; then
15140      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
15141$as_echo "in default location" >&6; }
15142      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${ANDED_JVM_VARIANTS}-${DEBUG_LEVEL}"
15143    else
15144      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
15145$as_echo "in build directory with custom name" >&6; }
15146    fi
15147    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
15148    $MKDIR -p "$OUTPUT_ROOT"
15149    if test ! -d "$OUTPUT_ROOT"; then
15150      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
15151    fi
15152  else
15153    # We are running configure from outside of the src dir.
15154    # Then use the current directory as output dir!
15155    # If configuration is situated in normal build directory, just use the build
15156    # directory name as configuration name, otherwise use the complete path.
15157    if test "x${CONF_NAME}" = x; then
15158      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
15159    fi
15160    OUTPUT_ROOT="$CURDIR"
15161    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
15162$as_echo "in current directory" >&6; }
15163
15164    # WARNING: This might be a bad thing to do. You need to be sure you want to
15165    # have a configuration in this directory. Do some sanity checks!
15166
15167    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
15168      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
15169      # other files
15170      files_present=`$LS $OUTPUT_ROOT`
15171      # Configure has already touched config.log and confdefs.h in the current dir when this check
15172      # is performed.
15173      filtered_files=`$ECHO "$files_present" | $SED -e 's/config.log//g' -e 's/confdefs.h//g' -e 's/ //g' \
15174      | $TR -d '\n'`
15175      if test "x$filtered_files" != x; then
15176        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
15177$as_echo "$as_me: Current directory is $CURDIR." >&6;}
15178        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
15179$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
15180        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
15181$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
15182        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
15183$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
15184        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
15185$as_echo "$as_me: seriously mess up just about everything." >&6;}
15186        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
15187$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
15189$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
15190        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
15191      fi
15192    fi
15193  fi
15194  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
15195$as_echo_n "checking what configuration name to use... " >&6; }
15196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
15197$as_echo "$CONF_NAME" >&6; }
15198
15199
15200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15201
15202  # Input might be given as Windows format, start by converting to
15203  # unix format.
15204  path="$OUTPUT_ROOT"
15205  new_path=`$CYGPATH -u "$path"`
15206
15207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15210  # "foo.exe" is OK but "foo" is an error.
15211  #
15212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15213  # It is also a way to make sure we got the proper file name for the real test later on.
15214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15215  if test "x$test_shortpath" = x; then
15216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15217$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15218    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
15219  fi
15220
15221  # Call helper function which possibly converts this using DOS-style short mode.
15222  # If so, the updated path is stored in $new_path.
15223
15224  input_path="$new_path"
15225  # Check if we need to convert this using DOS-style short mode. If the path
15226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15227  # take no chances and rewrite it.
15228  # Note: m4 eats our [], so we need to use [ and ] instead.
15229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15230  if test "x$has_forbidden_chars" != x; then
15231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15235      # Going to short mode and back again did indeed matter. Since short mode is
15236      # case insensitive, let's make it lowercase to improve readability.
15237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15238      # Now convert it back to Unix-stile (cygpath)
15239      input_path=`$CYGPATH -u "$shortmode_path"`
15240      new_path="$input_path"
15241    fi
15242  fi
15243
15244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15245  if test "x$test_cygdrive_prefix" = x; then
15246    # As a simple fix, exclude /usr/bin since it's not a real path.
15247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15249      # a path prefixed by /cygdrive for fixpath to work.
15250      new_path="$CYGWIN_ROOT_PATH$input_path"
15251    fi
15252  fi
15253
15254
15255  if test "x$path" != "x$new_path"; then
15256    OUTPUT_ROOT="$new_path"
15257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15258$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15259  fi
15260
15261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15262
15263  path="$OUTPUT_ROOT"
15264  has_colon=`$ECHO $path | $GREP ^.:`
15265  new_path="$path"
15266  if test "x$has_colon" = x; then
15267    # Not in mixed or Windows style, start by that.
15268    new_path=`cmd //c echo $path`
15269  fi
15270
15271
15272  input_path="$new_path"
15273  # Check if we need to convert this using DOS-style short mode. If the path
15274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15275  # take no chances and rewrite it.
15276  # Note: m4 eats our [], so we need to use [ and ] instead.
15277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15278  if test "x$has_forbidden_chars" != x; then
15279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15281  fi
15282
15283
15284  windows_path="$new_path"
15285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15286    unix_path=`$CYGPATH -u "$windows_path"`
15287    new_path="$unix_path"
15288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15290    new_path="$unix_path"
15291  fi
15292
15293  if test "x$path" != "x$new_path"; then
15294    OUTPUT_ROOT="$new_path"
15295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
15296$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
15297  fi
15298
15299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15301
15302  else
15303    # We're on a posix platform. Hooray! :)
15304    path="$OUTPUT_ROOT"
15305    has_space=`$ECHO "$path" | $GREP " "`
15306    if test "x$has_space" != x; then
15307      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
15308$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
15309      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15310    fi
15311
15312    # Use eval to expand a potential ~
15313    eval path="$path"
15314    if test ! -f "$path" && test ! -d "$path"; then
15315      as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
15316    fi
15317
15318    OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
15319  fi
15320
15321
15322  SPEC=$OUTPUT_ROOT/spec.gmk
15323
15324  CONF_NAME=$CONF_NAME
15325
15326  OUTPUT_ROOT=$OUTPUT_ROOT
15327
15328
15329  # Most of the probed defines are put into config.h
15330  ac_config_headers="$ac_config_headers $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in"
15331
15332  # The spec.gmk file contains all variables for the make system.
15333  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
15334
15335  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
15336  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
15337
15338  # The bootcycle-spec.gmk file contains support for boot cycle builds.
15339  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
15340
15341  # The compare.sh is used to compare the build output to other builds.
15342  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
15343
15344  # Spec.sh is currently used by compare-objects.sh
15345  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in"
15346
15347  # The generated Makefile knows where the spec.gmk is and where the source is.
15348  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
15349  # which will look for generated configurations
15350  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
15351
15352
15353
15354# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
15355
15356  for ac_prog in apt-get yum port pkgutil pkgadd
15357do
15358  # Extract the first word of "$ac_prog", so it can be a program name with args.
15359set dummy $ac_prog; ac_word=$2
15360{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15361$as_echo_n "checking for $ac_word... " >&6; }
15362if ${ac_cv_prog_PKGHANDLER+:} false; then :
15363  $as_echo_n "(cached) " >&6
15364else
15365  if test -n "$PKGHANDLER"; then
15366  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
15367else
15368as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15369for as_dir in $PATH
15370do
15371  IFS=$as_save_IFS
15372  test -z "$as_dir" && as_dir=.
15373    for ac_exec_ext in '' $ac_executable_extensions; do
15374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15375    ac_cv_prog_PKGHANDLER="$ac_prog"
15376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15377    break 2
15378  fi
15379done
15380  done
15381IFS=$as_save_IFS
15382
15383fi
15384fi
15385PKGHANDLER=$ac_cv_prog_PKGHANDLER
15386if test -n "$PKGHANDLER"; then
15387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
15388$as_echo "$PKGHANDLER" >&6; }
15389else
15390  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15391$as_echo "no" >&6; }
15392fi
15393
15394
15395  test -n "$PKGHANDLER" && break
15396done
15397
15398
15399
15400# Setup tools that requires more complex handling, or that is not needed by the configure script.
15401
15402
15403  # We need to find a recent version of GNU make. Especially on Solaris, this can be tricky.
15404  if test "x$MAKE" != x; then
15405    # User has supplied a make, test it.
15406    if test ! -f "$MAKE"; then
15407      as_fn_error $? "The specified make (by MAKE=$MAKE) is not found." "$LINENO" 5
15408    fi
15409
15410  MAKE_CANDIDATE=""$MAKE""
15411  DESCRIPTION="user supplied MAKE=$MAKE"
15412  if test "x$MAKE_CANDIDATE" != x; then
15413    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15414$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15415    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15416    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15417    if test "x$IS_GNU_MAKE" = x; then
15418      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15419$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15420    else
15421      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15422      if test "x$IS_MODERN_MAKE" = x; then
15423        { $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
15424$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;}
15425      else
15426        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15427          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15428            MAKE_EXPECTED_ENV='cygwin'
15429          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15430            MAKE_EXPECTED_ENV='msys'
15431          else
15432            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15433          fi
15434          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15435          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15436        else
15437          # Not relevant for non-Windows
15438          IS_MAKE_CORRECT_ENV=true
15439        fi
15440        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15441          { $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
15442$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;}
15443        else
15444          FOUND_MAKE=$MAKE_CANDIDATE
15445
15446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15447
15448  # First separate the path from the arguments. This will split at the first
15449  # space.
15450  complete="$FOUND_MAKE"
15451  path="${complete%% *}"
15452  tmp="$complete EOL"
15453  arguments="${tmp#* }"
15454
15455  # Input might be given as Windows format, start by converting to
15456  # unix format.
15457  new_path=`$CYGPATH -u "$path"`
15458
15459  # Now try to locate executable using which
15460  new_path=`$WHICH "$new_path" 2> /dev/null`
15461  # bat and cmd files are not always considered executable in cygwin causing which
15462  # to not find them
15463  if test "x$new_path" = x \
15464      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15465      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15466    new_path=`$CYGPATH -u "$path"`
15467  fi
15468  if test "x$new_path" = x; then
15469    # Oops. Which didn't find the executable.
15470    # The splitting of arguments from the executable at a space might have been incorrect,
15471    # since paths with space are more likely in Windows. Give it another try with the whole
15472    # argument.
15473    path="$complete"
15474    arguments="EOL"
15475    new_path=`$CYGPATH -u "$path"`
15476    new_path=`$WHICH "$new_path" 2> /dev/null`
15477    # bat and cmd files are not always considered executable in cygwin causing which
15478    # to not find them
15479    if test "x$new_path" = x \
15480        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15481        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15482      new_path=`$CYGPATH -u "$path"`
15483    fi
15484    if test "x$new_path" = x; then
15485      # It's still not found. Now this is an unrecoverable error.
15486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15487$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15488      has_space=`$ECHO "$complete" | $GREP " "`
15489      if test "x$has_space" != x; then
15490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15492      fi
15493      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15494    fi
15495  fi
15496
15497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15500  # "foo.exe" is OK but "foo" is an error.
15501  #
15502  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15503  # It is also a way to make sure we got the proper file name for the real test later on.
15504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15505  if test "x$test_shortpath" = x; then
15506    # Short path failed, file does not exist as specified.
15507    # Try adding .exe or .cmd
15508    if test -f "${new_path}.exe"; then
15509      input_to_shortpath="${new_path}.exe"
15510    elif test -f "${new_path}.cmd"; then
15511      input_to_shortpath="${new_path}.cmd"
15512    else
15513      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15514$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15515      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15516$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15517      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15518    fi
15519  else
15520    input_to_shortpath="$new_path"
15521  fi
15522
15523  # Call helper function which possibly converts this using DOS-style short mode.
15524  # If so, the updated path is stored in $new_path.
15525  new_path="$input_to_shortpath"
15526
15527  input_path="$input_to_shortpath"
15528  # Check if we need to convert this using DOS-style short mode. If the path
15529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15530  # take no chances and rewrite it.
15531  # Note: m4 eats our [], so we need to use [ and ] instead.
15532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15533  if test "x$has_forbidden_chars" != x; then
15534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15538      # Going to short mode and back again did indeed matter. Since short mode is
15539      # case insensitive, let's make it lowercase to improve readability.
15540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15541      # Now convert it back to Unix-stile (cygpath)
15542      input_path=`$CYGPATH -u "$shortmode_path"`
15543      new_path="$input_path"
15544    fi
15545  fi
15546
15547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15548  if test "x$test_cygdrive_prefix" = x; then
15549    # As a simple fix, exclude /usr/bin since it's not a real path.
15550    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15552      # a path prefixed by /cygdrive for fixpath to work.
15553      new_path="$CYGWIN_ROOT_PATH$input_path"
15554    fi
15555  fi
15556
15557  # remove trailing .exe if any
15558  new_path="${new_path/%.exe/}"
15559
15560  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15561
15562  # First separate the path from the arguments. This will split at the first
15563  # space.
15564  complete="$FOUND_MAKE"
15565  path="${complete%% *}"
15566  tmp="$complete EOL"
15567  arguments="${tmp#* }"
15568
15569  # Input might be given as Windows format, start by converting to
15570  # unix format.
15571  new_path="$path"
15572
15573  windows_path="$new_path"
15574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15575    unix_path=`$CYGPATH -u "$windows_path"`
15576    new_path="$unix_path"
15577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15578    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15579    new_path="$unix_path"
15580  fi
15581
15582
15583  # Now try to locate executable using which
15584  new_path=`$WHICH "$new_path" 2> /dev/null`
15585
15586  if test "x$new_path" = x; then
15587    # Oops. Which didn't find the executable.
15588    # The splitting of arguments from the executable at a space might have been incorrect,
15589    # since paths with space are more likely in Windows. Give it another try with the whole
15590    # argument.
15591    path="$complete"
15592    arguments="EOL"
15593    new_path="$path"
15594
15595  windows_path="$new_path"
15596  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15597    unix_path=`$CYGPATH -u "$windows_path"`
15598    new_path="$unix_path"
15599  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15600    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15601    new_path="$unix_path"
15602  fi
15603
15604
15605    new_path=`$WHICH "$new_path" 2> /dev/null`
15606
15607    if test "x$new_path" = x; then
15608      # It's still not found. Now this is an unrecoverable error.
15609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15610$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15611      has_space=`$ECHO "$complete" | $GREP " "`
15612      if test "x$has_space" != x; then
15613        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15614$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15615      fi
15616      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15617    fi
15618  fi
15619
15620  # Now new_path has a complete unix path to the binary
15621  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15622    # Keep paths in /bin as-is, but remove trailing .exe if any
15623    new_path="${new_path/%.exe/}"
15624    # Do not save /bin paths to all_fixpath_prefixes!
15625  else
15626    # Not in mixed or Windows style, start by that.
15627    new_path=`cmd //c echo $new_path`
15628
15629  input_path="$new_path"
15630  # Check if we need to convert this using DOS-style short mode. If the path
15631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15632  # take no chances and rewrite it.
15633  # Note: m4 eats our [], so we need to use [ and ] instead.
15634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15635  if test "x$has_forbidden_chars" != x; then
15636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15637    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15638  fi
15639
15640    # Output is in $new_path
15641
15642  windows_path="$new_path"
15643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15644    unix_path=`$CYGPATH -u "$windows_path"`
15645    new_path="$unix_path"
15646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15648    new_path="$unix_path"
15649  fi
15650
15651    # remove trailing .exe if any
15652    new_path="${new_path/%.exe/}"
15653
15654    # Save the first 10 bytes of this path to the storage, so fixpath can work.
15655    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15656  fi
15657
15658  else
15659    # We're on a posix platform. Hooray! :)
15660    # First separate the path from the arguments. This will split at the first
15661    # space.
15662    complete="$FOUND_MAKE"
15663    path="${complete%% *}"
15664    tmp="$complete EOL"
15665    arguments="${tmp#* }"
15666
15667    # Cannot rely on the command "which" here since it doesn't always work.
15668    is_absolute_path=`$ECHO "$path" | $GREP ^/`
15669    if test -z "$is_absolute_path"; then
15670      # Path to executable is not absolute. Find it.
15671      IFS_save="$IFS"
15672      IFS=:
15673      for p in $PATH; do
15674        if test -f "$p/$path" && test -x "$p/$path"; then
15675          new_path="$p/$path"
15676          break
15677        fi
15678      done
15679      IFS="$IFS_save"
15680    else
15681      # This is an absolute path, we can use it without further modifications.
15682      new_path="$path"
15683    fi
15684
15685    if test "x$new_path" = x; then
15686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15688      has_space=`$ECHO "$complete" | $GREP " "`
15689      if test "x$has_space" != x; then
15690        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
15691$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
15692      fi
15693      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15694    fi
15695  fi
15696
15697  # Now join together the path and the arguments once again
15698  if test "x$arguments" != xEOL; then
15699    new_complete="$new_path ${arguments% *}"
15700  else
15701    new_complete="$new_path"
15702  fi
15703
15704  if test "x$complete" != "x$new_complete"; then
15705    FOUND_MAKE="$new_complete"
15706    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
15707$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
15708  fi
15709
15710        fi
15711      fi
15712    fi
15713  fi
15714
15715    if test "x$FOUND_MAKE" = x; then
15716      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make 3.81 or newer." "$LINENO" 5
15717    fi
15718  else
15719    # Try our hardest to locate a correct version of GNU make
15720    for ac_prog in gmake
15721do
15722  # Extract the first word of "$ac_prog", so it can be a program name with args.
15723set dummy $ac_prog; ac_word=$2
15724{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15725$as_echo_n "checking for $ac_word... " >&6; }
15726if ${ac_cv_path_CHECK_GMAKE+:} false; then :
15727  $as_echo_n "(cached) " >&6
15728else
15729  case $CHECK_GMAKE in
15730  [\\/]* | ?:[\\/]*)
15731  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
15732  ;;
15733  *)
15734  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15735for as_dir in $PATH
15736do
15737  IFS=$as_save_IFS
15738  test -z "$as_dir" && as_dir=.
15739    for ac_exec_ext in '' $ac_executable_extensions; do
15740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15741    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
15742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15743    break 2
15744  fi
15745done
15746  done
15747IFS=$as_save_IFS
15748
15749  ;;
15750esac
15751fi
15752CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
15753if test -n "$CHECK_GMAKE"; then
15754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
15755$as_echo "$CHECK_GMAKE" >&6; }
15756else
15757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15758$as_echo "no" >&6; }
15759fi
15760
15761
15762  test -n "$CHECK_GMAKE" && break
15763done
15764
15765
15766  MAKE_CANDIDATE=""$CHECK_GMAKE""
15767  DESCRIPTION="gmake in PATH"
15768  if test "x$MAKE_CANDIDATE" != x; then
15769    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
15770$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
15771    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
15772    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
15773    if test "x$IS_GNU_MAKE" = x; then
15774      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
15775$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
15776    else
15777      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
15778      if test "x$IS_MODERN_MAKE" = x; then
15779        { $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
15780$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;}
15781      else
15782        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
15783          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15784            MAKE_EXPECTED_ENV='cygwin'
15785          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15786            MAKE_EXPECTED_ENV='msys'
15787          else
15788            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
15789          fi
15790          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
15791          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
15792        else
15793          # Not relevant for non-Windows
15794          IS_MAKE_CORRECT_ENV=true
15795        fi
15796        if test "x$IS_MAKE_CORRECT_ENV" = x; then
15797          { $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
15798$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;}
15799        else
15800          FOUND_MAKE=$MAKE_CANDIDATE
15801
15802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15803
15804  # First separate the path from the arguments. This will split at the first
15805  # space.
15806  complete="$FOUND_MAKE"
15807  path="${complete%% *}"
15808  tmp="$complete EOL"
15809  arguments="${tmp#* }"
15810
15811  # Input might be given as Windows format, start by converting to
15812  # unix format.
15813  new_path=`$CYGPATH -u "$path"`
15814
15815  # Now try to locate executable using which
15816  new_path=`$WHICH "$new_path" 2> /dev/null`
15817  # bat and cmd files are not always considered executable in cygwin causing which
15818  # to not find them
15819  if test "x$new_path" = x \
15820      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15821      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15822    new_path=`$CYGPATH -u "$path"`
15823  fi
15824  if test "x$new_path" = x; then
15825    # Oops. Which didn't find the executable.
15826    # The splitting of arguments from the executable at a space might have been incorrect,
15827    # since paths with space are more likely in Windows. Give it another try with the whole
15828    # argument.
15829    path="$complete"
15830    arguments="EOL"
15831    new_path=`$CYGPATH -u "$path"`
15832    new_path=`$WHICH "$new_path" 2> /dev/null`
15833    # bat and cmd files are not always considered executable in cygwin causing which
15834    # to not find them
15835    if test "x$new_path" = x \
15836        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
15837        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
15838      new_path=`$CYGPATH -u "$path"`
15839    fi
15840    if test "x$new_path" = x; then
15841      # It's still not found. Now this is an unrecoverable error.
15842      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15843$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15844      has_space=`$ECHO "$complete" | $GREP " "`
15845      if test "x$has_space" != x; then
15846        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15847$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15848      fi
15849      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15850    fi
15851  fi
15852
15853  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15854  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15855  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15856  # "foo.exe" is OK but "foo" is an error.
15857  #
15858  # This test is therefore slightly more accurate than "test -f" to check for file presence.
15859  # It is also a way to make sure we got the proper file name for the real test later on.
15860  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15861  if test "x$test_shortpath" = x; then
15862    # Short path failed, file does not exist as specified.
15863    # Try adding .exe or .cmd
15864    if test -f "${new_path}.exe"; then
15865      input_to_shortpath="${new_path}.exe"
15866    elif test -f "${new_path}.cmd"; then
15867      input_to_shortpath="${new_path}.cmd"
15868    else
15869      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
15870$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
15871      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
15872$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
15873      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15874    fi
15875  else
15876    input_to_shortpath="$new_path"
15877  fi
15878
15879  # Call helper function which possibly converts this using DOS-style short mode.
15880  # If so, the updated path is stored in $new_path.
15881  new_path="$input_to_shortpath"
15882
15883  input_path="$input_to_shortpath"
15884  # Check if we need to convert this using DOS-style short mode. If the path
15885  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15886  # take no chances and rewrite it.
15887  # Note: m4 eats our [], so we need to use [ and ] instead.
15888  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15889  if test "x$has_forbidden_chars" != x; then
15890    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15891    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15892    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15893    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15894      # Going to short mode and back again did indeed matter. Since short mode is
15895      # case insensitive, let's make it lowercase to improve readability.
15896      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15897      # Now convert it back to Unix-stile (cygpath)
15898      input_path=`$CYGPATH -u "$shortmode_path"`
15899      new_path="$input_path"
15900    fi
15901  fi
15902
15903  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15904  if test "x$test_cygdrive_prefix" = x; then
15905    # As a simple fix, exclude /usr/bin since it's not a real path.
15906    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
15907      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15908      # a path prefixed by /cygdrive for fixpath to work.
15909      new_path="$CYGWIN_ROOT_PATH$input_path"
15910    fi
15911  fi
15912
15913  # remove trailing .exe if any
15914  new_path="${new_path/%.exe/}"
15915
15916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15917
15918  # First separate the path from the arguments. This will split at the first
15919  # space.
15920  complete="$FOUND_MAKE"
15921  path="${complete%% *}"
15922  tmp="$complete EOL"
15923  arguments="${tmp#* }"
15924
15925  # Input might be given as Windows format, start by converting to
15926  # unix format.
15927  new_path="$path"
15928
15929  windows_path="$new_path"
15930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15931    unix_path=`$CYGPATH -u "$windows_path"`
15932    new_path="$unix_path"
15933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15935    new_path="$unix_path"
15936  fi
15937
15938
15939  # Now try to locate executable using which
15940  new_path=`$WHICH "$new_path" 2> /dev/null`
15941
15942  if test "x$new_path" = x; then
15943    # Oops. Which didn't find the executable.
15944    # The splitting of arguments from the executable at a space might have been incorrect,
15945    # since paths with space are more likely in Windows. Give it another try with the whole
15946    # argument.
15947    path="$complete"
15948    arguments="EOL"
15949    new_path="$path"
15950
15951  windows_path="$new_path"
15952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15953    unix_path=`$CYGPATH -u "$windows_path"`
15954    new_path="$unix_path"
15955  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15956    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15957    new_path="$unix_path"
15958  fi
15959
15960
15961    new_path=`$WHICH "$new_path" 2> /dev/null`
15962
15963    if test "x$new_path" = x; then
15964      # It's still not found. Now this is an unrecoverable error.
15965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
15966$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
15967      has_space=`$ECHO "$complete" | $GREP " "`
15968      if test "x$has_space" != x; then
15969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
15970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
15971      fi
15972      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
15973    fi
15974  fi
15975
15976  # Now new_path has a complete unix path to the binary
15977  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
15978    # Keep paths in /bin as-is, but remove trailing .exe if any
15979    new_path="${new_path/%.exe/}"
15980    # Do not save /bin paths to all_fixpath_prefixes!
15981  else
15982    # Not in mixed or Windows style, start by that.
15983    new_path=`cmd //c echo $new_path`
15984
15985  input_path="$new_path"
15986  # Check if we need to convert this using DOS-style short mode. If the path
15987  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15988  # take no chances and rewrite it.
15989  # Note: m4 eats our [], so we need to use [ and ] instead.
15990  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15991  if test "x$has_forbidden_chars" != x; then
15992    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15993    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15994  fi
15995
15996    # Output is in $new_path
15997
15998  windows_path="$new_path"
15999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16000    unix_path=`$CYGPATH -u "$windows_path"`
16001    new_path="$unix_path"
16002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16004    new_path="$unix_path"
16005  fi
16006
16007    # remove trailing .exe if any
16008    new_path="${new_path/%.exe/}"
16009
16010    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16011    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16012  fi
16013
16014  else
16015    # We're on a posix platform. Hooray! :)
16016    # First separate the path from the arguments. This will split at the first
16017    # space.
16018    complete="$FOUND_MAKE"
16019    path="${complete%% *}"
16020    tmp="$complete EOL"
16021    arguments="${tmp#* }"
16022
16023    # Cannot rely on the command "which" here since it doesn't always work.
16024    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16025    if test -z "$is_absolute_path"; then
16026      # Path to executable is not absolute. Find it.
16027      IFS_save="$IFS"
16028      IFS=:
16029      for p in $PATH; do
16030        if test -f "$p/$path" && test -x "$p/$path"; then
16031          new_path="$p/$path"
16032          break
16033        fi
16034      done
16035      IFS="$IFS_save"
16036    else
16037      # This is an absolute path, we can use it without further modifications.
16038      new_path="$path"
16039    fi
16040
16041    if test "x$new_path" = x; then
16042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16044      has_space=`$ECHO "$complete" | $GREP " "`
16045      if test "x$has_space" != x; then
16046        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16047$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16048      fi
16049      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16050    fi
16051  fi
16052
16053  # Now join together the path and the arguments once again
16054  if test "x$arguments" != xEOL; then
16055    new_complete="$new_path ${arguments% *}"
16056  else
16057    new_complete="$new_path"
16058  fi
16059
16060  if test "x$complete" != "x$new_complete"; then
16061    FOUND_MAKE="$new_complete"
16062    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16063$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16064  fi
16065
16066        fi
16067      fi
16068    fi
16069  fi
16070
16071
16072    if test "x$FOUND_MAKE" = x; then
16073      for ac_prog in make
16074do
16075  # Extract the first word of "$ac_prog", so it can be a program name with args.
16076set dummy $ac_prog; ac_word=$2
16077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16078$as_echo_n "checking for $ac_word... " >&6; }
16079if ${ac_cv_path_CHECK_MAKE+:} false; then :
16080  $as_echo_n "(cached) " >&6
16081else
16082  case $CHECK_MAKE in
16083  [\\/]* | ?:[\\/]*)
16084  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
16085  ;;
16086  *)
16087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16088for as_dir in $PATH
16089do
16090  IFS=$as_save_IFS
16091  test -z "$as_dir" && as_dir=.
16092    for ac_exec_ext in '' $ac_executable_extensions; do
16093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16094    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
16095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16096    break 2
16097  fi
16098done
16099  done
16100IFS=$as_save_IFS
16101
16102  ;;
16103esac
16104fi
16105CHECK_MAKE=$ac_cv_path_CHECK_MAKE
16106if test -n "$CHECK_MAKE"; then
16107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
16108$as_echo "$CHECK_MAKE" >&6; }
16109else
16110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16111$as_echo "no" >&6; }
16112fi
16113
16114
16115  test -n "$CHECK_MAKE" && break
16116done
16117
16118
16119  MAKE_CANDIDATE=""$CHECK_MAKE""
16120  DESCRIPTION="make in PATH"
16121  if test "x$MAKE_CANDIDATE" != x; then
16122    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16123$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16124    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16125    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16126    if test "x$IS_GNU_MAKE" = x; then
16127      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16128$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16129    else
16130      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16131      if test "x$IS_MODERN_MAKE" = x; then
16132        { $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
16133$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;}
16134      else
16135        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16136          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16137            MAKE_EXPECTED_ENV='cygwin'
16138          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16139            MAKE_EXPECTED_ENV='msys'
16140          else
16141            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16142          fi
16143          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16144          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16145        else
16146          # Not relevant for non-Windows
16147          IS_MAKE_CORRECT_ENV=true
16148        fi
16149        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16150          { $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
16151$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;}
16152        else
16153          FOUND_MAKE=$MAKE_CANDIDATE
16154
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156
16157  # First separate the path from the arguments. This will split at the first
16158  # space.
16159  complete="$FOUND_MAKE"
16160  path="${complete%% *}"
16161  tmp="$complete EOL"
16162  arguments="${tmp#* }"
16163
16164  # Input might be given as Windows format, start by converting to
16165  # unix format.
16166  new_path=`$CYGPATH -u "$path"`
16167
16168  # Now try to locate executable using which
16169  new_path=`$WHICH "$new_path" 2> /dev/null`
16170  # bat and cmd files are not always considered executable in cygwin causing which
16171  # to not find them
16172  if test "x$new_path" = x \
16173      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16174      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16175    new_path=`$CYGPATH -u "$path"`
16176  fi
16177  if test "x$new_path" = x; then
16178    # Oops. Which didn't find the executable.
16179    # The splitting of arguments from the executable at a space might have been incorrect,
16180    # since paths with space are more likely in Windows. Give it another try with the whole
16181    # argument.
16182    path="$complete"
16183    arguments="EOL"
16184    new_path=`$CYGPATH -u "$path"`
16185    new_path=`$WHICH "$new_path" 2> /dev/null`
16186    # bat and cmd files are not always considered executable in cygwin causing which
16187    # to not find them
16188    if test "x$new_path" = x \
16189        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16190        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16191      new_path=`$CYGPATH -u "$path"`
16192    fi
16193    if test "x$new_path" = x; then
16194      # It's still not found. Now this is an unrecoverable error.
16195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16196$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16197      has_space=`$ECHO "$complete" | $GREP " "`
16198      if test "x$has_space" != x; then
16199        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16200$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16201      fi
16202      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16203    fi
16204  fi
16205
16206  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16207  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16208  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16209  # "foo.exe" is OK but "foo" is an error.
16210  #
16211  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16212  # It is also a way to make sure we got the proper file name for the real test later on.
16213  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16214  if test "x$test_shortpath" = x; then
16215    # Short path failed, file does not exist as specified.
16216    # Try adding .exe or .cmd
16217    if test -f "${new_path}.exe"; then
16218      input_to_shortpath="${new_path}.exe"
16219    elif test -f "${new_path}.cmd"; then
16220      input_to_shortpath="${new_path}.cmd"
16221    else
16222      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16223$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16224      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16225$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16226      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16227    fi
16228  else
16229    input_to_shortpath="$new_path"
16230  fi
16231
16232  # Call helper function which possibly converts this using DOS-style short mode.
16233  # If so, the updated path is stored in $new_path.
16234  new_path="$input_to_shortpath"
16235
16236  input_path="$input_to_shortpath"
16237  # Check if we need to convert this using DOS-style short mode. If the path
16238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16239  # take no chances and rewrite it.
16240  # Note: m4 eats our [], so we need to use [ and ] instead.
16241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16242  if test "x$has_forbidden_chars" != x; then
16243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16244    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16245    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16246    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16247      # Going to short mode and back again did indeed matter. Since short mode is
16248      # case insensitive, let's make it lowercase to improve readability.
16249      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16250      # Now convert it back to Unix-stile (cygpath)
16251      input_path=`$CYGPATH -u "$shortmode_path"`
16252      new_path="$input_path"
16253    fi
16254  fi
16255
16256  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16257  if test "x$test_cygdrive_prefix" = x; then
16258    # As a simple fix, exclude /usr/bin since it's not a real path.
16259    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16260      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16261      # a path prefixed by /cygdrive for fixpath to work.
16262      new_path="$CYGWIN_ROOT_PATH$input_path"
16263    fi
16264  fi
16265
16266  # remove trailing .exe if any
16267  new_path="${new_path/%.exe/}"
16268
16269  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16270
16271  # First separate the path from the arguments. This will split at the first
16272  # space.
16273  complete="$FOUND_MAKE"
16274  path="${complete%% *}"
16275  tmp="$complete EOL"
16276  arguments="${tmp#* }"
16277
16278  # Input might be given as Windows format, start by converting to
16279  # unix format.
16280  new_path="$path"
16281
16282  windows_path="$new_path"
16283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16284    unix_path=`$CYGPATH -u "$windows_path"`
16285    new_path="$unix_path"
16286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16288    new_path="$unix_path"
16289  fi
16290
16291
16292  # Now try to locate executable using which
16293  new_path=`$WHICH "$new_path" 2> /dev/null`
16294
16295  if test "x$new_path" = x; then
16296    # Oops. Which didn't find the executable.
16297    # The splitting of arguments from the executable at a space might have been incorrect,
16298    # since paths with space are more likely in Windows. Give it another try with the whole
16299    # argument.
16300    path="$complete"
16301    arguments="EOL"
16302    new_path="$path"
16303
16304  windows_path="$new_path"
16305  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16306    unix_path=`$CYGPATH -u "$windows_path"`
16307    new_path="$unix_path"
16308  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16309    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16310    new_path="$unix_path"
16311  fi
16312
16313
16314    new_path=`$WHICH "$new_path" 2> /dev/null`
16315
16316    if test "x$new_path" = x; then
16317      # It's still not found. Now this is an unrecoverable error.
16318      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16319$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16320      has_space=`$ECHO "$complete" | $GREP " "`
16321      if test "x$has_space" != x; then
16322        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16323$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16324      fi
16325      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16326    fi
16327  fi
16328
16329  # Now new_path has a complete unix path to the binary
16330  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16331    # Keep paths in /bin as-is, but remove trailing .exe if any
16332    new_path="${new_path/%.exe/}"
16333    # Do not save /bin paths to all_fixpath_prefixes!
16334  else
16335    # Not in mixed or Windows style, start by that.
16336    new_path=`cmd //c echo $new_path`
16337
16338  input_path="$new_path"
16339  # Check if we need to convert this using DOS-style short mode. If the path
16340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16341  # take no chances and rewrite it.
16342  # Note: m4 eats our [], so we need to use [ and ] instead.
16343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16344  if test "x$has_forbidden_chars" != x; then
16345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16346    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16347  fi
16348
16349    # Output is in $new_path
16350
16351  windows_path="$new_path"
16352  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16353    unix_path=`$CYGPATH -u "$windows_path"`
16354    new_path="$unix_path"
16355  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16356    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16357    new_path="$unix_path"
16358  fi
16359
16360    # remove trailing .exe if any
16361    new_path="${new_path/%.exe/}"
16362
16363    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16364    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16365  fi
16366
16367  else
16368    # We're on a posix platform. Hooray! :)
16369    # First separate the path from the arguments. This will split at the first
16370    # space.
16371    complete="$FOUND_MAKE"
16372    path="${complete%% *}"
16373    tmp="$complete EOL"
16374    arguments="${tmp#* }"
16375
16376    # Cannot rely on the command "which" here since it doesn't always work.
16377    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16378    if test -z "$is_absolute_path"; then
16379      # Path to executable is not absolute. Find it.
16380      IFS_save="$IFS"
16381      IFS=:
16382      for p in $PATH; do
16383        if test -f "$p/$path" && test -x "$p/$path"; then
16384          new_path="$p/$path"
16385          break
16386        fi
16387      done
16388      IFS="$IFS_save"
16389    else
16390      # This is an absolute path, we can use it without further modifications.
16391      new_path="$path"
16392    fi
16393
16394    if test "x$new_path" = x; then
16395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16396$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16397      has_space=`$ECHO "$complete" | $GREP " "`
16398      if test "x$has_space" != x; then
16399        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16400$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16401      fi
16402      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16403    fi
16404  fi
16405
16406  # Now join together the path and the arguments once again
16407  if test "x$arguments" != xEOL; then
16408    new_complete="$new_path ${arguments% *}"
16409  else
16410    new_complete="$new_path"
16411  fi
16412
16413  if test "x$complete" != "x$new_complete"; then
16414    FOUND_MAKE="$new_complete"
16415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16416$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16417  fi
16418
16419        fi
16420      fi
16421    fi
16422  fi
16423
16424    fi
16425
16426    if test "x$FOUND_MAKE" = x; then
16427      if test "x$TOOLCHAIN_PATH" != x; then
16428        # We have a toolchain path, check that as well before giving up.
16429        OLD_PATH=$PATH
16430        PATH=$TOOLCHAIN_PATH:$PATH
16431        for ac_prog in gmake
16432do
16433  # Extract the first word of "$ac_prog", so it can be a program name with args.
16434set dummy $ac_prog; ac_word=$2
16435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16436$as_echo_n "checking for $ac_word... " >&6; }
16437if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
16438  $as_echo_n "(cached) " >&6
16439else
16440  case $CHECK_TOOLSDIR_GMAKE in
16441  [\\/]* | ?:[\\/]*)
16442  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
16443  ;;
16444  *)
16445  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16446for as_dir in $PATH
16447do
16448  IFS=$as_save_IFS
16449  test -z "$as_dir" && as_dir=.
16450    for ac_exec_ext in '' $ac_executable_extensions; do
16451  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16452    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
16453    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16454    break 2
16455  fi
16456done
16457  done
16458IFS=$as_save_IFS
16459
16460  ;;
16461esac
16462fi
16463CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
16464if test -n "$CHECK_TOOLSDIR_GMAKE"; then
16465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
16466$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
16467else
16468  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16469$as_echo "no" >&6; }
16470fi
16471
16472
16473  test -n "$CHECK_TOOLSDIR_GMAKE" && break
16474done
16475
16476
16477  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
16478  DESCRIPTION="gmake in tools-dir"
16479  if test "x$MAKE_CANDIDATE" != x; then
16480    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16481$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16482    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16483    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16484    if test "x$IS_GNU_MAKE" = x; then
16485      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16486$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16487    else
16488      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16489      if test "x$IS_MODERN_MAKE" = x; then
16490        { $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
16491$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;}
16492      else
16493        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16494          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16495            MAKE_EXPECTED_ENV='cygwin'
16496          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16497            MAKE_EXPECTED_ENV='msys'
16498          else
16499            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16500          fi
16501          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16502          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16503        else
16504          # Not relevant for non-Windows
16505          IS_MAKE_CORRECT_ENV=true
16506        fi
16507        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16508          { $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
16509$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;}
16510        else
16511          FOUND_MAKE=$MAKE_CANDIDATE
16512
16513  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16514
16515  # First separate the path from the arguments. This will split at the first
16516  # space.
16517  complete="$FOUND_MAKE"
16518  path="${complete%% *}"
16519  tmp="$complete EOL"
16520  arguments="${tmp#* }"
16521
16522  # Input might be given as Windows format, start by converting to
16523  # unix format.
16524  new_path=`$CYGPATH -u "$path"`
16525
16526  # Now try to locate executable using which
16527  new_path=`$WHICH "$new_path" 2> /dev/null`
16528  # bat and cmd files are not always considered executable in cygwin causing which
16529  # to not find them
16530  if test "x$new_path" = x \
16531      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16532      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16533    new_path=`$CYGPATH -u "$path"`
16534  fi
16535  if test "x$new_path" = x; then
16536    # Oops. Which didn't find the executable.
16537    # The splitting of arguments from the executable at a space might have been incorrect,
16538    # since paths with space are more likely in Windows. Give it another try with the whole
16539    # argument.
16540    path="$complete"
16541    arguments="EOL"
16542    new_path=`$CYGPATH -u "$path"`
16543    new_path=`$WHICH "$new_path" 2> /dev/null`
16544    # bat and cmd files are not always considered executable in cygwin causing which
16545    # to not find them
16546    if test "x$new_path" = x \
16547        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16548        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16549      new_path=`$CYGPATH -u "$path"`
16550    fi
16551    if test "x$new_path" = x; then
16552      # It's still not found. Now this is an unrecoverable error.
16553      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16554$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16555      has_space=`$ECHO "$complete" | $GREP " "`
16556      if test "x$has_space" != x; then
16557        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16558$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16559      fi
16560      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16561    fi
16562  fi
16563
16564  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16565  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16566  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16567  # "foo.exe" is OK but "foo" is an error.
16568  #
16569  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16570  # It is also a way to make sure we got the proper file name for the real test later on.
16571  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16572  if test "x$test_shortpath" = x; then
16573    # Short path failed, file does not exist as specified.
16574    # Try adding .exe or .cmd
16575    if test -f "${new_path}.exe"; then
16576      input_to_shortpath="${new_path}.exe"
16577    elif test -f "${new_path}.cmd"; then
16578      input_to_shortpath="${new_path}.cmd"
16579    else
16580      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16581$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16582      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16583$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16584      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16585    fi
16586  else
16587    input_to_shortpath="$new_path"
16588  fi
16589
16590  # Call helper function which possibly converts this using DOS-style short mode.
16591  # If so, the updated path is stored in $new_path.
16592  new_path="$input_to_shortpath"
16593
16594  input_path="$input_to_shortpath"
16595  # Check if we need to convert this using DOS-style short mode. If the path
16596  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16597  # take no chances and rewrite it.
16598  # Note: m4 eats our [], so we need to use [ and ] instead.
16599  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16600  if test "x$has_forbidden_chars" != x; then
16601    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16602    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16603    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16604    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16605      # Going to short mode and back again did indeed matter. Since short mode is
16606      # case insensitive, let's make it lowercase to improve readability.
16607      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16608      # Now convert it back to Unix-stile (cygpath)
16609      input_path=`$CYGPATH -u "$shortmode_path"`
16610      new_path="$input_path"
16611    fi
16612  fi
16613
16614  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16615  if test "x$test_cygdrive_prefix" = x; then
16616    # As a simple fix, exclude /usr/bin since it's not a real path.
16617    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16618      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16619      # a path prefixed by /cygdrive for fixpath to work.
16620      new_path="$CYGWIN_ROOT_PATH$input_path"
16621    fi
16622  fi
16623
16624  # remove trailing .exe if any
16625  new_path="${new_path/%.exe/}"
16626
16627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16628
16629  # First separate the path from the arguments. This will split at the first
16630  # space.
16631  complete="$FOUND_MAKE"
16632  path="${complete%% *}"
16633  tmp="$complete EOL"
16634  arguments="${tmp#* }"
16635
16636  # Input might be given as Windows format, start by converting to
16637  # unix format.
16638  new_path="$path"
16639
16640  windows_path="$new_path"
16641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16642    unix_path=`$CYGPATH -u "$windows_path"`
16643    new_path="$unix_path"
16644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16646    new_path="$unix_path"
16647  fi
16648
16649
16650  # Now try to locate executable using which
16651  new_path=`$WHICH "$new_path" 2> /dev/null`
16652
16653  if test "x$new_path" = x; then
16654    # Oops. Which didn't find the executable.
16655    # The splitting of arguments from the executable at a space might have been incorrect,
16656    # since paths with space are more likely in Windows. Give it another try with the whole
16657    # argument.
16658    path="$complete"
16659    arguments="EOL"
16660    new_path="$path"
16661
16662  windows_path="$new_path"
16663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16664    unix_path=`$CYGPATH -u "$windows_path"`
16665    new_path="$unix_path"
16666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16668    new_path="$unix_path"
16669  fi
16670
16671
16672    new_path=`$WHICH "$new_path" 2> /dev/null`
16673
16674    if test "x$new_path" = x; then
16675      # It's still not found. Now this is an unrecoverable error.
16676      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16677$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16678      has_space=`$ECHO "$complete" | $GREP " "`
16679      if test "x$has_space" != x; then
16680        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16681$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16682      fi
16683      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16684    fi
16685  fi
16686
16687  # Now new_path has a complete unix path to the binary
16688  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
16689    # Keep paths in /bin as-is, but remove trailing .exe if any
16690    new_path="${new_path/%.exe/}"
16691    # Do not save /bin paths to all_fixpath_prefixes!
16692  else
16693    # Not in mixed or Windows style, start by that.
16694    new_path=`cmd //c echo $new_path`
16695
16696  input_path="$new_path"
16697  # Check if we need to convert this using DOS-style short mode. If the path
16698  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16699  # take no chances and rewrite it.
16700  # Note: m4 eats our [], so we need to use [ and ] instead.
16701  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16702  if test "x$has_forbidden_chars" != x; then
16703    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16704    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16705  fi
16706
16707    # Output is in $new_path
16708
16709  windows_path="$new_path"
16710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16711    unix_path=`$CYGPATH -u "$windows_path"`
16712    new_path="$unix_path"
16713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16715    new_path="$unix_path"
16716  fi
16717
16718    # remove trailing .exe if any
16719    new_path="${new_path/%.exe/}"
16720
16721    # Save the first 10 bytes of this path to the storage, so fixpath can work.
16722    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16723  fi
16724
16725  else
16726    # We're on a posix platform. Hooray! :)
16727    # First separate the path from the arguments. This will split at the first
16728    # space.
16729    complete="$FOUND_MAKE"
16730    path="${complete%% *}"
16731    tmp="$complete EOL"
16732    arguments="${tmp#* }"
16733
16734    # Cannot rely on the command "which" here since it doesn't always work.
16735    is_absolute_path=`$ECHO "$path" | $GREP ^/`
16736    if test -z "$is_absolute_path"; then
16737      # Path to executable is not absolute. Find it.
16738      IFS_save="$IFS"
16739      IFS=:
16740      for p in $PATH; do
16741        if test -f "$p/$path" && test -x "$p/$path"; then
16742          new_path="$p/$path"
16743          break
16744        fi
16745      done
16746      IFS="$IFS_save"
16747    else
16748      # This is an absolute path, we can use it without further modifications.
16749      new_path="$path"
16750    fi
16751
16752    if test "x$new_path" = x; then
16753      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16754$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16755      has_space=`$ECHO "$complete" | $GREP " "`
16756      if test "x$has_space" != x; then
16757        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
16758$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
16759      fi
16760      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16761    fi
16762  fi
16763
16764  # Now join together the path and the arguments once again
16765  if test "x$arguments" != xEOL; then
16766    new_complete="$new_path ${arguments% *}"
16767  else
16768    new_complete="$new_path"
16769  fi
16770
16771  if test "x$complete" != "x$new_complete"; then
16772    FOUND_MAKE="$new_complete"
16773    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
16774$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
16775  fi
16776
16777        fi
16778      fi
16779    fi
16780  fi
16781
16782        if test "x$FOUND_MAKE" = x; then
16783          for ac_prog in make
16784do
16785  # Extract the first word of "$ac_prog", so it can be a program name with args.
16786set dummy $ac_prog; ac_word=$2
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16788$as_echo_n "checking for $ac_word... " >&6; }
16789if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
16790  $as_echo_n "(cached) " >&6
16791else
16792  case $CHECK_TOOLSDIR_MAKE in
16793  [\\/]* | ?:[\\/]*)
16794  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
16795  ;;
16796  *)
16797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16798for as_dir in $PATH
16799do
16800  IFS=$as_save_IFS
16801  test -z "$as_dir" && as_dir=.
16802    for ac_exec_ext in '' $ac_executable_extensions; do
16803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16804    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
16805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16806    break 2
16807  fi
16808done
16809  done
16810IFS=$as_save_IFS
16811
16812  ;;
16813esac
16814fi
16815CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
16816if test -n "$CHECK_TOOLSDIR_MAKE"; then
16817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
16818$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
16819else
16820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16821$as_echo "no" >&6; }
16822fi
16823
16824
16825  test -n "$CHECK_TOOLSDIR_MAKE" && break
16826done
16827
16828
16829  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
16830  DESCRIPTION="make in tools-dir"
16831  if test "x$MAKE_CANDIDATE" != x; then
16832    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
16833$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
16834    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
16835    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
16836    if test "x$IS_GNU_MAKE" = x; then
16837      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
16838$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
16839    else
16840      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP -e '3\.8[12]' -e '4\.'`
16841      if test "x$IS_MODERN_MAKE" = x; then
16842        { $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
16843$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;}
16844      else
16845        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
16846          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16847            MAKE_EXPECTED_ENV='cygwin'
16848          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16849            MAKE_EXPECTED_ENV='msys'
16850          else
16851            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
16852          fi
16853          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
16854          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
16855        else
16856          # Not relevant for non-Windows
16857          IS_MAKE_CORRECT_ENV=true
16858        fi
16859        if test "x$IS_MAKE_CORRECT_ENV" = x; then
16860          { $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
16861$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;}
16862        else
16863          FOUND_MAKE=$MAKE_CANDIDATE
16864
16865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16866
16867  # First separate the path from the arguments. This will split at the first
16868  # space.
16869  complete="$FOUND_MAKE"
16870  path="${complete%% *}"
16871  tmp="$complete EOL"
16872  arguments="${tmp#* }"
16873
16874  # Input might be given as Windows format, start by converting to
16875  # unix format.
16876  new_path=`$CYGPATH -u "$path"`
16877
16878  # Now try to locate executable using which
16879  new_path=`$WHICH "$new_path" 2> /dev/null`
16880  # bat and cmd files are not always considered executable in cygwin causing which
16881  # to not find them
16882  if test "x$new_path" = x \
16883      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16884      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16885    new_path=`$CYGPATH -u "$path"`
16886  fi
16887  if test "x$new_path" = x; then
16888    # Oops. Which didn't find the executable.
16889    # The splitting of arguments from the executable at a space might have been incorrect,
16890    # since paths with space are more likely in Windows. Give it another try with the whole
16891    # argument.
16892    path="$complete"
16893    arguments="EOL"
16894    new_path=`$CYGPATH -u "$path"`
16895    new_path=`$WHICH "$new_path" 2> /dev/null`
16896    # bat and cmd files are not always considered executable in cygwin causing which
16897    # to not find them
16898    if test "x$new_path" = x \
16899        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
16900        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
16901      new_path=`$CYGPATH -u "$path"`
16902    fi
16903    if test "x$new_path" = x; then
16904      # It's still not found. Now this is an unrecoverable error.
16905      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
16906$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
16907      has_space=`$ECHO "$complete" | $GREP " "`
16908      if test "x$has_space" != x; then
16909        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
16910$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
16911      fi
16912      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16913    fi
16914  fi
16915
16916  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16917  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16918  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16919  # "foo.exe" is OK but "foo" is an error.
16920  #
16921  # This test is therefore slightly more accurate than "test -f" to check for file presence.
16922  # It is also a way to make sure we got the proper file name for the real test later on.
16923  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16924  if test "x$test_shortpath" = x; then
16925    # Short path failed, file does not exist as specified.
16926    # Try adding .exe or .cmd
16927    if test -f "${new_path}.exe"; then
16928      input_to_shortpath="${new_path}.exe"
16929    elif test -f "${new_path}.cmd"; then
16930      input_to_shortpath="${new_path}.cmd"
16931    else
16932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
16933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
16934      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
16935$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
16936      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
16937    fi
16938  else
16939    input_to_shortpath="$new_path"
16940  fi
16941
16942  # Call helper function which possibly converts this using DOS-style short mode.
16943  # If so, the updated path is stored in $new_path.
16944  new_path="$input_to_shortpath"
16945
16946  input_path="$input_to_shortpath"
16947  # Check if we need to convert this using DOS-style short mode. If the path
16948  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16949  # take no chances and rewrite it.
16950  # Note: m4 eats our [], so we need to use [ and ] instead.
16951  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16952  if test "x$has_forbidden_chars" != x; then
16953    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16954    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16955    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16956    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16957      # Going to short mode and back again did indeed matter. Since short mode is
16958      # case insensitive, let's make it lowercase to improve readability.
16959      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16960      # Now convert it back to Unix-stile (cygpath)
16961      input_path=`$CYGPATH -u "$shortmode_path"`
16962      new_path="$input_path"
16963    fi
16964  fi
16965
16966  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16967  if test "x$test_cygdrive_prefix" = x; then
16968    # As a simple fix, exclude /usr/bin since it's not a real path.
16969    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
16970      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16971      # a path prefixed by /cygdrive for fixpath to work.
16972      new_path="$CYGWIN_ROOT_PATH$input_path"
16973    fi
16974  fi
16975
16976  # remove trailing .exe if any
16977  new_path="${new_path/%.exe/}"
16978
16979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16980
16981  # First separate the path from the arguments. This will split at the first
16982  # space.
16983  complete="$FOUND_MAKE"
16984  path="${complete%% *}"
16985  tmp="$complete EOL"
16986  arguments="${tmp#* }"
16987
16988  # Input might be given as Windows format, start by converting to
16989  # unix format.
16990  new_path="$path"
16991
16992  windows_path="$new_path"
16993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16994    unix_path=`$CYGPATH -u "$windows_path"`
16995    new_path="$unix_path"
16996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16998    new_path="$unix_path"
16999  fi
17000
17001
17002  # Now try to locate executable using which
17003  new_path=`$WHICH "$new_path" 2> /dev/null`
17004
17005  if test "x$new_path" = x; then
17006    # Oops. Which didn't find the executable.
17007    # The splitting of arguments from the executable at a space might have been incorrect,
17008    # since paths with space are more likely in Windows. Give it another try with the whole
17009    # argument.
17010    path="$complete"
17011    arguments="EOL"
17012    new_path="$path"
17013
17014  windows_path="$new_path"
17015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17016    unix_path=`$CYGPATH -u "$windows_path"`
17017    new_path="$unix_path"
17018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17020    new_path="$unix_path"
17021  fi
17022
17023
17024    new_path=`$WHICH "$new_path" 2> /dev/null`
17025
17026    if test "x$new_path" = x; then
17027      # It's still not found. Now this is an unrecoverable error.
17028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17029$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17030      has_space=`$ECHO "$complete" | $GREP " "`
17031      if test "x$has_space" != x; then
17032        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17033$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17034      fi
17035      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17036    fi
17037  fi
17038
17039  # Now new_path has a complete unix path to the binary
17040  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17041    # Keep paths in /bin as-is, but remove trailing .exe if any
17042    new_path="${new_path/%.exe/}"
17043    # Do not save /bin paths to all_fixpath_prefixes!
17044  else
17045    # Not in mixed or Windows style, start by that.
17046    new_path=`cmd //c echo $new_path`
17047
17048  input_path="$new_path"
17049  # Check if we need to convert this using DOS-style short mode. If the path
17050  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17051  # take no chances and rewrite it.
17052  # Note: m4 eats our [], so we need to use [ and ] instead.
17053  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17054  if test "x$has_forbidden_chars" != x; then
17055    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17056    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17057  fi
17058
17059    # Output is in $new_path
17060
17061  windows_path="$new_path"
17062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17063    unix_path=`$CYGPATH -u "$windows_path"`
17064    new_path="$unix_path"
17065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17067    new_path="$unix_path"
17068  fi
17069
17070    # remove trailing .exe if any
17071    new_path="${new_path/%.exe/}"
17072
17073    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17074    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17075  fi
17076
17077  else
17078    # We're on a posix platform. Hooray! :)
17079    # First separate the path from the arguments. This will split at the first
17080    # space.
17081    complete="$FOUND_MAKE"
17082    path="${complete%% *}"
17083    tmp="$complete EOL"
17084    arguments="${tmp#* }"
17085
17086    # Cannot rely on the command "which" here since it doesn't always work.
17087    is_absolute_path=`$ECHO "$path" | $GREP ^/`
17088    if test -z "$is_absolute_path"; then
17089      # Path to executable is not absolute. Find it.
17090      IFS_save="$IFS"
17091      IFS=:
17092      for p in $PATH; do
17093        if test -f "$p/$path" && test -x "$p/$path"; then
17094          new_path="$p/$path"
17095          break
17096        fi
17097      done
17098      IFS="$IFS_save"
17099    else
17100      # This is an absolute path, we can use it without further modifications.
17101      new_path="$path"
17102    fi
17103
17104    if test "x$new_path" = x; then
17105      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17106$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17107      has_space=`$ECHO "$complete" | $GREP " "`
17108      if test "x$has_space" != x; then
17109        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17110$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17111      fi
17112      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17113    fi
17114  fi
17115
17116  # Now join together the path and the arguments once again
17117  if test "x$arguments" != xEOL; then
17118    new_complete="$new_path ${arguments% *}"
17119  else
17120    new_complete="$new_path"
17121  fi
17122
17123  if test "x$complete" != "x$new_complete"; then
17124    FOUND_MAKE="$new_complete"
17125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17126$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17127  fi
17128
17129        fi
17130      fi
17131    fi
17132  fi
17133
17134        fi
17135        PATH=$OLD_PATH
17136      fi
17137    fi
17138
17139    if test "x$FOUND_MAKE" = x; then
17140      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
17141    fi
17142  fi
17143
17144  MAKE=$FOUND_MAKE
17145
17146  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
17147$as_echo "$as_me: Using GNU make 3.81 (or later) at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
17148
17149
17150
17151  # Test if find supports -delete
17152  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
17153$as_echo_n "checking if find supports -delete... " >&6; }
17154  FIND_DELETE="-delete"
17155
17156  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
17157
17158  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
17159
17160  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
17161  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
17162    # No, it does not.
17163    rm $DELETEDIR/TestIfFindSupportsDelete
17164    FIND_DELETE="-exec rm \{\} \+"
17165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17166$as_echo "no" >&6; }
17167  else
17168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17169$as_echo "yes" >&6; }
17170  fi
17171  rmdir $DELETEDIR
17172
17173
17174
17175  # These tools might not be installed by default,
17176  # need hint on how to install them.
17177
17178
17179
17180  # Publish this variable in the help.
17181
17182
17183  if test "x$UNZIP" = x; then
17184    # The variable is not set by user, try to locate tool using the code snippet
17185    for ac_prog in unzip
17186do
17187  # Extract the first word of "$ac_prog", so it can be a program name with args.
17188set dummy $ac_prog; ac_word=$2
17189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17190$as_echo_n "checking for $ac_word... " >&6; }
17191if ${ac_cv_path_UNZIP+:} false; then :
17192  $as_echo_n "(cached) " >&6
17193else
17194  case $UNZIP in
17195  [\\/]* | ?:[\\/]*)
17196  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17197  ;;
17198  *)
17199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17200for as_dir in $PATH
17201do
17202  IFS=$as_save_IFS
17203  test -z "$as_dir" && as_dir=.
17204    for ac_exec_ext in '' $ac_executable_extensions; do
17205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17206    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17208    break 2
17209  fi
17210done
17211  done
17212IFS=$as_save_IFS
17213
17214  ;;
17215esac
17216fi
17217UNZIP=$ac_cv_path_UNZIP
17218if test -n "$UNZIP"; then
17219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17220$as_echo "$UNZIP" >&6; }
17221else
17222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17223$as_echo "no" >&6; }
17224fi
17225
17226
17227  test -n "$UNZIP" && break
17228done
17229
17230  else
17231    # The variable is set, but is it from the command line or the environment?
17232
17233    # Try to remove the string !UNZIP! from our list.
17234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
17235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17236      # If it failed, the variable was not from the command line. Ignore it,
17237      # but warn the user (except for BASH, which is always set by the calling BASH).
17238      if test "xUNZIP" != xBASH; then
17239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
17240$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
17241      fi
17242      # Try to locate tool using the code snippet
17243      for ac_prog in unzip
17244do
17245  # Extract the first word of "$ac_prog", so it can be a program name with args.
17246set dummy $ac_prog; ac_word=$2
17247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17248$as_echo_n "checking for $ac_word... " >&6; }
17249if ${ac_cv_path_UNZIP+:} false; then :
17250  $as_echo_n "(cached) " >&6
17251else
17252  case $UNZIP in
17253  [\\/]* | ?:[\\/]*)
17254  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17255  ;;
17256  *)
17257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17258for as_dir in $PATH
17259do
17260  IFS=$as_save_IFS
17261  test -z "$as_dir" && as_dir=.
17262    for ac_exec_ext in '' $ac_executable_extensions; do
17263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17264    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17266    break 2
17267  fi
17268done
17269  done
17270IFS=$as_save_IFS
17271
17272  ;;
17273esac
17274fi
17275UNZIP=$ac_cv_path_UNZIP
17276if test -n "$UNZIP"; then
17277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17278$as_echo "$UNZIP" >&6; }
17279else
17280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17281$as_echo "no" >&6; }
17282fi
17283
17284
17285  test -n "$UNZIP" && break
17286done
17287
17288    else
17289      # If it succeeded, then it was overridden by the user. We will use it
17290      # for the tool.
17291
17292      # First remove it from the list of overridden variables, so we can test
17293      # for unknown variables in the end.
17294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17295
17296      # Check if the provided tool contains a complete path.
17297      tool_specified="$UNZIP"
17298      tool_basename="${tool_specified##*/}"
17299      if test "x$tool_basename" = "x$tool_specified"; then
17300        # A command without a complete path is provided, search $PATH.
17301        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
17302$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
17303        # Extract the first word of "$tool_basename", so it can be a program name with args.
17304set dummy $tool_basename; ac_word=$2
17305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17306$as_echo_n "checking for $ac_word... " >&6; }
17307if ${ac_cv_path_UNZIP+:} false; then :
17308  $as_echo_n "(cached) " >&6
17309else
17310  case $UNZIP in
17311  [\\/]* | ?:[\\/]*)
17312  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
17313  ;;
17314  *)
17315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17316for as_dir in $PATH
17317do
17318  IFS=$as_save_IFS
17319  test -z "$as_dir" && as_dir=.
17320    for ac_exec_ext in '' $ac_executable_extensions; do
17321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17322    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
17323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17324    break 2
17325  fi
17326done
17327  done
17328IFS=$as_save_IFS
17329
17330  ;;
17331esac
17332fi
17333UNZIP=$ac_cv_path_UNZIP
17334if test -n "$UNZIP"; then
17335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
17336$as_echo "$UNZIP" >&6; }
17337else
17338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17339$as_echo "no" >&6; }
17340fi
17341
17342
17343        if test "x$UNZIP" = x; then
17344          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17345        fi
17346      else
17347        # Otherwise we believe it is a complete path. Use it as it is.
17348        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
17349$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
17350        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
17351$as_echo_n "checking for UNZIP... " >&6; }
17352        if test ! -x "$tool_specified"; then
17353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17354$as_echo "not found" >&6; }
17355          as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17356        fi
17357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17358$as_echo "$tool_specified" >&6; }
17359      fi
17360    fi
17361  fi
17362
17363
17364
17365  if test "x$UNZIP" = x; then
17366    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
17367  fi
17368
17369
17370
17371
17372
17373  # Publish this variable in the help.
17374
17375
17376  if test "x$ZIP" = x; then
17377    # The variable is not set by user, try to locate tool using the code snippet
17378    for ac_prog in zip
17379do
17380  # Extract the first word of "$ac_prog", so it can be a program name with args.
17381set dummy $ac_prog; ac_word=$2
17382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17383$as_echo_n "checking for $ac_word... " >&6; }
17384if ${ac_cv_path_ZIP+:} false; then :
17385  $as_echo_n "(cached) " >&6
17386else
17387  case $ZIP in
17388  [\\/]* | ?:[\\/]*)
17389  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17390  ;;
17391  *)
17392  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17393for as_dir in $PATH
17394do
17395  IFS=$as_save_IFS
17396  test -z "$as_dir" && as_dir=.
17397    for ac_exec_ext in '' $ac_executable_extensions; do
17398  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17399    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17400    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17401    break 2
17402  fi
17403done
17404  done
17405IFS=$as_save_IFS
17406
17407  ;;
17408esac
17409fi
17410ZIP=$ac_cv_path_ZIP
17411if test -n "$ZIP"; then
17412  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17413$as_echo "$ZIP" >&6; }
17414else
17415  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17416$as_echo "no" >&6; }
17417fi
17418
17419
17420  test -n "$ZIP" && break
17421done
17422
17423  else
17424    # The variable is set, but is it from the command line or the environment?
17425
17426    # Try to remove the string !ZIP! from our list.
17427    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
17428    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17429      # If it failed, the variable was not from the command line. Ignore it,
17430      # but warn the user (except for BASH, which is always set by the calling BASH).
17431      if test "xZIP" != xBASH; then
17432        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
17433$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
17434      fi
17435      # Try to locate tool using the code snippet
17436      for ac_prog in zip
17437do
17438  # Extract the first word of "$ac_prog", so it can be a program name with args.
17439set dummy $ac_prog; ac_word=$2
17440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17441$as_echo_n "checking for $ac_word... " >&6; }
17442if ${ac_cv_path_ZIP+:} false; then :
17443  $as_echo_n "(cached) " >&6
17444else
17445  case $ZIP in
17446  [\\/]* | ?:[\\/]*)
17447  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17448  ;;
17449  *)
17450  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17451for as_dir in $PATH
17452do
17453  IFS=$as_save_IFS
17454  test -z "$as_dir" && as_dir=.
17455    for ac_exec_ext in '' $ac_executable_extensions; do
17456  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17457    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17458    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17459    break 2
17460  fi
17461done
17462  done
17463IFS=$as_save_IFS
17464
17465  ;;
17466esac
17467fi
17468ZIP=$ac_cv_path_ZIP
17469if test -n "$ZIP"; then
17470  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17471$as_echo "$ZIP" >&6; }
17472else
17473  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17474$as_echo "no" >&6; }
17475fi
17476
17477
17478  test -n "$ZIP" && break
17479done
17480
17481    else
17482      # If it succeeded, then it was overridden by the user. We will use it
17483      # for the tool.
17484
17485      # First remove it from the list of overridden variables, so we can test
17486      # for unknown variables in the end.
17487      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17488
17489      # Check if the provided tool contains a complete path.
17490      tool_specified="$ZIP"
17491      tool_basename="${tool_specified##*/}"
17492      if test "x$tool_basename" = "x$tool_specified"; then
17493        # A command without a complete path is provided, search $PATH.
17494        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
17495$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
17496        # Extract the first word of "$tool_basename", so it can be a program name with args.
17497set dummy $tool_basename; ac_word=$2
17498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17499$as_echo_n "checking for $ac_word... " >&6; }
17500if ${ac_cv_path_ZIP+:} false; then :
17501  $as_echo_n "(cached) " >&6
17502else
17503  case $ZIP in
17504  [\\/]* | ?:[\\/]*)
17505  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
17506  ;;
17507  *)
17508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17509for as_dir in $PATH
17510do
17511  IFS=$as_save_IFS
17512  test -z "$as_dir" && as_dir=.
17513    for ac_exec_ext in '' $ac_executable_extensions; do
17514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17515    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
17516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17517    break 2
17518  fi
17519done
17520  done
17521IFS=$as_save_IFS
17522
17523  ;;
17524esac
17525fi
17526ZIP=$ac_cv_path_ZIP
17527if test -n "$ZIP"; then
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
17529$as_echo "$ZIP" >&6; }
17530else
17531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17532$as_echo "no" >&6; }
17533fi
17534
17535
17536        if test "x$ZIP" = x; then
17537          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17538        fi
17539      else
17540        # Otherwise we believe it is a complete path. Use it as it is.
17541        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
17542$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
17543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
17544$as_echo_n "checking for ZIP... " >&6; }
17545        if test ! -x "$tool_specified"; then
17546          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17547$as_echo "not found" >&6; }
17548          as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
17549        fi
17550        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17551$as_echo "$tool_specified" >&6; }
17552      fi
17553    fi
17554  fi
17555
17556
17557
17558  if test "x$ZIP" = x; then
17559    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
17560  fi
17561
17562
17563
17564  # Non-required basic tools
17565
17566
17567
17568  # Publish this variable in the help.
17569
17570
17571  if test "x$LDD" = x; then
17572    # The variable is not set by user, try to locate tool using the code snippet
17573    for ac_prog in ldd
17574do
17575  # Extract the first word of "$ac_prog", so it can be a program name with args.
17576set dummy $ac_prog; ac_word=$2
17577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17578$as_echo_n "checking for $ac_word... " >&6; }
17579if ${ac_cv_path_LDD+:} false; then :
17580  $as_echo_n "(cached) " >&6
17581else
17582  case $LDD in
17583  [\\/]* | ?:[\\/]*)
17584  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17585  ;;
17586  *)
17587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17588for as_dir in $PATH
17589do
17590  IFS=$as_save_IFS
17591  test -z "$as_dir" && as_dir=.
17592    for ac_exec_ext in '' $ac_executable_extensions; do
17593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17594    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17596    break 2
17597  fi
17598done
17599  done
17600IFS=$as_save_IFS
17601
17602  ;;
17603esac
17604fi
17605LDD=$ac_cv_path_LDD
17606if test -n "$LDD"; then
17607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17608$as_echo "$LDD" >&6; }
17609else
17610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17611$as_echo "no" >&6; }
17612fi
17613
17614
17615  test -n "$LDD" && break
17616done
17617
17618  else
17619    # The variable is set, but is it from the command line or the environment?
17620
17621    # Try to remove the string !LDD! from our list.
17622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
17623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17624      # If it failed, the variable was not from the command line. Ignore it,
17625      # but warn the user (except for BASH, which is always set by the calling BASH).
17626      if test "xLDD" != xBASH; then
17627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
17628$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
17629      fi
17630      # Try to locate tool using the code snippet
17631      for ac_prog in ldd
17632do
17633  # Extract the first word of "$ac_prog", so it can be a program name with args.
17634set dummy $ac_prog; ac_word=$2
17635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17636$as_echo_n "checking for $ac_word... " >&6; }
17637if ${ac_cv_path_LDD+:} false; then :
17638  $as_echo_n "(cached) " >&6
17639else
17640  case $LDD in
17641  [\\/]* | ?:[\\/]*)
17642  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17643  ;;
17644  *)
17645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17646for as_dir in $PATH
17647do
17648  IFS=$as_save_IFS
17649  test -z "$as_dir" && as_dir=.
17650    for ac_exec_ext in '' $ac_executable_extensions; do
17651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17652    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17654    break 2
17655  fi
17656done
17657  done
17658IFS=$as_save_IFS
17659
17660  ;;
17661esac
17662fi
17663LDD=$ac_cv_path_LDD
17664if test -n "$LDD"; then
17665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17666$as_echo "$LDD" >&6; }
17667else
17668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17669$as_echo "no" >&6; }
17670fi
17671
17672
17673  test -n "$LDD" && break
17674done
17675
17676    else
17677      # If it succeeded, then it was overridden by the user. We will use it
17678      # for the tool.
17679
17680      # First remove it from the list of overridden variables, so we can test
17681      # for unknown variables in the end.
17682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17683
17684      # Check if the provided tool contains a complete path.
17685      tool_specified="$LDD"
17686      tool_basename="${tool_specified##*/}"
17687      if test "x$tool_basename" = "x$tool_specified"; then
17688        # A command without a complete path is provided, search $PATH.
17689        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
17690$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
17691        # Extract the first word of "$tool_basename", so it can be a program name with args.
17692set dummy $tool_basename; ac_word=$2
17693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17694$as_echo_n "checking for $ac_word... " >&6; }
17695if ${ac_cv_path_LDD+:} false; then :
17696  $as_echo_n "(cached) " >&6
17697else
17698  case $LDD in
17699  [\\/]* | ?:[\\/]*)
17700  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
17701  ;;
17702  *)
17703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17704for as_dir in $PATH
17705do
17706  IFS=$as_save_IFS
17707  test -z "$as_dir" && as_dir=.
17708    for ac_exec_ext in '' $ac_executable_extensions; do
17709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17710    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
17711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17712    break 2
17713  fi
17714done
17715  done
17716IFS=$as_save_IFS
17717
17718  ;;
17719esac
17720fi
17721LDD=$ac_cv_path_LDD
17722if test -n "$LDD"; then
17723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
17724$as_echo "$LDD" >&6; }
17725else
17726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17727$as_echo "no" >&6; }
17728fi
17729
17730
17731        if test "x$LDD" = x; then
17732          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17733        fi
17734      else
17735        # Otherwise we believe it is a complete path. Use it as it is.
17736        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
17737$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
17738        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
17739$as_echo_n "checking for LDD... " >&6; }
17740        if test ! -x "$tool_specified"; then
17741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17742$as_echo "not found" >&6; }
17743          as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
17744        fi
17745        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17746$as_echo "$tool_specified" >&6; }
17747      fi
17748    fi
17749  fi
17750
17751
17752  if test "x$LDD" = "x"; then
17753    # List shared lib dependencies is used for
17754    # debug output and checking for forbidden dependencies.
17755    # We can build without it.
17756    LDD="true"
17757  fi
17758
17759
17760  # Publish this variable in the help.
17761
17762
17763  if test "x$OTOOL" = x; then
17764    # The variable is not set by user, try to locate tool using the code snippet
17765    for ac_prog in otool
17766do
17767  # Extract the first word of "$ac_prog", so it can be a program name with args.
17768set dummy $ac_prog; ac_word=$2
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17770$as_echo_n "checking for $ac_word... " >&6; }
17771if ${ac_cv_path_OTOOL+:} false; then :
17772  $as_echo_n "(cached) " >&6
17773else
17774  case $OTOOL in
17775  [\\/]* | ?:[\\/]*)
17776  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17777  ;;
17778  *)
17779  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17780for as_dir in $PATH
17781do
17782  IFS=$as_save_IFS
17783  test -z "$as_dir" && as_dir=.
17784    for ac_exec_ext in '' $ac_executable_extensions; do
17785  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17786    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17787    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17788    break 2
17789  fi
17790done
17791  done
17792IFS=$as_save_IFS
17793
17794  ;;
17795esac
17796fi
17797OTOOL=$ac_cv_path_OTOOL
17798if test -n "$OTOOL"; then
17799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17800$as_echo "$OTOOL" >&6; }
17801else
17802  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17803$as_echo "no" >&6; }
17804fi
17805
17806
17807  test -n "$OTOOL" && break
17808done
17809
17810  else
17811    # The variable is set, but is it from the command line or the environment?
17812
17813    # Try to remove the string !OTOOL! from our list.
17814    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
17815    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
17816      # If it failed, the variable was not from the command line. Ignore it,
17817      # but warn the user (except for BASH, which is always set by the calling BASH).
17818      if test "xOTOOL" != xBASH; then
17819        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
17820$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
17821      fi
17822      # Try to locate tool using the code snippet
17823      for ac_prog in otool
17824do
17825  # Extract the first word of "$ac_prog", so it can be a program name with args.
17826set dummy $ac_prog; ac_word=$2
17827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17828$as_echo_n "checking for $ac_word... " >&6; }
17829if ${ac_cv_path_OTOOL+:} false; then :
17830  $as_echo_n "(cached) " >&6
17831else
17832  case $OTOOL in
17833  [\\/]* | ?:[\\/]*)
17834  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17835  ;;
17836  *)
17837  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17838for as_dir in $PATH
17839do
17840  IFS=$as_save_IFS
17841  test -z "$as_dir" && as_dir=.
17842    for ac_exec_ext in '' $ac_executable_extensions; do
17843  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17844    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17845    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17846    break 2
17847  fi
17848done
17849  done
17850IFS=$as_save_IFS
17851
17852  ;;
17853esac
17854fi
17855OTOOL=$ac_cv_path_OTOOL
17856if test -n "$OTOOL"; then
17857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17858$as_echo "$OTOOL" >&6; }
17859else
17860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17861$as_echo "no" >&6; }
17862fi
17863
17864
17865  test -n "$OTOOL" && break
17866done
17867
17868    else
17869      # If it succeeded, then it was overridden by the user. We will use it
17870      # for the tool.
17871
17872      # First remove it from the list of overridden variables, so we can test
17873      # for unknown variables in the end.
17874      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
17875
17876      # Check if the provided tool contains a complete path.
17877      tool_specified="$OTOOL"
17878      tool_basename="${tool_specified##*/}"
17879      if test "x$tool_basename" = "x$tool_specified"; then
17880        # A command without a complete path is provided, search $PATH.
17881        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
17882$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
17883        # Extract the first word of "$tool_basename", so it can be a program name with args.
17884set dummy $tool_basename; ac_word=$2
17885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17886$as_echo_n "checking for $ac_word... " >&6; }
17887if ${ac_cv_path_OTOOL+:} false; then :
17888  $as_echo_n "(cached) " >&6
17889else
17890  case $OTOOL in
17891  [\\/]* | ?:[\\/]*)
17892  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
17893  ;;
17894  *)
17895  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17896for as_dir in $PATH
17897do
17898  IFS=$as_save_IFS
17899  test -z "$as_dir" && as_dir=.
17900    for ac_exec_ext in '' $ac_executable_extensions; do
17901  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17902    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
17903    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17904    break 2
17905  fi
17906done
17907  done
17908IFS=$as_save_IFS
17909
17910  ;;
17911esac
17912fi
17913OTOOL=$ac_cv_path_OTOOL
17914if test -n "$OTOOL"; then
17915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
17916$as_echo "$OTOOL" >&6; }
17917else
17918  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17919$as_echo "no" >&6; }
17920fi
17921
17922
17923        if test "x$OTOOL" = x; then
17924          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
17925        fi
17926      else
17927        # Otherwise we believe it is a complete path. Use it as it is.
17928        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
17929$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
17930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
17931$as_echo_n "checking for OTOOL... " >&6; }
17932        if test ! -x "$tool_specified"; then
17933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17934$as_echo "not found" >&6; }
17935          as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
17936        fi
17937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
17938$as_echo "$tool_specified" >&6; }
17939      fi
17940    fi
17941  fi
17942
17943
17944  if test "x$OTOOL" = "x"; then
17945    OTOOL="true"
17946  fi
17947
17948
17949  # Publish this variable in the help.
17950
17951
17952  if test "x$READELF" = x; then
17953    # The variable is not set by user, try to locate tool using the code snippet
17954    for ac_prog in greadelf readelf
17955do
17956  # Extract the first word of "$ac_prog", so it can be a program name with args.
17957set dummy $ac_prog; ac_word=$2
17958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17959$as_echo_n "checking for $ac_word... " >&6; }
17960if ${ac_cv_path_READELF+:} false; then :
17961  $as_echo_n "(cached) " >&6
17962else
17963  case $READELF in
17964  [\\/]* | ?:[\\/]*)
17965  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
17966  ;;
17967  *)
17968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17969for as_dir in $PATH
17970do
17971  IFS=$as_save_IFS
17972  test -z "$as_dir" && as_dir=.
17973    for ac_exec_ext in '' $ac_executable_extensions; do
17974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17975    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
17976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17977    break 2
17978  fi
17979done
17980  done
17981IFS=$as_save_IFS
17982
17983  ;;
17984esac
17985fi
17986READELF=$ac_cv_path_READELF
17987if test -n "$READELF"; then
17988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
17989$as_echo "$READELF" >&6; }
17990else
17991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17992$as_echo "no" >&6; }
17993fi
17994
17995
17996  test -n "$READELF" && break
17997done
17998
17999  else
18000    # The variable is set, but is it from the command line or the environment?
18001
18002    # Try to remove the string !READELF! from our list.
18003    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
18004    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18005      # If it failed, the variable was not from the command line. Ignore it,
18006      # but warn the user (except for BASH, which is always set by the calling BASH).
18007      if test "xREADELF" != xBASH; then
18008        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
18009$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
18010      fi
18011      # Try to locate tool using the code snippet
18012      for ac_prog in greadelf readelf
18013do
18014  # Extract the first word of "$ac_prog", so it can be a program name with args.
18015set dummy $ac_prog; ac_word=$2
18016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18017$as_echo_n "checking for $ac_word... " >&6; }
18018if ${ac_cv_path_READELF+:} false; then :
18019  $as_echo_n "(cached) " >&6
18020else
18021  case $READELF in
18022  [\\/]* | ?:[\\/]*)
18023  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18024  ;;
18025  *)
18026  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18027for as_dir in $PATH
18028do
18029  IFS=$as_save_IFS
18030  test -z "$as_dir" && as_dir=.
18031    for ac_exec_ext in '' $ac_executable_extensions; do
18032  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18033    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18034    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18035    break 2
18036  fi
18037done
18038  done
18039IFS=$as_save_IFS
18040
18041  ;;
18042esac
18043fi
18044READELF=$ac_cv_path_READELF
18045if test -n "$READELF"; then
18046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18047$as_echo "$READELF" >&6; }
18048else
18049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18050$as_echo "no" >&6; }
18051fi
18052
18053
18054  test -n "$READELF" && break
18055done
18056
18057    else
18058      # If it succeeded, then it was overridden by the user. We will use it
18059      # for the tool.
18060
18061      # First remove it from the list of overridden variables, so we can test
18062      # for unknown variables in the end.
18063      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18064
18065      # Check if the provided tool contains a complete path.
18066      tool_specified="$READELF"
18067      tool_basename="${tool_specified##*/}"
18068      if test "x$tool_basename" = "x$tool_specified"; then
18069        # A command without a complete path is provided, search $PATH.
18070        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
18071$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
18072        # Extract the first word of "$tool_basename", so it can be a program name with args.
18073set dummy $tool_basename; ac_word=$2
18074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18075$as_echo_n "checking for $ac_word... " >&6; }
18076if ${ac_cv_path_READELF+:} false; then :
18077  $as_echo_n "(cached) " >&6
18078else
18079  case $READELF in
18080  [\\/]* | ?:[\\/]*)
18081  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
18082  ;;
18083  *)
18084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18085for as_dir in $PATH
18086do
18087  IFS=$as_save_IFS
18088  test -z "$as_dir" && as_dir=.
18089    for ac_exec_ext in '' $ac_executable_extensions; do
18090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18091    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
18092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18093    break 2
18094  fi
18095done
18096  done
18097IFS=$as_save_IFS
18098
18099  ;;
18100esac
18101fi
18102READELF=$ac_cv_path_READELF
18103if test -n "$READELF"; then
18104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
18105$as_echo "$READELF" >&6; }
18106else
18107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18108$as_echo "no" >&6; }
18109fi
18110
18111
18112        if test "x$READELF" = x; then
18113          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18114        fi
18115      else
18116        # Otherwise we believe it is a complete path. Use it as it is.
18117        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
18118$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
18119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
18120$as_echo_n "checking for READELF... " >&6; }
18121        if test ! -x "$tool_specified"; then
18122          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18123$as_echo "not found" >&6; }
18124          as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
18125        fi
18126        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18127$as_echo "$tool_specified" >&6; }
18128      fi
18129    fi
18130  fi
18131
18132
18133
18134
18135  # Publish this variable in the help.
18136
18137
18138  if test "x$HG" = x; then
18139    # The variable is not set by user, try to locate tool using the code snippet
18140    for ac_prog in hg
18141do
18142  # Extract the first word of "$ac_prog", so it can be a program name with args.
18143set dummy $ac_prog; ac_word=$2
18144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18145$as_echo_n "checking for $ac_word... " >&6; }
18146if ${ac_cv_path_HG+:} false; then :
18147  $as_echo_n "(cached) " >&6
18148else
18149  case $HG in
18150  [\\/]* | ?:[\\/]*)
18151  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18152  ;;
18153  *)
18154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18155for as_dir in $PATH
18156do
18157  IFS=$as_save_IFS
18158  test -z "$as_dir" && as_dir=.
18159    for ac_exec_ext in '' $ac_executable_extensions; do
18160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18161    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18163    break 2
18164  fi
18165done
18166  done
18167IFS=$as_save_IFS
18168
18169  ;;
18170esac
18171fi
18172HG=$ac_cv_path_HG
18173if test -n "$HG"; then
18174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18175$as_echo "$HG" >&6; }
18176else
18177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18178$as_echo "no" >&6; }
18179fi
18180
18181
18182  test -n "$HG" && break
18183done
18184
18185  else
18186    # The variable is set, but is it from the command line or the environment?
18187
18188    # Try to remove the string !HG! from our list.
18189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
18190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18191      # If it failed, the variable was not from the command line. Ignore it,
18192      # but warn the user (except for BASH, which is always set by the calling BASH).
18193      if test "xHG" != xBASH; then
18194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
18195$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
18196      fi
18197      # Try to locate tool using the code snippet
18198      for ac_prog in hg
18199do
18200  # Extract the first word of "$ac_prog", so it can be a program name with args.
18201set dummy $ac_prog; ac_word=$2
18202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18203$as_echo_n "checking for $ac_word... " >&6; }
18204if ${ac_cv_path_HG+:} false; then :
18205  $as_echo_n "(cached) " >&6
18206else
18207  case $HG in
18208  [\\/]* | ?:[\\/]*)
18209  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18210  ;;
18211  *)
18212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18213for as_dir in $PATH
18214do
18215  IFS=$as_save_IFS
18216  test -z "$as_dir" && as_dir=.
18217    for ac_exec_ext in '' $ac_executable_extensions; do
18218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18219    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18221    break 2
18222  fi
18223done
18224  done
18225IFS=$as_save_IFS
18226
18227  ;;
18228esac
18229fi
18230HG=$ac_cv_path_HG
18231if test -n "$HG"; then
18232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18233$as_echo "$HG" >&6; }
18234else
18235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18236$as_echo "no" >&6; }
18237fi
18238
18239
18240  test -n "$HG" && break
18241done
18242
18243    else
18244      # If it succeeded, then it was overridden by the user. We will use it
18245      # for the tool.
18246
18247      # First remove it from the list of overridden variables, so we can test
18248      # for unknown variables in the end.
18249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18250
18251      # Check if the provided tool contains a complete path.
18252      tool_specified="$HG"
18253      tool_basename="${tool_specified##*/}"
18254      if test "x$tool_basename" = "x$tool_specified"; then
18255        # A command without a complete path is provided, search $PATH.
18256        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
18257$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
18258        # Extract the first word of "$tool_basename", so it can be a program name with args.
18259set dummy $tool_basename; ac_word=$2
18260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18261$as_echo_n "checking for $ac_word... " >&6; }
18262if ${ac_cv_path_HG+:} false; then :
18263  $as_echo_n "(cached) " >&6
18264else
18265  case $HG in
18266  [\\/]* | ?:[\\/]*)
18267  ac_cv_path_HG="$HG" # Let the user override the test with a path.
18268  ;;
18269  *)
18270  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18271for as_dir in $PATH
18272do
18273  IFS=$as_save_IFS
18274  test -z "$as_dir" && as_dir=.
18275    for ac_exec_ext in '' $ac_executable_extensions; do
18276  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18277    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
18278    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18279    break 2
18280  fi
18281done
18282  done
18283IFS=$as_save_IFS
18284
18285  ;;
18286esac
18287fi
18288HG=$ac_cv_path_HG
18289if test -n "$HG"; then
18290  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
18291$as_echo "$HG" >&6; }
18292else
18293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18294$as_echo "no" >&6; }
18295fi
18296
18297
18298        if test "x$HG" = x; then
18299          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18300        fi
18301      else
18302        # Otherwise we believe it is a complete path. Use it as it is.
18303        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
18304$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
18305        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
18306$as_echo_n "checking for HG... " >&6; }
18307        if test ! -x "$tool_specified"; then
18308          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18309$as_echo "not found" >&6; }
18310          as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
18311        fi
18312        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18313$as_echo "$tool_specified" >&6; }
18314      fi
18315    fi
18316  fi
18317
18318
18319
18320
18321  # Publish this variable in the help.
18322
18323
18324  if test "x$STAT" = x; then
18325    # The variable is not set by user, try to locate tool using the code snippet
18326    for ac_prog in stat
18327do
18328  # Extract the first word of "$ac_prog", so it can be a program name with args.
18329set dummy $ac_prog; ac_word=$2
18330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18331$as_echo_n "checking for $ac_word... " >&6; }
18332if ${ac_cv_path_STAT+:} false; then :
18333  $as_echo_n "(cached) " >&6
18334else
18335  case $STAT in
18336  [\\/]* | ?:[\\/]*)
18337  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18338  ;;
18339  *)
18340  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18341for as_dir in $PATH
18342do
18343  IFS=$as_save_IFS
18344  test -z "$as_dir" && as_dir=.
18345    for ac_exec_ext in '' $ac_executable_extensions; do
18346  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18347    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18348    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18349    break 2
18350  fi
18351done
18352  done
18353IFS=$as_save_IFS
18354
18355  ;;
18356esac
18357fi
18358STAT=$ac_cv_path_STAT
18359if test -n "$STAT"; then
18360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18361$as_echo "$STAT" >&6; }
18362else
18363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18364$as_echo "no" >&6; }
18365fi
18366
18367
18368  test -n "$STAT" && break
18369done
18370
18371  else
18372    # The variable is set, but is it from the command line or the environment?
18373
18374    # Try to remove the string !STAT! from our list.
18375    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
18376    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18377      # If it failed, the variable was not from the command line. Ignore it,
18378      # but warn the user (except for BASH, which is always set by the calling BASH).
18379      if test "xSTAT" != xBASH; then
18380        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
18381$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
18382      fi
18383      # Try to locate tool using the code snippet
18384      for ac_prog in stat
18385do
18386  # Extract the first word of "$ac_prog", so it can be a program name with args.
18387set dummy $ac_prog; ac_word=$2
18388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18389$as_echo_n "checking for $ac_word... " >&6; }
18390if ${ac_cv_path_STAT+:} false; then :
18391  $as_echo_n "(cached) " >&6
18392else
18393  case $STAT in
18394  [\\/]* | ?:[\\/]*)
18395  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18396  ;;
18397  *)
18398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18399for as_dir in $PATH
18400do
18401  IFS=$as_save_IFS
18402  test -z "$as_dir" && as_dir=.
18403    for ac_exec_ext in '' $ac_executable_extensions; do
18404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18405    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18407    break 2
18408  fi
18409done
18410  done
18411IFS=$as_save_IFS
18412
18413  ;;
18414esac
18415fi
18416STAT=$ac_cv_path_STAT
18417if test -n "$STAT"; then
18418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18419$as_echo "$STAT" >&6; }
18420else
18421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18422$as_echo "no" >&6; }
18423fi
18424
18425
18426  test -n "$STAT" && break
18427done
18428
18429    else
18430      # If it succeeded, then it was overridden by the user. We will use it
18431      # for the tool.
18432
18433      # First remove it from the list of overridden variables, so we can test
18434      # for unknown variables in the end.
18435      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18436
18437      # Check if the provided tool contains a complete path.
18438      tool_specified="$STAT"
18439      tool_basename="${tool_specified##*/}"
18440      if test "x$tool_basename" = "x$tool_specified"; then
18441        # A command without a complete path is provided, search $PATH.
18442        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
18443$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
18444        # Extract the first word of "$tool_basename", so it can be a program name with args.
18445set dummy $tool_basename; ac_word=$2
18446{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18447$as_echo_n "checking for $ac_word... " >&6; }
18448if ${ac_cv_path_STAT+:} false; then :
18449  $as_echo_n "(cached) " >&6
18450else
18451  case $STAT in
18452  [\\/]* | ?:[\\/]*)
18453  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
18454  ;;
18455  *)
18456  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18457for as_dir in $PATH
18458do
18459  IFS=$as_save_IFS
18460  test -z "$as_dir" && as_dir=.
18461    for ac_exec_ext in '' $ac_executable_extensions; do
18462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18463    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
18464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18465    break 2
18466  fi
18467done
18468  done
18469IFS=$as_save_IFS
18470
18471  ;;
18472esac
18473fi
18474STAT=$ac_cv_path_STAT
18475if test -n "$STAT"; then
18476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
18477$as_echo "$STAT" >&6; }
18478else
18479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18480$as_echo "no" >&6; }
18481fi
18482
18483
18484        if test "x$STAT" = x; then
18485          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18486        fi
18487      else
18488        # Otherwise we believe it is a complete path. Use it as it is.
18489        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
18490$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
18491        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
18492$as_echo_n "checking for STAT... " >&6; }
18493        if test ! -x "$tool_specified"; then
18494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18495$as_echo "not found" >&6; }
18496          as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
18497        fi
18498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18499$as_echo "$tool_specified" >&6; }
18500      fi
18501    fi
18502  fi
18503
18504
18505
18506
18507  # Publish this variable in the help.
18508
18509
18510  if test "x$TIME" = x; then
18511    # The variable is not set by user, try to locate tool using the code snippet
18512    for ac_prog in time
18513do
18514  # Extract the first word of "$ac_prog", so it can be a program name with args.
18515set dummy $ac_prog; ac_word=$2
18516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18517$as_echo_n "checking for $ac_word... " >&6; }
18518if ${ac_cv_path_TIME+:} false; then :
18519  $as_echo_n "(cached) " >&6
18520else
18521  case $TIME in
18522  [\\/]* | ?:[\\/]*)
18523  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18524  ;;
18525  *)
18526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18527for as_dir in $PATH
18528do
18529  IFS=$as_save_IFS
18530  test -z "$as_dir" && as_dir=.
18531    for ac_exec_ext in '' $ac_executable_extensions; do
18532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18533    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18535    break 2
18536  fi
18537done
18538  done
18539IFS=$as_save_IFS
18540
18541  ;;
18542esac
18543fi
18544TIME=$ac_cv_path_TIME
18545if test -n "$TIME"; then
18546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18547$as_echo "$TIME" >&6; }
18548else
18549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18550$as_echo "no" >&6; }
18551fi
18552
18553
18554  test -n "$TIME" && break
18555done
18556
18557  else
18558    # The variable is set, but is it from the command line or the environment?
18559
18560    # Try to remove the string !TIME! from our list.
18561    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
18562    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18563      # If it failed, the variable was not from the command line. Ignore it,
18564      # but warn the user (except for BASH, which is always set by the calling BASH).
18565      if test "xTIME" != xBASH; then
18566        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
18567$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
18568      fi
18569      # Try to locate tool using the code snippet
18570      for ac_prog in time
18571do
18572  # Extract the first word of "$ac_prog", so it can be a program name with args.
18573set dummy $ac_prog; ac_word=$2
18574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18575$as_echo_n "checking for $ac_word... " >&6; }
18576if ${ac_cv_path_TIME+:} false; then :
18577  $as_echo_n "(cached) " >&6
18578else
18579  case $TIME in
18580  [\\/]* | ?:[\\/]*)
18581  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18582  ;;
18583  *)
18584  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18585for as_dir in $PATH
18586do
18587  IFS=$as_save_IFS
18588  test -z "$as_dir" && as_dir=.
18589    for ac_exec_ext in '' $ac_executable_extensions; do
18590  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18591    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18592    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18593    break 2
18594  fi
18595done
18596  done
18597IFS=$as_save_IFS
18598
18599  ;;
18600esac
18601fi
18602TIME=$ac_cv_path_TIME
18603if test -n "$TIME"; then
18604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18605$as_echo "$TIME" >&6; }
18606else
18607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18608$as_echo "no" >&6; }
18609fi
18610
18611
18612  test -n "$TIME" && break
18613done
18614
18615    else
18616      # If it succeeded, then it was overridden by the user. We will use it
18617      # for the tool.
18618
18619      # First remove it from the list of overridden variables, so we can test
18620      # for unknown variables in the end.
18621      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18622
18623      # Check if the provided tool contains a complete path.
18624      tool_specified="$TIME"
18625      tool_basename="${tool_specified##*/}"
18626      if test "x$tool_basename" = "x$tool_specified"; then
18627        # A command without a complete path is provided, search $PATH.
18628        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
18629$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
18630        # Extract the first word of "$tool_basename", so it can be a program name with args.
18631set dummy $tool_basename; ac_word=$2
18632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18633$as_echo_n "checking for $ac_word... " >&6; }
18634if ${ac_cv_path_TIME+:} false; then :
18635  $as_echo_n "(cached) " >&6
18636else
18637  case $TIME in
18638  [\\/]* | ?:[\\/]*)
18639  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
18640  ;;
18641  *)
18642  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18643for as_dir in $PATH
18644do
18645  IFS=$as_save_IFS
18646  test -z "$as_dir" && as_dir=.
18647    for ac_exec_ext in '' $ac_executable_extensions; do
18648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18649    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
18650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18651    break 2
18652  fi
18653done
18654  done
18655IFS=$as_save_IFS
18656
18657  ;;
18658esac
18659fi
18660TIME=$ac_cv_path_TIME
18661if test -n "$TIME"; then
18662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
18663$as_echo "$TIME" >&6; }
18664else
18665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18666$as_echo "no" >&6; }
18667fi
18668
18669
18670        if test "x$TIME" = x; then
18671          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18672        fi
18673      else
18674        # Otherwise we believe it is a complete path. Use it as it is.
18675        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
18676$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
18677        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
18678$as_echo_n "checking for TIME... " >&6; }
18679        if test ! -x "$tool_specified"; then
18680          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18681$as_echo "not found" >&6; }
18682          as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
18683        fi
18684        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18685$as_echo "$tool_specified" >&6; }
18686      fi
18687    fi
18688  fi
18689
18690
18691  # Check if it's GNU time
18692  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
18693  if test "x$IS_GNU_TIME" != x; then
18694    IS_GNU_TIME=yes
18695  else
18696    IS_GNU_TIME=no
18697  fi
18698
18699
18700  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
18701
18702
18703
18704  # Publish this variable in the help.
18705
18706
18707  if test "x$COMM" = x; then
18708    # The variable is not set by user, try to locate tool using the code snippet
18709    for ac_prog in comm
18710do
18711  # Extract the first word of "$ac_prog", so it can be a program name with args.
18712set dummy $ac_prog; ac_word=$2
18713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18714$as_echo_n "checking for $ac_word... " >&6; }
18715if ${ac_cv_path_COMM+:} false; then :
18716  $as_echo_n "(cached) " >&6
18717else
18718  case $COMM in
18719  [\\/]* | ?:[\\/]*)
18720  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18721  ;;
18722  *)
18723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18724for as_dir in $PATH
18725do
18726  IFS=$as_save_IFS
18727  test -z "$as_dir" && as_dir=.
18728    for ac_exec_ext in '' $ac_executable_extensions; do
18729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18730    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18732    break 2
18733  fi
18734done
18735  done
18736IFS=$as_save_IFS
18737
18738  ;;
18739esac
18740fi
18741COMM=$ac_cv_path_COMM
18742if test -n "$COMM"; then
18743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18744$as_echo "$COMM" >&6; }
18745else
18746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18747$as_echo "no" >&6; }
18748fi
18749
18750
18751  test -n "$COMM" && break
18752done
18753
18754  else
18755    # The variable is set, but is it from the command line or the environment?
18756
18757    # Try to remove the string !COMM! from our list.
18758    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
18759    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18760      # If it failed, the variable was not from the command line. Ignore it,
18761      # but warn the user (except for BASH, which is always set by the calling BASH).
18762      if test "xCOMM" != xBASH; then
18763        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
18764$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
18765      fi
18766      # Try to locate tool using the code snippet
18767      for ac_prog in comm
18768do
18769  # Extract the first word of "$ac_prog", so it can be a program name with args.
18770set dummy $ac_prog; ac_word=$2
18771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18772$as_echo_n "checking for $ac_word... " >&6; }
18773if ${ac_cv_path_COMM+:} false; then :
18774  $as_echo_n "(cached) " >&6
18775else
18776  case $COMM in
18777  [\\/]* | ?:[\\/]*)
18778  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18779  ;;
18780  *)
18781  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18782for as_dir in $PATH
18783do
18784  IFS=$as_save_IFS
18785  test -z "$as_dir" && as_dir=.
18786    for ac_exec_ext in '' $ac_executable_extensions; do
18787  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18788    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18789    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18790    break 2
18791  fi
18792done
18793  done
18794IFS=$as_save_IFS
18795
18796  ;;
18797esac
18798fi
18799COMM=$ac_cv_path_COMM
18800if test -n "$COMM"; then
18801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18802$as_echo "$COMM" >&6; }
18803else
18804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18805$as_echo "no" >&6; }
18806fi
18807
18808
18809  test -n "$COMM" && break
18810done
18811
18812    else
18813      # If it succeeded, then it was overridden by the user. We will use it
18814      # for the tool.
18815
18816      # First remove it from the list of overridden variables, so we can test
18817      # for unknown variables in the end.
18818      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
18819
18820      # Check if the provided tool contains a complete path.
18821      tool_specified="$COMM"
18822      tool_basename="${tool_specified##*/}"
18823      if test "x$tool_basename" = "x$tool_specified"; then
18824        # A command without a complete path is provided, search $PATH.
18825        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
18826$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
18827        # Extract the first word of "$tool_basename", so it can be a program name with args.
18828set dummy $tool_basename; ac_word=$2
18829{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18830$as_echo_n "checking for $ac_word... " >&6; }
18831if ${ac_cv_path_COMM+:} false; then :
18832  $as_echo_n "(cached) " >&6
18833else
18834  case $COMM in
18835  [\\/]* | ?:[\\/]*)
18836  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
18837  ;;
18838  *)
18839  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18840for as_dir in $PATH
18841do
18842  IFS=$as_save_IFS
18843  test -z "$as_dir" && as_dir=.
18844    for ac_exec_ext in '' $ac_executable_extensions; do
18845  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18846    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
18847    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18848    break 2
18849  fi
18850done
18851  done
18852IFS=$as_save_IFS
18853
18854  ;;
18855esac
18856fi
18857COMM=$ac_cv_path_COMM
18858if test -n "$COMM"; then
18859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
18860$as_echo "$COMM" >&6; }
18861else
18862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18863$as_echo "no" >&6; }
18864fi
18865
18866
18867        if test "x$COMM" = x; then
18868          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
18869        fi
18870      else
18871        # Otherwise we believe it is a complete path. Use it as it is.
18872        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
18873$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
18874        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
18875$as_echo_n "checking for COMM... " >&6; }
18876        if test ! -x "$tool_specified"; then
18877          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
18878$as_echo "not found" >&6; }
18879          as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
18880        fi
18881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
18882$as_echo "$tool_specified" >&6; }
18883      fi
18884    fi
18885  fi
18886
18887
18888
18889  if test "x$COMM" = x; then
18890    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
18891  fi
18892
18893
18894  fi
18895
18896  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
18897
18898
18899
18900  # Publish this variable in the help.
18901
18902
18903  if test "x$DSYMUTIL" = x; then
18904    # The variable is not set by user, try to locate tool using the code snippet
18905    for ac_prog in dsymutil
18906do
18907  # Extract the first word of "$ac_prog", so it can be a program name with args.
18908set dummy $ac_prog; ac_word=$2
18909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18910$as_echo_n "checking for $ac_word... " >&6; }
18911if ${ac_cv_path_DSYMUTIL+:} false; then :
18912  $as_echo_n "(cached) " >&6
18913else
18914  case $DSYMUTIL in
18915  [\\/]* | ?:[\\/]*)
18916  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18917  ;;
18918  *)
18919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18920for as_dir in $PATH
18921do
18922  IFS=$as_save_IFS
18923  test -z "$as_dir" && as_dir=.
18924    for ac_exec_ext in '' $ac_executable_extensions; do
18925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18926    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18928    break 2
18929  fi
18930done
18931  done
18932IFS=$as_save_IFS
18933
18934  ;;
18935esac
18936fi
18937DSYMUTIL=$ac_cv_path_DSYMUTIL
18938if test -n "$DSYMUTIL"; then
18939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18940$as_echo "$DSYMUTIL" >&6; }
18941else
18942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18943$as_echo "no" >&6; }
18944fi
18945
18946
18947  test -n "$DSYMUTIL" && break
18948done
18949
18950  else
18951    # The variable is set, but is it from the command line or the environment?
18952
18953    # Try to remove the string !DSYMUTIL! from our list.
18954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
18955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18956      # If it failed, the variable was not from the command line. Ignore it,
18957      # but warn the user (except for BASH, which is always set by the calling BASH).
18958      if test "xDSYMUTIL" != xBASH; then
18959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
18960$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
18961      fi
18962      # Try to locate tool using the code snippet
18963      for ac_prog in dsymutil
18964do
18965  # Extract the first word of "$ac_prog", so it can be a program name with args.
18966set dummy $ac_prog; ac_word=$2
18967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18968$as_echo_n "checking for $ac_word... " >&6; }
18969if ${ac_cv_path_DSYMUTIL+:} false; then :
18970  $as_echo_n "(cached) " >&6
18971else
18972  case $DSYMUTIL in
18973  [\\/]* | ?:[\\/]*)
18974  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
18975  ;;
18976  *)
18977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18978for as_dir in $PATH
18979do
18980  IFS=$as_save_IFS
18981  test -z "$as_dir" && as_dir=.
18982    for ac_exec_ext in '' $ac_executable_extensions; do
18983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18984    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
18985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18986    break 2
18987  fi
18988done
18989  done
18990IFS=$as_save_IFS
18991
18992  ;;
18993esac
18994fi
18995DSYMUTIL=$ac_cv_path_DSYMUTIL
18996if test -n "$DSYMUTIL"; then
18997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
18998$as_echo "$DSYMUTIL" >&6; }
18999else
19000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19001$as_echo "no" >&6; }
19002fi
19003
19004
19005  test -n "$DSYMUTIL" && break
19006done
19007
19008    else
19009      # If it succeeded, then it was overridden by the user. We will use it
19010      # for the tool.
19011
19012      # First remove it from the list of overridden variables, so we can test
19013      # for unknown variables in the end.
19014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19015
19016      # Check if the provided tool contains a complete path.
19017      tool_specified="$DSYMUTIL"
19018      tool_basename="${tool_specified##*/}"
19019      if test "x$tool_basename" = "x$tool_specified"; then
19020        # A command without a complete path is provided, search $PATH.
19021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
19022$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
19023        # Extract the first word of "$tool_basename", so it can be a program name with args.
19024set dummy $tool_basename; ac_word=$2
19025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19026$as_echo_n "checking for $ac_word... " >&6; }
19027if ${ac_cv_path_DSYMUTIL+:} false; then :
19028  $as_echo_n "(cached) " >&6
19029else
19030  case $DSYMUTIL in
19031  [\\/]* | ?:[\\/]*)
19032  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
19033  ;;
19034  *)
19035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19036for as_dir in $PATH
19037do
19038  IFS=$as_save_IFS
19039  test -z "$as_dir" && as_dir=.
19040    for ac_exec_ext in '' $ac_executable_extensions; do
19041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19042    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
19043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19044    break 2
19045  fi
19046done
19047  done
19048IFS=$as_save_IFS
19049
19050  ;;
19051esac
19052fi
19053DSYMUTIL=$ac_cv_path_DSYMUTIL
19054if test -n "$DSYMUTIL"; then
19055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
19056$as_echo "$DSYMUTIL" >&6; }
19057else
19058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19059$as_echo "no" >&6; }
19060fi
19061
19062
19063        if test "x$DSYMUTIL" = x; then
19064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19065        fi
19066      else
19067        # Otherwise we believe it is a complete path. Use it as it is.
19068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
19069$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
19070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
19071$as_echo_n "checking for DSYMUTIL... " >&6; }
19072        if test ! -x "$tool_specified"; then
19073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19074$as_echo "not found" >&6; }
19075          as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
19076        fi
19077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19078$as_echo "$tool_specified" >&6; }
19079      fi
19080    fi
19081  fi
19082
19083
19084
19085  if test "x$DSYMUTIL" = x; then
19086    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
19087  fi
19088
19089
19090
19091
19092
19093  # Publish this variable in the help.
19094
19095
19096  if test "x$XATTR" = x; then
19097    # The variable is not set by user, try to locate tool using the code snippet
19098    for ac_prog in xattr
19099do
19100  # Extract the first word of "$ac_prog", so it can be a program name with args.
19101set dummy $ac_prog; ac_word=$2
19102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19103$as_echo_n "checking for $ac_word... " >&6; }
19104if ${ac_cv_path_XATTR+:} false; then :
19105  $as_echo_n "(cached) " >&6
19106else
19107  case $XATTR in
19108  [\\/]* | ?:[\\/]*)
19109  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19110  ;;
19111  *)
19112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19113for as_dir in $PATH
19114do
19115  IFS=$as_save_IFS
19116  test -z "$as_dir" && as_dir=.
19117    for ac_exec_ext in '' $ac_executable_extensions; do
19118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19119    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19121    break 2
19122  fi
19123done
19124  done
19125IFS=$as_save_IFS
19126
19127  ;;
19128esac
19129fi
19130XATTR=$ac_cv_path_XATTR
19131if test -n "$XATTR"; then
19132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19133$as_echo "$XATTR" >&6; }
19134else
19135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19136$as_echo "no" >&6; }
19137fi
19138
19139
19140  test -n "$XATTR" && break
19141done
19142
19143  else
19144    # The variable is set, but is it from the command line or the environment?
19145
19146    # Try to remove the string !XATTR! from our list.
19147    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
19148    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19149      # If it failed, the variable was not from the command line. Ignore it,
19150      # but warn the user (except for BASH, which is always set by the calling BASH).
19151      if test "xXATTR" != xBASH; then
19152        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
19153$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
19154      fi
19155      # Try to locate tool using the code snippet
19156      for ac_prog in xattr
19157do
19158  # Extract the first word of "$ac_prog", so it can be a program name with args.
19159set dummy $ac_prog; ac_word=$2
19160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19161$as_echo_n "checking for $ac_word... " >&6; }
19162if ${ac_cv_path_XATTR+:} false; then :
19163  $as_echo_n "(cached) " >&6
19164else
19165  case $XATTR in
19166  [\\/]* | ?:[\\/]*)
19167  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19168  ;;
19169  *)
19170  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19171for as_dir in $PATH
19172do
19173  IFS=$as_save_IFS
19174  test -z "$as_dir" && as_dir=.
19175    for ac_exec_ext in '' $ac_executable_extensions; do
19176  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19177    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19178    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19179    break 2
19180  fi
19181done
19182  done
19183IFS=$as_save_IFS
19184
19185  ;;
19186esac
19187fi
19188XATTR=$ac_cv_path_XATTR
19189if test -n "$XATTR"; then
19190  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19191$as_echo "$XATTR" >&6; }
19192else
19193  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19194$as_echo "no" >&6; }
19195fi
19196
19197
19198  test -n "$XATTR" && break
19199done
19200
19201    else
19202      # If it succeeded, then it was overridden by the user. We will use it
19203      # for the tool.
19204
19205      # First remove it from the list of overridden variables, so we can test
19206      # for unknown variables in the end.
19207      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19208
19209      # Check if the provided tool contains a complete path.
19210      tool_specified="$XATTR"
19211      tool_basename="${tool_specified##*/}"
19212      if test "x$tool_basename" = "x$tool_specified"; then
19213        # A command without a complete path is provided, search $PATH.
19214        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
19215$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
19216        # Extract the first word of "$tool_basename", so it can be a program name with args.
19217set dummy $tool_basename; ac_word=$2
19218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19219$as_echo_n "checking for $ac_word... " >&6; }
19220if ${ac_cv_path_XATTR+:} false; then :
19221  $as_echo_n "(cached) " >&6
19222else
19223  case $XATTR in
19224  [\\/]* | ?:[\\/]*)
19225  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
19226  ;;
19227  *)
19228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19229for as_dir in $PATH
19230do
19231  IFS=$as_save_IFS
19232  test -z "$as_dir" && as_dir=.
19233    for ac_exec_ext in '' $ac_executable_extensions; do
19234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19235    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
19236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19237    break 2
19238  fi
19239done
19240  done
19241IFS=$as_save_IFS
19242
19243  ;;
19244esac
19245fi
19246XATTR=$ac_cv_path_XATTR
19247if test -n "$XATTR"; then
19248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
19249$as_echo "$XATTR" >&6; }
19250else
19251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19252$as_echo "no" >&6; }
19253fi
19254
19255
19256        if test "x$XATTR" = x; then
19257          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19258        fi
19259      else
19260        # Otherwise we believe it is a complete path. Use it as it is.
19261        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
19262$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
19263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
19264$as_echo_n "checking for XATTR... " >&6; }
19265        if test ! -x "$tool_specified"; then
19266          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19267$as_echo "not found" >&6; }
19268          as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
19269        fi
19270        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19271$as_echo "$tool_specified" >&6; }
19272      fi
19273    fi
19274  fi
19275
19276
19277
19278  if test "x$XATTR" = x; then
19279    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
19280  fi
19281
19282
19283
19284
19285  # Publish this variable in the help.
19286
19287
19288  if test "x$CODESIGN" = x; then
19289    # The variable is not set by user, try to locate tool using the code snippet
19290    for ac_prog in codesign
19291do
19292  # Extract the first word of "$ac_prog", so it can be a program name with args.
19293set dummy $ac_prog; ac_word=$2
19294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19295$as_echo_n "checking for $ac_word... " >&6; }
19296if ${ac_cv_path_CODESIGN+:} false; then :
19297  $as_echo_n "(cached) " >&6
19298else
19299  case $CODESIGN in
19300  [\\/]* | ?:[\\/]*)
19301  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19302  ;;
19303  *)
19304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19305for as_dir in $PATH
19306do
19307  IFS=$as_save_IFS
19308  test -z "$as_dir" && as_dir=.
19309    for ac_exec_ext in '' $ac_executable_extensions; do
19310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19311    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19313    break 2
19314  fi
19315done
19316  done
19317IFS=$as_save_IFS
19318
19319  ;;
19320esac
19321fi
19322CODESIGN=$ac_cv_path_CODESIGN
19323if test -n "$CODESIGN"; then
19324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19325$as_echo "$CODESIGN" >&6; }
19326else
19327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19328$as_echo "no" >&6; }
19329fi
19330
19331
19332  test -n "$CODESIGN" && break
19333done
19334
19335  else
19336    # The variable is set, but is it from the command line or the environment?
19337
19338    # Try to remove the string !CODESIGN! from our list.
19339    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
19340    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19341      # If it failed, the variable was not from the command line. Ignore it,
19342      # but warn the user (except for BASH, which is always set by the calling BASH).
19343      if test "xCODESIGN" != xBASH; then
19344        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
19345$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
19346      fi
19347      # Try to locate tool using the code snippet
19348      for ac_prog in codesign
19349do
19350  # Extract the first word of "$ac_prog", so it can be a program name with args.
19351set dummy $ac_prog; ac_word=$2
19352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19353$as_echo_n "checking for $ac_word... " >&6; }
19354if ${ac_cv_path_CODESIGN+:} false; then :
19355  $as_echo_n "(cached) " >&6
19356else
19357  case $CODESIGN in
19358  [\\/]* | ?:[\\/]*)
19359  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19360  ;;
19361  *)
19362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19363for as_dir in $PATH
19364do
19365  IFS=$as_save_IFS
19366  test -z "$as_dir" && as_dir=.
19367    for ac_exec_ext in '' $ac_executable_extensions; do
19368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19369    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19371    break 2
19372  fi
19373done
19374  done
19375IFS=$as_save_IFS
19376
19377  ;;
19378esac
19379fi
19380CODESIGN=$ac_cv_path_CODESIGN
19381if test -n "$CODESIGN"; then
19382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19383$as_echo "$CODESIGN" >&6; }
19384else
19385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19386$as_echo "no" >&6; }
19387fi
19388
19389
19390  test -n "$CODESIGN" && break
19391done
19392
19393    else
19394      # If it succeeded, then it was overridden by the user. We will use it
19395      # for the tool.
19396
19397      # First remove it from the list of overridden variables, so we can test
19398      # for unknown variables in the end.
19399      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
19400
19401      # Check if the provided tool contains a complete path.
19402      tool_specified="$CODESIGN"
19403      tool_basename="${tool_specified##*/}"
19404      if test "x$tool_basename" = "x$tool_specified"; then
19405        # A command without a complete path is provided, search $PATH.
19406        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
19407$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
19408        # Extract the first word of "$tool_basename", so it can be a program name with args.
19409set dummy $tool_basename; ac_word=$2
19410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19411$as_echo_n "checking for $ac_word... " >&6; }
19412if ${ac_cv_path_CODESIGN+:} false; then :
19413  $as_echo_n "(cached) " >&6
19414else
19415  case $CODESIGN in
19416  [\\/]* | ?:[\\/]*)
19417  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
19418  ;;
19419  *)
19420  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19421for as_dir in $PATH
19422do
19423  IFS=$as_save_IFS
19424  test -z "$as_dir" && as_dir=.
19425    for ac_exec_ext in '' $ac_executable_extensions; do
19426  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19427    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
19428    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19429    break 2
19430  fi
19431done
19432  done
19433IFS=$as_save_IFS
19434
19435  ;;
19436esac
19437fi
19438CODESIGN=$ac_cv_path_CODESIGN
19439if test -n "$CODESIGN"; then
19440  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
19441$as_echo "$CODESIGN" >&6; }
19442else
19443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19444$as_echo "no" >&6; }
19445fi
19446
19447
19448        if test "x$CODESIGN" = x; then
19449          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
19450        fi
19451      else
19452        # Otherwise we believe it is a complete path. Use it as it is.
19453        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
19454$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
19455        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
19456$as_echo_n "checking for CODESIGN... " >&6; }
19457        if test ! -x "$tool_specified"; then
19458          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
19459$as_echo "not found" >&6; }
19460          as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
19461        fi
19462        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
19463$as_echo "$tool_specified" >&6; }
19464      fi
19465    fi
19466  fi
19467
19468
19469    if test "x$CODESIGN" != "x"; then
19470      # Verify that the openjdk_codesign certificate is present
19471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
19472$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
19473      rm -f codesign-testfile
19474      touch codesign-testfile
19475      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
19476      rm -f codesign-testfile
19477      if test "x$CODESIGN" = x; then
19478        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19479$as_echo "no" >&6; }
19480      else
19481        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19482$as_echo "yes" >&6; }
19483      fi
19484    fi
19485  fi
19486
19487
19488# Check if pkg-config is available.
19489
19490
19491if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
19492	if test -n "$ac_tool_prefix"; then
19493  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
19494set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
19495{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19496$as_echo_n "checking for $ac_word... " >&6; }
19497if ${ac_cv_path_PKG_CONFIG+:} false; then :
19498  $as_echo_n "(cached) " >&6
19499else
19500  case $PKG_CONFIG in
19501  [\\/]* | ?:[\\/]*)
19502  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
19503  ;;
19504  *)
19505  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19506for as_dir in $PATH
19507do
19508  IFS=$as_save_IFS
19509  test -z "$as_dir" && as_dir=.
19510    for ac_exec_ext in '' $ac_executable_extensions; do
19511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19512    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19514    break 2
19515  fi
19516done
19517  done
19518IFS=$as_save_IFS
19519
19520  ;;
19521esac
19522fi
19523PKG_CONFIG=$ac_cv_path_PKG_CONFIG
19524if test -n "$PKG_CONFIG"; then
19525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
19526$as_echo "$PKG_CONFIG" >&6; }
19527else
19528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19529$as_echo "no" >&6; }
19530fi
19531
19532
19533fi
19534if test -z "$ac_cv_path_PKG_CONFIG"; then
19535  ac_pt_PKG_CONFIG=$PKG_CONFIG
19536  # Extract the first word of "pkg-config", so it can be a program name with args.
19537set dummy pkg-config; ac_word=$2
19538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19539$as_echo_n "checking for $ac_word... " >&6; }
19540if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
19541  $as_echo_n "(cached) " >&6
19542else
19543  case $ac_pt_PKG_CONFIG in
19544  [\\/]* | ?:[\\/]*)
19545  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
19546  ;;
19547  *)
19548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19549for as_dir in $PATH
19550do
19551  IFS=$as_save_IFS
19552  test -z "$as_dir" && as_dir=.
19553    for ac_exec_ext in '' $ac_executable_extensions; do
19554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19555    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
19556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19557    break 2
19558  fi
19559done
19560  done
19561IFS=$as_save_IFS
19562
19563  ;;
19564esac
19565fi
19566ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
19567if test -n "$ac_pt_PKG_CONFIG"; then
19568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
19569$as_echo "$ac_pt_PKG_CONFIG" >&6; }
19570else
19571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19572$as_echo "no" >&6; }
19573fi
19574
19575  if test "x$ac_pt_PKG_CONFIG" = x; then
19576    PKG_CONFIG=""
19577  else
19578    case $cross_compiling:$ac_tool_warned in
19579yes:)
19580{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
19581$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
19582ac_tool_warned=yes ;;
19583esac
19584    PKG_CONFIG=$ac_pt_PKG_CONFIG
19585  fi
19586else
19587  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
19588fi
19589
19590fi
19591if test -n "$PKG_CONFIG"; then
19592	_pkg_min_version=0.9.0
19593	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
19594$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
19595	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
19596		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19597$as_echo "yes" >&6; }
19598	else
19599		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19600$as_echo "no" >&6; }
19601		PKG_CONFIG=""
19602	fi
19603
19604fi
19605
19606# After basic tools have been setup, we can check build os specific details.
19607
19608  ###############################################################################
19609
19610  # Note that this is the build platform OS version!
19611
19612  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
19613  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
19614  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
19615  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
19616
19617
19618
19619
19620
19621# Setup builddeps, for automatic downloading of tools we need.
19622# This is needed before we can call BDEPS_CHECK_MODULE, which is done in
19623# boot-jdk setup, but we need to have basic tools setup first.
19624
19625
19626# Check whether --with-builddeps-conf was given.
19627if test "${with_builddeps_conf+set}" = set; then :
19628  withval=$with_builddeps_conf;
19629fi
19630
19631
19632
19633# Check whether --with-builddeps-server was given.
19634if test "${with_builddeps_server+set}" = set; then :
19635  withval=$with_builddeps_server;
19636fi
19637
19638
19639
19640# Check whether --with-builddeps-dir was given.
19641if test "${with_builddeps_dir+set}" = set; then :
19642  withval=$with_builddeps_dir;
19643else
19644  with_builddeps_dir=/localhome/builddeps
19645fi
19646
19647
19648
19649# Check whether --with-builddeps-group was given.
19650if test "${with_builddeps_group+set}" = set; then :
19651  withval=$with_builddeps_group;
19652fi
19653
19654
19655
19656
19657  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
19658    if test "x$with_builddeps_conf" != x; then
19659      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supplied builddeps configuration file" >&5
19660$as_echo_n "checking for supplied builddeps configuration file... " >&6; }
19661      builddepsfile=$with_builddeps_conf
19662      if test -s $builddepsfile; then
19663        . $builddepsfile
19664        { $as_echo "$as_me:${as_lineno-$LINENO}: result: loaded!" >&5
19665$as_echo "loaded!" >&6; }
19666      else
19667        as_fn_error $? "The given builddeps conf file $with_builddeps_conf could not be loaded!" "$LINENO" 5
19668      fi
19669    else
19670      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for builddeps.conf files in sources..." >&5
19671$as_echo_n "checking for builddeps.conf files in sources...... " >&6; }
19672      builddepsfile=`mktemp`
19673      touch $builddepsfile
19674      # Put all found confs into a single file.
19675      find ${SRC_ROOT} -name builddeps.conf -exec cat \{\} \; >> $builddepsfile
19676      # Source the file to acquire the variables
19677      if test -s $builddepsfile; then
19678        . $builddepsfile
19679        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found at least one!" >&5
19680$as_echo "found at least one!" >&6; }
19681      else
19682        as_fn_error $? "Could not find any builddeps.conf at all!" "$LINENO" 5
19683      fi
19684    fi
19685    # Create build and target names that use _ instead of "-" and ".".
19686    # This is necessary to use them in variable names.
19687    build_var=`echo ${OPENJDK_BUILD_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19688    target_var=`echo ${OPENJDK_TARGET_AUTOCONF_NAME} | tr '-' '_' | tr '.' '_'`
19689    # Extract rewrite information for build and target
19690    eval rewritten_build=\${REWRITE_${build_var}}
19691    if test "x$rewritten_build" = x; then
19692      rewritten_build=${OPENJDK_BUILD_AUTOCONF_NAME}
19693      echo Build stays the same $rewritten_build
19694    else
19695      echo Rewriting build for builddeps into $rewritten_build
19696    fi
19697    eval rewritten_target=\${REWRITE_${target_var}}
19698    if test "x$rewritten_target" = x; then
19699      rewritten_target=${OPENJDK_TARGET_AUTOCONF_NAME}
19700      echo Target stays the same $rewritten_target
19701    else
19702      echo Rewriting target for builddeps into $rewritten_target
19703    fi
19704    rewritten_build_var=`echo ${rewritten_build} | tr '-' '_' | tr '.' '_'`
19705    rewritten_target_var=`echo ${rewritten_target} | tr '-' '_' | tr '.' '_'`
19706  fi
19707  for ac_prog in 7z unzip
19708do
19709  # Extract the first word of "$ac_prog", so it can be a program name with args.
19710set dummy $ac_prog; ac_word=$2
19711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19712$as_echo_n "checking for $ac_word... " >&6; }
19713if ${ac_cv_prog_BDEPS_UNZIP+:} false; then :
19714  $as_echo_n "(cached) " >&6
19715else
19716  if test -n "$BDEPS_UNZIP"; then
19717  ac_cv_prog_BDEPS_UNZIP="$BDEPS_UNZIP" # Let the user override the test.
19718else
19719as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19720for as_dir in $PATH
19721do
19722  IFS=$as_save_IFS
19723  test -z "$as_dir" && as_dir=.
19724    for ac_exec_ext in '' $ac_executable_extensions; do
19725  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19726    ac_cv_prog_BDEPS_UNZIP="$ac_prog"
19727    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19728    break 2
19729  fi
19730done
19731  done
19732IFS=$as_save_IFS
19733
19734fi
19735fi
19736BDEPS_UNZIP=$ac_cv_prog_BDEPS_UNZIP
19737if test -n "$BDEPS_UNZIP"; then
19738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_UNZIP" >&5
19739$as_echo "$BDEPS_UNZIP" >&6; }
19740else
19741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19742$as_echo "no" >&6; }
19743fi
19744
19745
19746  test -n "$BDEPS_UNZIP" && break
19747done
19748
19749  if test "x$BDEPS_UNZIP" = x7z; then
19750    BDEPS_UNZIP="7z x"
19751  fi
19752
19753  for ac_prog in wget lftp ftp
19754do
19755  # Extract the first word of "$ac_prog", so it can be a program name with args.
19756set dummy $ac_prog; ac_word=$2
19757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19758$as_echo_n "checking for $ac_word... " >&6; }
19759if ${ac_cv_prog_BDEPS_FTP+:} false; then :
19760  $as_echo_n "(cached) " >&6
19761else
19762  if test -n "$BDEPS_FTP"; then
19763  ac_cv_prog_BDEPS_FTP="$BDEPS_FTP" # Let the user override the test.
19764else
19765as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19766for as_dir in $PATH
19767do
19768  IFS=$as_save_IFS
19769  test -z "$as_dir" && as_dir=.
19770    for ac_exec_ext in '' $ac_executable_extensions; do
19771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19772    ac_cv_prog_BDEPS_FTP="$ac_prog"
19773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19774    break 2
19775  fi
19776done
19777  done
19778IFS=$as_save_IFS
19779
19780fi
19781fi
19782BDEPS_FTP=$ac_cv_prog_BDEPS_FTP
19783if test -n "$BDEPS_FTP"; then
19784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BDEPS_FTP" >&5
19785$as_echo "$BDEPS_FTP" >&6; }
19786else
19787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19788$as_echo "no" >&6; }
19789fi
19790
19791
19792  test -n "$BDEPS_FTP" && break
19793done
19794
19795
19796
19797###############################################################################
19798#
19799# Determine OpenJDK variants, options and version numbers.
19800#
19801###############################################################################
19802
19803# We need build & target for this.
19804
19805
19806  ###############################################################################
19807  #
19808  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
19809  # We always build headless support.
19810  #
19811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
19812$as_echo_n "checking headful support... " >&6; }
19813  # Check whether --enable-headful was given.
19814if test "${enable_headful+set}" = set; then :
19815  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
19816else
19817  SUPPORT_HEADFUL=yes
19818fi
19819
19820
19821  SUPPORT_HEADLESS=yes
19822  BUILD_HEADLESS="BUILD_HEADLESS:=true"
19823
19824  if test "x$SUPPORT_HEADFUL" = xyes; then
19825    # We are building both headful and headless.
19826    headful_msg="include support for both headful and headless"
19827  fi
19828
19829  if test "x$SUPPORT_HEADFUL" = xno; then
19830    # Thus we are building headless only.
19831    BUILD_HEADLESS="BUILD_HEADLESS:=true"
19832    headful_msg="headless only"
19833  fi
19834
19835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
19836$as_echo "$headful_msg" >&6; }
19837
19838
19839
19840
19841
19842  # Control wether Hotspot runs Queens test after build.
19843  # Check whether --enable-hotspot-test-in-build was given.
19844if test "${enable_hotspot_test_in_build+set}" = set; then :
19845  enableval=$enable_hotspot_test_in_build;
19846else
19847  enable_hotspot_test_in_build=no
19848fi
19849
19850  if test "x$enable_hotspot_test_in_build" = "xyes"; then
19851    TEST_IN_BUILD=true
19852  else
19853    TEST_IN_BUILD=false
19854  fi
19855
19856
19857  ###############################################################################
19858  #
19859  # Choose cacerts source file
19860  #
19861
19862# Check whether --with-cacerts-file was given.
19863if test "${with_cacerts_file+set}" = set; then :
19864  withval=$with_cacerts_file;
19865fi
19866
19867  if test "x$with_cacerts_file" != x; then
19868    CACERTS_FILE=$with_cacerts_file
19869  else
19870    CACERTS_FILE=${SRC_ROOT}/jdk/src/share/lib/security/cacerts
19871  fi
19872
19873
19874  ###############################################################################
19875  #
19876  # Enable or disable unlimited crypto
19877  #
19878  # Check whether --enable-unlimited-crypto was given.
19879if test "${enable_unlimited_crypto+set}" = set; then :
19880  enableval=$enable_unlimited_crypto;
19881else
19882  enable_unlimited_crypto=no
19883fi
19884
19885  if test "x$enable_unlimited_crypto" = "xyes"; then
19886    UNLIMITED_CRYPTO=true
19887  else
19888    UNLIMITED_CRYPTO=false
19889  fi
19890
19891
19892  ###############################################################################
19893  #
19894  # Enable or disable the elliptic curve crypto implementation
19895  #
19896
19897
19898  ###############################################################################
19899  #
19900  # --enable-rmiconnector-iiop
19901  #
19902  # Check whether --enable-rmiconnector-iiop was given.
19903if test "${enable_rmiconnector_iiop+set}" = set; then :
19904  enableval=$enable_rmiconnector_iiop;
19905fi
19906
19907  if test "x$enable_rmiconnector_iiop" = "xyes"; then
19908    RMICONNECTOR_IIOP=true
19909  else
19910    RMICONNECTOR_IIOP=false
19911  fi
19912
19913
19914  ###############################################################################
19915  #
19916  # Compress jars
19917  #
19918  COMPRESS_JARS=false
19919
19920
19921
19922
19923  # Source the version numbers
19924  . $AUTOCONF_DIR/version-numbers
19925
19926  # Get the settings from parameters
19927
19928# Check whether --with-milestone was given.
19929if test "${with_milestone+set}" = set; then :
19930  withval=$with_milestone;
19931fi
19932
19933  if test "x$with_milestone" = xyes; then
19934    as_fn_error $? "Milestone must have a value" "$LINENO" 5
19935  elif test "x$with_milestone" != x; then
19936    MILESTONE="$with_milestone"
19937  fi
19938  if test "x$MILESTONE" = x; then
19939    MILESTONE=internal
19940  fi
19941
19942
19943# Check whether --with-update-version was given.
19944if test "${with_update_version+set}" = set; then :
19945  withval=$with_update_version;
19946fi
19947
19948  if test "x$with_update_version" = xyes; then
19949    as_fn_error $? "Update version must have a value" "$LINENO" 5
19950  elif test "x$with_update_version" != x; then
19951    JDK_UPDATE_VERSION="$with_update_version"
19952    # On macosx 10.7, it's not possible to set --with-update-version=0X due
19953    # to a bug in expr (which reduces it to just X). To work around this, we
19954    # always add a 0 to one digit update versions.
19955    if test "${#JDK_UPDATE_VERSION}" = "1"; then
19956      JDK_UPDATE_VERSION="0${JDK_UPDATE_VERSION}"
19957    fi
19958  fi
19959
19960
19961# Check whether --with-user-release-suffix was given.
19962if test "${with_user_release_suffix+set}" = set; then :
19963  withval=$with_user_release_suffix;
19964fi
19965
19966  if test "x$with_user_release_suffix" = xyes; then
19967    as_fn_error $? "Release suffix must have a value" "$LINENO" 5
19968  elif test "x$with_user_release_suffix" != x; then
19969    USER_RELEASE_SUFFIX="$with_user_release_suffix"
19970  fi
19971
19972
19973# Check whether --with-build-number was given.
19974if test "${with_build_number+set}" = set; then :
19975  withval=$with_build_number;
19976fi
19977
19978  if test "x$with_build_number" = xyes; then
19979    as_fn_error $? "Build number must have a value" "$LINENO" 5
19980  elif test "x$with_build_number" != x; then
19981    JDK_BUILD_NUMBER="$with_build_number"
19982  fi
19983  # Define default USER_RELEASE_SUFFIX if BUILD_NUMBER and USER_RELEASE_SUFFIX are not set
19984  if test "x$JDK_BUILD_NUMBER" = x; then
19985    JDK_BUILD_NUMBER=b00
19986    if test "x$USER_RELEASE_SUFFIX" = x; then
19987      BUILD_DATE=`date '+%Y_%m_%d_%H_%M'`
19988      # Avoid [:alnum:] since it depends on the locale.
19989      CLEAN_USERNAME=`echo "$USER" | $TR -d -c 'abcdefghijklmnopqrstuvqxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'`
19990      USER_RELEASE_SUFFIX=`echo "${CLEAN_USERNAME}_${BUILD_DATE}" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19991    fi
19992  fi
19993
19994  # Now set the JDK version, milestone, build number etc.
19995
19996
19997
19998
19999
20000
20001
20002
20003
20004
20005
20006
20007
20008
20009
20010  COPYRIGHT_YEAR=`date +'%Y'`
20011
20012
20013  if test "x$JDK_UPDATE_VERSION" != x; then
20014    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}_${JDK_UPDATE_VERSION}"
20015  else
20016    JDK_VERSION="${JDK_MAJOR_VERSION}.${JDK_MINOR_VERSION}.${JDK_MICRO_VERSION}"
20017  fi
20018
20019
20020  COOKED_BUILD_NUMBER=`$ECHO $JDK_BUILD_NUMBER | $SED -e 's/^b//' -e 's/^0//'`
20021
20022
20023
20024###############################################################################
20025#
20026# Setup BootJDK, used to bootstrap the build.
20027#
20028###############################################################################
20029
20030
20031  BOOT_JDK_FOUND=no
20032
20033# Check whether --with-boot-jdk was given.
20034if test "${with_boot_jdk+set}" = set; then :
20035  withval=$with_boot_jdk;
20036fi
20037
20038
20039  # We look for the Boot JDK through various means, going from more certain to
20040  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
20041  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
20042  # must check if this is indeed valid; otherwise we'll continue looking.
20043
20044  # Test: Is bootjdk explicitely set by command line arguments?
20045
20046  if test "x$BOOT_JDK_FOUND" = xno; then
20047    # Now execute the test
20048
20049  if test "x$with_boot_jdk" != x; then
20050    BOOT_JDK=$with_boot_jdk
20051    BOOT_JDK_FOUND=maybe
20052    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
20053$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
20054  fi
20055
20056
20057    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20058    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20059      # Do we have a bin/java?
20060      if test ! -x "$BOOT_JDK/bin/java"; then
20061        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20062$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20063        BOOT_JDK_FOUND=no
20064      else
20065        # Do we have a bin/javac?
20066        if test ! -x "$BOOT_JDK/bin/javac"; then
20067          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20068$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20069          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20070$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20071          BOOT_JDK_FOUND=no
20072        else
20073          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20074          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20075            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20076$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20077            BOOT_JDK_FOUND=no
20078          else
20079            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20080            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20081
20082            # Extra M4 quote needed to protect [] in grep expression.
20083            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20084            if test "x$FOUND_CORRECT_VERSION" = x; then
20085              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20086$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20087              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20088$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20089              BOOT_JDK_FOUND=no
20090            else
20091              # We're done! :-)
20092              BOOT_JDK_FOUND=yes
20093
20094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20095
20096  # Input might be given as Windows format, start by converting to
20097  # unix format.
20098  path="$BOOT_JDK"
20099  new_path=`$CYGPATH -u "$path"`
20100
20101  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20102  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20103  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20104  # "foo.exe" is OK but "foo" is an error.
20105  #
20106  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20107  # It is also a way to make sure we got the proper file name for the real test later on.
20108  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20109  if test "x$test_shortpath" = x; then
20110    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20111$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20112    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20113  fi
20114
20115  # Call helper function which possibly converts this using DOS-style short mode.
20116  # If so, the updated path is stored in $new_path.
20117
20118  input_path="$new_path"
20119  # Check if we need to convert this using DOS-style short mode. If the path
20120  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20121  # take no chances and rewrite it.
20122  # Note: m4 eats our [], so we need to use [ and ] instead.
20123  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20124  if test "x$has_forbidden_chars" != x; then
20125    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20126    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20127    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20128    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20129      # Going to short mode and back again did indeed matter. Since short mode is
20130      # case insensitive, let's make it lowercase to improve readability.
20131      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20132      # Now convert it back to Unix-stile (cygpath)
20133      input_path=`$CYGPATH -u "$shortmode_path"`
20134      new_path="$input_path"
20135    fi
20136  fi
20137
20138  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20139  if test "x$test_cygdrive_prefix" = x; then
20140    # As a simple fix, exclude /usr/bin since it's not a real path.
20141    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20142      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20143      # a path prefixed by /cygdrive for fixpath to work.
20144      new_path="$CYGWIN_ROOT_PATH$input_path"
20145    fi
20146  fi
20147
20148
20149  if test "x$path" != "x$new_path"; then
20150    BOOT_JDK="$new_path"
20151    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20152$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20153  fi
20154
20155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20156
20157  path="$BOOT_JDK"
20158  has_colon=`$ECHO $path | $GREP ^.:`
20159  new_path="$path"
20160  if test "x$has_colon" = x; then
20161    # Not in mixed or Windows style, start by that.
20162    new_path=`cmd //c echo $path`
20163  fi
20164
20165
20166  input_path="$new_path"
20167  # Check if we need to convert this using DOS-style short mode. If the path
20168  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20169  # take no chances and rewrite it.
20170  # Note: m4 eats our [], so we need to use [ and ] instead.
20171  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20172  if test "x$has_forbidden_chars" != x; then
20173    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20174    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20175  fi
20176
20177
20178  windows_path="$new_path"
20179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20180    unix_path=`$CYGPATH -u "$windows_path"`
20181    new_path="$unix_path"
20182  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20183    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20184    new_path="$unix_path"
20185  fi
20186
20187  if test "x$path" != "x$new_path"; then
20188    BOOT_JDK="$new_path"
20189    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20190$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20191  fi
20192
20193  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20194  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20195
20196  else
20197    # We're on a posix platform. Hooray! :)
20198    path="$BOOT_JDK"
20199    has_space=`$ECHO "$path" | $GREP " "`
20200    if test "x$has_space" != x; then
20201      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20202$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20203      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20204    fi
20205
20206    # Use eval to expand a potential ~
20207    eval path="$path"
20208    if test ! -f "$path" && test ! -d "$path"; then
20209      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20210    fi
20211
20212    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20213  fi
20214
20215              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20216$as_echo_n "checking for Boot JDK... " >&6; }
20217              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20218$as_echo "$BOOT_JDK" >&6; }
20219              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20220$as_echo_n "checking Boot JDK version... " >&6; }
20221              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20222              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20223$as_echo "$BOOT_JDK_VERSION" >&6; }
20224            fi # end check jdk version
20225          fi # end check rt.jar
20226        fi # end check javac
20227      fi # end check java
20228    fi # end check boot jdk found
20229  fi
20230
20231  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
20232    # Having specified an argument which is incorrect will produce an instant failure;
20233    # we should not go on looking
20234    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
20235  fi
20236
20237  # Test: Is bootjdk available from builddeps?
20238
20239  if test "x$BOOT_JDK_FOUND" = xno; then
20240    # Now execute the test
20241
20242
20243
20244  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
20245    # Source the builddeps file again, to make sure it uses the latest variables!
20246    . $builddepsfile
20247    # Look for a target and build machine specific resource!
20248    eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
20249    if test "x$resource" = x; then
20250      # Ok, lets instead look for a target specific resource
20251      eval resource=\${builddep_bootjdk_TARGET_${rewritten_target_var}}
20252    fi
20253    if test "x$resource" = x; then
20254      # Ok, lets instead look for a build specific resource
20255      eval resource=\${builddep_bootjdk_BUILD_${rewritten_build_var}}
20256    fi
20257    if test "x$resource" = x; then
20258      # Ok, lets instead look for a generic resource
20259      # (The bootjdk comes from M4 and not the shell, thus no need for eval here.)
20260      resource=${builddep_bootjdk}
20261    fi
20262    if test "x$resource" != x; then
20263      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for bootjdk" >&5
20264$as_echo "$as_me: Using builddeps $resource for bootjdk" >&6;}
20265      # If the resource in the builddeps.conf file is an existing directory,
20266      # for example /java/linux/cups
20267      if test -d ${resource}; then
20268        depdir=${resource}
20269      else
20270
20271  # bootjdk is for example mymodule
20272  # $resource is for example libs/general/libmymod_1_2_3.zip
20273  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
20274  # $with_builddeps_dir is for example /localhome/builddeps
20275  # depdir is the name of the variable into which we store the depdir, eg MYMOD
20276  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
20277  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
20278  filename=`basename $resource`
20279  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
20280  filebase=${filename%%.*}
20281  extension=${filename#*.}
20282  installdir=$with_builddeps_dir/$filebase
20283  if test ! -f $installdir/$filename.unpacked; then
20284    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&5
20285$as_echo "$as_me: Downloading build dependency bootjdk from $with_builddeps_server/$resource and installing into $installdir" >&6;}
20286    if test ! -d $installdir; then
20287      mkdir -p $installdir
20288    fi
20289    if test ! -d $installdir; then
20290      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
20291    fi
20292    tmpfile=`mktemp $installdir/bootjdk.XXXXXXXXX`
20293    touch $tmpfile
20294    if test ! -f $tmpfile; then
20295      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
20296    fi
20297
20298  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
20299  # $tmpfile is the local file name for the downloaded file.
20300  VALID_TOOL=no
20301  if test "x$BDEPS_FTP" = xwget; then
20302    VALID_TOOL=yes
20303    wget -O $tmpfile $with_builddeps_server/$resource
20304  fi
20305  if test "x$BDEPS_FTP" = xlftp; then
20306    VALID_TOOL=yes
20307    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
20308  fi
20309  if test "x$BDEPS_FTP" = xftp; then
20310    VALID_TOOL=yes
20311    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
20312    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
20313    FTPUSERPWD=${FTPSERVER%%@*}
20314    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
20315      FTPUSER=${userpwd%%:*}
20316      FTPPWD=${userpwd#*@}
20317      FTPSERVER=${FTPSERVER#*@}
20318    else
20319      FTPUSER=ftp
20320      FTPPWD=ftp
20321    fi
20322    # the "pass" command does not work on some
20323    # ftp clients (read ftp.exe) but if it works,
20324    # passive mode is better!
20325    ( \
20326        echo "user $FTPUSER $FTPPWD"        ; \
20327        echo "pass"                         ; \
20328        echo "bin"                          ; \
20329        echo "get $FTPPATH $tmpfile"              ; \
20330    ) | ftp -in $FTPSERVER
20331  fi
20332  if test "x$VALID_TOOL" != xyes; then
20333    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
20334  fi
20335
20336    mv $tmpfile $installdir/$filename
20337    if test ! -s $installdir/$filename; then
20338      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
20339    fi
20340    case "$extension" in
20341      zip)  echo "Unzipping $installdir/$filename..."
20342        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
20343        ;;
20344      tar.gz) echo "Untaring $installdir/$filename..."
20345        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20346        ;;
20347      tgz) echo "Untaring $installdir/$filename..."
20348        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
20349        ;;
20350      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
20351        ;;
20352    esac
20353  fi
20354  if test -f $installdir/$filename.unpacked; then
20355    depdir=$installdir
20356  fi
20357
20358      fi
20359      # Source the builddeps file again, because in the previous command, the depdir
20360      # was updated to point at the current build dependency install directory.
20361      . $builddepsfile
20362      # Now extract variables from the builddeps.conf files.
20363      theroot=${builddep_bootjdk_ROOT}
20364      thecflags=${builddep_bootjdk_CFLAGS}
20365      thelibs=${builddep_bootjdk_LIBS}
20366      if test "x$depdir" = x; then
20367        as_fn_error $? "Could not download build dependency bootjdk" "$LINENO" 5
20368      fi
20369      BOOT_JDK=$depdir
20370      if test "x$theroot" != x; then
20371        BOOT_JDK="$theroot"
20372      fi
20373      if test "x$thecflags" != x; then
20374        BOOT_JDK_CFLAGS="$thecflags"
20375      fi
20376      if test "x$thelibs" != x; then
20377        BOOT_JDK_LIBS="$thelibs"
20378      fi
20379      BOOT_JDK_FOUND=maybe
20380      else BOOT_JDK_FOUND=no
20381
20382    fi
20383    else BOOT_JDK_FOUND=no
20384
20385  fi
20386
20387
20388
20389    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20390    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20391      # Do we have a bin/java?
20392      if test ! -x "$BOOT_JDK/bin/java"; then
20393        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20394$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20395        BOOT_JDK_FOUND=no
20396      else
20397        # Do we have a bin/javac?
20398        if test ! -x "$BOOT_JDK/bin/javac"; then
20399          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20400$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20401          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20402$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20403          BOOT_JDK_FOUND=no
20404        else
20405          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20406          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20407            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20409            BOOT_JDK_FOUND=no
20410          else
20411            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20412            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20413
20414            # Extra M4 quote needed to protect [] in grep expression.
20415            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20416            if test "x$FOUND_CORRECT_VERSION" = x; then
20417              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20418$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20419              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20420$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20421              BOOT_JDK_FOUND=no
20422            else
20423              # We're done! :-)
20424              BOOT_JDK_FOUND=yes
20425
20426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20427
20428  # Input might be given as Windows format, start by converting to
20429  # unix format.
20430  path="$BOOT_JDK"
20431  new_path=`$CYGPATH -u "$path"`
20432
20433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20436  # "foo.exe" is OK but "foo" is an error.
20437  #
20438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20439  # It is also a way to make sure we got the proper file name for the real test later on.
20440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20441  if test "x$test_shortpath" = x; then
20442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20445  fi
20446
20447  # Call helper function which possibly converts this using DOS-style short mode.
20448  # If so, the updated path is stored in $new_path.
20449
20450  input_path="$new_path"
20451  # Check if we need to convert this using DOS-style short mode. If the path
20452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20453  # take no chances and rewrite it.
20454  # Note: m4 eats our [], so we need to use [ and ] instead.
20455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20456  if test "x$has_forbidden_chars" != x; then
20457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20461      # Going to short mode and back again did indeed matter. Since short mode is
20462      # case insensitive, let's make it lowercase to improve readability.
20463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20464      # Now convert it back to Unix-stile (cygpath)
20465      input_path=`$CYGPATH -u "$shortmode_path"`
20466      new_path="$input_path"
20467    fi
20468  fi
20469
20470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20471  if test "x$test_cygdrive_prefix" = x; then
20472    # As a simple fix, exclude /usr/bin since it's not a real path.
20473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20475      # a path prefixed by /cygdrive for fixpath to work.
20476      new_path="$CYGWIN_ROOT_PATH$input_path"
20477    fi
20478  fi
20479
20480
20481  if test "x$path" != "x$new_path"; then
20482    BOOT_JDK="$new_path"
20483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20485  fi
20486
20487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20488
20489  path="$BOOT_JDK"
20490  has_colon=`$ECHO $path | $GREP ^.:`
20491  new_path="$path"
20492  if test "x$has_colon" = x; then
20493    # Not in mixed or Windows style, start by that.
20494    new_path=`cmd //c echo $path`
20495  fi
20496
20497
20498  input_path="$new_path"
20499  # Check if we need to convert this using DOS-style short mode. If the path
20500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20501  # take no chances and rewrite it.
20502  # Note: m4 eats our [], so we need to use [ and ] instead.
20503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20504  if test "x$has_forbidden_chars" != x; then
20505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20507  fi
20508
20509
20510  windows_path="$new_path"
20511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20512    unix_path=`$CYGPATH -u "$windows_path"`
20513    new_path="$unix_path"
20514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20516    new_path="$unix_path"
20517  fi
20518
20519  if test "x$path" != "x$new_path"; then
20520    BOOT_JDK="$new_path"
20521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20523  fi
20524
20525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20527
20528  else
20529    # We're on a posix platform. Hooray! :)
20530    path="$BOOT_JDK"
20531    has_space=`$ECHO "$path" | $GREP " "`
20532    if test "x$has_space" != x; then
20533      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20535      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20536    fi
20537
20538    # Use eval to expand a potential ~
20539    eval path="$path"
20540    if test ! -f "$path" && test ! -d "$path"; then
20541      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20542    fi
20543
20544    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20545  fi
20546
20547              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20548$as_echo_n "checking for Boot JDK... " >&6; }
20549              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20550$as_echo "$BOOT_JDK" >&6; }
20551              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20552$as_echo_n "checking Boot JDK version... " >&6; }
20553              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20554              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20555$as_echo "$BOOT_JDK_VERSION" >&6; }
20556            fi # end check jdk version
20557          fi # end check rt.jar
20558        fi # end check javac
20559      fi # end check java
20560    fi # end check boot jdk found
20561  fi
20562
20563
20564  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
20565
20566  if test "x$BOOT_JDK_FOUND" = xno; then
20567    # Now execute the test
20568
20569  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
20570    # First check at user selected default
20571
20572  if test "x$BOOT_JDK_FOUND" = xno; then
20573    # Now execute the test
20574
20575  if test -x /usr/libexec/java_home; then
20576    BOOT_JDK=`/usr/libexec/java_home `
20577    BOOT_JDK_FOUND=maybe
20578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
20579$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
20580  fi
20581
20582
20583    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20584    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20585      # Do we have a bin/java?
20586      if test ! -x "$BOOT_JDK/bin/java"; then
20587        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20588$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20589        BOOT_JDK_FOUND=no
20590      else
20591        # Do we have a bin/javac?
20592        if test ! -x "$BOOT_JDK/bin/javac"; then
20593          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20594$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20595          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20596$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20597          BOOT_JDK_FOUND=no
20598        else
20599          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20600          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20601            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20602$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20603            BOOT_JDK_FOUND=no
20604          else
20605            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20606            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20607
20608            # Extra M4 quote needed to protect [] in grep expression.
20609            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20610            if test "x$FOUND_CORRECT_VERSION" = x; then
20611              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20613              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20614$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20615              BOOT_JDK_FOUND=no
20616            else
20617              # We're done! :-)
20618              BOOT_JDK_FOUND=yes
20619
20620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20621
20622  # Input might be given as Windows format, start by converting to
20623  # unix format.
20624  path="$BOOT_JDK"
20625  new_path=`$CYGPATH -u "$path"`
20626
20627  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20628  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20629  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20630  # "foo.exe" is OK but "foo" is an error.
20631  #
20632  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20633  # It is also a way to make sure we got the proper file name for the real test later on.
20634  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20635  if test "x$test_shortpath" = x; then
20636    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20637$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20638    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20639  fi
20640
20641  # Call helper function which possibly converts this using DOS-style short mode.
20642  # If so, the updated path is stored in $new_path.
20643
20644  input_path="$new_path"
20645  # Check if we need to convert this using DOS-style short mode. If the path
20646  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20647  # take no chances and rewrite it.
20648  # Note: m4 eats our [], so we need to use [ and ] instead.
20649  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20650  if test "x$has_forbidden_chars" != x; then
20651    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20652    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20653    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20654    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20655      # Going to short mode and back again did indeed matter. Since short mode is
20656      # case insensitive, let's make it lowercase to improve readability.
20657      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20658      # Now convert it back to Unix-stile (cygpath)
20659      input_path=`$CYGPATH -u "$shortmode_path"`
20660      new_path="$input_path"
20661    fi
20662  fi
20663
20664  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20665  if test "x$test_cygdrive_prefix" = x; then
20666    # As a simple fix, exclude /usr/bin since it's not a real path.
20667    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20668      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20669      # a path prefixed by /cygdrive for fixpath to work.
20670      new_path="$CYGWIN_ROOT_PATH$input_path"
20671    fi
20672  fi
20673
20674
20675  if test "x$path" != "x$new_path"; then
20676    BOOT_JDK="$new_path"
20677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20678$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20679  fi
20680
20681  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20682
20683  path="$BOOT_JDK"
20684  has_colon=`$ECHO $path | $GREP ^.:`
20685  new_path="$path"
20686  if test "x$has_colon" = x; then
20687    # Not in mixed or Windows style, start by that.
20688    new_path=`cmd //c echo $path`
20689  fi
20690
20691
20692  input_path="$new_path"
20693  # Check if we need to convert this using DOS-style short mode. If the path
20694  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20695  # take no chances and rewrite it.
20696  # Note: m4 eats our [], so we need to use [ and ] instead.
20697  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20698  if test "x$has_forbidden_chars" != x; then
20699    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20700    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20701  fi
20702
20703
20704  windows_path="$new_path"
20705  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20706    unix_path=`$CYGPATH -u "$windows_path"`
20707    new_path="$unix_path"
20708  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20709    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20710    new_path="$unix_path"
20711  fi
20712
20713  if test "x$path" != "x$new_path"; then
20714    BOOT_JDK="$new_path"
20715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20717  fi
20718
20719  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20720  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20721
20722  else
20723    # We're on a posix platform. Hooray! :)
20724    path="$BOOT_JDK"
20725    has_space=`$ECHO "$path" | $GREP " "`
20726    if test "x$has_space" != x; then
20727      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20728$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20729      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20730    fi
20731
20732    # Use eval to expand a potential ~
20733    eval path="$path"
20734    if test ! -f "$path" && test ! -d "$path"; then
20735      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20736    fi
20737
20738    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20739  fi
20740
20741              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20742$as_echo_n "checking for Boot JDK... " >&6; }
20743              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20744$as_echo "$BOOT_JDK" >&6; }
20745              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20746$as_echo_n "checking Boot JDK version... " >&6; }
20747              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20748              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20749$as_echo "$BOOT_JDK_VERSION" >&6; }
20750            fi # end check jdk version
20751          fi # end check rt.jar
20752        fi # end check javac
20753      fi # end check java
20754    fi # end check boot jdk found
20755  fi
20756
20757    # If that did not work out (e.g. too old), try explicit versions instead
20758
20759  if test "x$BOOT_JDK_FOUND" = xno; then
20760    # Now execute the test
20761
20762  if test -x /usr/libexec/java_home; then
20763    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
20764    BOOT_JDK_FOUND=maybe
20765    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
20766$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
20767  fi
20768
20769
20770    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20771    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20772      # Do we have a bin/java?
20773      if test ! -x "$BOOT_JDK/bin/java"; then
20774        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20775$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20776        BOOT_JDK_FOUND=no
20777      else
20778        # Do we have a bin/javac?
20779        if test ! -x "$BOOT_JDK/bin/javac"; then
20780          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20781$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20782          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20783$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20784          BOOT_JDK_FOUND=no
20785        else
20786          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20787          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20788            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20789$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20790            BOOT_JDK_FOUND=no
20791          else
20792            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20793            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20794
20795            # Extra M4 quote needed to protect [] in grep expression.
20796            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20797            if test "x$FOUND_CORRECT_VERSION" = x; then
20798              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20799$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20800              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20801$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20802              BOOT_JDK_FOUND=no
20803            else
20804              # We're done! :-)
20805              BOOT_JDK_FOUND=yes
20806
20807  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20808
20809  # Input might be given as Windows format, start by converting to
20810  # unix format.
20811  path="$BOOT_JDK"
20812  new_path=`$CYGPATH -u "$path"`
20813
20814  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20815  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20816  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20817  # "foo.exe" is OK but "foo" is an error.
20818  #
20819  # This test is therefore slightly more accurate than "test -f" to check for file precense.
20820  # It is also a way to make sure we got the proper file name for the real test later on.
20821  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20822  if test "x$test_shortpath" = x; then
20823    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20824$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20825    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
20826  fi
20827
20828  # Call helper function which possibly converts this using DOS-style short mode.
20829  # If so, the updated path is stored in $new_path.
20830
20831  input_path="$new_path"
20832  # Check if we need to convert this using DOS-style short mode. If the path
20833  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20834  # take no chances and rewrite it.
20835  # Note: m4 eats our [], so we need to use [ and ] instead.
20836  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20837  if test "x$has_forbidden_chars" != x; then
20838    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20839    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20840    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20841    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20842      # Going to short mode and back again did indeed matter. Since short mode is
20843      # case insensitive, let's make it lowercase to improve readability.
20844      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20845      # Now convert it back to Unix-stile (cygpath)
20846      input_path=`$CYGPATH -u "$shortmode_path"`
20847      new_path="$input_path"
20848    fi
20849  fi
20850
20851  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20852  if test "x$test_cygdrive_prefix" = x; then
20853    # As a simple fix, exclude /usr/bin since it's not a real path.
20854    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
20855      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20856      # a path prefixed by /cygdrive for fixpath to work.
20857      new_path="$CYGWIN_ROOT_PATH$input_path"
20858    fi
20859  fi
20860
20861
20862  if test "x$path" != "x$new_path"; then
20863    BOOT_JDK="$new_path"
20864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20865$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20866  fi
20867
20868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20869
20870  path="$BOOT_JDK"
20871  has_colon=`$ECHO $path | $GREP ^.:`
20872  new_path="$path"
20873  if test "x$has_colon" = x; then
20874    # Not in mixed or Windows style, start by that.
20875    new_path=`cmd //c echo $path`
20876  fi
20877
20878
20879  input_path="$new_path"
20880  # Check if we need to convert this using DOS-style short mode. If the path
20881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20882  # take no chances and rewrite it.
20883  # Note: m4 eats our [], so we need to use [ and ] instead.
20884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20885  if test "x$has_forbidden_chars" != x; then
20886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20887    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20888  fi
20889
20890
20891  windows_path="$new_path"
20892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20893    unix_path=`$CYGPATH -u "$windows_path"`
20894    new_path="$unix_path"
20895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20897    new_path="$unix_path"
20898  fi
20899
20900  if test "x$path" != "x$new_path"; then
20901    BOOT_JDK="$new_path"
20902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
20903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
20904  fi
20905
20906  # Save the first 10 bytes of this path to the storage, so fixpath can work.
20907  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20908
20909  else
20910    # We're on a posix platform. Hooray! :)
20911    path="$BOOT_JDK"
20912    has_space=`$ECHO "$path" | $GREP " "`
20913    if test "x$has_space" != x; then
20914      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
20915$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
20916      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
20917    fi
20918
20919    # Use eval to expand a potential ~
20920    eval path="$path"
20921    if test ! -f "$path" && test ! -d "$path"; then
20922      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
20923    fi
20924
20925    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
20926  fi
20927
20928              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
20929$as_echo_n "checking for Boot JDK... " >&6; }
20930              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
20931$as_echo "$BOOT_JDK" >&6; }
20932              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
20933$as_echo_n "checking Boot JDK version... " >&6; }
20934              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
20935              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
20936$as_echo "$BOOT_JDK_VERSION" >&6; }
20937            fi # end check jdk version
20938          fi # end check rt.jar
20939        fi # end check javac
20940      fi # end check java
20941    fi # end check boot jdk found
20942  fi
20943
20944
20945  if test "x$BOOT_JDK_FOUND" = xno; then
20946    # Now execute the test
20947
20948  if test -x /usr/libexec/java_home; then
20949    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
20950    BOOT_JDK_FOUND=maybe
20951    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
20952$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
20953  fi
20954
20955
20956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
20957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
20958      # Do we have a bin/java?
20959      if test ! -x "$BOOT_JDK/bin/java"; then
20960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
20961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
20962        BOOT_JDK_FOUND=no
20963      else
20964        # Do we have a bin/javac?
20965        if test ! -x "$BOOT_JDK/bin/javac"; then
20966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
20967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
20968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
20969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
20970          BOOT_JDK_FOUND=no
20971        else
20972          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
20973          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
20974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
20975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
20976            BOOT_JDK_FOUND=no
20977          else
20978            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
20979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
20980
20981            # Extra M4 quote needed to protect [] in grep expression.
20982            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
20983            if test "x$FOUND_CORRECT_VERSION" = x; then
20984              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
20985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
20986              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
20987$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
20988              BOOT_JDK_FOUND=no
20989            else
20990              # We're done! :-)
20991              BOOT_JDK_FOUND=yes
20992
20993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20994
20995  # Input might be given as Windows format, start by converting to
20996  # unix format.
20997  path="$BOOT_JDK"
20998  new_path=`$CYGPATH -u "$path"`
20999
21000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21003  # "foo.exe" is OK but "foo" is an error.
21004  #
21005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21006  # It is also a way to make sure we got the proper file name for the real test later on.
21007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21008  if test "x$test_shortpath" = x; then
21009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21012  fi
21013
21014  # Call helper function which possibly converts this using DOS-style short mode.
21015  # If so, the updated path is stored in $new_path.
21016
21017  input_path="$new_path"
21018  # Check if we need to convert this using DOS-style short mode. If the path
21019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21020  # take no chances and rewrite it.
21021  # Note: m4 eats our [], so we need to use [ and ] instead.
21022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21023  if test "x$has_forbidden_chars" != x; then
21024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21028      # Going to short mode and back again did indeed matter. Since short mode is
21029      # case insensitive, let's make it lowercase to improve readability.
21030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21031      # Now convert it back to Unix-stile (cygpath)
21032      input_path=`$CYGPATH -u "$shortmode_path"`
21033      new_path="$input_path"
21034    fi
21035  fi
21036
21037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21038  if test "x$test_cygdrive_prefix" = x; then
21039    # As a simple fix, exclude /usr/bin since it's not a real path.
21040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21042      # a path prefixed by /cygdrive for fixpath to work.
21043      new_path="$CYGWIN_ROOT_PATH$input_path"
21044    fi
21045  fi
21046
21047
21048  if test "x$path" != "x$new_path"; then
21049    BOOT_JDK="$new_path"
21050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21052  fi
21053
21054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21055
21056  path="$BOOT_JDK"
21057  has_colon=`$ECHO $path | $GREP ^.:`
21058  new_path="$path"
21059  if test "x$has_colon" = x; then
21060    # Not in mixed or Windows style, start by that.
21061    new_path=`cmd //c echo $path`
21062  fi
21063
21064
21065  input_path="$new_path"
21066  # Check if we need to convert this using DOS-style short mode. If the path
21067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21068  # take no chances and rewrite it.
21069  # Note: m4 eats our [], so we need to use [ and ] instead.
21070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21071  if test "x$has_forbidden_chars" != x; then
21072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21074  fi
21075
21076
21077  windows_path="$new_path"
21078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21079    unix_path=`$CYGPATH -u "$windows_path"`
21080    new_path="$unix_path"
21081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21083    new_path="$unix_path"
21084  fi
21085
21086  if test "x$path" != "x$new_path"; then
21087    BOOT_JDK="$new_path"
21088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21090  fi
21091
21092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21094
21095  else
21096    # We're on a posix platform. Hooray! :)
21097    path="$BOOT_JDK"
21098    has_space=`$ECHO "$path" | $GREP " "`
21099    if test "x$has_space" != x; then
21100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21102      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21103    fi
21104
21105    # Use eval to expand a potential ~
21106    eval path="$path"
21107    if test ! -f "$path" && test ! -d "$path"; then
21108      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21109    fi
21110
21111    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21112  fi
21113
21114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21115$as_echo_n "checking for Boot JDK... " >&6; }
21116              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21117$as_echo "$BOOT_JDK" >&6; }
21118              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21119$as_echo_n "checking Boot JDK version... " >&6; }
21120              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21121              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21122$as_echo "$BOOT_JDK_VERSION" >&6; }
21123            fi # end check jdk version
21124          fi # end check rt.jar
21125        fi # end check javac
21126      fi # end check java
21127    fi # end check boot jdk found
21128  fi
21129
21130
21131  if test "x$BOOT_JDK_FOUND" = xno; then
21132    # Now execute the test
21133
21134  if test -x /usr/libexec/java_home; then
21135    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
21136    BOOT_JDK_FOUND=maybe
21137    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
21138$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
21139  fi
21140
21141
21142    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21143    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21144      # Do we have a bin/java?
21145      if test ! -x "$BOOT_JDK/bin/java"; then
21146        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21148        BOOT_JDK_FOUND=no
21149      else
21150        # Do we have a bin/javac?
21151        if test ! -x "$BOOT_JDK/bin/javac"; then
21152          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21153$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21154          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21155$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21156          BOOT_JDK_FOUND=no
21157        else
21158          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21159          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21160            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21162            BOOT_JDK_FOUND=no
21163          else
21164            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21166
21167            # Extra M4 quote needed to protect [] in grep expression.
21168            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21169            if test "x$FOUND_CORRECT_VERSION" = x; then
21170              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21171$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21172              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21173$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21174              BOOT_JDK_FOUND=no
21175            else
21176              # We're done! :-)
21177              BOOT_JDK_FOUND=yes
21178
21179  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21180
21181  # Input might be given as Windows format, start by converting to
21182  # unix format.
21183  path="$BOOT_JDK"
21184  new_path=`$CYGPATH -u "$path"`
21185
21186  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21187  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21188  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21189  # "foo.exe" is OK but "foo" is an error.
21190  #
21191  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21192  # It is also a way to make sure we got the proper file name for the real test later on.
21193  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21194  if test "x$test_shortpath" = x; then
21195    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21196$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21197    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21198  fi
21199
21200  # Call helper function which possibly converts this using DOS-style short mode.
21201  # If so, the updated path is stored in $new_path.
21202
21203  input_path="$new_path"
21204  # Check if we need to convert this using DOS-style short mode. If the path
21205  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21206  # take no chances and rewrite it.
21207  # Note: m4 eats our [], so we need to use [ and ] instead.
21208  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21209  if test "x$has_forbidden_chars" != x; then
21210    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21211    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21212    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21213    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21214      # Going to short mode and back again did indeed matter. Since short mode is
21215      # case insensitive, let's make it lowercase to improve readability.
21216      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21217      # Now convert it back to Unix-stile (cygpath)
21218      input_path=`$CYGPATH -u "$shortmode_path"`
21219      new_path="$input_path"
21220    fi
21221  fi
21222
21223  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21224  if test "x$test_cygdrive_prefix" = x; then
21225    # As a simple fix, exclude /usr/bin since it's not a real path.
21226    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21227      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21228      # a path prefixed by /cygdrive for fixpath to work.
21229      new_path="$CYGWIN_ROOT_PATH$input_path"
21230    fi
21231  fi
21232
21233
21234  if test "x$path" != "x$new_path"; then
21235    BOOT_JDK="$new_path"
21236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21237$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21238  fi
21239
21240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21241
21242  path="$BOOT_JDK"
21243  has_colon=`$ECHO $path | $GREP ^.:`
21244  new_path="$path"
21245  if test "x$has_colon" = x; then
21246    # Not in mixed or Windows style, start by that.
21247    new_path=`cmd //c echo $path`
21248  fi
21249
21250
21251  input_path="$new_path"
21252  # Check if we need to convert this using DOS-style short mode. If the path
21253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21254  # take no chances and rewrite it.
21255  # Note: m4 eats our [], so we need to use [ and ] instead.
21256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21257  if test "x$has_forbidden_chars" != x; then
21258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21259    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21260  fi
21261
21262
21263  windows_path="$new_path"
21264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21265    unix_path=`$CYGPATH -u "$windows_path"`
21266    new_path="$unix_path"
21267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21269    new_path="$unix_path"
21270  fi
21271
21272  if test "x$path" != "x$new_path"; then
21273    BOOT_JDK="$new_path"
21274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21276  fi
21277
21278  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21279  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21280
21281  else
21282    # We're on a posix platform. Hooray! :)
21283    path="$BOOT_JDK"
21284    has_space=`$ECHO "$path" | $GREP " "`
21285    if test "x$has_space" != x; then
21286      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21287$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21288      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21289    fi
21290
21291    # Use eval to expand a potential ~
21292    eval path="$path"
21293    if test ! -f "$path" && test ! -d "$path"; then
21294      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21295    fi
21296
21297    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21298  fi
21299
21300              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21301$as_echo_n "checking for Boot JDK... " >&6; }
21302              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21303$as_echo "$BOOT_JDK" >&6; }
21304              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21305$as_echo_n "checking Boot JDK version... " >&6; }
21306              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21307              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21308$as_echo "$BOOT_JDK_VERSION" >&6; }
21309            fi # end check jdk version
21310          fi # end check rt.jar
21311        fi # end check javac
21312      fi # end check java
21313    fi # end check boot jdk found
21314  fi
21315
21316  fi
21317
21318
21319    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21320    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21321      # Do we have a bin/java?
21322      if test ! -x "$BOOT_JDK/bin/java"; then
21323        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21324$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21325        BOOT_JDK_FOUND=no
21326      else
21327        # Do we have a bin/javac?
21328        if test ! -x "$BOOT_JDK/bin/javac"; then
21329          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21330$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21331          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21332$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21333          BOOT_JDK_FOUND=no
21334        else
21335          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21336          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21337            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21339            BOOT_JDK_FOUND=no
21340          else
21341            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21342            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21343
21344            # Extra M4 quote needed to protect [] in grep expression.
21345            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21346            if test "x$FOUND_CORRECT_VERSION" = x; then
21347              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21349              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21350$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21351              BOOT_JDK_FOUND=no
21352            else
21353              # We're done! :-)
21354              BOOT_JDK_FOUND=yes
21355
21356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21357
21358  # Input might be given as Windows format, start by converting to
21359  # unix format.
21360  path="$BOOT_JDK"
21361  new_path=`$CYGPATH -u "$path"`
21362
21363  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21364  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21365  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21366  # "foo.exe" is OK but "foo" is an error.
21367  #
21368  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21369  # It is also a way to make sure we got the proper file name for the real test later on.
21370  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21371  if test "x$test_shortpath" = x; then
21372    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21373$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21374    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21375  fi
21376
21377  # Call helper function which possibly converts this using DOS-style short mode.
21378  # If so, the updated path is stored in $new_path.
21379
21380  input_path="$new_path"
21381  # Check if we need to convert this using DOS-style short mode. If the path
21382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21383  # take no chances and rewrite it.
21384  # Note: m4 eats our [], so we need to use [ and ] instead.
21385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21386  if test "x$has_forbidden_chars" != x; then
21387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21388    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21389    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21390    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21391      # Going to short mode and back again did indeed matter. Since short mode is
21392      # case insensitive, let's make it lowercase to improve readability.
21393      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21394      # Now convert it back to Unix-stile (cygpath)
21395      input_path=`$CYGPATH -u "$shortmode_path"`
21396      new_path="$input_path"
21397    fi
21398  fi
21399
21400  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21401  if test "x$test_cygdrive_prefix" = x; then
21402    # As a simple fix, exclude /usr/bin since it's not a real path.
21403    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21404      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21405      # a path prefixed by /cygdrive for fixpath to work.
21406      new_path="$CYGWIN_ROOT_PATH$input_path"
21407    fi
21408  fi
21409
21410
21411  if test "x$path" != "x$new_path"; then
21412    BOOT_JDK="$new_path"
21413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21414$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21415  fi
21416
21417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21418
21419  path="$BOOT_JDK"
21420  has_colon=`$ECHO $path | $GREP ^.:`
21421  new_path="$path"
21422  if test "x$has_colon" = x; then
21423    # Not in mixed or Windows style, start by that.
21424    new_path=`cmd //c echo $path`
21425  fi
21426
21427
21428  input_path="$new_path"
21429  # Check if we need to convert this using DOS-style short mode. If the path
21430  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21431  # take no chances and rewrite it.
21432  # Note: m4 eats our [], so we need to use [ and ] instead.
21433  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21434  if test "x$has_forbidden_chars" != x; then
21435    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21436    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21437  fi
21438
21439
21440  windows_path="$new_path"
21441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21442    unix_path=`$CYGPATH -u "$windows_path"`
21443    new_path="$unix_path"
21444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21446    new_path="$unix_path"
21447  fi
21448
21449  if test "x$path" != "x$new_path"; then
21450    BOOT_JDK="$new_path"
21451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21452$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21453  fi
21454
21455  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21456  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21457
21458  else
21459    # We're on a posix platform. Hooray! :)
21460    path="$BOOT_JDK"
21461    has_space=`$ECHO "$path" | $GREP " "`
21462    if test "x$has_space" != x; then
21463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21464$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21465      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21466    fi
21467
21468    # Use eval to expand a potential ~
21469    eval path="$path"
21470    if test ! -f "$path" && test ! -d "$path"; then
21471      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21472    fi
21473
21474    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21475  fi
21476
21477              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21478$as_echo_n "checking for Boot JDK... " >&6; }
21479              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21480$as_echo "$BOOT_JDK" >&6; }
21481              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21482$as_echo_n "checking Boot JDK version... " >&6; }
21483              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21484              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21485$as_echo "$BOOT_JDK_VERSION" >&6; }
21486            fi # end check jdk version
21487          fi # end check rt.jar
21488        fi # end check javac
21489      fi # end check java
21490    fi # end check boot jdk found
21491  fi
21492
21493
21494  # Test: Is $JAVA_HOME set?
21495
21496  if test "x$BOOT_JDK_FOUND" = xno; then
21497    # Now execute the test
21498
21499  if test "x$JAVA_HOME" != x; then
21500    JAVA_HOME_PROCESSED="$JAVA_HOME"
21501
21502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21503
21504  # Input might be given as Windows format, start by converting to
21505  # unix format.
21506  path="$JAVA_HOME_PROCESSED"
21507  new_path=`$CYGPATH -u "$path"`
21508
21509  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21510  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21511  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21512  # "foo.exe" is OK but "foo" is an error.
21513  #
21514  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21515  # It is also a way to make sure we got the proper file name for the real test later on.
21516  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21517  if test "x$test_shortpath" = x; then
21518    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21519$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21520    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
21521  fi
21522
21523  # Call helper function which possibly converts this using DOS-style short mode.
21524  # If so, the updated path is stored in $new_path.
21525
21526  input_path="$new_path"
21527  # Check if we need to convert this using DOS-style short mode. If the path
21528  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21529  # take no chances and rewrite it.
21530  # Note: m4 eats our [], so we need to use [ and ] instead.
21531  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21532  if test "x$has_forbidden_chars" != x; then
21533    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21534    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21535    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21536    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21537      # Going to short mode and back again did indeed matter. Since short mode is
21538      # case insensitive, let's make it lowercase to improve readability.
21539      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21540      # Now convert it back to Unix-stile (cygpath)
21541      input_path=`$CYGPATH -u "$shortmode_path"`
21542      new_path="$input_path"
21543    fi
21544  fi
21545
21546  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21547  if test "x$test_cygdrive_prefix" = x; then
21548    # As a simple fix, exclude /usr/bin since it's not a real path.
21549    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21550      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21551      # a path prefixed by /cygdrive for fixpath to work.
21552      new_path="$CYGWIN_ROOT_PATH$input_path"
21553    fi
21554  fi
21555
21556
21557  if test "x$path" != "x$new_path"; then
21558    JAVA_HOME_PROCESSED="$new_path"
21559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21560$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21561  fi
21562
21563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21564
21565  path="$JAVA_HOME_PROCESSED"
21566  has_colon=`$ECHO $path | $GREP ^.:`
21567  new_path="$path"
21568  if test "x$has_colon" = x; then
21569    # Not in mixed or Windows style, start by that.
21570    new_path=`cmd //c echo $path`
21571  fi
21572
21573
21574  input_path="$new_path"
21575  # Check if we need to convert this using DOS-style short mode. If the path
21576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21577  # take no chances and rewrite it.
21578  # Note: m4 eats our [], so we need to use [ and ] instead.
21579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21580  if test "x$has_forbidden_chars" != x; then
21581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21583  fi
21584
21585
21586  windows_path="$new_path"
21587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21588    unix_path=`$CYGPATH -u "$windows_path"`
21589    new_path="$unix_path"
21590  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21591    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21592    new_path="$unix_path"
21593  fi
21594
21595  if test "x$path" != "x$new_path"; then
21596    JAVA_HOME_PROCESSED="$new_path"
21597    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
21598$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
21599  fi
21600
21601  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21602  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21603
21604  else
21605    # We're on a posix platform. Hooray! :)
21606    path="$JAVA_HOME_PROCESSED"
21607    has_space=`$ECHO "$path" | $GREP " "`
21608    if test "x$has_space" != x; then
21609      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
21610$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
21611      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21612    fi
21613
21614    # Use eval to expand a potential ~
21615    eval path="$path"
21616    if test ! -f "$path" && test ! -d "$path"; then
21617      as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
21618    fi
21619
21620    JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
21621  fi
21622
21623    if test ! -d "$JAVA_HOME_PROCESSED"; then
21624      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
21625$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
21626    else
21627      # Aha, the user has set a JAVA_HOME
21628      # let us use that as the Boot JDK.
21629      BOOT_JDK="$JAVA_HOME_PROCESSED"
21630      BOOT_JDK_FOUND=maybe
21631      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
21632$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
21633    fi
21634  fi
21635
21636
21637    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21638    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21639      # Do we have a bin/java?
21640      if test ! -x "$BOOT_JDK/bin/java"; then
21641        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21642$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21643        BOOT_JDK_FOUND=no
21644      else
21645        # Do we have a bin/javac?
21646        if test ! -x "$BOOT_JDK/bin/javac"; then
21647          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21648$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21649          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21650$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21651          BOOT_JDK_FOUND=no
21652        else
21653          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21654          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21655            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21656$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21657            BOOT_JDK_FOUND=no
21658          else
21659            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21660            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21661
21662            # Extra M4 quote needed to protect [] in grep expression.
21663            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21664            if test "x$FOUND_CORRECT_VERSION" = x; then
21665              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21667              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21668$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21669              BOOT_JDK_FOUND=no
21670            else
21671              # We're done! :-)
21672              BOOT_JDK_FOUND=yes
21673
21674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21675
21676  # Input might be given as Windows format, start by converting to
21677  # unix format.
21678  path="$BOOT_JDK"
21679  new_path=`$CYGPATH -u "$path"`
21680
21681  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21682  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21683  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21684  # "foo.exe" is OK but "foo" is an error.
21685  #
21686  # This test is therefore slightly more accurate than "test -f" to check for file precense.
21687  # It is also a way to make sure we got the proper file name for the real test later on.
21688  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21689  if test "x$test_shortpath" = x; then
21690    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21691$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21692    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
21693  fi
21694
21695  # Call helper function which possibly converts this using DOS-style short mode.
21696  # If so, the updated path is stored in $new_path.
21697
21698  input_path="$new_path"
21699  # Check if we need to convert this using DOS-style short mode. If the path
21700  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21701  # take no chances and rewrite it.
21702  # Note: m4 eats our [], so we need to use [ and ] instead.
21703  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21704  if test "x$has_forbidden_chars" != x; then
21705    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21706    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21707    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21708    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21709      # Going to short mode and back again did indeed matter. Since short mode is
21710      # case insensitive, let's make it lowercase to improve readability.
21711      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21712      # Now convert it back to Unix-stile (cygpath)
21713      input_path=`$CYGPATH -u "$shortmode_path"`
21714      new_path="$input_path"
21715    fi
21716  fi
21717
21718  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21719  if test "x$test_cygdrive_prefix" = x; then
21720    # As a simple fix, exclude /usr/bin since it's not a real path.
21721    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
21722      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21723      # a path prefixed by /cygdrive for fixpath to work.
21724      new_path="$CYGWIN_ROOT_PATH$input_path"
21725    fi
21726  fi
21727
21728
21729  if test "x$path" != "x$new_path"; then
21730    BOOT_JDK="$new_path"
21731    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21732$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21733  fi
21734
21735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21736
21737  path="$BOOT_JDK"
21738  has_colon=`$ECHO $path | $GREP ^.:`
21739  new_path="$path"
21740  if test "x$has_colon" = x; then
21741    # Not in mixed or Windows style, start by that.
21742    new_path=`cmd //c echo $path`
21743  fi
21744
21745
21746  input_path="$new_path"
21747  # Check if we need to convert this using DOS-style short mode. If the path
21748  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21749  # take no chances and rewrite it.
21750  # Note: m4 eats our [], so we need to use [ and ] instead.
21751  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21752  if test "x$has_forbidden_chars" != x; then
21753    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21754    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21755  fi
21756
21757
21758  windows_path="$new_path"
21759  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21760    unix_path=`$CYGPATH -u "$windows_path"`
21761    new_path="$unix_path"
21762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21763    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21764    new_path="$unix_path"
21765  fi
21766
21767  if test "x$path" != "x$new_path"; then
21768    BOOT_JDK="$new_path"
21769    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
21770$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
21771  fi
21772
21773  # Save the first 10 bytes of this path to the storage, so fixpath can work.
21774  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21775
21776  else
21777    # We're on a posix platform. Hooray! :)
21778    path="$BOOT_JDK"
21779    has_space=`$ECHO "$path" | $GREP " "`
21780    if test "x$has_space" != x; then
21781      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
21782$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
21783      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
21784    fi
21785
21786    # Use eval to expand a potential ~
21787    eval path="$path"
21788    if test ! -f "$path" && test ! -d "$path"; then
21789      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
21790    fi
21791
21792    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
21793  fi
21794
21795              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
21796$as_echo_n "checking for Boot JDK... " >&6; }
21797              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
21798$as_echo "$BOOT_JDK" >&6; }
21799              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
21800$as_echo_n "checking Boot JDK version... " >&6; }
21801              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
21802              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
21803$as_echo "$BOOT_JDK_VERSION" >&6; }
21804            fi # end check jdk version
21805          fi # end check rt.jar
21806        fi # end check javac
21807      fi # end check java
21808    fi # end check boot jdk found
21809  fi
21810
21811
21812  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
21813
21814  if test "x$BOOT_JDK_FOUND" = xno; then
21815    # Now execute the test
21816
21817  # Extract the first word of "javac", so it can be a program name with args.
21818set dummy javac; ac_word=$2
21819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21820$as_echo_n "checking for $ac_word... " >&6; }
21821if ${ac_cv_path_JAVAC_CHECK+:} false; then :
21822  $as_echo_n "(cached) " >&6
21823else
21824  case $JAVAC_CHECK in
21825  [\\/]* | ?:[\\/]*)
21826  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
21827  ;;
21828  *)
21829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21830for as_dir in $PATH
21831do
21832  IFS=$as_save_IFS
21833  test -z "$as_dir" && as_dir=.
21834    for ac_exec_ext in '' $ac_executable_extensions; do
21835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21836    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
21837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21838    break 2
21839  fi
21840done
21841  done
21842IFS=$as_save_IFS
21843
21844  ;;
21845esac
21846fi
21847JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
21848if test -n "$JAVAC_CHECK"; then
21849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
21850$as_echo "$JAVAC_CHECK" >&6; }
21851else
21852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21853$as_echo "no" >&6; }
21854fi
21855
21856
21857  # Extract the first word of "java", so it can be a program name with args.
21858set dummy java; ac_word=$2
21859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21860$as_echo_n "checking for $ac_word... " >&6; }
21861if ${ac_cv_path_JAVA_CHECK+:} false; then :
21862  $as_echo_n "(cached) " >&6
21863else
21864  case $JAVA_CHECK in
21865  [\\/]* | ?:[\\/]*)
21866  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
21867  ;;
21868  *)
21869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21870for as_dir in $PATH
21871do
21872  IFS=$as_save_IFS
21873  test -z "$as_dir" && as_dir=.
21874    for ac_exec_ext in '' $ac_executable_extensions; do
21875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21876    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
21877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21878    break 2
21879  fi
21880done
21881  done
21882IFS=$as_save_IFS
21883
21884  ;;
21885esac
21886fi
21887JAVA_CHECK=$ac_cv_path_JAVA_CHECK
21888if test -n "$JAVA_CHECK"; then
21889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
21890$as_echo "$JAVA_CHECK" >&6; }
21891else
21892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21893$as_echo "no" >&6; }
21894fi
21895
21896
21897  BINARY="$JAVAC_CHECK"
21898  if test "x$JAVAC_CHECK" = x; then
21899    BINARY="$JAVA_CHECK"
21900  fi
21901  if test "x$BINARY" != x; then
21902    # So there is a java(c) binary, it might be part of a JDK.
21903    # Lets find the JDK/JRE directory by following symbolic links.
21904    # Linux/GNU systems often have links from /usr/bin/java to
21905    # /etc/alternatives/java to the real JDK binary.
21906
21907  if test "x$OPENJDK_BUILD_OS" != xwindows; then
21908    # Follow a chain of symbolic links. Use readlink
21909    # where it exists, else fall back to horribly
21910    # complicated shell code.
21911    if test "x$READLINK_TESTED" != yes; then
21912      # On MacOSX there is a readlink tool with a different
21913      # purpose than the GNU readlink tool. Check the found readlink.
21914      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
21915      if test "x$ISGNU" = x; then
21916        # A readlink that we do not know how to use.
21917        # Are there other non-GNU readlinks out there?
21918        READLINK_TESTED=yes
21919        READLINK=
21920      fi
21921    fi
21922
21923    if test "x$READLINK" != x; then
21924      BINARY=`$READLINK -f $BINARY`
21925    else
21926      # Save the current directory for restoring afterwards
21927      STARTDIR=$PWD
21928      COUNTER=0
21929      sym_link_dir=`$DIRNAME $BINARY`
21930      sym_link_file=`$BASENAME $BINARY`
21931      cd $sym_link_dir
21932      # Use -P flag to resolve symlinks in directories.
21933      cd `$THEPWDCMD -P`
21934      sym_link_dir=`$THEPWDCMD -P`
21935      # Resolve file symlinks
21936      while test $COUNTER -lt 20; do
21937        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
21938        if test "x$ISLINK" == x; then
21939          # This is not a symbolic link! We are done!
21940          break
21941        fi
21942        # Again resolve directory symlinks since the target of the just found
21943        # link could be in a different directory
21944        cd `$DIRNAME $ISLINK`
21945        sym_link_dir=`$THEPWDCMD -P`
21946        sym_link_file=`$BASENAME $ISLINK`
21947        let COUNTER=COUNTER+1
21948      done
21949      cd $STARTDIR
21950      BINARY=$sym_link_dir/$sym_link_file
21951    fi
21952  fi
21953
21954    BOOT_JDK=`dirname "$BINARY"`
21955    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
21956    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
21957      # Looks like we found ourselves an JDK
21958      BOOT_JDK_FOUND=maybe
21959      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
21960$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
21961    fi
21962  fi
21963
21964
21965    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
21966    if test "x$BOOT_JDK_FOUND" = xmaybe; then
21967      # Do we have a bin/java?
21968      if test ! -x "$BOOT_JDK/bin/java"; then
21969        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
21970$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
21971        BOOT_JDK_FOUND=no
21972      else
21973        # Do we have a bin/javac?
21974        if test ! -x "$BOOT_JDK/bin/javac"; then
21975          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
21976$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
21977          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
21978$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
21979          BOOT_JDK_FOUND=no
21980        else
21981          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
21982          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
21983            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
21984$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
21985            BOOT_JDK_FOUND=no
21986          else
21987            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
21988            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
21989
21990            # Extra M4 quote needed to protect [] in grep expression.
21991            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
21992            if test "x$FOUND_CORRECT_VERSION" = x; then
21993              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
21994$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
21995              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
21996$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
21997              BOOT_JDK_FOUND=no
21998            else
21999              # We're done! :-)
22000              BOOT_JDK_FOUND=yes
22001
22002  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22003
22004  # Input might be given as Windows format, start by converting to
22005  # unix format.
22006  path="$BOOT_JDK"
22007  new_path=`$CYGPATH -u "$path"`
22008
22009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22012  # "foo.exe" is OK but "foo" is an error.
22013  #
22014  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22015  # It is also a way to make sure we got the proper file name for the real test later on.
22016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22017  if test "x$test_shortpath" = x; then
22018    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22019$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22020    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22021  fi
22022
22023  # Call helper function which possibly converts this using DOS-style short mode.
22024  # If so, the updated path is stored in $new_path.
22025
22026  input_path="$new_path"
22027  # Check if we need to convert this using DOS-style short mode. If the path
22028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22029  # take no chances and rewrite it.
22030  # Note: m4 eats our [], so we need to use [ and ] instead.
22031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22032  if test "x$has_forbidden_chars" != x; then
22033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22034    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22035    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22036    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22037      # Going to short mode and back again did indeed matter. Since short mode is
22038      # case insensitive, let's make it lowercase to improve readability.
22039      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22040      # Now convert it back to Unix-stile (cygpath)
22041      input_path=`$CYGPATH -u "$shortmode_path"`
22042      new_path="$input_path"
22043    fi
22044  fi
22045
22046  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22047  if test "x$test_cygdrive_prefix" = x; then
22048    # As a simple fix, exclude /usr/bin since it's not a real path.
22049    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22050      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22051      # a path prefixed by /cygdrive for fixpath to work.
22052      new_path="$CYGWIN_ROOT_PATH$input_path"
22053    fi
22054  fi
22055
22056
22057  if test "x$path" != "x$new_path"; then
22058    BOOT_JDK="$new_path"
22059    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22060$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22061  fi
22062
22063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22064
22065  path="$BOOT_JDK"
22066  has_colon=`$ECHO $path | $GREP ^.:`
22067  new_path="$path"
22068  if test "x$has_colon" = x; then
22069    # Not in mixed or Windows style, start by that.
22070    new_path=`cmd //c echo $path`
22071  fi
22072
22073
22074  input_path="$new_path"
22075  # Check if we need to convert this using DOS-style short mode. If the path
22076  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22077  # take no chances and rewrite it.
22078  # Note: m4 eats our [], so we need to use [ and ] instead.
22079  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22080  if test "x$has_forbidden_chars" != x; then
22081    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22082    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22083  fi
22084
22085
22086  windows_path="$new_path"
22087  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22088    unix_path=`$CYGPATH -u "$windows_path"`
22089    new_path="$unix_path"
22090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22091    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22092    new_path="$unix_path"
22093  fi
22094
22095  if test "x$path" != "x$new_path"; then
22096    BOOT_JDK="$new_path"
22097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22099  fi
22100
22101  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22102  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22103
22104  else
22105    # We're on a posix platform. Hooray! :)
22106    path="$BOOT_JDK"
22107    has_space=`$ECHO "$path" | $GREP " "`
22108    if test "x$has_space" != x; then
22109      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22110$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22111      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22112    fi
22113
22114    # Use eval to expand a potential ~
22115    eval path="$path"
22116    if test ! -f "$path" && test ! -d "$path"; then
22117      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22118    fi
22119
22120    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22121  fi
22122
22123              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22124$as_echo_n "checking for Boot JDK... " >&6; }
22125              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22126$as_echo "$BOOT_JDK" >&6; }
22127              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22128$as_echo_n "checking Boot JDK version... " >&6; }
22129              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22130              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22131$as_echo "$BOOT_JDK_VERSION" >&6; }
22132            fi # end check jdk version
22133          fi # end check rt.jar
22134        fi # end check javac
22135      fi # end check java
22136    fi # end check boot jdk found
22137  fi
22138
22139
22140  # Test: Is there a JDK installed in default, well-known locations?
22141
22142  if test "x$BOOT_JDK_FOUND" = xno; then
22143    # Now execute the test
22144
22145  if test "x$OPENJDK_TARGET_OS" = xwindows; then
22146
22147  if test "x$BOOT_JDK_FOUND" = xno; then
22148    # Now execute the test
22149
22150  if test "x$ProgramW6432" != x; then
22151    VIRTUAL_DIR="$ProgramW6432/Java"
22152
22153  windows_path="$VIRTUAL_DIR"
22154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22155    unix_path=`$CYGPATH -u "$windows_path"`
22156    VIRTUAL_DIR="$unix_path"
22157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22159    VIRTUAL_DIR="$unix_path"
22160  fi
22161
22162
22163  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22164  BOOT_JDK_SUFFIX=""
22165  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22166  if test "x$ALL_JDKS_FOUND" != x; then
22167    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22168
22169  if test "x$BOOT_JDK_FOUND" = xno; then
22170    # Now execute the test
22171
22172        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22173        if test -d "$BOOT_JDK"; then
22174          BOOT_JDK_FOUND=maybe
22175          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22176$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22177        fi
22178
22179
22180    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22181    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22182      # Do we have a bin/java?
22183      if test ! -x "$BOOT_JDK/bin/java"; then
22184        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22185$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22186        BOOT_JDK_FOUND=no
22187      else
22188        # Do we have a bin/javac?
22189        if test ! -x "$BOOT_JDK/bin/javac"; then
22190          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22191$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22192          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22193$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22194          BOOT_JDK_FOUND=no
22195        else
22196          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22197          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22198            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22199$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22200            BOOT_JDK_FOUND=no
22201          else
22202            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22204
22205            # Extra M4 quote needed to protect [] in grep expression.
22206            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22207            if test "x$FOUND_CORRECT_VERSION" = x; then
22208              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22210              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22211$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22212              BOOT_JDK_FOUND=no
22213            else
22214              # We're done! :-)
22215              BOOT_JDK_FOUND=yes
22216
22217  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22218
22219  # Input might be given as Windows format, start by converting to
22220  # unix format.
22221  path="$BOOT_JDK"
22222  new_path=`$CYGPATH -u "$path"`
22223
22224  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22225  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22226  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22227  # "foo.exe" is OK but "foo" is an error.
22228  #
22229  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22230  # It is also a way to make sure we got the proper file name for the real test later on.
22231  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22232  if test "x$test_shortpath" = x; then
22233    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22235    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22236  fi
22237
22238  # Call helper function which possibly converts this using DOS-style short mode.
22239  # If so, the updated path is stored in $new_path.
22240
22241  input_path="$new_path"
22242  # Check if we need to convert this using DOS-style short mode. If the path
22243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22244  # take no chances and rewrite it.
22245  # Note: m4 eats our [], so we need to use [ and ] instead.
22246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22247  if test "x$has_forbidden_chars" != x; then
22248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22249    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22250    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22251    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22252      # Going to short mode and back again did indeed matter. Since short mode is
22253      # case insensitive, let's make it lowercase to improve readability.
22254      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22255      # Now convert it back to Unix-stile (cygpath)
22256      input_path=`$CYGPATH -u "$shortmode_path"`
22257      new_path="$input_path"
22258    fi
22259  fi
22260
22261  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22262  if test "x$test_cygdrive_prefix" = x; then
22263    # As a simple fix, exclude /usr/bin since it's not a real path.
22264    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22265      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22266      # a path prefixed by /cygdrive for fixpath to work.
22267      new_path="$CYGWIN_ROOT_PATH$input_path"
22268    fi
22269  fi
22270
22271
22272  if test "x$path" != "x$new_path"; then
22273    BOOT_JDK="$new_path"
22274    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22275$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22276  fi
22277
22278  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22279
22280  path="$BOOT_JDK"
22281  has_colon=`$ECHO $path | $GREP ^.:`
22282  new_path="$path"
22283  if test "x$has_colon" = x; then
22284    # Not in mixed or Windows style, start by that.
22285    new_path=`cmd //c echo $path`
22286  fi
22287
22288
22289  input_path="$new_path"
22290  # Check if we need to convert this using DOS-style short mode. If the path
22291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22292  # take no chances and rewrite it.
22293  # Note: m4 eats our [], so we need to use [ and ] instead.
22294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22295  if test "x$has_forbidden_chars" != x; then
22296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22297    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22298  fi
22299
22300
22301  windows_path="$new_path"
22302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22303    unix_path=`$CYGPATH -u "$windows_path"`
22304    new_path="$unix_path"
22305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22307    new_path="$unix_path"
22308  fi
22309
22310  if test "x$path" != "x$new_path"; then
22311    BOOT_JDK="$new_path"
22312    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22313$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22314  fi
22315
22316  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22317  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22318
22319  else
22320    # We're on a posix platform. Hooray! :)
22321    path="$BOOT_JDK"
22322    has_space=`$ECHO "$path" | $GREP " "`
22323    if test "x$has_space" != x; then
22324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22326      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22327    fi
22328
22329    # Use eval to expand a potential ~
22330    eval path="$path"
22331    if test ! -f "$path" && test ! -d "$path"; then
22332      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22333    fi
22334
22335    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22336  fi
22337
22338              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22339$as_echo_n "checking for Boot JDK... " >&6; }
22340              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22341$as_echo "$BOOT_JDK" >&6; }
22342              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22343$as_echo_n "checking Boot JDK version... " >&6; }
22344              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22345              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22346$as_echo "$BOOT_JDK_VERSION" >&6; }
22347            fi # end check jdk version
22348          fi # end check rt.jar
22349        fi # end check javac
22350      fi # end check java
22351    fi # end check boot jdk found
22352  fi
22353
22354    done
22355  fi
22356
22357  fi
22358
22359
22360    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22361    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22362      # Do we have a bin/java?
22363      if test ! -x "$BOOT_JDK/bin/java"; then
22364        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22365$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22366        BOOT_JDK_FOUND=no
22367      else
22368        # Do we have a bin/javac?
22369        if test ! -x "$BOOT_JDK/bin/javac"; then
22370          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22371$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22372          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22373$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22374          BOOT_JDK_FOUND=no
22375        else
22376          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22377          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22378            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22379$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22380            BOOT_JDK_FOUND=no
22381          else
22382            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22383            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22384
22385            # Extra M4 quote needed to protect [] in grep expression.
22386            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22387            if test "x$FOUND_CORRECT_VERSION" = x; then
22388              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22389$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22390              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22391$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22392              BOOT_JDK_FOUND=no
22393            else
22394              # We're done! :-)
22395              BOOT_JDK_FOUND=yes
22396
22397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22398
22399  # Input might be given as Windows format, start by converting to
22400  # unix format.
22401  path="$BOOT_JDK"
22402  new_path=`$CYGPATH -u "$path"`
22403
22404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22407  # "foo.exe" is OK but "foo" is an error.
22408  #
22409  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22410  # It is also a way to make sure we got the proper file name for the real test later on.
22411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22412  if test "x$test_shortpath" = x; then
22413    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22414$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22415    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22416  fi
22417
22418  # Call helper function which possibly converts this using DOS-style short mode.
22419  # If so, the updated path is stored in $new_path.
22420
22421  input_path="$new_path"
22422  # Check if we need to convert this using DOS-style short mode. If the path
22423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22424  # take no chances and rewrite it.
22425  # Note: m4 eats our [], so we need to use [ and ] instead.
22426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22427  if test "x$has_forbidden_chars" != x; then
22428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22429    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22430    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22431    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22432      # Going to short mode and back again did indeed matter. Since short mode is
22433      # case insensitive, let's make it lowercase to improve readability.
22434      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22435      # Now convert it back to Unix-stile (cygpath)
22436      input_path=`$CYGPATH -u "$shortmode_path"`
22437      new_path="$input_path"
22438    fi
22439  fi
22440
22441  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22442  if test "x$test_cygdrive_prefix" = x; then
22443    # As a simple fix, exclude /usr/bin since it's not a real path.
22444    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22445      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22446      # a path prefixed by /cygdrive for fixpath to work.
22447      new_path="$CYGWIN_ROOT_PATH$input_path"
22448    fi
22449  fi
22450
22451
22452  if test "x$path" != "x$new_path"; then
22453    BOOT_JDK="$new_path"
22454    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22455$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22456  fi
22457
22458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22459
22460  path="$BOOT_JDK"
22461  has_colon=`$ECHO $path | $GREP ^.:`
22462  new_path="$path"
22463  if test "x$has_colon" = x; then
22464    # Not in mixed or Windows style, start by that.
22465    new_path=`cmd //c echo $path`
22466  fi
22467
22468
22469  input_path="$new_path"
22470  # Check if we need to convert this using DOS-style short mode. If the path
22471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22472  # take no chances and rewrite it.
22473  # Note: m4 eats our [], so we need to use [ and ] instead.
22474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22475  if test "x$has_forbidden_chars" != x; then
22476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22478  fi
22479
22480
22481  windows_path="$new_path"
22482  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22483    unix_path=`$CYGPATH -u "$windows_path"`
22484    new_path="$unix_path"
22485  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22486    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22487    new_path="$unix_path"
22488  fi
22489
22490  if test "x$path" != "x$new_path"; then
22491    BOOT_JDK="$new_path"
22492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22493$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22494  fi
22495
22496  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22497  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22498
22499  else
22500    # We're on a posix platform. Hooray! :)
22501    path="$BOOT_JDK"
22502    has_space=`$ECHO "$path" | $GREP " "`
22503    if test "x$has_space" != x; then
22504      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22505$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22506      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22507    fi
22508
22509    # Use eval to expand a potential ~
22510    eval path="$path"
22511    if test ! -f "$path" && test ! -d "$path"; then
22512      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22513    fi
22514
22515    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22516  fi
22517
22518              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22519$as_echo_n "checking for Boot JDK... " >&6; }
22520              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22521$as_echo "$BOOT_JDK" >&6; }
22522              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22523$as_echo_n "checking Boot JDK version... " >&6; }
22524              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22525              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22526$as_echo "$BOOT_JDK_VERSION" >&6; }
22527            fi # end check jdk version
22528          fi # end check rt.jar
22529        fi # end check javac
22530      fi # end check java
22531    fi # end check boot jdk found
22532  fi
22533
22534
22535  if test "x$BOOT_JDK_FOUND" = xno; then
22536    # Now execute the test
22537
22538  if test "x$PROGRAMW6432" != x; then
22539    VIRTUAL_DIR="$PROGRAMW6432/Java"
22540
22541  windows_path="$VIRTUAL_DIR"
22542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22543    unix_path=`$CYGPATH -u "$windows_path"`
22544    VIRTUAL_DIR="$unix_path"
22545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22547    VIRTUAL_DIR="$unix_path"
22548  fi
22549
22550
22551  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22552  BOOT_JDK_SUFFIX=""
22553  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22554  if test "x$ALL_JDKS_FOUND" != x; then
22555    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22556
22557  if test "x$BOOT_JDK_FOUND" = xno; then
22558    # Now execute the test
22559
22560        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22561        if test -d "$BOOT_JDK"; then
22562          BOOT_JDK_FOUND=maybe
22563          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22564$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22565        fi
22566
22567
22568    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22569    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22570      # Do we have a bin/java?
22571      if test ! -x "$BOOT_JDK/bin/java"; then
22572        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22573$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22574        BOOT_JDK_FOUND=no
22575      else
22576        # Do we have a bin/javac?
22577        if test ! -x "$BOOT_JDK/bin/javac"; then
22578          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22579$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22580          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22581$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22582          BOOT_JDK_FOUND=no
22583        else
22584          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22585          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22586            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22587$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22588            BOOT_JDK_FOUND=no
22589          else
22590            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22591            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22592
22593            # Extra M4 quote needed to protect [] in grep expression.
22594            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22595            if test "x$FOUND_CORRECT_VERSION" = x; then
22596              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22597$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22598              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22599$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22600              BOOT_JDK_FOUND=no
22601            else
22602              # We're done! :-)
22603              BOOT_JDK_FOUND=yes
22604
22605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22606
22607  # Input might be given as Windows format, start by converting to
22608  # unix format.
22609  path="$BOOT_JDK"
22610  new_path=`$CYGPATH -u "$path"`
22611
22612  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22613  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22614  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22615  # "foo.exe" is OK but "foo" is an error.
22616  #
22617  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22618  # It is also a way to make sure we got the proper file name for the real test later on.
22619  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22620  if test "x$test_shortpath" = x; then
22621    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22622$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22623    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22624  fi
22625
22626  # Call helper function which possibly converts this using DOS-style short mode.
22627  # If so, the updated path is stored in $new_path.
22628
22629  input_path="$new_path"
22630  # Check if we need to convert this using DOS-style short mode. If the path
22631  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22632  # take no chances and rewrite it.
22633  # Note: m4 eats our [], so we need to use [ and ] instead.
22634  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22635  if test "x$has_forbidden_chars" != x; then
22636    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22637    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22638    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22639    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22640      # Going to short mode and back again did indeed matter. Since short mode is
22641      # case insensitive, let's make it lowercase to improve readability.
22642      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22643      # Now convert it back to Unix-stile (cygpath)
22644      input_path=`$CYGPATH -u "$shortmode_path"`
22645      new_path="$input_path"
22646    fi
22647  fi
22648
22649  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22650  if test "x$test_cygdrive_prefix" = x; then
22651    # As a simple fix, exclude /usr/bin since it's not a real path.
22652    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22653      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22654      # a path prefixed by /cygdrive for fixpath to work.
22655      new_path="$CYGWIN_ROOT_PATH$input_path"
22656    fi
22657  fi
22658
22659
22660  if test "x$path" != "x$new_path"; then
22661    BOOT_JDK="$new_path"
22662    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22663$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22664  fi
22665
22666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22667
22668  path="$BOOT_JDK"
22669  has_colon=`$ECHO $path | $GREP ^.:`
22670  new_path="$path"
22671  if test "x$has_colon" = x; then
22672    # Not in mixed or Windows style, start by that.
22673    new_path=`cmd //c echo $path`
22674  fi
22675
22676
22677  input_path="$new_path"
22678  # Check if we need to convert this using DOS-style short mode. If the path
22679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22680  # take no chances and rewrite it.
22681  # Note: m4 eats our [], so we need to use [ and ] instead.
22682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22683  if test "x$has_forbidden_chars" != x; then
22684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22686  fi
22687
22688
22689  windows_path="$new_path"
22690  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22691    unix_path=`$CYGPATH -u "$windows_path"`
22692    new_path="$unix_path"
22693  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22694    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22695    new_path="$unix_path"
22696  fi
22697
22698  if test "x$path" != "x$new_path"; then
22699    BOOT_JDK="$new_path"
22700    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22701$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22702  fi
22703
22704  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22705  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22706
22707  else
22708    # We're on a posix platform. Hooray! :)
22709    path="$BOOT_JDK"
22710    has_space=`$ECHO "$path" | $GREP " "`
22711    if test "x$has_space" != x; then
22712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22713$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22714      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22715    fi
22716
22717    # Use eval to expand a potential ~
22718    eval path="$path"
22719    if test ! -f "$path" && test ! -d "$path"; then
22720      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22721    fi
22722
22723    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22724  fi
22725
22726              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22727$as_echo_n "checking for Boot JDK... " >&6; }
22728              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22729$as_echo "$BOOT_JDK" >&6; }
22730              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22731$as_echo_n "checking Boot JDK version... " >&6; }
22732              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22733              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22734$as_echo "$BOOT_JDK_VERSION" >&6; }
22735            fi # end check jdk version
22736          fi # end check rt.jar
22737        fi # end check javac
22738      fi # end check java
22739    fi # end check boot jdk found
22740  fi
22741
22742    done
22743  fi
22744
22745  fi
22746
22747
22748    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22749    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22750      # Do we have a bin/java?
22751      if test ! -x "$BOOT_JDK/bin/java"; then
22752        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22753$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22754        BOOT_JDK_FOUND=no
22755      else
22756        # Do we have a bin/javac?
22757        if test ! -x "$BOOT_JDK/bin/javac"; then
22758          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22759$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22760          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22761$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22762          BOOT_JDK_FOUND=no
22763        else
22764          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22765          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22766            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22768            BOOT_JDK_FOUND=no
22769          else
22770            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22771            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22772
22773            # Extra M4 quote needed to protect [] in grep expression.
22774            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22775            if test "x$FOUND_CORRECT_VERSION" = x; then
22776              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22777$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22778              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22779$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22780              BOOT_JDK_FOUND=no
22781            else
22782              # We're done! :-)
22783              BOOT_JDK_FOUND=yes
22784
22785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22786
22787  # Input might be given as Windows format, start by converting to
22788  # unix format.
22789  path="$BOOT_JDK"
22790  new_path=`$CYGPATH -u "$path"`
22791
22792  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
22793  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
22794  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
22795  # "foo.exe" is OK but "foo" is an error.
22796  #
22797  # This test is therefore slightly more accurate than "test -f" to check for file precense.
22798  # It is also a way to make sure we got the proper file name for the real test later on.
22799  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
22800  if test "x$test_shortpath" = x; then
22801    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22802$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22803    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
22804  fi
22805
22806  # Call helper function which possibly converts this using DOS-style short mode.
22807  # If so, the updated path is stored in $new_path.
22808
22809  input_path="$new_path"
22810  # Check if we need to convert this using DOS-style short mode. If the path
22811  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22812  # take no chances and rewrite it.
22813  # Note: m4 eats our [], so we need to use [ and ] instead.
22814  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
22815  if test "x$has_forbidden_chars" != x; then
22816    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22817    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
22818    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
22819    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
22820      # Going to short mode and back again did indeed matter. Since short mode is
22821      # case insensitive, let's make it lowercase to improve readability.
22822      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22823      # Now convert it back to Unix-stile (cygpath)
22824      input_path=`$CYGPATH -u "$shortmode_path"`
22825      new_path="$input_path"
22826    fi
22827  fi
22828
22829  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
22830  if test "x$test_cygdrive_prefix" = x; then
22831    # As a simple fix, exclude /usr/bin since it's not a real path.
22832    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
22833      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
22834      # a path prefixed by /cygdrive for fixpath to work.
22835      new_path="$CYGWIN_ROOT_PATH$input_path"
22836    fi
22837  fi
22838
22839
22840  if test "x$path" != "x$new_path"; then
22841    BOOT_JDK="$new_path"
22842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22844  fi
22845
22846  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22847
22848  path="$BOOT_JDK"
22849  has_colon=`$ECHO $path | $GREP ^.:`
22850  new_path="$path"
22851  if test "x$has_colon" = x; then
22852    # Not in mixed or Windows style, start by that.
22853    new_path=`cmd //c echo $path`
22854  fi
22855
22856
22857  input_path="$new_path"
22858  # Check if we need to convert this using DOS-style short mode. If the path
22859  # contains just simple characters, use it. Otherwise (spaces, weird characters),
22860  # take no chances and rewrite it.
22861  # Note: m4 eats our [], so we need to use [ and ] instead.
22862  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
22863  if test "x$has_forbidden_chars" != x; then
22864    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
22865    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
22866  fi
22867
22868
22869  windows_path="$new_path"
22870  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22871    unix_path=`$CYGPATH -u "$windows_path"`
22872    new_path="$unix_path"
22873  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22874    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22875    new_path="$unix_path"
22876  fi
22877
22878  if test "x$path" != "x$new_path"; then
22879    BOOT_JDK="$new_path"
22880    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
22881$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
22882  fi
22883
22884  # Save the first 10 bytes of this path to the storage, so fixpath can work.
22885  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
22886
22887  else
22888    # We're on a posix platform. Hooray! :)
22889    path="$BOOT_JDK"
22890    has_space=`$ECHO "$path" | $GREP " "`
22891    if test "x$has_space" != x; then
22892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
22893$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
22894      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
22895    fi
22896
22897    # Use eval to expand a potential ~
22898    eval path="$path"
22899    if test ! -f "$path" && test ! -d "$path"; then
22900      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
22901    fi
22902
22903    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
22904  fi
22905
22906              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
22907$as_echo_n "checking for Boot JDK... " >&6; }
22908              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
22909$as_echo "$BOOT_JDK" >&6; }
22910              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
22911$as_echo_n "checking Boot JDK version... " >&6; }
22912              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
22913              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
22914$as_echo "$BOOT_JDK_VERSION" >&6; }
22915            fi # end check jdk version
22916          fi # end check rt.jar
22917        fi # end check javac
22918      fi # end check java
22919    fi # end check boot jdk found
22920  fi
22921
22922
22923  if test "x$BOOT_JDK_FOUND" = xno; then
22924    # Now execute the test
22925
22926  if test "x$PROGRAMFILES" != x; then
22927    VIRTUAL_DIR="$PROGRAMFILES/Java"
22928
22929  windows_path="$VIRTUAL_DIR"
22930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22931    unix_path=`$CYGPATH -u "$windows_path"`
22932    VIRTUAL_DIR="$unix_path"
22933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
22934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
22935    VIRTUAL_DIR="$unix_path"
22936  fi
22937
22938
22939  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
22940  BOOT_JDK_SUFFIX=""
22941  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
22942  if test "x$ALL_JDKS_FOUND" != x; then
22943    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
22944
22945  if test "x$BOOT_JDK_FOUND" = xno; then
22946    # Now execute the test
22947
22948        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
22949        if test -d "$BOOT_JDK"; then
22950          BOOT_JDK_FOUND=maybe
22951          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
22952$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
22953        fi
22954
22955
22956    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
22957    if test "x$BOOT_JDK_FOUND" = xmaybe; then
22958      # Do we have a bin/java?
22959      if test ! -x "$BOOT_JDK/bin/java"; then
22960        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
22961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
22962        BOOT_JDK_FOUND=no
22963      else
22964        # Do we have a bin/javac?
22965        if test ! -x "$BOOT_JDK/bin/javac"; then
22966          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
22967$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
22968          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
22969$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
22970          BOOT_JDK_FOUND=no
22971        else
22972          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
22973          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
22974            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
22975$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
22976            BOOT_JDK_FOUND=no
22977          else
22978            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
22979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
22980
22981            # Extra M4 quote needed to protect [] in grep expression.
22982            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
22983            if test "x$FOUND_CORRECT_VERSION" = x; then
22984              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
22985$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
22986              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
22987$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
22988              BOOT_JDK_FOUND=no
22989            else
22990              # We're done! :-)
22991              BOOT_JDK_FOUND=yes
22992
22993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
22994
22995  # Input might be given as Windows format, start by converting to
22996  # unix format.
22997  path="$BOOT_JDK"
22998  new_path=`$CYGPATH -u "$path"`
22999
23000  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23001  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23002  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23003  # "foo.exe" is OK but "foo" is an error.
23004  #
23005  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23006  # It is also a way to make sure we got the proper file name for the real test later on.
23007  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23008  if test "x$test_shortpath" = x; then
23009    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23010$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23011    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23012  fi
23013
23014  # Call helper function which possibly converts this using DOS-style short mode.
23015  # If so, the updated path is stored in $new_path.
23016
23017  input_path="$new_path"
23018  # Check if we need to convert this using DOS-style short mode. If the path
23019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23020  # take no chances and rewrite it.
23021  # Note: m4 eats our [], so we need to use [ and ] instead.
23022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23023  if test "x$has_forbidden_chars" != x; then
23024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23025    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23026    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23027    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23028      # Going to short mode and back again did indeed matter. Since short mode is
23029      # case insensitive, let's make it lowercase to improve readability.
23030      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23031      # Now convert it back to Unix-stile (cygpath)
23032      input_path=`$CYGPATH -u "$shortmode_path"`
23033      new_path="$input_path"
23034    fi
23035  fi
23036
23037  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23038  if test "x$test_cygdrive_prefix" = x; then
23039    # As a simple fix, exclude /usr/bin since it's not a real path.
23040    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23041      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23042      # a path prefixed by /cygdrive for fixpath to work.
23043      new_path="$CYGWIN_ROOT_PATH$input_path"
23044    fi
23045  fi
23046
23047
23048  if test "x$path" != "x$new_path"; then
23049    BOOT_JDK="$new_path"
23050    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23051$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23052  fi
23053
23054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23055
23056  path="$BOOT_JDK"
23057  has_colon=`$ECHO $path | $GREP ^.:`
23058  new_path="$path"
23059  if test "x$has_colon" = x; then
23060    # Not in mixed or Windows style, start by that.
23061    new_path=`cmd //c echo $path`
23062  fi
23063
23064
23065  input_path="$new_path"
23066  # Check if we need to convert this using DOS-style short mode. If the path
23067  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23068  # take no chances and rewrite it.
23069  # Note: m4 eats our [], so we need to use [ and ] instead.
23070  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23071  if test "x$has_forbidden_chars" != x; then
23072    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23073    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23074  fi
23075
23076
23077  windows_path="$new_path"
23078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23079    unix_path=`$CYGPATH -u "$windows_path"`
23080    new_path="$unix_path"
23081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23082    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23083    new_path="$unix_path"
23084  fi
23085
23086  if test "x$path" != "x$new_path"; then
23087    BOOT_JDK="$new_path"
23088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23090  fi
23091
23092  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23093  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23094
23095  else
23096    # We're on a posix platform. Hooray! :)
23097    path="$BOOT_JDK"
23098    has_space=`$ECHO "$path" | $GREP " "`
23099    if test "x$has_space" != x; then
23100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23101$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23102      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23103    fi
23104
23105    # Use eval to expand a potential ~
23106    eval path="$path"
23107    if test ! -f "$path" && test ! -d "$path"; then
23108      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23109    fi
23110
23111    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23112  fi
23113
23114              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23115$as_echo_n "checking for Boot JDK... " >&6; }
23116              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23117$as_echo "$BOOT_JDK" >&6; }
23118              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23119$as_echo_n "checking Boot JDK version... " >&6; }
23120              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23121              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23122$as_echo "$BOOT_JDK_VERSION" >&6; }
23123            fi # end check jdk version
23124          fi # end check rt.jar
23125        fi # end check javac
23126      fi # end check java
23127    fi # end check boot jdk found
23128  fi
23129
23130    done
23131  fi
23132
23133  fi
23134
23135
23136    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23137    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23138      # Do we have a bin/java?
23139      if test ! -x "$BOOT_JDK/bin/java"; then
23140        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23141$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23142        BOOT_JDK_FOUND=no
23143      else
23144        # Do we have a bin/javac?
23145        if test ! -x "$BOOT_JDK/bin/javac"; then
23146          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23147$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23148          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23149$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23150          BOOT_JDK_FOUND=no
23151        else
23152          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23153          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23154            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23156            BOOT_JDK_FOUND=no
23157          else
23158            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23159            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23160
23161            # Extra M4 quote needed to protect [] in grep expression.
23162            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23163            if test "x$FOUND_CORRECT_VERSION" = x; then
23164              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23165$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23166              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23167$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23168              BOOT_JDK_FOUND=no
23169            else
23170              # We're done! :-)
23171              BOOT_JDK_FOUND=yes
23172
23173  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23174
23175  # Input might be given as Windows format, start by converting to
23176  # unix format.
23177  path="$BOOT_JDK"
23178  new_path=`$CYGPATH -u "$path"`
23179
23180  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23181  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23182  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23183  # "foo.exe" is OK but "foo" is an error.
23184  #
23185  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23186  # It is also a way to make sure we got the proper file name for the real test later on.
23187  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23188  if test "x$test_shortpath" = x; then
23189    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23190$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23191    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23192  fi
23193
23194  # Call helper function which possibly converts this using DOS-style short mode.
23195  # If so, the updated path is stored in $new_path.
23196
23197  input_path="$new_path"
23198  # Check if we need to convert this using DOS-style short mode. If the path
23199  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23200  # take no chances and rewrite it.
23201  # Note: m4 eats our [], so we need to use [ and ] instead.
23202  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23203  if test "x$has_forbidden_chars" != x; then
23204    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23205    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23206    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23207    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23208      # Going to short mode and back again did indeed matter. Since short mode is
23209      # case insensitive, let's make it lowercase to improve readability.
23210      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23211      # Now convert it back to Unix-stile (cygpath)
23212      input_path=`$CYGPATH -u "$shortmode_path"`
23213      new_path="$input_path"
23214    fi
23215  fi
23216
23217  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23218  if test "x$test_cygdrive_prefix" = x; then
23219    # As a simple fix, exclude /usr/bin since it's not a real path.
23220    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23221      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23222      # a path prefixed by /cygdrive for fixpath to work.
23223      new_path="$CYGWIN_ROOT_PATH$input_path"
23224    fi
23225  fi
23226
23227
23228  if test "x$path" != "x$new_path"; then
23229    BOOT_JDK="$new_path"
23230    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23231$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23232  fi
23233
23234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23235
23236  path="$BOOT_JDK"
23237  has_colon=`$ECHO $path | $GREP ^.:`
23238  new_path="$path"
23239  if test "x$has_colon" = x; then
23240    # Not in mixed or Windows style, start by that.
23241    new_path=`cmd //c echo $path`
23242  fi
23243
23244
23245  input_path="$new_path"
23246  # Check if we need to convert this using DOS-style short mode. If the path
23247  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23248  # take no chances and rewrite it.
23249  # Note: m4 eats our [], so we need to use [ and ] instead.
23250  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23251  if test "x$has_forbidden_chars" != x; then
23252    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23253    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23254  fi
23255
23256
23257  windows_path="$new_path"
23258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23259    unix_path=`$CYGPATH -u "$windows_path"`
23260    new_path="$unix_path"
23261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23262    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23263    new_path="$unix_path"
23264  fi
23265
23266  if test "x$path" != "x$new_path"; then
23267    BOOT_JDK="$new_path"
23268    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23269$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23270  fi
23271
23272  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23273  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23274
23275  else
23276    # We're on a posix platform. Hooray! :)
23277    path="$BOOT_JDK"
23278    has_space=`$ECHO "$path" | $GREP " "`
23279    if test "x$has_space" != x; then
23280      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23281$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23282      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23283    fi
23284
23285    # Use eval to expand a potential ~
23286    eval path="$path"
23287    if test ! -f "$path" && test ! -d "$path"; then
23288      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23289    fi
23290
23291    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23292  fi
23293
23294              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23295$as_echo_n "checking for Boot JDK... " >&6; }
23296              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23297$as_echo "$BOOT_JDK" >&6; }
23298              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23299$as_echo_n "checking Boot JDK version... " >&6; }
23300              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23301              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23302$as_echo "$BOOT_JDK_VERSION" >&6; }
23303            fi # end check jdk version
23304          fi # end check rt.jar
23305        fi # end check javac
23306      fi # end check java
23307    fi # end check boot jdk found
23308  fi
23309
23310
23311  if test "x$BOOT_JDK_FOUND" = xno; then
23312    # Now execute the test
23313
23314  if test "x$ProgramFiles" != x; then
23315    VIRTUAL_DIR="$ProgramFiles/Java"
23316
23317  windows_path="$VIRTUAL_DIR"
23318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23319    unix_path=`$CYGPATH -u "$windows_path"`
23320    VIRTUAL_DIR="$unix_path"
23321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23323    VIRTUAL_DIR="$unix_path"
23324  fi
23325
23326
23327  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
23328  BOOT_JDK_SUFFIX=""
23329  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23330  if test "x$ALL_JDKS_FOUND" != x; then
23331    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23332
23333  if test "x$BOOT_JDK_FOUND" = xno; then
23334    # Now execute the test
23335
23336        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23337        if test -d "$BOOT_JDK"; then
23338          BOOT_JDK_FOUND=maybe
23339          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23340$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23341        fi
23342
23343
23344    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23345    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23346      # Do we have a bin/java?
23347      if test ! -x "$BOOT_JDK/bin/java"; then
23348        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23349$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23350        BOOT_JDK_FOUND=no
23351      else
23352        # Do we have a bin/javac?
23353        if test ! -x "$BOOT_JDK/bin/javac"; then
23354          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23356          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23357$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23358          BOOT_JDK_FOUND=no
23359        else
23360          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23361          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23362            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23363$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23364            BOOT_JDK_FOUND=no
23365          else
23366            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23367            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23368
23369            # Extra M4 quote needed to protect [] in grep expression.
23370            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23371            if test "x$FOUND_CORRECT_VERSION" = x; then
23372              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23373$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23374              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23375$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23376              BOOT_JDK_FOUND=no
23377            else
23378              # We're done! :-)
23379              BOOT_JDK_FOUND=yes
23380
23381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23382
23383  # Input might be given as Windows format, start by converting to
23384  # unix format.
23385  path="$BOOT_JDK"
23386  new_path=`$CYGPATH -u "$path"`
23387
23388  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23389  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23390  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23391  # "foo.exe" is OK but "foo" is an error.
23392  #
23393  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23394  # It is also a way to make sure we got the proper file name for the real test later on.
23395  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23396  if test "x$test_shortpath" = x; then
23397    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23398$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23399    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23400  fi
23401
23402  # Call helper function which possibly converts this using DOS-style short mode.
23403  # If so, the updated path is stored in $new_path.
23404
23405  input_path="$new_path"
23406  # Check if we need to convert this using DOS-style short mode. If the path
23407  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23408  # take no chances and rewrite it.
23409  # Note: m4 eats our [], so we need to use [ and ] instead.
23410  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23411  if test "x$has_forbidden_chars" != x; then
23412    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23413    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23414    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23415    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23416      # Going to short mode and back again did indeed matter. Since short mode is
23417      # case insensitive, let's make it lowercase to improve readability.
23418      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23419      # Now convert it back to Unix-stile (cygpath)
23420      input_path=`$CYGPATH -u "$shortmode_path"`
23421      new_path="$input_path"
23422    fi
23423  fi
23424
23425  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23426  if test "x$test_cygdrive_prefix" = x; then
23427    # As a simple fix, exclude /usr/bin since it's not a real path.
23428    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23429      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23430      # a path prefixed by /cygdrive for fixpath to work.
23431      new_path="$CYGWIN_ROOT_PATH$input_path"
23432    fi
23433  fi
23434
23435
23436  if test "x$path" != "x$new_path"; then
23437    BOOT_JDK="$new_path"
23438    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23439$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23440  fi
23441
23442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23443
23444  path="$BOOT_JDK"
23445  has_colon=`$ECHO $path | $GREP ^.:`
23446  new_path="$path"
23447  if test "x$has_colon" = x; then
23448    # Not in mixed or Windows style, start by that.
23449    new_path=`cmd //c echo $path`
23450  fi
23451
23452
23453  input_path="$new_path"
23454  # Check if we need to convert this using DOS-style short mode. If the path
23455  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23456  # take no chances and rewrite it.
23457  # Note: m4 eats our [], so we need to use [ and ] instead.
23458  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23459  if test "x$has_forbidden_chars" != x; then
23460    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23461    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23462  fi
23463
23464
23465  windows_path="$new_path"
23466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23467    unix_path=`$CYGPATH -u "$windows_path"`
23468    new_path="$unix_path"
23469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23471    new_path="$unix_path"
23472  fi
23473
23474  if test "x$path" != "x$new_path"; then
23475    BOOT_JDK="$new_path"
23476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23478  fi
23479
23480  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23481  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23482
23483  else
23484    # We're on a posix platform. Hooray! :)
23485    path="$BOOT_JDK"
23486    has_space=`$ECHO "$path" | $GREP " "`
23487    if test "x$has_space" != x; then
23488      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23489$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23490      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23491    fi
23492
23493    # Use eval to expand a potential ~
23494    eval path="$path"
23495    if test ! -f "$path" && test ! -d "$path"; then
23496      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23497    fi
23498
23499    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23500  fi
23501
23502              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23503$as_echo_n "checking for Boot JDK... " >&6; }
23504              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23505$as_echo "$BOOT_JDK" >&6; }
23506              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23507$as_echo_n "checking Boot JDK version... " >&6; }
23508              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23509              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23510$as_echo "$BOOT_JDK_VERSION" >&6; }
23511            fi # end check jdk version
23512          fi # end check rt.jar
23513        fi # end check javac
23514      fi # end check java
23515    fi # end check boot jdk found
23516  fi
23517
23518    done
23519  fi
23520
23521  fi
23522
23523
23524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23526      # Do we have a bin/java?
23527      if test ! -x "$BOOT_JDK/bin/java"; then
23528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23530        BOOT_JDK_FOUND=no
23531      else
23532        # Do we have a bin/javac?
23533        if test ! -x "$BOOT_JDK/bin/javac"; then
23534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23538          BOOT_JDK_FOUND=no
23539        else
23540          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23541          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23542            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23543$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23544            BOOT_JDK_FOUND=no
23545          else
23546            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23547            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23548
23549            # Extra M4 quote needed to protect [] in grep expression.
23550            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23551            if test "x$FOUND_CORRECT_VERSION" = x; then
23552              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23553$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23554              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23555$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23556              BOOT_JDK_FOUND=no
23557            else
23558              # We're done! :-)
23559              BOOT_JDK_FOUND=yes
23560
23561  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23562
23563  # Input might be given as Windows format, start by converting to
23564  # unix format.
23565  path="$BOOT_JDK"
23566  new_path=`$CYGPATH -u "$path"`
23567
23568  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23569  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23570  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23571  # "foo.exe" is OK but "foo" is an error.
23572  #
23573  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23574  # It is also a way to make sure we got the proper file name for the real test later on.
23575  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23576  if test "x$test_shortpath" = x; then
23577    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23579    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23580  fi
23581
23582  # Call helper function which possibly converts this using DOS-style short mode.
23583  # If so, the updated path is stored in $new_path.
23584
23585  input_path="$new_path"
23586  # Check if we need to convert this using DOS-style short mode. If the path
23587  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23588  # take no chances and rewrite it.
23589  # Note: m4 eats our [], so we need to use [ and ] instead.
23590  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23591  if test "x$has_forbidden_chars" != x; then
23592    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23593    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23594    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23595    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23596      # Going to short mode and back again did indeed matter. Since short mode is
23597      # case insensitive, let's make it lowercase to improve readability.
23598      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23599      # Now convert it back to Unix-stile (cygpath)
23600      input_path=`$CYGPATH -u "$shortmode_path"`
23601      new_path="$input_path"
23602    fi
23603  fi
23604
23605  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23606  if test "x$test_cygdrive_prefix" = x; then
23607    # As a simple fix, exclude /usr/bin since it's not a real path.
23608    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23609      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23610      # a path prefixed by /cygdrive for fixpath to work.
23611      new_path="$CYGWIN_ROOT_PATH$input_path"
23612    fi
23613  fi
23614
23615
23616  if test "x$path" != "x$new_path"; then
23617    BOOT_JDK="$new_path"
23618    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23619$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23620  fi
23621
23622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23623
23624  path="$BOOT_JDK"
23625  has_colon=`$ECHO $path | $GREP ^.:`
23626  new_path="$path"
23627  if test "x$has_colon" = x; then
23628    # Not in mixed or Windows style, start by that.
23629    new_path=`cmd //c echo $path`
23630  fi
23631
23632
23633  input_path="$new_path"
23634  # Check if we need to convert this using DOS-style short mode. If the path
23635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23636  # take no chances and rewrite it.
23637  # Note: m4 eats our [], so we need to use [ and ] instead.
23638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23639  if test "x$has_forbidden_chars" != x; then
23640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23641    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23642  fi
23643
23644
23645  windows_path="$new_path"
23646  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23647    unix_path=`$CYGPATH -u "$windows_path"`
23648    new_path="$unix_path"
23649  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23650    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23651    new_path="$unix_path"
23652  fi
23653
23654  if test "x$path" != "x$new_path"; then
23655    BOOT_JDK="$new_path"
23656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23657$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23658  fi
23659
23660  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23661  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23662
23663  else
23664    # We're on a posix platform. Hooray! :)
23665    path="$BOOT_JDK"
23666    has_space=`$ECHO "$path" | $GREP " "`
23667    if test "x$has_space" != x; then
23668      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23669$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23670      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23671    fi
23672
23673    # Use eval to expand a potential ~
23674    eval path="$path"
23675    if test ! -f "$path" && test ! -d "$path"; then
23676      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23677    fi
23678
23679    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23680  fi
23681
23682              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23683$as_echo_n "checking for Boot JDK... " >&6; }
23684              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23685$as_echo "$BOOT_JDK" >&6; }
23686              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23687$as_echo_n "checking Boot JDK version... " >&6; }
23688              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23689              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23690$as_echo "$BOOT_JDK_VERSION" >&6; }
23691            fi # end check jdk version
23692          fi # end check rt.jar
23693        fi # end check javac
23694      fi # end check java
23695    fi # end check boot jdk found
23696  fi
23697
23698
23699  if test "x$BOOT_JDK_FOUND" = xno; then
23700    # Now execute the test
23701
23702  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
23703  BOOT_JDK_SUFFIX=""
23704  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
23705  if test "x$ALL_JDKS_FOUND" != x; then
23706    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
23707
23708  if test "x$BOOT_JDK_FOUND" = xno; then
23709    # Now execute the test
23710
23711        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
23712        if test -d "$BOOT_JDK"; then
23713          BOOT_JDK_FOUND=maybe
23714          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
23715$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
23716        fi
23717
23718
23719    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23720    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23721      # Do we have a bin/java?
23722      if test ! -x "$BOOT_JDK/bin/java"; then
23723        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23725        BOOT_JDK_FOUND=no
23726      else
23727        # Do we have a bin/javac?
23728        if test ! -x "$BOOT_JDK/bin/javac"; then
23729          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23730$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23731          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23732$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23733          BOOT_JDK_FOUND=no
23734        else
23735          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23736          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23737            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23739            BOOT_JDK_FOUND=no
23740          else
23741            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23742            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23743
23744            # Extra M4 quote needed to protect [] in grep expression.
23745            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23746            if test "x$FOUND_CORRECT_VERSION" = x; then
23747              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23748$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23749              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23750$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23751              BOOT_JDK_FOUND=no
23752            else
23753              # We're done! :-)
23754              BOOT_JDK_FOUND=yes
23755
23756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23757
23758  # Input might be given as Windows format, start by converting to
23759  # unix format.
23760  path="$BOOT_JDK"
23761  new_path=`$CYGPATH -u "$path"`
23762
23763  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23764  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23765  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23766  # "foo.exe" is OK but "foo" is an error.
23767  #
23768  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23769  # It is also a way to make sure we got the proper file name for the real test later on.
23770  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23771  if test "x$test_shortpath" = x; then
23772    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23773$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23774    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23775  fi
23776
23777  # Call helper function which possibly converts this using DOS-style short mode.
23778  # If so, the updated path is stored in $new_path.
23779
23780  input_path="$new_path"
23781  # Check if we need to convert this using DOS-style short mode. If the path
23782  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23783  # take no chances and rewrite it.
23784  # Note: m4 eats our [], so we need to use [ and ] instead.
23785  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23786  if test "x$has_forbidden_chars" != x; then
23787    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23788    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23789    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23790    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23791      # Going to short mode and back again did indeed matter. Since short mode is
23792      # case insensitive, let's make it lowercase to improve readability.
23793      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23794      # Now convert it back to Unix-stile (cygpath)
23795      input_path=`$CYGPATH -u "$shortmode_path"`
23796      new_path="$input_path"
23797    fi
23798  fi
23799
23800  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23801  if test "x$test_cygdrive_prefix" = x; then
23802    # As a simple fix, exclude /usr/bin since it's not a real path.
23803    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23804      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23805      # a path prefixed by /cygdrive for fixpath to work.
23806      new_path="$CYGWIN_ROOT_PATH$input_path"
23807    fi
23808  fi
23809
23810
23811  if test "x$path" != "x$new_path"; then
23812    BOOT_JDK="$new_path"
23813    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23814$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23815  fi
23816
23817  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23818
23819  path="$BOOT_JDK"
23820  has_colon=`$ECHO $path | $GREP ^.:`
23821  new_path="$path"
23822  if test "x$has_colon" = x; then
23823    # Not in mixed or Windows style, start by that.
23824    new_path=`cmd //c echo $path`
23825  fi
23826
23827
23828  input_path="$new_path"
23829  # Check if we need to convert this using DOS-style short mode. If the path
23830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23831  # take no chances and rewrite it.
23832  # Note: m4 eats our [], so we need to use [ and ] instead.
23833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
23834  if test "x$has_forbidden_chars" != x; then
23835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23836    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23837  fi
23838
23839
23840  windows_path="$new_path"
23841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23842    unix_path=`$CYGPATH -u "$windows_path"`
23843    new_path="$unix_path"
23844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
23846    new_path="$unix_path"
23847  fi
23848
23849  if test "x$path" != "x$new_path"; then
23850    BOOT_JDK="$new_path"
23851    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23852$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23853  fi
23854
23855  # Save the first 10 bytes of this path to the storage, so fixpath can work.
23856  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
23857
23858  else
23859    # We're on a posix platform. Hooray! :)
23860    path="$BOOT_JDK"
23861    has_space=`$ECHO "$path" | $GREP " "`
23862    if test "x$has_space" != x; then
23863      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23865      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
23866    fi
23867
23868    # Use eval to expand a potential ~
23869    eval path="$path"
23870    if test ! -f "$path" && test ! -d "$path"; then
23871      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
23872    fi
23873
23874    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
23875  fi
23876
23877              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
23878$as_echo_n "checking for Boot JDK... " >&6; }
23879              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
23880$as_echo "$BOOT_JDK" >&6; }
23881              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
23882$as_echo_n "checking Boot JDK version... " >&6; }
23883              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
23884              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
23885$as_echo "$BOOT_JDK_VERSION" >&6; }
23886            fi # end check jdk version
23887          fi # end check rt.jar
23888        fi # end check javac
23889      fi # end check java
23890    fi # end check boot jdk found
23891  fi
23892
23893    done
23894  fi
23895
23896
23897    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
23898    if test "x$BOOT_JDK_FOUND" = xmaybe; then
23899      # Do we have a bin/java?
23900      if test ! -x "$BOOT_JDK/bin/java"; then
23901        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
23902$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
23903        BOOT_JDK_FOUND=no
23904      else
23905        # Do we have a bin/javac?
23906        if test ! -x "$BOOT_JDK/bin/javac"; then
23907          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
23908$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
23909          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
23910$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
23911          BOOT_JDK_FOUND=no
23912        else
23913          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
23914          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
23915            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
23916$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
23917            BOOT_JDK_FOUND=no
23918          else
23919            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
23920            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
23921
23922            # Extra M4 quote needed to protect [] in grep expression.
23923            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
23924            if test "x$FOUND_CORRECT_VERSION" = x; then
23925              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
23926$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
23927              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
23928$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
23929              BOOT_JDK_FOUND=no
23930            else
23931              # We're done! :-)
23932              BOOT_JDK_FOUND=yes
23933
23934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
23935
23936  # Input might be given as Windows format, start by converting to
23937  # unix format.
23938  path="$BOOT_JDK"
23939  new_path=`$CYGPATH -u "$path"`
23940
23941  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
23942  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
23943  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
23944  # "foo.exe" is OK but "foo" is an error.
23945  #
23946  # This test is therefore slightly more accurate than "test -f" to check for file precense.
23947  # It is also a way to make sure we got the proper file name for the real test later on.
23948  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
23949  if test "x$test_shortpath" = x; then
23950    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
23951$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
23952    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
23953  fi
23954
23955  # Call helper function which possibly converts this using DOS-style short mode.
23956  # If so, the updated path is stored in $new_path.
23957
23958  input_path="$new_path"
23959  # Check if we need to convert this using DOS-style short mode. If the path
23960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
23961  # take no chances and rewrite it.
23962  # Note: m4 eats our [], so we need to use [ and ] instead.
23963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
23964  if test "x$has_forbidden_chars" != x; then
23965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
23966    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
23967    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
23968    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
23969      # Going to short mode and back again did indeed matter. Since short mode is
23970      # case insensitive, let's make it lowercase to improve readability.
23971      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
23972      # Now convert it back to Unix-stile (cygpath)
23973      input_path=`$CYGPATH -u "$shortmode_path"`
23974      new_path="$input_path"
23975    fi
23976  fi
23977
23978  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
23979  if test "x$test_cygdrive_prefix" = x; then
23980    # As a simple fix, exclude /usr/bin since it's not a real path.
23981    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
23982      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
23983      # a path prefixed by /cygdrive for fixpath to work.
23984      new_path="$CYGWIN_ROOT_PATH$input_path"
23985    fi
23986  fi
23987
23988
23989  if test "x$path" != "x$new_path"; then
23990    BOOT_JDK="$new_path"
23991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
23992$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
23993  fi
23994
23995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
23996
23997  path="$BOOT_JDK"
23998  has_colon=`$ECHO $path | $GREP ^.:`
23999  new_path="$path"
24000  if test "x$has_colon" = x; then
24001    # Not in mixed or Windows style, start by that.
24002    new_path=`cmd //c echo $path`
24003  fi
24004
24005
24006  input_path="$new_path"
24007  # Check if we need to convert this using DOS-style short mode. If the path
24008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24009  # take no chances and rewrite it.
24010  # Note: m4 eats our [], so we need to use [ and ] instead.
24011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24012  if test "x$has_forbidden_chars" != x; then
24013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24014    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24015  fi
24016
24017
24018  windows_path="$new_path"
24019  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24020    unix_path=`$CYGPATH -u "$windows_path"`
24021    new_path="$unix_path"
24022  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24023    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24024    new_path="$unix_path"
24025  fi
24026
24027  if test "x$path" != "x$new_path"; then
24028    BOOT_JDK="$new_path"
24029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24031  fi
24032
24033  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24034  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24035
24036  else
24037    # We're on a posix platform. Hooray! :)
24038    path="$BOOT_JDK"
24039    has_space=`$ECHO "$path" | $GREP " "`
24040    if test "x$has_space" != x; then
24041      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24042$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24043      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24044    fi
24045
24046    # Use eval to expand a potential ~
24047    eval path="$path"
24048    if test ! -f "$path" && test ! -d "$path"; then
24049      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24050    fi
24051
24052    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24053  fi
24054
24055              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24056$as_echo_n "checking for Boot JDK... " >&6; }
24057              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24058$as_echo "$BOOT_JDK" >&6; }
24059              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24060$as_echo_n "checking Boot JDK version... " >&6; }
24061              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24062              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24063$as_echo "$BOOT_JDK_VERSION" >&6; }
24064            fi # end check jdk version
24065          fi # end check rt.jar
24066        fi # end check javac
24067      fi # end check java
24068    fi # end check boot jdk found
24069  fi
24070
24071  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
24072
24073  if test "x$BOOT_JDK_FOUND" = xno; then
24074    # Now execute the test
24075
24076  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
24077  BOOT_JDK_SUFFIX="/Contents/Home"
24078  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24079  if test "x$ALL_JDKS_FOUND" != x; then
24080    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24081
24082  if test "x$BOOT_JDK_FOUND" = xno; then
24083    # Now execute the test
24084
24085        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24086        if test -d "$BOOT_JDK"; then
24087          BOOT_JDK_FOUND=maybe
24088          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24089$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24090        fi
24091
24092
24093    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24094    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24095      # Do we have a bin/java?
24096      if test ! -x "$BOOT_JDK/bin/java"; then
24097        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24099        BOOT_JDK_FOUND=no
24100      else
24101        # Do we have a bin/javac?
24102        if test ! -x "$BOOT_JDK/bin/javac"; then
24103          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24105          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24106$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24107          BOOT_JDK_FOUND=no
24108        else
24109          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24110          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24111            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24112$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24113            BOOT_JDK_FOUND=no
24114          else
24115            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24116            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24117
24118            # Extra M4 quote needed to protect [] in grep expression.
24119            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24120            if test "x$FOUND_CORRECT_VERSION" = x; then
24121              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24122$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24123              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24124$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24125              BOOT_JDK_FOUND=no
24126            else
24127              # We're done! :-)
24128              BOOT_JDK_FOUND=yes
24129
24130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24131
24132  # Input might be given as Windows format, start by converting to
24133  # unix format.
24134  path="$BOOT_JDK"
24135  new_path=`$CYGPATH -u "$path"`
24136
24137  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24138  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24139  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24140  # "foo.exe" is OK but "foo" is an error.
24141  #
24142  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24143  # It is also a way to make sure we got the proper file name for the real test later on.
24144  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24145  if test "x$test_shortpath" = x; then
24146    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24147$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24148    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24149  fi
24150
24151  # Call helper function which possibly converts this using DOS-style short mode.
24152  # If so, the updated path is stored in $new_path.
24153
24154  input_path="$new_path"
24155  # Check if we need to convert this using DOS-style short mode. If the path
24156  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24157  # take no chances and rewrite it.
24158  # Note: m4 eats our [], so we need to use [ and ] instead.
24159  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24160  if test "x$has_forbidden_chars" != x; then
24161    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24162    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24163    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24164    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24165      # Going to short mode and back again did indeed matter. Since short mode is
24166      # case insensitive, let's make it lowercase to improve readability.
24167      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24168      # Now convert it back to Unix-stile (cygpath)
24169      input_path=`$CYGPATH -u "$shortmode_path"`
24170      new_path="$input_path"
24171    fi
24172  fi
24173
24174  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24175  if test "x$test_cygdrive_prefix" = x; then
24176    # As a simple fix, exclude /usr/bin since it's not a real path.
24177    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24178      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24179      # a path prefixed by /cygdrive for fixpath to work.
24180      new_path="$CYGWIN_ROOT_PATH$input_path"
24181    fi
24182  fi
24183
24184
24185  if test "x$path" != "x$new_path"; then
24186    BOOT_JDK="$new_path"
24187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24188$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24189  fi
24190
24191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24192
24193  path="$BOOT_JDK"
24194  has_colon=`$ECHO $path | $GREP ^.:`
24195  new_path="$path"
24196  if test "x$has_colon" = x; then
24197    # Not in mixed or Windows style, start by that.
24198    new_path=`cmd //c echo $path`
24199  fi
24200
24201
24202  input_path="$new_path"
24203  # Check if we need to convert this using DOS-style short mode. If the path
24204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24205  # take no chances and rewrite it.
24206  # Note: m4 eats our [], so we need to use [ and ] instead.
24207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24208  if test "x$has_forbidden_chars" != x; then
24209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24211  fi
24212
24213
24214  windows_path="$new_path"
24215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24216    unix_path=`$CYGPATH -u "$windows_path"`
24217    new_path="$unix_path"
24218  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24219    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24220    new_path="$unix_path"
24221  fi
24222
24223  if test "x$path" != "x$new_path"; then
24224    BOOT_JDK="$new_path"
24225    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24226$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24227  fi
24228
24229  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24230  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24231
24232  else
24233    # We're on a posix platform. Hooray! :)
24234    path="$BOOT_JDK"
24235    has_space=`$ECHO "$path" | $GREP " "`
24236    if test "x$has_space" != x; then
24237      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24238$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24239      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24240    fi
24241
24242    # Use eval to expand a potential ~
24243    eval path="$path"
24244    if test ! -f "$path" && test ! -d "$path"; then
24245      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24246    fi
24247
24248    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24249  fi
24250
24251              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24252$as_echo_n "checking for Boot JDK... " >&6; }
24253              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24254$as_echo "$BOOT_JDK" >&6; }
24255              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24256$as_echo_n "checking Boot JDK version... " >&6; }
24257              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24258              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24259$as_echo "$BOOT_JDK_VERSION" >&6; }
24260            fi # end check jdk version
24261          fi # end check rt.jar
24262        fi # end check javac
24263      fi # end check java
24264    fi # end check boot jdk found
24265  fi
24266
24267    done
24268  fi
24269
24270
24271    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24272    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24273      # Do we have a bin/java?
24274      if test ! -x "$BOOT_JDK/bin/java"; then
24275        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24276$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24277        BOOT_JDK_FOUND=no
24278      else
24279        # Do we have a bin/javac?
24280        if test ! -x "$BOOT_JDK/bin/javac"; then
24281          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24282$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24283          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24284$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24285          BOOT_JDK_FOUND=no
24286        else
24287          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24288          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24289            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24291            BOOT_JDK_FOUND=no
24292          else
24293            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24294            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24295
24296            # Extra M4 quote needed to protect [] in grep expression.
24297            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24298            if test "x$FOUND_CORRECT_VERSION" = x; then
24299              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24300$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24301              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24302$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24303              BOOT_JDK_FOUND=no
24304            else
24305              # We're done! :-)
24306              BOOT_JDK_FOUND=yes
24307
24308  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24309
24310  # Input might be given as Windows format, start by converting to
24311  # unix format.
24312  path="$BOOT_JDK"
24313  new_path=`$CYGPATH -u "$path"`
24314
24315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24318  # "foo.exe" is OK but "foo" is an error.
24319  #
24320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24321  # It is also a way to make sure we got the proper file name for the real test later on.
24322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24323  if test "x$test_shortpath" = x; then
24324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24327  fi
24328
24329  # Call helper function which possibly converts this using DOS-style short mode.
24330  # If so, the updated path is stored in $new_path.
24331
24332  input_path="$new_path"
24333  # Check if we need to convert this using DOS-style short mode. If the path
24334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24335  # take no chances and rewrite it.
24336  # Note: m4 eats our [], so we need to use [ and ] instead.
24337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24338  if test "x$has_forbidden_chars" != x; then
24339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24343      # Going to short mode and back again did indeed matter. Since short mode is
24344      # case insensitive, let's make it lowercase to improve readability.
24345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24346      # Now convert it back to Unix-stile (cygpath)
24347      input_path=`$CYGPATH -u "$shortmode_path"`
24348      new_path="$input_path"
24349    fi
24350  fi
24351
24352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24353  if test "x$test_cygdrive_prefix" = x; then
24354    # As a simple fix, exclude /usr/bin since it's not a real path.
24355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24357      # a path prefixed by /cygdrive for fixpath to work.
24358      new_path="$CYGWIN_ROOT_PATH$input_path"
24359    fi
24360  fi
24361
24362
24363  if test "x$path" != "x$new_path"; then
24364    BOOT_JDK="$new_path"
24365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24367  fi
24368
24369  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24370
24371  path="$BOOT_JDK"
24372  has_colon=`$ECHO $path | $GREP ^.:`
24373  new_path="$path"
24374  if test "x$has_colon" = x; then
24375    # Not in mixed or Windows style, start by that.
24376    new_path=`cmd //c echo $path`
24377  fi
24378
24379
24380  input_path="$new_path"
24381  # Check if we need to convert this using DOS-style short mode. If the path
24382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24383  # take no chances and rewrite it.
24384  # Note: m4 eats our [], so we need to use [ and ] instead.
24385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24386  if test "x$has_forbidden_chars" != x; then
24387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24389  fi
24390
24391
24392  windows_path="$new_path"
24393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24394    unix_path=`$CYGPATH -u "$windows_path"`
24395    new_path="$unix_path"
24396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24398    new_path="$unix_path"
24399  fi
24400
24401  if test "x$path" != "x$new_path"; then
24402    BOOT_JDK="$new_path"
24403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24405  fi
24406
24407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24409
24410  else
24411    # We're on a posix platform. Hooray! :)
24412    path="$BOOT_JDK"
24413    has_space=`$ECHO "$path" | $GREP " "`
24414    if test "x$has_space" != x; then
24415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24417      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24418    fi
24419
24420    # Use eval to expand a potential ~
24421    eval path="$path"
24422    if test ! -f "$path" && test ! -d "$path"; then
24423      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24424    fi
24425
24426    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24427  fi
24428
24429              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24430$as_echo_n "checking for Boot JDK... " >&6; }
24431              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24432$as_echo "$BOOT_JDK" >&6; }
24433              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24434$as_echo_n "checking Boot JDK version... " >&6; }
24435              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24436              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24437$as_echo "$BOOT_JDK_VERSION" >&6; }
24438            fi # end check jdk version
24439          fi # end check rt.jar
24440        fi # end check javac
24441      fi # end check java
24442    fi # end check boot jdk found
24443  fi
24444
24445
24446  if test "x$BOOT_JDK_FOUND" = xno; then
24447    # Now execute the test
24448
24449  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
24450  BOOT_JDK_SUFFIX="/Contents/Home"
24451  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24452  if test "x$ALL_JDKS_FOUND" != x; then
24453    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24454
24455  if test "x$BOOT_JDK_FOUND" = xno; then
24456    # Now execute the test
24457
24458        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24459        if test -d "$BOOT_JDK"; then
24460          BOOT_JDK_FOUND=maybe
24461          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24462$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24463        fi
24464
24465
24466    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24467    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24468      # Do we have a bin/java?
24469      if test ! -x "$BOOT_JDK/bin/java"; then
24470        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24471$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24472        BOOT_JDK_FOUND=no
24473      else
24474        # Do we have a bin/javac?
24475        if test ! -x "$BOOT_JDK/bin/javac"; then
24476          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24478          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24479$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24480          BOOT_JDK_FOUND=no
24481        else
24482          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24483          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24484            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24485$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24486            BOOT_JDK_FOUND=no
24487          else
24488            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24489            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24490
24491            # Extra M4 quote needed to protect [] in grep expression.
24492            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24493            if test "x$FOUND_CORRECT_VERSION" = x; then
24494              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24496              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24497$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24498              BOOT_JDK_FOUND=no
24499            else
24500              # We're done! :-)
24501              BOOT_JDK_FOUND=yes
24502
24503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24504
24505  # Input might be given as Windows format, start by converting to
24506  # unix format.
24507  path="$BOOT_JDK"
24508  new_path=`$CYGPATH -u "$path"`
24509
24510  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24511  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24512  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24513  # "foo.exe" is OK but "foo" is an error.
24514  #
24515  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24516  # It is also a way to make sure we got the proper file name for the real test later on.
24517  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24518  if test "x$test_shortpath" = x; then
24519    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24520$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24521    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24522  fi
24523
24524  # Call helper function which possibly converts this using DOS-style short mode.
24525  # If so, the updated path is stored in $new_path.
24526
24527  input_path="$new_path"
24528  # Check if we need to convert this using DOS-style short mode. If the path
24529  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24530  # take no chances and rewrite it.
24531  # Note: m4 eats our [], so we need to use [ and ] instead.
24532  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24533  if test "x$has_forbidden_chars" != x; then
24534    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24535    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24536    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24537    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24538      # Going to short mode and back again did indeed matter. Since short mode is
24539      # case insensitive, let's make it lowercase to improve readability.
24540      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24541      # Now convert it back to Unix-stile (cygpath)
24542      input_path=`$CYGPATH -u "$shortmode_path"`
24543      new_path="$input_path"
24544    fi
24545  fi
24546
24547  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24548  if test "x$test_cygdrive_prefix" = x; then
24549    # As a simple fix, exclude /usr/bin since it's not a real path.
24550    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24551      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24552      # a path prefixed by /cygdrive for fixpath to work.
24553      new_path="$CYGWIN_ROOT_PATH$input_path"
24554    fi
24555  fi
24556
24557
24558  if test "x$path" != "x$new_path"; then
24559    BOOT_JDK="$new_path"
24560    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24561$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24562  fi
24563
24564  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24565
24566  path="$BOOT_JDK"
24567  has_colon=`$ECHO $path | $GREP ^.:`
24568  new_path="$path"
24569  if test "x$has_colon" = x; then
24570    # Not in mixed or Windows style, start by that.
24571    new_path=`cmd //c echo $path`
24572  fi
24573
24574
24575  input_path="$new_path"
24576  # Check if we need to convert this using DOS-style short mode. If the path
24577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24578  # take no chances and rewrite it.
24579  # Note: m4 eats our [], so we need to use [ and ] instead.
24580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24581  if test "x$has_forbidden_chars" != x; then
24582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24584  fi
24585
24586
24587  windows_path="$new_path"
24588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24589    unix_path=`$CYGPATH -u "$windows_path"`
24590    new_path="$unix_path"
24591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24593    new_path="$unix_path"
24594  fi
24595
24596  if test "x$path" != "x$new_path"; then
24597    BOOT_JDK="$new_path"
24598    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24599$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24600  fi
24601
24602  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24603  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24604
24605  else
24606    # We're on a posix platform. Hooray! :)
24607    path="$BOOT_JDK"
24608    has_space=`$ECHO "$path" | $GREP " "`
24609    if test "x$has_space" != x; then
24610      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24611$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24612      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24613    fi
24614
24615    # Use eval to expand a potential ~
24616    eval path="$path"
24617    if test ! -f "$path" && test ! -d "$path"; then
24618      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24619    fi
24620
24621    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24622  fi
24623
24624              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24625$as_echo_n "checking for Boot JDK... " >&6; }
24626              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24627$as_echo "$BOOT_JDK" >&6; }
24628              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24629$as_echo_n "checking Boot JDK version... " >&6; }
24630              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24631              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24632$as_echo "$BOOT_JDK_VERSION" >&6; }
24633            fi # end check jdk version
24634          fi # end check rt.jar
24635        fi # end check javac
24636      fi # end check java
24637    fi # end check boot jdk found
24638  fi
24639
24640    done
24641  fi
24642
24643
24644    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24645    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24646      # Do we have a bin/java?
24647      if test ! -x "$BOOT_JDK/bin/java"; then
24648        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24649$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24650        BOOT_JDK_FOUND=no
24651      else
24652        # Do we have a bin/javac?
24653        if test ! -x "$BOOT_JDK/bin/javac"; then
24654          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24655$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24656          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24657$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24658          BOOT_JDK_FOUND=no
24659        else
24660          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24661          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24662            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24663$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24664            BOOT_JDK_FOUND=no
24665          else
24666            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24667            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24668
24669            # Extra M4 quote needed to protect [] in grep expression.
24670            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24671            if test "x$FOUND_CORRECT_VERSION" = x; then
24672              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24673$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24674              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24675$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24676              BOOT_JDK_FOUND=no
24677            else
24678              # We're done! :-)
24679              BOOT_JDK_FOUND=yes
24680
24681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24682
24683  # Input might be given as Windows format, start by converting to
24684  # unix format.
24685  path="$BOOT_JDK"
24686  new_path=`$CYGPATH -u "$path"`
24687
24688  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24689  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24690  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24691  # "foo.exe" is OK but "foo" is an error.
24692  #
24693  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24694  # It is also a way to make sure we got the proper file name for the real test later on.
24695  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24696  if test "x$test_shortpath" = x; then
24697    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24698$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24699    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24700  fi
24701
24702  # Call helper function which possibly converts this using DOS-style short mode.
24703  # If so, the updated path is stored in $new_path.
24704
24705  input_path="$new_path"
24706  # Check if we need to convert this using DOS-style short mode. If the path
24707  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24708  # take no chances and rewrite it.
24709  # Note: m4 eats our [], so we need to use [ and ] instead.
24710  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24711  if test "x$has_forbidden_chars" != x; then
24712    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24713    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24714    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24715    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24716      # Going to short mode and back again did indeed matter. Since short mode is
24717      # case insensitive, let's make it lowercase to improve readability.
24718      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24719      # Now convert it back to Unix-stile (cygpath)
24720      input_path=`$CYGPATH -u "$shortmode_path"`
24721      new_path="$input_path"
24722    fi
24723  fi
24724
24725  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24726  if test "x$test_cygdrive_prefix" = x; then
24727    # As a simple fix, exclude /usr/bin since it's not a real path.
24728    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24729      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24730      # a path prefixed by /cygdrive for fixpath to work.
24731      new_path="$CYGWIN_ROOT_PATH$input_path"
24732    fi
24733  fi
24734
24735
24736  if test "x$path" != "x$new_path"; then
24737    BOOT_JDK="$new_path"
24738    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24739$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24740  fi
24741
24742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24743
24744  path="$BOOT_JDK"
24745  has_colon=`$ECHO $path | $GREP ^.:`
24746  new_path="$path"
24747  if test "x$has_colon" = x; then
24748    # Not in mixed or Windows style, start by that.
24749    new_path=`cmd //c echo $path`
24750  fi
24751
24752
24753  input_path="$new_path"
24754  # Check if we need to convert this using DOS-style short mode. If the path
24755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24756  # take no chances and rewrite it.
24757  # Note: m4 eats our [], so we need to use [ and ] instead.
24758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24759  if test "x$has_forbidden_chars" != x; then
24760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24761    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24762  fi
24763
24764
24765  windows_path="$new_path"
24766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24767    unix_path=`$CYGPATH -u "$windows_path"`
24768    new_path="$unix_path"
24769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24771    new_path="$unix_path"
24772  fi
24773
24774  if test "x$path" != "x$new_path"; then
24775    BOOT_JDK="$new_path"
24776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24777$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24778  fi
24779
24780  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24781  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24782
24783  else
24784    # We're on a posix platform. Hooray! :)
24785    path="$BOOT_JDK"
24786    has_space=`$ECHO "$path" | $GREP " "`
24787    if test "x$has_space" != x; then
24788      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24789$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24790      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24791    fi
24792
24793    # Use eval to expand a potential ~
24794    eval path="$path"
24795    if test ! -f "$path" && test ! -d "$path"; then
24796      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24797    fi
24798
24799    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24800  fi
24801
24802              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24803$as_echo_n "checking for Boot JDK... " >&6; }
24804              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24805$as_echo "$BOOT_JDK" >&6; }
24806              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24807$as_echo_n "checking Boot JDK version... " >&6; }
24808              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24809              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24810$as_echo "$BOOT_JDK_VERSION" >&6; }
24811            fi # end check jdk version
24812          fi # end check rt.jar
24813        fi # end check javac
24814      fi # end check java
24815    fi # end check boot jdk found
24816  fi
24817
24818  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
24819
24820  if test "x$BOOT_JDK_FOUND" = xno; then
24821    # Now execute the test
24822
24823  BOOT_JDK_PREFIX="/usr/lib/jvm"
24824  BOOT_JDK_SUFFIX=""
24825  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
24826  if test "x$ALL_JDKS_FOUND" != x; then
24827    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
24828
24829  if test "x$BOOT_JDK_FOUND" = xno; then
24830    # Now execute the test
24831
24832        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
24833        if test -d "$BOOT_JDK"; then
24834          BOOT_JDK_FOUND=maybe
24835          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
24836$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
24837        fi
24838
24839
24840    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24841    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24842      # Do we have a bin/java?
24843      if test ! -x "$BOOT_JDK/bin/java"; then
24844        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24845$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24846        BOOT_JDK_FOUND=no
24847      else
24848        # Do we have a bin/javac?
24849        if test ! -x "$BOOT_JDK/bin/javac"; then
24850          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24851$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24852          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24853$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24854          BOOT_JDK_FOUND=no
24855        else
24856          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
24857          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
24858            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
24859$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
24860            BOOT_JDK_FOUND=no
24861          else
24862            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24863            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24864
24865            # Extra M4 quote needed to protect [] in grep expression.
24866            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
24867            if test "x$FOUND_CORRECT_VERSION" = x; then
24868              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24869$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24870              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24871$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24872              BOOT_JDK_FOUND=no
24873            else
24874              # We're done! :-)
24875              BOOT_JDK_FOUND=yes
24876
24877  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24878
24879  # Input might be given as Windows format, start by converting to
24880  # unix format.
24881  path="$BOOT_JDK"
24882  new_path=`$CYGPATH -u "$path"`
24883
24884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24887  # "foo.exe" is OK but "foo" is an error.
24888  #
24889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24890  # It is also a way to make sure we got the proper file name for the real test later on.
24891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24892  if test "x$test_shortpath" = x; then
24893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24894$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24895    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24896  fi
24897
24898  # Call helper function which possibly converts this using DOS-style short mode.
24899  # If so, the updated path is stored in $new_path.
24900
24901  input_path="$new_path"
24902  # Check if we need to convert this using DOS-style short mode. If the path
24903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24904  # take no chances and rewrite it.
24905  # Note: m4 eats our [], so we need to use [ and ] instead.
24906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24907  if test "x$has_forbidden_chars" != x; then
24908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24912      # Going to short mode and back again did indeed matter. Since short mode is
24913      # case insensitive, let's make it lowercase to improve readability.
24914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24915      # Now convert it back to Unix-stile (cygpath)
24916      input_path=`$CYGPATH -u "$shortmode_path"`
24917      new_path="$input_path"
24918    fi
24919  fi
24920
24921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24922  if test "x$test_cygdrive_prefix" = x; then
24923    # As a simple fix, exclude /usr/bin since it's not a real path.
24924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24926      # a path prefixed by /cygdrive for fixpath to work.
24927      new_path="$CYGWIN_ROOT_PATH$input_path"
24928    fi
24929  fi
24930
24931
24932  if test "x$path" != "x$new_path"; then
24933    BOOT_JDK="$new_path"
24934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24935$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24936  fi
24937
24938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24939
24940  path="$BOOT_JDK"
24941  has_colon=`$ECHO $path | $GREP ^.:`
24942  new_path="$path"
24943  if test "x$has_colon" = x; then
24944    # Not in mixed or Windows style, start by that.
24945    new_path=`cmd //c echo $path`
24946  fi
24947
24948
24949  input_path="$new_path"
24950  # Check if we need to convert this using DOS-style short mode. If the path
24951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24952  # take no chances and rewrite it.
24953  # Note: m4 eats our [], so we need to use [ and ] instead.
24954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24955  if test "x$has_forbidden_chars" != x; then
24956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24958  fi
24959
24960
24961  windows_path="$new_path"
24962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24963    unix_path=`$CYGPATH -u "$windows_path"`
24964    new_path="$unix_path"
24965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24967    new_path="$unix_path"
24968  fi
24969
24970  if test "x$path" != "x$new_path"; then
24971    BOOT_JDK="$new_path"
24972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24973$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24974  fi
24975
24976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24978
24979  else
24980    # We're on a posix platform. Hooray! :)
24981    path="$BOOT_JDK"
24982    has_space=`$ECHO "$path" | $GREP " "`
24983    if test "x$has_space" != x; then
24984      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24985$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24986      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24987    fi
24988
24989    # Use eval to expand a potential ~
24990    eval path="$path"
24991    if test ! -f "$path" && test ! -d "$path"; then
24992      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24993    fi
24994
24995    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24996  fi
24997
24998              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24999$as_echo_n "checking for Boot JDK... " >&6; }
25000              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25001$as_echo "$BOOT_JDK" >&6; }
25002              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25003$as_echo_n "checking Boot JDK version... " >&6; }
25004              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25005              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25006$as_echo "$BOOT_JDK_VERSION" >&6; }
25007            fi # end check jdk version
25008          fi # end check rt.jar
25009        fi # end check javac
25010      fi # end check java
25011    fi # end check boot jdk found
25012  fi
25013
25014    done
25015  fi
25016
25017
25018    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25019    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25020      # Do we have a bin/java?
25021      if test ! -x "$BOOT_JDK/bin/java"; then
25022        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25023$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25024        BOOT_JDK_FOUND=no
25025      else
25026        # Do we have a bin/javac?
25027        if test ! -x "$BOOT_JDK/bin/javac"; then
25028          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25030          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25031$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25032          BOOT_JDK_FOUND=no
25033        else
25034          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25035          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25036            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25037$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25038            BOOT_JDK_FOUND=no
25039          else
25040            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25042
25043            # Extra M4 quote needed to protect [] in grep expression.
25044            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25045            if test "x$FOUND_CORRECT_VERSION" = x; then
25046              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25047$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25048              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25049$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25050              BOOT_JDK_FOUND=no
25051            else
25052              # We're done! :-)
25053              BOOT_JDK_FOUND=yes
25054
25055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25056
25057  # Input might be given as Windows format, start by converting to
25058  # unix format.
25059  path="$BOOT_JDK"
25060  new_path=`$CYGPATH -u "$path"`
25061
25062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25065  # "foo.exe" is OK but "foo" is an error.
25066  #
25067  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25068  # It is also a way to make sure we got the proper file name for the real test later on.
25069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25070  if test "x$test_shortpath" = x; then
25071    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25072$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25073    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25074  fi
25075
25076  # Call helper function which possibly converts this using DOS-style short mode.
25077  # If so, the updated path is stored in $new_path.
25078
25079  input_path="$new_path"
25080  # Check if we need to convert this using DOS-style short mode. If the path
25081  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25082  # take no chances and rewrite it.
25083  # Note: m4 eats our [], so we need to use [ and ] instead.
25084  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25085  if test "x$has_forbidden_chars" != x; then
25086    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25087    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25088    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25089    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25090      # Going to short mode and back again did indeed matter. Since short mode is
25091      # case insensitive, let's make it lowercase to improve readability.
25092      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25093      # Now convert it back to Unix-stile (cygpath)
25094      input_path=`$CYGPATH -u "$shortmode_path"`
25095      new_path="$input_path"
25096    fi
25097  fi
25098
25099  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25100  if test "x$test_cygdrive_prefix" = x; then
25101    # As a simple fix, exclude /usr/bin since it's not a real path.
25102    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25103      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25104      # a path prefixed by /cygdrive for fixpath to work.
25105      new_path="$CYGWIN_ROOT_PATH$input_path"
25106    fi
25107  fi
25108
25109
25110  if test "x$path" != "x$new_path"; then
25111    BOOT_JDK="$new_path"
25112    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25113$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25114  fi
25115
25116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25117
25118  path="$BOOT_JDK"
25119  has_colon=`$ECHO $path | $GREP ^.:`
25120  new_path="$path"
25121  if test "x$has_colon" = x; then
25122    # Not in mixed or Windows style, start by that.
25123    new_path=`cmd //c echo $path`
25124  fi
25125
25126
25127  input_path="$new_path"
25128  # Check if we need to convert this using DOS-style short mode. If the path
25129  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25130  # take no chances and rewrite it.
25131  # Note: m4 eats our [], so we need to use [ and ] instead.
25132  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25133  if test "x$has_forbidden_chars" != x; then
25134    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25135    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25136  fi
25137
25138
25139  windows_path="$new_path"
25140  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25141    unix_path=`$CYGPATH -u "$windows_path"`
25142    new_path="$unix_path"
25143  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25144    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25145    new_path="$unix_path"
25146  fi
25147
25148  if test "x$path" != "x$new_path"; then
25149    BOOT_JDK="$new_path"
25150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25151$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25152  fi
25153
25154  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25155  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25156
25157  else
25158    # We're on a posix platform. Hooray! :)
25159    path="$BOOT_JDK"
25160    has_space=`$ECHO "$path" | $GREP " "`
25161    if test "x$has_space" != x; then
25162      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25163$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25164      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25165    fi
25166
25167    # Use eval to expand a potential ~
25168    eval path="$path"
25169    if test ! -f "$path" && test ! -d "$path"; then
25170      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25171    fi
25172
25173    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25174  fi
25175
25176              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25177$as_echo_n "checking for Boot JDK... " >&6; }
25178              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25179$as_echo "$BOOT_JDK" >&6; }
25180              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25181$as_echo_n "checking Boot JDK version... " >&6; }
25182              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25183              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25184$as_echo "$BOOT_JDK_VERSION" >&6; }
25185            fi # end check jdk version
25186          fi # end check rt.jar
25187        fi # end check javac
25188      fi # end check java
25189    fi # end check boot jdk found
25190  fi
25191
25192  fi
25193
25194
25195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25197      # Do we have a bin/java?
25198      if test ! -x "$BOOT_JDK/bin/java"; then
25199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25201        BOOT_JDK_FOUND=no
25202      else
25203        # Do we have a bin/javac?
25204        if test ! -x "$BOOT_JDK/bin/javac"; then
25205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25209          BOOT_JDK_FOUND=no
25210        else
25211          # Do we have an rt.jar? (On MacOSX it is called classes.jar)
25212          if test ! -f "$BOOT_JDK/jre/lib/rt.jar" && test ! -f "$BOOT_JDK/../Classes/classes.jar"; then
25213            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&5
25214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain an rt.jar; ignoring" >&6;}
25215            BOOT_JDK_FOUND=no
25216          else
25217            # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25218            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25219
25220            # Extra M4 quote needed to protect [] in grep expression.
25221            FOUND_CORRECT_VERSION=`echo $BOOT_JDK_VERSION | grep  '\"1\.[89]\.'`
25222            if test "x$FOUND_CORRECT_VERSION" = x; then
25223              { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25225              { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25226$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25227              BOOT_JDK_FOUND=no
25228            else
25229              # We're done! :-)
25230              BOOT_JDK_FOUND=yes
25231
25232  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25233
25234  # Input might be given as Windows format, start by converting to
25235  # unix format.
25236  path="$BOOT_JDK"
25237  new_path=`$CYGPATH -u "$path"`
25238
25239  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25240  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25241  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25242  # "foo.exe" is OK but "foo" is an error.
25243  #
25244  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25245  # It is also a way to make sure we got the proper file name for the real test later on.
25246  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25247  if test "x$test_shortpath" = x; then
25248    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25249$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25250    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25251  fi
25252
25253  # Call helper function which possibly converts this using DOS-style short mode.
25254  # If so, the updated path is stored in $new_path.
25255
25256  input_path="$new_path"
25257  # Check if we need to convert this using DOS-style short mode. If the path
25258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25259  # take no chances and rewrite it.
25260  # Note: m4 eats our [], so we need to use [ and ] instead.
25261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25262  if test "x$has_forbidden_chars" != x; then
25263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25264    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25265    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25266    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25267      # Going to short mode and back again did indeed matter. Since short mode is
25268      # case insensitive, let's make it lowercase to improve readability.
25269      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25270      # Now convert it back to Unix-stile (cygpath)
25271      input_path=`$CYGPATH -u "$shortmode_path"`
25272      new_path="$input_path"
25273    fi
25274  fi
25275
25276  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25277  if test "x$test_cygdrive_prefix" = x; then
25278    # As a simple fix, exclude /usr/bin since it's not a real path.
25279    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25280      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25281      # a path prefixed by /cygdrive for fixpath to work.
25282      new_path="$CYGWIN_ROOT_PATH$input_path"
25283    fi
25284  fi
25285
25286
25287  if test "x$path" != "x$new_path"; then
25288    BOOT_JDK="$new_path"
25289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25290$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25291  fi
25292
25293  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25294
25295  path="$BOOT_JDK"
25296  has_colon=`$ECHO $path | $GREP ^.:`
25297  new_path="$path"
25298  if test "x$has_colon" = x; then
25299    # Not in mixed or Windows style, start by that.
25300    new_path=`cmd //c echo $path`
25301  fi
25302
25303
25304  input_path="$new_path"
25305  # Check if we need to convert this using DOS-style short mode. If the path
25306  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25307  # take no chances and rewrite it.
25308  # Note: m4 eats our [], so we need to use [ and ] instead.
25309  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25310  if test "x$has_forbidden_chars" != x; then
25311    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25312    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25313  fi
25314
25315
25316  windows_path="$new_path"
25317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25318    unix_path=`$CYGPATH -u "$windows_path"`
25319    new_path="$unix_path"
25320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25322    new_path="$unix_path"
25323  fi
25324
25325  if test "x$path" != "x$new_path"; then
25326    BOOT_JDK="$new_path"
25327    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25328$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25329  fi
25330
25331  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25332  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25333
25334  else
25335    # We're on a posix platform. Hooray! :)
25336    path="$BOOT_JDK"
25337    has_space=`$ECHO "$path" | $GREP " "`
25338    if test "x$has_space" != x; then
25339      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25340$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25341      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25342    fi
25343
25344    # Use eval to expand a potential ~
25345    eval path="$path"
25346    if test ! -f "$path" && test ! -d "$path"; then
25347      as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25348    fi
25349
25350    BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25351  fi
25352
25353              { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25354$as_echo_n "checking for Boot JDK... " >&6; }
25355              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25356$as_echo "$BOOT_JDK" >&6; }
25357              { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25358$as_echo_n "checking Boot JDK version... " >&6; }
25359              BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25360              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25361$as_echo "$BOOT_JDK_VERSION" >&6; }
25362            fi # end check jdk version
25363          fi # end check rt.jar
25364        fi # end check javac
25365      fi # end check java
25366    fi # end check boot jdk found
25367  fi
25368
25369
25370  # If we haven't found anything yet, we've truly lost. Give up.
25371  if test "x$BOOT_JDK_FOUND" = xno; then
25372
25373  # Print a helpful message on how to acquire the necessary build dependency.
25374  # openjdk is the help tag: freetype, cups, pulse, alsa etc
25375  MISSING_DEPENDENCY=openjdk
25376
25377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25378    cygwin_help $MISSING_DEPENDENCY
25379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25380    msys_help $MISSING_DEPENDENCY
25381  else
25382    PKGHANDLER_COMMAND=
25383
25384    case $PKGHANDLER in
25385      apt-get)
25386        apt_help     $MISSING_DEPENDENCY ;;
25387      yum)
25388        yum_help     $MISSING_DEPENDENCY ;;
25389      port)
25390        port_help    $MISSING_DEPENDENCY ;;
25391      pkgutil)
25392        pkgutil_help $MISSING_DEPENDENCY ;;
25393      pkgadd)
25394        pkgadd_help  $MISSING_DEPENDENCY ;;
25395    esac
25396
25397    if test "x$PKGHANDLER_COMMAND" != x; then
25398      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
25399    fi
25400  fi
25401
25402    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
25403$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
25404    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
25405$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25406    as_fn_error $? "Cannot continue" "$LINENO" 5
25407  fi
25408
25409  # Setup proper paths for what we found
25410  BOOT_RTJAR="$BOOT_JDK/jre/lib/rt.jar"
25411  if test ! -f "$BOOT_RTJAR"; then
25412    # On MacOSX it is called classes.jar
25413    BOOT_RTJAR="$BOOT_JDK/../Classes/classes.jar"
25414    if test -f "$BOOT_RTJAR"; then
25415      # Remove the ..
25416      BOOT_RTJAR="`cd ${BOOT_RTJAR%/*} && pwd`/${BOOT_RTJAR##*/}"
25417    fi
25418  fi
25419  BOOT_TOOLSJAR="$BOOT_JDK/lib/tools.jar"
25420  BOOT_JDK="$BOOT_JDK"
25421
25422
25423
25424
25425  # Setup tools from the Boot JDK.
25426
25427  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25428
25429  # Publish this variable in the help.
25430
25431
25432  if test "x$JAVA" = x; then
25433    # The variable is not set by user, try to locate tool using the code snippet
25434
25435      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25436$as_echo_n "checking for java in Boot JDK... " >&6; }
25437      JAVA=$BOOT_JDK/bin/java
25438      if test ! -x $JAVA; then
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25440$as_echo "not found" >&6; }
25441        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25442$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25443        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25444      fi
25445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25446$as_echo "ok" >&6; }
25447
25448
25449  else
25450    # The variable is set, but is it from the command line or the environment?
25451
25452    # Try to remove the string !JAVA! from our list.
25453    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
25454    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25455      # If it failed, the variable was not from the command line. Ignore it,
25456      # but warn the user (except for BASH, which is always set by the calling BASH).
25457      if test "xJAVA" != xBASH; then
25458        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
25459$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
25460      fi
25461      # Try to locate tool using the code snippet
25462
25463      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
25464$as_echo_n "checking for java in Boot JDK... " >&6; }
25465      JAVA=$BOOT_JDK/bin/java
25466      if test ! -x $JAVA; then
25467        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25468$as_echo "not found" >&6; }
25469        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25470$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25471        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
25472      fi
25473      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25474$as_echo "ok" >&6; }
25475
25476
25477    else
25478      # If it succeeded, then it was overridden by the user. We will use it
25479      # for the tool.
25480
25481      # First remove it from the list of overridden variables, so we can test
25482      # for unknown variables in the end.
25483      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25484
25485      # Check if the provided tool contains a complete path.
25486      tool_specified="$JAVA"
25487      tool_basename="${tool_specified##*/}"
25488      if test "x$tool_basename" = "x$tool_specified"; then
25489        # A command without a complete path is provided, search $PATH.
25490        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
25491$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
25492        # Extract the first word of "$tool_basename", so it can be a program name with args.
25493set dummy $tool_basename; ac_word=$2
25494{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25495$as_echo_n "checking for $ac_word... " >&6; }
25496if ${ac_cv_path_JAVA+:} false; then :
25497  $as_echo_n "(cached) " >&6
25498else
25499  case $JAVA in
25500  [\\/]* | ?:[\\/]*)
25501  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
25502  ;;
25503  *)
25504  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25505for as_dir in $PATH
25506do
25507  IFS=$as_save_IFS
25508  test -z "$as_dir" && as_dir=.
25509    for ac_exec_ext in '' $ac_executable_extensions; do
25510  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25511    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
25512    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25513    break 2
25514  fi
25515done
25516  done
25517IFS=$as_save_IFS
25518
25519  ;;
25520esac
25521fi
25522JAVA=$ac_cv_path_JAVA
25523if test -n "$JAVA"; then
25524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
25525$as_echo "$JAVA" >&6; }
25526else
25527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25528$as_echo "no" >&6; }
25529fi
25530
25531
25532        if test "x$JAVA" = x; then
25533          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25534        fi
25535      else
25536        # Otherwise we believe it is a complete path. Use it as it is.
25537        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
25538$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
25539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
25540$as_echo_n "checking for JAVA... " >&6; }
25541        if test ! -x "$tool_specified"; then
25542          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25543$as_echo "not found" >&6; }
25544          as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
25545        fi
25546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25547$as_echo "$tool_specified" >&6; }
25548      fi
25549    fi
25550  fi
25551
25552
25553
25554  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25555
25556  # Publish this variable in the help.
25557
25558
25559  if test "x$JAVAC" = x; then
25560    # The variable is not set by user, try to locate tool using the code snippet
25561
25562      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25563$as_echo_n "checking for javac in Boot JDK... " >&6; }
25564      JAVAC=$BOOT_JDK/bin/javac
25565      if test ! -x $JAVAC; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25567$as_echo "not found" >&6; }
25568        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25569$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25570        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25571      fi
25572      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25573$as_echo "ok" >&6; }
25574
25575
25576  else
25577    # The variable is set, but is it from the command line or the environment?
25578
25579    # Try to remove the string !JAVAC! from our list.
25580    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
25581    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25582      # If it failed, the variable was not from the command line. Ignore it,
25583      # but warn the user (except for BASH, which is always set by the calling BASH).
25584      if test "xJAVAC" != xBASH; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
25586$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
25587      fi
25588      # Try to locate tool using the code snippet
25589
25590      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
25591$as_echo_n "checking for javac in Boot JDK... " >&6; }
25592      JAVAC=$BOOT_JDK/bin/javac
25593      if test ! -x $JAVAC; then
25594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25595$as_echo "not found" >&6; }
25596        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25597$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25598        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
25599      fi
25600      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25601$as_echo "ok" >&6; }
25602
25603
25604    else
25605      # If it succeeded, then it was overridden by the user. We will use it
25606      # for the tool.
25607
25608      # First remove it from the list of overridden variables, so we can test
25609      # for unknown variables in the end.
25610      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25611
25612      # Check if the provided tool contains a complete path.
25613      tool_specified="$JAVAC"
25614      tool_basename="${tool_specified##*/}"
25615      if test "x$tool_basename" = "x$tool_specified"; then
25616        # A command without a complete path is provided, search $PATH.
25617        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
25618$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
25619        # Extract the first word of "$tool_basename", so it can be a program name with args.
25620set dummy $tool_basename; ac_word=$2
25621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25622$as_echo_n "checking for $ac_word... " >&6; }
25623if ${ac_cv_path_JAVAC+:} false; then :
25624  $as_echo_n "(cached) " >&6
25625else
25626  case $JAVAC in
25627  [\\/]* | ?:[\\/]*)
25628  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
25629  ;;
25630  *)
25631  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25632for as_dir in $PATH
25633do
25634  IFS=$as_save_IFS
25635  test -z "$as_dir" && as_dir=.
25636    for ac_exec_ext in '' $ac_executable_extensions; do
25637  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25638    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
25639    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25640    break 2
25641  fi
25642done
25643  done
25644IFS=$as_save_IFS
25645
25646  ;;
25647esac
25648fi
25649JAVAC=$ac_cv_path_JAVAC
25650if test -n "$JAVAC"; then
25651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
25652$as_echo "$JAVAC" >&6; }
25653else
25654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25655$as_echo "no" >&6; }
25656fi
25657
25658
25659        if test "x$JAVAC" = x; then
25660          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25661        fi
25662      else
25663        # Otherwise we believe it is a complete path. Use it as it is.
25664        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
25665$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
25666        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
25667$as_echo_n "checking for JAVAC... " >&6; }
25668        if test ! -x "$tool_specified"; then
25669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25670$as_echo "not found" >&6; }
25671          as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
25672        fi
25673        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25674$as_echo "$tool_specified" >&6; }
25675      fi
25676    fi
25677  fi
25678
25679
25680
25681  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25682
25683  # Publish this variable in the help.
25684
25685
25686  if test "x$JAVAH" = x; then
25687    # The variable is not set by user, try to locate tool using the code snippet
25688
25689      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25690$as_echo_n "checking for javah in Boot JDK... " >&6; }
25691      JAVAH=$BOOT_JDK/bin/javah
25692      if test ! -x $JAVAH; then
25693        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25694$as_echo "not found" >&6; }
25695        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25696$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25697        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25698      fi
25699      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25700$as_echo "ok" >&6; }
25701
25702
25703  else
25704    # The variable is set, but is it from the command line or the environment?
25705
25706    # Try to remove the string !JAVAH! from our list.
25707    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
25708    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25709      # If it failed, the variable was not from the command line. Ignore it,
25710      # but warn the user (except for BASH, which is always set by the calling BASH).
25711      if test "xJAVAH" != xBASH; then
25712        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
25713$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
25714      fi
25715      # Try to locate tool using the code snippet
25716
25717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
25718$as_echo_n "checking for javah in Boot JDK... " >&6; }
25719      JAVAH=$BOOT_JDK/bin/javah
25720      if test ! -x $JAVAH; then
25721        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25722$as_echo "not found" >&6; }
25723        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25724$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25725        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
25726      fi
25727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25728$as_echo "ok" >&6; }
25729
25730
25731    else
25732      # If it succeeded, then it was overridden by the user. We will use it
25733      # for the tool.
25734
25735      # First remove it from the list of overridden variables, so we can test
25736      # for unknown variables in the end.
25737      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25738
25739      # Check if the provided tool contains a complete path.
25740      tool_specified="$JAVAH"
25741      tool_basename="${tool_specified##*/}"
25742      if test "x$tool_basename" = "x$tool_specified"; then
25743        # A command without a complete path is provided, search $PATH.
25744        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
25745$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
25746        # Extract the first word of "$tool_basename", so it can be a program name with args.
25747set dummy $tool_basename; ac_word=$2
25748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25749$as_echo_n "checking for $ac_word... " >&6; }
25750if ${ac_cv_path_JAVAH+:} false; then :
25751  $as_echo_n "(cached) " >&6
25752else
25753  case $JAVAH in
25754  [\\/]* | ?:[\\/]*)
25755  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
25756  ;;
25757  *)
25758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25759for as_dir in $PATH
25760do
25761  IFS=$as_save_IFS
25762  test -z "$as_dir" && as_dir=.
25763    for ac_exec_ext in '' $ac_executable_extensions; do
25764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25765    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
25766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25767    break 2
25768  fi
25769done
25770  done
25771IFS=$as_save_IFS
25772
25773  ;;
25774esac
25775fi
25776JAVAH=$ac_cv_path_JAVAH
25777if test -n "$JAVAH"; then
25778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
25779$as_echo "$JAVAH" >&6; }
25780else
25781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25782$as_echo "no" >&6; }
25783fi
25784
25785
25786        if test "x$JAVAH" = x; then
25787          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25788        fi
25789      else
25790        # Otherwise we believe it is a complete path. Use it as it is.
25791        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
25792$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
25793        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
25794$as_echo_n "checking for JAVAH... " >&6; }
25795        if test ! -x "$tool_specified"; then
25796          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25797$as_echo "not found" >&6; }
25798          as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
25799        fi
25800        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25801$as_echo "$tool_specified" >&6; }
25802      fi
25803    fi
25804  fi
25805
25806
25807
25808  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25809
25810  # Publish this variable in the help.
25811
25812
25813  if test "x$JAR" = x; then
25814    # The variable is not set by user, try to locate tool using the code snippet
25815
25816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25817$as_echo_n "checking for jar in Boot JDK... " >&6; }
25818      JAR=$BOOT_JDK/bin/jar
25819      if test ! -x $JAR; then
25820        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25821$as_echo "not found" >&6; }
25822        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25823$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25824        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25825      fi
25826      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25827$as_echo "ok" >&6; }
25828
25829
25830  else
25831    # The variable is set, but is it from the command line or the environment?
25832
25833    # Try to remove the string !JAR! from our list.
25834    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
25835    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25836      # If it failed, the variable was not from the command line. Ignore it,
25837      # but warn the user (except for BASH, which is always set by the calling BASH).
25838      if test "xJAR" != xBASH; then
25839        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
25840$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
25841      fi
25842      # Try to locate tool using the code snippet
25843
25844      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
25845$as_echo_n "checking for jar in Boot JDK... " >&6; }
25846      JAR=$BOOT_JDK/bin/jar
25847      if test ! -x $JAR; then
25848        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25849$as_echo "not found" >&6; }
25850        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25851$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25852        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
25853      fi
25854      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25855$as_echo "ok" >&6; }
25856
25857
25858    else
25859      # If it succeeded, then it was overridden by the user. We will use it
25860      # for the tool.
25861
25862      # First remove it from the list of overridden variables, so we can test
25863      # for unknown variables in the end.
25864      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25865
25866      # Check if the provided tool contains a complete path.
25867      tool_specified="$JAR"
25868      tool_basename="${tool_specified##*/}"
25869      if test "x$tool_basename" = "x$tool_specified"; then
25870        # A command without a complete path is provided, search $PATH.
25871        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
25872$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
25873        # Extract the first word of "$tool_basename", so it can be a program name with args.
25874set dummy $tool_basename; ac_word=$2
25875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25876$as_echo_n "checking for $ac_word... " >&6; }
25877if ${ac_cv_path_JAR+:} false; then :
25878  $as_echo_n "(cached) " >&6
25879else
25880  case $JAR in
25881  [\\/]* | ?:[\\/]*)
25882  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
25883  ;;
25884  *)
25885  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25886for as_dir in $PATH
25887do
25888  IFS=$as_save_IFS
25889  test -z "$as_dir" && as_dir=.
25890    for ac_exec_ext in '' $ac_executable_extensions; do
25891  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25892    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
25893    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25894    break 2
25895  fi
25896done
25897  done
25898IFS=$as_save_IFS
25899
25900  ;;
25901esac
25902fi
25903JAR=$ac_cv_path_JAR
25904if test -n "$JAR"; then
25905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
25906$as_echo "$JAR" >&6; }
25907else
25908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25909$as_echo "no" >&6; }
25910fi
25911
25912
25913        if test "x$JAR" = x; then
25914          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
25915        fi
25916      else
25917        # Otherwise we believe it is a complete path. Use it as it is.
25918        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
25919$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
25920        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
25921$as_echo_n "checking for JAR... " >&6; }
25922        if test ! -x "$tool_specified"; then
25923          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25924$as_echo "not found" >&6; }
25925          as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
25926        fi
25927        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
25928$as_echo "$tool_specified" >&6; }
25929      fi
25930    fi
25931  fi
25932
25933
25934
25935  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
25936
25937  # Publish this variable in the help.
25938
25939
25940  if test "x$NATIVE2ASCII" = x; then
25941    # The variable is not set by user, try to locate tool using the code snippet
25942
25943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25944$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25945      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25946      if test ! -x $NATIVE2ASCII; then
25947        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25948$as_echo "not found" >&6; }
25949        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25950$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25951        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25952      fi
25953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25954$as_echo "ok" >&6; }
25955
25956
25957  else
25958    # The variable is set, but is it from the command line or the environment?
25959
25960    # Try to remove the string !NATIVE2ASCII! from our list.
25961    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NATIVE2ASCII!/}
25962    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
25963      # If it failed, the variable was not from the command line. Ignore it,
25964      # but warn the user (except for BASH, which is always set by the calling BASH).
25965      if test "xNATIVE2ASCII" != xBASH; then
25966        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&5
25967$as_echo "$as_me: WARNING: Ignoring value of NATIVE2ASCII from the environment. Use command line variables instead." >&2;}
25968      fi
25969      # Try to locate tool using the code snippet
25970
25971      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for native2ascii in Boot JDK" >&5
25972$as_echo_n "checking for native2ascii in Boot JDK... " >&6; }
25973      NATIVE2ASCII=$BOOT_JDK/bin/native2ascii
25974      if test ! -x $NATIVE2ASCII; then
25975        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
25976$as_echo "not found" >&6; }
25977        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
25978$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
25979        as_fn_error $? "Could not find native2ascii in the Boot JDK" "$LINENO" 5
25980      fi
25981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
25982$as_echo "ok" >&6; }
25983
25984
25985    else
25986      # If it succeeded, then it was overridden by the user. We will use it
25987      # for the tool.
25988
25989      # First remove it from the list of overridden variables, so we can test
25990      # for unknown variables in the end.
25991      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
25992
25993      # Check if the provided tool contains a complete path.
25994      tool_specified="$NATIVE2ASCII"
25995      tool_basename="${tool_specified##*/}"
25996      if test "x$tool_basename" = "x$tool_specified"; then
25997        # A command without a complete path is provided, search $PATH.
25998        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&5
25999$as_echo "$as_me: Will search for user supplied tool NATIVE2ASCII=$tool_basename" >&6;}
26000        # Extract the first word of "$tool_basename", so it can be a program name with args.
26001set dummy $tool_basename; ac_word=$2
26002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26003$as_echo_n "checking for $ac_word... " >&6; }
26004if ${ac_cv_path_NATIVE2ASCII+:} false; then :
26005  $as_echo_n "(cached) " >&6
26006else
26007  case $NATIVE2ASCII in
26008  [\\/]* | ?:[\\/]*)
26009  ac_cv_path_NATIVE2ASCII="$NATIVE2ASCII" # Let the user override the test with a path.
26010  ;;
26011  *)
26012  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26013for as_dir in $PATH
26014do
26015  IFS=$as_save_IFS
26016  test -z "$as_dir" && as_dir=.
26017    for ac_exec_ext in '' $ac_executable_extensions; do
26018  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26019    ac_cv_path_NATIVE2ASCII="$as_dir/$ac_word$ac_exec_ext"
26020    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26021    break 2
26022  fi
26023done
26024  done
26025IFS=$as_save_IFS
26026
26027  ;;
26028esac
26029fi
26030NATIVE2ASCII=$ac_cv_path_NATIVE2ASCII
26031if test -n "$NATIVE2ASCII"; then
26032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE2ASCII" >&5
26033$as_echo "$NATIVE2ASCII" >&6; }
26034else
26035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26036$as_echo "no" >&6; }
26037fi
26038
26039
26040        if test "x$NATIVE2ASCII" = x; then
26041          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26042        fi
26043      else
26044        # Otherwise we believe it is a complete path. Use it as it is.
26045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&5
26046$as_echo "$as_me: Will use user supplied tool NATIVE2ASCII=$tool_specified" >&6;}
26047        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NATIVE2ASCII" >&5
26048$as_echo_n "checking for NATIVE2ASCII... " >&6; }
26049        if test ! -x "$tool_specified"; then
26050          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26051$as_echo "not found" >&6; }
26052          as_fn_error $? "User supplied tool NATIVE2ASCII=$tool_specified does not exist or is not executable" "$LINENO" 5
26053        fi
26054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26055$as_echo "$tool_specified" >&6; }
26056      fi
26057    fi
26058  fi
26059
26060
26061
26062  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
26063
26064  # Publish this variable in the help.
26065
26066
26067  if test "x$JARSIGNER" = x; then
26068    # The variable is not set by user, try to locate tool using the code snippet
26069
26070      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26071$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26072      JARSIGNER=$BOOT_JDK/bin/jarsigner
26073      if test ! -x $JARSIGNER; then
26074        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26075$as_echo "not found" >&6; }
26076        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26077$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26078        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26079      fi
26080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26081$as_echo "ok" >&6; }
26082
26083
26084  else
26085    # The variable is set, but is it from the command line or the environment?
26086
26087    # Try to remove the string !JARSIGNER! from our list.
26088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
26089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
26090      # If it failed, the variable was not from the command line. Ignore it,
26091      # but warn the user (except for BASH, which is always set by the calling BASH).
26092      if test "xJARSIGNER" != xBASH; then
26093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
26094$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
26095      fi
26096      # Try to locate tool using the code snippet
26097
26098      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
26099$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
26100      JARSIGNER=$BOOT_JDK/bin/jarsigner
26101      if test ! -x $JARSIGNER; then
26102        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26103$as_echo "not found" >&6; }
26104        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
26105$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
26106        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
26107      fi
26108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
26109$as_echo "ok" >&6; }
26110
26111
26112    else
26113      # If it succeeded, then it was overridden by the user. We will use it
26114      # for the tool.
26115
26116      # First remove it from the list of overridden variables, so we can test
26117      # for unknown variables in the end.
26118      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
26119
26120      # Check if the provided tool contains a complete path.
26121      tool_specified="$JARSIGNER"
26122      tool_basename="${tool_specified##*/}"
26123      if test "x$tool_basename" = "x$tool_specified"; then
26124        # A command without a complete path is provided, search $PATH.
26125        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
26126$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
26127        # Extract the first word of "$tool_basename", so it can be a program name with args.
26128set dummy $tool_basename; ac_word=$2
26129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26130$as_echo_n "checking for $ac_word... " >&6; }
26131if ${ac_cv_path_JARSIGNER+:} false; then :
26132  $as_echo_n "(cached) " >&6
26133else
26134  case $JARSIGNER in
26135  [\\/]* | ?:[\\/]*)
26136  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
26137  ;;
26138  *)
26139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26140for as_dir in $PATH
26141do
26142  IFS=$as_save_IFS
26143  test -z "$as_dir" && as_dir=.
26144    for ac_exec_ext in '' $ac_executable_extensions; do
26145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26146    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
26147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26148    break 2
26149  fi
26150done
26151  done
26152IFS=$as_save_IFS
26153
26154  ;;
26155esac
26156fi
26157JARSIGNER=$ac_cv_path_JARSIGNER
26158if test -n "$JARSIGNER"; then
26159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
26160$as_echo "$JARSIGNER" >&6; }
26161else
26162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26163$as_echo "no" >&6; }
26164fi
26165
26166
26167        if test "x$JARSIGNER" = x; then
26168          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
26169        fi
26170      else
26171        # Otherwise we believe it is a complete path. Use it as it is.
26172        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
26173$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
26174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
26175$as_echo_n "checking for JARSIGNER... " >&6; }
26176        if test ! -x "$tool_specified"; then
26177          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
26178$as_echo "not found" >&6; }
26179          as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
26180        fi
26181        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
26182$as_echo "$tool_specified" >&6; }
26183      fi
26184    fi
26185  fi
26186
26187
26188
26189  # Finally, set some other options...
26190
26191  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
26192  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
26193
26194
26195
26196
26197  ##############################################################################
26198  #
26199  # Specify jvm options for anything that is run with the Boot JDK.
26200  # Not all JVM:s accept the same arguments on the command line.
26201  #
26202
26203# Check whether --with-boot-jdk-jvmargs was given.
26204if test "${with_boot_jdk_jvmargs+set}" = set; then :
26205  withval=$with_boot_jdk_jvmargs;
26206fi
26207
26208
26209  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
26210$as_echo_n "checking flags for boot jdk java command ... " >&6; }
26211
26212  # Disable special log output when a debug build is used as Boot JDK...
26213
26214  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
26215  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
26216  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
26217  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26218  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26219  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26220    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
26221    JVM_ARG_OK=true
26222  else
26223    $ECHO "Arg failed:" >&5
26224    $ECHO "$OUTPUT" >&5
26225    JVM_ARG_OK=false
26226  fi
26227
26228
26229  # Apply user provided options.
26230
26231  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
26232  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
26233  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
26234  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26235  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26236  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26237    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
26238    JVM_ARG_OK=true
26239  else
26240    $ECHO "Arg failed:" >&5
26241    $ECHO "$OUTPUT" >&5
26242    JVM_ARG_OK=false
26243  fi
26244
26245
26246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
26247$as_echo "$boot_jdk_jvmargs" >&6; }
26248
26249  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
26250  JAVA_FLAGS=$boot_jdk_jvmargs
26251
26252
26253
26254  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
26255$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
26256
26257  # Starting amount of heap memory.
26258
26259  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
26260  $ECHO "Command: $JAVA -Xms64M -version" >&5
26261  OUTPUT=`$JAVA -Xms64M -version 2>&1`
26262  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26263  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26264  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26265    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
26266    JVM_ARG_OK=true
26267  else
26268    $ECHO "Arg failed:" >&5
26269    $ECHO "$OUTPUT" >&5
26270    JVM_ARG_OK=false
26271  fi
26272
26273
26274  # Maximum amount of heap memory.
26275  # Maximum stack size.
26276  if test "x$BUILD_NUM_BITS" = x32; then
26277    JVM_MAX_HEAP=1100M
26278    STACK_SIZE=768
26279  else
26280    # Running Javac on a JVM on a 64-bit machine, takes more space since 64-bit
26281    # pointers are used. Apparently, we need to increase the heap and stack
26282    # space for the jvm. More specifically, when running javac to build huge
26283    # jdk batch
26284    JVM_MAX_HEAP=1600M
26285    STACK_SIZE=1536
26286  fi
26287
26288  $ECHO "Check if jvm arg is ok: -Xmx$JVM_MAX_HEAP" >&5
26289  $ECHO "Command: $JAVA -Xmx$JVM_MAX_HEAP -version" >&5
26290  OUTPUT=`$JAVA -Xmx$JVM_MAX_HEAP -version 2>&1`
26291  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26292  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26293  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26294    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx$JVM_MAX_HEAP"
26295    JVM_ARG_OK=true
26296  else
26297    $ECHO "Arg failed:" >&5
26298    $ECHO "$OUTPUT" >&5
26299    JVM_ARG_OK=false
26300  fi
26301
26302
26303  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
26304  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
26305  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
26306  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26307  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26308  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26309    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
26310    JVM_ARG_OK=true
26311  else
26312    $ECHO "Arg failed:" >&5
26313    $ECHO "$OUTPUT" >&5
26314    JVM_ARG_OK=false
26315  fi
26316
26317
26318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
26319$as_echo "$boot_jdk_jvmargs_big" >&6; }
26320
26321  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
26322
26323
26324
26325  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
26326$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
26327
26328  # Use serial gc for small short lived tools if possible
26329
26330  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
26331  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
26332  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
26333  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26334  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26335  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26336    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
26337    JVM_ARG_OK=true
26338  else
26339    $ECHO "Arg failed:" >&5
26340    $ECHO "$OUTPUT" >&5
26341    JVM_ARG_OK=false
26342  fi
26343
26344
26345  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
26346  $ECHO "Command: $JAVA -Xms32M -version" >&5
26347  OUTPUT=`$JAVA -Xms32M -version 2>&1`
26348  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26349  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26350  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26351    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
26352    JVM_ARG_OK=true
26353  else
26354    $ECHO "Arg failed:" >&5
26355    $ECHO "$OUTPUT" >&5
26356    JVM_ARG_OK=false
26357  fi
26358
26359
26360  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
26361  $ECHO "Command: $JAVA -Xmx512M -version" >&5
26362  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
26363  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
26364  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
26365  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
26366    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
26367    JVM_ARG_OK=true
26368  else
26369    $ECHO "Arg failed:" >&5
26370    $ECHO "$OUTPUT" >&5
26371    JVM_ARG_OK=false
26372  fi
26373
26374
26375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
26376$as_echo "$boot_jdk_jvmargs_small" >&6; }
26377
26378  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
26379
26380
26381
26382###############################################################################
26383#
26384# Configure the sources to use. We can add or override individual directories.
26385#
26386###############################################################################
26387
26388
26389  # Where are the sources. Any of these can be overridden
26390  # using --with-override-corba and the likes.
26391  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
26392  CORBA_TOPDIR="$SRC_ROOT/corba"
26393  JAXP_TOPDIR="$SRC_ROOT/jaxp"
26394  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
26395  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
26396  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
26397  JDK_TOPDIR="$SRC_ROOT/jdk"
26398
26399
26400
26401
26402
26403
26404
26405
26406
26407
26408  ###############################################################################
26409  #
26410  # Pickup additional source for a component from outside of the source root
26411  # or override source for a component.
26412  #
26413
26414# Check whether --with-add-source-root was given.
26415if test "${with_add_source_root+set}" = set; then :
26416  withval=$with_add_source_root;
26417fi
26418
26419
26420
26421# Check whether --with-override-source-root was given.
26422if test "${with_override_source_root+set}" = set; then :
26423  withval=$with_override_source_root;
26424fi
26425
26426
26427
26428# Check whether --with-adds-and-overrides was given.
26429if test "${with_adds_and_overrides+set}" = set; then :
26430  withval=$with_adds_and_overrides;
26431fi
26432
26433
26434  if test "x$with_adds_and_overrides" != x; then
26435    with_add_source_root="$with_adds_and_overrides/adds"
26436    with_override_source_root="$with_adds_and_overrides/overrides"
26437  fi
26438
26439  if test "x$with_add_source_root" != x; then
26440    if ! test -d $with_add_source_root; then
26441      as_fn_error $? "Trying to use a non-existant add-source-root $with_add_source_root" "$LINENO" 5
26442    fi
26443    CURDIR="$PWD"
26444    cd "$with_add_source_root"
26445    ADD_SRC_ROOT="`pwd`"
26446    cd "$CURDIR"
26447    # Verify that the addon source root does not have any root makefiles.
26448    # If it does, then it is usually an error, prevent this.
26449    if test -f $with_add_source_root/langtools/make/Makefile; then
26450      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
26451    fi
26452    if test -f $with_add_source_root/corba/make/Makefile; then
26453      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
26454    fi
26455    if test -f $with_add_source_root/jaxp/make/Makefile; then
26456      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
26457    fi
26458    if test -f $with_add_source_root/jaxws/make/Makefile; then
26459      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
26460    fi
26461    if test -f $with_add_source_root/hotspot/make/Makefile; then
26462      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
26463    fi
26464    if test -f $with_add_source_root/nashorn/make/Makefile; then
26465      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
26466    fi
26467    if test -f $with_add_source_root/jdk/make/Makefile; then
26468      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
26469    fi
26470  fi
26471
26472
26473  if test "x$with_override_source_root" != x; then
26474    if ! test -d $with_override_source_root; then
26475      as_fn_error $? "Trying to use a non-existant override-source-root $with_override_source_root" "$LINENO" 5
26476    fi
26477    CURDIR="$PWD"
26478    cd "$with_override_source_root"
26479    OVERRIDE_SRC_ROOT="`pwd`"
26480    cd "$CURDIR"
26481    if test -f $with_override_source_root/langtools/make/Makefile; then
26482      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
26483    fi
26484    if test -f $with_override_source_root/corba/make/Makefile; then
26485      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
26486    fi
26487    if test -f $with_override_source_root/jaxp/make/Makefile; then
26488      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
26489    fi
26490    if test -f $with_override_source_root/jaxws/make/Makefile; then
26491      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
26492    fi
26493    if test -f $with_override_source_root/hotspot/make/Makefile; then
26494      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
26495    fi
26496    if test -f $with_override_source_root/nashorn/make/Makefile; then
26497      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
26498    fi
26499    if test -f $with_override_source_root/jdk/make/Makefile; then
26500      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
26501    fi
26502  fi
26503
26504
26505  ###############################################################################
26506  #
26507  # Override a repo completely, this is used for example when you have 3 small
26508  # development sandboxes of the langtools sources and want to avoid having 3 full
26509  # OpenJDK sources checked out on disk.
26510  #
26511  # Assuming that the 3 langtools sandboxes are located here:
26512  # /home/fredrik/sandbox1/langtools
26513  # /home/fredrik/sandbox2/langtools
26514  # /home/fredrik/sandbox3/langtools
26515  #
26516  # From the source root you create build subdirs manually:
26517  #     mkdir -p build1 build2 build3
26518  # in each build directory run:
26519  #     (cd build1 && ../configure --with-override-langtools=/home/fredrik/sandbox1 && make)
26520  #     (cd build2 && ../configure --with-override-langtools=/home/fredrik/sandbox2 && make)
26521  #     (cd build3 && ../configure --with-override-langtools=/home/fredrik/sandbox3 && make)
26522  #
26523
26524
26525# Check whether --with-override-langtools was given.
26526if test "${with_override_langtools+set}" = set; then :
26527  withval=$with_override_langtools;
26528fi
26529
26530
26531
26532# Check whether --with-override-corba was given.
26533if test "${with_override_corba+set}" = set; then :
26534  withval=$with_override_corba;
26535fi
26536
26537
26538
26539# Check whether --with-override-jaxp was given.
26540if test "${with_override_jaxp+set}" = set; then :
26541  withval=$with_override_jaxp;
26542fi
26543
26544
26545
26546# Check whether --with-override-jaxws was given.
26547if test "${with_override_jaxws+set}" = set; then :
26548  withval=$with_override_jaxws;
26549fi
26550
26551
26552
26553# Check whether --with-override-hotspot was given.
26554if test "${with_override_hotspot+set}" = set; then :
26555  withval=$with_override_hotspot;
26556fi
26557
26558
26559
26560# Check whether --with-override-nashorn was given.
26561if test "${with_override_nashorn+set}" = set; then :
26562  withval=$with_override_nashorn;
26563fi
26564
26565
26566
26567# Check whether --with-override-jdk was given.
26568if test "${with_override_jdk+set}" = set; then :
26569  withval=$with_override_jdk;
26570fi
26571
26572
26573  if test "x$with_override_langtools" != x; then
26574    CURDIR="$PWD"
26575    cd "$with_override_langtools"
26576    LANGTOOLS_TOPDIR="`pwd`"
26577    cd "$CURDIR"
26578    if ! test -f $LANGTOOLS_TOPDIR/make/Makefile; then
26579      as_fn_error $? "You have to override langtools with a full langtools repo!" "$LINENO" 5
26580    fi
26581    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if langtools should be overridden" >&5
26582$as_echo_n "checking if langtools should be overridden... " >&6; }
26583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $LANGTOOLS_TOPDIR" >&5
26584$as_echo "yes with $LANGTOOLS_TOPDIR" >&6; }
26585  fi
26586  if test "x$with_override_corba" != x; then
26587    CURDIR="$PWD"
26588    cd "$with_override_corba"
26589    CORBA_TOPDIR="`pwd`"
26590    cd "$CURDIR"
26591    if ! test -f $CORBA_TOPDIR/make/Makefile; then
26592      as_fn_error $? "You have to override corba with a full corba repo!" "$LINENO" 5
26593    fi
26594    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if corba should be overridden" >&5
26595$as_echo_n "checking if corba should be overridden... " >&6; }
26596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $CORBA_TOPDIR" >&5
26597$as_echo "yes with $CORBA_TOPDIR" >&6; }
26598  fi
26599  if test "x$with_override_jaxp" != x; then
26600    CURDIR="$PWD"
26601    cd "$with_override_jaxp"
26602    JAXP_TOPDIR="`pwd`"
26603    cd "$CURDIR"
26604    if ! test -f $JAXP_TOPDIR/make/Makefile; then
26605      as_fn_error $? "You have to override jaxp with a full jaxp repo!" "$LINENO" 5
26606    fi
26607    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxp should be overridden" >&5
26608$as_echo_n "checking if jaxp should be overridden... " >&6; }
26609    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXP_TOPDIR" >&5
26610$as_echo "yes with $JAXP_TOPDIR" >&6; }
26611  fi
26612  if test "x$with_override_jaxws" != x; then
26613    CURDIR="$PWD"
26614    cd "$with_override_jaxws"
26615    JAXWS_TOPDIR="`pwd`"
26616    cd "$CURDIR"
26617    if ! test -f $JAXWS_TOPDIR/make/Makefile; then
26618      as_fn_error $? "You have to override jaxws with a full jaxws repo!" "$LINENO" 5
26619    fi
26620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jaxws should be overridden" >&5
26621$as_echo_n "checking if jaxws should be overridden... " >&6; }
26622    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JAXWS_TOPDIR" >&5
26623$as_echo "yes with $JAXWS_TOPDIR" >&6; }
26624  fi
26625  if test "x$with_override_hotspot" != x; then
26626    CURDIR="$PWD"
26627    cd "$with_override_hotspot"
26628    HOTSPOT_TOPDIR="`pwd`"
26629    cd "$CURDIR"
26630    if ! test -f $HOTSPOT_TOPDIR/make/Makefile; then
26631      as_fn_error $? "You have to override hotspot with a full hotspot repo!" "$LINENO" 5
26632    fi
26633    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be overridden" >&5
26634$as_echo_n "checking if hotspot should be overridden... " >&6; }
26635    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $HOTSPOT_TOPDIR" >&5
26636$as_echo "yes with $HOTSPOT_TOPDIR" >&6; }
26637  fi
26638  if test "x$with_override_nashorn" != x; then
26639    CURDIR="$PWD"
26640    cd "$with_override_nashorn"
26641    NASHORN_TOPDIR="`pwd`"
26642    cd "$CURDIR"
26643    if ! test -f $NASHORN_TOPDIR/make/Makefile; then
26644      as_fn_error $? "You have to override nashorn with a full nashorn repo!" "$LINENO" 5
26645    fi
26646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if nashorn should be overridden" >&5
26647$as_echo_n "checking if nashorn should be overridden... " >&6; }
26648    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $NASHORN_TOPDIR" >&5
26649$as_echo "yes with $NASHORN_TOPDIR" >&6; }
26650  fi
26651  if test "x$with_override_jdk" != x; then
26652    CURDIR="$PWD"
26653    cd "$with_override_jdk"
26654    JDK_TOPDIR="`pwd`"
26655    cd "$CURDIR"
26656    if ! test -f $JDK_TOPDIR/make/Makefile; then
26657      as_fn_error $? "You have to override JDK with a full JDK repo!" "$LINENO" 5
26658    fi
26659    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if JDK should be overridden" >&5
26660$as_echo_n "checking if JDK should be overridden... " >&6; }
26661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes with $JDK_TOPDIR" >&5
26662$as_echo "yes with $JDK_TOPDIR" >&6; }
26663  fi
26664
26665
26666  BUILD_OUTPUT="$OUTPUT_ROOT"
26667
26668
26669  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
26670  BUILD_HOTSPOT=true
26671
26672
26673
26674# Check whether --with-import-hotspot was given.
26675if test "${with_import_hotspot+set}" = set; then :
26676  withval=$with_import_hotspot;
26677fi
26678
26679  if test "x$with_import_hotspot" != x; then
26680    CURDIR="$PWD"
26681    cd "$with_import_hotspot"
26682    HOTSPOT_DIST="`pwd`"
26683    cd "$CURDIR"
26684    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
26685      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
26686    fi
26687    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
26688$as_echo_n "checking if hotspot should be imported... " >&6; }
26689    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
26690$as_echo "yes from $HOTSPOT_DIST" >&6; }
26691    BUILD_HOTSPOT=false
26692  fi
26693
26694  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
26695
26696
26697###############################################################################
26698#
26699# Setup the toolchain (compilers etc), i.e. tools used to compile and process
26700# native code.
26701#
26702###############################################################################
26703
26704# First determine the toolchain type (compiler family)
26705
26706
26707# Check whether --with-toolchain-type was given.
26708if test "${with_toolchain_type+set}" = set; then :
26709  withval=$with_toolchain_type;
26710fi
26711
26712
26713  # Use indirect variable referencing
26714  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
26715  VALID_TOOLCHAINS=${!toolchain_var_name}
26716
26717  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26718    if test -n "$XCODEBUILD"; then
26719      # On Mac OS X, default toolchain to clang after Xcode 5
26720      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
26721      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
26722      if test $? -ne 0; then
26723        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
26724      fi
26725      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
26726          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
26727          $CUT -f 1 -d .`
26728      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
26729$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
26730      if test $XCODE_MAJOR_VERSION -ge 5; then
26731          DEFAULT_TOOLCHAIN="clang"
26732      else
26733          DEFAULT_TOOLCHAIN="gcc"
26734      fi
26735    else
26736      # If Xcode is not installed, but the command line tools are
26737      # then we can't run xcodebuild. On these systems we should
26738      # default to clang
26739      DEFAULT_TOOLCHAIN="clang"
26740    fi
26741  else
26742    # First toolchain type in the list is the default
26743    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
26744  fi
26745
26746  if test "x$with_toolchain_type" = xlist; then
26747    # List all toolchains
26748    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
26749$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
26750    for toolchain in $VALID_TOOLCHAINS; do
26751      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
26752      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26753      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
26754    done
26755
26756    exit 0
26757  elif test "x$with_toolchain_type" != x; then
26758    # User override; check that it is valid
26759    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
26760      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
26761$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
26762      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
26763$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
26764      as_fn_error $? "Cannot continue." "$LINENO" 5
26765    fi
26766    TOOLCHAIN_TYPE=$with_toolchain_type
26767  else
26768    # No flag given, use default
26769    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
26770  fi
26771
26772
26773  TOOLCHAIN_CC_BINARY_clang="clang"
26774  TOOLCHAIN_CC_BINARY_gcc="gcc"
26775  TOOLCHAIN_CC_BINARY_microsoft="cl"
26776  TOOLCHAIN_CC_BINARY_solstudio="cc"
26777  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
26778
26779  TOOLCHAIN_CXX_BINARY_clang="clang++"
26780  TOOLCHAIN_CXX_BINARY_gcc="g++"
26781  TOOLCHAIN_CXX_BINARY_microsoft="cl"
26782  TOOLCHAIN_CXX_BINARY_solstudio="CC"
26783  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
26784
26785  # Use indirect variable referencing
26786  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
26787  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
26788  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
26789  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
26790  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
26791  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
26792
26793
26794  # Define filename patterns
26795  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26796    LIBRARY_PREFIX=
26797    SHARED_LIBRARY_SUFFIX='.dll'
26798    STATIC_LIBRARY_SUFFIX='.lib'
26799    SHARED_LIBRARY='$1.dll'
26800    STATIC_LIBRARY='$1.lib'
26801    OBJ_SUFFIX='.obj'
26802    EXE_SUFFIX='.exe'
26803  else
26804    LIBRARY_PREFIX=lib
26805    SHARED_LIBRARY_SUFFIX='.so'
26806    STATIC_LIBRARY_SUFFIX='.a'
26807    SHARED_LIBRARY='lib$1.so'
26808    STATIC_LIBRARY='lib$1.a'
26809    OBJ_SUFFIX='.o'
26810    EXE_SUFFIX=''
26811    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
26812      SHARED_LIBRARY='lib$1.dylib'
26813      SHARED_LIBRARY_SUFFIX='.dylib'
26814    fi
26815  fi
26816
26817
26818
26819
26820
26821
26822
26823
26824
26825
26826  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
26827    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
26828$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
26829  else
26830    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
26831$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
26832  fi
26833
26834
26835# Then detect the actual binaries needed
26836
26837  # FIXME: Is this needed?
26838  ac_ext=cpp
26839ac_cpp='$CXXCPP $CPPFLAGS'
26840ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
26841ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
26842ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
26843
26844
26845  # Store the CFLAGS etc passed to the configure script.
26846  ORG_CFLAGS="$CFLAGS"
26847  ORG_CXXFLAGS="$CXXFLAGS"
26848  ORG_OBJCFLAGS="$OBJCFLAGS"
26849
26850  # On Windows, we need to detect the visual studio installation first.
26851  # This will change the PATH, but we need to keep that new PATH even
26852  # after toolchain detection is done, since the compiler (on x86) uses
26853  # it for DLL resolution in runtime.
26854  if test "x$OPENJDK_BUILD_OS" = "xwindows" && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
26855
26856  # Store path to cygwin link.exe to help excluding it when searching for
26857  # VS linker. This must be done before changing the PATH when looking for VS.
26858  # Extract the first word of "link", so it can be a program name with args.
26859set dummy link; ac_word=$2
26860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26861$as_echo_n "checking for $ac_word... " >&6; }
26862if ${ac_cv_path_CYGWIN_LINK+:} false; then :
26863  $as_echo_n "(cached) " >&6
26864else
26865  case $CYGWIN_LINK in
26866  [\\/]* | ?:[\\/]*)
26867  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
26868  ;;
26869  *)
26870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26871for as_dir in $PATH
26872do
26873  IFS=$as_save_IFS
26874  test -z "$as_dir" && as_dir=.
26875    for ac_exec_ext in '' $ac_executable_extensions; do
26876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26877    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
26878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26879    break 2
26880  fi
26881done
26882  done
26883IFS=$as_save_IFS
26884
26885  ;;
26886esac
26887fi
26888CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
26889if test -n "$CYGWIN_LINK"; then
26890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
26891$as_echo "$CYGWIN_LINK" >&6; }
26892else
26893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26894$as_echo "no" >&6; }
26895fi
26896
26897
26898  if test "x$CYGWIN_LINK" != x; then
26899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
26900$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
26901    "$CYGWIN_LINK" --version > /dev/null
26902    if test $? -eq 0 ; then
26903      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26904$as_echo "yes" >&6; }
26905    else
26906      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26907$as_echo "no" >&6; }
26908      # This might be the VS linker. Don't exclude it later on.
26909      CYGWIN_LINK=""
26910    fi
26911  fi
26912
26913  # First-hand choice is to locate and run the vsvars bat file.
26914
26915  if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
26916    VCVARSFILE="vc/bin/vcvars32.bat"
26917  else
26918    VCVARSFILE="vc/bin/amd64/vcvars64.bat"
26919  fi
26920
26921  VS_ENV_CMD=""
26922  VS_ENV_ARGS=""
26923  if test "x$with_toolsdir" != x; then
26924
26925  if test "x$VS_ENV_CMD" = x; then
26926    VS100BASE="$with_toolsdir/../.."
26927    METHOD="--with-tools-dir"
26928
26929  windows_path="$VS100BASE"
26930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26931    unix_path=`$CYGPATH -u "$windows_path"`
26932    VS100BASE="$unix_path"
26933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26935    VS100BASE="$unix_path"
26936  fi
26937
26938    if test -d "$VS100BASE"; then
26939      if test -f "$VS100BASE/$VCVARSFILE"; then
26940        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26941$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26942        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26943      else
26944        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26945$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26946        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26947$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26948      fi
26949    fi
26950  fi
26951
26952  fi
26953
26954  if test "x$with_toolsdir" != x && test "x$VS_ENV_CMD" = x; then
26955    # Having specified an argument which is incorrect will produce an instant failure;
26956    # we should not go on looking
26957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&5
26958$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid Visual Studio installation" >&6;}
26959    { $as_echo "$as_me:${as_lineno-$LINENO}: Please point to the VC/bin directory within the Visual Studio installation" >&5
26960$as_echo "$as_me: Please point to the VC/bin directory within the Visual Studio installation" >&6;}
26961    as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
26962  fi
26963
26964  if test "x$VS100COMNTOOLS" != x; then
26965
26966  if test "x$VS_ENV_CMD" = x; then
26967    VS100BASE="$VS100COMNTOOLS/../.."
26968    METHOD="VS100COMNTOOLS variable"
26969
26970  windows_path="$VS100BASE"
26971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26972    unix_path=`$CYGPATH -u "$windows_path"`
26973    VS100BASE="$unix_path"
26974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26976    VS100BASE="$unix_path"
26977  fi
26978
26979    if test -d "$VS100BASE"; then
26980      if test -f "$VS100BASE/$VCVARSFILE"; then
26981        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26982$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26983        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
26984      else
26985        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
26986$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
26987        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
26988$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
26989      fi
26990    fi
26991  fi
26992
26993  fi
26994  if test "x$PROGRAMFILES" != x; then
26995
26996  if test "x$VS_ENV_CMD" = x; then
26997    VS100BASE="$PROGRAMFILES/Microsoft Visual Studio 10.0"
26998    METHOD="well-known name"
26999
27000  windows_path="$VS100BASE"
27001  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27002    unix_path=`$CYGPATH -u "$windows_path"`
27003    VS100BASE="$unix_path"
27004  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27005    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27006    VS100BASE="$unix_path"
27007  fi
27008
27009    if test -d "$VS100BASE"; then
27010      if test -f "$VS100BASE/$VCVARSFILE"; then
27011        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27012$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27013        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27014      else
27015        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27016$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27017        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27018$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27019      fi
27020    fi
27021  fi
27022
27023  fi
27024
27025  if test "x$VS_ENV_CMD" = x; then
27026    VS100BASE="C:/Program Files/Microsoft Visual Studio 10.0"
27027    METHOD="well-known name"
27028
27029  windows_path="$VS100BASE"
27030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27031    unix_path=`$CYGPATH -u "$windows_path"`
27032    VS100BASE="$unix_path"
27033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27035    VS100BASE="$unix_path"
27036  fi
27037
27038    if test -d "$VS100BASE"; then
27039      if test -f "$VS100BASE/$VCVARSFILE"; then
27040        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27041$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27042        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27043      else
27044        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27045$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27046        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27047$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27048      fi
27049    fi
27050  fi
27051
27052
27053  if test "x$VS_ENV_CMD" = x; then
27054    VS100BASE="C:/Program Files (x86)/Microsoft Visual Studio 10.0"
27055    METHOD="well-known name"
27056
27057  windows_path="$VS100BASE"
27058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27059    unix_path=`$CYGPATH -u "$windows_path"`
27060    VS100BASE="$unix_path"
27061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27063    VS100BASE="$unix_path"
27064  fi
27065
27066    if test -d "$VS100BASE"; then
27067      if test -f "$VS100BASE/$VCVARSFILE"; then
27068        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27069$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27070        VS_ENV_CMD="$VS100BASE/$VCVARSFILE"
27071      else
27072        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS100BASE using $METHOD" >&5
27073$as_echo "$as_me: Found Visual Studio installation at $VS100BASE using $METHOD" >&6;}
27074        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
27075$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
27076      fi
27077    fi
27078  fi
27079
27080
27081  if test "x$ProgramW6432" != x; then
27082
27083  if test "x$VS_ENV_CMD" = x; then
27084    WIN_SDK_BASE="$ProgramW6432/Microsoft SDKs/Windows/v7.1/Bin"
27085    METHOD="well-known name"
27086
27087  windows_path="$WIN_SDK_BASE"
27088  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27089    unix_path=`$CYGPATH -u "$windows_path"`
27090    WIN_SDK_BASE="$unix_path"
27091  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27092    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27093    WIN_SDK_BASE="$unix_path"
27094  fi
27095
27096    if test -d "$WIN_SDK_BASE"; then
27097      # There have been cases of partial or broken SDK installations. A missing
27098      # lib dir is not going to work.
27099      if test ! -d "$WIN_SDK_BASE/../lib"; then
27100        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27101$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27102        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27103$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27104      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27106$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27107        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27108        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27109          VS_ENV_ARGS="/x86"
27110        else
27111          VS_ENV_ARGS="/x64"
27112        fi
27113      else
27114        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27115$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27116        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27117$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27118      fi
27119    fi
27120  fi
27121
27122  fi
27123  if test "x$PROGRAMW6432" != x; then
27124
27125  if test "x$VS_ENV_CMD" = x; then
27126    WIN_SDK_BASE="$PROGRAMW6432/Microsoft SDKs/Windows/v7.1/Bin"
27127    METHOD="well-known name"
27128
27129  windows_path="$WIN_SDK_BASE"
27130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27131    unix_path=`$CYGPATH -u "$windows_path"`
27132    WIN_SDK_BASE="$unix_path"
27133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27135    WIN_SDK_BASE="$unix_path"
27136  fi
27137
27138    if test -d "$WIN_SDK_BASE"; then
27139      # There have been cases of partial or broken SDK installations. A missing
27140      # lib dir is not going to work.
27141      if test ! -d "$WIN_SDK_BASE/../lib"; then
27142        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27143$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27144        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27145$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27146      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27147        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27148$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27149        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27150        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27151          VS_ENV_ARGS="/x86"
27152        else
27153          VS_ENV_ARGS="/x64"
27154        fi
27155      else
27156        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27157$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27158        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27159$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27160      fi
27161    fi
27162  fi
27163
27164  fi
27165  if test "x$PROGRAMFILES" != x; then
27166
27167  if test "x$VS_ENV_CMD" = x; then
27168    WIN_SDK_BASE="$PROGRAMFILES/Microsoft SDKs/Windows/v7.1/Bin"
27169    METHOD="well-known name"
27170
27171  windows_path="$WIN_SDK_BASE"
27172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27173    unix_path=`$CYGPATH -u "$windows_path"`
27174    WIN_SDK_BASE="$unix_path"
27175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27177    WIN_SDK_BASE="$unix_path"
27178  fi
27179
27180    if test -d "$WIN_SDK_BASE"; then
27181      # There have been cases of partial or broken SDK installations. A missing
27182      # lib dir is not going to work.
27183      if test ! -d "$WIN_SDK_BASE/../lib"; then
27184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27185$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27186        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27187$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27188      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27189        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27190$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27191        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27192        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27193          VS_ENV_ARGS="/x86"
27194        else
27195          VS_ENV_ARGS="/x64"
27196        fi
27197      else
27198        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27199$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27200        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27201$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27202      fi
27203    fi
27204  fi
27205
27206  fi
27207
27208  if test "x$VS_ENV_CMD" = x; then
27209    WIN_SDK_BASE="C:/Program Files/Microsoft SDKs/Windows/v7.1/Bin"
27210    METHOD="well-known name"
27211
27212  windows_path="$WIN_SDK_BASE"
27213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27214    unix_path=`$CYGPATH -u "$windows_path"`
27215    WIN_SDK_BASE="$unix_path"
27216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27218    WIN_SDK_BASE="$unix_path"
27219  fi
27220
27221    if test -d "$WIN_SDK_BASE"; then
27222      # There have been cases of partial or broken SDK installations. A missing
27223      # lib dir is not going to work.
27224      if test ! -d "$WIN_SDK_BASE/../lib"; then
27225        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27226$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27227        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27228$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27229      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27232        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27233        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27234          VS_ENV_ARGS="/x86"
27235        else
27236          VS_ENV_ARGS="/x64"
27237        fi
27238      else
27239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27240$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27241        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27242$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27243      fi
27244    fi
27245  fi
27246
27247
27248  if test "x$VS_ENV_CMD" = x; then
27249    WIN_SDK_BASE="C:/Program Files (x86)/Microsoft SDKs/Windows/v7.1/Bin"
27250    METHOD="well-known name"
27251
27252  windows_path="$WIN_SDK_BASE"
27253  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27254    unix_path=`$CYGPATH -u "$windows_path"`
27255    WIN_SDK_BASE="$unix_path"
27256  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27257    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27258    WIN_SDK_BASE="$unix_path"
27259  fi
27260
27261    if test -d "$WIN_SDK_BASE"; then
27262      # There have been cases of partial or broken SDK installations. A missing
27263      # lib dir is not going to work.
27264      if test ! -d "$WIN_SDK_BASE/../lib"; then
27265        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27266$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27267        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
27268$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
27269      elif test -f "$WIN_SDK_BASE/SetEnv.Cmd"; then
27270        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27271$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27272        VS_ENV_CMD="$WIN_SDK_BASE/SetEnv.Cmd"
27273        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
27274          VS_ENV_ARGS="/x86"
27275        else
27276          VS_ENV_ARGS="/x64"
27277        fi
27278      else
27279        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
27280$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
27281        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
27282$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
27283      fi
27284    fi
27285  fi
27286
27287
27288  if test "x$VS_ENV_CMD" != x; then
27289    # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
27290
27291  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27292
27293  # First separate the path from the arguments. This will split at the first
27294  # space.
27295  complete="$VS_ENV_CMD"
27296  path="${complete%% *}"
27297  tmp="$complete EOL"
27298  arguments="${tmp#* }"
27299
27300  # Input might be given as Windows format, start by converting to
27301  # unix format.
27302  new_path=`$CYGPATH -u "$path"`
27303
27304  # Now try to locate executable using which
27305  new_path=`$WHICH "$new_path" 2> /dev/null`
27306  # bat and cmd files are not always considered executable in cygwin causing which
27307  # to not find them
27308  if test "x$new_path" = x \
27309      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27310      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27311    new_path=`$CYGPATH -u "$path"`
27312  fi
27313  if test "x$new_path" = x; then
27314    # Oops. Which didn't find the executable.
27315    # The splitting of arguments from the executable at a space might have been incorrect,
27316    # since paths with space are more likely in Windows. Give it another try with the whole
27317    # argument.
27318    path="$complete"
27319    arguments="EOL"
27320    new_path=`$CYGPATH -u "$path"`
27321    new_path=`$WHICH "$new_path" 2> /dev/null`
27322    # bat and cmd files are not always considered executable in cygwin causing which
27323    # to not find them
27324    if test "x$new_path" = x \
27325        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27326        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27327      new_path=`$CYGPATH -u "$path"`
27328    fi
27329    if test "x$new_path" = x; then
27330      # It's still not found. Now this is an unrecoverable error.
27331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27332$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27333      has_space=`$ECHO "$complete" | $GREP " "`
27334      if test "x$has_space" != x; then
27335        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27336$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27337      fi
27338      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27339    fi
27340  fi
27341
27342  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27343  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27344  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27345  # "foo.exe" is OK but "foo" is an error.
27346  #
27347  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27348  # It is also a way to make sure we got the proper file name for the real test later on.
27349  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27350  if test "x$test_shortpath" = x; then
27351    # Short path failed, file does not exist as specified.
27352    # Try adding .exe or .cmd
27353    if test -f "${new_path}.exe"; then
27354      input_to_shortpath="${new_path}.exe"
27355    elif test -f "${new_path}.cmd"; then
27356      input_to_shortpath="${new_path}.cmd"
27357    else
27358      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
27359$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
27360      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
27361$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
27362      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27363    fi
27364  else
27365    input_to_shortpath="$new_path"
27366  fi
27367
27368  # Call helper function which possibly converts this using DOS-style short mode.
27369  # If so, the updated path is stored in $new_path.
27370  new_path="$input_to_shortpath"
27371
27372  input_path="$input_to_shortpath"
27373  # Check if we need to convert this using DOS-style short mode. If the path
27374  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27375  # take no chances and rewrite it.
27376  # Note: m4 eats our [], so we need to use [ and ] instead.
27377  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27378  if test "x$has_forbidden_chars" != x; then
27379    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27380    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27381    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27382    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27383      # Going to short mode and back again did indeed matter. Since short mode is
27384      # case insensitive, let's make it lowercase to improve readability.
27385      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27386      # Now convert it back to Unix-stile (cygpath)
27387      input_path=`$CYGPATH -u "$shortmode_path"`
27388      new_path="$input_path"
27389    fi
27390  fi
27391
27392  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27393  if test "x$test_cygdrive_prefix" = x; then
27394    # As a simple fix, exclude /usr/bin since it's not a real path.
27395    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
27396      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27397      # a path prefixed by /cygdrive for fixpath to work.
27398      new_path="$CYGWIN_ROOT_PATH$input_path"
27399    fi
27400  fi
27401
27402  # remove trailing .exe if any
27403  new_path="${new_path/%.exe/}"
27404
27405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27406
27407  # First separate the path from the arguments. This will split at the first
27408  # space.
27409  complete="$VS_ENV_CMD"
27410  path="${complete%% *}"
27411  tmp="$complete EOL"
27412  arguments="${tmp#* }"
27413
27414  # Input might be given as Windows format, start by converting to
27415  # unix format.
27416  new_path="$path"
27417
27418  windows_path="$new_path"
27419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27420    unix_path=`$CYGPATH -u "$windows_path"`
27421    new_path="$unix_path"
27422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27424    new_path="$unix_path"
27425  fi
27426
27427
27428  # Now try to locate executable using which
27429  new_path=`$WHICH "$new_path" 2> /dev/null`
27430
27431  if test "x$new_path" = x; then
27432    # Oops. Which didn't find the executable.
27433    # The splitting of arguments from the executable at a space might have been incorrect,
27434    # since paths with space are more likely in Windows. Give it another try with the whole
27435    # argument.
27436    path="$complete"
27437    arguments="EOL"
27438    new_path="$path"
27439
27440  windows_path="$new_path"
27441  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27442    unix_path=`$CYGPATH -u "$windows_path"`
27443    new_path="$unix_path"
27444  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27445    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27446    new_path="$unix_path"
27447  fi
27448
27449
27450    new_path=`$WHICH "$new_path" 2> /dev/null`
27451
27452    if test "x$new_path" = x; then
27453      # It's still not found. Now this is an unrecoverable error.
27454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27455$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27456      has_space=`$ECHO "$complete" | $GREP " "`
27457      if test "x$has_space" != x; then
27458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27460      fi
27461      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27462    fi
27463  fi
27464
27465  # Now new_path has a complete unix path to the binary
27466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
27467    # Keep paths in /bin as-is, but remove trailing .exe if any
27468    new_path="${new_path/%.exe/}"
27469    # Do not save /bin paths to all_fixpath_prefixes!
27470  else
27471    # Not in mixed or Windows style, start by that.
27472    new_path=`cmd //c echo $new_path`
27473
27474  input_path="$new_path"
27475  # Check if we need to convert this using DOS-style short mode. If the path
27476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27477  # take no chances and rewrite it.
27478  # Note: m4 eats our [], so we need to use [ and ] instead.
27479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27480  if test "x$has_forbidden_chars" != x; then
27481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27483  fi
27484
27485    # Output is in $new_path
27486
27487  windows_path="$new_path"
27488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27489    unix_path=`$CYGPATH -u "$windows_path"`
27490    new_path="$unix_path"
27491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27493    new_path="$unix_path"
27494  fi
27495
27496    # remove trailing .exe if any
27497    new_path="${new_path/%.exe/}"
27498
27499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
27500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27501  fi
27502
27503  else
27504    # We're on a posix platform. Hooray! :)
27505    # First separate the path from the arguments. This will split at the first
27506    # space.
27507    complete="$VS_ENV_CMD"
27508    path="${complete%% *}"
27509    tmp="$complete EOL"
27510    arguments="${tmp#* }"
27511
27512    # Cannot rely on the command "which" here since it doesn't always work.
27513    is_absolute_path=`$ECHO "$path" | $GREP ^/`
27514    if test -z "$is_absolute_path"; then
27515      # Path to executable is not absolute. Find it.
27516      IFS_save="$IFS"
27517      IFS=:
27518      for p in $PATH; do
27519        if test -f "$p/$path" && test -x "$p/$path"; then
27520          new_path="$p/$path"
27521          break
27522        fi
27523      done
27524      IFS="$IFS_save"
27525    else
27526      # This is an absolute path, we can use it without further modifications.
27527      new_path="$path"
27528    fi
27529
27530    if test "x$new_path" = x; then
27531      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
27532$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
27533      has_space=`$ECHO "$complete" | $GREP " "`
27534      if test "x$has_space" != x; then
27535        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
27536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
27537      fi
27538      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
27539    fi
27540  fi
27541
27542  # Now join together the path and the arguments once again
27543  if test "x$arguments" != xEOL; then
27544    new_complete="$new_path ${arguments% *}"
27545  else
27546    new_complete="$new_path"
27547  fi
27548
27549  if test "x$complete" != "x$new_complete"; then
27550    VS_ENV_CMD="$new_complete"
27551    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
27552$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
27553  fi
27554
27555
27556    # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
27557    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
27558$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
27559
27560    # We need to create a couple of temporary files.
27561    VS_ENV_TMP_DIR="$OUTPUT_ROOT/vs-env"
27562    $MKDIR -p $VS_ENV_TMP_DIR
27563
27564    # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
27565    # Instead create a shell script which will set the relevant variables when run.
27566    WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
27567
27568  unix_path="$WINPATH_VS_ENV_CMD"
27569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27570    windows_path=`$CYGPATH -m "$unix_path"`
27571    WINPATH_VS_ENV_CMD="$windows_path"
27572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27573    windows_path=`cmd //c echo $unix_path`
27574    WINPATH_VS_ENV_CMD="$windows_path"
27575  fi
27576
27577    WINPATH_BASH="$BASH"
27578
27579  unix_path="$WINPATH_BASH"
27580  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27581    windows_path=`$CYGPATH -m "$unix_path"`
27582    WINPATH_BASH="$windows_path"
27583  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27584    windows_path=`cmd //c echo $unix_path`
27585    WINPATH_BASH="$windows_path"
27586  fi
27587
27588
27589    # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
27590    # script (executable by bash) that will setup the important variables.
27591    EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
27592    $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
27593    # This will end up something like:
27594    # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
27595    $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
27596    # These will end up something like:
27597    # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
27598    # The trailing space for everyone except PATH is no typo, but is needed due
27599    # to trailing \ in the Windows paths. These will be stripped later.
27600    $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27601    $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27602    $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27603    $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27604    $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27605    $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' >> $EXTRACT_VC_ENV_BAT_FILE
27606
27607    # Now execute the newly created bat file.
27608    # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
27609    # Change directory so we don't need to mess with Windows paths in redirects.
27610    cd $VS_ENV_TMP_DIR
27611    cmd /c extract-vs-env.bat | $CAT
27612    cd $CURDIR
27613
27614    if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
27615      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
27616$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
27617      { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27618$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27619      { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27620$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27621      as_fn_error $? "Cannot continue" "$LINENO" 5
27622    fi
27623
27624    # Now set all paths and other env variables. This will allow the rest of
27625    # the configure script to find and run the compiler in the proper way.
27626    { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
27627$as_echo "$as_me: Setting extracted environment variables" >&6;}
27628    . $VS_ENV_TMP_DIR/set-vs-env.sh
27629    # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
27630    # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
27631  else
27632    # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
27633    { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
27634$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
27635  fi
27636
27637  # At this point, we should have correct variables in the environment, or we can't continue.
27638  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
27639$as_echo_n "checking for Visual Studio variables... " >&6; }
27640
27641  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x || test "x$WINDOWSSDKDIR" != x; then
27642    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
27643      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
27644$as_echo "present but broken" >&6; }
27645      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
27646    else
27647      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
27648$as_echo "ok" >&6; }
27649      # Remove any trailing "\" and " " from the variables.
27650      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED 's/\\\\* *$//'`
27651      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\* *$//'`
27652      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
27653      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
27654      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
27655      # Remove any paths containing # (typically F#) as that messes up make. This
27656      # is needed if visual studio was installed with F# support.
27657      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
27658
27659
27660
27661
27662    fi
27663  else
27664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
27665$as_echo "not found" >&6; }
27666
27667    if test "x$VS_ENV_CMD" = x; then
27668      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
27669$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
27670      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
27671$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
27672    else
27673      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
27674$as_echo "$as_me: Running the extraction script failed." >&6;}
27675    fi
27676    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
27677$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
27678    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
27679$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
27680    as_fn_error $? "Cannot continue" "$LINENO" 5
27681  fi
27682
27683    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
27684    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
27685    PATH="$VS_PATH"
27686    # The microsoft toolchain also requires INCLUDE and LIB to be set.
27687    export INCLUDE="$VS_INCLUDE"
27688    export LIB="$VS_LIB"
27689  fi
27690
27691  # autoconf magic only relies on PATH, so update it if tools dir is specified
27692  OLD_PATH="$PATH"
27693
27694  # For solaris we really need solaris tools, and not the GNU equivalent.
27695  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
27696  # so add that to path before starting to probe.
27697  # FIXME: This was originally only done for AS,NM,GNM,STRIP,MCS,OBJCOPY,OBJDUMP.
27698  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
27699    PATH="/usr/ccs/bin:$PATH"
27700  fi
27701
27702  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
27703  # override all other locations.
27704  if test "x$TOOLCHAIN_PATH" != x; then
27705    PATH=$TOOLCHAIN_PATH:$PATH
27706  fi
27707
27708
27709  #
27710  # Setup the compilers (CC and CXX)
27711  #
27712
27713  COMPILER_NAME=C
27714  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
27715
27716  if test "x$CC" != x; then
27717    # User has supplied compiler name already, always let that override.
27718    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
27719$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
27720    if test "x`basename $CC`" = "x$CC"; then
27721      # A command without a complete path is provided, search $PATH.
27722
27723      for ac_prog in $CC
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      if test "x$POTENTIAL_CC" != x; then
27769        CC=$POTENTIAL_CC
27770      else
27771        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
27772      fi
27773    else
27774      # Otherwise it might already be a complete path
27775      if test ! -x "$CC"; then
27776        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
27777      fi
27778    fi
27779  else
27780    # No user supplied value. Locate compiler ourselves.
27781
27782    # If we are cross compiling, assume cross compilation tools follows the
27783    # cross compilation standard where they are prefixed with the autoconf
27784    # standard name for the target. For example the binary
27785    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
27786    # If we are not cross compiling, then the default compiler name will be
27787    # used.
27788
27789    CC=
27790    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
27791    # before checking the rest of the PATH.
27792    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
27793    # step, this should not be necessary.
27794    if test -n "$TOOLCHAIN_PATH"; then
27795      PATH_save="$PATH"
27796      PATH="$TOOLCHAIN_PATH"
27797      for ac_prog in $SEARCH_LIST
27798do
27799  # Extract the first word of "$ac_prog", so it can be a program name with args.
27800set dummy $ac_prog; ac_word=$2
27801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27802$as_echo_n "checking for $ac_word... " >&6; }
27803if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
27804  $as_echo_n "(cached) " >&6
27805else
27806  case $TOOLCHAIN_PATH_CC in
27807  [\\/]* | ?:[\\/]*)
27808  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
27809  ;;
27810  *)
27811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27812for as_dir in $PATH
27813do
27814  IFS=$as_save_IFS
27815  test -z "$as_dir" && as_dir=.
27816    for ac_exec_ext in '' $ac_executable_extensions; do
27817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27818    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
27819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27820    break 2
27821  fi
27822done
27823  done
27824IFS=$as_save_IFS
27825
27826  ;;
27827esac
27828fi
27829TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
27830if test -n "$TOOLCHAIN_PATH_CC"; then
27831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
27832$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
27833else
27834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27835$as_echo "no" >&6; }
27836fi
27837
27838
27839  test -n "$TOOLCHAIN_PATH_CC" && break
27840done
27841
27842      CC=$TOOLCHAIN_PATH_CC
27843      PATH="$PATH_save"
27844    fi
27845
27846    # AC_PATH_PROGS can't be run multiple times with the same variable,
27847    # so create a new name for this run.
27848    if test "x$CC" = x; then
27849      for ac_prog in $SEARCH_LIST
27850do
27851  # Extract the first word of "$ac_prog", so it can be a program name with args.
27852set dummy $ac_prog; ac_word=$2
27853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27854$as_echo_n "checking for $ac_word... " >&6; }
27855if ${ac_cv_path_POTENTIAL_CC+:} false; then :
27856  $as_echo_n "(cached) " >&6
27857else
27858  case $POTENTIAL_CC in
27859  [\\/]* | ?:[\\/]*)
27860  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
27861  ;;
27862  *)
27863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
27864for as_dir in $PATH
27865do
27866  IFS=$as_save_IFS
27867  test -z "$as_dir" && as_dir=.
27868    for ac_exec_ext in '' $ac_executable_extensions; do
27869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
27870    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
27871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27872    break 2
27873  fi
27874done
27875  done
27876IFS=$as_save_IFS
27877
27878  ;;
27879esac
27880fi
27881POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
27882if test -n "$POTENTIAL_CC"; then
27883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
27884$as_echo "$POTENTIAL_CC" >&6; }
27885else
27886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27887$as_echo "no" >&6; }
27888fi
27889
27890
27891  test -n "$POTENTIAL_CC" && break
27892done
27893
27894      CC=$POTENTIAL_CC
27895    fi
27896
27897    if test "x$CC" = x; then
27898
27899  # Print a helpful message on how to acquire the necessary build dependency.
27900  # devkit is the help tag: freetype, cups, pulse, alsa etc
27901  MISSING_DEPENDENCY=devkit
27902
27903  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27904    cygwin_help $MISSING_DEPENDENCY
27905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27906    msys_help $MISSING_DEPENDENCY
27907  else
27908    PKGHANDLER_COMMAND=
27909
27910    case $PKGHANDLER in
27911      apt-get)
27912        apt_help     $MISSING_DEPENDENCY ;;
27913      yum)
27914        yum_help     $MISSING_DEPENDENCY ;;
27915      port)
27916        port_help    $MISSING_DEPENDENCY ;;
27917      pkgutil)
27918        pkgutil_help $MISSING_DEPENDENCY ;;
27919      pkgadd)
27920        pkgadd_help  $MISSING_DEPENDENCY ;;
27921    esac
27922
27923    if test "x$PKGHANDLER_COMMAND" != x; then
27924      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
27925    fi
27926  fi
27927
27928      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
27929    fi
27930  fi
27931
27932  # Now we have a compiler binary in CC. Make sure it's okay.
27933
27934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27935
27936  # First separate the path from the arguments. This will split at the first
27937  # space.
27938  complete="$CC"
27939  path="${complete%% *}"
27940  tmp="$complete EOL"
27941  arguments="${tmp#* }"
27942
27943  # Input might be given as Windows format, start by converting to
27944  # unix format.
27945  new_path=`$CYGPATH -u "$path"`
27946
27947  # Now try to locate executable using which
27948  new_path=`$WHICH "$new_path" 2> /dev/null`
27949  # bat and cmd files are not always considered executable in cygwin causing which
27950  # to not find them
27951  if test "x$new_path" = x \
27952      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27953      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27954    new_path=`$CYGPATH -u "$path"`
27955  fi
27956  if test "x$new_path" = x; then
27957    # Oops. Which didn't find the executable.
27958    # The splitting of arguments from the executable at a space might have been incorrect,
27959    # since paths with space are more likely in Windows. Give it another try with the whole
27960    # argument.
27961    path="$complete"
27962    arguments="EOL"
27963    new_path=`$CYGPATH -u "$path"`
27964    new_path=`$WHICH "$new_path" 2> /dev/null`
27965    # bat and cmd files are not always considered executable in cygwin causing which
27966    # to not find them
27967    if test "x$new_path" = x \
27968        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
27969        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
27970      new_path=`$CYGPATH -u "$path"`
27971    fi
27972    if test "x$new_path" = x; then
27973      # It's still not found. Now this is an unrecoverable error.
27974      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
27975$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
27976      has_space=`$ECHO "$complete" | $GREP " "`
27977      if test "x$has_space" != x; then
27978        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
27979$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
27980      fi
27981      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
27982    fi
27983  fi
27984
27985  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27986  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27987  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27988  # "foo.exe" is OK but "foo" is an error.
27989  #
27990  # This test is therefore slightly more accurate than "test -f" to check for file presence.
27991  # It is also a way to make sure we got the proper file name for the real test later on.
27992  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27993  if test "x$test_shortpath" = x; then
27994    # Short path failed, file does not exist as specified.
27995    # Try adding .exe or .cmd
27996    if test -f "${new_path}.exe"; then
27997      input_to_shortpath="${new_path}.exe"
27998    elif test -f "${new_path}.cmd"; then
27999      input_to_shortpath="${new_path}.cmd"
28000    else
28001      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
28002$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
28003      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28004$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28005      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28006    fi
28007  else
28008    input_to_shortpath="$new_path"
28009  fi
28010
28011  # Call helper function which possibly converts this using DOS-style short mode.
28012  # If so, the updated path is stored in $new_path.
28013  new_path="$input_to_shortpath"
28014
28015  input_path="$input_to_shortpath"
28016  # Check if we need to convert this using DOS-style short mode. If the path
28017  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28018  # take no chances and rewrite it.
28019  # Note: m4 eats our [], so we need to use [ and ] instead.
28020  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28021  if test "x$has_forbidden_chars" != x; then
28022    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28023    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28024    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28025    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28026      # Going to short mode and back again did indeed matter. Since short mode is
28027      # case insensitive, let's make it lowercase to improve readability.
28028      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28029      # Now convert it back to Unix-stile (cygpath)
28030      input_path=`$CYGPATH -u "$shortmode_path"`
28031      new_path="$input_path"
28032    fi
28033  fi
28034
28035  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28036  if test "x$test_cygdrive_prefix" = x; then
28037    # As a simple fix, exclude /usr/bin since it's not a real path.
28038    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28039      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28040      # a path prefixed by /cygdrive for fixpath to work.
28041      new_path="$CYGWIN_ROOT_PATH$input_path"
28042    fi
28043  fi
28044
28045  # remove trailing .exe if any
28046  new_path="${new_path/%.exe/}"
28047
28048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28049
28050  # First separate the path from the arguments. This will split at the first
28051  # space.
28052  complete="$CC"
28053  path="${complete%% *}"
28054  tmp="$complete EOL"
28055  arguments="${tmp#* }"
28056
28057  # Input might be given as Windows format, start by converting to
28058  # unix format.
28059  new_path="$path"
28060
28061  windows_path="$new_path"
28062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28063    unix_path=`$CYGPATH -u "$windows_path"`
28064    new_path="$unix_path"
28065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28067    new_path="$unix_path"
28068  fi
28069
28070
28071  # Now try to locate executable using which
28072  new_path=`$WHICH "$new_path" 2> /dev/null`
28073
28074  if test "x$new_path" = x; then
28075    # Oops. Which didn't find the executable.
28076    # The splitting of arguments from the executable at a space might have been incorrect,
28077    # since paths with space are more likely in Windows. Give it another try with the whole
28078    # argument.
28079    path="$complete"
28080    arguments="EOL"
28081    new_path="$path"
28082
28083  windows_path="$new_path"
28084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28085    unix_path=`$CYGPATH -u "$windows_path"`
28086    new_path="$unix_path"
28087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28089    new_path="$unix_path"
28090  fi
28091
28092
28093    new_path=`$WHICH "$new_path" 2> /dev/null`
28094
28095    if test "x$new_path" = x; then
28096      # It's still not found. Now this is an unrecoverable error.
28097      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28098$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28099      has_space=`$ECHO "$complete" | $GREP " "`
28100      if test "x$has_space" != x; then
28101        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28102$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28103      fi
28104      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28105    fi
28106  fi
28107
28108  # Now new_path has a complete unix path to the binary
28109  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28110    # Keep paths in /bin as-is, but remove trailing .exe if any
28111    new_path="${new_path/%.exe/}"
28112    # Do not save /bin paths to all_fixpath_prefixes!
28113  else
28114    # Not in mixed or Windows style, start by that.
28115    new_path=`cmd //c echo $new_path`
28116
28117  input_path="$new_path"
28118  # Check if we need to convert this using DOS-style short mode. If the path
28119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28120  # take no chances and rewrite it.
28121  # Note: m4 eats our [], so we need to use [ and ] instead.
28122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28123  if test "x$has_forbidden_chars" != x; then
28124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28125    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28126  fi
28127
28128    # Output is in $new_path
28129
28130  windows_path="$new_path"
28131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28132    unix_path=`$CYGPATH -u "$windows_path"`
28133    new_path="$unix_path"
28134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28136    new_path="$unix_path"
28137  fi
28138
28139    # remove trailing .exe if any
28140    new_path="${new_path/%.exe/}"
28141
28142    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28143    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28144  fi
28145
28146  else
28147    # We're on a posix platform. Hooray! :)
28148    # First separate the path from the arguments. This will split at the first
28149    # space.
28150    complete="$CC"
28151    path="${complete%% *}"
28152    tmp="$complete EOL"
28153    arguments="${tmp#* }"
28154
28155    # Cannot rely on the command "which" here since it doesn't always work.
28156    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28157    if test -z "$is_absolute_path"; then
28158      # Path to executable is not absolute. Find it.
28159      IFS_save="$IFS"
28160      IFS=:
28161      for p in $PATH; do
28162        if test -f "$p/$path" && test -x "$p/$path"; then
28163          new_path="$p/$path"
28164          break
28165        fi
28166      done
28167      IFS="$IFS_save"
28168    else
28169      # This is an absolute path, we can use it without further modifications.
28170      new_path="$path"
28171    fi
28172
28173    if test "x$new_path" = x; then
28174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
28175$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
28176      has_space=`$ECHO "$complete" | $GREP " "`
28177      if test "x$has_space" != x; then
28178        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28179$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28180      fi
28181      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
28182    fi
28183  fi
28184
28185  # Now join together the path and the arguments once again
28186  if test "x$arguments" != xEOL; then
28187    new_complete="$new_path ${arguments% *}"
28188  else
28189    new_complete="$new_path"
28190  fi
28191
28192  if test "x$complete" != "x$new_complete"; then
28193    CC="$new_complete"
28194    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
28195$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
28196  fi
28197
28198  TEST_COMPILER="$CC"
28199  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
28200  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
28201  if test "x$OPENJDK_BUILD_OS" != xaix; then
28202    # FIXME: This test should not be needed anymore; we don't do that for any platform.
28203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
28204$as_echo_n "checking resolved symbolic links for CC... " >&6; }
28205
28206  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28207    # Follow a chain of symbolic links. Use readlink
28208    # where it exists, else fall back to horribly
28209    # complicated shell code.
28210    if test "x$READLINK_TESTED" != yes; then
28211      # On MacOSX there is a readlink tool with a different
28212      # purpose than the GNU readlink tool. Check the found readlink.
28213      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28214      if test "x$ISGNU" = x; then
28215        # A readlink that we do not know how to use.
28216        # Are there other non-GNU readlinks out there?
28217        READLINK_TESTED=yes
28218        READLINK=
28219      fi
28220    fi
28221
28222    if test "x$READLINK" != x; then
28223      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
28224    else
28225      # Save the current directory for restoring afterwards
28226      STARTDIR=$PWD
28227      COUNTER=0
28228      sym_link_dir=`$DIRNAME $TEST_COMPILER`
28229      sym_link_file=`$BASENAME $TEST_COMPILER`
28230      cd $sym_link_dir
28231      # Use -P flag to resolve symlinks in directories.
28232      cd `$THEPWDCMD -P`
28233      sym_link_dir=`$THEPWDCMD -P`
28234      # Resolve file symlinks
28235      while test $COUNTER -lt 20; do
28236        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28237        if test "x$ISLINK" == x; then
28238          # This is not a symbolic link! We are done!
28239          break
28240        fi
28241        # Again resolve directory symlinks since the target of the just found
28242        # link could be in a different directory
28243        cd `$DIRNAME $ISLINK`
28244        sym_link_dir=`$THEPWDCMD -P`
28245        sym_link_file=`$BASENAME $ISLINK`
28246        let COUNTER=COUNTER+1
28247      done
28248      cd $STARTDIR
28249      TEST_COMPILER=$sym_link_dir/$sym_link_file
28250    fi
28251  fi
28252
28253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
28254$as_echo "$TEST_COMPILER" >&6; }
28255  fi
28256  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CC is disguised ccache" >&5
28257$as_echo_n "checking if CC is disguised ccache... " >&6; }
28258
28259  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
28260  if test "x$COMPILER_BASENAME" = "xccache"; then
28261    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
28262$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
28263    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
28264    # We want to control ccache invocation ourselves, so ignore this cc and try
28265    # searching again.
28266
28267    # Remove the path to the fake ccache cc from the PATH
28268    RETRY_COMPILER_SAVED_PATH="$PATH"
28269    COMPILER_DIRNAME=`$DIRNAME $CC`
28270    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
28271
28272    # Try again looking for our compiler
28273    if test -n "$ac_tool_prefix"; then
28274  for ac_prog in $TOOLCHAIN_CC_BINARY
28275  do
28276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28279$as_echo_n "checking for $ac_word... " >&6; }
28280if ${ac_cv_prog_PROPER_COMPILER_CC+:} false; then :
28281  $as_echo_n "(cached) " >&6
28282else
28283  if test -n "$PROPER_COMPILER_CC"; then
28284  ac_cv_prog_PROPER_COMPILER_CC="$PROPER_COMPILER_CC" # Let the user override the test.
28285else
28286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28287for as_dir in $PATH
28288do
28289  IFS=$as_save_IFS
28290  test -z "$as_dir" && as_dir=.
28291    for ac_exec_ext in '' $ac_executable_extensions; do
28292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28293    ac_cv_prog_PROPER_COMPILER_CC="$ac_tool_prefix$ac_prog"
28294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28295    break 2
28296  fi
28297done
28298  done
28299IFS=$as_save_IFS
28300
28301fi
28302fi
28303PROPER_COMPILER_CC=$ac_cv_prog_PROPER_COMPILER_CC
28304if test -n "$PROPER_COMPILER_CC"; then
28305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28306$as_echo "$PROPER_COMPILER_CC" >&6; }
28307else
28308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28309$as_echo "no" >&6; }
28310fi
28311
28312
28313    test -n "$PROPER_COMPILER_CC" && break
28314  done
28315fi
28316if test -z "$PROPER_COMPILER_CC"; then
28317  ac_ct_PROPER_COMPILER_CC=$PROPER_COMPILER_CC
28318  for ac_prog in $TOOLCHAIN_CC_BINARY
28319do
28320  # Extract the first word of "$ac_prog", so it can be a program name with args.
28321set dummy $ac_prog; ac_word=$2
28322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28323$as_echo_n "checking for $ac_word... " >&6; }
28324if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CC+:} false; then :
28325  $as_echo_n "(cached) " >&6
28326else
28327  if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28328  ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_ct_PROPER_COMPILER_CC" # Let the user override the test.
28329else
28330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28331for as_dir in $PATH
28332do
28333  IFS=$as_save_IFS
28334  test -z "$as_dir" && as_dir=.
28335    for ac_exec_ext in '' $ac_executable_extensions; do
28336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28337    ac_cv_prog_ac_ct_PROPER_COMPILER_CC="$ac_prog"
28338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28339    break 2
28340  fi
28341done
28342  done
28343IFS=$as_save_IFS
28344
28345fi
28346fi
28347ac_ct_PROPER_COMPILER_CC=$ac_cv_prog_ac_ct_PROPER_COMPILER_CC
28348if test -n "$ac_ct_PROPER_COMPILER_CC"; then
28349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CC" >&5
28350$as_echo "$ac_ct_PROPER_COMPILER_CC" >&6; }
28351else
28352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28353$as_echo "no" >&6; }
28354fi
28355
28356
28357  test -n "$ac_ct_PROPER_COMPILER_CC" && break
28358done
28359
28360  if test "x$ac_ct_PROPER_COMPILER_CC" = x; then
28361    PROPER_COMPILER_CC=""
28362  else
28363    case $cross_compiling:$ac_tool_warned in
28364yes:)
28365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28367ac_tool_warned=yes ;;
28368esac
28369    PROPER_COMPILER_CC=$ac_ct_PROPER_COMPILER_CC
28370  fi
28371fi
28372
28373
28374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28375
28376  # First separate the path from the arguments. This will split at the first
28377  # space.
28378  complete="$PROPER_COMPILER_CC"
28379  path="${complete%% *}"
28380  tmp="$complete EOL"
28381  arguments="${tmp#* }"
28382
28383  # Input might be given as Windows format, start by converting to
28384  # unix format.
28385  new_path=`$CYGPATH -u "$path"`
28386
28387  # Now try to locate executable using which
28388  new_path=`$WHICH "$new_path" 2> /dev/null`
28389  # bat and cmd files are not always considered executable in cygwin causing which
28390  # to not find them
28391  if test "x$new_path" = x \
28392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28394    new_path=`$CYGPATH -u "$path"`
28395  fi
28396  if test "x$new_path" = x; then
28397    # Oops. Which didn't find the executable.
28398    # The splitting of arguments from the executable at a space might have been incorrect,
28399    # since paths with space are more likely in Windows. Give it another try with the whole
28400    # argument.
28401    path="$complete"
28402    arguments="EOL"
28403    new_path=`$CYGPATH -u "$path"`
28404    new_path=`$WHICH "$new_path" 2> /dev/null`
28405    # bat and cmd files are not always considered executable in cygwin causing which
28406    # to not find them
28407    if test "x$new_path" = x \
28408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
28409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
28410      new_path=`$CYGPATH -u "$path"`
28411    fi
28412    if test "x$new_path" = x; then
28413      # It's still not found. Now this is an unrecoverable error.
28414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28415$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28416      has_space=`$ECHO "$complete" | $GREP " "`
28417      if test "x$has_space" != x; then
28418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28420      fi
28421      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28422    fi
28423  fi
28424
28425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28428  # "foo.exe" is OK but "foo" is an error.
28429  #
28430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
28431  # It is also a way to make sure we got the proper file name for the real test later on.
28432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28433  if test "x$test_shortpath" = x; then
28434    # Short path failed, file does not exist as specified.
28435    # Try adding .exe or .cmd
28436    if test -f "${new_path}.exe"; then
28437      input_to_shortpath="${new_path}.exe"
28438    elif test -f "${new_path}.cmd"; then
28439      input_to_shortpath="${new_path}.cmd"
28440    else
28441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&5
28442$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$new_path\", is invalid." >&6;}
28443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
28444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
28445      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28446    fi
28447  else
28448    input_to_shortpath="$new_path"
28449  fi
28450
28451  # Call helper function which possibly converts this using DOS-style short mode.
28452  # If so, the updated path is stored in $new_path.
28453  new_path="$input_to_shortpath"
28454
28455  input_path="$input_to_shortpath"
28456  # Check if we need to convert this using DOS-style short mode. If the path
28457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28458  # take no chances and rewrite it.
28459  # Note: m4 eats our [], so we need to use [ and ] instead.
28460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28461  if test "x$has_forbidden_chars" != x; then
28462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28466      # Going to short mode and back again did indeed matter. Since short mode is
28467      # case insensitive, let's make it lowercase to improve readability.
28468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28469      # Now convert it back to Unix-stile (cygpath)
28470      input_path=`$CYGPATH -u "$shortmode_path"`
28471      new_path="$input_path"
28472    fi
28473  fi
28474
28475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28476  if test "x$test_cygdrive_prefix" = x; then
28477    # As a simple fix, exclude /usr/bin since it's not a real path.
28478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
28479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28480      # a path prefixed by /cygdrive for fixpath to work.
28481      new_path="$CYGWIN_ROOT_PATH$input_path"
28482    fi
28483  fi
28484
28485  # remove trailing .exe if any
28486  new_path="${new_path/%.exe/}"
28487
28488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28489
28490  # First separate the path from the arguments. This will split at the first
28491  # space.
28492  complete="$PROPER_COMPILER_CC"
28493  path="${complete%% *}"
28494  tmp="$complete EOL"
28495  arguments="${tmp#* }"
28496
28497  # Input might be given as Windows format, start by converting to
28498  # unix format.
28499  new_path="$path"
28500
28501  windows_path="$new_path"
28502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28503    unix_path=`$CYGPATH -u "$windows_path"`
28504    new_path="$unix_path"
28505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28507    new_path="$unix_path"
28508  fi
28509
28510
28511  # Now try to locate executable using which
28512  new_path=`$WHICH "$new_path" 2> /dev/null`
28513
28514  if test "x$new_path" = x; then
28515    # Oops. Which didn't find the executable.
28516    # The splitting of arguments from the executable at a space might have been incorrect,
28517    # since paths with space are more likely in Windows. Give it another try with the whole
28518    # argument.
28519    path="$complete"
28520    arguments="EOL"
28521    new_path="$path"
28522
28523  windows_path="$new_path"
28524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28525    unix_path=`$CYGPATH -u "$windows_path"`
28526    new_path="$unix_path"
28527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28529    new_path="$unix_path"
28530  fi
28531
28532
28533    new_path=`$WHICH "$new_path" 2> /dev/null`
28534
28535    if test "x$new_path" = x; then
28536      # It's still not found. Now this is an unrecoverable error.
28537      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28538$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28539      has_space=`$ECHO "$complete" | $GREP " "`
28540      if test "x$has_space" != x; then
28541        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
28542$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
28543      fi
28544      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28545    fi
28546  fi
28547
28548  # Now new_path has a complete unix path to the binary
28549  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
28550    # Keep paths in /bin as-is, but remove trailing .exe if any
28551    new_path="${new_path/%.exe/}"
28552    # Do not save /bin paths to all_fixpath_prefixes!
28553  else
28554    # Not in mixed or Windows style, start by that.
28555    new_path=`cmd //c echo $new_path`
28556
28557  input_path="$new_path"
28558  # Check if we need to convert this using DOS-style short mode. If the path
28559  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28560  # take no chances and rewrite it.
28561  # Note: m4 eats our [], so we need to use [ and ] instead.
28562  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28563  if test "x$has_forbidden_chars" != x; then
28564    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28565    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28566  fi
28567
28568    # Output is in $new_path
28569
28570  windows_path="$new_path"
28571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28572    unix_path=`$CYGPATH -u "$windows_path"`
28573    new_path="$unix_path"
28574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28576    new_path="$unix_path"
28577  fi
28578
28579    # remove trailing .exe if any
28580    new_path="${new_path/%.exe/}"
28581
28582    # Save the first 10 bytes of this path to the storage, so fixpath can work.
28583    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28584  fi
28585
28586  else
28587    # We're on a posix platform. Hooray! :)
28588    # First separate the path from the arguments. This will split at the first
28589    # space.
28590    complete="$PROPER_COMPILER_CC"
28591    path="${complete%% *}"
28592    tmp="$complete EOL"
28593    arguments="${tmp#* }"
28594
28595    # Cannot rely on the command "which" here since it doesn't always work.
28596    is_absolute_path=`$ECHO "$path" | $GREP ^/`
28597    if test -z "$is_absolute_path"; then
28598      # Path to executable is not absolute. Find it.
28599      IFS_save="$IFS"
28600      IFS=:
28601      for p in $PATH; do
28602        if test -f "$p/$path" && test -x "$p/$path"; then
28603          new_path="$p/$path"
28604          break
28605        fi
28606      done
28607      IFS="$IFS_save"
28608    else
28609      # This is an absolute path, we can use it without further modifications.
28610      new_path="$path"
28611    fi
28612
28613    if test "x$new_path" = x; then
28614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&5
28615$as_echo "$as_me: The path of PROPER_COMPILER_CC, which resolves as \"$complete\", is not found." >&6;}
28616      has_space=`$ECHO "$complete" | $GREP " "`
28617      if test "x$has_space" != x; then
28618        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
28619$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
28620      fi
28621      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CC" "$LINENO" 5
28622    fi
28623  fi
28624
28625  # Now join together the path and the arguments once again
28626  if test "x$arguments" != xEOL; then
28627    new_complete="$new_path ${arguments% *}"
28628  else
28629    new_complete="$new_path"
28630  fi
28631
28632  if test "x$complete" != "x$new_complete"; then
28633    PROPER_COMPILER_CC="$new_complete"
28634    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&5
28635$as_echo "$as_me: Rewriting PROPER_COMPILER_CC to \"$new_complete\"" >&6;}
28636  fi
28637
28638    PATH="$RETRY_COMPILER_SAVED_PATH"
28639
28640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CC" >&5
28641$as_echo_n "checking for resolved symbolic links for CC... " >&6; }
28642
28643  if test "x$OPENJDK_BUILD_OS" != xwindows; then
28644    # Follow a chain of symbolic links. Use readlink
28645    # where it exists, else fall back to horribly
28646    # complicated shell code.
28647    if test "x$READLINK_TESTED" != yes; then
28648      # On MacOSX there is a readlink tool with a different
28649      # purpose than the GNU readlink tool. Check the found readlink.
28650      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
28651      if test "x$ISGNU" = x; then
28652        # A readlink that we do not know how to use.
28653        # Are there other non-GNU readlinks out there?
28654        READLINK_TESTED=yes
28655        READLINK=
28656      fi
28657    fi
28658
28659    if test "x$READLINK" != x; then
28660      PROPER_COMPILER_CC=`$READLINK -f $PROPER_COMPILER_CC`
28661    else
28662      # Save the current directory for restoring afterwards
28663      STARTDIR=$PWD
28664      COUNTER=0
28665      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CC`
28666      sym_link_file=`$BASENAME $PROPER_COMPILER_CC`
28667      cd $sym_link_dir
28668      # Use -P flag to resolve symlinks in directories.
28669      cd `$THEPWDCMD -P`
28670      sym_link_dir=`$THEPWDCMD -P`
28671      # Resolve file symlinks
28672      while test $COUNTER -lt 20; do
28673        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
28674        if test "x$ISLINK" == x; then
28675          # This is not a symbolic link! We are done!
28676          break
28677        fi
28678        # Again resolve directory symlinks since the target of the just found
28679        # link could be in a different directory
28680        cd `$DIRNAME $ISLINK`
28681        sym_link_dir=`$THEPWDCMD -P`
28682        sym_link_file=`$BASENAME $ISLINK`
28683        let COUNTER=COUNTER+1
28684      done
28685      cd $STARTDIR
28686      PROPER_COMPILER_CC=$sym_link_dir/$sym_link_file
28687    fi
28688  fi
28689
28690    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CC" >&5
28691$as_echo "$PROPER_COMPILER_CC" >&6; }
28692    CC="$PROPER_COMPILER_CC"
28693  else
28694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CC" >&5
28695$as_echo "no, keeping CC" >&6; }
28696  fi
28697
28698
28699  COMPILER=$CC
28700  COMPILER_NAME=$COMPILER_NAME
28701
28702  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
28703    # cc -V output typically looks like
28704    #     cc: Sun C 5.12 Linux_i386 2011/11/16
28705    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
28706    # Check that this is likely to be the Solaris Studio cc.
28707    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
28708    if test $? -ne 0; then
28709      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28710      { $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
28711$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28712      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28713$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28714      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28715$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28716      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28717    fi
28718    # Remove usage instructions (if present), and
28719    # collapse compiler output into a single line
28720    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28721        $SED -e 's/ *[Uu]sage:.*//'`
28722    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28723        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
28724  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
28725    # xlc -qversion output typically looks like
28726    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
28727    #     Version: 11.01.0000.0015
28728    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
28729    # Check that this is likely to be the IBM XL C compiler.
28730    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
28731    if test $? -ne 0; then
28732      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28733      { $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
28734$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28735      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28736$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28737      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
28738$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
28739      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28740    fi
28741    # Collapse compiler output into a single line
28742    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28743    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28744        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
28745  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
28746    # There is no specific version flag, but all output starts with a version string.
28747    # First line typically looks something like:
28748    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
28749    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
28750    # Check that this is likely to be Microsoft CL.EXE.
28751    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
28752    if test $? -ne 0; then
28753      { $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
28754$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28755      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28756$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28757      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28758    fi
28759    # Collapse compiler output into a single line
28760    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28761    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28762        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
28763  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
28764    # gcc --version output typically looks like
28765    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
28766    #     Copyright (C) 2013 Free Software Foundation, Inc.
28767    #     This is free software; see the source for copying conditions.  There is NO
28768    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
28769    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28770    # Check that this is likely to be GCC.
28771    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
28772    if test $? -ne 0; then
28773      { $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
28774$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28775      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
28776$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
28777      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28778    fi
28779    # Remove Copyright and legalese from version string, and
28780    # collapse into a single line
28781    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
28782        $SED -e 's/ *Copyright .*//'`
28783    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28784        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
28785  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
28786    # clang --version output typically looks like
28787    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
28788    #    clang version 3.3 (tags/RELEASE_33/final)
28789    # or
28790    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
28791    #    Target: x86_64-pc-linux-gnu
28792    #    Thread model: posix
28793    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
28794    # Check that this is likely to be clang
28795    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
28796    if test $? -ne 0; then
28797      { $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
28798$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
28799      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
28800$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
28801      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
28802    fi
28803    # Collapse compiler output into a single line
28804    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
28805    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
28806        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
28807  else
28808      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
28809  fi
28810  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
28811  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
28812  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
28813  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
28814
28815  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
28816$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
28817
28818
28819  # Now that we have resolved CC ourself, let autoconf have its go at it
28820  ac_ext=c
28821ac_cpp='$CPP $CPPFLAGS'
28822ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
28823ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
28824ac_compiler_gnu=$ac_cv_c_compiler_gnu
28825if test -n "$ac_tool_prefix"; then
28826  for ac_prog in $CC
28827  do
28828    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
28829set dummy $ac_tool_prefix$ac_prog; ac_word=$2
28830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28831$as_echo_n "checking for $ac_word... " >&6; }
28832if ${ac_cv_prog_CC+:} false; then :
28833  $as_echo_n "(cached) " >&6
28834else
28835  if test -n "$CC"; then
28836  ac_cv_prog_CC="$CC" # Let the user override the test.
28837else
28838as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28839for as_dir in $PATH
28840do
28841  IFS=$as_save_IFS
28842  test -z "$as_dir" && as_dir=.
28843    for ac_exec_ext in '' $ac_executable_extensions; do
28844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28845    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
28846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28847    break 2
28848  fi
28849done
28850  done
28851IFS=$as_save_IFS
28852
28853fi
28854fi
28855CC=$ac_cv_prog_CC
28856if test -n "$CC"; then
28857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
28858$as_echo "$CC" >&6; }
28859else
28860  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28861$as_echo "no" >&6; }
28862fi
28863
28864
28865    test -n "$CC" && break
28866  done
28867fi
28868if test -z "$CC"; then
28869  ac_ct_CC=$CC
28870  for ac_prog in $CC
28871do
28872  # Extract the first word of "$ac_prog", so it can be a program name with args.
28873set dummy $ac_prog; ac_word=$2
28874{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
28875$as_echo_n "checking for $ac_word... " >&6; }
28876if ${ac_cv_prog_ac_ct_CC+:} false; then :
28877  $as_echo_n "(cached) " >&6
28878else
28879  if test -n "$ac_ct_CC"; then
28880  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
28881else
28882as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
28883for as_dir in $PATH
28884do
28885  IFS=$as_save_IFS
28886  test -z "$as_dir" && as_dir=.
28887    for ac_exec_ext in '' $ac_executable_extensions; do
28888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
28889    ac_cv_prog_ac_ct_CC="$ac_prog"
28890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
28891    break 2
28892  fi
28893done
28894  done
28895IFS=$as_save_IFS
28896
28897fi
28898fi
28899ac_ct_CC=$ac_cv_prog_ac_ct_CC
28900if test -n "$ac_ct_CC"; then
28901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
28902$as_echo "$ac_ct_CC" >&6; }
28903else
28904  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28905$as_echo "no" >&6; }
28906fi
28907
28908
28909  test -n "$ac_ct_CC" && break
28910done
28911
28912  if test "x$ac_ct_CC" = x; then
28913    CC=""
28914  else
28915    case $cross_compiling:$ac_tool_warned in
28916yes:)
28917{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
28918$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
28919ac_tool_warned=yes ;;
28920esac
28921    CC=$ac_ct_CC
28922  fi
28923fi
28924
28925
28926test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
28927$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
28928as_fn_error $? "no acceptable C compiler found in \$PATH
28929See \`config.log' for more details" "$LINENO" 5; }
28930
28931# Provide some information about the compiler.
28932$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
28933set X $ac_compile
28934ac_compiler=$2
28935for ac_option in --version -v -V -qversion; do
28936  { { ac_try="$ac_compiler $ac_option >&5"
28937case "(($ac_try" in
28938  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28939  *) ac_try_echo=$ac_try;;
28940esac
28941eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
28942$as_echo "$ac_try_echo"; } >&5
28943  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
28944  ac_status=$?
28945  if test -s conftest.err; then
28946    sed '10a\
28947... rest of stderr output deleted ...
28948         10q' conftest.err >conftest.er1
28949    cat conftest.er1 >&5
28950  fi
28951  rm -f conftest.er1 conftest.err
28952  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28953  test $ac_status = 0; }
28954done
28955
28956cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28957/* end confdefs.h.  */
28958
28959int
28960main ()
28961{
28962
28963  ;
28964  return 0;
28965}
28966_ACEOF
28967ac_clean_files_save=$ac_clean_files
28968ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
28969# Try to create an executable without -o first, disregard a.out.
28970# It will help us diagnose broken compilers, and finding out an intuition
28971# of exeext.
28972{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
28973$as_echo_n "checking whether the C compiler works... " >&6; }
28974ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
28975
28976# The possible output files:
28977ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
28978
28979ac_rmfiles=
28980for ac_file in $ac_files
28981do
28982  case $ac_file in
28983    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
28984    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
28985  esac
28986done
28987rm -f $ac_rmfiles
28988
28989if { { ac_try="$ac_link_default"
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_default") 2>&5
28997  ac_status=$?
28998  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
28999  test $ac_status = 0; }; then :
29000  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
29001# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
29002# in a Makefile.  We should not override ac_cv_exeext if it was cached,
29003# so that the user can short-circuit this test for compilers unknown to
29004# Autoconf.
29005for ac_file in $ac_files ''
29006do
29007  test -f "$ac_file" || continue
29008  case $ac_file in
29009    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
29010	;;
29011    [ab].out )
29012	# We found the default executable, but exeext='' is most
29013	# certainly right.
29014	break;;
29015    *.* )
29016	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
29017	then :; else
29018	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29019	fi
29020	# We set ac_cv_exeext here because the later test for it is not
29021	# safe: cross compilers may not add the suffix if given an `-o'
29022	# argument, so we may need to know it at that point already.
29023	# Even if this section looks crufty: it has the advantage of
29024	# actually working.
29025	break;;
29026    * )
29027	break;;
29028  esac
29029done
29030test "$ac_cv_exeext" = no && ac_cv_exeext=
29031
29032else
29033  ac_file=''
29034fi
29035if test -z "$ac_file"; then :
29036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29037$as_echo "no" >&6; }
29038$as_echo "$as_me: failed program was:" >&5
29039sed 's/^/| /' conftest.$ac_ext >&5
29040
29041{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29043as_fn_error 77 "C compiler cannot create executables
29044See \`config.log' for more details" "$LINENO" 5; }
29045else
29046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29047$as_echo "yes" >&6; }
29048fi
29049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
29050$as_echo_n "checking for C compiler default output file name... " >&6; }
29051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
29052$as_echo "$ac_file" >&6; }
29053ac_exeext=$ac_cv_exeext
29054
29055rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
29056ac_clean_files=$ac_clean_files_save
29057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
29058$as_echo_n "checking for suffix of executables... " >&6; }
29059if { { ac_try="$ac_link"
29060case "(($ac_try" in
29061  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29062  *) ac_try_echo=$ac_try;;
29063esac
29064eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29065$as_echo "$ac_try_echo"; } >&5
29066  (eval "$ac_link") 2>&5
29067  ac_status=$?
29068  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29069  test $ac_status = 0; }; then :
29070  # If both `conftest.exe' and `conftest' are `present' (well, observable)
29071# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
29072# work properly (i.e., refer to `conftest.exe'), while it won't with
29073# `rm'.
29074for ac_file in conftest.exe conftest conftest.*; do
29075  test -f "$ac_file" || continue
29076  case $ac_file in
29077    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
29078    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
29079	  break;;
29080    * ) break;;
29081  esac
29082done
29083else
29084  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29085$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29086as_fn_error $? "cannot compute suffix of executables: cannot compile and link
29087See \`config.log' for more details" "$LINENO" 5; }
29088fi
29089rm -f conftest conftest$ac_cv_exeext
29090{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
29091$as_echo "$ac_cv_exeext" >&6; }
29092
29093rm -f conftest.$ac_ext
29094EXEEXT=$ac_cv_exeext
29095ac_exeext=$EXEEXT
29096cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29097/* end confdefs.h.  */
29098#include <stdio.h>
29099int
29100main ()
29101{
29102FILE *f = fopen ("conftest.out", "w");
29103 return ferror (f) || fclose (f) != 0;
29104
29105  ;
29106  return 0;
29107}
29108_ACEOF
29109ac_clean_files="$ac_clean_files conftest.out"
29110# Check that the compiler produces executables we can run.  If not, either
29111# the compiler is broken, or we cross compile.
29112{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
29113$as_echo_n "checking whether we are cross compiling... " >&6; }
29114if test "$cross_compiling" != yes; then
29115  { { ac_try="$ac_link"
29116case "(($ac_try" in
29117  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29118  *) ac_try_echo=$ac_try;;
29119esac
29120eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29121$as_echo "$ac_try_echo"; } >&5
29122  (eval "$ac_link") 2>&5
29123  ac_status=$?
29124  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29125  test $ac_status = 0; }
29126  if { ac_try='./conftest$ac_cv_exeext'
29127  { { case "(($ac_try" in
29128  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29129  *) ac_try_echo=$ac_try;;
29130esac
29131eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29132$as_echo "$ac_try_echo"; } >&5
29133  (eval "$ac_try") 2>&5
29134  ac_status=$?
29135  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29136  test $ac_status = 0; }; }; then
29137    cross_compiling=no
29138  else
29139    if test "$cross_compiling" = maybe; then
29140	cross_compiling=yes
29141    else
29142	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29144as_fn_error $? "cannot run C compiled programs.
29145If you meant to cross compile, use \`--host'.
29146See \`config.log' for more details" "$LINENO" 5; }
29147    fi
29148  fi
29149fi
29150{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
29151$as_echo "$cross_compiling" >&6; }
29152
29153rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
29154ac_clean_files=$ac_clean_files_save
29155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
29156$as_echo_n "checking for suffix of object files... " >&6; }
29157if ${ac_cv_objext+:} false; then :
29158  $as_echo_n "(cached) " >&6
29159else
29160  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29161/* end confdefs.h.  */
29162
29163int
29164main ()
29165{
29166
29167  ;
29168  return 0;
29169}
29170_ACEOF
29171rm -f conftest.o conftest.obj
29172if { { ac_try="$ac_compile"
29173case "(($ac_try" in
29174  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29175  *) ac_try_echo=$ac_try;;
29176esac
29177eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
29178$as_echo "$ac_try_echo"; } >&5
29179  (eval "$ac_compile") 2>&5
29180  ac_status=$?
29181  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
29182  test $ac_status = 0; }; then :
29183  for ac_file in conftest.o conftest.obj conftest.*; do
29184  test -f "$ac_file" || continue;
29185  case $ac_file in
29186    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
29187    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
29188       break;;
29189  esac
29190done
29191else
29192  $as_echo "$as_me: failed program was:" >&5
29193sed 's/^/| /' conftest.$ac_ext >&5
29194
29195{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
29196$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
29197as_fn_error $? "cannot compute suffix of object files: cannot compile
29198See \`config.log' for more details" "$LINENO" 5; }
29199fi
29200rm -f conftest.$ac_cv_objext conftest.$ac_ext
29201fi
29202{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
29203$as_echo "$ac_cv_objext" >&6; }
29204OBJEXT=$ac_cv_objext
29205ac_objext=$OBJEXT
29206{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
29207$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
29208if ${ac_cv_c_compiler_gnu+:} false; then :
29209  $as_echo_n "(cached) " >&6
29210else
29211  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29212/* end confdefs.h.  */
29213
29214int
29215main ()
29216{
29217#ifndef __GNUC__
29218       choke me
29219#endif
29220
29221  ;
29222  return 0;
29223}
29224_ACEOF
29225if ac_fn_c_try_compile "$LINENO"; then :
29226  ac_compiler_gnu=yes
29227else
29228  ac_compiler_gnu=no
29229fi
29230rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29231ac_cv_c_compiler_gnu=$ac_compiler_gnu
29232
29233fi
29234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
29235$as_echo "$ac_cv_c_compiler_gnu" >&6; }
29236if test $ac_compiler_gnu = yes; then
29237  GCC=yes
29238else
29239  GCC=
29240fi
29241ac_test_CFLAGS=${CFLAGS+set}
29242ac_save_CFLAGS=$CFLAGS
29243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
29244$as_echo_n "checking whether $CC accepts -g... " >&6; }
29245if ${ac_cv_prog_cc_g+:} false; then :
29246  $as_echo_n "(cached) " >&6
29247else
29248  ac_save_c_werror_flag=$ac_c_werror_flag
29249   ac_c_werror_flag=yes
29250   ac_cv_prog_cc_g=no
29251   CFLAGS="-g"
29252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29253/* end confdefs.h.  */
29254
29255int
29256main ()
29257{
29258
29259  ;
29260  return 0;
29261}
29262_ACEOF
29263if ac_fn_c_try_compile "$LINENO"; then :
29264  ac_cv_prog_cc_g=yes
29265else
29266  CFLAGS=""
29267      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29268/* end confdefs.h.  */
29269
29270int
29271main ()
29272{
29273
29274  ;
29275  return 0;
29276}
29277_ACEOF
29278if ac_fn_c_try_compile "$LINENO"; then :
29279
29280else
29281  ac_c_werror_flag=$ac_save_c_werror_flag
29282	 CFLAGS="-g"
29283	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29284/* end confdefs.h.  */
29285
29286int
29287main ()
29288{
29289
29290  ;
29291  return 0;
29292}
29293_ACEOF
29294if ac_fn_c_try_compile "$LINENO"; then :
29295  ac_cv_prog_cc_g=yes
29296fi
29297rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29298fi
29299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29300fi
29301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29302   ac_c_werror_flag=$ac_save_c_werror_flag
29303fi
29304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
29305$as_echo "$ac_cv_prog_cc_g" >&6; }
29306if test "$ac_test_CFLAGS" = set; then
29307  CFLAGS=$ac_save_CFLAGS
29308elif test $ac_cv_prog_cc_g = yes; then
29309  if test "$GCC" = yes; then
29310    CFLAGS="-g -O2"
29311  else
29312    CFLAGS="-g"
29313  fi
29314else
29315  if test "$GCC" = yes; then
29316    CFLAGS="-O2"
29317  else
29318    CFLAGS=
29319  fi
29320fi
29321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
29322$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
29323if ${ac_cv_prog_cc_c89+:} false; then :
29324  $as_echo_n "(cached) " >&6
29325else
29326  ac_cv_prog_cc_c89=no
29327ac_save_CC=$CC
29328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29329/* end confdefs.h.  */
29330#include <stdarg.h>
29331#include <stdio.h>
29332struct stat;
29333/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
29334struct buf { int x; };
29335FILE * (*rcsopen) (struct buf *, struct stat *, int);
29336static char *e (p, i)
29337     char **p;
29338     int i;
29339{
29340  return p[i];
29341}
29342static char *f (char * (*g) (char **, int), char **p, ...)
29343{
29344  char *s;
29345  va_list v;
29346  va_start (v,p);
29347  s = g (p, va_arg (v,int));
29348  va_end (v);
29349  return s;
29350}
29351
29352/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
29353   function prototypes and stuff, but not '\xHH' hex character constants.
29354   These don't provoke an error unfortunately, instead are silently treated
29355   as 'x'.  The following induces an error, until -std is added to get
29356   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
29357   array size at least.  It's necessary to write '\x00'==0 to get something
29358   that's true only with -std.  */
29359int osf4_cc_array ['\x00' == 0 ? 1 : -1];
29360
29361/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
29362   inside strings and character constants.  */
29363#define FOO(x) 'x'
29364int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
29365
29366int test (int i, double x);
29367struct s1 {int (*f) (int a);};
29368struct s2 {int (*f) (double a);};
29369int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
29370int argc;
29371char **argv;
29372int
29373main ()
29374{
29375return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
29376  ;
29377  return 0;
29378}
29379_ACEOF
29380for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
29381	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
29382do
29383  CC="$ac_save_CC $ac_arg"
29384  if ac_fn_c_try_compile "$LINENO"; then :
29385  ac_cv_prog_cc_c89=$ac_arg
29386fi
29387rm -f core conftest.err conftest.$ac_objext
29388  test "x$ac_cv_prog_cc_c89" != "xno" && break
29389done
29390rm -f conftest.$ac_ext
29391CC=$ac_save_CC
29392
29393fi
29394# AC_CACHE_VAL
29395case "x$ac_cv_prog_cc_c89" in
29396  x)
29397    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
29398$as_echo "none needed" >&6; } ;;
29399  xno)
29400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
29401$as_echo "unsupported" >&6; } ;;
29402  *)
29403    CC="$CC $ac_cv_prog_cc_c89"
29404    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
29405$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
29406esac
29407if test "x$ac_cv_prog_cc_c89" != xno; then :
29408
29409fi
29410
29411ac_ext=cpp
29412ac_cpp='$CXXCPP $CPPFLAGS'
29413ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
29414ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
29415ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
29416
29417
29418
29419  COMPILER_NAME=C++
29420  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
29421
29422  if test "x$CXX" != x; then
29423    # User has supplied compiler name already, always let that override.
29424    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
29425$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
29426    if test "x`basename $CXX`" = "x$CXX"; then
29427      # A command without a complete path is provided, search $PATH.
29428
29429      for ac_prog in $CXX
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      if test "x$POTENTIAL_CXX" != x; then
29475        CXX=$POTENTIAL_CXX
29476      else
29477        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
29478      fi
29479    else
29480      # Otherwise it might already be a complete path
29481      if test ! -x "$CXX"; then
29482        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
29483      fi
29484    fi
29485  else
29486    # No user supplied value. Locate compiler ourselves.
29487
29488    # If we are cross compiling, assume cross compilation tools follows the
29489    # cross compilation standard where they are prefixed with the autoconf
29490    # standard name for the target. For example the binary
29491    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
29492    # If we are not cross compiling, then the default compiler name will be
29493    # used.
29494
29495    CXX=
29496    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
29497    # before checking the rest of the PATH.
29498    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
29499    # step, this should not be necessary.
29500    if test -n "$TOOLCHAIN_PATH"; then
29501      PATH_save="$PATH"
29502      PATH="$TOOLCHAIN_PATH"
29503      for ac_prog in $SEARCH_LIST
29504do
29505  # Extract the first word of "$ac_prog", so it can be a program name with args.
29506set dummy $ac_prog; ac_word=$2
29507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29508$as_echo_n "checking for $ac_word... " >&6; }
29509if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
29510  $as_echo_n "(cached) " >&6
29511else
29512  case $TOOLCHAIN_PATH_CXX in
29513  [\\/]* | ?:[\\/]*)
29514  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
29515  ;;
29516  *)
29517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29518for as_dir in $PATH
29519do
29520  IFS=$as_save_IFS
29521  test -z "$as_dir" && as_dir=.
29522    for ac_exec_ext in '' $ac_executable_extensions; do
29523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29524    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
29525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29526    break 2
29527  fi
29528done
29529  done
29530IFS=$as_save_IFS
29531
29532  ;;
29533esac
29534fi
29535TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
29536if test -n "$TOOLCHAIN_PATH_CXX"; then
29537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
29538$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
29539else
29540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29541$as_echo "no" >&6; }
29542fi
29543
29544
29545  test -n "$TOOLCHAIN_PATH_CXX" && break
29546done
29547
29548      CXX=$TOOLCHAIN_PATH_CXX
29549      PATH="$PATH_save"
29550    fi
29551
29552    # AC_PATH_PROGS can't be run multiple times with the same variable,
29553    # so create a new name for this run.
29554    if test "x$CXX" = x; then
29555      for ac_prog in $SEARCH_LIST
29556do
29557  # Extract the first word of "$ac_prog", so it can be a program name with args.
29558set dummy $ac_prog; ac_word=$2
29559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29560$as_echo_n "checking for $ac_word... " >&6; }
29561if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
29562  $as_echo_n "(cached) " >&6
29563else
29564  case $POTENTIAL_CXX in
29565  [\\/]* | ?:[\\/]*)
29566  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
29567  ;;
29568  *)
29569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29570for as_dir in $PATH
29571do
29572  IFS=$as_save_IFS
29573  test -z "$as_dir" && as_dir=.
29574    for ac_exec_ext in '' $ac_executable_extensions; do
29575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29576    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
29577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29578    break 2
29579  fi
29580done
29581  done
29582IFS=$as_save_IFS
29583
29584  ;;
29585esac
29586fi
29587POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
29588if test -n "$POTENTIAL_CXX"; then
29589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
29590$as_echo "$POTENTIAL_CXX" >&6; }
29591else
29592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29593$as_echo "no" >&6; }
29594fi
29595
29596
29597  test -n "$POTENTIAL_CXX" && break
29598done
29599
29600      CXX=$POTENTIAL_CXX
29601    fi
29602
29603    if test "x$CXX" = x; then
29604
29605  # Print a helpful message on how to acquire the necessary build dependency.
29606  # devkit is the help tag: freetype, cups, pulse, alsa etc
29607  MISSING_DEPENDENCY=devkit
29608
29609  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29610    cygwin_help $MISSING_DEPENDENCY
29611  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29612    msys_help $MISSING_DEPENDENCY
29613  else
29614    PKGHANDLER_COMMAND=
29615
29616    case $PKGHANDLER in
29617      apt-get)
29618        apt_help     $MISSING_DEPENDENCY ;;
29619      yum)
29620        yum_help     $MISSING_DEPENDENCY ;;
29621      port)
29622        port_help    $MISSING_DEPENDENCY ;;
29623      pkgutil)
29624        pkgutil_help $MISSING_DEPENDENCY ;;
29625      pkgadd)
29626        pkgadd_help  $MISSING_DEPENDENCY ;;
29627    esac
29628
29629    if test "x$PKGHANDLER_COMMAND" != x; then
29630      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29631    fi
29632  fi
29633
29634      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
29635    fi
29636  fi
29637
29638  # Now we have a compiler binary in CXX. Make sure it's okay.
29639
29640  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29641
29642  # First separate the path from the arguments. This will split at the first
29643  # space.
29644  complete="$CXX"
29645  path="${complete%% *}"
29646  tmp="$complete EOL"
29647  arguments="${tmp#* }"
29648
29649  # Input might be given as Windows format, start by converting to
29650  # unix format.
29651  new_path=`$CYGPATH -u "$path"`
29652
29653  # Now try to locate executable using which
29654  new_path=`$WHICH "$new_path" 2> /dev/null`
29655  # bat and cmd files are not always considered executable in cygwin causing which
29656  # to not find them
29657  if test "x$new_path" = x \
29658      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29659      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29660    new_path=`$CYGPATH -u "$path"`
29661  fi
29662  if test "x$new_path" = x; then
29663    # Oops. Which didn't find the executable.
29664    # The splitting of arguments from the executable at a space might have been incorrect,
29665    # since paths with space are more likely in Windows. Give it another try with the whole
29666    # argument.
29667    path="$complete"
29668    arguments="EOL"
29669    new_path=`$CYGPATH -u "$path"`
29670    new_path=`$WHICH "$new_path" 2> /dev/null`
29671    # bat and cmd files are not always considered executable in cygwin causing which
29672    # to not find them
29673    if test "x$new_path" = x \
29674        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
29675        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
29676      new_path=`$CYGPATH -u "$path"`
29677    fi
29678    if test "x$new_path" = x; then
29679      # It's still not found. Now this is an unrecoverable error.
29680      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29681$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29682      has_space=`$ECHO "$complete" | $GREP " "`
29683      if test "x$has_space" != x; then
29684        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29685$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29686      fi
29687      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29688    fi
29689  fi
29690
29691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29694  # "foo.exe" is OK but "foo" is an error.
29695  #
29696  # This test is therefore slightly more accurate than "test -f" to check for file presence.
29697  # It is also a way to make sure we got the proper file name for the real test later on.
29698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29699  if test "x$test_shortpath" = x; then
29700    # Short path failed, file does not exist as specified.
29701    # Try adding .exe or .cmd
29702    if test -f "${new_path}.exe"; then
29703      input_to_shortpath="${new_path}.exe"
29704    elif test -f "${new_path}.cmd"; then
29705      input_to_shortpath="${new_path}.cmd"
29706    else
29707      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
29708$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
29709      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
29710$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
29711      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29712    fi
29713  else
29714    input_to_shortpath="$new_path"
29715  fi
29716
29717  # Call helper function which possibly converts this using DOS-style short mode.
29718  # If so, the updated path is stored in $new_path.
29719  new_path="$input_to_shortpath"
29720
29721  input_path="$input_to_shortpath"
29722  # Check if we need to convert this using DOS-style short mode. If the path
29723  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29724  # take no chances and rewrite it.
29725  # Note: m4 eats our [], so we need to use [ and ] instead.
29726  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29727  if test "x$has_forbidden_chars" != x; then
29728    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29729    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29730    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29731    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29732      # Going to short mode and back again did indeed matter. Since short mode is
29733      # case insensitive, let's make it lowercase to improve readability.
29734      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29735      # Now convert it back to Unix-stile (cygpath)
29736      input_path=`$CYGPATH -u "$shortmode_path"`
29737      new_path="$input_path"
29738    fi
29739  fi
29740
29741  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29742  if test "x$test_cygdrive_prefix" = x; then
29743    # As a simple fix, exclude /usr/bin since it's not a real path.
29744    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
29745      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29746      # a path prefixed by /cygdrive for fixpath to work.
29747      new_path="$CYGWIN_ROOT_PATH$input_path"
29748    fi
29749  fi
29750
29751  # remove trailing .exe if any
29752  new_path="${new_path/%.exe/}"
29753
29754  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29755
29756  # First separate the path from the arguments. This will split at the first
29757  # space.
29758  complete="$CXX"
29759  path="${complete%% *}"
29760  tmp="$complete EOL"
29761  arguments="${tmp#* }"
29762
29763  # Input might be given as Windows format, start by converting to
29764  # unix format.
29765  new_path="$path"
29766
29767  windows_path="$new_path"
29768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29769    unix_path=`$CYGPATH -u "$windows_path"`
29770    new_path="$unix_path"
29771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29773    new_path="$unix_path"
29774  fi
29775
29776
29777  # Now try to locate executable using which
29778  new_path=`$WHICH "$new_path" 2> /dev/null`
29779
29780  if test "x$new_path" = x; then
29781    # Oops. Which didn't find the executable.
29782    # The splitting of arguments from the executable at a space might have been incorrect,
29783    # since paths with space are more likely in Windows. Give it another try with the whole
29784    # argument.
29785    path="$complete"
29786    arguments="EOL"
29787    new_path="$path"
29788
29789  windows_path="$new_path"
29790  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29791    unix_path=`$CYGPATH -u "$windows_path"`
29792    new_path="$unix_path"
29793  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29794    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29795    new_path="$unix_path"
29796  fi
29797
29798
29799    new_path=`$WHICH "$new_path" 2> /dev/null`
29800
29801    if test "x$new_path" = x; then
29802      # It's still not found. Now this is an unrecoverable error.
29803      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29804$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29805      has_space=`$ECHO "$complete" | $GREP " "`
29806      if test "x$has_space" != x; then
29807        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
29808$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
29809      fi
29810      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29811    fi
29812  fi
29813
29814  # Now new_path has a complete unix path to the binary
29815  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
29816    # Keep paths in /bin as-is, but remove trailing .exe if any
29817    new_path="${new_path/%.exe/}"
29818    # Do not save /bin paths to all_fixpath_prefixes!
29819  else
29820    # Not in mixed or Windows style, start by that.
29821    new_path=`cmd //c echo $new_path`
29822
29823  input_path="$new_path"
29824  # Check if we need to convert this using DOS-style short mode. If the path
29825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29826  # take no chances and rewrite it.
29827  # Note: m4 eats our [], so we need to use [ and ] instead.
29828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29829  if test "x$has_forbidden_chars" != x; then
29830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29831    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29832  fi
29833
29834    # Output is in $new_path
29835
29836  windows_path="$new_path"
29837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29838    unix_path=`$CYGPATH -u "$windows_path"`
29839    new_path="$unix_path"
29840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29842    new_path="$unix_path"
29843  fi
29844
29845    # remove trailing .exe if any
29846    new_path="${new_path/%.exe/}"
29847
29848    # Save the first 10 bytes of this path to the storage, so fixpath can work.
29849    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29850  fi
29851
29852  else
29853    # We're on a posix platform. Hooray! :)
29854    # First separate the path from the arguments. This will split at the first
29855    # space.
29856    complete="$CXX"
29857    path="${complete%% *}"
29858    tmp="$complete EOL"
29859    arguments="${tmp#* }"
29860
29861    # Cannot rely on the command "which" here since it doesn't always work.
29862    is_absolute_path=`$ECHO "$path" | $GREP ^/`
29863    if test -z "$is_absolute_path"; then
29864      # Path to executable is not absolute. Find it.
29865      IFS_save="$IFS"
29866      IFS=:
29867      for p in $PATH; do
29868        if test -f "$p/$path" && test -x "$p/$path"; then
29869          new_path="$p/$path"
29870          break
29871        fi
29872      done
29873      IFS="$IFS_save"
29874    else
29875      # This is an absolute path, we can use it without further modifications.
29876      new_path="$path"
29877    fi
29878
29879    if test "x$new_path" = x; then
29880      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
29881$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
29882      has_space=`$ECHO "$complete" | $GREP " "`
29883      if test "x$has_space" != x; then
29884        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
29885$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
29886      fi
29887      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
29888    fi
29889  fi
29890
29891  # Now join together the path and the arguments once again
29892  if test "x$arguments" != xEOL; then
29893    new_complete="$new_path ${arguments% *}"
29894  else
29895    new_complete="$new_path"
29896  fi
29897
29898  if test "x$complete" != "x$new_complete"; then
29899    CXX="$new_complete"
29900    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
29901$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
29902  fi
29903
29904  TEST_COMPILER="$CXX"
29905  # Don't remove symbolic links on AIX because 'xlc_r' and 'xlC_r' may all be links
29906  # to 'xlc' but it is crucial that we invoke the compiler with the right name!
29907  if test "x$OPENJDK_BUILD_OS" != xaix; then
29908    # FIXME: This test should not be needed anymore; we don't do that for any platform.
29909    { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
29910$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
29911
29912  if test "x$OPENJDK_BUILD_OS" != xwindows; then
29913    # Follow a chain of symbolic links. Use readlink
29914    # where it exists, else fall back to horribly
29915    # complicated shell code.
29916    if test "x$READLINK_TESTED" != yes; then
29917      # On MacOSX there is a readlink tool with a different
29918      # purpose than the GNU readlink tool. Check the found readlink.
29919      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
29920      if test "x$ISGNU" = x; then
29921        # A readlink that we do not know how to use.
29922        # Are there other non-GNU readlinks out there?
29923        READLINK_TESTED=yes
29924        READLINK=
29925      fi
29926    fi
29927
29928    if test "x$READLINK" != x; then
29929      TEST_COMPILER=`$READLINK -f $TEST_COMPILER`
29930    else
29931      # Save the current directory for restoring afterwards
29932      STARTDIR=$PWD
29933      COUNTER=0
29934      sym_link_dir=`$DIRNAME $TEST_COMPILER`
29935      sym_link_file=`$BASENAME $TEST_COMPILER`
29936      cd $sym_link_dir
29937      # Use -P flag to resolve symlinks in directories.
29938      cd `$THEPWDCMD -P`
29939      sym_link_dir=`$THEPWDCMD -P`
29940      # Resolve file symlinks
29941      while test $COUNTER -lt 20; do
29942        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
29943        if test "x$ISLINK" == x; then
29944          # This is not a symbolic link! We are done!
29945          break
29946        fi
29947        # Again resolve directory symlinks since the target of the just found
29948        # link could be in a different directory
29949        cd `$DIRNAME $ISLINK`
29950        sym_link_dir=`$THEPWDCMD -P`
29951        sym_link_file=`$BASENAME $ISLINK`
29952        let COUNTER=COUNTER+1
29953      done
29954      cd $STARTDIR
29955      TEST_COMPILER=$sym_link_dir/$sym_link_file
29956    fi
29957  fi
29958
29959    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_COMPILER" >&5
29960$as_echo "$TEST_COMPILER" >&6; }
29961  fi
29962  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if CXX is disguised ccache" >&5
29963$as_echo_n "checking if CXX is disguised ccache... " >&6; }
29964
29965  COMPILER_BASENAME=`$BASENAME "$TEST_COMPILER"`
29966  if test "x$COMPILER_BASENAME" = "xccache"; then
29967    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, trying to find proper $COMPILER_NAME compiler" >&5
29968$as_echo "yes, trying to find proper $COMPILER_NAME compiler" >&6; }
29969    # We /usr/lib/ccache in the path, so cc is a symlink to /usr/bin/ccache.
29970    # We want to control ccache invocation ourselves, so ignore this cc and try
29971    # searching again.
29972
29973    # Remove the path to the fake ccache cc from the PATH
29974    RETRY_COMPILER_SAVED_PATH="$PATH"
29975    COMPILER_DIRNAME=`$DIRNAME $CXX`
29976    PATH="`$ECHO $PATH | $SED -e "s,$COMPILER_DIRNAME,,g" -e "s,::,:,g" -e "s,^:,,g"`"
29977
29978    # Try again looking for our compiler
29979    if test -n "$ac_tool_prefix"; then
29980  for ac_prog in $TOOLCHAIN_CXX_BINARY
29981  do
29982    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
29983set dummy $ac_tool_prefix$ac_prog; ac_word=$2
29984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29985$as_echo_n "checking for $ac_word... " >&6; }
29986if ${ac_cv_prog_PROPER_COMPILER_CXX+:} false; then :
29987  $as_echo_n "(cached) " >&6
29988else
29989  if test -n "$PROPER_COMPILER_CXX"; then
29990  ac_cv_prog_PROPER_COMPILER_CXX="$PROPER_COMPILER_CXX" # Let the user override the test.
29991else
29992as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29993for as_dir in $PATH
29994do
29995  IFS=$as_save_IFS
29996  test -z "$as_dir" && as_dir=.
29997    for ac_exec_ext in '' $ac_executable_extensions; do
29998  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29999    ac_cv_prog_PROPER_COMPILER_CXX="$ac_tool_prefix$ac_prog"
30000    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30001    break 2
30002  fi
30003done
30004  done
30005IFS=$as_save_IFS
30006
30007fi
30008fi
30009PROPER_COMPILER_CXX=$ac_cv_prog_PROPER_COMPILER_CXX
30010if test -n "$PROPER_COMPILER_CXX"; then
30011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30012$as_echo "$PROPER_COMPILER_CXX" >&6; }
30013else
30014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30015$as_echo "no" >&6; }
30016fi
30017
30018
30019    test -n "$PROPER_COMPILER_CXX" && break
30020  done
30021fi
30022if test -z "$PROPER_COMPILER_CXX"; then
30023  ac_ct_PROPER_COMPILER_CXX=$PROPER_COMPILER_CXX
30024  for ac_prog in $TOOLCHAIN_CXX_BINARY
30025do
30026  # Extract the first word of "$ac_prog", so it can be a program name with args.
30027set dummy $ac_prog; ac_word=$2
30028{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30029$as_echo_n "checking for $ac_word... " >&6; }
30030if ${ac_cv_prog_ac_ct_PROPER_COMPILER_CXX+:} false; then :
30031  $as_echo_n "(cached) " >&6
30032else
30033  if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30034  ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_ct_PROPER_COMPILER_CXX" # Let the user override the test.
30035else
30036as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30037for as_dir in $PATH
30038do
30039  IFS=$as_save_IFS
30040  test -z "$as_dir" && as_dir=.
30041    for ac_exec_ext in '' $ac_executable_extensions; do
30042  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30043    ac_cv_prog_ac_ct_PROPER_COMPILER_CXX="$ac_prog"
30044    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30045    break 2
30046  fi
30047done
30048  done
30049IFS=$as_save_IFS
30050
30051fi
30052fi
30053ac_ct_PROPER_COMPILER_CXX=$ac_cv_prog_ac_ct_PROPER_COMPILER_CXX
30054if test -n "$ac_ct_PROPER_COMPILER_CXX"; then
30055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_PROPER_COMPILER_CXX" >&5
30056$as_echo "$ac_ct_PROPER_COMPILER_CXX" >&6; }
30057else
30058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30059$as_echo "no" >&6; }
30060fi
30061
30062
30063  test -n "$ac_ct_PROPER_COMPILER_CXX" && break
30064done
30065
30066  if test "x$ac_ct_PROPER_COMPILER_CXX" = x; then
30067    PROPER_COMPILER_CXX=""
30068  else
30069    case $cross_compiling:$ac_tool_warned in
30070yes:)
30071{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30072$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30073ac_tool_warned=yes ;;
30074esac
30075    PROPER_COMPILER_CXX=$ac_ct_PROPER_COMPILER_CXX
30076  fi
30077fi
30078
30079
30080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30081
30082  # First separate the path from the arguments. This will split at the first
30083  # space.
30084  complete="$PROPER_COMPILER_CXX"
30085  path="${complete%% *}"
30086  tmp="$complete EOL"
30087  arguments="${tmp#* }"
30088
30089  # Input might be given as Windows format, start by converting to
30090  # unix format.
30091  new_path=`$CYGPATH -u "$path"`
30092
30093  # Now try to locate executable using which
30094  new_path=`$WHICH "$new_path" 2> /dev/null`
30095  # bat and cmd files are not always considered executable in cygwin causing which
30096  # to not find them
30097  if test "x$new_path" = x \
30098      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30099      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30100    new_path=`$CYGPATH -u "$path"`
30101  fi
30102  if test "x$new_path" = x; then
30103    # Oops. Which didn't find the executable.
30104    # The splitting of arguments from the executable at a space might have been incorrect,
30105    # since paths with space are more likely in Windows. Give it another try with the whole
30106    # argument.
30107    path="$complete"
30108    arguments="EOL"
30109    new_path=`$CYGPATH -u "$path"`
30110    new_path=`$WHICH "$new_path" 2> /dev/null`
30111    # bat and cmd files are not always considered executable in cygwin causing which
30112    # to not find them
30113    if test "x$new_path" = x \
30114        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30115        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30116      new_path=`$CYGPATH -u "$path"`
30117    fi
30118    if test "x$new_path" = x; then
30119      # It's still not found. Now this is an unrecoverable error.
30120      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30121$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30122      has_space=`$ECHO "$complete" | $GREP " "`
30123      if test "x$has_space" != x; then
30124        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30125$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30126      fi
30127      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30128    fi
30129  fi
30130
30131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30134  # "foo.exe" is OK but "foo" is an error.
30135  #
30136  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30137  # It is also a way to make sure we got the proper file name for the real test later on.
30138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30139  if test "x$test_shortpath" = x; then
30140    # Short path failed, file does not exist as specified.
30141    # Try adding .exe or .cmd
30142    if test -f "${new_path}.exe"; then
30143      input_to_shortpath="${new_path}.exe"
30144    elif test -f "${new_path}.cmd"; then
30145      input_to_shortpath="${new_path}.cmd"
30146    else
30147      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&5
30148$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$new_path\", is invalid." >&6;}
30149      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30150$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30151      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30152    fi
30153  else
30154    input_to_shortpath="$new_path"
30155  fi
30156
30157  # Call helper function which possibly converts this using DOS-style short mode.
30158  # If so, the updated path is stored in $new_path.
30159  new_path="$input_to_shortpath"
30160
30161  input_path="$input_to_shortpath"
30162  # Check if we need to convert this using DOS-style short mode. If the path
30163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30164  # take no chances and rewrite it.
30165  # Note: m4 eats our [], so we need to use [ and ] instead.
30166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30167  if test "x$has_forbidden_chars" != x; then
30168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30169    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30170    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30171    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30172      # Going to short mode and back again did indeed matter. Since short mode is
30173      # case insensitive, let's make it lowercase to improve readability.
30174      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30175      # Now convert it back to Unix-stile (cygpath)
30176      input_path=`$CYGPATH -u "$shortmode_path"`
30177      new_path="$input_path"
30178    fi
30179  fi
30180
30181  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30182  if test "x$test_cygdrive_prefix" = x; then
30183    # As a simple fix, exclude /usr/bin since it's not a real path.
30184    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
30185      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30186      # a path prefixed by /cygdrive for fixpath to work.
30187      new_path="$CYGWIN_ROOT_PATH$input_path"
30188    fi
30189  fi
30190
30191  # remove trailing .exe if any
30192  new_path="${new_path/%.exe/}"
30193
30194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30195
30196  # First separate the path from the arguments. This will split at the first
30197  # space.
30198  complete="$PROPER_COMPILER_CXX"
30199  path="${complete%% *}"
30200  tmp="$complete EOL"
30201  arguments="${tmp#* }"
30202
30203  # Input might be given as Windows format, start by converting to
30204  # unix format.
30205  new_path="$path"
30206
30207  windows_path="$new_path"
30208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30209    unix_path=`$CYGPATH -u "$windows_path"`
30210    new_path="$unix_path"
30211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30213    new_path="$unix_path"
30214  fi
30215
30216
30217  # Now try to locate executable using which
30218  new_path=`$WHICH "$new_path" 2> /dev/null`
30219
30220  if test "x$new_path" = x; then
30221    # Oops. Which didn't find the executable.
30222    # The splitting of arguments from the executable at a space might have been incorrect,
30223    # since paths with space are more likely in Windows. Give it another try with the whole
30224    # argument.
30225    path="$complete"
30226    arguments="EOL"
30227    new_path="$path"
30228
30229  windows_path="$new_path"
30230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30231    unix_path=`$CYGPATH -u "$windows_path"`
30232    new_path="$unix_path"
30233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30235    new_path="$unix_path"
30236  fi
30237
30238
30239    new_path=`$WHICH "$new_path" 2> /dev/null`
30240
30241    if test "x$new_path" = x; then
30242      # It's still not found. Now this is an unrecoverable error.
30243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30244$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30245      has_space=`$ECHO "$complete" | $GREP " "`
30246      if test "x$has_space" != x; then
30247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30249      fi
30250      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30251    fi
30252  fi
30253
30254  # Now new_path has a complete unix path to the binary
30255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
30256    # Keep paths in /bin as-is, but remove trailing .exe if any
30257    new_path="${new_path/%.exe/}"
30258    # Do not save /bin paths to all_fixpath_prefixes!
30259  else
30260    # Not in mixed or Windows style, start by that.
30261    new_path=`cmd //c echo $new_path`
30262
30263  input_path="$new_path"
30264  # Check if we need to convert this using DOS-style short mode. If the path
30265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30266  # take no chances and rewrite it.
30267  # Note: m4 eats our [], so we need to use [ and ] instead.
30268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30269  if test "x$has_forbidden_chars" != x; then
30270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30272  fi
30273
30274    # Output is in $new_path
30275
30276  windows_path="$new_path"
30277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30278    unix_path=`$CYGPATH -u "$windows_path"`
30279    new_path="$unix_path"
30280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30282    new_path="$unix_path"
30283  fi
30284
30285    # remove trailing .exe if any
30286    new_path="${new_path/%.exe/}"
30287
30288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
30289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30290  fi
30291
30292  else
30293    # We're on a posix platform. Hooray! :)
30294    # First separate the path from the arguments. This will split at the first
30295    # space.
30296    complete="$PROPER_COMPILER_CXX"
30297    path="${complete%% *}"
30298    tmp="$complete EOL"
30299    arguments="${tmp#* }"
30300
30301    # Cannot rely on the command "which" here since it doesn't always work.
30302    is_absolute_path=`$ECHO "$path" | $GREP ^/`
30303    if test -z "$is_absolute_path"; then
30304      # Path to executable is not absolute. Find it.
30305      IFS_save="$IFS"
30306      IFS=:
30307      for p in $PATH; do
30308        if test -f "$p/$path" && test -x "$p/$path"; then
30309          new_path="$p/$path"
30310          break
30311        fi
30312      done
30313      IFS="$IFS_save"
30314    else
30315      # This is an absolute path, we can use it without further modifications.
30316      new_path="$path"
30317    fi
30318
30319    if test "x$new_path" = x; then
30320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&5
30321$as_echo "$as_me: The path of PROPER_COMPILER_CXX, which resolves as \"$complete\", is not found." >&6;}
30322      has_space=`$ECHO "$complete" | $GREP " "`
30323      if test "x$has_space" != x; then
30324        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
30325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
30326      fi
30327      as_fn_error $? "Cannot locate the the path of PROPER_COMPILER_CXX" "$LINENO" 5
30328    fi
30329  fi
30330
30331  # Now join together the path and the arguments once again
30332  if test "x$arguments" != xEOL; then
30333    new_complete="$new_path ${arguments% *}"
30334  else
30335    new_complete="$new_path"
30336  fi
30337
30338  if test "x$complete" != "x$new_complete"; then
30339    PROPER_COMPILER_CXX="$new_complete"
30340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&5
30341$as_echo "$as_me: Rewriting PROPER_COMPILER_CXX to \"$new_complete\"" >&6;}
30342  fi
30343
30344    PATH="$RETRY_COMPILER_SAVED_PATH"
30345
30346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for resolved symbolic links for CXX" >&5
30347$as_echo_n "checking for resolved symbolic links for CXX... " >&6; }
30348
30349  if test "x$OPENJDK_BUILD_OS" != xwindows; then
30350    # Follow a chain of symbolic links. Use readlink
30351    # where it exists, else fall back to horribly
30352    # complicated shell code.
30353    if test "x$READLINK_TESTED" != yes; then
30354      # On MacOSX there is a readlink tool with a different
30355      # purpose than the GNU readlink tool. Check the found readlink.
30356      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
30357      if test "x$ISGNU" = x; then
30358        # A readlink that we do not know how to use.
30359        # Are there other non-GNU readlinks out there?
30360        READLINK_TESTED=yes
30361        READLINK=
30362      fi
30363    fi
30364
30365    if test "x$READLINK" != x; then
30366      PROPER_COMPILER_CXX=`$READLINK -f $PROPER_COMPILER_CXX`
30367    else
30368      # Save the current directory for restoring afterwards
30369      STARTDIR=$PWD
30370      COUNTER=0
30371      sym_link_dir=`$DIRNAME $PROPER_COMPILER_CXX`
30372      sym_link_file=`$BASENAME $PROPER_COMPILER_CXX`
30373      cd $sym_link_dir
30374      # Use -P flag to resolve symlinks in directories.
30375      cd `$THEPWDCMD -P`
30376      sym_link_dir=`$THEPWDCMD -P`
30377      # Resolve file symlinks
30378      while test $COUNTER -lt 20; do
30379        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
30380        if test "x$ISLINK" == x; then
30381          # This is not a symbolic link! We are done!
30382          break
30383        fi
30384        # Again resolve directory symlinks since the target of the just found
30385        # link could be in a different directory
30386        cd `$DIRNAME $ISLINK`
30387        sym_link_dir=`$THEPWDCMD -P`
30388        sym_link_file=`$BASENAME $ISLINK`
30389        let COUNTER=COUNTER+1
30390      done
30391      cd $STARTDIR
30392      PROPER_COMPILER_CXX=$sym_link_dir/$sym_link_file
30393    fi
30394  fi
30395
30396    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROPER_COMPILER_CXX" >&5
30397$as_echo "$PROPER_COMPILER_CXX" >&6; }
30398    CXX="$PROPER_COMPILER_CXX"
30399  else
30400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, keeping CXX" >&5
30401$as_echo "no, keeping CXX" >&6; }
30402  fi
30403
30404
30405  COMPILER=$CXX
30406  COMPILER_NAME=$COMPILER_NAME
30407
30408  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30409    # cc -V output typically looks like
30410    #     cc: Sun C 5.12 Linux_i386 2011/11/16
30411    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
30412    # Check that this is likely to be the Solaris Studio cc.
30413    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
30414    if test $? -ne 0; then
30415      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30416      { $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
30417$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30418      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30419$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30420      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30421$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30422      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30423    fi
30424    # Remove usage instructions (if present), and
30425    # collapse compiler output into a single line
30426    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30427        $SED -e 's/ *[Uu]sage:.*//'`
30428    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30429        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
30430  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
30431    # xlc -qversion output typically looks like
30432    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
30433    #     Version: 11.01.0000.0015
30434    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
30435    # Check that this is likely to be the IBM XL C compiler.
30436    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
30437    if test $? -ne 0; then
30438      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30439      { $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
30440$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30441      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30442$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30443      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
30444$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
30445      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30446    fi
30447    # Collapse compiler output into a single line
30448    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30449    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30450        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
30451  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
30452    # There is no specific version flag, but all output starts with a version string.
30453    # First line typically looks something like:
30454    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
30455    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
30456    # Check that this is likely to be Microsoft CL.EXE.
30457    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
30458    if test $? -ne 0; then
30459      { $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
30460$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30461      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30462$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30463      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30464    fi
30465    # Collapse compiler output into a single line
30466    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30467    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30468        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
30469  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
30470    # gcc --version output typically looks like
30471    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
30472    #     Copyright (C) 2013 Free Software Foundation, Inc.
30473    #     This is free software; see the source for copying conditions.  There is NO
30474    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
30475    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30476    # Check that this is likely to be GCC.
30477    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
30478    if test $? -ne 0; then
30479      { $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
30480$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30481      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
30482$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
30483      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30484    fi
30485    # Remove Copyright and legalese from version string, and
30486    # collapse into a single line
30487    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
30488        $SED -e 's/ *Copyright .*//'`
30489    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30490        $SED -e 's/^.* \([1-9]\.[0-9.]*\) .*$/\1/'`
30491  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
30492    # clang --version output typically looks like
30493    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
30494    #    clang version 3.3 (tags/RELEASE_33/final)
30495    # or
30496    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
30497    #    Target: x86_64-pc-linux-gnu
30498    #    Thread model: posix
30499    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
30500    # Check that this is likely to be clang
30501    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
30502    if test $? -ne 0; then
30503      { $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
30504$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
30505      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
30506$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
30507      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
30508    fi
30509    # Collapse compiler output into a single line
30510    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
30511    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
30512        $SED -e 's/^.*clang version \([1-9][0-9.]*\).*$/\1/'`
30513  else
30514      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
30515  fi
30516  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
30517  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
30518  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
30519  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
30520
30521  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
30522$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
30523
30524
30525  # Now that we have resolved CXX ourself, let autoconf have its go at it
30526  ac_ext=cpp
30527ac_cpp='$CXXCPP $CPPFLAGS'
30528ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30529ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30530ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30531if test -z "$CXX"; then
30532  if test -n "$CCC"; then
30533    CXX=$CCC
30534  else
30535    if test -n "$ac_tool_prefix"; then
30536  for ac_prog in $CXX
30537  do
30538    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
30539set dummy $ac_tool_prefix$ac_prog; ac_word=$2
30540{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30541$as_echo_n "checking for $ac_word... " >&6; }
30542if ${ac_cv_prog_CXX+:} false; then :
30543  $as_echo_n "(cached) " >&6
30544else
30545  if test -n "$CXX"; then
30546  ac_cv_prog_CXX="$CXX" # Let the user override the test.
30547else
30548as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30549for as_dir in $PATH
30550do
30551  IFS=$as_save_IFS
30552  test -z "$as_dir" && as_dir=.
30553    for ac_exec_ext in '' $ac_executable_extensions; do
30554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30555    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
30556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30557    break 2
30558  fi
30559done
30560  done
30561IFS=$as_save_IFS
30562
30563fi
30564fi
30565CXX=$ac_cv_prog_CXX
30566if test -n "$CXX"; then
30567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
30568$as_echo "$CXX" >&6; }
30569else
30570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30571$as_echo "no" >&6; }
30572fi
30573
30574
30575    test -n "$CXX" && break
30576  done
30577fi
30578if test -z "$CXX"; then
30579  ac_ct_CXX=$CXX
30580  for ac_prog in $CXX
30581do
30582  # Extract the first word of "$ac_prog", so it can be a program name with args.
30583set dummy $ac_prog; ac_word=$2
30584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30585$as_echo_n "checking for $ac_word... " >&6; }
30586if ${ac_cv_prog_ac_ct_CXX+:} false; then :
30587  $as_echo_n "(cached) " >&6
30588else
30589  if test -n "$ac_ct_CXX"; then
30590  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
30591else
30592as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30593for as_dir in $PATH
30594do
30595  IFS=$as_save_IFS
30596  test -z "$as_dir" && as_dir=.
30597    for ac_exec_ext in '' $ac_executable_extensions; do
30598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30599    ac_cv_prog_ac_ct_CXX="$ac_prog"
30600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30601    break 2
30602  fi
30603done
30604  done
30605IFS=$as_save_IFS
30606
30607fi
30608fi
30609ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
30610if test -n "$ac_ct_CXX"; then
30611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
30612$as_echo "$ac_ct_CXX" >&6; }
30613else
30614  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30615$as_echo "no" >&6; }
30616fi
30617
30618
30619  test -n "$ac_ct_CXX" && break
30620done
30621
30622  if test "x$ac_ct_CXX" = x; then
30623    CXX="g++"
30624  else
30625    case $cross_compiling:$ac_tool_warned in
30626yes:)
30627{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
30628$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
30629ac_tool_warned=yes ;;
30630esac
30631    CXX=$ac_ct_CXX
30632  fi
30633fi
30634
30635  fi
30636fi
30637# Provide some information about the compiler.
30638$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
30639set X $ac_compile
30640ac_compiler=$2
30641for ac_option in --version -v -V -qversion; do
30642  { { ac_try="$ac_compiler $ac_option >&5"
30643case "(($ac_try" in
30644  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30645  *) ac_try_echo=$ac_try;;
30646esac
30647eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
30648$as_echo "$ac_try_echo"; } >&5
30649  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
30650  ac_status=$?
30651  if test -s conftest.err; then
30652    sed '10a\
30653... rest of stderr output deleted ...
30654         10q' conftest.err >conftest.er1
30655    cat conftest.er1 >&5
30656  fi
30657  rm -f conftest.er1 conftest.err
30658  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
30659  test $ac_status = 0; }
30660done
30661
30662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
30663$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
30664if ${ac_cv_cxx_compiler_gnu+:} false; then :
30665  $as_echo_n "(cached) " >&6
30666else
30667  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30668/* end confdefs.h.  */
30669
30670int
30671main ()
30672{
30673#ifndef __GNUC__
30674       choke me
30675#endif
30676
30677  ;
30678  return 0;
30679}
30680_ACEOF
30681if ac_fn_cxx_try_compile "$LINENO"; then :
30682  ac_compiler_gnu=yes
30683else
30684  ac_compiler_gnu=no
30685fi
30686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30687ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
30688
30689fi
30690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
30691$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
30692if test $ac_compiler_gnu = yes; then
30693  GXX=yes
30694else
30695  GXX=
30696fi
30697ac_test_CXXFLAGS=${CXXFLAGS+set}
30698ac_save_CXXFLAGS=$CXXFLAGS
30699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
30700$as_echo_n "checking whether $CXX accepts -g... " >&6; }
30701if ${ac_cv_prog_cxx_g+:} false; then :
30702  $as_echo_n "(cached) " >&6
30703else
30704  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
30705   ac_cxx_werror_flag=yes
30706   ac_cv_prog_cxx_g=no
30707   CXXFLAGS="-g"
30708   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30709/* end confdefs.h.  */
30710
30711int
30712main ()
30713{
30714
30715  ;
30716  return 0;
30717}
30718_ACEOF
30719if ac_fn_cxx_try_compile "$LINENO"; then :
30720  ac_cv_prog_cxx_g=yes
30721else
30722  CXXFLAGS=""
30723      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30724/* end confdefs.h.  */
30725
30726int
30727main ()
30728{
30729
30730  ;
30731  return 0;
30732}
30733_ACEOF
30734if ac_fn_cxx_try_compile "$LINENO"; then :
30735
30736else
30737  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30738	 CXXFLAGS="-g"
30739	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30740/* end confdefs.h.  */
30741
30742int
30743main ()
30744{
30745
30746  ;
30747  return 0;
30748}
30749_ACEOF
30750if ac_fn_cxx_try_compile "$LINENO"; then :
30751  ac_cv_prog_cxx_g=yes
30752fi
30753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30754fi
30755rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30756fi
30757rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30758   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
30759fi
30760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
30761$as_echo "$ac_cv_prog_cxx_g" >&6; }
30762if test "$ac_test_CXXFLAGS" = set; then
30763  CXXFLAGS=$ac_save_CXXFLAGS
30764elif test $ac_cv_prog_cxx_g = yes; then
30765  if test "$GXX" = yes; then
30766    CXXFLAGS="-g -O2"
30767  else
30768    CXXFLAGS="-g"
30769  fi
30770else
30771  if test "$GXX" = yes; then
30772    CXXFLAGS="-O2"
30773  else
30774    CXXFLAGS=
30775  fi
30776fi
30777ac_ext=cpp
30778ac_cpp='$CXXCPP $CPPFLAGS'
30779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30782
30783
30784  #
30785  # Setup the preprocessor (CPP and CXXCPP)
30786  #
30787  ac_ext=c
30788ac_cpp='$CPP $CPPFLAGS'
30789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30791ac_compiler_gnu=$ac_cv_c_compiler_gnu
30792{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
30793$as_echo_n "checking how to run the C preprocessor... " >&6; }
30794# On Suns, sometimes $CPP names a directory.
30795if test -n "$CPP" && test -d "$CPP"; then
30796  CPP=
30797fi
30798if test -z "$CPP"; then
30799  if ${ac_cv_prog_CPP+:} false; then :
30800  $as_echo_n "(cached) " >&6
30801else
30802      # Double quotes because CPP needs to be expanded
30803    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
30804    do
30805      ac_preproc_ok=false
30806for ac_c_preproc_warn_flag in '' yes
30807do
30808  # Use a header file that comes with gcc, so configuring glibc
30809  # with a fresh cross-compiler works.
30810  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30811  # <limits.h> exists even on freestanding compilers.
30812  # On the NeXT, cc -E runs the code through the compiler's parser,
30813  # not just through cpp. "Syntax error" is here to catch this case.
30814  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30815/* end confdefs.h.  */
30816#ifdef __STDC__
30817# include <limits.h>
30818#else
30819# include <assert.h>
30820#endif
30821		     Syntax error
30822_ACEOF
30823if ac_fn_c_try_cpp "$LINENO"; then :
30824
30825else
30826  # Broken: fails on valid input.
30827continue
30828fi
30829rm -f conftest.err conftest.i conftest.$ac_ext
30830
30831  # OK, works on sane cases.  Now check whether nonexistent headers
30832  # can be detected and how.
30833  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30834/* end confdefs.h.  */
30835#include <ac_nonexistent.h>
30836_ACEOF
30837if ac_fn_c_try_cpp "$LINENO"; then :
30838  # Broken: success on invalid input.
30839continue
30840else
30841  # Passes both tests.
30842ac_preproc_ok=:
30843break
30844fi
30845rm -f conftest.err conftest.i conftest.$ac_ext
30846
30847done
30848# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30849rm -f conftest.i conftest.err conftest.$ac_ext
30850if $ac_preproc_ok; then :
30851  break
30852fi
30853
30854    done
30855    ac_cv_prog_CPP=$CPP
30856
30857fi
30858  CPP=$ac_cv_prog_CPP
30859else
30860  ac_cv_prog_CPP=$CPP
30861fi
30862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
30863$as_echo "$CPP" >&6; }
30864ac_preproc_ok=false
30865for ac_c_preproc_warn_flag in '' yes
30866do
30867  # Use a header file that comes with gcc, so configuring glibc
30868  # with a fresh cross-compiler works.
30869  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
30870  # <limits.h> exists even on freestanding compilers.
30871  # On the NeXT, cc -E runs the code through the compiler's parser,
30872  # not just through cpp. "Syntax error" is here to catch this case.
30873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30874/* end confdefs.h.  */
30875#ifdef __STDC__
30876# include <limits.h>
30877#else
30878# include <assert.h>
30879#endif
30880		     Syntax error
30881_ACEOF
30882if ac_fn_c_try_cpp "$LINENO"; then :
30883
30884else
30885  # Broken: fails on valid input.
30886continue
30887fi
30888rm -f conftest.err conftest.i conftest.$ac_ext
30889
30890  # OK, works on sane cases.  Now check whether nonexistent headers
30891  # can be detected and how.
30892  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30893/* end confdefs.h.  */
30894#include <ac_nonexistent.h>
30895_ACEOF
30896if ac_fn_c_try_cpp "$LINENO"; then :
30897  # Broken: success on invalid input.
30898continue
30899else
30900  # Passes both tests.
30901ac_preproc_ok=:
30902break
30903fi
30904rm -f conftest.err conftest.i conftest.$ac_ext
30905
30906done
30907# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
30908rm -f conftest.i conftest.err conftest.$ac_ext
30909if $ac_preproc_ok; then :
30910
30911else
30912  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
30913$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
30914as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
30915See \`config.log' for more details" "$LINENO" 5; }
30916fi
30917
30918ac_ext=cpp
30919ac_cpp='$CXXCPP $CPPFLAGS'
30920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
30921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
30922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
30923
30924
30925  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30926
30927  # First separate the path from the arguments. This will split at the first
30928  # space.
30929  complete="$CPP"
30930  path="${complete%% *}"
30931  tmp="$complete EOL"
30932  arguments="${tmp#* }"
30933
30934  # Input might be given as Windows format, start by converting to
30935  # unix format.
30936  new_path=`$CYGPATH -u "$path"`
30937
30938  # Now try to locate executable using which
30939  new_path=`$WHICH "$new_path" 2> /dev/null`
30940  # bat and cmd files are not always considered executable in cygwin causing which
30941  # to not find them
30942  if test "x$new_path" = x \
30943      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30944      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30945    new_path=`$CYGPATH -u "$path"`
30946  fi
30947  if test "x$new_path" = x; then
30948    # Oops. Which didn't find the executable.
30949    # The splitting of arguments from the executable at a space might have been incorrect,
30950    # since paths with space are more likely in Windows. Give it another try with the whole
30951    # argument.
30952    path="$complete"
30953    arguments="EOL"
30954    new_path=`$CYGPATH -u "$path"`
30955    new_path=`$WHICH "$new_path" 2> /dev/null`
30956    # bat and cmd files are not always considered executable in cygwin causing which
30957    # to not find them
30958    if test "x$new_path" = x \
30959        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
30960        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
30961      new_path=`$CYGPATH -u "$path"`
30962    fi
30963    if test "x$new_path" = x; then
30964      # It's still not found. Now this is an unrecoverable error.
30965      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
30966$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
30967      has_space=`$ECHO "$complete" | $GREP " "`
30968      if test "x$has_space" != x; then
30969        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
30970$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
30971      fi
30972      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30973    fi
30974  fi
30975
30976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30979  # "foo.exe" is OK but "foo" is an error.
30980  #
30981  # This test is therefore slightly more accurate than "test -f" to check for file presence.
30982  # It is also a way to make sure we got the proper file name for the real test later on.
30983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30984  if test "x$test_shortpath" = x; then
30985    # Short path failed, file does not exist as specified.
30986    # Try adding .exe or .cmd
30987    if test -f "${new_path}.exe"; then
30988      input_to_shortpath="${new_path}.exe"
30989    elif test -f "${new_path}.cmd"; then
30990      input_to_shortpath="${new_path}.cmd"
30991    else
30992      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
30993$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
30994      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
30995$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
30996      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
30997    fi
30998  else
30999    input_to_shortpath="$new_path"
31000  fi
31001
31002  # Call helper function which possibly converts this using DOS-style short mode.
31003  # If so, the updated path is stored in $new_path.
31004  new_path="$input_to_shortpath"
31005
31006  input_path="$input_to_shortpath"
31007  # Check if we need to convert this using DOS-style short mode. If the path
31008  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31009  # take no chances and rewrite it.
31010  # Note: m4 eats our [], so we need to use [ and ] instead.
31011  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31012  if test "x$has_forbidden_chars" != x; then
31013    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31014    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31015    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31016    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31017      # Going to short mode and back again did indeed matter. Since short mode is
31018      # case insensitive, let's make it lowercase to improve readability.
31019      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31020      # Now convert it back to Unix-stile (cygpath)
31021      input_path=`$CYGPATH -u "$shortmode_path"`
31022      new_path="$input_path"
31023    fi
31024  fi
31025
31026  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31027  if test "x$test_cygdrive_prefix" = x; then
31028    # As a simple fix, exclude /usr/bin since it's not a real path.
31029    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31030      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31031      # a path prefixed by /cygdrive for fixpath to work.
31032      new_path="$CYGWIN_ROOT_PATH$input_path"
31033    fi
31034  fi
31035
31036  # remove trailing .exe if any
31037  new_path="${new_path/%.exe/}"
31038
31039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31040
31041  # First separate the path from the arguments. This will split at the first
31042  # space.
31043  complete="$CPP"
31044  path="${complete%% *}"
31045  tmp="$complete EOL"
31046  arguments="${tmp#* }"
31047
31048  # Input might be given as Windows format, start by converting to
31049  # unix format.
31050  new_path="$path"
31051
31052  windows_path="$new_path"
31053  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31054    unix_path=`$CYGPATH -u "$windows_path"`
31055    new_path="$unix_path"
31056  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31057    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31058    new_path="$unix_path"
31059  fi
31060
31061
31062  # Now try to locate executable using which
31063  new_path=`$WHICH "$new_path" 2> /dev/null`
31064
31065  if test "x$new_path" = x; then
31066    # Oops. Which didn't find the executable.
31067    # The splitting of arguments from the executable at a space might have been incorrect,
31068    # since paths with space are more likely in Windows. Give it another try with the whole
31069    # argument.
31070    path="$complete"
31071    arguments="EOL"
31072    new_path="$path"
31073
31074  windows_path="$new_path"
31075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31076    unix_path=`$CYGPATH -u "$windows_path"`
31077    new_path="$unix_path"
31078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31080    new_path="$unix_path"
31081  fi
31082
31083
31084    new_path=`$WHICH "$new_path" 2> /dev/null`
31085
31086    if test "x$new_path" = x; then
31087      # It's still not found. Now this is an unrecoverable error.
31088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31089$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31090      has_space=`$ECHO "$complete" | $GREP " "`
31091      if test "x$has_space" != x; then
31092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31094      fi
31095      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31096    fi
31097  fi
31098
31099  # Now new_path has a complete unix path to the binary
31100  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31101    # Keep paths in /bin as-is, but remove trailing .exe if any
31102    new_path="${new_path/%.exe/}"
31103    # Do not save /bin paths to all_fixpath_prefixes!
31104  else
31105    # Not in mixed or Windows style, start by that.
31106    new_path=`cmd //c echo $new_path`
31107
31108  input_path="$new_path"
31109  # Check if we need to convert this using DOS-style short mode. If the path
31110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31111  # take no chances and rewrite it.
31112  # Note: m4 eats our [], so we need to use [ and ] instead.
31113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31114  if test "x$has_forbidden_chars" != x; then
31115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31117  fi
31118
31119    # Output is in $new_path
31120
31121  windows_path="$new_path"
31122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31123    unix_path=`$CYGPATH -u "$windows_path"`
31124    new_path="$unix_path"
31125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31127    new_path="$unix_path"
31128  fi
31129
31130    # remove trailing .exe if any
31131    new_path="${new_path/%.exe/}"
31132
31133    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31134    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31135  fi
31136
31137  else
31138    # We're on a posix platform. Hooray! :)
31139    # First separate the path from the arguments. This will split at the first
31140    # space.
31141    complete="$CPP"
31142    path="${complete%% *}"
31143    tmp="$complete EOL"
31144    arguments="${tmp#* }"
31145
31146    # Cannot rely on the command "which" here since it doesn't always work.
31147    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31148    if test -z "$is_absolute_path"; then
31149      # Path to executable is not absolute. Find it.
31150      IFS_save="$IFS"
31151      IFS=:
31152      for p in $PATH; do
31153        if test -f "$p/$path" && test -x "$p/$path"; then
31154          new_path="$p/$path"
31155          break
31156        fi
31157      done
31158      IFS="$IFS_save"
31159    else
31160      # This is an absolute path, we can use it without further modifications.
31161      new_path="$path"
31162    fi
31163
31164    if test "x$new_path" = x; then
31165      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
31166$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
31167      has_space=`$ECHO "$complete" | $GREP " "`
31168      if test "x$has_space" != x; then
31169        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31170$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31171      fi
31172      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
31173    fi
31174  fi
31175
31176  # Now join together the path and the arguments once again
31177  if test "x$arguments" != xEOL; then
31178    new_complete="$new_path ${arguments% *}"
31179  else
31180    new_complete="$new_path"
31181  fi
31182
31183  if test "x$complete" != "x$new_complete"; then
31184    CPP="$new_complete"
31185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
31186$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
31187  fi
31188
31189  ac_ext=cpp
31190ac_cpp='$CXXCPP $CPPFLAGS'
31191ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31192ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31193ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
31195$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
31196if test -z "$CXXCPP"; then
31197  if ${ac_cv_prog_CXXCPP+:} false; then :
31198  $as_echo_n "(cached) " >&6
31199else
31200      # Double quotes because CXXCPP needs to be expanded
31201    for CXXCPP in "$CXX -E" "/lib/cpp"
31202    do
31203      ac_preproc_ok=false
31204for ac_cxx_preproc_warn_flag in '' yes
31205do
31206  # Use a header file that comes with gcc, so configuring glibc
31207  # with a fresh cross-compiler works.
31208  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31209  # <limits.h> exists even on freestanding compilers.
31210  # On the NeXT, cc -E runs the code through the compiler's parser,
31211  # not just through cpp. "Syntax error" is here to catch this case.
31212  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31213/* end confdefs.h.  */
31214#ifdef __STDC__
31215# include <limits.h>
31216#else
31217# include <assert.h>
31218#endif
31219		     Syntax error
31220_ACEOF
31221if ac_fn_cxx_try_cpp "$LINENO"; then :
31222
31223else
31224  # Broken: fails on valid input.
31225continue
31226fi
31227rm -f conftest.err conftest.i conftest.$ac_ext
31228
31229  # OK, works on sane cases.  Now check whether nonexistent headers
31230  # can be detected and how.
31231  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31232/* end confdefs.h.  */
31233#include <ac_nonexistent.h>
31234_ACEOF
31235if ac_fn_cxx_try_cpp "$LINENO"; then :
31236  # Broken: success on invalid input.
31237continue
31238else
31239  # Passes both tests.
31240ac_preproc_ok=:
31241break
31242fi
31243rm -f conftest.err conftest.i conftest.$ac_ext
31244
31245done
31246# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31247rm -f conftest.i conftest.err conftest.$ac_ext
31248if $ac_preproc_ok; then :
31249  break
31250fi
31251
31252    done
31253    ac_cv_prog_CXXCPP=$CXXCPP
31254
31255fi
31256  CXXCPP=$ac_cv_prog_CXXCPP
31257else
31258  ac_cv_prog_CXXCPP=$CXXCPP
31259fi
31260{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
31261$as_echo "$CXXCPP" >&6; }
31262ac_preproc_ok=false
31263for ac_cxx_preproc_warn_flag in '' yes
31264do
31265  # Use a header file that comes with gcc, so configuring glibc
31266  # with a fresh cross-compiler works.
31267  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
31268  # <limits.h> exists even on freestanding compilers.
31269  # On the NeXT, cc -E runs the code through the compiler's parser,
31270  # not just through cpp. "Syntax error" is here to catch this case.
31271  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31272/* end confdefs.h.  */
31273#ifdef __STDC__
31274# include <limits.h>
31275#else
31276# include <assert.h>
31277#endif
31278		     Syntax error
31279_ACEOF
31280if ac_fn_cxx_try_cpp "$LINENO"; then :
31281
31282else
31283  # Broken: fails on valid input.
31284continue
31285fi
31286rm -f conftest.err conftest.i conftest.$ac_ext
31287
31288  # OK, works on sane cases.  Now check whether nonexistent headers
31289  # can be detected and how.
31290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31291/* end confdefs.h.  */
31292#include <ac_nonexistent.h>
31293_ACEOF
31294if ac_fn_cxx_try_cpp "$LINENO"; then :
31295  # Broken: success on invalid input.
31296continue
31297else
31298  # Passes both tests.
31299ac_preproc_ok=:
31300break
31301fi
31302rm -f conftest.err conftest.i conftest.$ac_ext
31303
31304done
31305# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
31306rm -f conftest.i conftest.err conftest.$ac_ext
31307if $ac_preproc_ok; then :
31308
31309else
31310  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
31311$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
31312as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
31313See \`config.log' for more details" "$LINENO" 5; }
31314fi
31315
31316ac_ext=cpp
31317ac_cpp='$CXXCPP $CPPFLAGS'
31318ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31319ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31320ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31321
31322
31323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31324
31325  # First separate the path from the arguments. This will split at the first
31326  # space.
31327  complete="$CXXCPP"
31328  path="${complete%% *}"
31329  tmp="$complete EOL"
31330  arguments="${tmp#* }"
31331
31332  # Input might be given as Windows format, start by converting to
31333  # unix format.
31334  new_path=`$CYGPATH -u "$path"`
31335
31336  # Now try to locate executable using which
31337  new_path=`$WHICH "$new_path" 2> /dev/null`
31338  # bat and cmd files are not always considered executable in cygwin causing which
31339  # to not find them
31340  if test "x$new_path" = x \
31341      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31342      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31343    new_path=`$CYGPATH -u "$path"`
31344  fi
31345  if test "x$new_path" = x; then
31346    # Oops. Which didn't find the executable.
31347    # The splitting of arguments from the executable at a space might have been incorrect,
31348    # since paths with space are more likely in Windows. Give it another try with the whole
31349    # argument.
31350    path="$complete"
31351    arguments="EOL"
31352    new_path=`$CYGPATH -u "$path"`
31353    new_path=`$WHICH "$new_path" 2> /dev/null`
31354    # bat and cmd files are not always considered executable in cygwin causing which
31355    # to not find them
31356    if test "x$new_path" = x \
31357        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31358        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31359      new_path=`$CYGPATH -u "$path"`
31360    fi
31361    if test "x$new_path" = x; then
31362      # It's still not found. Now this is an unrecoverable error.
31363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31364$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31365      has_space=`$ECHO "$complete" | $GREP " "`
31366      if test "x$has_space" != x; then
31367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31369      fi
31370      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31371    fi
31372  fi
31373
31374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31377  # "foo.exe" is OK but "foo" is an error.
31378  #
31379  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31380  # It is also a way to make sure we got the proper file name for the real test later on.
31381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31382  if test "x$test_shortpath" = x; then
31383    # Short path failed, file does not exist as specified.
31384    # Try adding .exe or .cmd
31385    if test -f "${new_path}.exe"; then
31386      input_to_shortpath="${new_path}.exe"
31387    elif test -f "${new_path}.cmd"; then
31388      input_to_shortpath="${new_path}.cmd"
31389    else
31390      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
31391$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
31392      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31393$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31394      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31395    fi
31396  else
31397    input_to_shortpath="$new_path"
31398  fi
31399
31400  # Call helper function which possibly converts this using DOS-style short mode.
31401  # If so, the updated path is stored in $new_path.
31402  new_path="$input_to_shortpath"
31403
31404  input_path="$input_to_shortpath"
31405  # Check if we need to convert this using DOS-style short mode. If the path
31406  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31407  # take no chances and rewrite it.
31408  # Note: m4 eats our [], so we need to use [ and ] instead.
31409  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31410  if test "x$has_forbidden_chars" != x; then
31411    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31412    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31413    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31414    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31415      # Going to short mode and back again did indeed matter. Since short mode is
31416      # case insensitive, let's make it lowercase to improve readability.
31417      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31418      # Now convert it back to Unix-stile (cygpath)
31419      input_path=`$CYGPATH -u "$shortmode_path"`
31420      new_path="$input_path"
31421    fi
31422  fi
31423
31424  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31425  if test "x$test_cygdrive_prefix" = x; then
31426    # As a simple fix, exclude /usr/bin since it's not a real path.
31427    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31428      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31429      # a path prefixed by /cygdrive for fixpath to work.
31430      new_path="$CYGWIN_ROOT_PATH$input_path"
31431    fi
31432  fi
31433
31434  # remove trailing .exe if any
31435  new_path="${new_path/%.exe/}"
31436
31437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31438
31439  # First separate the path from the arguments. This will split at the first
31440  # space.
31441  complete="$CXXCPP"
31442  path="${complete%% *}"
31443  tmp="$complete EOL"
31444  arguments="${tmp#* }"
31445
31446  # Input might be given as Windows format, start by converting to
31447  # unix format.
31448  new_path="$path"
31449
31450  windows_path="$new_path"
31451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31452    unix_path=`$CYGPATH -u "$windows_path"`
31453    new_path="$unix_path"
31454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31456    new_path="$unix_path"
31457  fi
31458
31459
31460  # Now try to locate executable using which
31461  new_path=`$WHICH "$new_path" 2> /dev/null`
31462
31463  if test "x$new_path" = x; then
31464    # Oops. Which didn't find the executable.
31465    # The splitting of arguments from the executable at a space might have been incorrect,
31466    # since paths with space are more likely in Windows. Give it another try with the whole
31467    # argument.
31468    path="$complete"
31469    arguments="EOL"
31470    new_path="$path"
31471
31472  windows_path="$new_path"
31473  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31474    unix_path=`$CYGPATH -u "$windows_path"`
31475    new_path="$unix_path"
31476  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31477    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31478    new_path="$unix_path"
31479  fi
31480
31481
31482    new_path=`$WHICH "$new_path" 2> /dev/null`
31483
31484    if test "x$new_path" = x; then
31485      # It's still not found. Now this is an unrecoverable error.
31486      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31487$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31488      has_space=`$ECHO "$complete" | $GREP " "`
31489      if test "x$has_space" != x; then
31490        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31491$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31492      fi
31493      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31494    fi
31495  fi
31496
31497  # Now new_path has a complete unix path to the binary
31498  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31499    # Keep paths in /bin as-is, but remove trailing .exe if any
31500    new_path="${new_path/%.exe/}"
31501    # Do not save /bin paths to all_fixpath_prefixes!
31502  else
31503    # Not in mixed or Windows style, start by that.
31504    new_path=`cmd //c echo $new_path`
31505
31506  input_path="$new_path"
31507  # Check if we need to convert this using DOS-style short mode. If the path
31508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31509  # take no chances and rewrite it.
31510  # Note: m4 eats our [], so we need to use [ and ] instead.
31511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31512  if test "x$has_forbidden_chars" != x; then
31513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31515  fi
31516
31517    # Output is in $new_path
31518
31519  windows_path="$new_path"
31520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31521    unix_path=`$CYGPATH -u "$windows_path"`
31522    new_path="$unix_path"
31523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31525    new_path="$unix_path"
31526  fi
31527
31528    # remove trailing .exe if any
31529    new_path="${new_path/%.exe/}"
31530
31531    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31532    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31533  fi
31534
31535  else
31536    # We're on a posix platform. Hooray! :)
31537    # First separate the path from the arguments. This will split at the first
31538    # space.
31539    complete="$CXXCPP"
31540    path="${complete%% *}"
31541    tmp="$complete EOL"
31542    arguments="${tmp#* }"
31543
31544    # Cannot rely on the command "which" here since it doesn't always work.
31545    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31546    if test -z "$is_absolute_path"; then
31547      # Path to executable is not absolute. Find it.
31548      IFS_save="$IFS"
31549      IFS=:
31550      for p in $PATH; do
31551        if test -f "$p/$path" && test -x "$p/$path"; then
31552          new_path="$p/$path"
31553          break
31554        fi
31555      done
31556      IFS="$IFS_save"
31557    else
31558      # This is an absolute path, we can use it without further modifications.
31559      new_path="$path"
31560    fi
31561
31562    if test "x$new_path" = x; then
31563      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
31564$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
31565      has_space=`$ECHO "$complete" | $GREP " "`
31566      if test "x$has_space" != x; then
31567        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31568$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31569      fi
31570      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
31571    fi
31572  fi
31573
31574  # Now join together the path and the arguments once again
31575  if test "x$arguments" != xEOL; then
31576    new_complete="$new_path ${arguments% *}"
31577  else
31578    new_complete="$new_path"
31579  fi
31580
31581  if test "x$complete" != "x$new_complete"; then
31582    CXXCPP="$new_complete"
31583    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
31584$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
31585  fi
31586
31587
31588  #
31589  # Setup the linker (LD)
31590  #
31591  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
31592    # In the Microsoft toolchain we have a separate LD command "link".
31593    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
31594    # a cygwin program for something completely different.
31595    # Extract the first word of "link", so it can be a program name with args.
31596set dummy link; ac_word=$2
31597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31598$as_echo_n "checking for $ac_word... " >&6; }
31599if ${ac_cv_prog_LD+:} false; then :
31600  $as_echo_n "(cached) " >&6
31601else
31602  if test -n "$LD"; then
31603  ac_cv_prog_LD="$LD" # Let the user override the test.
31604else
31605  ac_prog_rejected=no
31606as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31607for as_dir in $PATH
31608do
31609  IFS=$as_save_IFS
31610  test -z "$as_dir" && as_dir=.
31611    for ac_exec_ext in '' $ac_executable_extensions; do
31612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31613    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
31614       ac_prog_rejected=yes
31615       continue
31616     fi
31617    ac_cv_prog_LD="link"
31618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31619    break 2
31620  fi
31621done
31622  done
31623IFS=$as_save_IFS
31624
31625if test $ac_prog_rejected = yes; then
31626  # We found a bogon in the path, so make sure we never use it.
31627  set dummy $ac_cv_prog_LD
31628  shift
31629  if test $# != 0; then
31630    # We chose a different compiler from the bogus one.
31631    # However, it has the same basename, so the bogon will be chosen
31632    # first if we set LD to just the basename; use the full file name.
31633    shift
31634    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
31635  fi
31636fi
31637fi
31638fi
31639LD=$ac_cv_prog_LD
31640if test -n "$LD"; then
31641  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
31642$as_echo "$LD" >&6; }
31643else
31644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31645$as_echo "no" >&6; }
31646fi
31647
31648
31649
31650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31651
31652  # First separate the path from the arguments. This will split at the first
31653  # space.
31654  complete="$LD"
31655  path="${complete%% *}"
31656  tmp="$complete EOL"
31657  arguments="${tmp#* }"
31658
31659  # Input might be given as Windows format, start by converting to
31660  # unix format.
31661  new_path=`$CYGPATH -u "$path"`
31662
31663  # Now try to locate executable using which
31664  new_path=`$WHICH "$new_path" 2> /dev/null`
31665  # bat and cmd files are not always considered executable in cygwin causing which
31666  # to not find them
31667  if test "x$new_path" = x \
31668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31670    new_path=`$CYGPATH -u "$path"`
31671  fi
31672  if test "x$new_path" = x; then
31673    # Oops. Which didn't find the executable.
31674    # The splitting of arguments from the executable at a space might have been incorrect,
31675    # since paths with space are more likely in Windows. Give it another try with the whole
31676    # argument.
31677    path="$complete"
31678    arguments="EOL"
31679    new_path=`$CYGPATH -u "$path"`
31680    new_path=`$WHICH "$new_path" 2> /dev/null`
31681    # bat and cmd files are not always considered executable in cygwin causing which
31682    # to not find them
31683    if test "x$new_path" = x \
31684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31686      new_path=`$CYGPATH -u "$path"`
31687    fi
31688    if test "x$new_path" = x; then
31689      # It's still not found. Now this is an unrecoverable error.
31690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31691$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31692      has_space=`$ECHO "$complete" | $GREP " "`
31693      if test "x$has_space" != x; then
31694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31696      fi
31697      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31698    fi
31699  fi
31700
31701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31704  # "foo.exe" is OK but "foo" is an error.
31705  #
31706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31707  # It is also a way to make sure we got the proper file name for the real test later on.
31708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31709  if test "x$test_shortpath" = x; then
31710    # Short path failed, file does not exist as specified.
31711    # Try adding .exe or .cmd
31712    if test -f "${new_path}.exe"; then
31713      input_to_shortpath="${new_path}.exe"
31714    elif test -f "${new_path}.cmd"; then
31715      input_to_shortpath="${new_path}.cmd"
31716    else
31717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
31718$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
31719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31721      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31722    fi
31723  else
31724    input_to_shortpath="$new_path"
31725  fi
31726
31727  # Call helper function which possibly converts this using DOS-style short mode.
31728  # If so, the updated path is stored in $new_path.
31729  new_path="$input_to_shortpath"
31730
31731  input_path="$input_to_shortpath"
31732  # Check if we need to convert this using DOS-style short mode. If the path
31733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31734  # take no chances and rewrite it.
31735  # Note: m4 eats our [], so we need to use [ and ] instead.
31736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31737  if test "x$has_forbidden_chars" != x; then
31738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31742      # Going to short mode and back again did indeed matter. Since short mode is
31743      # case insensitive, let's make it lowercase to improve readability.
31744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31745      # Now convert it back to Unix-stile (cygpath)
31746      input_path=`$CYGPATH -u "$shortmode_path"`
31747      new_path="$input_path"
31748    fi
31749  fi
31750
31751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31752  if test "x$test_cygdrive_prefix" = x; then
31753    # As a simple fix, exclude /usr/bin since it's not a real path.
31754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31756      # a path prefixed by /cygdrive for fixpath to work.
31757      new_path="$CYGWIN_ROOT_PATH$input_path"
31758    fi
31759  fi
31760
31761  # remove trailing .exe if any
31762  new_path="${new_path/%.exe/}"
31763
31764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31765
31766  # First separate the path from the arguments. This will split at the first
31767  # space.
31768  complete="$LD"
31769  path="${complete%% *}"
31770  tmp="$complete EOL"
31771  arguments="${tmp#* }"
31772
31773  # Input might be given as Windows format, start by converting to
31774  # unix format.
31775  new_path="$path"
31776
31777  windows_path="$new_path"
31778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31779    unix_path=`$CYGPATH -u "$windows_path"`
31780    new_path="$unix_path"
31781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31783    new_path="$unix_path"
31784  fi
31785
31786
31787  # Now try to locate executable using which
31788  new_path=`$WHICH "$new_path" 2> /dev/null`
31789
31790  if test "x$new_path" = x; then
31791    # Oops. Which didn't find the executable.
31792    # The splitting of arguments from the executable at a space might have been incorrect,
31793    # since paths with space are more likely in Windows. Give it another try with the whole
31794    # argument.
31795    path="$complete"
31796    arguments="EOL"
31797    new_path="$path"
31798
31799  windows_path="$new_path"
31800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31801    unix_path=`$CYGPATH -u "$windows_path"`
31802    new_path="$unix_path"
31803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31805    new_path="$unix_path"
31806  fi
31807
31808
31809    new_path=`$WHICH "$new_path" 2> /dev/null`
31810
31811    if test "x$new_path" = x; then
31812      # It's still not found. Now this is an unrecoverable error.
31813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31814$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31815      has_space=`$ECHO "$complete" | $GREP " "`
31816      if test "x$has_space" != x; then
31817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31819      fi
31820      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31821    fi
31822  fi
31823
31824  # Now new_path has a complete unix path to the binary
31825  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31826    # Keep paths in /bin as-is, but remove trailing .exe if any
31827    new_path="${new_path/%.exe/}"
31828    # Do not save /bin paths to all_fixpath_prefixes!
31829  else
31830    # Not in mixed or Windows style, start by that.
31831    new_path=`cmd //c echo $new_path`
31832
31833  input_path="$new_path"
31834  # Check if we need to convert this using DOS-style short mode. If the path
31835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31836  # take no chances and rewrite it.
31837  # Note: m4 eats our [], so we need to use [ and ] instead.
31838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31839  if test "x$has_forbidden_chars" != x; then
31840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31842  fi
31843
31844    # Output is in $new_path
31845
31846  windows_path="$new_path"
31847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31848    unix_path=`$CYGPATH -u "$windows_path"`
31849    new_path="$unix_path"
31850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31852    new_path="$unix_path"
31853  fi
31854
31855    # remove trailing .exe if any
31856    new_path="${new_path/%.exe/}"
31857
31858    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31859    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31860  fi
31861
31862  else
31863    # We're on a posix platform. Hooray! :)
31864    # First separate the path from the arguments. This will split at the first
31865    # space.
31866    complete="$LD"
31867    path="${complete%% *}"
31868    tmp="$complete EOL"
31869    arguments="${tmp#* }"
31870
31871    # Cannot rely on the command "which" here since it doesn't always work.
31872    is_absolute_path=`$ECHO "$path" | $GREP ^/`
31873    if test -z "$is_absolute_path"; then
31874      # Path to executable is not absolute. Find it.
31875      IFS_save="$IFS"
31876      IFS=:
31877      for p in $PATH; do
31878        if test -f "$p/$path" && test -x "$p/$path"; then
31879          new_path="$p/$path"
31880          break
31881        fi
31882      done
31883      IFS="$IFS_save"
31884    else
31885      # This is an absolute path, we can use it without further modifications.
31886      new_path="$path"
31887    fi
31888
31889    if test "x$new_path" = x; then
31890      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
31891$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
31892      has_space=`$ECHO "$complete" | $GREP " "`
31893      if test "x$has_space" != x; then
31894        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
31895$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
31896      fi
31897      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
31898    fi
31899  fi
31900
31901  # Now join together the path and the arguments once again
31902  if test "x$arguments" != xEOL; then
31903    new_complete="$new_path ${arguments% *}"
31904  else
31905    new_complete="$new_path"
31906  fi
31907
31908  if test "x$complete" != "x$new_complete"; then
31909    LD="$new_complete"
31910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
31911$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
31912  fi
31913
31914    # Verify that we indeed succeeded with this trick.
31915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
31916$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
31917    "$LD" --version > /dev/null
31918    if test $? -eq 0 ; then
31919      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31920$as_echo "no" >&6; }
31921      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
31922    else
31923      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31924$as_echo "yes" >&6; }
31925    fi
31926    LDCXX="$LD"
31927  else
31928    # All other toolchains use the compiler to link.
31929    LD="$CC"
31930    LDCXX="$CXX"
31931  fi
31932
31933  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
31934
31935
31936  #
31937  # Setup the assembler (AS)
31938  #
31939  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31940    # FIXME: should this really be solaris, or solstudio?
31941
31942
31943  # Publish this variable in the help.
31944
31945
31946  if test "x$AS" = x; then
31947    # The variable is not set by user, try to locate tool using the code snippet
31948    for ac_prog in as
31949do
31950  # Extract the first word of "$ac_prog", so it can be a program name with args.
31951set dummy $ac_prog; ac_word=$2
31952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31953$as_echo_n "checking for $ac_word... " >&6; }
31954if ${ac_cv_path_AS+:} false; then :
31955  $as_echo_n "(cached) " >&6
31956else
31957  case $AS in
31958  [\\/]* | ?:[\\/]*)
31959  ac_cv_path_AS="$AS" # Let the user override the test with a path.
31960  ;;
31961  *)
31962  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31963for as_dir in $PATH
31964do
31965  IFS=$as_save_IFS
31966  test -z "$as_dir" && as_dir=.
31967    for ac_exec_ext in '' $ac_executable_extensions; do
31968  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31969    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
31970    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31971    break 2
31972  fi
31973done
31974  done
31975IFS=$as_save_IFS
31976
31977  ;;
31978esac
31979fi
31980AS=$ac_cv_path_AS
31981if test -n "$AS"; then
31982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
31983$as_echo "$AS" >&6; }
31984else
31985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31986$as_echo "no" >&6; }
31987fi
31988
31989
31990  test -n "$AS" && break
31991done
31992
31993  else
31994    # The variable is set, but is it from the command line or the environment?
31995
31996    # Try to remove the string !AS! from our list.
31997    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
31998    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
31999      # If it failed, the variable was not from the command line. Ignore it,
32000      # but warn the user (except for BASH, which is always set by the calling BASH).
32001      if test "xAS" != xBASH; then
32002        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
32003$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
32004      fi
32005      # Try to locate tool using the code snippet
32006      for ac_prog in as
32007do
32008  # Extract the first word of "$ac_prog", so it can be a program name with args.
32009set dummy $ac_prog; ac_word=$2
32010{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32011$as_echo_n "checking for $ac_word... " >&6; }
32012if ${ac_cv_path_AS+:} false; then :
32013  $as_echo_n "(cached) " >&6
32014else
32015  case $AS in
32016  [\\/]* | ?:[\\/]*)
32017  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32018  ;;
32019  *)
32020  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32021for as_dir in $PATH
32022do
32023  IFS=$as_save_IFS
32024  test -z "$as_dir" && as_dir=.
32025    for ac_exec_ext in '' $ac_executable_extensions; do
32026  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32027    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32028    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32029    break 2
32030  fi
32031done
32032  done
32033IFS=$as_save_IFS
32034
32035  ;;
32036esac
32037fi
32038AS=$ac_cv_path_AS
32039if test -n "$AS"; then
32040  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32041$as_echo "$AS" >&6; }
32042else
32043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32044$as_echo "no" >&6; }
32045fi
32046
32047
32048  test -n "$AS" && break
32049done
32050
32051    else
32052      # If it succeeded, then it was overridden by the user. We will use it
32053      # for the tool.
32054
32055      # First remove it from the list of overridden variables, so we can test
32056      # for unknown variables in the end.
32057      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32058
32059      # Check if the provided tool contains a complete path.
32060      tool_specified="$AS"
32061      tool_basename="${tool_specified##*/}"
32062      if test "x$tool_basename" = "x$tool_specified"; then
32063        # A command without a complete path is provided, search $PATH.
32064        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
32065$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
32066        # Extract the first word of "$tool_basename", so it can be a program name with args.
32067set dummy $tool_basename; ac_word=$2
32068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32069$as_echo_n "checking for $ac_word... " >&6; }
32070if ${ac_cv_path_AS+:} false; then :
32071  $as_echo_n "(cached) " >&6
32072else
32073  case $AS in
32074  [\\/]* | ?:[\\/]*)
32075  ac_cv_path_AS="$AS" # Let the user override the test with a path.
32076  ;;
32077  *)
32078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32079for as_dir in $PATH
32080do
32081  IFS=$as_save_IFS
32082  test -z "$as_dir" && as_dir=.
32083    for ac_exec_ext in '' $ac_executable_extensions; do
32084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32085    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
32086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32087    break 2
32088  fi
32089done
32090  done
32091IFS=$as_save_IFS
32092
32093  ;;
32094esac
32095fi
32096AS=$ac_cv_path_AS
32097if test -n "$AS"; then
32098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
32099$as_echo "$AS" >&6; }
32100else
32101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32102$as_echo "no" >&6; }
32103fi
32104
32105
32106        if test "x$AS" = x; then
32107          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32108        fi
32109      else
32110        # Otherwise we believe it is a complete path. Use it as it is.
32111        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
32112$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
32113        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
32114$as_echo_n "checking for AS... " >&6; }
32115        if test ! -x "$tool_specified"; then
32116          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32117$as_echo "not found" >&6; }
32118          as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
32119        fi
32120        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32121$as_echo "$tool_specified" >&6; }
32122      fi
32123    fi
32124  fi
32125
32126
32127
32128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32129
32130  # First separate the path from the arguments. This will split at the first
32131  # space.
32132  complete="$AS"
32133  path="${complete%% *}"
32134  tmp="$complete EOL"
32135  arguments="${tmp#* }"
32136
32137  # Input might be given as Windows format, start by converting to
32138  # unix format.
32139  new_path=`$CYGPATH -u "$path"`
32140
32141  # Now try to locate executable using which
32142  new_path=`$WHICH "$new_path" 2> /dev/null`
32143  # bat and cmd files are not always considered executable in cygwin causing which
32144  # to not find them
32145  if test "x$new_path" = x \
32146      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32147      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32148    new_path=`$CYGPATH -u "$path"`
32149  fi
32150  if test "x$new_path" = x; then
32151    # Oops. Which didn't find the executable.
32152    # The splitting of arguments from the executable at a space might have been incorrect,
32153    # since paths with space are more likely in Windows. Give it another try with the whole
32154    # argument.
32155    path="$complete"
32156    arguments="EOL"
32157    new_path=`$CYGPATH -u "$path"`
32158    new_path=`$WHICH "$new_path" 2> /dev/null`
32159    # bat and cmd files are not always considered executable in cygwin causing which
32160    # to not find them
32161    if test "x$new_path" = x \
32162        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32163        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32164      new_path=`$CYGPATH -u "$path"`
32165    fi
32166    if test "x$new_path" = x; then
32167      # It's still not found. Now this is an unrecoverable error.
32168      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32169$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32170      has_space=`$ECHO "$complete" | $GREP " "`
32171      if test "x$has_space" != x; then
32172        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32173$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32174      fi
32175      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32176    fi
32177  fi
32178
32179  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32180  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32181  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32182  # "foo.exe" is OK but "foo" is an error.
32183  #
32184  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32185  # It is also a way to make sure we got the proper file name for the real test later on.
32186  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32187  if test "x$test_shortpath" = x; then
32188    # Short path failed, file does not exist as specified.
32189    # Try adding .exe or .cmd
32190    if test -f "${new_path}.exe"; then
32191      input_to_shortpath="${new_path}.exe"
32192    elif test -f "${new_path}.cmd"; then
32193      input_to_shortpath="${new_path}.cmd"
32194    else
32195      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
32196$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
32197      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32198$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32199      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32200    fi
32201  else
32202    input_to_shortpath="$new_path"
32203  fi
32204
32205  # Call helper function which possibly converts this using DOS-style short mode.
32206  # If so, the updated path is stored in $new_path.
32207  new_path="$input_to_shortpath"
32208
32209  input_path="$input_to_shortpath"
32210  # Check if we need to convert this using DOS-style short mode. If the path
32211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32212  # take no chances and rewrite it.
32213  # Note: m4 eats our [], so we need to use [ and ] instead.
32214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32215  if test "x$has_forbidden_chars" != x; then
32216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32220      # Going to short mode and back again did indeed matter. Since short mode is
32221      # case insensitive, let's make it lowercase to improve readability.
32222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32223      # Now convert it back to Unix-stile (cygpath)
32224      input_path=`$CYGPATH -u "$shortmode_path"`
32225      new_path="$input_path"
32226    fi
32227  fi
32228
32229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32230  if test "x$test_cygdrive_prefix" = x; then
32231    # As a simple fix, exclude /usr/bin since it's not a real path.
32232    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32234      # a path prefixed by /cygdrive for fixpath to work.
32235      new_path="$CYGWIN_ROOT_PATH$input_path"
32236    fi
32237  fi
32238
32239  # remove trailing .exe if any
32240  new_path="${new_path/%.exe/}"
32241
32242  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32243
32244  # First separate the path from the arguments. This will split at the first
32245  # space.
32246  complete="$AS"
32247  path="${complete%% *}"
32248  tmp="$complete EOL"
32249  arguments="${tmp#* }"
32250
32251  # Input might be given as Windows format, start by converting to
32252  # unix format.
32253  new_path="$path"
32254
32255  windows_path="$new_path"
32256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32257    unix_path=`$CYGPATH -u "$windows_path"`
32258    new_path="$unix_path"
32259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32261    new_path="$unix_path"
32262  fi
32263
32264
32265  # Now try to locate executable using which
32266  new_path=`$WHICH "$new_path" 2> /dev/null`
32267
32268  if test "x$new_path" = x; then
32269    # Oops. Which didn't find the executable.
32270    # The splitting of arguments from the executable at a space might have been incorrect,
32271    # since paths with space are more likely in Windows. Give it another try with the whole
32272    # argument.
32273    path="$complete"
32274    arguments="EOL"
32275    new_path="$path"
32276
32277  windows_path="$new_path"
32278  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32279    unix_path=`$CYGPATH -u "$windows_path"`
32280    new_path="$unix_path"
32281  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32282    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32283    new_path="$unix_path"
32284  fi
32285
32286
32287    new_path=`$WHICH "$new_path" 2> /dev/null`
32288
32289    if test "x$new_path" = x; then
32290      # It's still not found. Now this is an unrecoverable error.
32291      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32292$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32293      has_space=`$ECHO "$complete" | $GREP " "`
32294      if test "x$has_space" != x; then
32295        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32296$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32297      fi
32298      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32299    fi
32300  fi
32301
32302  # Now new_path has a complete unix path to the binary
32303  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32304    # Keep paths in /bin as-is, but remove trailing .exe if any
32305    new_path="${new_path/%.exe/}"
32306    # Do not save /bin paths to all_fixpath_prefixes!
32307  else
32308    # Not in mixed or Windows style, start by that.
32309    new_path=`cmd //c echo $new_path`
32310
32311  input_path="$new_path"
32312  # Check if we need to convert this using DOS-style short mode. If the path
32313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32314  # take no chances and rewrite it.
32315  # Note: m4 eats our [], so we need to use [ and ] instead.
32316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32317  if test "x$has_forbidden_chars" != x; then
32318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32319    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32320  fi
32321
32322    # Output is in $new_path
32323
32324  windows_path="$new_path"
32325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32326    unix_path=`$CYGPATH -u "$windows_path"`
32327    new_path="$unix_path"
32328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32330    new_path="$unix_path"
32331  fi
32332
32333    # remove trailing .exe if any
32334    new_path="${new_path/%.exe/}"
32335
32336    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32337    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32338  fi
32339
32340  else
32341    # We're on a posix platform. Hooray! :)
32342    # First separate the path from the arguments. This will split at the first
32343    # space.
32344    complete="$AS"
32345    path="${complete%% *}"
32346    tmp="$complete EOL"
32347    arguments="${tmp#* }"
32348
32349    # Cannot rely on the command "which" here since it doesn't always work.
32350    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32351    if test -z "$is_absolute_path"; then
32352      # Path to executable is not absolute. Find it.
32353      IFS_save="$IFS"
32354      IFS=:
32355      for p in $PATH; do
32356        if test -f "$p/$path" && test -x "$p/$path"; then
32357          new_path="$p/$path"
32358          break
32359        fi
32360      done
32361      IFS="$IFS_save"
32362    else
32363      # This is an absolute path, we can use it without further modifications.
32364      new_path="$path"
32365    fi
32366
32367    if test "x$new_path" = x; then
32368      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
32369$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
32370      has_space=`$ECHO "$complete" | $GREP " "`
32371      if test "x$has_space" != x; then
32372        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32373$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32374      fi
32375      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
32376    fi
32377  fi
32378
32379  # Now join together the path and the arguments once again
32380  if test "x$arguments" != xEOL; then
32381    new_complete="$new_path ${arguments% *}"
32382  else
32383    new_complete="$new_path"
32384  fi
32385
32386  if test "x$complete" != "x$new_complete"; then
32387    AS="$new_complete"
32388    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
32389$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
32390  fi
32391
32392  else
32393    # FIXME: is this correct for microsoft?
32394    AS="$CC -c"
32395  fi
32396
32397
32398  #
32399  # Setup the archiver (AR)
32400  #
32401  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
32402    # The corresponding ar tool is lib.exe (used to create static libraries)
32403    # Extract the first word of "lib", so it can be a program name with args.
32404set dummy lib; ac_word=$2
32405{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32406$as_echo_n "checking for $ac_word... " >&6; }
32407if ${ac_cv_prog_AR+:} false; then :
32408  $as_echo_n "(cached) " >&6
32409else
32410  if test -n "$AR"; then
32411  ac_cv_prog_AR="$AR" # Let the user override the test.
32412else
32413as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32414for as_dir in $PATH
32415do
32416  IFS=$as_save_IFS
32417  test -z "$as_dir" && as_dir=.
32418    for ac_exec_ext in '' $ac_executable_extensions; do
32419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32420    ac_cv_prog_AR="lib"
32421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32422    break 2
32423  fi
32424done
32425  done
32426IFS=$as_save_IFS
32427
32428fi
32429fi
32430AR=$ac_cv_prog_AR
32431if test -n "$AR"; then
32432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32433$as_echo "$AR" >&6; }
32434else
32435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32436$as_echo "no" >&6; }
32437fi
32438
32439
32440  else
32441
32442
32443  # Publish this variable in the help.
32444
32445
32446  if test "x$AR" = x; then
32447    # The variable is not set by user, try to locate tool using the code snippet
32448    if test -n "$ac_tool_prefix"; then
32449  for ac_prog in ar
32450  do
32451    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32452set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32454$as_echo_n "checking for $ac_word... " >&6; }
32455if ${ac_cv_prog_AR+:} false; then :
32456  $as_echo_n "(cached) " >&6
32457else
32458  if test -n "$AR"; then
32459  ac_cv_prog_AR="$AR" # Let the user override the test.
32460else
32461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32462for as_dir in $PATH
32463do
32464  IFS=$as_save_IFS
32465  test -z "$as_dir" && as_dir=.
32466    for ac_exec_ext in '' $ac_executable_extensions; do
32467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32468    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32470    break 2
32471  fi
32472done
32473  done
32474IFS=$as_save_IFS
32475
32476fi
32477fi
32478AR=$ac_cv_prog_AR
32479if test -n "$AR"; then
32480  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32481$as_echo "$AR" >&6; }
32482else
32483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32484$as_echo "no" >&6; }
32485fi
32486
32487
32488    test -n "$AR" && break
32489  done
32490fi
32491if test -z "$AR"; then
32492  ac_ct_AR=$AR
32493  for ac_prog in ar
32494do
32495  # Extract the first word of "$ac_prog", so it can be a program name with args.
32496set dummy $ac_prog; ac_word=$2
32497{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32498$as_echo_n "checking for $ac_word... " >&6; }
32499if ${ac_cv_prog_ac_ct_AR+:} false; then :
32500  $as_echo_n "(cached) " >&6
32501else
32502  if test -n "$ac_ct_AR"; then
32503  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32504else
32505as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32506for as_dir in $PATH
32507do
32508  IFS=$as_save_IFS
32509  test -z "$as_dir" && as_dir=.
32510    for ac_exec_ext in '' $ac_executable_extensions; do
32511  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32512    ac_cv_prog_ac_ct_AR="$ac_prog"
32513    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32514    break 2
32515  fi
32516done
32517  done
32518IFS=$as_save_IFS
32519
32520fi
32521fi
32522ac_ct_AR=$ac_cv_prog_ac_ct_AR
32523if test -n "$ac_ct_AR"; then
32524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32525$as_echo "$ac_ct_AR" >&6; }
32526else
32527  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32528$as_echo "no" >&6; }
32529fi
32530
32531
32532  test -n "$ac_ct_AR" && break
32533done
32534
32535  if test "x$ac_ct_AR" = x; then
32536    AR=""
32537  else
32538    case $cross_compiling:$ac_tool_warned in
32539yes:)
32540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32542ac_tool_warned=yes ;;
32543esac
32544    AR=$ac_ct_AR
32545  fi
32546fi
32547
32548  else
32549    # The variable is set, but is it from the command line or the environment?
32550
32551    # Try to remove the string !AR! from our list.
32552    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
32553    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
32554      # If it failed, the variable was not from the command line. Ignore it,
32555      # but warn the user (except for BASH, which is always set by the calling BASH).
32556      if test "xAR" != xBASH; then
32557        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
32558$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
32559      fi
32560      # Try to locate tool using the code snippet
32561      if test -n "$ac_tool_prefix"; then
32562  for ac_prog in ar
32563  do
32564    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
32565set dummy $ac_tool_prefix$ac_prog; ac_word=$2
32566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32567$as_echo_n "checking for $ac_word... " >&6; }
32568if ${ac_cv_prog_AR+:} false; then :
32569  $as_echo_n "(cached) " >&6
32570else
32571  if test -n "$AR"; then
32572  ac_cv_prog_AR="$AR" # Let the user override the test.
32573else
32574as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32575for as_dir in $PATH
32576do
32577  IFS=$as_save_IFS
32578  test -z "$as_dir" && as_dir=.
32579    for ac_exec_ext in '' $ac_executable_extensions; do
32580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32581    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
32582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32583    break 2
32584  fi
32585done
32586  done
32587IFS=$as_save_IFS
32588
32589fi
32590fi
32591AR=$ac_cv_prog_AR
32592if test -n "$AR"; then
32593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32594$as_echo "$AR" >&6; }
32595else
32596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32597$as_echo "no" >&6; }
32598fi
32599
32600
32601    test -n "$AR" && break
32602  done
32603fi
32604if test -z "$AR"; then
32605  ac_ct_AR=$AR
32606  for ac_prog in ar
32607do
32608  # Extract the first word of "$ac_prog", so it can be a program name with args.
32609set dummy $ac_prog; ac_word=$2
32610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32611$as_echo_n "checking for $ac_word... " >&6; }
32612if ${ac_cv_prog_ac_ct_AR+:} false; then :
32613  $as_echo_n "(cached) " >&6
32614else
32615  if test -n "$ac_ct_AR"; then
32616  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32617else
32618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32619for as_dir in $PATH
32620do
32621  IFS=$as_save_IFS
32622  test -z "$as_dir" && as_dir=.
32623    for ac_exec_ext in '' $ac_executable_extensions; do
32624  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32625    ac_cv_prog_ac_ct_AR="$ac_prog"
32626    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32627    break 2
32628  fi
32629done
32630  done
32631IFS=$as_save_IFS
32632
32633fi
32634fi
32635ac_ct_AR=$ac_cv_prog_ac_ct_AR
32636if test -n "$ac_ct_AR"; then
32637  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32638$as_echo "$ac_ct_AR" >&6; }
32639else
32640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32641$as_echo "no" >&6; }
32642fi
32643
32644
32645  test -n "$ac_ct_AR" && break
32646done
32647
32648  if test "x$ac_ct_AR" = x; then
32649    AR=""
32650  else
32651    case $cross_compiling:$ac_tool_warned in
32652yes:)
32653{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32654$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32655ac_tool_warned=yes ;;
32656esac
32657    AR=$ac_ct_AR
32658  fi
32659fi
32660
32661    else
32662      # If it succeeded, then it was overridden by the user. We will use it
32663      # for the tool.
32664
32665      # First remove it from the list of overridden variables, so we can test
32666      # for unknown variables in the end.
32667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
32668
32669      # Check if the provided tool contains a complete path.
32670      tool_specified="$AR"
32671      tool_basename="${tool_specified##*/}"
32672      if test "x$tool_basename" = "x$tool_specified"; then
32673        # A command without a complete path is provided, search $PATH.
32674        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
32675$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
32676        # Extract the first word of "$tool_basename", so it can be a program name with args.
32677set dummy $tool_basename; ac_word=$2
32678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32679$as_echo_n "checking for $ac_word... " >&6; }
32680if ${ac_cv_path_AR+:} false; then :
32681  $as_echo_n "(cached) " >&6
32682else
32683  case $AR in
32684  [\\/]* | ?:[\\/]*)
32685  ac_cv_path_AR="$AR" # Let the user override the test with a path.
32686  ;;
32687  *)
32688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32689for as_dir in $PATH
32690do
32691  IFS=$as_save_IFS
32692  test -z "$as_dir" && as_dir=.
32693    for ac_exec_ext in '' $ac_executable_extensions; do
32694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32695    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
32696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32697    break 2
32698  fi
32699done
32700  done
32701IFS=$as_save_IFS
32702
32703  ;;
32704esac
32705fi
32706AR=$ac_cv_path_AR
32707if test -n "$AR"; then
32708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32709$as_echo "$AR" >&6; }
32710else
32711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32712$as_echo "no" >&6; }
32713fi
32714
32715
32716        if test "x$AR" = x; then
32717          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
32718        fi
32719      else
32720        # Otherwise we believe it is a complete path. Use it as it is.
32721        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
32722$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
32723        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
32724$as_echo_n "checking for AR... " >&6; }
32725        if test ! -x "$tool_specified"; then
32726          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32727$as_echo "not found" >&6; }
32728          as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
32729        fi
32730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
32731$as_echo "$tool_specified" >&6; }
32732      fi
32733    fi
32734  fi
32735
32736
32737  fi
32738
32739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32740
32741  # First separate the path from the arguments. This will split at the first
32742  # space.
32743  complete="$AR"
32744  path="${complete%% *}"
32745  tmp="$complete EOL"
32746  arguments="${tmp#* }"
32747
32748  # Input might be given as Windows format, start by converting to
32749  # unix format.
32750  new_path=`$CYGPATH -u "$path"`
32751
32752  # Now try to locate executable using which
32753  new_path=`$WHICH "$new_path" 2> /dev/null`
32754  # bat and cmd files are not always considered executable in cygwin causing which
32755  # to not find them
32756  if test "x$new_path" = x \
32757      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32758      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32759    new_path=`$CYGPATH -u "$path"`
32760  fi
32761  if test "x$new_path" = x; then
32762    # Oops. Which didn't find the executable.
32763    # The splitting of arguments from the executable at a space might have been incorrect,
32764    # since paths with space are more likely in Windows. Give it another try with the whole
32765    # argument.
32766    path="$complete"
32767    arguments="EOL"
32768    new_path=`$CYGPATH -u "$path"`
32769    new_path=`$WHICH "$new_path" 2> /dev/null`
32770    # bat and cmd files are not always considered executable in cygwin causing which
32771    # to not find them
32772    if test "x$new_path" = x \
32773        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32774        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32775      new_path=`$CYGPATH -u "$path"`
32776    fi
32777    if test "x$new_path" = x; then
32778      # It's still not found. Now this is an unrecoverable error.
32779      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32780$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32781      has_space=`$ECHO "$complete" | $GREP " "`
32782      if test "x$has_space" != x; then
32783        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32784$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32785      fi
32786      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32787    fi
32788  fi
32789
32790  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32791  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32792  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32793  # "foo.exe" is OK but "foo" is an error.
32794  #
32795  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32796  # It is also a way to make sure we got the proper file name for the real test later on.
32797  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32798  if test "x$test_shortpath" = x; then
32799    # Short path failed, file does not exist as specified.
32800    # Try adding .exe or .cmd
32801    if test -f "${new_path}.exe"; then
32802      input_to_shortpath="${new_path}.exe"
32803    elif test -f "${new_path}.cmd"; then
32804      input_to_shortpath="${new_path}.cmd"
32805    else
32806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
32807$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
32808      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32809$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32810      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32811    fi
32812  else
32813    input_to_shortpath="$new_path"
32814  fi
32815
32816  # Call helper function which possibly converts this using DOS-style short mode.
32817  # If so, the updated path is stored in $new_path.
32818  new_path="$input_to_shortpath"
32819
32820  input_path="$input_to_shortpath"
32821  # Check if we need to convert this using DOS-style short mode. If the path
32822  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32823  # take no chances and rewrite it.
32824  # Note: m4 eats our [], so we need to use [ and ] instead.
32825  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32826  if test "x$has_forbidden_chars" != x; then
32827    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32828    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32829    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32830    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32831      # Going to short mode and back again did indeed matter. Since short mode is
32832      # case insensitive, let's make it lowercase to improve readability.
32833      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32834      # Now convert it back to Unix-stile (cygpath)
32835      input_path=`$CYGPATH -u "$shortmode_path"`
32836      new_path="$input_path"
32837    fi
32838  fi
32839
32840  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32841  if test "x$test_cygdrive_prefix" = x; then
32842    # As a simple fix, exclude /usr/bin since it's not a real path.
32843    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32844      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32845      # a path prefixed by /cygdrive for fixpath to work.
32846      new_path="$CYGWIN_ROOT_PATH$input_path"
32847    fi
32848  fi
32849
32850  # remove trailing .exe if any
32851  new_path="${new_path/%.exe/}"
32852
32853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32854
32855  # First separate the path from the arguments. This will split at the first
32856  # space.
32857  complete="$AR"
32858  path="${complete%% *}"
32859  tmp="$complete EOL"
32860  arguments="${tmp#* }"
32861
32862  # Input might be given as Windows format, start by converting to
32863  # unix format.
32864  new_path="$path"
32865
32866  windows_path="$new_path"
32867  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32868    unix_path=`$CYGPATH -u "$windows_path"`
32869    new_path="$unix_path"
32870  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32871    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32872    new_path="$unix_path"
32873  fi
32874
32875
32876  # Now try to locate executable using which
32877  new_path=`$WHICH "$new_path" 2> /dev/null`
32878
32879  if test "x$new_path" = x; then
32880    # Oops. Which didn't find the executable.
32881    # The splitting of arguments from the executable at a space might have been incorrect,
32882    # since paths with space are more likely in Windows. Give it another try with the whole
32883    # argument.
32884    path="$complete"
32885    arguments="EOL"
32886    new_path="$path"
32887
32888  windows_path="$new_path"
32889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32890    unix_path=`$CYGPATH -u "$windows_path"`
32891    new_path="$unix_path"
32892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32894    new_path="$unix_path"
32895  fi
32896
32897
32898    new_path=`$WHICH "$new_path" 2> /dev/null`
32899
32900    if test "x$new_path" = x; then
32901      # It's still not found. Now this is an unrecoverable error.
32902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32903$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32904      has_space=`$ECHO "$complete" | $GREP " "`
32905      if test "x$has_space" != x; then
32906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32908      fi
32909      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32910    fi
32911  fi
32912
32913  # Now new_path has a complete unix path to the binary
32914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32915    # Keep paths in /bin as-is, but remove trailing .exe if any
32916    new_path="${new_path/%.exe/}"
32917    # Do not save /bin paths to all_fixpath_prefixes!
32918  else
32919    # Not in mixed or Windows style, start by that.
32920    new_path=`cmd //c echo $new_path`
32921
32922  input_path="$new_path"
32923  # Check if we need to convert this using DOS-style short mode. If the path
32924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32925  # take no chances and rewrite it.
32926  # Note: m4 eats our [], so we need to use [ and ] instead.
32927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32928  if test "x$has_forbidden_chars" != x; then
32929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32931  fi
32932
32933    # Output is in $new_path
32934
32935  windows_path="$new_path"
32936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32937    unix_path=`$CYGPATH -u "$windows_path"`
32938    new_path="$unix_path"
32939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32941    new_path="$unix_path"
32942  fi
32943
32944    # remove trailing .exe if any
32945    new_path="${new_path/%.exe/}"
32946
32947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32949  fi
32950
32951  else
32952    # We're on a posix platform. Hooray! :)
32953    # First separate the path from the arguments. This will split at the first
32954    # space.
32955    complete="$AR"
32956    path="${complete%% *}"
32957    tmp="$complete EOL"
32958    arguments="${tmp#* }"
32959
32960    # Cannot rely on the command "which" here since it doesn't always work.
32961    is_absolute_path=`$ECHO "$path" | $GREP ^/`
32962    if test -z "$is_absolute_path"; then
32963      # Path to executable is not absolute. Find it.
32964      IFS_save="$IFS"
32965      IFS=:
32966      for p in $PATH; do
32967        if test -f "$p/$path" && test -x "$p/$path"; then
32968          new_path="$p/$path"
32969          break
32970        fi
32971      done
32972      IFS="$IFS_save"
32973    else
32974      # This is an absolute path, we can use it without further modifications.
32975      new_path="$path"
32976    fi
32977
32978    if test "x$new_path" = x; then
32979      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
32980$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
32981      has_space=`$ECHO "$complete" | $GREP " "`
32982      if test "x$has_space" != x; then
32983        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32985      fi
32986      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
32987    fi
32988  fi
32989
32990  # Now join together the path and the arguments once again
32991  if test "x$arguments" != xEOL; then
32992    new_complete="$new_path ${arguments% *}"
32993  else
32994    new_complete="$new_path"
32995  fi
32996
32997  if test "x$complete" != "x$new_complete"; then
32998    AR="$new_complete"
32999    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
33000$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
33001  fi
33002
33003
33004
33005  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
33006    ac_ext=m
33007ac_cpp='$OBJCPP $CPPFLAGS'
33008ac_compile='$OBJC -c $OBJCFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33009ac_link='$OBJC -o conftest$ac_exeext $OBJCFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33010ac_compiler_gnu=$ac_cv_objc_compiler_gnu
33011if test -n "$ac_tool_prefix"; then
33012  for ac_prog in gcc objcc objc cc CC
33013  do
33014    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33015set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33017$as_echo_n "checking for $ac_word... " >&6; }
33018if ${ac_cv_prog_OBJC+:} false; then :
33019  $as_echo_n "(cached) " >&6
33020else
33021  if test -n "$OBJC"; then
33022  ac_cv_prog_OBJC="$OBJC" # Let the user override the test.
33023else
33024as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33025for as_dir in $PATH
33026do
33027  IFS=$as_save_IFS
33028  test -z "$as_dir" && as_dir=.
33029    for ac_exec_ext in '' $ac_executable_extensions; do
33030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33031    ac_cv_prog_OBJC="$ac_tool_prefix$ac_prog"
33032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33033    break 2
33034  fi
33035done
33036  done
33037IFS=$as_save_IFS
33038
33039fi
33040fi
33041OBJC=$ac_cv_prog_OBJC
33042if test -n "$OBJC"; then
33043  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJC" >&5
33044$as_echo "$OBJC" >&6; }
33045else
33046  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33047$as_echo "no" >&6; }
33048fi
33049
33050
33051    test -n "$OBJC" && break
33052  done
33053fi
33054if test -z "$OBJC"; then
33055  ac_ct_OBJC=$OBJC
33056  for ac_prog in gcc objcc objc cc CC
33057do
33058  # Extract the first word of "$ac_prog", so it can be a program name with args.
33059set dummy $ac_prog; ac_word=$2
33060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33061$as_echo_n "checking for $ac_word... " >&6; }
33062if ${ac_cv_prog_ac_ct_OBJC+:} false; then :
33063  $as_echo_n "(cached) " >&6
33064else
33065  if test -n "$ac_ct_OBJC"; then
33066  ac_cv_prog_ac_ct_OBJC="$ac_ct_OBJC" # Let the user override the test.
33067else
33068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33069for as_dir in $PATH
33070do
33071  IFS=$as_save_IFS
33072  test -z "$as_dir" && as_dir=.
33073    for ac_exec_ext in '' $ac_executable_extensions; do
33074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33075    ac_cv_prog_ac_ct_OBJC="$ac_prog"
33076    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33077    break 2
33078  fi
33079done
33080  done
33081IFS=$as_save_IFS
33082
33083fi
33084fi
33085ac_ct_OBJC=$ac_cv_prog_ac_ct_OBJC
33086if test -n "$ac_ct_OBJC"; then
33087  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJC" >&5
33088$as_echo "$ac_ct_OBJC" >&6; }
33089else
33090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33091$as_echo "no" >&6; }
33092fi
33093
33094
33095  test -n "$ac_ct_OBJC" && break
33096done
33097
33098  if test "x$ac_ct_OBJC" = x; then
33099    OBJC="gcc"
33100  else
33101    case $cross_compiling:$ac_tool_warned in
33102yes:)
33103{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33104$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33105ac_tool_warned=yes ;;
33106esac
33107    OBJC=$ac_ct_OBJC
33108  fi
33109fi
33110
33111# Provide some information about the compiler.
33112$as_echo "$as_me:${as_lineno-$LINENO}: checking for Objective C compiler version" >&5
33113set X $ac_compile
33114ac_compiler=$2
33115for ac_option in --version -v -V -qversion; do
33116  { { ac_try="$ac_compiler $ac_option >&5"
33117case "(($ac_try" in
33118  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33119  *) ac_try_echo=$ac_try;;
33120esac
33121eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33122$as_echo "$ac_try_echo"; } >&5
33123  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33124  ac_status=$?
33125  if test -s conftest.err; then
33126    sed '10a\
33127... rest of stderr output deleted ...
33128         10q' conftest.err >conftest.er1
33129    cat conftest.er1 >&5
33130  fi
33131  rm -f conftest.er1 conftest.err
33132  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33133  test $ac_status = 0; }
33134done
33135
33136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Objective C compiler" >&5
33137$as_echo_n "checking whether we are using the GNU Objective C compiler... " >&6; }
33138if ${ac_cv_objc_compiler_gnu+:} false; then :
33139  $as_echo_n "(cached) " >&6
33140else
33141  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33142/* end confdefs.h.  */
33143
33144int
33145main ()
33146{
33147#ifndef __GNUC__
33148       choke me
33149#endif
33150
33151  ;
33152  return 0;
33153}
33154_ACEOF
33155if ac_fn_objc_try_compile "$LINENO"; then :
33156  ac_compiler_gnu=yes
33157else
33158  ac_compiler_gnu=no
33159fi
33160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33161ac_cv_objc_compiler_gnu=$ac_compiler_gnu
33162
33163fi
33164{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objc_compiler_gnu" >&5
33165$as_echo "$ac_cv_objc_compiler_gnu" >&6; }
33166if test $ac_compiler_gnu = yes; then
33167  GOBJC=yes
33168else
33169  GOBJC=
33170fi
33171ac_test_OBJCFLAGS=${OBJCFLAGS+set}
33172ac_save_OBJCFLAGS=$OBJCFLAGS
33173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $OBJC accepts -g" >&5
33174$as_echo_n "checking whether $OBJC accepts -g... " >&6; }
33175if ${ac_cv_prog_objc_g+:} false; then :
33176  $as_echo_n "(cached) " >&6
33177else
33178  ac_save_objc_werror_flag=$ac_objc_werror_flag
33179   ac_objc_werror_flag=yes
33180   ac_cv_prog_objc_g=no
33181   OBJCFLAGS="-g"
33182   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33183/* end confdefs.h.  */
33184
33185int
33186main ()
33187{
33188
33189  ;
33190  return 0;
33191}
33192_ACEOF
33193if ac_fn_objc_try_compile "$LINENO"; then :
33194  ac_cv_prog_objc_g=yes
33195else
33196  OBJCFLAGS=""
33197      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33198/* end confdefs.h.  */
33199
33200int
33201main ()
33202{
33203
33204  ;
33205  return 0;
33206}
33207_ACEOF
33208if ac_fn_objc_try_compile "$LINENO"; then :
33209
33210else
33211  ac_objc_werror_flag=$ac_save_objc_werror_flag
33212	 OBJCFLAGS="-g"
33213	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33214/* end confdefs.h.  */
33215
33216int
33217main ()
33218{
33219
33220  ;
33221  return 0;
33222}
33223_ACEOF
33224if ac_fn_objc_try_compile "$LINENO"; then :
33225  ac_cv_prog_objc_g=yes
33226fi
33227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33228fi
33229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33230fi
33231rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33232   ac_objc_werror_flag=$ac_save_objc_werror_flag
33233fi
33234{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_objc_g" >&5
33235$as_echo "$ac_cv_prog_objc_g" >&6; }
33236if test "$ac_test_OBJCFLAGS" = set; then
33237  OBJCFLAGS=$ac_save_OBJCFLAGS
33238elif test $ac_cv_prog_objc_g = yes; then
33239  if test "$GOBJC" = yes; then
33240    OBJCFLAGS="-g -O2"
33241  else
33242    OBJCFLAGS="-g"
33243  fi
33244else
33245  if test "$GOBJC" = yes; then
33246    OBJCFLAGS="-O2"
33247  else
33248    OBJCFLAGS=
33249  fi
33250fi
33251ac_ext=cpp
33252ac_cpp='$CXXCPP $CPPFLAGS'
33253ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33254ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33255ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33256
33257
33258  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33259
33260  # First separate the path from the arguments. This will split at the first
33261  # space.
33262  complete="$OBJC"
33263  path="${complete%% *}"
33264  tmp="$complete EOL"
33265  arguments="${tmp#* }"
33266
33267  # Input might be given as Windows format, start by converting to
33268  # unix format.
33269  new_path=`$CYGPATH -u "$path"`
33270
33271  # Now try to locate executable using which
33272  new_path=`$WHICH "$new_path" 2> /dev/null`
33273  # bat and cmd files are not always considered executable in cygwin causing which
33274  # to not find them
33275  if test "x$new_path" = x \
33276      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33277      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33278    new_path=`$CYGPATH -u "$path"`
33279  fi
33280  if test "x$new_path" = x; then
33281    # Oops. Which didn't find the executable.
33282    # The splitting of arguments from the executable at a space might have been incorrect,
33283    # since paths with space are more likely in Windows. Give it another try with the whole
33284    # argument.
33285    path="$complete"
33286    arguments="EOL"
33287    new_path=`$CYGPATH -u "$path"`
33288    new_path=`$WHICH "$new_path" 2> /dev/null`
33289    # bat and cmd files are not always considered executable in cygwin causing which
33290    # to not find them
33291    if test "x$new_path" = x \
33292        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33293        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33294      new_path=`$CYGPATH -u "$path"`
33295    fi
33296    if test "x$new_path" = x; then
33297      # It's still not found. Now this is an unrecoverable error.
33298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33299$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33300      has_space=`$ECHO "$complete" | $GREP " "`
33301      if test "x$has_space" != x; then
33302        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33303$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33304      fi
33305      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33306    fi
33307  fi
33308
33309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33312  # "foo.exe" is OK but "foo" is an error.
33313  #
33314  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33315  # It is also a way to make sure we got the proper file name for the real test later on.
33316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33317  if test "x$test_shortpath" = x; then
33318    # Short path failed, file does not exist as specified.
33319    # Try adding .exe or .cmd
33320    if test -f "${new_path}.exe"; then
33321      input_to_shortpath="${new_path}.exe"
33322    elif test -f "${new_path}.cmd"; then
33323      input_to_shortpath="${new_path}.cmd"
33324    else
33325      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$new_path\", is invalid." >&5
33326$as_echo "$as_me: The path of OBJC, which resolves as \"$new_path\", is invalid." >&6;}
33327      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33328$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33329      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33330    fi
33331  else
33332    input_to_shortpath="$new_path"
33333  fi
33334
33335  # Call helper function which possibly converts this using DOS-style short mode.
33336  # If so, the updated path is stored in $new_path.
33337  new_path="$input_to_shortpath"
33338
33339  input_path="$input_to_shortpath"
33340  # Check if we need to convert this using DOS-style short mode. If the path
33341  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33342  # take no chances and rewrite it.
33343  # Note: m4 eats our [], so we need to use [ and ] instead.
33344  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33345  if test "x$has_forbidden_chars" != x; then
33346    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33347    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33348    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33349    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33350      # Going to short mode and back again did indeed matter. Since short mode is
33351      # case insensitive, let's make it lowercase to improve readability.
33352      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33353      # Now convert it back to Unix-stile (cygpath)
33354      input_path=`$CYGPATH -u "$shortmode_path"`
33355      new_path="$input_path"
33356    fi
33357  fi
33358
33359  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33360  if test "x$test_cygdrive_prefix" = x; then
33361    # As a simple fix, exclude /usr/bin since it's not a real path.
33362    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33363      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33364      # a path prefixed by /cygdrive for fixpath to work.
33365      new_path="$CYGWIN_ROOT_PATH$input_path"
33366    fi
33367  fi
33368
33369  # remove trailing .exe if any
33370  new_path="${new_path/%.exe/}"
33371
33372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33373
33374  # First separate the path from the arguments. This will split at the first
33375  # space.
33376  complete="$OBJC"
33377  path="${complete%% *}"
33378  tmp="$complete EOL"
33379  arguments="${tmp#* }"
33380
33381  # Input might be given as Windows format, start by converting to
33382  # unix format.
33383  new_path="$path"
33384
33385  windows_path="$new_path"
33386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33387    unix_path=`$CYGPATH -u "$windows_path"`
33388    new_path="$unix_path"
33389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33391    new_path="$unix_path"
33392  fi
33393
33394
33395  # Now try to locate executable using which
33396  new_path=`$WHICH "$new_path" 2> /dev/null`
33397
33398  if test "x$new_path" = x; then
33399    # Oops. Which didn't find the executable.
33400    # The splitting of arguments from the executable at a space might have been incorrect,
33401    # since paths with space are more likely in Windows. Give it another try with the whole
33402    # argument.
33403    path="$complete"
33404    arguments="EOL"
33405    new_path="$path"
33406
33407  windows_path="$new_path"
33408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33409    unix_path=`$CYGPATH -u "$windows_path"`
33410    new_path="$unix_path"
33411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33412    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33413    new_path="$unix_path"
33414  fi
33415
33416
33417    new_path=`$WHICH "$new_path" 2> /dev/null`
33418
33419    if test "x$new_path" = x; then
33420      # It's still not found. Now this is an unrecoverable error.
33421      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33422$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33423      has_space=`$ECHO "$complete" | $GREP " "`
33424      if test "x$has_space" != x; then
33425        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33426$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33427      fi
33428      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33429    fi
33430  fi
33431
33432  # Now new_path has a complete unix path to the binary
33433  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33434    # Keep paths in /bin as-is, but remove trailing .exe if any
33435    new_path="${new_path/%.exe/}"
33436    # Do not save /bin paths to all_fixpath_prefixes!
33437  else
33438    # Not in mixed or Windows style, start by that.
33439    new_path=`cmd //c echo $new_path`
33440
33441  input_path="$new_path"
33442  # Check if we need to convert this using DOS-style short mode. If the path
33443  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33444  # take no chances and rewrite it.
33445  # Note: m4 eats our [], so we need to use [ and ] instead.
33446  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33447  if test "x$has_forbidden_chars" != x; then
33448    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33449    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33450  fi
33451
33452    # Output is in $new_path
33453
33454  windows_path="$new_path"
33455  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33456    unix_path=`$CYGPATH -u "$windows_path"`
33457    new_path="$unix_path"
33458  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33459    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33460    new_path="$unix_path"
33461  fi
33462
33463    # remove trailing .exe if any
33464    new_path="${new_path/%.exe/}"
33465
33466    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33467    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33468  fi
33469
33470  else
33471    # We're on a posix platform. Hooray! :)
33472    # First separate the path from the arguments. This will split at the first
33473    # space.
33474    complete="$OBJC"
33475    path="${complete%% *}"
33476    tmp="$complete EOL"
33477    arguments="${tmp#* }"
33478
33479    # Cannot rely on the command "which" here since it doesn't always work.
33480    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33481    if test -z "$is_absolute_path"; then
33482      # Path to executable is not absolute. Find it.
33483      IFS_save="$IFS"
33484      IFS=:
33485      for p in $PATH; do
33486        if test -f "$p/$path" && test -x "$p/$path"; then
33487          new_path="$p/$path"
33488          break
33489        fi
33490      done
33491      IFS="$IFS_save"
33492    else
33493      # This is an absolute path, we can use it without further modifications.
33494      new_path="$path"
33495    fi
33496
33497    if test "x$new_path" = x; then
33498      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJC, which resolves as \"$complete\", is not found." >&5
33499$as_echo "$as_me: The path of OBJC, which resolves as \"$complete\", is not found." >&6;}
33500      has_space=`$ECHO "$complete" | $GREP " "`
33501      if test "x$has_space" != x; then
33502        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33503$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33504      fi
33505      as_fn_error $? "Cannot locate the the path of OBJC" "$LINENO" 5
33506    fi
33507  fi
33508
33509  # Now join together the path and the arguments once again
33510  if test "x$arguments" != xEOL; then
33511    new_complete="$new_path ${arguments% *}"
33512  else
33513    new_complete="$new_path"
33514  fi
33515
33516  if test "x$complete" != "x$new_complete"; then
33517    OBJC="$new_complete"
33518    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJC to \"$new_complete\"" >&5
33519$as_echo "$as_me: Rewriting OBJC to \"$new_complete\"" >&6;}
33520  fi
33521
33522
33523
33524  # Publish this variable in the help.
33525
33526
33527  if test "x$LIPO" = x; then
33528    # The variable is not set by user, try to locate tool using the code snippet
33529    for ac_prog in lipo
33530do
33531  # Extract the first word of "$ac_prog", so it can be a program name with args.
33532set dummy $ac_prog; ac_word=$2
33533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33534$as_echo_n "checking for $ac_word... " >&6; }
33535if ${ac_cv_path_LIPO+:} false; then :
33536  $as_echo_n "(cached) " >&6
33537else
33538  case $LIPO in
33539  [\\/]* | ?:[\\/]*)
33540  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33541  ;;
33542  *)
33543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33544for as_dir in $PATH
33545do
33546  IFS=$as_save_IFS
33547  test -z "$as_dir" && as_dir=.
33548    for ac_exec_ext in '' $ac_executable_extensions; do
33549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33550    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33552    break 2
33553  fi
33554done
33555  done
33556IFS=$as_save_IFS
33557
33558  ;;
33559esac
33560fi
33561LIPO=$ac_cv_path_LIPO
33562if test -n "$LIPO"; then
33563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33564$as_echo "$LIPO" >&6; }
33565else
33566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33567$as_echo "no" >&6; }
33568fi
33569
33570
33571  test -n "$LIPO" && break
33572done
33573
33574  else
33575    # The variable is set, but is it from the command line or the environment?
33576
33577    # Try to remove the string !LIPO! from our list.
33578    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
33579    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
33580      # If it failed, the variable was not from the command line. Ignore it,
33581      # but warn the user (except for BASH, which is always set by the calling BASH).
33582      if test "xLIPO" != xBASH; then
33583        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
33584$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
33585      fi
33586      # Try to locate tool using the code snippet
33587      for ac_prog in lipo
33588do
33589  # Extract the first word of "$ac_prog", so it can be a program name with args.
33590set dummy $ac_prog; ac_word=$2
33591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33592$as_echo_n "checking for $ac_word... " >&6; }
33593if ${ac_cv_path_LIPO+:} false; then :
33594  $as_echo_n "(cached) " >&6
33595else
33596  case $LIPO in
33597  [\\/]* | ?:[\\/]*)
33598  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33599  ;;
33600  *)
33601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33602for as_dir in $PATH
33603do
33604  IFS=$as_save_IFS
33605  test -z "$as_dir" && as_dir=.
33606    for ac_exec_ext in '' $ac_executable_extensions; do
33607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33608    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33610    break 2
33611  fi
33612done
33613  done
33614IFS=$as_save_IFS
33615
33616  ;;
33617esac
33618fi
33619LIPO=$ac_cv_path_LIPO
33620if test -n "$LIPO"; then
33621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33622$as_echo "$LIPO" >&6; }
33623else
33624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33625$as_echo "no" >&6; }
33626fi
33627
33628
33629  test -n "$LIPO" && break
33630done
33631
33632    else
33633      # If it succeeded, then it was overridden by the user. We will use it
33634      # for the tool.
33635
33636      # First remove it from the list of overridden variables, so we can test
33637      # for unknown variables in the end.
33638      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
33639
33640      # Check if the provided tool contains a complete path.
33641      tool_specified="$LIPO"
33642      tool_basename="${tool_specified##*/}"
33643      if test "x$tool_basename" = "x$tool_specified"; then
33644        # A command without a complete path is provided, search $PATH.
33645        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
33646$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
33647        # Extract the first word of "$tool_basename", so it can be a program name with args.
33648set dummy $tool_basename; ac_word=$2
33649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33650$as_echo_n "checking for $ac_word... " >&6; }
33651if ${ac_cv_path_LIPO+:} false; then :
33652  $as_echo_n "(cached) " >&6
33653else
33654  case $LIPO in
33655  [\\/]* | ?:[\\/]*)
33656  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
33657  ;;
33658  *)
33659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33660for as_dir in $PATH
33661do
33662  IFS=$as_save_IFS
33663  test -z "$as_dir" && as_dir=.
33664    for ac_exec_ext in '' $ac_executable_extensions; do
33665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33666    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
33667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33668    break 2
33669  fi
33670done
33671  done
33672IFS=$as_save_IFS
33673
33674  ;;
33675esac
33676fi
33677LIPO=$ac_cv_path_LIPO
33678if test -n "$LIPO"; then
33679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
33680$as_echo "$LIPO" >&6; }
33681else
33682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33683$as_echo "no" >&6; }
33684fi
33685
33686
33687        if test "x$LIPO" = x; then
33688          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
33689        fi
33690      else
33691        # Otherwise we believe it is a complete path. Use it as it is.
33692        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
33693$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
33694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
33695$as_echo_n "checking for LIPO... " >&6; }
33696        if test ! -x "$tool_specified"; then
33697          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33698$as_echo "not found" >&6; }
33699          as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
33700        fi
33701        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
33702$as_echo "$tool_specified" >&6; }
33703      fi
33704    fi
33705  fi
33706
33707
33708
33709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33710
33711  # First separate the path from the arguments. This will split at the first
33712  # space.
33713  complete="$LIPO"
33714  path="${complete%% *}"
33715  tmp="$complete EOL"
33716  arguments="${tmp#* }"
33717
33718  # Input might be given as Windows format, start by converting to
33719  # unix format.
33720  new_path=`$CYGPATH -u "$path"`
33721
33722  # Now try to locate executable using which
33723  new_path=`$WHICH "$new_path" 2> /dev/null`
33724  # bat and cmd files are not always considered executable in cygwin causing which
33725  # to not find them
33726  if test "x$new_path" = x \
33727      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33728      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33729    new_path=`$CYGPATH -u "$path"`
33730  fi
33731  if test "x$new_path" = x; then
33732    # Oops. Which didn't find the executable.
33733    # The splitting of arguments from the executable at a space might have been incorrect,
33734    # since paths with space are more likely in Windows. Give it another try with the whole
33735    # argument.
33736    path="$complete"
33737    arguments="EOL"
33738    new_path=`$CYGPATH -u "$path"`
33739    new_path=`$WHICH "$new_path" 2> /dev/null`
33740    # bat and cmd files are not always considered executable in cygwin causing which
33741    # to not find them
33742    if test "x$new_path" = x \
33743        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33744        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33745      new_path=`$CYGPATH -u "$path"`
33746    fi
33747    if test "x$new_path" = x; then
33748      # It's still not found. Now this is an unrecoverable error.
33749      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33750$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33751      has_space=`$ECHO "$complete" | $GREP " "`
33752      if test "x$has_space" != x; then
33753        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33754$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33755      fi
33756      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33757    fi
33758  fi
33759
33760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33763  # "foo.exe" is OK but "foo" is an error.
33764  #
33765  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33766  # It is also a way to make sure we got the proper file name for the real test later on.
33767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33768  if test "x$test_shortpath" = x; then
33769    # Short path failed, file does not exist as specified.
33770    # Try adding .exe or .cmd
33771    if test -f "${new_path}.exe"; then
33772      input_to_shortpath="${new_path}.exe"
33773    elif test -f "${new_path}.cmd"; then
33774      input_to_shortpath="${new_path}.cmd"
33775    else
33776      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
33777$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
33778      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33779$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33780      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33781    fi
33782  else
33783    input_to_shortpath="$new_path"
33784  fi
33785
33786  # Call helper function which possibly converts this using DOS-style short mode.
33787  # If so, the updated path is stored in $new_path.
33788  new_path="$input_to_shortpath"
33789
33790  input_path="$input_to_shortpath"
33791  # Check if we need to convert this using DOS-style short mode. If the path
33792  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33793  # take no chances and rewrite it.
33794  # Note: m4 eats our [], so we need to use [ and ] instead.
33795  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33796  if test "x$has_forbidden_chars" != x; then
33797    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33798    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33799    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33800    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33801      # Going to short mode and back again did indeed matter. Since short mode is
33802      # case insensitive, let's make it lowercase to improve readability.
33803      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33804      # Now convert it back to Unix-stile (cygpath)
33805      input_path=`$CYGPATH -u "$shortmode_path"`
33806      new_path="$input_path"
33807    fi
33808  fi
33809
33810  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33811  if test "x$test_cygdrive_prefix" = x; then
33812    # As a simple fix, exclude /usr/bin since it's not a real path.
33813    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33814      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33815      # a path prefixed by /cygdrive for fixpath to work.
33816      new_path="$CYGWIN_ROOT_PATH$input_path"
33817    fi
33818  fi
33819
33820  # remove trailing .exe if any
33821  new_path="${new_path/%.exe/}"
33822
33823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33824
33825  # First separate the path from the arguments. This will split at the first
33826  # space.
33827  complete="$LIPO"
33828  path="${complete%% *}"
33829  tmp="$complete EOL"
33830  arguments="${tmp#* }"
33831
33832  # Input might be given as Windows format, start by converting to
33833  # unix format.
33834  new_path="$path"
33835
33836  windows_path="$new_path"
33837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33838    unix_path=`$CYGPATH -u "$windows_path"`
33839    new_path="$unix_path"
33840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33842    new_path="$unix_path"
33843  fi
33844
33845
33846  # Now try to locate executable using which
33847  new_path=`$WHICH "$new_path" 2> /dev/null`
33848
33849  if test "x$new_path" = x; then
33850    # Oops. Which didn't find the executable.
33851    # The splitting of arguments from the executable at a space might have been incorrect,
33852    # since paths with space are more likely in Windows. Give it another try with the whole
33853    # argument.
33854    path="$complete"
33855    arguments="EOL"
33856    new_path="$path"
33857
33858  windows_path="$new_path"
33859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33860    unix_path=`$CYGPATH -u "$windows_path"`
33861    new_path="$unix_path"
33862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33864    new_path="$unix_path"
33865  fi
33866
33867
33868    new_path=`$WHICH "$new_path" 2> /dev/null`
33869
33870    if test "x$new_path" = x; then
33871      # It's still not found. Now this is an unrecoverable error.
33872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33873$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33874      has_space=`$ECHO "$complete" | $GREP " "`
33875      if test "x$has_space" != x; then
33876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33878      fi
33879      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33880    fi
33881  fi
33882
33883  # Now new_path has a complete unix path to the binary
33884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33885    # Keep paths in /bin as-is, but remove trailing .exe if any
33886    new_path="${new_path/%.exe/}"
33887    # Do not save /bin paths to all_fixpath_prefixes!
33888  else
33889    # Not in mixed or Windows style, start by that.
33890    new_path=`cmd //c echo $new_path`
33891
33892  input_path="$new_path"
33893  # Check if we need to convert this using DOS-style short mode. If the path
33894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33895  # take no chances and rewrite it.
33896  # Note: m4 eats our [], so we need to use [ and ] instead.
33897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33898  if test "x$has_forbidden_chars" != x; then
33899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33901  fi
33902
33903    # Output is in $new_path
33904
33905  windows_path="$new_path"
33906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33907    unix_path=`$CYGPATH -u "$windows_path"`
33908    new_path="$unix_path"
33909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33911    new_path="$unix_path"
33912  fi
33913
33914    # remove trailing .exe if any
33915    new_path="${new_path/%.exe/}"
33916
33917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33919  fi
33920
33921  else
33922    # We're on a posix platform. Hooray! :)
33923    # First separate the path from the arguments. This will split at the first
33924    # space.
33925    complete="$LIPO"
33926    path="${complete%% *}"
33927    tmp="$complete EOL"
33928    arguments="${tmp#* }"
33929
33930    # Cannot rely on the command "which" here since it doesn't always work.
33931    is_absolute_path=`$ECHO "$path" | $GREP ^/`
33932    if test -z "$is_absolute_path"; then
33933      # Path to executable is not absolute. Find it.
33934      IFS_save="$IFS"
33935      IFS=:
33936      for p in $PATH; do
33937        if test -f "$p/$path" && test -x "$p/$path"; then
33938          new_path="$p/$path"
33939          break
33940        fi
33941      done
33942      IFS="$IFS_save"
33943    else
33944      # This is an absolute path, we can use it without further modifications.
33945      new_path="$path"
33946    fi
33947
33948    if test "x$new_path" = x; then
33949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
33950$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
33951      has_space=`$ECHO "$complete" | $GREP " "`
33952      if test "x$has_space" != x; then
33953        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33955      fi
33956      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
33957    fi
33958  fi
33959
33960  # Now join together the path and the arguments once again
33961  if test "x$arguments" != xEOL; then
33962    new_complete="$new_path ${arguments% *}"
33963  else
33964    new_complete="$new_path"
33965  fi
33966
33967  if test "x$complete" != "x$new_complete"; then
33968    LIPO="$new_complete"
33969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
33970$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
33971  fi
33972
33973  else
33974    OBJC=
33975  fi
33976
33977  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33978    # Extract the first word of "mt", so it can be a program name with args.
33979set dummy mt; ac_word=$2
33980{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33981$as_echo_n "checking for $ac_word... " >&6; }
33982if ${ac_cv_prog_MT+:} false; then :
33983  $as_echo_n "(cached) " >&6
33984else
33985  if test -n "$MT"; then
33986  ac_cv_prog_MT="$MT" # Let the user override the test.
33987else
33988  ac_prog_rejected=no
33989as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33990for as_dir in $PATH
33991do
33992  IFS=$as_save_IFS
33993  test -z "$as_dir" && as_dir=.
33994    for ac_exec_ext in '' $ac_executable_extensions; do
33995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33996    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
33997       ac_prog_rejected=yes
33998       continue
33999     fi
34000    ac_cv_prog_MT="mt"
34001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34002    break 2
34003  fi
34004done
34005  done
34006IFS=$as_save_IFS
34007
34008if test $ac_prog_rejected = yes; then
34009  # We found a bogon in the path, so make sure we never use it.
34010  set dummy $ac_cv_prog_MT
34011  shift
34012  if test $# != 0; then
34013    # We chose a different compiler from the bogus one.
34014    # However, it has the same basename, so the bogon will be chosen
34015    # first if we set MT to just the basename; use the full file name.
34016    shift
34017    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
34018  fi
34019fi
34020fi
34021fi
34022MT=$ac_cv_prog_MT
34023if test -n "$MT"; then
34024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
34025$as_echo "$MT" >&6; }
34026else
34027  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34028$as_echo "no" >&6; }
34029fi
34030
34031
34032
34033  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34034
34035  # First separate the path from the arguments. This will split at the first
34036  # space.
34037  complete="$MT"
34038  path="${complete%% *}"
34039  tmp="$complete EOL"
34040  arguments="${tmp#* }"
34041
34042  # Input might be given as Windows format, start by converting to
34043  # unix format.
34044  new_path=`$CYGPATH -u "$path"`
34045
34046  # Now try to locate executable using which
34047  new_path=`$WHICH "$new_path" 2> /dev/null`
34048  # bat and cmd files are not always considered executable in cygwin causing which
34049  # to not find them
34050  if test "x$new_path" = x \
34051      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34052      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34053    new_path=`$CYGPATH -u "$path"`
34054  fi
34055  if test "x$new_path" = x; then
34056    # Oops. Which didn't find the executable.
34057    # The splitting of arguments from the executable at a space might have been incorrect,
34058    # since paths with space are more likely in Windows. Give it another try with the whole
34059    # argument.
34060    path="$complete"
34061    arguments="EOL"
34062    new_path=`$CYGPATH -u "$path"`
34063    new_path=`$WHICH "$new_path" 2> /dev/null`
34064    # bat and cmd files are not always considered executable in cygwin causing which
34065    # to not find them
34066    if test "x$new_path" = x \
34067        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34068        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34069      new_path=`$CYGPATH -u "$path"`
34070    fi
34071    if test "x$new_path" = x; then
34072      # It's still not found. Now this is an unrecoverable error.
34073      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34074$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34075      has_space=`$ECHO "$complete" | $GREP " "`
34076      if test "x$has_space" != x; then
34077        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34078$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34079      fi
34080      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34081    fi
34082  fi
34083
34084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34087  # "foo.exe" is OK but "foo" is an error.
34088  #
34089  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34090  # It is also a way to make sure we got the proper file name for the real test later on.
34091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34092  if test "x$test_shortpath" = x; then
34093    # Short path failed, file does not exist as specified.
34094    # Try adding .exe or .cmd
34095    if test -f "${new_path}.exe"; then
34096      input_to_shortpath="${new_path}.exe"
34097    elif test -f "${new_path}.cmd"; then
34098      input_to_shortpath="${new_path}.cmd"
34099    else
34100      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
34101$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
34102      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34103$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34104      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34105    fi
34106  else
34107    input_to_shortpath="$new_path"
34108  fi
34109
34110  # Call helper function which possibly converts this using DOS-style short mode.
34111  # If so, the updated path is stored in $new_path.
34112  new_path="$input_to_shortpath"
34113
34114  input_path="$input_to_shortpath"
34115  # Check if we need to convert this using DOS-style short mode. If the path
34116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34117  # take no chances and rewrite it.
34118  # Note: m4 eats our [], so we need to use [ and ] instead.
34119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34120  if test "x$has_forbidden_chars" != x; then
34121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34125      # Going to short mode and back again did indeed matter. Since short mode is
34126      # case insensitive, let's make it lowercase to improve readability.
34127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34128      # Now convert it back to Unix-stile (cygpath)
34129      input_path=`$CYGPATH -u "$shortmode_path"`
34130      new_path="$input_path"
34131    fi
34132  fi
34133
34134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34135  if test "x$test_cygdrive_prefix" = x; then
34136    # As a simple fix, exclude /usr/bin since it's not a real path.
34137    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34139      # a path prefixed by /cygdrive for fixpath to work.
34140      new_path="$CYGWIN_ROOT_PATH$input_path"
34141    fi
34142  fi
34143
34144  # remove trailing .exe if any
34145  new_path="${new_path/%.exe/}"
34146
34147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34148
34149  # First separate the path from the arguments. This will split at the first
34150  # space.
34151  complete="$MT"
34152  path="${complete%% *}"
34153  tmp="$complete EOL"
34154  arguments="${tmp#* }"
34155
34156  # Input might be given as Windows format, start by converting to
34157  # unix format.
34158  new_path="$path"
34159
34160  windows_path="$new_path"
34161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34162    unix_path=`$CYGPATH -u "$windows_path"`
34163    new_path="$unix_path"
34164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34166    new_path="$unix_path"
34167  fi
34168
34169
34170  # Now try to locate executable using which
34171  new_path=`$WHICH "$new_path" 2> /dev/null`
34172
34173  if test "x$new_path" = x; then
34174    # Oops. Which didn't find the executable.
34175    # The splitting of arguments from the executable at a space might have been incorrect,
34176    # since paths with space are more likely in Windows. Give it another try with the whole
34177    # argument.
34178    path="$complete"
34179    arguments="EOL"
34180    new_path="$path"
34181
34182  windows_path="$new_path"
34183  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34184    unix_path=`$CYGPATH -u "$windows_path"`
34185    new_path="$unix_path"
34186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34187    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34188    new_path="$unix_path"
34189  fi
34190
34191
34192    new_path=`$WHICH "$new_path" 2> /dev/null`
34193
34194    if test "x$new_path" = x; then
34195      # It's still not found. Now this is an unrecoverable error.
34196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34197$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34198      has_space=`$ECHO "$complete" | $GREP " "`
34199      if test "x$has_space" != x; then
34200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34202      fi
34203      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34204    fi
34205  fi
34206
34207  # Now new_path has a complete unix path to the binary
34208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34209    # Keep paths in /bin as-is, but remove trailing .exe if any
34210    new_path="${new_path/%.exe/}"
34211    # Do not save /bin paths to all_fixpath_prefixes!
34212  else
34213    # Not in mixed or Windows style, start by that.
34214    new_path=`cmd //c echo $new_path`
34215
34216  input_path="$new_path"
34217  # Check if we need to convert this using DOS-style short mode. If the path
34218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34219  # take no chances and rewrite it.
34220  # Note: m4 eats our [], so we need to use [ and ] instead.
34221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34222  if test "x$has_forbidden_chars" != x; then
34223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34225  fi
34226
34227    # Output is in $new_path
34228
34229  windows_path="$new_path"
34230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34231    unix_path=`$CYGPATH -u "$windows_path"`
34232    new_path="$unix_path"
34233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34235    new_path="$unix_path"
34236  fi
34237
34238    # remove trailing .exe if any
34239    new_path="${new_path/%.exe/}"
34240
34241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34243  fi
34244
34245  else
34246    # We're on a posix platform. Hooray! :)
34247    # First separate the path from the arguments. This will split at the first
34248    # space.
34249    complete="$MT"
34250    path="${complete%% *}"
34251    tmp="$complete EOL"
34252    arguments="${tmp#* }"
34253
34254    # Cannot rely on the command "which" here since it doesn't always work.
34255    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34256    if test -z "$is_absolute_path"; then
34257      # Path to executable is not absolute. Find it.
34258      IFS_save="$IFS"
34259      IFS=:
34260      for p in $PATH; do
34261        if test -f "$p/$path" && test -x "$p/$path"; then
34262          new_path="$p/$path"
34263          break
34264        fi
34265      done
34266      IFS="$IFS_save"
34267    else
34268      # This is an absolute path, we can use it without further modifications.
34269      new_path="$path"
34270    fi
34271
34272    if test "x$new_path" = x; then
34273      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
34274$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
34275      has_space=`$ECHO "$complete" | $GREP " "`
34276      if test "x$has_space" != x; then
34277        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34279      fi
34280      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
34281    fi
34282  fi
34283
34284  # Now join together the path and the arguments once again
34285  if test "x$arguments" != xEOL; then
34286    new_complete="$new_path ${arguments% *}"
34287  else
34288    new_complete="$new_path"
34289  fi
34290
34291  if test "x$complete" != "x$new_complete"; then
34292    MT="$new_complete"
34293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
34294$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
34295  fi
34296
34297    # Setup the resource compiler (RC)
34298    # Extract the first word of "rc", so it can be a program name with args.
34299set dummy rc; ac_word=$2
34300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34301$as_echo_n "checking for $ac_word... " >&6; }
34302if ${ac_cv_prog_RC+:} false; then :
34303  $as_echo_n "(cached) " >&6
34304else
34305  if test -n "$RC"; then
34306  ac_cv_prog_RC="$RC" # Let the user override the test.
34307else
34308  ac_prog_rejected=no
34309as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34310for as_dir in $PATH
34311do
34312  IFS=$as_save_IFS
34313  test -z "$as_dir" && as_dir=.
34314    for ac_exec_ext in '' $ac_executable_extensions; do
34315  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34316    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
34317       ac_prog_rejected=yes
34318       continue
34319     fi
34320    ac_cv_prog_RC="rc"
34321    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34322    break 2
34323  fi
34324done
34325  done
34326IFS=$as_save_IFS
34327
34328if test $ac_prog_rejected = yes; then
34329  # We found a bogon in the path, so make sure we never use it.
34330  set dummy $ac_cv_prog_RC
34331  shift
34332  if test $# != 0; then
34333    # We chose a different compiler from the bogus one.
34334    # However, it has the same basename, so the bogon will be chosen
34335    # first if we set RC to just the basename; use the full file name.
34336    shift
34337    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
34338  fi
34339fi
34340fi
34341fi
34342RC=$ac_cv_prog_RC
34343if test -n "$RC"; then
34344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
34345$as_echo "$RC" >&6; }
34346else
34347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34348$as_echo "no" >&6; }
34349fi
34350
34351
34352
34353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34354
34355  # First separate the path from the arguments. This will split at the first
34356  # space.
34357  complete="$RC"
34358  path="${complete%% *}"
34359  tmp="$complete EOL"
34360  arguments="${tmp#* }"
34361
34362  # Input might be given as Windows format, start by converting to
34363  # unix format.
34364  new_path=`$CYGPATH -u "$path"`
34365
34366  # Now try to locate executable using which
34367  new_path=`$WHICH "$new_path" 2> /dev/null`
34368  # bat and cmd files are not always considered executable in cygwin causing which
34369  # to not find them
34370  if test "x$new_path" = x \
34371      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34372      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34373    new_path=`$CYGPATH -u "$path"`
34374  fi
34375  if test "x$new_path" = x; then
34376    # Oops. Which didn't find the executable.
34377    # The splitting of arguments from the executable at a space might have been incorrect,
34378    # since paths with space are more likely in Windows. Give it another try with the whole
34379    # argument.
34380    path="$complete"
34381    arguments="EOL"
34382    new_path=`$CYGPATH -u "$path"`
34383    new_path=`$WHICH "$new_path" 2> /dev/null`
34384    # bat and cmd files are not always considered executable in cygwin causing which
34385    # to not find them
34386    if test "x$new_path" = x \
34387        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34388        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34389      new_path=`$CYGPATH -u "$path"`
34390    fi
34391    if test "x$new_path" = x; then
34392      # It's still not found. Now this is an unrecoverable error.
34393      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34394$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34395      has_space=`$ECHO "$complete" | $GREP " "`
34396      if test "x$has_space" != x; then
34397        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34398$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34399      fi
34400      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34401    fi
34402  fi
34403
34404  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34405  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34406  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34407  # "foo.exe" is OK but "foo" is an error.
34408  #
34409  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34410  # It is also a way to make sure we got the proper file name for the real test later on.
34411  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34412  if test "x$test_shortpath" = x; then
34413    # Short path failed, file does not exist as specified.
34414    # Try adding .exe or .cmd
34415    if test -f "${new_path}.exe"; then
34416      input_to_shortpath="${new_path}.exe"
34417    elif test -f "${new_path}.cmd"; then
34418      input_to_shortpath="${new_path}.cmd"
34419    else
34420      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
34421$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
34422      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34423$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34424      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34425    fi
34426  else
34427    input_to_shortpath="$new_path"
34428  fi
34429
34430  # Call helper function which possibly converts this using DOS-style short mode.
34431  # If so, the updated path is stored in $new_path.
34432  new_path="$input_to_shortpath"
34433
34434  input_path="$input_to_shortpath"
34435  # Check if we need to convert this using DOS-style short mode. If the path
34436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34437  # take no chances and rewrite it.
34438  # Note: m4 eats our [], so we need to use [ and ] instead.
34439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34440  if test "x$has_forbidden_chars" != x; then
34441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34445      # Going to short mode and back again did indeed matter. Since short mode is
34446      # case insensitive, let's make it lowercase to improve readability.
34447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34448      # Now convert it back to Unix-stile (cygpath)
34449      input_path=`$CYGPATH -u "$shortmode_path"`
34450      new_path="$input_path"
34451    fi
34452  fi
34453
34454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34455  if test "x$test_cygdrive_prefix" = x; then
34456    # As a simple fix, exclude /usr/bin since it's not a real path.
34457    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34459      # a path prefixed by /cygdrive for fixpath to work.
34460      new_path="$CYGWIN_ROOT_PATH$input_path"
34461    fi
34462  fi
34463
34464  # remove trailing .exe if any
34465  new_path="${new_path/%.exe/}"
34466
34467  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34468
34469  # First separate the path from the arguments. This will split at the first
34470  # space.
34471  complete="$RC"
34472  path="${complete%% *}"
34473  tmp="$complete EOL"
34474  arguments="${tmp#* }"
34475
34476  # Input might be given as Windows format, start by converting to
34477  # unix format.
34478  new_path="$path"
34479
34480  windows_path="$new_path"
34481  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34482    unix_path=`$CYGPATH -u "$windows_path"`
34483    new_path="$unix_path"
34484  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34485    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34486    new_path="$unix_path"
34487  fi
34488
34489
34490  # Now try to locate executable using which
34491  new_path=`$WHICH "$new_path" 2> /dev/null`
34492
34493  if test "x$new_path" = x; then
34494    # Oops. Which didn't find the executable.
34495    # The splitting of arguments from the executable at a space might have been incorrect,
34496    # since paths with space are more likely in Windows. Give it another try with the whole
34497    # argument.
34498    path="$complete"
34499    arguments="EOL"
34500    new_path="$path"
34501
34502  windows_path="$new_path"
34503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34504    unix_path=`$CYGPATH -u "$windows_path"`
34505    new_path="$unix_path"
34506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34508    new_path="$unix_path"
34509  fi
34510
34511
34512    new_path=`$WHICH "$new_path" 2> /dev/null`
34513
34514    if test "x$new_path" = x; then
34515      # It's still not found. Now this is an unrecoverable error.
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34517$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34518      has_space=`$ECHO "$complete" | $GREP " "`
34519      if test "x$has_space" != x; then
34520        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34521$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34522      fi
34523      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34524    fi
34525  fi
34526
34527  # Now new_path has a complete unix path to the binary
34528  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34529    # Keep paths in /bin as-is, but remove trailing .exe if any
34530    new_path="${new_path/%.exe/}"
34531    # Do not save /bin paths to all_fixpath_prefixes!
34532  else
34533    # Not in mixed or Windows style, start by that.
34534    new_path=`cmd //c echo $new_path`
34535
34536  input_path="$new_path"
34537  # Check if we need to convert this using DOS-style short mode. If the path
34538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34539  # take no chances and rewrite it.
34540  # Note: m4 eats our [], so we need to use [ and ] instead.
34541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34542  if test "x$has_forbidden_chars" != x; then
34543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34545  fi
34546
34547    # Output is in $new_path
34548
34549  windows_path="$new_path"
34550  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34551    unix_path=`$CYGPATH -u "$windows_path"`
34552    new_path="$unix_path"
34553  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34554    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34555    new_path="$unix_path"
34556  fi
34557
34558    # remove trailing .exe if any
34559    new_path="${new_path/%.exe/}"
34560
34561    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34562    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34563  fi
34564
34565  else
34566    # We're on a posix platform. Hooray! :)
34567    # First separate the path from the arguments. This will split at the first
34568    # space.
34569    complete="$RC"
34570    path="${complete%% *}"
34571    tmp="$complete EOL"
34572    arguments="${tmp#* }"
34573
34574    # Cannot rely on the command "which" here since it doesn't always work.
34575    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34576    if test -z "$is_absolute_path"; then
34577      # Path to executable is not absolute. Find it.
34578      IFS_save="$IFS"
34579      IFS=:
34580      for p in $PATH; do
34581        if test -f "$p/$path" && test -x "$p/$path"; then
34582          new_path="$p/$path"
34583          break
34584        fi
34585      done
34586      IFS="$IFS_save"
34587    else
34588      # This is an absolute path, we can use it without further modifications.
34589      new_path="$path"
34590    fi
34591
34592    if test "x$new_path" = x; then
34593      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
34594$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
34595      has_space=`$ECHO "$complete" | $GREP " "`
34596      if test "x$has_space" != x; then
34597        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34598$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34599      fi
34600      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
34601    fi
34602  fi
34603
34604  # Now join together the path and the arguments once again
34605  if test "x$arguments" != xEOL; then
34606    new_complete="$new_path ${arguments% *}"
34607  else
34608    new_complete="$new_path"
34609  fi
34610
34611  if test "x$complete" != "x$new_complete"; then
34612    RC="$new_complete"
34613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
34614$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
34615  fi
34616
34617    # Extract the first word of "dumpbin", so it can be a program name with args.
34618set dummy dumpbin; ac_word=$2
34619{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34620$as_echo_n "checking for $ac_word... " >&6; }
34621if ${ac_cv_prog_DUMPBIN+:} false; then :
34622  $as_echo_n "(cached) " >&6
34623else
34624  if test -n "$DUMPBIN"; then
34625  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
34626else
34627as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34628for as_dir in $PATH
34629do
34630  IFS=$as_save_IFS
34631  test -z "$as_dir" && as_dir=.
34632    for ac_exec_ext in '' $ac_executable_extensions; do
34633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34634    ac_cv_prog_DUMPBIN="dumpbin"
34635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34636    break 2
34637  fi
34638done
34639  done
34640IFS=$as_save_IFS
34641
34642fi
34643fi
34644DUMPBIN=$ac_cv_prog_DUMPBIN
34645if test -n "$DUMPBIN"; then
34646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
34647$as_echo "$DUMPBIN" >&6; }
34648else
34649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34650$as_echo "no" >&6; }
34651fi
34652
34653
34654
34655  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34656
34657  # First separate the path from the arguments. This will split at the first
34658  # space.
34659  complete="$DUMPBIN"
34660  path="${complete%% *}"
34661  tmp="$complete EOL"
34662  arguments="${tmp#* }"
34663
34664  # Input might be given as Windows format, start by converting to
34665  # unix format.
34666  new_path=`$CYGPATH -u "$path"`
34667
34668  # Now try to locate executable using which
34669  new_path=`$WHICH "$new_path" 2> /dev/null`
34670  # bat and cmd files are not always considered executable in cygwin causing which
34671  # to not find them
34672  if test "x$new_path" = x \
34673      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34674      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34675    new_path=`$CYGPATH -u "$path"`
34676  fi
34677  if test "x$new_path" = x; then
34678    # Oops. Which didn't find the executable.
34679    # The splitting of arguments from the executable at a space might have been incorrect,
34680    # since paths with space are more likely in Windows. Give it another try with the whole
34681    # argument.
34682    path="$complete"
34683    arguments="EOL"
34684    new_path=`$CYGPATH -u "$path"`
34685    new_path=`$WHICH "$new_path" 2> /dev/null`
34686    # bat and cmd files are not always considered executable in cygwin causing which
34687    # to not find them
34688    if test "x$new_path" = x \
34689        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34690        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34691      new_path=`$CYGPATH -u "$path"`
34692    fi
34693    if test "x$new_path" = x; then
34694      # It's still not found. Now this is an unrecoverable error.
34695      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34696$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34697      has_space=`$ECHO "$complete" | $GREP " "`
34698      if test "x$has_space" != x; then
34699        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34700$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34701      fi
34702      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34703    fi
34704  fi
34705
34706  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34707  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34708  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34709  # "foo.exe" is OK but "foo" is an error.
34710  #
34711  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34712  # It is also a way to make sure we got the proper file name for the real test later on.
34713  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34714  if test "x$test_shortpath" = x; then
34715    # Short path failed, file does not exist as specified.
34716    # Try adding .exe or .cmd
34717    if test -f "${new_path}.exe"; then
34718      input_to_shortpath="${new_path}.exe"
34719    elif test -f "${new_path}.cmd"; then
34720      input_to_shortpath="${new_path}.cmd"
34721    else
34722      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
34723$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
34724      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34725$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34726      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34727    fi
34728  else
34729    input_to_shortpath="$new_path"
34730  fi
34731
34732  # Call helper function which possibly converts this using DOS-style short mode.
34733  # If so, the updated path is stored in $new_path.
34734  new_path="$input_to_shortpath"
34735
34736  input_path="$input_to_shortpath"
34737  # Check if we need to convert this using DOS-style short mode. If the path
34738  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34739  # take no chances and rewrite it.
34740  # Note: m4 eats our [], so we need to use [ and ] instead.
34741  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34742  if test "x$has_forbidden_chars" != x; then
34743    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34744    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34745    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34746    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34747      # Going to short mode and back again did indeed matter. Since short mode is
34748      # case insensitive, let's make it lowercase to improve readability.
34749      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34750      # Now convert it back to Unix-stile (cygpath)
34751      input_path=`$CYGPATH -u "$shortmode_path"`
34752      new_path="$input_path"
34753    fi
34754  fi
34755
34756  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34757  if test "x$test_cygdrive_prefix" = x; then
34758    # As a simple fix, exclude /usr/bin since it's not a real path.
34759    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34760      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34761      # a path prefixed by /cygdrive for fixpath to work.
34762      new_path="$CYGWIN_ROOT_PATH$input_path"
34763    fi
34764  fi
34765
34766  # remove trailing .exe if any
34767  new_path="${new_path/%.exe/}"
34768
34769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34770
34771  # First separate the path from the arguments. This will split at the first
34772  # space.
34773  complete="$DUMPBIN"
34774  path="${complete%% *}"
34775  tmp="$complete EOL"
34776  arguments="${tmp#* }"
34777
34778  # Input might be given as Windows format, start by converting to
34779  # unix format.
34780  new_path="$path"
34781
34782  windows_path="$new_path"
34783  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34784    unix_path=`$CYGPATH -u "$windows_path"`
34785    new_path="$unix_path"
34786  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34787    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34788    new_path="$unix_path"
34789  fi
34790
34791
34792  # Now try to locate executable using which
34793  new_path=`$WHICH "$new_path" 2> /dev/null`
34794
34795  if test "x$new_path" = x; then
34796    # Oops. Which didn't find the executable.
34797    # The splitting of arguments from the executable at a space might have been incorrect,
34798    # since paths with space are more likely in Windows. Give it another try with the whole
34799    # argument.
34800    path="$complete"
34801    arguments="EOL"
34802    new_path="$path"
34803
34804  windows_path="$new_path"
34805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34806    unix_path=`$CYGPATH -u "$windows_path"`
34807    new_path="$unix_path"
34808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34810    new_path="$unix_path"
34811  fi
34812
34813
34814    new_path=`$WHICH "$new_path" 2> /dev/null`
34815
34816    if test "x$new_path" = x; then
34817      # It's still not found. Now this is an unrecoverable error.
34818      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34819$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34820      has_space=`$ECHO "$complete" | $GREP " "`
34821      if test "x$has_space" != x; then
34822        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34823$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34824      fi
34825      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34826    fi
34827  fi
34828
34829  # Now new_path has a complete unix path to the binary
34830  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34831    # Keep paths in /bin as-is, but remove trailing .exe if any
34832    new_path="${new_path/%.exe/}"
34833    # Do not save /bin paths to all_fixpath_prefixes!
34834  else
34835    # Not in mixed or Windows style, start by that.
34836    new_path=`cmd //c echo $new_path`
34837
34838  input_path="$new_path"
34839  # Check if we need to convert this using DOS-style short mode. If the path
34840  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34841  # take no chances and rewrite it.
34842  # Note: m4 eats our [], so we need to use [ and ] instead.
34843  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34844  if test "x$has_forbidden_chars" != x; then
34845    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34846    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34847  fi
34848
34849    # Output is in $new_path
34850
34851  windows_path="$new_path"
34852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34853    unix_path=`$CYGPATH -u "$windows_path"`
34854    new_path="$unix_path"
34855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34857    new_path="$unix_path"
34858  fi
34859
34860    # remove trailing .exe if any
34861    new_path="${new_path/%.exe/}"
34862
34863    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34864    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34865  fi
34866
34867  else
34868    # We're on a posix platform. Hooray! :)
34869    # First separate the path from the arguments. This will split at the first
34870    # space.
34871    complete="$DUMPBIN"
34872    path="${complete%% *}"
34873    tmp="$complete EOL"
34874    arguments="${tmp#* }"
34875
34876    # Cannot rely on the command "which" here since it doesn't always work.
34877    is_absolute_path=`$ECHO "$path" | $GREP ^/`
34878    if test -z "$is_absolute_path"; then
34879      # Path to executable is not absolute. Find it.
34880      IFS_save="$IFS"
34881      IFS=:
34882      for p in $PATH; do
34883        if test -f "$p/$path" && test -x "$p/$path"; then
34884          new_path="$p/$path"
34885          break
34886        fi
34887      done
34888      IFS="$IFS_save"
34889    else
34890      # This is an absolute path, we can use it without further modifications.
34891      new_path="$path"
34892    fi
34893
34894    if test "x$new_path" = x; then
34895      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
34896$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
34897      has_space=`$ECHO "$complete" | $GREP " "`
34898      if test "x$has_space" != x; then
34899        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34900$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34901      fi
34902      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
34903    fi
34904  fi
34905
34906  # Now join together the path and the arguments once again
34907  if test "x$arguments" != xEOL; then
34908    new_complete="$new_path ${arguments% *}"
34909  else
34910    new_complete="$new_path"
34911  fi
34912
34913  if test "x$complete" != "x$new_complete"; then
34914    DUMPBIN="$new_complete"
34915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
34916$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
34917  fi
34918
34919  fi
34920
34921  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
34922
34923
34924  # Publish this variable in the help.
34925
34926
34927  if test "x$STRIP" = x; then
34928    # The variable is not set by user, try to locate tool using the code snippet
34929    for ac_prog in strip
34930do
34931  # Extract the first word of "$ac_prog", so it can be a program name with args.
34932set dummy $ac_prog; ac_word=$2
34933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34934$as_echo_n "checking for $ac_word... " >&6; }
34935if ${ac_cv_path_STRIP+:} false; then :
34936  $as_echo_n "(cached) " >&6
34937else
34938  case $STRIP in
34939  [\\/]* | ?:[\\/]*)
34940  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34941  ;;
34942  *)
34943  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34944for as_dir in $PATH
34945do
34946  IFS=$as_save_IFS
34947  test -z "$as_dir" && as_dir=.
34948    for ac_exec_ext in '' $ac_executable_extensions; do
34949  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34950    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
34951    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34952    break 2
34953  fi
34954done
34955  done
34956IFS=$as_save_IFS
34957
34958  ;;
34959esac
34960fi
34961STRIP=$ac_cv_path_STRIP
34962if test -n "$STRIP"; then
34963  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
34964$as_echo "$STRIP" >&6; }
34965else
34966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34967$as_echo "no" >&6; }
34968fi
34969
34970
34971  test -n "$STRIP" && break
34972done
34973
34974  else
34975    # The variable is set, but is it from the command line or the environment?
34976
34977    # Try to remove the string !STRIP! from our list.
34978    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
34979    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
34980      # If it failed, the variable was not from the command line. Ignore it,
34981      # but warn the user (except for BASH, which is always set by the calling BASH).
34982      if test "xSTRIP" != xBASH; then
34983        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
34984$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
34985      fi
34986      # Try to locate tool using the code snippet
34987      for ac_prog in strip
34988do
34989  # Extract the first word of "$ac_prog", so it can be a program name with args.
34990set dummy $ac_prog; ac_word=$2
34991{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34992$as_echo_n "checking for $ac_word... " >&6; }
34993if ${ac_cv_path_STRIP+:} false; then :
34994  $as_echo_n "(cached) " >&6
34995else
34996  case $STRIP in
34997  [\\/]* | ?:[\\/]*)
34998  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
34999  ;;
35000  *)
35001  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35002for as_dir in $PATH
35003do
35004  IFS=$as_save_IFS
35005  test -z "$as_dir" && as_dir=.
35006    for ac_exec_ext in '' $ac_executable_extensions; do
35007  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35008    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35009    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35010    break 2
35011  fi
35012done
35013  done
35014IFS=$as_save_IFS
35015
35016  ;;
35017esac
35018fi
35019STRIP=$ac_cv_path_STRIP
35020if test -n "$STRIP"; then
35021  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35022$as_echo "$STRIP" >&6; }
35023else
35024  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35025$as_echo "no" >&6; }
35026fi
35027
35028
35029  test -n "$STRIP" && break
35030done
35031
35032    else
35033      # If it succeeded, then it was overridden by the user. We will use it
35034      # for the tool.
35035
35036      # First remove it from the list of overridden variables, so we can test
35037      # for unknown variables in the end.
35038      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35039
35040      # Check if the provided tool contains a complete path.
35041      tool_specified="$STRIP"
35042      tool_basename="${tool_specified##*/}"
35043      if test "x$tool_basename" = "x$tool_specified"; then
35044        # A command without a complete path is provided, search $PATH.
35045        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
35046$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
35047        # Extract the first word of "$tool_basename", so it can be a program name with args.
35048set dummy $tool_basename; ac_word=$2
35049{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35050$as_echo_n "checking for $ac_word... " >&6; }
35051if ${ac_cv_path_STRIP+:} false; then :
35052  $as_echo_n "(cached) " >&6
35053else
35054  case $STRIP in
35055  [\\/]* | ?:[\\/]*)
35056  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
35057  ;;
35058  *)
35059  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35060for as_dir in $PATH
35061do
35062  IFS=$as_save_IFS
35063  test -z "$as_dir" && as_dir=.
35064    for ac_exec_ext in '' $ac_executable_extensions; do
35065  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35066    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
35067    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35068    break 2
35069  fi
35070done
35071  done
35072IFS=$as_save_IFS
35073
35074  ;;
35075esac
35076fi
35077STRIP=$ac_cv_path_STRIP
35078if test -n "$STRIP"; then
35079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
35080$as_echo "$STRIP" >&6; }
35081else
35082  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35083$as_echo "no" >&6; }
35084fi
35085
35086
35087        if test "x$STRIP" = x; then
35088          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35089        fi
35090      else
35091        # Otherwise we believe it is a complete path. Use it as it is.
35092        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
35093$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
35094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
35095$as_echo_n "checking for STRIP... " >&6; }
35096        if test ! -x "$tool_specified"; then
35097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35098$as_echo "not found" >&6; }
35099          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
35100        fi
35101        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35102$as_echo "$tool_specified" >&6; }
35103      fi
35104    fi
35105  fi
35106
35107
35108
35109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35110
35111  # First separate the path from the arguments. This will split at the first
35112  # space.
35113  complete="$STRIP"
35114  path="${complete%% *}"
35115  tmp="$complete EOL"
35116  arguments="${tmp#* }"
35117
35118  # Input might be given as Windows format, start by converting to
35119  # unix format.
35120  new_path=`$CYGPATH -u "$path"`
35121
35122  # Now try to locate executable using which
35123  new_path=`$WHICH "$new_path" 2> /dev/null`
35124  # bat and cmd files are not always considered executable in cygwin causing which
35125  # to not find them
35126  if test "x$new_path" = x \
35127      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35128      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35129    new_path=`$CYGPATH -u "$path"`
35130  fi
35131  if test "x$new_path" = x; then
35132    # Oops. Which didn't find the executable.
35133    # The splitting of arguments from the executable at a space might have been incorrect,
35134    # since paths with space are more likely in Windows. Give it another try with the whole
35135    # argument.
35136    path="$complete"
35137    arguments="EOL"
35138    new_path=`$CYGPATH -u "$path"`
35139    new_path=`$WHICH "$new_path" 2> /dev/null`
35140    # bat and cmd files are not always considered executable in cygwin causing which
35141    # to not find them
35142    if test "x$new_path" = x \
35143        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35144        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35145      new_path=`$CYGPATH -u "$path"`
35146    fi
35147    if test "x$new_path" = x; then
35148      # It's still not found. Now this is an unrecoverable error.
35149      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35150$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35151      has_space=`$ECHO "$complete" | $GREP " "`
35152      if test "x$has_space" != x; then
35153        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35154$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35155      fi
35156      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35157    fi
35158  fi
35159
35160  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35161  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35162  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35163  # "foo.exe" is OK but "foo" is an error.
35164  #
35165  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35166  # It is also a way to make sure we got the proper file name for the real test later on.
35167  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35168  if test "x$test_shortpath" = x; then
35169    # Short path failed, file does not exist as specified.
35170    # Try adding .exe or .cmd
35171    if test -f "${new_path}.exe"; then
35172      input_to_shortpath="${new_path}.exe"
35173    elif test -f "${new_path}.cmd"; then
35174      input_to_shortpath="${new_path}.cmd"
35175    else
35176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
35177$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
35178      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35179$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35180      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35181    fi
35182  else
35183    input_to_shortpath="$new_path"
35184  fi
35185
35186  # Call helper function which possibly converts this using DOS-style short mode.
35187  # If so, the updated path is stored in $new_path.
35188  new_path="$input_to_shortpath"
35189
35190  input_path="$input_to_shortpath"
35191  # Check if we need to convert this using DOS-style short mode. If the path
35192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35193  # take no chances and rewrite it.
35194  # Note: m4 eats our [], so we need to use [ and ] instead.
35195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35196  if test "x$has_forbidden_chars" != x; then
35197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35198    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35199    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35200    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35201      # Going to short mode and back again did indeed matter. Since short mode is
35202      # case insensitive, let's make it lowercase to improve readability.
35203      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35204      # Now convert it back to Unix-stile (cygpath)
35205      input_path=`$CYGPATH -u "$shortmode_path"`
35206      new_path="$input_path"
35207    fi
35208  fi
35209
35210  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35211  if test "x$test_cygdrive_prefix" = x; then
35212    # As a simple fix, exclude /usr/bin since it's not a real path.
35213    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35214      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35215      # a path prefixed by /cygdrive for fixpath to work.
35216      new_path="$CYGWIN_ROOT_PATH$input_path"
35217    fi
35218  fi
35219
35220  # remove trailing .exe if any
35221  new_path="${new_path/%.exe/}"
35222
35223  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35224
35225  # First separate the path from the arguments. This will split at the first
35226  # space.
35227  complete="$STRIP"
35228  path="${complete%% *}"
35229  tmp="$complete EOL"
35230  arguments="${tmp#* }"
35231
35232  # Input might be given as Windows format, start by converting to
35233  # unix format.
35234  new_path="$path"
35235
35236  windows_path="$new_path"
35237  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35238    unix_path=`$CYGPATH -u "$windows_path"`
35239    new_path="$unix_path"
35240  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35241    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35242    new_path="$unix_path"
35243  fi
35244
35245
35246  # Now try to locate executable using which
35247  new_path=`$WHICH "$new_path" 2> /dev/null`
35248
35249  if test "x$new_path" = x; then
35250    # Oops. Which didn't find the executable.
35251    # The splitting of arguments from the executable at a space might have been incorrect,
35252    # since paths with space are more likely in Windows. Give it another try with the whole
35253    # argument.
35254    path="$complete"
35255    arguments="EOL"
35256    new_path="$path"
35257
35258  windows_path="$new_path"
35259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35260    unix_path=`$CYGPATH -u "$windows_path"`
35261    new_path="$unix_path"
35262  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35263    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35264    new_path="$unix_path"
35265  fi
35266
35267
35268    new_path=`$WHICH "$new_path" 2> /dev/null`
35269
35270    if test "x$new_path" = x; then
35271      # It's still not found. Now this is an unrecoverable error.
35272      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35273$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35274      has_space=`$ECHO "$complete" | $GREP " "`
35275      if test "x$has_space" != x; then
35276        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35277$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35278      fi
35279      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35280    fi
35281  fi
35282
35283  # Now new_path has a complete unix path to the binary
35284  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35285    # Keep paths in /bin as-is, but remove trailing .exe if any
35286    new_path="${new_path/%.exe/}"
35287    # Do not save /bin paths to all_fixpath_prefixes!
35288  else
35289    # Not in mixed or Windows style, start by that.
35290    new_path=`cmd //c echo $new_path`
35291
35292  input_path="$new_path"
35293  # Check if we need to convert this using DOS-style short mode. If the path
35294  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35295  # take no chances and rewrite it.
35296  # Note: m4 eats our [], so we need to use [ and ] instead.
35297  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35298  if test "x$has_forbidden_chars" != x; then
35299    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35300    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35301  fi
35302
35303    # Output is in $new_path
35304
35305  windows_path="$new_path"
35306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35307    unix_path=`$CYGPATH -u "$windows_path"`
35308    new_path="$unix_path"
35309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35311    new_path="$unix_path"
35312  fi
35313
35314    # remove trailing .exe if any
35315    new_path="${new_path/%.exe/}"
35316
35317    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35318    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35319  fi
35320
35321  else
35322    # We're on a posix platform. Hooray! :)
35323    # First separate the path from the arguments. This will split at the first
35324    # space.
35325    complete="$STRIP"
35326    path="${complete%% *}"
35327    tmp="$complete EOL"
35328    arguments="${tmp#* }"
35329
35330    # Cannot rely on the command "which" here since it doesn't always work.
35331    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35332    if test -z "$is_absolute_path"; then
35333      # Path to executable is not absolute. Find it.
35334      IFS_save="$IFS"
35335      IFS=:
35336      for p in $PATH; do
35337        if test -f "$p/$path" && test -x "$p/$path"; then
35338          new_path="$p/$path"
35339          break
35340        fi
35341      done
35342      IFS="$IFS_save"
35343    else
35344      # This is an absolute path, we can use it without further modifications.
35345      new_path="$path"
35346    fi
35347
35348    if test "x$new_path" = x; then
35349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
35350$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
35351      has_space=`$ECHO "$complete" | $GREP " "`
35352      if test "x$has_space" != x; then
35353        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35354$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35355      fi
35356      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
35357    fi
35358  fi
35359
35360  # Now join together the path and the arguments once again
35361  if test "x$arguments" != xEOL; then
35362    new_complete="$new_path ${arguments% *}"
35363  else
35364    new_complete="$new_path"
35365  fi
35366
35367  if test "x$complete" != "x$new_complete"; then
35368    STRIP="$new_complete"
35369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
35370$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
35371  fi
35372
35373
35374
35375  # Publish this variable in the help.
35376
35377
35378  if test "x$NM" = x; then
35379    # The variable is not set by user, try to locate tool using the code snippet
35380    for ac_prog in nm
35381do
35382  # Extract the first word of "$ac_prog", so it can be a program name with args.
35383set dummy $ac_prog; ac_word=$2
35384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35385$as_echo_n "checking for $ac_word... " >&6; }
35386if ${ac_cv_path_NM+:} false; then :
35387  $as_echo_n "(cached) " >&6
35388else
35389  case $NM in
35390  [\\/]* | ?:[\\/]*)
35391  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35392  ;;
35393  *)
35394  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35395for as_dir in $PATH
35396do
35397  IFS=$as_save_IFS
35398  test -z "$as_dir" && as_dir=.
35399    for ac_exec_ext in '' $ac_executable_extensions; do
35400  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35401    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35402    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35403    break 2
35404  fi
35405done
35406  done
35407IFS=$as_save_IFS
35408
35409  ;;
35410esac
35411fi
35412NM=$ac_cv_path_NM
35413if test -n "$NM"; then
35414  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35415$as_echo "$NM" >&6; }
35416else
35417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35418$as_echo "no" >&6; }
35419fi
35420
35421
35422  test -n "$NM" && break
35423done
35424
35425  else
35426    # The variable is set, but is it from the command line or the environment?
35427
35428    # Try to remove the string !NM! from our list.
35429    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
35430    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35431      # If it failed, the variable was not from the command line. Ignore it,
35432      # but warn the user (except for BASH, which is always set by the calling BASH).
35433      if test "xNM" != xBASH; then
35434        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
35435$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
35436      fi
35437      # Try to locate tool using the code snippet
35438      for ac_prog in nm
35439do
35440  # Extract the first word of "$ac_prog", so it can be a program name with args.
35441set dummy $ac_prog; ac_word=$2
35442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35443$as_echo_n "checking for $ac_word... " >&6; }
35444if ${ac_cv_path_NM+:} false; then :
35445  $as_echo_n "(cached) " >&6
35446else
35447  case $NM in
35448  [\\/]* | ?:[\\/]*)
35449  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35450  ;;
35451  *)
35452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35453for as_dir in $PATH
35454do
35455  IFS=$as_save_IFS
35456  test -z "$as_dir" && as_dir=.
35457    for ac_exec_ext in '' $ac_executable_extensions; do
35458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35459    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35461    break 2
35462  fi
35463done
35464  done
35465IFS=$as_save_IFS
35466
35467  ;;
35468esac
35469fi
35470NM=$ac_cv_path_NM
35471if test -n "$NM"; then
35472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35473$as_echo "$NM" >&6; }
35474else
35475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35476$as_echo "no" >&6; }
35477fi
35478
35479
35480  test -n "$NM" && break
35481done
35482
35483    else
35484      # If it succeeded, then it was overridden by the user. We will use it
35485      # for the tool.
35486
35487      # First remove it from the list of overridden variables, so we can test
35488      # for unknown variables in the end.
35489      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35490
35491      # Check if the provided tool contains a complete path.
35492      tool_specified="$NM"
35493      tool_basename="${tool_specified##*/}"
35494      if test "x$tool_basename" = "x$tool_specified"; then
35495        # A command without a complete path is provided, search $PATH.
35496        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
35497$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
35498        # Extract the first word of "$tool_basename", so it can be a program name with args.
35499set dummy $tool_basename; ac_word=$2
35500{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35501$as_echo_n "checking for $ac_word... " >&6; }
35502if ${ac_cv_path_NM+:} false; then :
35503  $as_echo_n "(cached) " >&6
35504else
35505  case $NM in
35506  [\\/]* | ?:[\\/]*)
35507  ac_cv_path_NM="$NM" # Let the user override the test with a path.
35508  ;;
35509  *)
35510  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35511for as_dir in $PATH
35512do
35513  IFS=$as_save_IFS
35514  test -z "$as_dir" && as_dir=.
35515    for ac_exec_ext in '' $ac_executable_extensions; do
35516  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35517    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
35518    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35519    break 2
35520  fi
35521done
35522  done
35523IFS=$as_save_IFS
35524
35525  ;;
35526esac
35527fi
35528NM=$ac_cv_path_NM
35529if test -n "$NM"; then
35530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
35531$as_echo "$NM" >&6; }
35532else
35533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35534$as_echo "no" >&6; }
35535fi
35536
35537
35538        if test "x$NM" = x; then
35539          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35540        fi
35541      else
35542        # Otherwise we believe it is a complete path. Use it as it is.
35543        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
35544$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
35545        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
35546$as_echo_n "checking for NM... " >&6; }
35547        if test ! -x "$tool_specified"; then
35548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
35549$as_echo "not found" >&6; }
35550          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
35551        fi
35552        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
35553$as_echo "$tool_specified" >&6; }
35554      fi
35555    fi
35556  fi
35557
35558
35559
35560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35561
35562  # First separate the path from the arguments. This will split at the first
35563  # space.
35564  complete="$NM"
35565  path="${complete%% *}"
35566  tmp="$complete EOL"
35567  arguments="${tmp#* }"
35568
35569  # Input might be given as Windows format, start by converting to
35570  # unix format.
35571  new_path=`$CYGPATH -u "$path"`
35572
35573  # Now try to locate executable using which
35574  new_path=`$WHICH "$new_path" 2> /dev/null`
35575  # bat and cmd files are not always considered executable in cygwin causing which
35576  # to not find them
35577  if test "x$new_path" = x \
35578      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35579      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35580    new_path=`$CYGPATH -u "$path"`
35581  fi
35582  if test "x$new_path" = x; then
35583    # Oops. Which didn't find the executable.
35584    # The splitting of arguments from the executable at a space might have been incorrect,
35585    # since paths with space are more likely in Windows. Give it another try with the whole
35586    # argument.
35587    path="$complete"
35588    arguments="EOL"
35589    new_path=`$CYGPATH -u "$path"`
35590    new_path=`$WHICH "$new_path" 2> /dev/null`
35591    # bat and cmd files are not always considered executable in cygwin causing which
35592    # to not find them
35593    if test "x$new_path" = x \
35594        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35595        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35596      new_path=`$CYGPATH -u "$path"`
35597    fi
35598    if test "x$new_path" = x; then
35599      # It's still not found. Now this is an unrecoverable error.
35600      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35601$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35602      has_space=`$ECHO "$complete" | $GREP " "`
35603      if test "x$has_space" != x; then
35604        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35605$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35606      fi
35607      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35608    fi
35609  fi
35610
35611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35614  # "foo.exe" is OK but "foo" is an error.
35615  #
35616  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35617  # It is also a way to make sure we got the proper file name for the real test later on.
35618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35619  if test "x$test_shortpath" = x; then
35620    # Short path failed, file does not exist as specified.
35621    # Try adding .exe or .cmd
35622    if test -f "${new_path}.exe"; then
35623      input_to_shortpath="${new_path}.exe"
35624    elif test -f "${new_path}.cmd"; then
35625      input_to_shortpath="${new_path}.cmd"
35626    else
35627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
35628$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
35629      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35630$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35631      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35632    fi
35633  else
35634    input_to_shortpath="$new_path"
35635  fi
35636
35637  # Call helper function which possibly converts this using DOS-style short mode.
35638  # If so, the updated path is stored in $new_path.
35639  new_path="$input_to_shortpath"
35640
35641  input_path="$input_to_shortpath"
35642  # Check if we need to convert this using DOS-style short mode. If the path
35643  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35644  # take no chances and rewrite it.
35645  # Note: m4 eats our [], so we need to use [ and ] instead.
35646  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35647  if test "x$has_forbidden_chars" != x; then
35648    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35649    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35650    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35651    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35652      # Going to short mode and back again did indeed matter. Since short mode is
35653      # case insensitive, let's make it lowercase to improve readability.
35654      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35655      # Now convert it back to Unix-stile (cygpath)
35656      input_path=`$CYGPATH -u "$shortmode_path"`
35657      new_path="$input_path"
35658    fi
35659  fi
35660
35661  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35662  if test "x$test_cygdrive_prefix" = x; then
35663    # As a simple fix, exclude /usr/bin since it's not a real path.
35664    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35665      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35666      # a path prefixed by /cygdrive for fixpath to work.
35667      new_path="$CYGWIN_ROOT_PATH$input_path"
35668    fi
35669  fi
35670
35671  # remove trailing .exe if any
35672  new_path="${new_path/%.exe/}"
35673
35674  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35675
35676  # First separate the path from the arguments. This will split at the first
35677  # space.
35678  complete="$NM"
35679  path="${complete%% *}"
35680  tmp="$complete EOL"
35681  arguments="${tmp#* }"
35682
35683  # Input might be given as Windows format, start by converting to
35684  # unix format.
35685  new_path="$path"
35686
35687  windows_path="$new_path"
35688  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35689    unix_path=`$CYGPATH -u "$windows_path"`
35690    new_path="$unix_path"
35691  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35692    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35693    new_path="$unix_path"
35694  fi
35695
35696
35697  # Now try to locate executable using which
35698  new_path=`$WHICH "$new_path" 2> /dev/null`
35699
35700  if test "x$new_path" = x; then
35701    # Oops. Which didn't find the executable.
35702    # The splitting of arguments from the executable at a space might have been incorrect,
35703    # since paths with space are more likely in Windows. Give it another try with the whole
35704    # argument.
35705    path="$complete"
35706    arguments="EOL"
35707    new_path="$path"
35708
35709  windows_path="$new_path"
35710  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35711    unix_path=`$CYGPATH -u "$windows_path"`
35712    new_path="$unix_path"
35713  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35714    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35715    new_path="$unix_path"
35716  fi
35717
35718
35719    new_path=`$WHICH "$new_path" 2> /dev/null`
35720
35721    if test "x$new_path" = x; then
35722      # It's still not found. Now this is an unrecoverable error.
35723      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35724$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35725      has_space=`$ECHO "$complete" | $GREP " "`
35726      if test "x$has_space" != x; then
35727        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35728$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35729      fi
35730      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35731    fi
35732  fi
35733
35734  # Now new_path has a complete unix path to the binary
35735  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35736    # Keep paths in /bin as-is, but remove trailing .exe if any
35737    new_path="${new_path/%.exe/}"
35738    # Do not save /bin paths to all_fixpath_prefixes!
35739  else
35740    # Not in mixed or Windows style, start by that.
35741    new_path=`cmd //c echo $new_path`
35742
35743  input_path="$new_path"
35744  # Check if we need to convert this using DOS-style short mode. If the path
35745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35746  # take no chances and rewrite it.
35747  # Note: m4 eats our [], so we need to use [ and ] instead.
35748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35749  if test "x$has_forbidden_chars" != x; then
35750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35751    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35752  fi
35753
35754    # Output is in $new_path
35755
35756  windows_path="$new_path"
35757  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35758    unix_path=`$CYGPATH -u "$windows_path"`
35759    new_path="$unix_path"
35760  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35761    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35762    new_path="$unix_path"
35763  fi
35764
35765    # remove trailing .exe if any
35766    new_path="${new_path/%.exe/}"
35767
35768    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35769    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35770  fi
35771
35772  else
35773    # We're on a posix platform. Hooray! :)
35774    # First separate the path from the arguments. This will split at the first
35775    # space.
35776    complete="$NM"
35777    path="${complete%% *}"
35778    tmp="$complete EOL"
35779    arguments="${tmp#* }"
35780
35781    # Cannot rely on the command "which" here since it doesn't always work.
35782    is_absolute_path=`$ECHO "$path" | $GREP ^/`
35783    if test -z "$is_absolute_path"; then
35784      # Path to executable is not absolute. Find it.
35785      IFS_save="$IFS"
35786      IFS=:
35787      for p in $PATH; do
35788        if test -f "$p/$path" && test -x "$p/$path"; then
35789          new_path="$p/$path"
35790          break
35791        fi
35792      done
35793      IFS="$IFS_save"
35794    else
35795      # This is an absolute path, we can use it without further modifications.
35796      new_path="$path"
35797    fi
35798
35799    if test "x$new_path" = x; then
35800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
35801$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
35802      has_space=`$ECHO "$complete" | $GREP " "`
35803      if test "x$has_space" != x; then
35804        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35805$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35806      fi
35807      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
35808    fi
35809  fi
35810
35811  # Now join together the path and the arguments once again
35812  if test "x$arguments" != xEOL; then
35813    new_complete="$new_path ${arguments% *}"
35814  else
35815    new_complete="$new_path"
35816  fi
35817
35818  if test "x$complete" != "x$new_complete"; then
35819    NM="$new_complete"
35820    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
35821$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
35822  fi
35823
35824
35825
35826  # Publish this variable in the help.
35827
35828
35829  if test "x$GNM" = x; then
35830    # The variable is not set by user, try to locate tool using the code snippet
35831    for ac_prog in gnm
35832do
35833  # Extract the first word of "$ac_prog", so it can be a program name with args.
35834set dummy $ac_prog; ac_word=$2
35835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35836$as_echo_n "checking for $ac_word... " >&6; }
35837if ${ac_cv_path_GNM+:} false; then :
35838  $as_echo_n "(cached) " >&6
35839else
35840  case $GNM in
35841  [\\/]* | ?:[\\/]*)
35842  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35843  ;;
35844  *)
35845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35846for as_dir in $PATH
35847do
35848  IFS=$as_save_IFS
35849  test -z "$as_dir" && as_dir=.
35850    for ac_exec_ext in '' $ac_executable_extensions; do
35851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35852    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35854    break 2
35855  fi
35856done
35857  done
35858IFS=$as_save_IFS
35859
35860  ;;
35861esac
35862fi
35863GNM=$ac_cv_path_GNM
35864if test -n "$GNM"; then
35865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35866$as_echo "$GNM" >&6; }
35867else
35868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35869$as_echo "no" >&6; }
35870fi
35871
35872
35873  test -n "$GNM" && break
35874done
35875
35876  else
35877    # The variable is set, but is it from the command line or the environment?
35878
35879    # Try to remove the string !GNM! from our list.
35880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
35881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
35882      # If it failed, the variable was not from the command line. Ignore it,
35883      # but warn the user (except for BASH, which is always set by the calling BASH).
35884      if test "xGNM" != xBASH; then
35885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
35886$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
35887      fi
35888      # Try to locate tool using the code snippet
35889      for ac_prog in gnm
35890do
35891  # Extract the first word of "$ac_prog", so it can be a program name with args.
35892set dummy $ac_prog; ac_word=$2
35893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35894$as_echo_n "checking for $ac_word... " >&6; }
35895if ${ac_cv_path_GNM+:} false; then :
35896  $as_echo_n "(cached) " >&6
35897else
35898  case $GNM in
35899  [\\/]* | ?:[\\/]*)
35900  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35901  ;;
35902  *)
35903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35904for as_dir in $PATH
35905do
35906  IFS=$as_save_IFS
35907  test -z "$as_dir" && as_dir=.
35908    for ac_exec_ext in '' $ac_executable_extensions; do
35909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35910    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35912    break 2
35913  fi
35914done
35915  done
35916IFS=$as_save_IFS
35917
35918  ;;
35919esac
35920fi
35921GNM=$ac_cv_path_GNM
35922if test -n "$GNM"; then
35923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35924$as_echo "$GNM" >&6; }
35925else
35926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35927$as_echo "no" >&6; }
35928fi
35929
35930
35931  test -n "$GNM" && break
35932done
35933
35934    else
35935      # If it succeeded, then it was overridden by the user. We will use it
35936      # for the tool.
35937
35938      # First remove it from the list of overridden variables, so we can test
35939      # for unknown variables in the end.
35940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
35941
35942      # Check if the provided tool contains a complete path.
35943      tool_specified="$GNM"
35944      tool_basename="${tool_specified##*/}"
35945      if test "x$tool_basename" = "x$tool_specified"; then
35946        # A command without a complete path is provided, search $PATH.
35947        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
35948$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
35949        # Extract the first word of "$tool_basename", so it can be a program name with args.
35950set dummy $tool_basename; ac_word=$2
35951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35952$as_echo_n "checking for $ac_word... " >&6; }
35953if ${ac_cv_path_GNM+:} false; then :
35954  $as_echo_n "(cached) " >&6
35955else
35956  case $GNM in
35957  [\\/]* | ?:[\\/]*)
35958  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
35959  ;;
35960  *)
35961  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35962for as_dir in $PATH
35963do
35964  IFS=$as_save_IFS
35965  test -z "$as_dir" && as_dir=.
35966    for ac_exec_ext in '' $ac_executable_extensions; do
35967  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35968    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
35969    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35970    break 2
35971  fi
35972done
35973  done
35974IFS=$as_save_IFS
35975
35976  ;;
35977esac
35978fi
35979GNM=$ac_cv_path_GNM
35980if test -n "$GNM"; then
35981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
35982$as_echo "$GNM" >&6; }
35983else
35984  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35985$as_echo "no" >&6; }
35986fi
35987
35988
35989        if test "x$GNM" = x; then
35990          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
35991        fi
35992      else
35993        # Otherwise we believe it is a complete path. Use it as it is.
35994        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
35995$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
35996        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
35997$as_echo_n "checking for GNM... " >&6; }
35998        if test ! -x "$tool_specified"; then
35999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36000$as_echo "not found" >&6; }
36001          as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
36002        fi
36003        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36004$as_echo "$tool_specified" >&6; }
36005      fi
36006    fi
36007  fi
36008
36009
36010
36011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36012
36013  # First separate the path from the arguments. This will split at the first
36014  # space.
36015  complete="$GNM"
36016  path="${complete%% *}"
36017  tmp="$complete EOL"
36018  arguments="${tmp#* }"
36019
36020  # Input might be given as Windows format, start by converting to
36021  # unix format.
36022  new_path=`$CYGPATH -u "$path"`
36023
36024  # Now try to locate executable using which
36025  new_path=`$WHICH "$new_path" 2> /dev/null`
36026  # bat and cmd files are not always considered executable in cygwin causing which
36027  # to not find them
36028  if test "x$new_path" = x \
36029      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36030      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36031    new_path=`$CYGPATH -u "$path"`
36032  fi
36033  if test "x$new_path" = x; then
36034    # Oops. Which didn't find the executable.
36035    # The splitting of arguments from the executable at a space might have been incorrect,
36036    # since paths with space are more likely in Windows. Give it another try with the whole
36037    # argument.
36038    path="$complete"
36039    arguments="EOL"
36040    new_path=`$CYGPATH -u "$path"`
36041    new_path=`$WHICH "$new_path" 2> /dev/null`
36042    # bat and cmd files are not always considered executable in cygwin causing which
36043    # to not find them
36044    if test "x$new_path" = x \
36045        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36046        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36047      new_path=`$CYGPATH -u "$path"`
36048    fi
36049    if test "x$new_path" = x; then
36050      # It's still not found. Now this is an unrecoverable error.
36051      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36052$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36053      has_space=`$ECHO "$complete" | $GREP " "`
36054      if test "x$has_space" != x; then
36055        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36056$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36057      fi
36058      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36059    fi
36060  fi
36061
36062  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36063  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36064  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36065  # "foo.exe" is OK but "foo" is an error.
36066  #
36067  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36068  # It is also a way to make sure we got the proper file name for the real test later on.
36069  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36070  if test "x$test_shortpath" = x; then
36071    # Short path failed, file does not exist as specified.
36072    # Try adding .exe or .cmd
36073    if test -f "${new_path}.exe"; then
36074      input_to_shortpath="${new_path}.exe"
36075    elif test -f "${new_path}.cmd"; then
36076      input_to_shortpath="${new_path}.cmd"
36077    else
36078      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
36079$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
36080      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36081$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36082      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36083    fi
36084  else
36085    input_to_shortpath="$new_path"
36086  fi
36087
36088  # Call helper function which possibly converts this using DOS-style short mode.
36089  # If so, the updated path is stored in $new_path.
36090  new_path="$input_to_shortpath"
36091
36092  input_path="$input_to_shortpath"
36093  # Check if we need to convert this using DOS-style short mode. If the path
36094  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36095  # take no chances and rewrite it.
36096  # Note: m4 eats our [], so we need to use [ and ] instead.
36097  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36098  if test "x$has_forbidden_chars" != x; then
36099    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36100    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36101    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36102    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36103      # Going to short mode and back again did indeed matter. Since short mode is
36104      # case insensitive, let's make it lowercase to improve readability.
36105      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36106      # Now convert it back to Unix-stile (cygpath)
36107      input_path=`$CYGPATH -u "$shortmode_path"`
36108      new_path="$input_path"
36109    fi
36110  fi
36111
36112  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36113  if test "x$test_cygdrive_prefix" = x; then
36114    # As a simple fix, exclude /usr/bin since it's not a real path.
36115    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36116      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36117      # a path prefixed by /cygdrive for fixpath to work.
36118      new_path="$CYGWIN_ROOT_PATH$input_path"
36119    fi
36120  fi
36121
36122  # remove trailing .exe if any
36123  new_path="${new_path/%.exe/}"
36124
36125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36126
36127  # First separate the path from the arguments. This will split at the first
36128  # space.
36129  complete="$GNM"
36130  path="${complete%% *}"
36131  tmp="$complete EOL"
36132  arguments="${tmp#* }"
36133
36134  # Input might be given as Windows format, start by converting to
36135  # unix format.
36136  new_path="$path"
36137
36138  windows_path="$new_path"
36139  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36140    unix_path=`$CYGPATH -u "$windows_path"`
36141    new_path="$unix_path"
36142  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36143    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36144    new_path="$unix_path"
36145  fi
36146
36147
36148  # Now try to locate executable using which
36149  new_path=`$WHICH "$new_path" 2> /dev/null`
36150
36151  if test "x$new_path" = x; then
36152    # Oops. Which didn't find the executable.
36153    # The splitting of arguments from the executable at a space might have been incorrect,
36154    # since paths with space are more likely in Windows. Give it another try with the whole
36155    # argument.
36156    path="$complete"
36157    arguments="EOL"
36158    new_path="$path"
36159
36160  windows_path="$new_path"
36161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36162    unix_path=`$CYGPATH -u "$windows_path"`
36163    new_path="$unix_path"
36164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36166    new_path="$unix_path"
36167  fi
36168
36169
36170    new_path=`$WHICH "$new_path" 2> /dev/null`
36171
36172    if test "x$new_path" = x; then
36173      # It's still not found. Now this is an unrecoverable error.
36174      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36175$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36176      has_space=`$ECHO "$complete" | $GREP " "`
36177      if test "x$has_space" != x; then
36178        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36179$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36180      fi
36181      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36182    fi
36183  fi
36184
36185  # Now new_path has a complete unix path to the binary
36186  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36187    # Keep paths in /bin as-is, but remove trailing .exe if any
36188    new_path="${new_path/%.exe/}"
36189    # Do not save /bin paths to all_fixpath_prefixes!
36190  else
36191    # Not in mixed or Windows style, start by that.
36192    new_path=`cmd //c echo $new_path`
36193
36194  input_path="$new_path"
36195  # Check if we need to convert this using DOS-style short mode. If the path
36196  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36197  # take no chances and rewrite it.
36198  # Note: m4 eats our [], so we need to use [ and ] instead.
36199  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36200  if test "x$has_forbidden_chars" != x; then
36201    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36202    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36203  fi
36204
36205    # Output is in $new_path
36206
36207  windows_path="$new_path"
36208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36209    unix_path=`$CYGPATH -u "$windows_path"`
36210    new_path="$unix_path"
36211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36213    new_path="$unix_path"
36214  fi
36215
36216    # remove trailing .exe if any
36217    new_path="${new_path/%.exe/}"
36218
36219    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36220    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36221  fi
36222
36223  else
36224    # We're on a posix platform. Hooray! :)
36225    # First separate the path from the arguments. This will split at the first
36226    # space.
36227    complete="$GNM"
36228    path="${complete%% *}"
36229    tmp="$complete EOL"
36230    arguments="${tmp#* }"
36231
36232    # Cannot rely on the command "which" here since it doesn't always work.
36233    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36234    if test -z "$is_absolute_path"; then
36235      # Path to executable is not absolute. Find it.
36236      IFS_save="$IFS"
36237      IFS=:
36238      for p in $PATH; do
36239        if test -f "$p/$path" && test -x "$p/$path"; then
36240          new_path="$p/$path"
36241          break
36242        fi
36243      done
36244      IFS="$IFS_save"
36245    else
36246      # This is an absolute path, we can use it without further modifications.
36247      new_path="$path"
36248    fi
36249
36250    if test "x$new_path" = x; then
36251      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
36252$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
36253      has_space=`$ECHO "$complete" | $GREP " "`
36254      if test "x$has_space" != x; then
36255        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36256$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36257      fi
36258      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
36259    fi
36260  fi
36261
36262  # Now join together the path and the arguments once again
36263  if test "x$arguments" != xEOL; then
36264    new_complete="$new_path ${arguments% *}"
36265  else
36266    new_complete="$new_path"
36267  fi
36268
36269  if test "x$complete" != "x$new_complete"; then
36270    GNM="$new_complete"
36271    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
36272$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
36273  fi
36274
36275
36276
36277
36278  # Publish this variable in the help.
36279
36280
36281  if test "x$MCS" = x; then
36282    # The variable is not set by user, try to locate tool using the code snippet
36283    for ac_prog in mcs
36284do
36285  # Extract the first word of "$ac_prog", so it can be a program name with args.
36286set dummy $ac_prog; ac_word=$2
36287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36288$as_echo_n "checking for $ac_word... " >&6; }
36289if ${ac_cv_path_MCS+:} false; then :
36290  $as_echo_n "(cached) " >&6
36291else
36292  case $MCS in
36293  [\\/]* | ?:[\\/]*)
36294  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36295  ;;
36296  *)
36297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36298for as_dir in $PATH
36299do
36300  IFS=$as_save_IFS
36301  test -z "$as_dir" && as_dir=.
36302    for ac_exec_ext in '' $ac_executable_extensions; do
36303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36304    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36306    break 2
36307  fi
36308done
36309  done
36310IFS=$as_save_IFS
36311
36312  ;;
36313esac
36314fi
36315MCS=$ac_cv_path_MCS
36316if test -n "$MCS"; then
36317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36318$as_echo "$MCS" >&6; }
36319else
36320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36321$as_echo "no" >&6; }
36322fi
36323
36324
36325  test -n "$MCS" && break
36326done
36327
36328  else
36329    # The variable is set, but is it from the command line or the environment?
36330
36331    # Try to remove the string !MCS! from our list.
36332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MCS!/}
36333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36334      # If it failed, the variable was not from the command line. Ignore it,
36335      # but warn the user (except for BASH, which is always set by the calling BASH).
36336      if test "xMCS" != xBASH; then
36337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&5
36338$as_echo "$as_me: WARNING: Ignoring value of MCS from the environment. Use command line variables instead." >&2;}
36339      fi
36340      # Try to locate tool using the code snippet
36341      for ac_prog in mcs
36342do
36343  # Extract the first word of "$ac_prog", so it can be a program name with args.
36344set dummy $ac_prog; ac_word=$2
36345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36346$as_echo_n "checking for $ac_word... " >&6; }
36347if ${ac_cv_path_MCS+:} false; then :
36348  $as_echo_n "(cached) " >&6
36349else
36350  case $MCS in
36351  [\\/]* | ?:[\\/]*)
36352  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36353  ;;
36354  *)
36355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36356for as_dir in $PATH
36357do
36358  IFS=$as_save_IFS
36359  test -z "$as_dir" && as_dir=.
36360    for ac_exec_ext in '' $ac_executable_extensions; do
36361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36362    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36364    break 2
36365  fi
36366done
36367  done
36368IFS=$as_save_IFS
36369
36370  ;;
36371esac
36372fi
36373MCS=$ac_cv_path_MCS
36374if test -n "$MCS"; then
36375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36376$as_echo "$MCS" >&6; }
36377else
36378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36379$as_echo "no" >&6; }
36380fi
36381
36382
36383  test -n "$MCS" && break
36384done
36385
36386    else
36387      # If it succeeded, then it was overridden by the user. We will use it
36388      # for the tool.
36389
36390      # First remove it from the list of overridden variables, so we can test
36391      # for unknown variables in the end.
36392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36393
36394      # Check if the provided tool contains a complete path.
36395      tool_specified="$MCS"
36396      tool_basename="${tool_specified##*/}"
36397      if test "x$tool_basename" = "x$tool_specified"; then
36398        # A command without a complete path is provided, search $PATH.
36399        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MCS=$tool_basename" >&5
36400$as_echo "$as_me: Will search for user supplied tool MCS=$tool_basename" >&6;}
36401        # Extract the first word of "$tool_basename", so it can be a program name with args.
36402set dummy $tool_basename; ac_word=$2
36403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36404$as_echo_n "checking for $ac_word... " >&6; }
36405if ${ac_cv_path_MCS+:} false; then :
36406  $as_echo_n "(cached) " >&6
36407else
36408  case $MCS in
36409  [\\/]* | ?:[\\/]*)
36410  ac_cv_path_MCS="$MCS" # Let the user override the test with a path.
36411  ;;
36412  *)
36413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36414for as_dir in $PATH
36415do
36416  IFS=$as_save_IFS
36417  test -z "$as_dir" && as_dir=.
36418    for ac_exec_ext in '' $ac_executable_extensions; do
36419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36420    ac_cv_path_MCS="$as_dir/$ac_word$ac_exec_ext"
36421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36422    break 2
36423  fi
36424done
36425  done
36426IFS=$as_save_IFS
36427
36428  ;;
36429esac
36430fi
36431MCS=$ac_cv_path_MCS
36432if test -n "$MCS"; then
36433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MCS" >&5
36434$as_echo "$MCS" >&6; }
36435else
36436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36437$as_echo "no" >&6; }
36438fi
36439
36440
36441        if test "x$MCS" = x; then
36442          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36443        fi
36444      else
36445        # Otherwise we believe it is a complete path. Use it as it is.
36446        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MCS=$tool_specified" >&5
36447$as_echo "$as_me: Will use user supplied tool MCS=$tool_specified" >&6;}
36448        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MCS" >&5
36449$as_echo_n "checking for MCS... " >&6; }
36450        if test ! -x "$tool_specified"; then
36451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36452$as_echo "not found" >&6; }
36453          as_fn_error $? "User supplied tool MCS=$tool_specified does not exist or is not executable" "$LINENO" 5
36454        fi
36455        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36456$as_echo "$tool_specified" >&6; }
36457      fi
36458    fi
36459  fi
36460
36461
36462
36463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36464
36465  # First separate the path from the arguments. This will split at the first
36466  # space.
36467  complete="$MCS"
36468  path="${complete%% *}"
36469  tmp="$complete EOL"
36470  arguments="${tmp#* }"
36471
36472  # Input might be given as Windows format, start by converting to
36473  # unix format.
36474  new_path=`$CYGPATH -u "$path"`
36475
36476  # Now try to locate executable using which
36477  new_path=`$WHICH "$new_path" 2> /dev/null`
36478  # bat and cmd files are not always considered executable in cygwin causing which
36479  # to not find them
36480  if test "x$new_path" = x \
36481      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36482      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36483    new_path=`$CYGPATH -u "$path"`
36484  fi
36485  if test "x$new_path" = x; then
36486    # Oops. Which didn't find the executable.
36487    # The splitting of arguments from the executable at a space might have been incorrect,
36488    # since paths with space are more likely in Windows. Give it another try with the whole
36489    # argument.
36490    path="$complete"
36491    arguments="EOL"
36492    new_path=`$CYGPATH -u "$path"`
36493    new_path=`$WHICH "$new_path" 2> /dev/null`
36494    # bat and cmd files are not always considered executable in cygwin causing which
36495    # to not find them
36496    if test "x$new_path" = x \
36497        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36498        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36499      new_path=`$CYGPATH -u "$path"`
36500    fi
36501    if test "x$new_path" = x; then
36502      # It's still not found. Now this is an unrecoverable error.
36503      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36504$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36505      has_space=`$ECHO "$complete" | $GREP " "`
36506      if test "x$has_space" != x; then
36507        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36508$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36509      fi
36510      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36511    fi
36512  fi
36513
36514  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36515  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36516  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36517  # "foo.exe" is OK but "foo" is an error.
36518  #
36519  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36520  # It is also a way to make sure we got the proper file name for the real test later on.
36521  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36522  if test "x$test_shortpath" = x; then
36523    # Short path failed, file does not exist as specified.
36524    # Try adding .exe or .cmd
36525    if test -f "${new_path}.exe"; then
36526      input_to_shortpath="${new_path}.exe"
36527    elif test -f "${new_path}.cmd"; then
36528      input_to_shortpath="${new_path}.cmd"
36529    else
36530      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$new_path\", is invalid." >&5
36531$as_echo "$as_me: The path of MCS, which resolves as \"$new_path\", is invalid." >&6;}
36532      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36533$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36534      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36535    fi
36536  else
36537    input_to_shortpath="$new_path"
36538  fi
36539
36540  # Call helper function which possibly converts this using DOS-style short mode.
36541  # If so, the updated path is stored in $new_path.
36542  new_path="$input_to_shortpath"
36543
36544  input_path="$input_to_shortpath"
36545  # Check if we need to convert this using DOS-style short mode. If the path
36546  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36547  # take no chances and rewrite it.
36548  # Note: m4 eats our [], so we need to use [ and ] instead.
36549  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36550  if test "x$has_forbidden_chars" != x; then
36551    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36552    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36553    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36554    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36555      # Going to short mode and back again did indeed matter. Since short mode is
36556      # case insensitive, let's make it lowercase to improve readability.
36557      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36558      # Now convert it back to Unix-stile (cygpath)
36559      input_path=`$CYGPATH -u "$shortmode_path"`
36560      new_path="$input_path"
36561    fi
36562  fi
36563
36564  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36565  if test "x$test_cygdrive_prefix" = x; then
36566    # As a simple fix, exclude /usr/bin since it's not a real path.
36567    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36568      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36569      # a path prefixed by /cygdrive for fixpath to work.
36570      new_path="$CYGWIN_ROOT_PATH$input_path"
36571    fi
36572  fi
36573
36574  # remove trailing .exe if any
36575  new_path="${new_path/%.exe/}"
36576
36577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36578
36579  # First separate the path from the arguments. This will split at the first
36580  # space.
36581  complete="$MCS"
36582  path="${complete%% *}"
36583  tmp="$complete EOL"
36584  arguments="${tmp#* }"
36585
36586  # Input might be given as Windows format, start by converting to
36587  # unix format.
36588  new_path="$path"
36589
36590  windows_path="$new_path"
36591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36592    unix_path=`$CYGPATH -u "$windows_path"`
36593    new_path="$unix_path"
36594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36596    new_path="$unix_path"
36597  fi
36598
36599
36600  # Now try to locate executable using which
36601  new_path=`$WHICH "$new_path" 2> /dev/null`
36602
36603  if test "x$new_path" = x; then
36604    # Oops. Which didn't find the executable.
36605    # The splitting of arguments from the executable at a space might have been incorrect,
36606    # since paths with space are more likely in Windows. Give it another try with the whole
36607    # argument.
36608    path="$complete"
36609    arguments="EOL"
36610    new_path="$path"
36611
36612  windows_path="$new_path"
36613  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36614    unix_path=`$CYGPATH -u "$windows_path"`
36615    new_path="$unix_path"
36616  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36617    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36618    new_path="$unix_path"
36619  fi
36620
36621
36622    new_path=`$WHICH "$new_path" 2> /dev/null`
36623
36624    if test "x$new_path" = x; then
36625      # It's still not found. Now this is an unrecoverable error.
36626      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36627$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36628      has_space=`$ECHO "$complete" | $GREP " "`
36629      if test "x$has_space" != x; then
36630        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36631$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36632      fi
36633      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36634    fi
36635  fi
36636
36637  # Now new_path has a complete unix path to the binary
36638  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36639    # Keep paths in /bin as-is, but remove trailing .exe if any
36640    new_path="${new_path/%.exe/}"
36641    # Do not save /bin paths to all_fixpath_prefixes!
36642  else
36643    # Not in mixed or Windows style, start by that.
36644    new_path=`cmd //c echo $new_path`
36645
36646  input_path="$new_path"
36647  # Check if we need to convert this using DOS-style short mode. If the path
36648  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36649  # take no chances and rewrite it.
36650  # Note: m4 eats our [], so we need to use [ and ] instead.
36651  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36652  if test "x$has_forbidden_chars" != x; then
36653    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36654    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36655  fi
36656
36657    # Output is in $new_path
36658
36659  windows_path="$new_path"
36660  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36661    unix_path=`$CYGPATH -u "$windows_path"`
36662    new_path="$unix_path"
36663  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36664    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36665    new_path="$unix_path"
36666  fi
36667
36668    # remove trailing .exe if any
36669    new_path="${new_path/%.exe/}"
36670
36671    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36672    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36673  fi
36674
36675  else
36676    # We're on a posix platform. Hooray! :)
36677    # First separate the path from the arguments. This will split at the first
36678    # space.
36679    complete="$MCS"
36680    path="${complete%% *}"
36681    tmp="$complete EOL"
36682    arguments="${tmp#* }"
36683
36684    # Cannot rely on the command "which" here since it doesn't always work.
36685    is_absolute_path=`$ECHO "$path" | $GREP ^/`
36686    if test -z "$is_absolute_path"; then
36687      # Path to executable is not absolute. Find it.
36688      IFS_save="$IFS"
36689      IFS=:
36690      for p in $PATH; do
36691        if test -f "$p/$path" && test -x "$p/$path"; then
36692          new_path="$p/$path"
36693          break
36694        fi
36695      done
36696      IFS="$IFS_save"
36697    else
36698      # This is an absolute path, we can use it without further modifications.
36699      new_path="$path"
36700    fi
36701
36702    if test "x$new_path" = x; then
36703      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MCS, which resolves as \"$complete\", is not found." >&5
36704$as_echo "$as_me: The path of MCS, which resolves as \"$complete\", is not found." >&6;}
36705      has_space=`$ECHO "$complete" | $GREP " "`
36706      if test "x$has_space" != x; then
36707        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36708$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36709      fi
36710      as_fn_error $? "Cannot locate the the path of MCS" "$LINENO" 5
36711    fi
36712  fi
36713
36714  # Now join together the path and the arguments once again
36715  if test "x$arguments" != xEOL; then
36716    new_complete="$new_path ${arguments% *}"
36717  else
36718    new_complete="$new_path"
36719  fi
36720
36721  if test "x$complete" != "x$new_complete"; then
36722    MCS="$new_complete"
36723    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MCS to \"$new_complete\"" >&5
36724$as_echo "$as_me: Rewriting MCS to \"$new_complete\"" >&6;}
36725  fi
36726
36727  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
36728    # FIXME: we should unify this with the solaris case above.
36729
36730
36731  # Publish this variable in the help.
36732
36733
36734  if test "x$STRIP" = x; then
36735    # The variable is not set by user, try to locate tool using the code snippet
36736    if test -n "$ac_tool_prefix"; then
36737  for ac_prog in strip
36738  do
36739    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36742$as_echo_n "checking for $ac_word... " >&6; }
36743if ${ac_cv_prog_STRIP+:} false; then :
36744  $as_echo_n "(cached) " >&6
36745else
36746  if test -n "$STRIP"; then
36747  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36748else
36749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36750for as_dir in $PATH
36751do
36752  IFS=$as_save_IFS
36753  test -z "$as_dir" && as_dir=.
36754    for ac_exec_ext in '' $ac_executable_extensions; do
36755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36756    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36758    break 2
36759  fi
36760done
36761  done
36762IFS=$as_save_IFS
36763
36764fi
36765fi
36766STRIP=$ac_cv_prog_STRIP
36767if test -n "$STRIP"; then
36768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36769$as_echo "$STRIP" >&6; }
36770else
36771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36772$as_echo "no" >&6; }
36773fi
36774
36775
36776    test -n "$STRIP" && break
36777  done
36778fi
36779if test -z "$STRIP"; then
36780  ac_ct_STRIP=$STRIP
36781  for ac_prog in strip
36782do
36783  # Extract the first word of "$ac_prog", so it can be a program name with args.
36784set dummy $ac_prog; ac_word=$2
36785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36786$as_echo_n "checking for $ac_word... " >&6; }
36787if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36788  $as_echo_n "(cached) " >&6
36789else
36790  if test -n "$ac_ct_STRIP"; then
36791  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36792else
36793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36794for as_dir in $PATH
36795do
36796  IFS=$as_save_IFS
36797  test -z "$as_dir" && as_dir=.
36798    for ac_exec_ext in '' $ac_executable_extensions; do
36799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36800    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36802    break 2
36803  fi
36804done
36805  done
36806IFS=$as_save_IFS
36807
36808fi
36809fi
36810ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36811if test -n "$ac_ct_STRIP"; then
36812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36813$as_echo "$ac_ct_STRIP" >&6; }
36814else
36815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36816$as_echo "no" >&6; }
36817fi
36818
36819
36820  test -n "$ac_ct_STRIP" && break
36821done
36822
36823  if test "x$ac_ct_STRIP" = x; then
36824    STRIP=""
36825  else
36826    case $cross_compiling:$ac_tool_warned in
36827yes:)
36828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36830ac_tool_warned=yes ;;
36831esac
36832    STRIP=$ac_ct_STRIP
36833  fi
36834fi
36835
36836  else
36837    # The variable is set, but is it from the command line or the environment?
36838
36839    # Try to remove the string !STRIP! from our list.
36840    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
36841    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36842      # If it failed, the variable was not from the command line. Ignore it,
36843      # but warn the user (except for BASH, which is always set by the calling BASH).
36844      if test "xSTRIP" != xBASH; then
36845        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
36846$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
36847      fi
36848      # Try to locate tool using the code snippet
36849      if test -n "$ac_tool_prefix"; then
36850  for ac_prog in strip
36851  do
36852    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36853set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36854{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36855$as_echo_n "checking for $ac_word... " >&6; }
36856if ${ac_cv_prog_STRIP+:} false; then :
36857  $as_echo_n "(cached) " >&6
36858else
36859  if test -n "$STRIP"; then
36860  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
36861else
36862as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36863for as_dir in $PATH
36864do
36865  IFS=$as_save_IFS
36866  test -z "$as_dir" && as_dir=.
36867    for ac_exec_ext in '' $ac_executable_extensions; do
36868  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36869    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
36870    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36871    break 2
36872  fi
36873done
36874  done
36875IFS=$as_save_IFS
36876
36877fi
36878fi
36879STRIP=$ac_cv_prog_STRIP
36880if test -n "$STRIP"; then
36881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36882$as_echo "$STRIP" >&6; }
36883else
36884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36885$as_echo "no" >&6; }
36886fi
36887
36888
36889    test -n "$STRIP" && break
36890  done
36891fi
36892if test -z "$STRIP"; then
36893  ac_ct_STRIP=$STRIP
36894  for ac_prog in strip
36895do
36896  # Extract the first word of "$ac_prog", so it can be a program name with args.
36897set dummy $ac_prog; ac_word=$2
36898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36899$as_echo_n "checking for $ac_word... " >&6; }
36900if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
36901  $as_echo_n "(cached) " >&6
36902else
36903  if test -n "$ac_ct_STRIP"; then
36904  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
36905else
36906as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36907for as_dir in $PATH
36908do
36909  IFS=$as_save_IFS
36910  test -z "$as_dir" && as_dir=.
36911    for ac_exec_ext in '' $ac_executable_extensions; do
36912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36913    ac_cv_prog_ac_ct_STRIP="$ac_prog"
36914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36915    break 2
36916  fi
36917done
36918  done
36919IFS=$as_save_IFS
36920
36921fi
36922fi
36923ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
36924if test -n "$ac_ct_STRIP"; then
36925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
36926$as_echo "$ac_ct_STRIP" >&6; }
36927else
36928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36929$as_echo "no" >&6; }
36930fi
36931
36932
36933  test -n "$ac_ct_STRIP" && break
36934done
36935
36936  if test "x$ac_ct_STRIP" = x; then
36937    STRIP=""
36938  else
36939    case $cross_compiling:$ac_tool_warned in
36940yes:)
36941{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36942$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36943ac_tool_warned=yes ;;
36944esac
36945    STRIP=$ac_ct_STRIP
36946  fi
36947fi
36948
36949    else
36950      # If it succeeded, then it was overridden by the user. We will use it
36951      # for the tool.
36952
36953      # First remove it from the list of overridden variables, so we can test
36954      # for unknown variables in the end.
36955      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36956
36957      # Check if the provided tool contains a complete path.
36958      tool_specified="$STRIP"
36959      tool_basename="${tool_specified##*/}"
36960      if test "x$tool_basename" = "x$tool_specified"; then
36961        # A command without a complete path is provided, search $PATH.
36962        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
36963$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
36964        # Extract the first word of "$tool_basename", so it can be a program name with args.
36965set dummy $tool_basename; ac_word=$2
36966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36967$as_echo_n "checking for $ac_word... " >&6; }
36968if ${ac_cv_path_STRIP+:} false; then :
36969  $as_echo_n "(cached) " >&6
36970else
36971  case $STRIP in
36972  [\\/]* | ?:[\\/]*)
36973  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
36974  ;;
36975  *)
36976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36977for as_dir in $PATH
36978do
36979  IFS=$as_save_IFS
36980  test -z "$as_dir" && as_dir=.
36981    for ac_exec_ext in '' $ac_executable_extensions; do
36982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36983    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
36984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36985    break 2
36986  fi
36987done
36988  done
36989IFS=$as_save_IFS
36990
36991  ;;
36992esac
36993fi
36994STRIP=$ac_cv_path_STRIP
36995if test -n "$STRIP"; then
36996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
36997$as_echo "$STRIP" >&6; }
36998else
36999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37000$as_echo "no" >&6; }
37001fi
37002
37003
37004        if test "x$STRIP" = x; then
37005          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37006        fi
37007      else
37008        # Otherwise we believe it is a complete path. Use it as it is.
37009        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
37010$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
37011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
37012$as_echo_n "checking for STRIP... " >&6; }
37013        if test ! -x "$tool_specified"; then
37014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37015$as_echo "not found" >&6; }
37016          as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
37017        fi
37018        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37019$as_echo "$tool_specified" >&6; }
37020      fi
37021    fi
37022  fi
37023
37024
37025
37026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37027
37028  # First separate the path from the arguments. This will split at the first
37029  # space.
37030  complete="$STRIP"
37031  path="${complete%% *}"
37032  tmp="$complete EOL"
37033  arguments="${tmp#* }"
37034
37035  # Input might be given as Windows format, start by converting to
37036  # unix format.
37037  new_path=`$CYGPATH -u "$path"`
37038
37039  # Now try to locate executable using which
37040  new_path=`$WHICH "$new_path" 2> /dev/null`
37041  # bat and cmd files are not always considered executable in cygwin causing which
37042  # to not find them
37043  if test "x$new_path" = x \
37044      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37045      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37046    new_path=`$CYGPATH -u "$path"`
37047  fi
37048  if test "x$new_path" = x; then
37049    # Oops. Which didn't find the executable.
37050    # The splitting of arguments from the executable at a space might have been incorrect,
37051    # since paths with space are more likely in Windows. Give it another try with the whole
37052    # argument.
37053    path="$complete"
37054    arguments="EOL"
37055    new_path=`$CYGPATH -u "$path"`
37056    new_path=`$WHICH "$new_path" 2> /dev/null`
37057    # bat and cmd files are not always considered executable in cygwin causing which
37058    # to not find them
37059    if test "x$new_path" = x \
37060        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37061        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37062      new_path=`$CYGPATH -u "$path"`
37063    fi
37064    if test "x$new_path" = x; then
37065      # It's still not found. Now this is an unrecoverable error.
37066      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37067$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37068      has_space=`$ECHO "$complete" | $GREP " "`
37069      if test "x$has_space" != x; then
37070        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37071$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37072      fi
37073      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37074    fi
37075  fi
37076
37077  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37078  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37079  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37080  # "foo.exe" is OK but "foo" is an error.
37081  #
37082  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37083  # It is also a way to make sure we got the proper file name for the real test later on.
37084  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37085  if test "x$test_shortpath" = x; then
37086    # Short path failed, file does not exist as specified.
37087    # Try adding .exe or .cmd
37088    if test -f "${new_path}.exe"; then
37089      input_to_shortpath="${new_path}.exe"
37090    elif test -f "${new_path}.cmd"; then
37091      input_to_shortpath="${new_path}.cmd"
37092    else
37093      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
37094$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
37095      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37096$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37097      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37098    fi
37099  else
37100    input_to_shortpath="$new_path"
37101  fi
37102
37103  # Call helper function which possibly converts this using DOS-style short mode.
37104  # If so, the updated path is stored in $new_path.
37105  new_path="$input_to_shortpath"
37106
37107  input_path="$input_to_shortpath"
37108  # Check if we need to convert this using DOS-style short mode. If the path
37109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37110  # take no chances and rewrite it.
37111  # Note: m4 eats our [], so we need to use [ and ] instead.
37112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37113  if test "x$has_forbidden_chars" != x; then
37114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37115    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37116    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37117    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37118      # Going to short mode and back again did indeed matter. Since short mode is
37119      # case insensitive, let's make it lowercase to improve readability.
37120      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37121      # Now convert it back to Unix-stile (cygpath)
37122      input_path=`$CYGPATH -u "$shortmode_path"`
37123      new_path="$input_path"
37124    fi
37125  fi
37126
37127  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37128  if test "x$test_cygdrive_prefix" = x; then
37129    # As a simple fix, exclude /usr/bin since it's not a real path.
37130    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37131      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37132      # a path prefixed by /cygdrive for fixpath to work.
37133      new_path="$CYGWIN_ROOT_PATH$input_path"
37134    fi
37135  fi
37136
37137  # remove trailing .exe if any
37138  new_path="${new_path/%.exe/}"
37139
37140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37141
37142  # First separate the path from the arguments. This will split at the first
37143  # space.
37144  complete="$STRIP"
37145  path="${complete%% *}"
37146  tmp="$complete EOL"
37147  arguments="${tmp#* }"
37148
37149  # Input might be given as Windows format, start by converting to
37150  # unix format.
37151  new_path="$path"
37152
37153  windows_path="$new_path"
37154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37155    unix_path=`$CYGPATH -u "$windows_path"`
37156    new_path="$unix_path"
37157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37159    new_path="$unix_path"
37160  fi
37161
37162
37163  # Now try to locate executable using which
37164  new_path=`$WHICH "$new_path" 2> /dev/null`
37165
37166  if test "x$new_path" = x; then
37167    # Oops. Which didn't find the executable.
37168    # The splitting of arguments from the executable at a space might have been incorrect,
37169    # since paths with space are more likely in Windows. Give it another try with the whole
37170    # argument.
37171    path="$complete"
37172    arguments="EOL"
37173    new_path="$path"
37174
37175  windows_path="$new_path"
37176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37177    unix_path=`$CYGPATH -u "$windows_path"`
37178    new_path="$unix_path"
37179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37180    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37181    new_path="$unix_path"
37182  fi
37183
37184
37185    new_path=`$WHICH "$new_path" 2> /dev/null`
37186
37187    if test "x$new_path" = x; then
37188      # It's still not found. Now this is an unrecoverable error.
37189      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37190$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37191      has_space=`$ECHO "$complete" | $GREP " "`
37192      if test "x$has_space" != x; then
37193        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37194$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37195      fi
37196      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37197    fi
37198  fi
37199
37200  # Now new_path has a complete unix path to the binary
37201  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37202    # Keep paths in /bin as-is, but remove trailing .exe if any
37203    new_path="${new_path/%.exe/}"
37204    # Do not save /bin paths to all_fixpath_prefixes!
37205  else
37206    # Not in mixed or Windows style, start by that.
37207    new_path=`cmd //c echo $new_path`
37208
37209  input_path="$new_path"
37210  # Check if we need to convert this using DOS-style short mode. If the path
37211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37212  # take no chances and rewrite it.
37213  # Note: m4 eats our [], so we need to use [ and ] instead.
37214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37215  if test "x$has_forbidden_chars" != x; then
37216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37217    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37218  fi
37219
37220    # Output is in $new_path
37221
37222  windows_path="$new_path"
37223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37224    unix_path=`$CYGPATH -u "$windows_path"`
37225    new_path="$unix_path"
37226  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37227    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37228    new_path="$unix_path"
37229  fi
37230
37231    # remove trailing .exe if any
37232    new_path="${new_path/%.exe/}"
37233
37234    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37235    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37236  fi
37237
37238  else
37239    # We're on a posix platform. Hooray! :)
37240    # First separate the path from the arguments. This will split at the first
37241    # space.
37242    complete="$STRIP"
37243    path="${complete%% *}"
37244    tmp="$complete EOL"
37245    arguments="${tmp#* }"
37246
37247    # Cannot rely on the command "which" here since it doesn't always work.
37248    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37249    if test -z "$is_absolute_path"; then
37250      # Path to executable is not absolute. Find it.
37251      IFS_save="$IFS"
37252      IFS=:
37253      for p in $PATH; do
37254        if test -f "$p/$path" && test -x "$p/$path"; then
37255          new_path="$p/$path"
37256          break
37257        fi
37258      done
37259      IFS="$IFS_save"
37260    else
37261      # This is an absolute path, we can use it without further modifications.
37262      new_path="$path"
37263    fi
37264
37265    if test "x$new_path" = x; then
37266      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
37267$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
37268      has_space=`$ECHO "$complete" | $GREP " "`
37269      if test "x$has_space" != x; then
37270        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37271$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37272      fi
37273      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
37274    fi
37275  fi
37276
37277  # Now join together the path and the arguments once again
37278  if test "x$arguments" != xEOL; then
37279    new_complete="$new_path ${arguments% *}"
37280  else
37281    new_complete="$new_path"
37282  fi
37283
37284  if test "x$complete" != "x$new_complete"; then
37285    STRIP="$new_complete"
37286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
37287$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
37288  fi
37289
37290
37291
37292  # Publish this variable in the help.
37293
37294
37295  if test "x$NM" = x; then
37296    # The variable is not set by user, try to locate tool using the code snippet
37297    if test -n "$ac_tool_prefix"; then
37298  for ac_prog in nm
37299  do
37300    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37301set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37303$as_echo_n "checking for $ac_word... " >&6; }
37304if ${ac_cv_prog_NM+:} false; then :
37305  $as_echo_n "(cached) " >&6
37306else
37307  if test -n "$NM"; then
37308  ac_cv_prog_NM="$NM" # Let the user override the test.
37309else
37310as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37311for as_dir in $PATH
37312do
37313  IFS=$as_save_IFS
37314  test -z "$as_dir" && as_dir=.
37315    for ac_exec_ext in '' $ac_executable_extensions; do
37316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37317    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37319    break 2
37320  fi
37321done
37322  done
37323IFS=$as_save_IFS
37324
37325fi
37326fi
37327NM=$ac_cv_prog_NM
37328if test -n "$NM"; then
37329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37330$as_echo "$NM" >&6; }
37331else
37332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37333$as_echo "no" >&6; }
37334fi
37335
37336
37337    test -n "$NM" && break
37338  done
37339fi
37340if test -z "$NM"; then
37341  ac_ct_NM=$NM
37342  for ac_prog in nm
37343do
37344  # Extract the first word of "$ac_prog", so it can be a program name with args.
37345set dummy $ac_prog; ac_word=$2
37346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37347$as_echo_n "checking for $ac_word... " >&6; }
37348if ${ac_cv_prog_ac_ct_NM+:} false; then :
37349  $as_echo_n "(cached) " >&6
37350else
37351  if test -n "$ac_ct_NM"; then
37352  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37353else
37354as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37355for as_dir in $PATH
37356do
37357  IFS=$as_save_IFS
37358  test -z "$as_dir" && as_dir=.
37359    for ac_exec_ext in '' $ac_executable_extensions; do
37360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37361    ac_cv_prog_ac_ct_NM="$ac_prog"
37362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37363    break 2
37364  fi
37365done
37366  done
37367IFS=$as_save_IFS
37368
37369fi
37370fi
37371ac_ct_NM=$ac_cv_prog_ac_ct_NM
37372if test -n "$ac_ct_NM"; then
37373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37374$as_echo "$ac_ct_NM" >&6; }
37375else
37376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37377$as_echo "no" >&6; }
37378fi
37379
37380
37381  test -n "$ac_ct_NM" && break
37382done
37383
37384  if test "x$ac_ct_NM" = x; then
37385    NM=""
37386  else
37387    case $cross_compiling:$ac_tool_warned in
37388yes:)
37389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37391ac_tool_warned=yes ;;
37392esac
37393    NM=$ac_ct_NM
37394  fi
37395fi
37396
37397  else
37398    # The variable is set, but is it from the command line or the environment?
37399
37400    # Try to remove the string !NM! from our list.
37401    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
37402    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37403      # If it failed, the variable was not from the command line. Ignore it,
37404      # but warn the user (except for BASH, which is always set by the calling BASH).
37405      if test "xNM" != xBASH; then
37406        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
37407$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
37408      fi
37409      # Try to locate tool using the code snippet
37410      if test -n "$ac_tool_prefix"; then
37411  for ac_prog in nm
37412  do
37413    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37414set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37416$as_echo_n "checking for $ac_word... " >&6; }
37417if ${ac_cv_prog_NM+:} false; then :
37418  $as_echo_n "(cached) " >&6
37419else
37420  if test -n "$NM"; then
37421  ac_cv_prog_NM="$NM" # Let the user override the test.
37422else
37423as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37424for as_dir in $PATH
37425do
37426  IFS=$as_save_IFS
37427  test -z "$as_dir" && as_dir=.
37428    for ac_exec_ext in '' $ac_executable_extensions; do
37429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37430    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
37431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37432    break 2
37433  fi
37434done
37435  done
37436IFS=$as_save_IFS
37437
37438fi
37439fi
37440NM=$ac_cv_prog_NM
37441if test -n "$NM"; then
37442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37443$as_echo "$NM" >&6; }
37444else
37445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37446$as_echo "no" >&6; }
37447fi
37448
37449
37450    test -n "$NM" && break
37451  done
37452fi
37453if test -z "$NM"; then
37454  ac_ct_NM=$NM
37455  for ac_prog in nm
37456do
37457  # Extract the first word of "$ac_prog", so it can be a program name with args.
37458set dummy $ac_prog; ac_word=$2
37459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37460$as_echo_n "checking for $ac_word... " >&6; }
37461if ${ac_cv_prog_ac_ct_NM+:} false; then :
37462  $as_echo_n "(cached) " >&6
37463else
37464  if test -n "$ac_ct_NM"; then
37465  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
37466else
37467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37468for as_dir in $PATH
37469do
37470  IFS=$as_save_IFS
37471  test -z "$as_dir" && as_dir=.
37472    for ac_exec_ext in '' $ac_executable_extensions; do
37473  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37474    ac_cv_prog_ac_ct_NM="$ac_prog"
37475    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37476    break 2
37477  fi
37478done
37479  done
37480IFS=$as_save_IFS
37481
37482fi
37483fi
37484ac_ct_NM=$ac_cv_prog_ac_ct_NM
37485if test -n "$ac_ct_NM"; then
37486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
37487$as_echo "$ac_ct_NM" >&6; }
37488else
37489  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37490$as_echo "no" >&6; }
37491fi
37492
37493
37494  test -n "$ac_ct_NM" && break
37495done
37496
37497  if test "x$ac_ct_NM" = x; then
37498    NM=""
37499  else
37500    case $cross_compiling:$ac_tool_warned in
37501yes:)
37502{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37503$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37504ac_tool_warned=yes ;;
37505esac
37506    NM=$ac_ct_NM
37507  fi
37508fi
37509
37510    else
37511      # If it succeeded, then it was overridden by the user. We will use it
37512      # for the tool.
37513
37514      # First remove it from the list of overridden variables, so we can test
37515      # for unknown variables in the end.
37516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37517
37518      # Check if the provided tool contains a complete path.
37519      tool_specified="$NM"
37520      tool_basename="${tool_specified##*/}"
37521      if test "x$tool_basename" = "x$tool_specified"; then
37522        # A command without a complete path is provided, search $PATH.
37523        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
37524$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
37525        # Extract the first word of "$tool_basename", so it can be a program name with args.
37526set dummy $tool_basename; ac_word=$2
37527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37528$as_echo_n "checking for $ac_word... " >&6; }
37529if ${ac_cv_path_NM+:} false; then :
37530  $as_echo_n "(cached) " >&6
37531else
37532  case $NM in
37533  [\\/]* | ?:[\\/]*)
37534  ac_cv_path_NM="$NM" # Let the user override the test with a path.
37535  ;;
37536  *)
37537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37538for as_dir in $PATH
37539do
37540  IFS=$as_save_IFS
37541  test -z "$as_dir" && as_dir=.
37542    for ac_exec_ext in '' $ac_executable_extensions; do
37543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37544    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
37545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37546    break 2
37547  fi
37548done
37549  done
37550IFS=$as_save_IFS
37551
37552  ;;
37553esac
37554fi
37555NM=$ac_cv_path_NM
37556if test -n "$NM"; then
37557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
37558$as_echo "$NM" >&6; }
37559else
37560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37561$as_echo "no" >&6; }
37562fi
37563
37564
37565        if test "x$NM" = x; then
37566          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37567        fi
37568      else
37569        # Otherwise we believe it is a complete path. Use it as it is.
37570        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
37571$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
37572        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
37573$as_echo_n "checking for NM... " >&6; }
37574        if test ! -x "$tool_specified"; then
37575          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37576$as_echo "not found" >&6; }
37577          as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
37578        fi
37579        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37580$as_echo "$tool_specified" >&6; }
37581      fi
37582    fi
37583  fi
37584
37585
37586
37587  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37588
37589  # First separate the path from the arguments. This will split at the first
37590  # space.
37591  complete="$NM"
37592  path="${complete%% *}"
37593  tmp="$complete EOL"
37594  arguments="${tmp#* }"
37595
37596  # Input might be given as Windows format, start by converting to
37597  # unix format.
37598  new_path=`$CYGPATH -u "$path"`
37599
37600  # Now try to locate executable using which
37601  new_path=`$WHICH "$new_path" 2> /dev/null`
37602  # bat and cmd files are not always considered executable in cygwin causing which
37603  # to not find them
37604  if test "x$new_path" = x \
37605      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37606      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37607    new_path=`$CYGPATH -u "$path"`
37608  fi
37609  if test "x$new_path" = x; then
37610    # Oops. Which didn't find the executable.
37611    # The splitting of arguments from the executable at a space might have been incorrect,
37612    # since paths with space are more likely in Windows. Give it another try with the whole
37613    # argument.
37614    path="$complete"
37615    arguments="EOL"
37616    new_path=`$CYGPATH -u "$path"`
37617    new_path=`$WHICH "$new_path" 2> /dev/null`
37618    # bat and cmd files are not always considered executable in cygwin causing which
37619    # to not find them
37620    if test "x$new_path" = x \
37621        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37622        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37623      new_path=`$CYGPATH -u "$path"`
37624    fi
37625    if test "x$new_path" = x; then
37626      # It's still not found. Now this is an unrecoverable error.
37627      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37628$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37629      has_space=`$ECHO "$complete" | $GREP " "`
37630      if test "x$has_space" != x; then
37631        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37632$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37633      fi
37634      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37635    fi
37636  fi
37637
37638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37641  # "foo.exe" is OK but "foo" is an error.
37642  #
37643  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37644  # It is also a way to make sure we got the proper file name for the real test later on.
37645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37646  if test "x$test_shortpath" = x; then
37647    # Short path failed, file does not exist as specified.
37648    # Try adding .exe or .cmd
37649    if test -f "${new_path}.exe"; then
37650      input_to_shortpath="${new_path}.exe"
37651    elif test -f "${new_path}.cmd"; then
37652      input_to_shortpath="${new_path}.cmd"
37653    else
37654      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
37655$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
37656      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37657$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37658      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37659    fi
37660  else
37661    input_to_shortpath="$new_path"
37662  fi
37663
37664  # Call helper function which possibly converts this using DOS-style short mode.
37665  # If so, the updated path is stored in $new_path.
37666  new_path="$input_to_shortpath"
37667
37668  input_path="$input_to_shortpath"
37669  # Check if we need to convert this using DOS-style short mode. If the path
37670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37671  # take no chances and rewrite it.
37672  # Note: m4 eats our [], so we need to use [ and ] instead.
37673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37674  if test "x$has_forbidden_chars" != x; then
37675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37679      # Going to short mode and back again did indeed matter. Since short mode is
37680      # case insensitive, let's make it lowercase to improve readability.
37681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37682      # Now convert it back to Unix-stile (cygpath)
37683      input_path=`$CYGPATH -u "$shortmode_path"`
37684      new_path="$input_path"
37685    fi
37686  fi
37687
37688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37689  if test "x$test_cygdrive_prefix" = x; then
37690    # As a simple fix, exclude /usr/bin since it's not a real path.
37691    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37693      # a path prefixed by /cygdrive for fixpath to work.
37694      new_path="$CYGWIN_ROOT_PATH$input_path"
37695    fi
37696  fi
37697
37698  # remove trailing .exe if any
37699  new_path="${new_path/%.exe/}"
37700
37701  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37702
37703  # First separate the path from the arguments. This will split at the first
37704  # space.
37705  complete="$NM"
37706  path="${complete%% *}"
37707  tmp="$complete EOL"
37708  arguments="${tmp#* }"
37709
37710  # Input might be given as Windows format, start by converting to
37711  # unix format.
37712  new_path="$path"
37713
37714  windows_path="$new_path"
37715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37716    unix_path=`$CYGPATH -u "$windows_path"`
37717    new_path="$unix_path"
37718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37720    new_path="$unix_path"
37721  fi
37722
37723
37724  # Now try to locate executable using which
37725  new_path=`$WHICH "$new_path" 2> /dev/null`
37726
37727  if test "x$new_path" = x; then
37728    # Oops. Which didn't find the executable.
37729    # The splitting of arguments from the executable at a space might have been incorrect,
37730    # since paths with space are more likely in Windows. Give it another try with the whole
37731    # argument.
37732    path="$complete"
37733    arguments="EOL"
37734    new_path="$path"
37735
37736  windows_path="$new_path"
37737  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37738    unix_path=`$CYGPATH -u "$windows_path"`
37739    new_path="$unix_path"
37740  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37741    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37742    new_path="$unix_path"
37743  fi
37744
37745
37746    new_path=`$WHICH "$new_path" 2> /dev/null`
37747
37748    if test "x$new_path" = x; then
37749      # It's still not found. Now this is an unrecoverable error.
37750      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37751$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37752      has_space=`$ECHO "$complete" | $GREP " "`
37753      if test "x$has_space" != x; then
37754        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37755$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37756      fi
37757      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37758    fi
37759  fi
37760
37761  # Now new_path has a complete unix path to the binary
37762  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37763    # Keep paths in /bin as-is, but remove trailing .exe if any
37764    new_path="${new_path/%.exe/}"
37765    # Do not save /bin paths to all_fixpath_prefixes!
37766  else
37767    # Not in mixed or Windows style, start by that.
37768    new_path=`cmd //c echo $new_path`
37769
37770  input_path="$new_path"
37771  # Check if we need to convert this using DOS-style short mode. If the path
37772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37773  # take no chances and rewrite it.
37774  # Note: m4 eats our [], so we need to use [ and ] instead.
37775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37776  if test "x$has_forbidden_chars" != x; then
37777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37778    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37779  fi
37780
37781    # Output is in $new_path
37782
37783  windows_path="$new_path"
37784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37785    unix_path=`$CYGPATH -u "$windows_path"`
37786    new_path="$unix_path"
37787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37789    new_path="$unix_path"
37790  fi
37791
37792    # remove trailing .exe if any
37793    new_path="${new_path/%.exe/}"
37794
37795    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37796    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37797  fi
37798
37799  else
37800    # We're on a posix platform. Hooray! :)
37801    # First separate the path from the arguments. This will split at the first
37802    # space.
37803    complete="$NM"
37804    path="${complete%% *}"
37805    tmp="$complete EOL"
37806    arguments="${tmp#* }"
37807
37808    # Cannot rely on the command "which" here since it doesn't always work.
37809    is_absolute_path=`$ECHO "$path" | $GREP ^/`
37810    if test -z "$is_absolute_path"; then
37811      # Path to executable is not absolute. Find it.
37812      IFS_save="$IFS"
37813      IFS=:
37814      for p in $PATH; do
37815        if test -f "$p/$path" && test -x "$p/$path"; then
37816          new_path="$p/$path"
37817          break
37818        fi
37819      done
37820      IFS="$IFS_save"
37821    else
37822      # This is an absolute path, we can use it without further modifications.
37823      new_path="$path"
37824    fi
37825
37826    if test "x$new_path" = x; then
37827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
37828$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
37829      has_space=`$ECHO "$complete" | $GREP " "`
37830      if test "x$has_space" != x; then
37831        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37832$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37833      fi
37834      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
37835    fi
37836  fi
37837
37838  # Now join together the path and the arguments once again
37839  if test "x$arguments" != xEOL; then
37840    new_complete="$new_path ${arguments% *}"
37841  else
37842    new_complete="$new_path"
37843  fi
37844
37845  if test "x$complete" != "x$new_complete"; then
37846    NM="$new_complete"
37847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
37848$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
37849  fi
37850
37851    GNM="$NM"
37852
37853  fi
37854
37855  # objcopy is used for moving debug symbols to separate files when
37856  # full debug symbols are enabled.
37857  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
37858
37859
37860  # Publish this variable in the help.
37861
37862
37863  if test "x$OBJCOPY" = x; then
37864    # The variable is not set by user, try to locate tool using the code snippet
37865    if test -n "$ac_tool_prefix"; then
37866  for ac_prog in gobjcopy objcopy
37867  do
37868    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37869set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37871$as_echo_n "checking for $ac_word... " >&6; }
37872if ${ac_cv_prog_OBJCOPY+:} false; then :
37873  $as_echo_n "(cached) " >&6
37874else
37875  if test -n "$OBJCOPY"; then
37876  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37877else
37878as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37879for as_dir in $PATH
37880do
37881  IFS=$as_save_IFS
37882  test -z "$as_dir" && as_dir=.
37883    for ac_exec_ext in '' $ac_executable_extensions; do
37884  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37885    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37886    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37887    break 2
37888  fi
37889done
37890  done
37891IFS=$as_save_IFS
37892
37893fi
37894fi
37895OBJCOPY=$ac_cv_prog_OBJCOPY
37896if test -n "$OBJCOPY"; then
37897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
37898$as_echo "$OBJCOPY" >&6; }
37899else
37900  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37901$as_echo "no" >&6; }
37902fi
37903
37904
37905    test -n "$OBJCOPY" && break
37906  done
37907fi
37908if test -z "$OBJCOPY"; then
37909  ac_ct_OBJCOPY=$OBJCOPY
37910  for ac_prog in gobjcopy objcopy
37911do
37912  # Extract the first word of "$ac_prog", so it can be a program name with args.
37913set dummy $ac_prog; ac_word=$2
37914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37915$as_echo_n "checking for $ac_word... " >&6; }
37916if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
37917  $as_echo_n "(cached) " >&6
37918else
37919  if test -n "$ac_ct_OBJCOPY"; then
37920  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
37921else
37922as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37923for as_dir in $PATH
37924do
37925  IFS=$as_save_IFS
37926  test -z "$as_dir" && as_dir=.
37927    for ac_exec_ext in '' $ac_executable_extensions; do
37928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37929    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
37930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37931    break 2
37932  fi
37933done
37934  done
37935IFS=$as_save_IFS
37936
37937fi
37938fi
37939ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
37940if test -n "$ac_ct_OBJCOPY"; then
37941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
37942$as_echo "$ac_ct_OBJCOPY" >&6; }
37943else
37944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37945$as_echo "no" >&6; }
37946fi
37947
37948
37949  test -n "$ac_ct_OBJCOPY" && break
37950done
37951
37952  if test "x$ac_ct_OBJCOPY" = x; then
37953    OBJCOPY=""
37954  else
37955    case $cross_compiling:$ac_tool_warned in
37956yes:)
37957{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37958$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37959ac_tool_warned=yes ;;
37960esac
37961    OBJCOPY=$ac_ct_OBJCOPY
37962  fi
37963fi
37964
37965  else
37966    # The variable is set, but is it from the command line or the environment?
37967
37968    # Try to remove the string !OBJCOPY! from our list.
37969    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
37970    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37971      # If it failed, the variable was not from the command line. Ignore it,
37972      # but warn the user (except for BASH, which is always set by the calling BASH).
37973      if test "xOBJCOPY" != xBASH; then
37974        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
37975$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
37976      fi
37977      # Try to locate tool using the code snippet
37978      if test -n "$ac_tool_prefix"; then
37979  for ac_prog in gobjcopy objcopy
37980  do
37981    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37982set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37984$as_echo_n "checking for $ac_word... " >&6; }
37985if ${ac_cv_prog_OBJCOPY+:} false; then :
37986  $as_echo_n "(cached) " >&6
37987else
37988  if test -n "$OBJCOPY"; then
37989  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
37990else
37991as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37992for as_dir in $PATH
37993do
37994  IFS=$as_save_IFS
37995  test -z "$as_dir" && as_dir=.
37996    for ac_exec_ext in '' $ac_executable_extensions; do
37997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37998    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
37999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38000    break 2
38001  fi
38002done
38003  done
38004IFS=$as_save_IFS
38005
38006fi
38007fi
38008OBJCOPY=$ac_cv_prog_OBJCOPY
38009if test -n "$OBJCOPY"; then
38010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38011$as_echo "$OBJCOPY" >&6; }
38012else
38013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38014$as_echo "no" >&6; }
38015fi
38016
38017
38018    test -n "$OBJCOPY" && break
38019  done
38020fi
38021if test -z "$OBJCOPY"; then
38022  ac_ct_OBJCOPY=$OBJCOPY
38023  for ac_prog in gobjcopy objcopy
38024do
38025  # Extract the first word of "$ac_prog", so it can be a program name with args.
38026set dummy $ac_prog; ac_word=$2
38027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38028$as_echo_n "checking for $ac_word... " >&6; }
38029if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
38030  $as_echo_n "(cached) " >&6
38031else
38032  if test -n "$ac_ct_OBJCOPY"; then
38033  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
38034else
38035as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38036for as_dir in $PATH
38037do
38038  IFS=$as_save_IFS
38039  test -z "$as_dir" && as_dir=.
38040    for ac_exec_ext in '' $ac_executable_extensions; do
38041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38042    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
38043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38044    break 2
38045  fi
38046done
38047  done
38048IFS=$as_save_IFS
38049
38050fi
38051fi
38052ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
38053if test -n "$ac_ct_OBJCOPY"; then
38054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
38055$as_echo "$ac_ct_OBJCOPY" >&6; }
38056else
38057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38058$as_echo "no" >&6; }
38059fi
38060
38061
38062  test -n "$ac_ct_OBJCOPY" && break
38063done
38064
38065  if test "x$ac_ct_OBJCOPY" = x; then
38066    OBJCOPY=""
38067  else
38068    case $cross_compiling:$ac_tool_warned in
38069yes:)
38070{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38071$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38072ac_tool_warned=yes ;;
38073esac
38074    OBJCOPY=$ac_ct_OBJCOPY
38075  fi
38076fi
38077
38078    else
38079      # If it succeeded, then it was overridden by the user. We will use it
38080      # for the tool.
38081
38082      # First remove it from the list of overridden variables, so we can test
38083      # for unknown variables in the end.
38084      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38085
38086      # Check if the provided tool contains a complete path.
38087      tool_specified="$OBJCOPY"
38088      tool_basename="${tool_specified##*/}"
38089      if test "x$tool_basename" = "x$tool_specified"; then
38090        # A command without a complete path is provided, search $PATH.
38091        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
38092$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
38093        # Extract the first word of "$tool_basename", so it can be a program name with args.
38094set dummy $tool_basename; ac_word=$2
38095{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38096$as_echo_n "checking for $ac_word... " >&6; }
38097if ${ac_cv_path_OBJCOPY+:} false; then :
38098  $as_echo_n "(cached) " >&6
38099else
38100  case $OBJCOPY in
38101  [\\/]* | ?:[\\/]*)
38102  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
38103  ;;
38104  *)
38105  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38106for as_dir in $PATH
38107do
38108  IFS=$as_save_IFS
38109  test -z "$as_dir" && as_dir=.
38110    for ac_exec_ext in '' $ac_executable_extensions; do
38111  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38112    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
38113    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38114    break 2
38115  fi
38116done
38117  done
38118IFS=$as_save_IFS
38119
38120  ;;
38121esac
38122fi
38123OBJCOPY=$ac_cv_path_OBJCOPY
38124if test -n "$OBJCOPY"; then
38125  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
38126$as_echo "$OBJCOPY" >&6; }
38127else
38128  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38129$as_echo "no" >&6; }
38130fi
38131
38132
38133        if test "x$OBJCOPY" = x; then
38134          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38135        fi
38136      else
38137        # Otherwise we believe it is a complete path. Use it as it is.
38138        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
38139$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
38140        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
38141$as_echo_n "checking for OBJCOPY... " >&6; }
38142        if test ! -x "$tool_specified"; then
38143          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38144$as_echo "not found" >&6; }
38145          as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
38146        fi
38147        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38148$as_echo "$tool_specified" >&6; }
38149      fi
38150    fi
38151  fi
38152
38153
38154    # Only call fixup if objcopy was found.
38155    if test -n "$OBJCOPY"; then
38156
38157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38158
38159  # First separate the path from the arguments. This will split at the first
38160  # space.
38161  complete="$OBJCOPY"
38162  path="${complete%% *}"
38163  tmp="$complete EOL"
38164  arguments="${tmp#* }"
38165
38166  # Input might be given as Windows format, start by converting to
38167  # unix format.
38168  new_path=`$CYGPATH -u "$path"`
38169
38170  # Now try to locate executable using which
38171  new_path=`$WHICH "$new_path" 2> /dev/null`
38172  # bat and cmd files are not always considered executable in cygwin causing which
38173  # to not find them
38174  if test "x$new_path" = x \
38175      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38176      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38177    new_path=`$CYGPATH -u "$path"`
38178  fi
38179  if test "x$new_path" = x; then
38180    # Oops. Which didn't find the executable.
38181    # The splitting of arguments from the executable at a space might have been incorrect,
38182    # since paths with space are more likely in Windows. Give it another try with the whole
38183    # argument.
38184    path="$complete"
38185    arguments="EOL"
38186    new_path=`$CYGPATH -u "$path"`
38187    new_path=`$WHICH "$new_path" 2> /dev/null`
38188    # bat and cmd files are not always considered executable in cygwin causing which
38189    # to not find them
38190    if test "x$new_path" = x \
38191        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38192        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38193      new_path=`$CYGPATH -u "$path"`
38194    fi
38195    if test "x$new_path" = x; then
38196      # It's still not found. Now this is an unrecoverable error.
38197      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38198$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38199      has_space=`$ECHO "$complete" | $GREP " "`
38200      if test "x$has_space" != x; then
38201        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38202$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38203      fi
38204      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38205    fi
38206  fi
38207
38208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38211  # "foo.exe" is OK but "foo" is an error.
38212  #
38213  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38214  # It is also a way to make sure we got the proper file name for the real test later on.
38215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38216  if test "x$test_shortpath" = x; then
38217    # Short path failed, file does not exist as specified.
38218    # Try adding .exe or .cmd
38219    if test -f "${new_path}.exe"; then
38220      input_to_shortpath="${new_path}.exe"
38221    elif test -f "${new_path}.cmd"; then
38222      input_to_shortpath="${new_path}.cmd"
38223    else
38224      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
38225$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
38226      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38227$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38228      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38229    fi
38230  else
38231    input_to_shortpath="$new_path"
38232  fi
38233
38234  # Call helper function which possibly converts this using DOS-style short mode.
38235  # If so, the updated path is stored in $new_path.
38236  new_path="$input_to_shortpath"
38237
38238  input_path="$input_to_shortpath"
38239  # Check if we need to convert this using DOS-style short mode. If the path
38240  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38241  # take no chances and rewrite it.
38242  # Note: m4 eats our [], so we need to use [ and ] instead.
38243  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38244  if test "x$has_forbidden_chars" != x; then
38245    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38246    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38247    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38248    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38249      # Going to short mode and back again did indeed matter. Since short mode is
38250      # case insensitive, let's make it lowercase to improve readability.
38251      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38252      # Now convert it back to Unix-stile (cygpath)
38253      input_path=`$CYGPATH -u "$shortmode_path"`
38254      new_path="$input_path"
38255    fi
38256  fi
38257
38258  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38259  if test "x$test_cygdrive_prefix" = x; then
38260    # As a simple fix, exclude /usr/bin since it's not a real path.
38261    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38262      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38263      # a path prefixed by /cygdrive for fixpath to work.
38264      new_path="$CYGWIN_ROOT_PATH$input_path"
38265    fi
38266  fi
38267
38268  # remove trailing .exe if any
38269  new_path="${new_path/%.exe/}"
38270
38271  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38272
38273  # First separate the path from the arguments. This will split at the first
38274  # space.
38275  complete="$OBJCOPY"
38276  path="${complete%% *}"
38277  tmp="$complete EOL"
38278  arguments="${tmp#* }"
38279
38280  # Input might be given as Windows format, start by converting to
38281  # unix format.
38282  new_path="$path"
38283
38284  windows_path="$new_path"
38285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38286    unix_path=`$CYGPATH -u "$windows_path"`
38287    new_path="$unix_path"
38288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38290    new_path="$unix_path"
38291  fi
38292
38293
38294  # Now try to locate executable using which
38295  new_path=`$WHICH "$new_path" 2> /dev/null`
38296
38297  if test "x$new_path" = x; then
38298    # Oops. Which didn't find the executable.
38299    # The splitting of arguments from the executable at a space might have been incorrect,
38300    # since paths with space are more likely in Windows. Give it another try with the whole
38301    # argument.
38302    path="$complete"
38303    arguments="EOL"
38304    new_path="$path"
38305
38306  windows_path="$new_path"
38307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38308    unix_path=`$CYGPATH -u "$windows_path"`
38309    new_path="$unix_path"
38310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38312    new_path="$unix_path"
38313  fi
38314
38315
38316    new_path=`$WHICH "$new_path" 2> /dev/null`
38317
38318    if test "x$new_path" = x; then
38319      # It's still not found. Now this is an unrecoverable error.
38320      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38321$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38322      has_space=`$ECHO "$complete" | $GREP " "`
38323      if test "x$has_space" != x; then
38324        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38325$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38326      fi
38327      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38328    fi
38329  fi
38330
38331  # Now new_path has a complete unix path to the binary
38332  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38333    # Keep paths in /bin as-is, but remove trailing .exe if any
38334    new_path="${new_path/%.exe/}"
38335    # Do not save /bin paths to all_fixpath_prefixes!
38336  else
38337    # Not in mixed or Windows style, start by that.
38338    new_path=`cmd //c echo $new_path`
38339
38340  input_path="$new_path"
38341  # Check if we need to convert this using DOS-style short mode. If the path
38342  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38343  # take no chances and rewrite it.
38344  # Note: m4 eats our [], so we need to use [ and ] instead.
38345  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38346  if test "x$has_forbidden_chars" != x; then
38347    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38348    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38349  fi
38350
38351    # Output is in $new_path
38352
38353  windows_path="$new_path"
38354  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38355    unix_path=`$CYGPATH -u "$windows_path"`
38356    new_path="$unix_path"
38357  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38358    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38359    new_path="$unix_path"
38360  fi
38361
38362    # remove trailing .exe if any
38363    new_path="${new_path/%.exe/}"
38364
38365    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38366    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38367  fi
38368
38369  else
38370    # We're on a posix platform. Hooray! :)
38371    # First separate the path from the arguments. This will split at the first
38372    # space.
38373    complete="$OBJCOPY"
38374    path="${complete%% *}"
38375    tmp="$complete EOL"
38376    arguments="${tmp#* }"
38377
38378    # Cannot rely on the command "which" here since it doesn't always work.
38379    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38380    if test -z "$is_absolute_path"; then
38381      # Path to executable is not absolute. Find it.
38382      IFS_save="$IFS"
38383      IFS=:
38384      for p in $PATH; do
38385        if test -f "$p/$path" && test -x "$p/$path"; then
38386          new_path="$p/$path"
38387          break
38388        fi
38389      done
38390      IFS="$IFS_save"
38391    else
38392      # This is an absolute path, we can use it without further modifications.
38393      new_path="$path"
38394    fi
38395
38396    if test "x$new_path" = x; then
38397      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
38398$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
38399      has_space=`$ECHO "$complete" | $GREP " "`
38400      if test "x$has_space" != x; then
38401        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38402$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38403      fi
38404      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
38405    fi
38406  fi
38407
38408  # Now join together the path and the arguments once again
38409  if test "x$arguments" != xEOL; then
38410    new_complete="$new_path ${arguments% *}"
38411  else
38412    new_complete="$new_path"
38413  fi
38414
38415  if test "x$complete" != "x$new_complete"; then
38416    OBJCOPY="$new_complete"
38417    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
38418$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
38419  fi
38420
38421    fi
38422  fi
38423
38424
38425
38426  # Publish this variable in the help.
38427
38428
38429  if test "x$OBJDUMP" = x; then
38430    # The variable is not set by user, try to locate tool using the code snippet
38431    if test -n "$ac_tool_prefix"; then
38432  for ac_prog in gobjdump objdump
38433  do
38434    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38435set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38437$as_echo_n "checking for $ac_word... " >&6; }
38438if ${ac_cv_prog_OBJDUMP+:} false; then :
38439  $as_echo_n "(cached) " >&6
38440else
38441  if test -n "$OBJDUMP"; then
38442  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38443else
38444as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38445for as_dir in $PATH
38446do
38447  IFS=$as_save_IFS
38448  test -z "$as_dir" && as_dir=.
38449    for ac_exec_ext in '' $ac_executable_extensions; do
38450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38451    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38453    break 2
38454  fi
38455done
38456  done
38457IFS=$as_save_IFS
38458
38459fi
38460fi
38461OBJDUMP=$ac_cv_prog_OBJDUMP
38462if test -n "$OBJDUMP"; then
38463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38464$as_echo "$OBJDUMP" >&6; }
38465else
38466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38467$as_echo "no" >&6; }
38468fi
38469
38470
38471    test -n "$OBJDUMP" && break
38472  done
38473fi
38474if test -z "$OBJDUMP"; then
38475  ac_ct_OBJDUMP=$OBJDUMP
38476  for ac_prog in gobjdump objdump
38477do
38478  # Extract the first word of "$ac_prog", so it can be a program name with args.
38479set dummy $ac_prog; ac_word=$2
38480{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38481$as_echo_n "checking for $ac_word... " >&6; }
38482if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38483  $as_echo_n "(cached) " >&6
38484else
38485  if test -n "$ac_ct_OBJDUMP"; then
38486  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38487else
38488as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38489for as_dir in $PATH
38490do
38491  IFS=$as_save_IFS
38492  test -z "$as_dir" && as_dir=.
38493    for ac_exec_ext in '' $ac_executable_extensions; do
38494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38495    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38497    break 2
38498  fi
38499done
38500  done
38501IFS=$as_save_IFS
38502
38503fi
38504fi
38505ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38506if test -n "$ac_ct_OBJDUMP"; then
38507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38508$as_echo "$ac_ct_OBJDUMP" >&6; }
38509else
38510  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38511$as_echo "no" >&6; }
38512fi
38513
38514
38515  test -n "$ac_ct_OBJDUMP" && break
38516done
38517
38518  if test "x$ac_ct_OBJDUMP" = x; then
38519    OBJDUMP=""
38520  else
38521    case $cross_compiling:$ac_tool_warned in
38522yes:)
38523{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38524$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38525ac_tool_warned=yes ;;
38526esac
38527    OBJDUMP=$ac_ct_OBJDUMP
38528  fi
38529fi
38530
38531  else
38532    # The variable is set, but is it from the command line or the environment?
38533
38534    # Try to remove the string !OBJDUMP! from our list.
38535    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
38536    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38537      # If it failed, the variable was not from the command line. Ignore it,
38538      # but warn the user (except for BASH, which is always set by the calling BASH).
38539      if test "xOBJDUMP" != xBASH; then
38540        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
38541$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
38542      fi
38543      # Try to locate tool using the code snippet
38544      if test -n "$ac_tool_prefix"; then
38545  for ac_prog in gobjdump objdump
38546  do
38547    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
38548set dummy $ac_tool_prefix$ac_prog; ac_word=$2
38549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38550$as_echo_n "checking for $ac_word... " >&6; }
38551if ${ac_cv_prog_OBJDUMP+:} false; then :
38552  $as_echo_n "(cached) " >&6
38553else
38554  if test -n "$OBJDUMP"; then
38555  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
38556else
38557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38558for as_dir in $PATH
38559do
38560  IFS=$as_save_IFS
38561  test -z "$as_dir" && as_dir=.
38562    for ac_exec_ext in '' $ac_executable_extensions; do
38563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38564    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
38565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38566    break 2
38567  fi
38568done
38569  done
38570IFS=$as_save_IFS
38571
38572fi
38573fi
38574OBJDUMP=$ac_cv_prog_OBJDUMP
38575if test -n "$OBJDUMP"; then
38576  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38577$as_echo "$OBJDUMP" >&6; }
38578else
38579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38580$as_echo "no" >&6; }
38581fi
38582
38583
38584    test -n "$OBJDUMP" && break
38585  done
38586fi
38587if test -z "$OBJDUMP"; then
38588  ac_ct_OBJDUMP=$OBJDUMP
38589  for ac_prog in gobjdump objdump
38590do
38591  # Extract the first word of "$ac_prog", so it can be a program name with args.
38592set dummy $ac_prog; ac_word=$2
38593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38594$as_echo_n "checking for $ac_word... " >&6; }
38595if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
38596  $as_echo_n "(cached) " >&6
38597else
38598  if test -n "$ac_ct_OBJDUMP"; then
38599  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
38600else
38601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38602for as_dir in $PATH
38603do
38604  IFS=$as_save_IFS
38605  test -z "$as_dir" && as_dir=.
38606    for ac_exec_ext in '' $ac_executable_extensions; do
38607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38608    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
38609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38610    break 2
38611  fi
38612done
38613  done
38614IFS=$as_save_IFS
38615
38616fi
38617fi
38618ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
38619if test -n "$ac_ct_OBJDUMP"; then
38620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
38621$as_echo "$ac_ct_OBJDUMP" >&6; }
38622else
38623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38624$as_echo "no" >&6; }
38625fi
38626
38627
38628  test -n "$ac_ct_OBJDUMP" && break
38629done
38630
38631  if test "x$ac_ct_OBJDUMP" = x; then
38632    OBJDUMP=""
38633  else
38634    case $cross_compiling:$ac_tool_warned in
38635yes:)
38636{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38637$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38638ac_tool_warned=yes ;;
38639esac
38640    OBJDUMP=$ac_ct_OBJDUMP
38641  fi
38642fi
38643
38644    else
38645      # If it succeeded, then it was overridden by the user. We will use it
38646      # for the tool.
38647
38648      # First remove it from the list of overridden variables, so we can test
38649      # for unknown variables in the end.
38650      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38651
38652      # Check if the provided tool contains a complete path.
38653      tool_specified="$OBJDUMP"
38654      tool_basename="${tool_specified##*/}"
38655      if test "x$tool_basename" = "x$tool_specified"; then
38656        # A command without a complete path is provided, search $PATH.
38657        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
38658$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
38659        # Extract the first word of "$tool_basename", so it can be a program name with args.
38660set dummy $tool_basename; ac_word=$2
38661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38662$as_echo_n "checking for $ac_word... " >&6; }
38663if ${ac_cv_path_OBJDUMP+:} false; then :
38664  $as_echo_n "(cached) " >&6
38665else
38666  case $OBJDUMP in
38667  [\\/]* | ?:[\\/]*)
38668  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
38669  ;;
38670  *)
38671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38672for as_dir in $PATH
38673do
38674  IFS=$as_save_IFS
38675  test -z "$as_dir" && as_dir=.
38676    for ac_exec_ext in '' $ac_executable_extensions; do
38677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38678    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
38679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38680    break 2
38681  fi
38682done
38683  done
38684IFS=$as_save_IFS
38685
38686  ;;
38687esac
38688fi
38689OBJDUMP=$ac_cv_path_OBJDUMP
38690if test -n "$OBJDUMP"; then
38691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
38692$as_echo "$OBJDUMP" >&6; }
38693else
38694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38695$as_echo "no" >&6; }
38696fi
38697
38698
38699        if test "x$OBJDUMP" = x; then
38700          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38701        fi
38702      else
38703        # Otherwise we believe it is a complete path. Use it as it is.
38704        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
38705$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
38706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
38707$as_echo_n "checking for OBJDUMP... " >&6; }
38708        if test ! -x "$tool_specified"; then
38709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38710$as_echo "not found" >&6; }
38711          as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
38712        fi
38713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38714$as_echo "$tool_specified" >&6; }
38715      fi
38716    fi
38717  fi
38718
38719
38720  if test "x$OBJDUMP" != x; then
38721    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
38722    # bails if argument is missing.
38723
38724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38725
38726  # First separate the path from the arguments. This will split at the first
38727  # space.
38728  complete="$OBJDUMP"
38729  path="${complete%% *}"
38730  tmp="$complete EOL"
38731  arguments="${tmp#* }"
38732
38733  # Input might be given as Windows format, start by converting to
38734  # unix format.
38735  new_path=`$CYGPATH -u "$path"`
38736
38737  # Now try to locate executable using which
38738  new_path=`$WHICH "$new_path" 2> /dev/null`
38739  # bat and cmd files are not always considered executable in cygwin causing which
38740  # to not find them
38741  if test "x$new_path" = x \
38742      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38743      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38744    new_path=`$CYGPATH -u "$path"`
38745  fi
38746  if test "x$new_path" = x; then
38747    # Oops. Which didn't find the executable.
38748    # The splitting of arguments from the executable at a space might have been incorrect,
38749    # since paths with space are more likely in Windows. Give it another try with the whole
38750    # argument.
38751    path="$complete"
38752    arguments="EOL"
38753    new_path=`$CYGPATH -u "$path"`
38754    new_path=`$WHICH "$new_path" 2> /dev/null`
38755    # bat and cmd files are not always considered executable in cygwin causing which
38756    # to not find them
38757    if test "x$new_path" = x \
38758        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38759        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38760      new_path=`$CYGPATH -u "$path"`
38761    fi
38762    if test "x$new_path" = x; then
38763      # It's still not found. Now this is an unrecoverable error.
38764      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38765$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38766      has_space=`$ECHO "$complete" | $GREP " "`
38767      if test "x$has_space" != x; then
38768        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38769$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38770      fi
38771      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38772    fi
38773  fi
38774
38775  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38776  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38777  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38778  # "foo.exe" is OK but "foo" is an error.
38779  #
38780  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38781  # It is also a way to make sure we got the proper file name for the real test later on.
38782  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38783  if test "x$test_shortpath" = x; then
38784    # Short path failed, file does not exist as specified.
38785    # Try adding .exe or .cmd
38786    if test -f "${new_path}.exe"; then
38787      input_to_shortpath="${new_path}.exe"
38788    elif test -f "${new_path}.cmd"; then
38789      input_to_shortpath="${new_path}.cmd"
38790    else
38791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
38792$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
38793      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38794$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38795      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38796    fi
38797  else
38798    input_to_shortpath="$new_path"
38799  fi
38800
38801  # Call helper function which possibly converts this using DOS-style short mode.
38802  # If so, the updated path is stored in $new_path.
38803  new_path="$input_to_shortpath"
38804
38805  input_path="$input_to_shortpath"
38806  # Check if we need to convert this using DOS-style short mode. If the path
38807  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38808  # take no chances and rewrite it.
38809  # Note: m4 eats our [], so we need to use [ and ] instead.
38810  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38811  if test "x$has_forbidden_chars" != x; then
38812    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38813    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38814    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38815    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38816      # Going to short mode and back again did indeed matter. Since short mode is
38817      # case insensitive, let's make it lowercase to improve readability.
38818      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38819      # Now convert it back to Unix-stile (cygpath)
38820      input_path=`$CYGPATH -u "$shortmode_path"`
38821      new_path="$input_path"
38822    fi
38823  fi
38824
38825  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38826  if test "x$test_cygdrive_prefix" = x; then
38827    # As a simple fix, exclude /usr/bin since it's not a real path.
38828    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38829      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38830      # a path prefixed by /cygdrive for fixpath to work.
38831      new_path="$CYGWIN_ROOT_PATH$input_path"
38832    fi
38833  fi
38834
38835  # remove trailing .exe if any
38836  new_path="${new_path/%.exe/}"
38837
38838  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38839
38840  # First separate the path from the arguments. This will split at the first
38841  # space.
38842  complete="$OBJDUMP"
38843  path="${complete%% *}"
38844  tmp="$complete EOL"
38845  arguments="${tmp#* }"
38846
38847  # Input might be given as Windows format, start by converting to
38848  # unix format.
38849  new_path="$path"
38850
38851  windows_path="$new_path"
38852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38853    unix_path=`$CYGPATH -u "$windows_path"`
38854    new_path="$unix_path"
38855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38857    new_path="$unix_path"
38858  fi
38859
38860
38861  # Now try to locate executable using which
38862  new_path=`$WHICH "$new_path" 2> /dev/null`
38863
38864  if test "x$new_path" = x; then
38865    # Oops. Which didn't find the executable.
38866    # The splitting of arguments from the executable at a space might have been incorrect,
38867    # since paths with space are more likely in Windows. Give it another try with the whole
38868    # argument.
38869    path="$complete"
38870    arguments="EOL"
38871    new_path="$path"
38872
38873  windows_path="$new_path"
38874  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38875    unix_path=`$CYGPATH -u "$windows_path"`
38876    new_path="$unix_path"
38877  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38878    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38879    new_path="$unix_path"
38880  fi
38881
38882
38883    new_path=`$WHICH "$new_path" 2> /dev/null`
38884
38885    if test "x$new_path" = x; then
38886      # It's still not found. Now this is an unrecoverable error.
38887      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38888$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38889      has_space=`$ECHO "$complete" | $GREP " "`
38890      if test "x$has_space" != x; then
38891        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38892$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38893      fi
38894      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38895    fi
38896  fi
38897
38898  # Now new_path has a complete unix path to the binary
38899  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38900    # Keep paths in /bin as-is, but remove trailing .exe if any
38901    new_path="${new_path/%.exe/}"
38902    # Do not save /bin paths to all_fixpath_prefixes!
38903  else
38904    # Not in mixed or Windows style, start by that.
38905    new_path=`cmd //c echo $new_path`
38906
38907  input_path="$new_path"
38908  # Check if we need to convert this using DOS-style short mode. If the path
38909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38910  # take no chances and rewrite it.
38911  # Note: m4 eats our [], so we need to use [ and ] instead.
38912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38913  if test "x$has_forbidden_chars" != x; then
38914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38915    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38916  fi
38917
38918    # Output is in $new_path
38919
38920  windows_path="$new_path"
38921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38922    unix_path=`$CYGPATH -u "$windows_path"`
38923    new_path="$unix_path"
38924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38926    new_path="$unix_path"
38927  fi
38928
38929    # remove trailing .exe if any
38930    new_path="${new_path/%.exe/}"
38931
38932    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38933    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38934  fi
38935
38936  else
38937    # We're on a posix platform. Hooray! :)
38938    # First separate the path from the arguments. This will split at the first
38939    # space.
38940    complete="$OBJDUMP"
38941    path="${complete%% *}"
38942    tmp="$complete EOL"
38943    arguments="${tmp#* }"
38944
38945    # Cannot rely on the command "which" here since it doesn't always work.
38946    is_absolute_path=`$ECHO "$path" | $GREP ^/`
38947    if test -z "$is_absolute_path"; then
38948      # Path to executable is not absolute. Find it.
38949      IFS_save="$IFS"
38950      IFS=:
38951      for p in $PATH; do
38952        if test -f "$p/$path" && test -x "$p/$path"; then
38953          new_path="$p/$path"
38954          break
38955        fi
38956      done
38957      IFS="$IFS_save"
38958    else
38959      # This is an absolute path, we can use it without further modifications.
38960      new_path="$path"
38961    fi
38962
38963    if test "x$new_path" = x; then
38964      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
38965$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
38966      has_space=`$ECHO "$complete" | $GREP " "`
38967      if test "x$has_space" != x; then
38968        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38969$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38970      fi
38971      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
38972    fi
38973  fi
38974
38975  # Now join together the path and the arguments once again
38976  if test "x$arguments" != xEOL; then
38977    new_complete="$new_path ${arguments% *}"
38978  else
38979    new_complete="$new_path"
38980  fi
38981
38982  if test "x$complete" != "x$new_complete"; then
38983    OBJDUMP="$new_complete"
38984    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
38985$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
38986  fi
38987
38988  fi
38989
38990
38991  # Restore old path.
38992  PATH="$OLD_PATH"
38993
38994  # Restore the flags to the user specified values.
38995  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
38996  CFLAGS="$ORG_CFLAGS"
38997  CXXFLAGS="$ORG_CXXFLAGS"
38998  OBJCFLAGS="$ORG_OBJCFLAGS"
38999
39000
39001# Finally do some processing after the detection phase
39002
39003  if test "x$COMPILE_TYPE" = "xcross"; then
39004    # Now we need to find a C/C++ compiler that can build executables for the
39005    # build platform. We can't use the AC_PROG_CC macro, since it can only be
39006    # used once. Also, we need to do this without adding a tools dir to the
39007    # path, otherwise we might pick up cross-compilers which don't use standard
39008    # naming.
39009
39010    # FIXME: we should list the discovered compilers as an exclude pattern!
39011    # If we do that, we can do this detection before POST_DETECTION, and still
39012    # find the build compilers in the tools dir, if needed.
39013
39014
39015  # Publish this variable in the help.
39016
39017
39018  if test "x$BUILD_CC" = x; then
39019    # The variable is not set by user, try to locate tool using the code snippet
39020    for ac_prog in cl cc gcc
39021do
39022  # Extract the first word of "$ac_prog", so it can be a program name with args.
39023set dummy $ac_prog; ac_word=$2
39024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39025$as_echo_n "checking for $ac_word... " >&6; }
39026if ${ac_cv_path_BUILD_CC+:} false; then :
39027  $as_echo_n "(cached) " >&6
39028else
39029  case $BUILD_CC in
39030  [\\/]* | ?:[\\/]*)
39031  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39032  ;;
39033  *)
39034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39035for as_dir in $PATH
39036do
39037  IFS=$as_save_IFS
39038  test -z "$as_dir" && as_dir=.
39039    for ac_exec_ext in '' $ac_executable_extensions; do
39040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39041    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39043    break 2
39044  fi
39045done
39046  done
39047IFS=$as_save_IFS
39048
39049  ;;
39050esac
39051fi
39052BUILD_CC=$ac_cv_path_BUILD_CC
39053if test -n "$BUILD_CC"; then
39054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39055$as_echo "$BUILD_CC" >&6; }
39056else
39057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39058$as_echo "no" >&6; }
39059fi
39060
39061
39062  test -n "$BUILD_CC" && break
39063done
39064
39065  else
39066    # The variable is set, but is it from the command line or the environment?
39067
39068    # Try to remove the string !BUILD_CC! from our list.
39069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
39070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39071      # If it failed, the variable was not from the command line. Ignore it,
39072      # but warn the user (except for BASH, which is always set by the calling BASH).
39073      if test "xBUILD_CC" != xBASH; then
39074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
39075$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
39076      fi
39077      # Try to locate tool using the code snippet
39078      for ac_prog in cl cc gcc
39079do
39080  # Extract the first word of "$ac_prog", so it can be a program name with args.
39081set dummy $ac_prog; ac_word=$2
39082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39083$as_echo_n "checking for $ac_word... " >&6; }
39084if ${ac_cv_path_BUILD_CC+:} false; then :
39085  $as_echo_n "(cached) " >&6
39086else
39087  case $BUILD_CC in
39088  [\\/]* | ?:[\\/]*)
39089  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39090  ;;
39091  *)
39092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39093for as_dir in $PATH
39094do
39095  IFS=$as_save_IFS
39096  test -z "$as_dir" && as_dir=.
39097    for ac_exec_ext in '' $ac_executable_extensions; do
39098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39099    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39101    break 2
39102  fi
39103done
39104  done
39105IFS=$as_save_IFS
39106
39107  ;;
39108esac
39109fi
39110BUILD_CC=$ac_cv_path_BUILD_CC
39111if test -n "$BUILD_CC"; then
39112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39113$as_echo "$BUILD_CC" >&6; }
39114else
39115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39116$as_echo "no" >&6; }
39117fi
39118
39119
39120  test -n "$BUILD_CC" && break
39121done
39122
39123    else
39124      # If it succeeded, then it was overridden by the user. We will use it
39125      # for the tool.
39126
39127      # First remove it from the list of overridden variables, so we can test
39128      # for unknown variables in the end.
39129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39130
39131      # Check if the provided tool contains a complete path.
39132      tool_specified="$BUILD_CC"
39133      tool_basename="${tool_specified##*/}"
39134      if test "x$tool_basename" = "x$tool_specified"; then
39135        # A command without a complete path is provided, search $PATH.
39136        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
39137$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
39138        # Extract the first word of "$tool_basename", so it can be a program name with args.
39139set dummy $tool_basename; ac_word=$2
39140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39141$as_echo_n "checking for $ac_word... " >&6; }
39142if ${ac_cv_path_BUILD_CC+:} false; then :
39143  $as_echo_n "(cached) " >&6
39144else
39145  case $BUILD_CC in
39146  [\\/]* | ?:[\\/]*)
39147  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
39148  ;;
39149  *)
39150  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39151for as_dir in $PATH
39152do
39153  IFS=$as_save_IFS
39154  test -z "$as_dir" && as_dir=.
39155    for ac_exec_ext in '' $ac_executable_extensions; do
39156  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39157    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
39158    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39159    break 2
39160  fi
39161done
39162  done
39163IFS=$as_save_IFS
39164
39165  ;;
39166esac
39167fi
39168BUILD_CC=$ac_cv_path_BUILD_CC
39169if test -n "$BUILD_CC"; then
39170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
39171$as_echo "$BUILD_CC" >&6; }
39172else
39173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39174$as_echo "no" >&6; }
39175fi
39176
39177
39178        if test "x$BUILD_CC" = x; then
39179          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39180        fi
39181      else
39182        # Otherwise we believe it is a complete path. Use it as it is.
39183        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
39184$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
39185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
39186$as_echo_n "checking for BUILD_CC... " >&6; }
39187        if test ! -x "$tool_specified"; then
39188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39189$as_echo "not found" >&6; }
39190          as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
39191        fi
39192        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39193$as_echo "$tool_specified" >&6; }
39194      fi
39195    fi
39196  fi
39197
39198
39199
39200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39201
39202  # First separate the path from the arguments. This will split at the first
39203  # space.
39204  complete="$BUILD_CC"
39205  path="${complete%% *}"
39206  tmp="$complete EOL"
39207  arguments="${tmp#* }"
39208
39209  # Input might be given as Windows format, start by converting to
39210  # unix format.
39211  new_path=`$CYGPATH -u "$path"`
39212
39213  # Now try to locate executable using which
39214  new_path=`$WHICH "$new_path" 2> /dev/null`
39215  # bat and cmd files are not always considered executable in cygwin causing which
39216  # to not find them
39217  if test "x$new_path" = x \
39218      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39219      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39220    new_path=`$CYGPATH -u "$path"`
39221  fi
39222  if test "x$new_path" = x; then
39223    # Oops. Which didn't find the executable.
39224    # The splitting of arguments from the executable at a space might have been incorrect,
39225    # since paths with space are more likely in Windows. Give it another try with the whole
39226    # argument.
39227    path="$complete"
39228    arguments="EOL"
39229    new_path=`$CYGPATH -u "$path"`
39230    new_path=`$WHICH "$new_path" 2> /dev/null`
39231    # bat and cmd files are not always considered executable in cygwin causing which
39232    # to not find them
39233    if test "x$new_path" = x \
39234        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39235        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39236      new_path=`$CYGPATH -u "$path"`
39237    fi
39238    if test "x$new_path" = x; then
39239      # It's still not found. Now this is an unrecoverable error.
39240      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39241$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39242      has_space=`$ECHO "$complete" | $GREP " "`
39243      if test "x$has_space" != x; then
39244        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39245$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39246      fi
39247      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39248    fi
39249  fi
39250
39251  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39252  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39253  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39254  # "foo.exe" is OK but "foo" is an error.
39255  #
39256  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39257  # It is also a way to make sure we got the proper file name for the real test later on.
39258  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39259  if test "x$test_shortpath" = x; then
39260    # Short path failed, file does not exist as specified.
39261    # Try adding .exe or .cmd
39262    if test -f "${new_path}.exe"; then
39263      input_to_shortpath="${new_path}.exe"
39264    elif test -f "${new_path}.cmd"; then
39265      input_to_shortpath="${new_path}.cmd"
39266    else
39267      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
39268$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
39269      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39270$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39271      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39272    fi
39273  else
39274    input_to_shortpath="$new_path"
39275  fi
39276
39277  # Call helper function which possibly converts this using DOS-style short mode.
39278  # If so, the updated path is stored in $new_path.
39279  new_path="$input_to_shortpath"
39280
39281  input_path="$input_to_shortpath"
39282  # Check if we need to convert this using DOS-style short mode. If the path
39283  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39284  # take no chances and rewrite it.
39285  # Note: m4 eats our [], so we need to use [ and ] instead.
39286  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39287  if test "x$has_forbidden_chars" != x; then
39288    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39289    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39290    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39291    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39292      # Going to short mode and back again did indeed matter. Since short mode is
39293      # case insensitive, let's make it lowercase to improve readability.
39294      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39295      # Now convert it back to Unix-stile (cygpath)
39296      input_path=`$CYGPATH -u "$shortmode_path"`
39297      new_path="$input_path"
39298    fi
39299  fi
39300
39301  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39302  if test "x$test_cygdrive_prefix" = x; then
39303    # As a simple fix, exclude /usr/bin since it's not a real path.
39304    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39305      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39306      # a path prefixed by /cygdrive for fixpath to work.
39307      new_path="$CYGWIN_ROOT_PATH$input_path"
39308    fi
39309  fi
39310
39311  # remove trailing .exe if any
39312  new_path="${new_path/%.exe/}"
39313
39314  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39315
39316  # First separate the path from the arguments. This will split at the first
39317  # space.
39318  complete="$BUILD_CC"
39319  path="${complete%% *}"
39320  tmp="$complete EOL"
39321  arguments="${tmp#* }"
39322
39323  # Input might be given as Windows format, start by converting to
39324  # unix format.
39325  new_path="$path"
39326
39327  windows_path="$new_path"
39328  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39329    unix_path=`$CYGPATH -u "$windows_path"`
39330    new_path="$unix_path"
39331  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39332    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39333    new_path="$unix_path"
39334  fi
39335
39336
39337  # Now try to locate executable using which
39338  new_path=`$WHICH "$new_path" 2> /dev/null`
39339
39340  if test "x$new_path" = x; then
39341    # Oops. Which didn't find the executable.
39342    # The splitting of arguments from the executable at a space might have been incorrect,
39343    # since paths with space are more likely in Windows. Give it another try with the whole
39344    # argument.
39345    path="$complete"
39346    arguments="EOL"
39347    new_path="$path"
39348
39349  windows_path="$new_path"
39350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39351    unix_path=`$CYGPATH -u "$windows_path"`
39352    new_path="$unix_path"
39353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39355    new_path="$unix_path"
39356  fi
39357
39358
39359    new_path=`$WHICH "$new_path" 2> /dev/null`
39360
39361    if test "x$new_path" = x; then
39362      # It's still not found. Now this is an unrecoverable error.
39363      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39364$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39365      has_space=`$ECHO "$complete" | $GREP " "`
39366      if test "x$has_space" != x; then
39367        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39368$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39369      fi
39370      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39371    fi
39372  fi
39373
39374  # Now new_path has a complete unix path to the binary
39375  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39376    # Keep paths in /bin as-is, but remove trailing .exe if any
39377    new_path="${new_path/%.exe/}"
39378    # Do not save /bin paths to all_fixpath_prefixes!
39379  else
39380    # Not in mixed or Windows style, start by that.
39381    new_path=`cmd //c echo $new_path`
39382
39383  input_path="$new_path"
39384  # Check if we need to convert this using DOS-style short mode. If the path
39385  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39386  # take no chances and rewrite it.
39387  # Note: m4 eats our [], so we need to use [ and ] instead.
39388  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39389  if test "x$has_forbidden_chars" != x; then
39390    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39391    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39392  fi
39393
39394    # Output is in $new_path
39395
39396  windows_path="$new_path"
39397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39398    unix_path=`$CYGPATH -u "$windows_path"`
39399    new_path="$unix_path"
39400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39402    new_path="$unix_path"
39403  fi
39404
39405    # remove trailing .exe if any
39406    new_path="${new_path/%.exe/}"
39407
39408    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39409    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39410  fi
39411
39412  else
39413    # We're on a posix platform. Hooray! :)
39414    # First separate the path from the arguments. This will split at the first
39415    # space.
39416    complete="$BUILD_CC"
39417    path="${complete%% *}"
39418    tmp="$complete EOL"
39419    arguments="${tmp#* }"
39420
39421    # Cannot rely on the command "which" here since it doesn't always work.
39422    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39423    if test -z "$is_absolute_path"; then
39424      # Path to executable is not absolute. Find it.
39425      IFS_save="$IFS"
39426      IFS=:
39427      for p in $PATH; do
39428        if test -f "$p/$path" && test -x "$p/$path"; then
39429          new_path="$p/$path"
39430          break
39431        fi
39432      done
39433      IFS="$IFS_save"
39434    else
39435      # This is an absolute path, we can use it without further modifications.
39436      new_path="$path"
39437    fi
39438
39439    if test "x$new_path" = x; then
39440      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
39441$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
39442      has_space=`$ECHO "$complete" | $GREP " "`
39443      if test "x$has_space" != x; then
39444        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39445$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39446      fi
39447      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
39448    fi
39449  fi
39450
39451  # Now join together the path and the arguments once again
39452  if test "x$arguments" != xEOL; then
39453    new_complete="$new_path ${arguments% *}"
39454  else
39455    new_complete="$new_path"
39456  fi
39457
39458  if test "x$complete" != "x$new_complete"; then
39459    BUILD_CC="$new_complete"
39460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
39461$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
39462  fi
39463
39464
39465
39466  # Publish this variable in the help.
39467
39468
39469  if test "x$BUILD_CXX" = x; then
39470    # The variable is not set by user, try to locate tool using the code snippet
39471    for ac_prog in cl CC g++
39472do
39473  # Extract the first word of "$ac_prog", so it can be a program name with args.
39474set dummy $ac_prog; ac_word=$2
39475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39476$as_echo_n "checking for $ac_word... " >&6; }
39477if ${ac_cv_path_BUILD_CXX+:} false; then :
39478  $as_echo_n "(cached) " >&6
39479else
39480  case $BUILD_CXX in
39481  [\\/]* | ?:[\\/]*)
39482  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39483  ;;
39484  *)
39485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39486for as_dir in $PATH
39487do
39488  IFS=$as_save_IFS
39489  test -z "$as_dir" && as_dir=.
39490    for ac_exec_ext in '' $ac_executable_extensions; do
39491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39492    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39494    break 2
39495  fi
39496done
39497  done
39498IFS=$as_save_IFS
39499
39500  ;;
39501esac
39502fi
39503BUILD_CXX=$ac_cv_path_BUILD_CXX
39504if test -n "$BUILD_CXX"; then
39505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39506$as_echo "$BUILD_CXX" >&6; }
39507else
39508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39509$as_echo "no" >&6; }
39510fi
39511
39512
39513  test -n "$BUILD_CXX" && break
39514done
39515
39516  else
39517    # The variable is set, but is it from the command line or the environment?
39518
39519    # Try to remove the string !BUILD_CXX! from our list.
39520    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
39521    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39522      # If it failed, the variable was not from the command line. Ignore it,
39523      # but warn the user (except for BASH, which is always set by the calling BASH).
39524      if test "xBUILD_CXX" != xBASH; then
39525        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
39526$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
39527      fi
39528      # Try to locate tool using the code snippet
39529      for ac_prog in cl CC g++
39530do
39531  # Extract the first word of "$ac_prog", so it can be a program name with args.
39532set dummy $ac_prog; ac_word=$2
39533{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39534$as_echo_n "checking for $ac_word... " >&6; }
39535if ${ac_cv_path_BUILD_CXX+:} false; then :
39536  $as_echo_n "(cached) " >&6
39537else
39538  case $BUILD_CXX in
39539  [\\/]* | ?:[\\/]*)
39540  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39541  ;;
39542  *)
39543  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39544for as_dir in $PATH
39545do
39546  IFS=$as_save_IFS
39547  test -z "$as_dir" && as_dir=.
39548    for ac_exec_ext in '' $ac_executable_extensions; do
39549  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39550    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39551    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39552    break 2
39553  fi
39554done
39555  done
39556IFS=$as_save_IFS
39557
39558  ;;
39559esac
39560fi
39561BUILD_CXX=$ac_cv_path_BUILD_CXX
39562if test -n "$BUILD_CXX"; then
39563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39564$as_echo "$BUILD_CXX" >&6; }
39565else
39566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39567$as_echo "no" >&6; }
39568fi
39569
39570
39571  test -n "$BUILD_CXX" && break
39572done
39573
39574    else
39575      # If it succeeded, then it was overridden by the user. We will use it
39576      # for the tool.
39577
39578      # First remove it from the list of overridden variables, so we can test
39579      # for unknown variables in the end.
39580      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39581
39582      # Check if the provided tool contains a complete path.
39583      tool_specified="$BUILD_CXX"
39584      tool_basename="${tool_specified##*/}"
39585      if test "x$tool_basename" = "x$tool_specified"; then
39586        # A command without a complete path is provided, search $PATH.
39587        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
39588$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
39589        # Extract the first word of "$tool_basename", so it can be a program name with args.
39590set dummy $tool_basename; ac_word=$2
39591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39592$as_echo_n "checking for $ac_word... " >&6; }
39593if ${ac_cv_path_BUILD_CXX+:} false; then :
39594  $as_echo_n "(cached) " >&6
39595else
39596  case $BUILD_CXX in
39597  [\\/]* | ?:[\\/]*)
39598  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
39599  ;;
39600  *)
39601  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39602for as_dir in $PATH
39603do
39604  IFS=$as_save_IFS
39605  test -z "$as_dir" && as_dir=.
39606    for ac_exec_ext in '' $ac_executable_extensions; do
39607  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39608    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
39609    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39610    break 2
39611  fi
39612done
39613  done
39614IFS=$as_save_IFS
39615
39616  ;;
39617esac
39618fi
39619BUILD_CXX=$ac_cv_path_BUILD_CXX
39620if test -n "$BUILD_CXX"; then
39621  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
39622$as_echo "$BUILD_CXX" >&6; }
39623else
39624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39625$as_echo "no" >&6; }
39626fi
39627
39628
39629        if test "x$BUILD_CXX" = x; then
39630          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39631        fi
39632      else
39633        # Otherwise we believe it is a complete path. Use it as it is.
39634        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
39635$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
39636        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
39637$as_echo_n "checking for BUILD_CXX... " >&6; }
39638        if test ! -x "$tool_specified"; then
39639          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39640$as_echo "not found" >&6; }
39641          as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
39642        fi
39643        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39644$as_echo "$tool_specified" >&6; }
39645      fi
39646    fi
39647  fi
39648
39649
39650
39651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39652
39653  # First separate the path from the arguments. This will split at the first
39654  # space.
39655  complete="$BUILD_CXX"
39656  path="${complete%% *}"
39657  tmp="$complete EOL"
39658  arguments="${tmp#* }"
39659
39660  # Input might be given as Windows format, start by converting to
39661  # unix format.
39662  new_path=`$CYGPATH -u "$path"`
39663
39664  # Now try to locate executable using which
39665  new_path=`$WHICH "$new_path" 2> /dev/null`
39666  # bat and cmd files are not always considered executable in cygwin causing which
39667  # to not find them
39668  if test "x$new_path" = x \
39669      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39670      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39671    new_path=`$CYGPATH -u "$path"`
39672  fi
39673  if test "x$new_path" = x; then
39674    # Oops. Which didn't find the executable.
39675    # The splitting of arguments from the executable at a space might have been incorrect,
39676    # since paths with space are more likely in Windows. Give it another try with the whole
39677    # argument.
39678    path="$complete"
39679    arguments="EOL"
39680    new_path=`$CYGPATH -u "$path"`
39681    new_path=`$WHICH "$new_path" 2> /dev/null`
39682    # bat and cmd files are not always considered executable in cygwin causing which
39683    # to not find them
39684    if test "x$new_path" = x \
39685        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39686        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39687      new_path=`$CYGPATH -u "$path"`
39688    fi
39689    if test "x$new_path" = x; then
39690      # It's still not found. Now this is an unrecoverable error.
39691      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39692$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39693      has_space=`$ECHO "$complete" | $GREP " "`
39694      if test "x$has_space" != x; then
39695        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39696$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39697      fi
39698      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39699    fi
39700  fi
39701
39702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39705  # "foo.exe" is OK but "foo" is an error.
39706  #
39707  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39708  # It is also a way to make sure we got the proper file name for the real test later on.
39709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39710  if test "x$test_shortpath" = x; then
39711    # Short path failed, file does not exist as specified.
39712    # Try adding .exe or .cmd
39713    if test -f "${new_path}.exe"; then
39714      input_to_shortpath="${new_path}.exe"
39715    elif test -f "${new_path}.cmd"; then
39716      input_to_shortpath="${new_path}.cmd"
39717    else
39718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
39719$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
39720      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39721$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39722      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39723    fi
39724  else
39725    input_to_shortpath="$new_path"
39726  fi
39727
39728  # Call helper function which possibly converts this using DOS-style short mode.
39729  # If so, the updated path is stored in $new_path.
39730  new_path="$input_to_shortpath"
39731
39732  input_path="$input_to_shortpath"
39733  # Check if we need to convert this using DOS-style short mode. If the path
39734  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39735  # take no chances and rewrite it.
39736  # Note: m4 eats our [], so we need to use [ and ] instead.
39737  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39738  if test "x$has_forbidden_chars" != x; then
39739    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39740    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39741    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39742    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39743      # Going to short mode and back again did indeed matter. Since short mode is
39744      # case insensitive, let's make it lowercase to improve readability.
39745      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39746      # Now convert it back to Unix-stile (cygpath)
39747      input_path=`$CYGPATH -u "$shortmode_path"`
39748      new_path="$input_path"
39749    fi
39750  fi
39751
39752  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39753  if test "x$test_cygdrive_prefix" = x; then
39754    # As a simple fix, exclude /usr/bin since it's not a real path.
39755    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39756      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39757      # a path prefixed by /cygdrive for fixpath to work.
39758      new_path="$CYGWIN_ROOT_PATH$input_path"
39759    fi
39760  fi
39761
39762  # remove trailing .exe if any
39763  new_path="${new_path/%.exe/}"
39764
39765  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39766
39767  # First separate the path from the arguments. This will split at the first
39768  # space.
39769  complete="$BUILD_CXX"
39770  path="${complete%% *}"
39771  tmp="$complete EOL"
39772  arguments="${tmp#* }"
39773
39774  # Input might be given as Windows format, start by converting to
39775  # unix format.
39776  new_path="$path"
39777
39778  windows_path="$new_path"
39779  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39780    unix_path=`$CYGPATH -u "$windows_path"`
39781    new_path="$unix_path"
39782  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39783    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39784    new_path="$unix_path"
39785  fi
39786
39787
39788  # Now try to locate executable using which
39789  new_path=`$WHICH "$new_path" 2> /dev/null`
39790
39791  if test "x$new_path" = x; then
39792    # Oops. Which didn't find the executable.
39793    # The splitting of arguments from the executable at a space might have been incorrect,
39794    # since paths with space are more likely in Windows. Give it another try with the whole
39795    # argument.
39796    path="$complete"
39797    arguments="EOL"
39798    new_path="$path"
39799
39800  windows_path="$new_path"
39801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39802    unix_path=`$CYGPATH -u "$windows_path"`
39803    new_path="$unix_path"
39804  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39805    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39806    new_path="$unix_path"
39807  fi
39808
39809
39810    new_path=`$WHICH "$new_path" 2> /dev/null`
39811
39812    if test "x$new_path" = x; then
39813      # It's still not found. Now this is an unrecoverable error.
39814      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39815$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39816      has_space=`$ECHO "$complete" | $GREP " "`
39817      if test "x$has_space" != x; then
39818        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39819$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39820      fi
39821      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39822    fi
39823  fi
39824
39825  # Now new_path has a complete unix path to the binary
39826  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39827    # Keep paths in /bin as-is, but remove trailing .exe if any
39828    new_path="${new_path/%.exe/}"
39829    # Do not save /bin paths to all_fixpath_prefixes!
39830  else
39831    # Not in mixed or Windows style, start by that.
39832    new_path=`cmd //c echo $new_path`
39833
39834  input_path="$new_path"
39835  # Check if we need to convert this using DOS-style short mode. If the path
39836  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39837  # take no chances and rewrite it.
39838  # Note: m4 eats our [], so we need to use [ and ] instead.
39839  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39840  if test "x$has_forbidden_chars" != x; then
39841    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39842    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39843  fi
39844
39845    # Output is in $new_path
39846
39847  windows_path="$new_path"
39848  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39849    unix_path=`$CYGPATH -u "$windows_path"`
39850    new_path="$unix_path"
39851  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39852    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39853    new_path="$unix_path"
39854  fi
39855
39856    # remove trailing .exe if any
39857    new_path="${new_path/%.exe/}"
39858
39859    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39860    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39861  fi
39862
39863  else
39864    # We're on a posix platform. Hooray! :)
39865    # First separate the path from the arguments. This will split at the first
39866    # space.
39867    complete="$BUILD_CXX"
39868    path="${complete%% *}"
39869    tmp="$complete EOL"
39870    arguments="${tmp#* }"
39871
39872    # Cannot rely on the command "which" here since it doesn't always work.
39873    is_absolute_path=`$ECHO "$path" | $GREP ^/`
39874    if test -z "$is_absolute_path"; then
39875      # Path to executable is not absolute. Find it.
39876      IFS_save="$IFS"
39877      IFS=:
39878      for p in $PATH; do
39879        if test -f "$p/$path" && test -x "$p/$path"; then
39880          new_path="$p/$path"
39881          break
39882        fi
39883      done
39884      IFS="$IFS_save"
39885    else
39886      # This is an absolute path, we can use it without further modifications.
39887      new_path="$path"
39888    fi
39889
39890    if test "x$new_path" = x; then
39891      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
39892$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
39893      has_space=`$ECHO "$complete" | $GREP " "`
39894      if test "x$has_space" != x; then
39895        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39896$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39897      fi
39898      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
39899    fi
39900  fi
39901
39902  # Now join together the path and the arguments once again
39903  if test "x$arguments" != xEOL; then
39904    new_complete="$new_path ${arguments% *}"
39905  else
39906    new_complete="$new_path"
39907  fi
39908
39909  if test "x$complete" != "x$new_complete"; then
39910    BUILD_CXX="$new_complete"
39911    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
39912$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
39913  fi
39914
39915
39916
39917  # Publish this variable in the help.
39918
39919
39920  if test "x$BUILD_LD" = x; then
39921    # The variable is not set by user, try to locate tool using the code snippet
39922    for ac_prog in ld
39923do
39924  # Extract the first word of "$ac_prog", so it can be a program name with args.
39925set dummy $ac_prog; ac_word=$2
39926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39927$as_echo_n "checking for $ac_word... " >&6; }
39928if ${ac_cv_path_BUILD_LD+:} false; then :
39929  $as_echo_n "(cached) " >&6
39930else
39931  case $BUILD_LD in
39932  [\\/]* | ?:[\\/]*)
39933  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39934  ;;
39935  *)
39936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39937for as_dir in $PATH
39938do
39939  IFS=$as_save_IFS
39940  test -z "$as_dir" && as_dir=.
39941    for ac_exec_ext in '' $ac_executable_extensions; do
39942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39943    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
39944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39945    break 2
39946  fi
39947done
39948  done
39949IFS=$as_save_IFS
39950
39951  ;;
39952esac
39953fi
39954BUILD_LD=$ac_cv_path_BUILD_LD
39955if test -n "$BUILD_LD"; then
39956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
39957$as_echo "$BUILD_LD" >&6; }
39958else
39959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39960$as_echo "no" >&6; }
39961fi
39962
39963
39964  test -n "$BUILD_LD" && break
39965done
39966
39967  else
39968    # The variable is set, but is it from the command line or the environment?
39969
39970    # Try to remove the string !BUILD_LD! from our list.
39971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_LD!/}
39972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39973      # If it failed, the variable was not from the command line. Ignore it,
39974      # but warn the user (except for BASH, which is always set by the calling BASH).
39975      if test "xBUILD_LD" != xBASH; then
39976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&5
39977$as_echo "$as_me: WARNING: Ignoring value of BUILD_LD from the environment. Use command line variables instead." >&2;}
39978      fi
39979      # Try to locate tool using the code snippet
39980      for ac_prog in ld
39981do
39982  # Extract the first word of "$ac_prog", so it can be a program name with args.
39983set dummy $ac_prog; ac_word=$2
39984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39985$as_echo_n "checking for $ac_word... " >&6; }
39986if ${ac_cv_path_BUILD_LD+:} false; then :
39987  $as_echo_n "(cached) " >&6
39988else
39989  case $BUILD_LD in
39990  [\\/]* | ?:[\\/]*)
39991  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
39992  ;;
39993  *)
39994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39995for as_dir in $PATH
39996do
39997  IFS=$as_save_IFS
39998  test -z "$as_dir" && as_dir=.
39999    for ac_exec_ext in '' $ac_executable_extensions; do
40000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40001    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40003    break 2
40004  fi
40005done
40006  done
40007IFS=$as_save_IFS
40008
40009  ;;
40010esac
40011fi
40012BUILD_LD=$ac_cv_path_BUILD_LD
40013if test -n "$BUILD_LD"; then
40014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40015$as_echo "$BUILD_LD" >&6; }
40016else
40017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40018$as_echo "no" >&6; }
40019fi
40020
40021
40022  test -n "$BUILD_LD" && break
40023done
40024
40025    else
40026      # If it succeeded, then it was overridden by the user. We will use it
40027      # for the tool.
40028
40029      # First remove it from the list of overridden variables, so we can test
40030      # for unknown variables in the end.
40031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40032
40033      # Check if the provided tool contains a complete path.
40034      tool_specified="$BUILD_LD"
40035      tool_basename="${tool_specified##*/}"
40036      if test "x$tool_basename" = "x$tool_specified"; then
40037        # A command without a complete path is provided, search $PATH.
40038        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_LD=$tool_basename" >&5
40039$as_echo "$as_me: Will search for user supplied tool BUILD_LD=$tool_basename" >&6;}
40040        # Extract the first word of "$tool_basename", so it can be a program name with args.
40041set dummy $tool_basename; ac_word=$2
40042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40043$as_echo_n "checking for $ac_word... " >&6; }
40044if ${ac_cv_path_BUILD_LD+:} false; then :
40045  $as_echo_n "(cached) " >&6
40046else
40047  case $BUILD_LD in
40048  [\\/]* | ?:[\\/]*)
40049  ac_cv_path_BUILD_LD="$BUILD_LD" # Let the user override the test with a path.
40050  ;;
40051  *)
40052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40053for as_dir in $PATH
40054do
40055  IFS=$as_save_IFS
40056  test -z "$as_dir" && as_dir=.
40057    for ac_exec_ext in '' $ac_executable_extensions; do
40058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40059    ac_cv_path_BUILD_LD="$as_dir/$ac_word$ac_exec_ext"
40060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40061    break 2
40062  fi
40063done
40064  done
40065IFS=$as_save_IFS
40066
40067  ;;
40068esac
40069fi
40070BUILD_LD=$ac_cv_path_BUILD_LD
40071if test -n "$BUILD_LD"; then
40072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_LD" >&5
40073$as_echo "$BUILD_LD" >&6; }
40074else
40075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40076$as_echo "no" >&6; }
40077fi
40078
40079
40080        if test "x$BUILD_LD" = x; then
40081          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40082        fi
40083      else
40084        # Otherwise we believe it is a complete path. Use it as it is.
40085        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_LD=$tool_specified" >&5
40086$as_echo "$as_me: Will use user supplied tool BUILD_LD=$tool_specified" >&6;}
40087        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_LD" >&5
40088$as_echo_n "checking for BUILD_LD... " >&6; }
40089        if test ! -x "$tool_specified"; then
40090          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40091$as_echo "not found" >&6; }
40092          as_fn_error $? "User supplied tool BUILD_LD=$tool_specified does not exist or is not executable" "$LINENO" 5
40093        fi
40094        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40095$as_echo "$tool_specified" >&6; }
40096      fi
40097    fi
40098  fi
40099
40100
40101
40102  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40103
40104  # First separate the path from the arguments. This will split at the first
40105  # space.
40106  complete="$BUILD_LD"
40107  path="${complete%% *}"
40108  tmp="$complete EOL"
40109  arguments="${tmp#* }"
40110
40111  # Input might be given as Windows format, start by converting to
40112  # unix format.
40113  new_path=`$CYGPATH -u "$path"`
40114
40115  # Now try to locate executable using which
40116  new_path=`$WHICH "$new_path" 2> /dev/null`
40117  # bat and cmd files are not always considered executable in cygwin causing which
40118  # to not find them
40119  if test "x$new_path" = x \
40120      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40121      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40122    new_path=`$CYGPATH -u "$path"`
40123  fi
40124  if test "x$new_path" = x; then
40125    # Oops. Which didn't find the executable.
40126    # The splitting of arguments from the executable at a space might have been incorrect,
40127    # since paths with space are more likely in Windows. Give it another try with the whole
40128    # argument.
40129    path="$complete"
40130    arguments="EOL"
40131    new_path=`$CYGPATH -u "$path"`
40132    new_path=`$WHICH "$new_path" 2> /dev/null`
40133    # bat and cmd files are not always considered executable in cygwin causing which
40134    # to not find them
40135    if test "x$new_path" = x \
40136        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40137        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40138      new_path=`$CYGPATH -u "$path"`
40139    fi
40140    if test "x$new_path" = x; then
40141      # It's still not found. Now this is an unrecoverable error.
40142      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40143$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40144      has_space=`$ECHO "$complete" | $GREP " "`
40145      if test "x$has_space" != x; then
40146        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40147$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40148      fi
40149      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40150    fi
40151  fi
40152
40153  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40154  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40155  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40156  # "foo.exe" is OK but "foo" is an error.
40157  #
40158  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40159  # It is also a way to make sure we got the proper file name for the real test later on.
40160  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40161  if test "x$test_shortpath" = x; then
40162    # Short path failed, file does not exist as specified.
40163    # Try adding .exe or .cmd
40164    if test -f "${new_path}.exe"; then
40165      input_to_shortpath="${new_path}.exe"
40166    elif test -f "${new_path}.cmd"; then
40167      input_to_shortpath="${new_path}.cmd"
40168    else
40169      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&5
40170$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$new_path\", is invalid." >&6;}
40171      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40172$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40173      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40174    fi
40175  else
40176    input_to_shortpath="$new_path"
40177  fi
40178
40179  # Call helper function which possibly converts this using DOS-style short mode.
40180  # If so, the updated path is stored in $new_path.
40181  new_path="$input_to_shortpath"
40182
40183  input_path="$input_to_shortpath"
40184  # Check if we need to convert this using DOS-style short mode. If the path
40185  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40186  # take no chances and rewrite it.
40187  # Note: m4 eats our [], so we need to use [ and ] instead.
40188  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40189  if test "x$has_forbidden_chars" != x; then
40190    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40191    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40192    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40193    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40194      # Going to short mode and back again did indeed matter. Since short mode is
40195      # case insensitive, let's make it lowercase to improve readability.
40196      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40197      # Now convert it back to Unix-stile (cygpath)
40198      input_path=`$CYGPATH -u "$shortmode_path"`
40199      new_path="$input_path"
40200    fi
40201  fi
40202
40203  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40204  if test "x$test_cygdrive_prefix" = x; then
40205    # As a simple fix, exclude /usr/bin since it's not a real path.
40206    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40207      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40208      # a path prefixed by /cygdrive for fixpath to work.
40209      new_path="$CYGWIN_ROOT_PATH$input_path"
40210    fi
40211  fi
40212
40213  # remove trailing .exe if any
40214  new_path="${new_path/%.exe/}"
40215
40216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40217
40218  # First separate the path from the arguments. This will split at the first
40219  # space.
40220  complete="$BUILD_LD"
40221  path="${complete%% *}"
40222  tmp="$complete EOL"
40223  arguments="${tmp#* }"
40224
40225  # Input might be given as Windows format, start by converting to
40226  # unix format.
40227  new_path="$path"
40228
40229  windows_path="$new_path"
40230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40231    unix_path=`$CYGPATH -u "$windows_path"`
40232    new_path="$unix_path"
40233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40235    new_path="$unix_path"
40236  fi
40237
40238
40239  # Now try to locate executable using which
40240  new_path=`$WHICH "$new_path" 2> /dev/null`
40241
40242  if test "x$new_path" = x; then
40243    # Oops. Which didn't find the executable.
40244    # The splitting of arguments from the executable at a space might have been incorrect,
40245    # since paths with space are more likely in Windows. Give it another try with the whole
40246    # argument.
40247    path="$complete"
40248    arguments="EOL"
40249    new_path="$path"
40250
40251  windows_path="$new_path"
40252  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40253    unix_path=`$CYGPATH -u "$windows_path"`
40254    new_path="$unix_path"
40255  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40256    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40257    new_path="$unix_path"
40258  fi
40259
40260
40261    new_path=`$WHICH "$new_path" 2> /dev/null`
40262
40263    if test "x$new_path" = x; then
40264      # It's still not found. Now this is an unrecoverable error.
40265      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40266$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40267      has_space=`$ECHO "$complete" | $GREP " "`
40268      if test "x$has_space" != x; then
40269        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40270$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40271      fi
40272      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40273    fi
40274  fi
40275
40276  # Now new_path has a complete unix path to the binary
40277  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40278    # Keep paths in /bin as-is, but remove trailing .exe if any
40279    new_path="${new_path/%.exe/}"
40280    # Do not save /bin paths to all_fixpath_prefixes!
40281  else
40282    # Not in mixed or Windows style, start by that.
40283    new_path=`cmd //c echo $new_path`
40284
40285  input_path="$new_path"
40286  # Check if we need to convert this using DOS-style short mode. If the path
40287  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40288  # take no chances and rewrite it.
40289  # Note: m4 eats our [], so we need to use [ and ] instead.
40290  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40291  if test "x$has_forbidden_chars" != x; then
40292    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40293    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40294  fi
40295
40296    # Output is in $new_path
40297
40298  windows_path="$new_path"
40299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40300    unix_path=`$CYGPATH -u "$windows_path"`
40301    new_path="$unix_path"
40302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40303    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40304    new_path="$unix_path"
40305  fi
40306
40307    # remove trailing .exe if any
40308    new_path="${new_path/%.exe/}"
40309
40310    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40311    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40312  fi
40313
40314  else
40315    # We're on a posix platform. Hooray! :)
40316    # First separate the path from the arguments. This will split at the first
40317    # space.
40318    complete="$BUILD_LD"
40319    path="${complete%% *}"
40320    tmp="$complete EOL"
40321    arguments="${tmp#* }"
40322
40323    # Cannot rely on the command "which" here since it doesn't always work.
40324    is_absolute_path=`$ECHO "$path" | $GREP ^/`
40325    if test -z "$is_absolute_path"; then
40326      # Path to executable is not absolute. Find it.
40327      IFS_save="$IFS"
40328      IFS=:
40329      for p in $PATH; do
40330        if test -f "$p/$path" && test -x "$p/$path"; then
40331          new_path="$p/$path"
40332          break
40333        fi
40334      done
40335      IFS="$IFS_save"
40336    else
40337      # This is an absolute path, we can use it without further modifications.
40338      new_path="$path"
40339    fi
40340
40341    if test "x$new_path" = x; then
40342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&5
40343$as_echo "$as_me: The path of BUILD_LD, which resolves as \"$complete\", is not found." >&6;}
40344      has_space=`$ECHO "$complete" | $GREP " "`
40345      if test "x$has_space" != x; then
40346        { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40347$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40348      fi
40349      as_fn_error $? "Cannot locate the the path of BUILD_LD" "$LINENO" 5
40350    fi
40351  fi
40352
40353  # Now join together the path and the arguments once again
40354  if test "x$arguments" != xEOL; then
40355    new_complete="$new_path ${arguments% *}"
40356  else
40357    new_complete="$new_path"
40358  fi
40359
40360  if test "x$complete" != "x$new_complete"; then
40361    BUILD_LD="$new_complete"
40362    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_LD to \"$new_complete\"" >&5
40363$as_echo "$as_me: Rewriting BUILD_LD to \"$new_complete\"" >&6;}
40364  fi
40365
40366  else
40367    # If we are not cross compiling, use the normal target compilers for
40368    # building the build platform executables.
40369    BUILD_CC="$CC"
40370    BUILD_CXX="$CXX"
40371    BUILD_LD="$LD"
40372  fi
40373
40374
40375
40376
40377
40378
40379  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40380    # For hotspot, we need these in Windows mixed path,
40381    # so rewrite them all. Need added .exe suffix.
40382    HOTSPOT_CXX="$CXX.exe"
40383    HOTSPOT_LD="$LD.exe"
40384    HOTSPOT_MT="$MT.exe"
40385    HOTSPOT_RC="$RC.exe"
40386
40387  unix_path="$HOTSPOT_CXX"
40388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40389    windows_path=`$CYGPATH -m "$unix_path"`
40390    HOTSPOT_CXX="$windows_path"
40391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40392    windows_path=`cmd //c echo $unix_path`
40393    HOTSPOT_CXX="$windows_path"
40394  fi
40395
40396
40397  unix_path="$HOTSPOT_LD"
40398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40399    windows_path=`$CYGPATH -m "$unix_path"`
40400    HOTSPOT_LD="$windows_path"
40401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40402    windows_path=`cmd //c echo $unix_path`
40403    HOTSPOT_LD="$windows_path"
40404  fi
40405
40406
40407  unix_path="$HOTSPOT_MT"
40408  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40409    windows_path=`$CYGPATH -m "$unix_path"`
40410    HOTSPOT_MT="$windows_path"
40411  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40412    windows_path=`cmd //c echo $unix_path`
40413    HOTSPOT_MT="$windows_path"
40414  fi
40415
40416
40417  unix_path="$HOTSPOT_RC"
40418  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40419    windows_path=`$CYGPATH -m "$unix_path"`
40420    HOTSPOT_RC="$windows_path"
40421  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40422    windows_path=`cmd //c echo $unix_path`
40423    HOTSPOT_RC="$windows_path"
40424  fi
40425
40426
40427
40428  else
40429    HOTSPOT_CXX="$CXX"
40430    HOTSPOT_LD="$LD"
40431  fi
40432
40433
40434
40435  if test  "x$TOOLCHAIN_TYPE" = xclang; then
40436    USE_CLANG=true
40437  fi
40438
40439
40440  # LDEXE is the linker to use, when creating executables. Not really used.
40441  # FIXME: These should just be removed!
40442  LDEXE="$LD"
40443  LDEXECXX="$LDCXX"
40444
40445
40446
40447
40448
40449
40450  # The package path is used only on macosx?
40451  # FIXME: clean this up, and/or move it elsewhere.
40452  PACKAGE_PATH=/opt/local
40453
40454
40455  # Check for extra potential brokenness.
40456  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
40457    # On Windows, double-check that we got the right compiler.
40458    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
40459    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
40460    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
40461      if test "x$COMPILER_CPU_TEST" != "x80x86"; then
40462        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"80x86\"." "$LINENO" 5
40463      fi
40464    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
40465      if test "x$COMPILER_CPU_TEST" != "xx64"; then
40466        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
40467      fi
40468    fi
40469  fi
40470
40471  if test "x$TOOLCHAIN_TYPE" = xgcc; then
40472    # If this is a --hash-style=gnu system, use --hash-style=both, why?
40473    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
40474    # This is later checked when setting flags.
40475
40476    # "-Og" suppported for GCC 4.8 and later
40477    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
40478
40479  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
40480$as_echo_n "checking if compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
40481  supports=yes
40482
40483  saved_cflags="$CFLAGS"
40484  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
40485  ac_ext=c
40486ac_cpp='$CPP $CPPFLAGS'
40487ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40488ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40489ac_compiler_gnu=$ac_cv_c_compiler_gnu
40490
40491  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40492/* end confdefs.h.  */
40493int i;
40494_ACEOF
40495if ac_fn_c_try_compile "$LINENO"; then :
40496
40497else
40498  supports=no
40499fi
40500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40501  ac_ext=cpp
40502ac_cpp='$CXXCPP $CPPFLAGS'
40503ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40504ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40505ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40506
40507  CFLAGS="$saved_cflags"
40508
40509  saved_cxxflags="$CXXFLAGS"
40510  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
40511  ac_ext=cpp
40512ac_cpp='$CXXCPP $CPPFLAGS'
40513ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40514ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40515ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40516
40517  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40518/* end confdefs.h.  */
40519int i;
40520_ACEOF
40521if ac_fn_cxx_try_compile "$LINENO"; then :
40522
40523else
40524  supports=no
40525fi
40526rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40527  ac_ext=cpp
40528ac_cpp='$CXXCPP $CPPFLAGS'
40529ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40530ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40531ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40532
40533  CXXFLAGS="$saved_cxxflags"
40534
40535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40536$as_echo "$supports" >&6; }
40537  if test "x$supports" = "xyes" ; then
40538    HAS_CFLAG_OPTIMIZE_DEBUG=true
40539  else
40540    HAS_CFLAG_OPTIMIZE_DEBUG=false
40541  fi
40542
40543
40544    # "-fsanitize=undefined" supported for GCC 4.9 and later
40545    CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG="-fsanitize=undefined -fsanitize-recover"
40546
40547  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"" >&5
40548$as_echo_n "checking if compiler supports \"$CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG\"... " >&6; }
40549  supports=yes
40550
40551  saved_cflags="$CFLAGS"
40552  CFLAGS="$CFLAGS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40553  ac_ext=c
40554ac_cpp='$CPP $CPPFLAGS'
40555ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40556ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40557ac_compiler_gnu=$ac_cv_c_compiler_gnu
40558
40559  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40560/* end confdefs.h.  */
40561int i;
40562_ACEOF
40563if ac_fn_c_try_compile "$LINENO"; then :
40564
40565else
40566  supports=no
40567fi
40568rm -f core conftest.err conftest.$ac_objext 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  CFLAGS="$saved_cflags"
40576
40577  saved_cxxflags="$CXXFLAGS"
40578  CXXFLAGS="$CXXFLAG $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
40579  ac_ext=cpp
40580ac_cpp='$CXXCPP $CPPFLAGS'
40581ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40582ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40583ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40584
40585  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40586/* end confdefs.h.  */
40587int i;
40588_ACEOF
40589if ac_fn_cxx_try_compile "$LINENO"; then :
40590
40591else
40592  supports=no
40593fi
40594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
40595  ac_ext=cpp
40596ac_cpp='$CXXCPP $CPPFLAGS'
40597ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40598ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40599ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40600
40601  CXXFLAGS="$saved_cxxflags"
40602
40603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40604$as_echo "$supports" >&6; }
40605  if test "x$supports" = "xyes" ; then
40606    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=true
40607  else
40608    HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR=false
40609  fi
40610
40611
40612    # "-z relro" supported in GNU binutils 2.17 and later
40613    LINKER_RELRO_FLAG="-Xlinker -z -Xlinker relro"
40614
40615  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
40616$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
40617  supports=yes
40618
40619  saved_ldflags="$LDFLAGS"
40620  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
40621  ac_ext=c
40622ac_cpp='$CPP $CPPFLAGS'
40623ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40624ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40625ac_compiler_gnu=$ac_cv_c_compiler_gnu
40626
40627  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40628/* end confdefs.h.  */
40629
40630int
40631main ()
40632{
40633
40634  ;
40635  return 0;
40636}
40637_ACEOF
40638if ac_fn_c_try_link "$LINENO"; then :
40639
40640else
40641  supports=no
40642fi
40643rm -f core conftest.err conftest.$ac_objext \
40644    conftest$ac_exeext conftest.$ac_ext
40645  ac_ext=cpp
40646ac_cpp='$CXXCPP $CPPFLAGS'
40647ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40648ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40649ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40650
40651  LDFLAGS="$saved_ldflags"
40652
40653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40654$as_echo "$supports" >&6; }
40655  if test "x$supports" = "xyes" ; then
40656    HAS_LINKER_RELRO=true
40657  else
40658    HAS_LINKER_RELRO=false
40659  fi
40660
40661
40662    # "-z now" supported in GNU binutils 2.11 and later
40663    LINKER_NOW_FLAG="-Xlinker -z -Xlinker now"
40664
40665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
40666$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
40667  supports=yes
40668
40669  saved_ldflags="$LDFLAGS"
40670  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
40671  ac_ext=c
40672ac_cpp='$CPP $CPPFLAGS'
40673ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40674ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40675ac_compiler_gnu=$ac_cv_c_compiler_gnu
40676
40677  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
40678/* end confdefs.h.  */
40679
40680int
40681main ()
40682{
40683
40684  ;
40685  return 0;
40686}
40687_ACEOF
40688if ac_fn_c_try_link "$LINENO"; then :
40689
40690else
40691  supports=no
40692fi
40693rm -f core conftest.err conftest.$ac_objext \
40694    conftest$ac_exeext conftest.$ac_ext
40695  ac_ext=cpp
40696ac_cpp='$CXXCPP $CPPFLAGS'
40697ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
40698ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
40699ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
40700
40701  LDFLAGS="$saved_ldflags"
40702
40703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
40704$as_echo "$supports" >&6; }
40705  if test "x$supports" = "xyes" ; then
40706    HAS_LINKER_NOW=true
40707  else
40708    HAS_LINKER_NOW=false
40709  fi
40710
40711  fi
40712
40713  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
40714  # in executable.'
40715  USING_BROKEN_SUSE_LD=no
40716  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
40717    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
40718$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
40719    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
40720    $ECHO "int main() { }" > main.c
40721    if $CXX -Xlinker -version-script=version-script.map main.c 2>&5 >&5; then
40722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40723$as_echo "no" >&6; }
40724      USING_BROKEN_SUSE_LD=no
40725    else
40726      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
40727$as_echo "yes" >&6; }
40728      USING_BROKEN_SUSE_LD=yes
40729    fi
40730    rm -rf version-script.map main.c a.out
40731  fi
40732
40733
40734
40735# Setup the JTReg Regression Test Harness.
40736
40737
40738# Check whether --with-jtreg was given.
40739if test "${with_jtreg+set}" = set; then :
40740  withval=$with_jtreg;
40741else
40742  with_jtreg=no
40743fi
40744
40745
40746  if test "x$with_jtreg" = xno; then
40747    # jtreg disabled
40748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40749$as_echo_n "checking for jtreg... " >&6; }
40750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40751$as_echo "no" >&6; }
40752  else
40753    if test "x$with_jtreg" != xyes; then
40754      # with path specified.
40755      JT_HOME="$with_jtreg"
40756    fi
40757
40758    if test "x$JT_HOME" != x; then
40759      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
40760$as_echo_n "checking for jtreg... " >&6; }
40761
40762      # use JT_HOME enviroment var.
40763
40764  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40765
40766  # Input might be given as Windows format, start by converting to
40767  # unix format.
40768  path="$JT_HOME"
40769  new_path=`$CYGPATH -u "$path"`
40770
40771  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40772  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40773  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40774  # "foo.exe" is OK but "foo" is an error.
40775  #
40776  # This test is therefore slightly more accurate than "test -f" to check for file precense.
40777  # It is also a way to make sure we got the proper file name for the real test later on.
40778  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40779  if test "x$test_shortpath" = x; then
40780    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40781$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40782    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
40783  fi
40784
40785  # Call helper function which possibly converts this using DOS-style short mode.
40786  # If so, the updated path is stored in $new_path.
40787
40788  input_path="$new_path"
40789  # Check if we need to convert this using DOS-style short mode. If the path
40790  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40791  # take no chances and rewrite it.
40792  # Note: m4 eats our [], so we need to use [ and ] instead.
40793  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40794  if test "x$has_forbidden_chars" != x; then
40795    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40796    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40797    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40798    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40799      # Going to short mode and back again did indeed matter. Since short mode is
40800      # case insensitive, let's make it lowercase to improve readability.
40801      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40802      # Now convert it back to Unix-stile (cygpath)
40803      input_path=`$CYGPATH -u "$shortmode_path"`
40804      new_path="$input_path"
40805    fi
40806  fi
40807
40808  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40809  if test "x$test_cygdrive_prefix" = x; then
40810    # As a simple fix, exclude /usr/bin since it's not a real path.
40811    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
40812      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40813      # a path prefixed by /cygdrive for fixpath to work.
40814      new_path="$CYGWIN_ROOT_PATH$input_path"
40815    fi
40816  fi
40817
40818
40819  if test "x$path" != "x$new_path"; then
40820    JT_HOME="$new_path"
40821    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40822$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40823  fi
40824
40825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40826
40827  path="$JT_HOME"
40828  has_colon=`$ECHO $path | $GREP ^.:`
40829  new_path="$path"
40830  if test "x$has_colon" = x; then
40831    # Not in mixed or Windows style, start by that.
40832    new_path=`cmd //c echo $path`
40833  fi
40834
40835
40836  input_path="$new_path"
40837  # Check if we need to convert this using DOS-style short mode. If the path
40838  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40839  # take no chances and rewrite it.
40840  # Note: m4 eats our [], so we need to use [ and ] instead.
40841  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40842  if test "x$has_forbidden_chars" != x; then
40843    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40844    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40845  fi
40846
40847
40848  windows_path="$new_path"
40849  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40850    unix_path=`$CYGPATH -u "$windows_path"`
40851    new_path="$unix_path"
40852  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40853    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40854    new_path="$unix_path"
40855  fi
40856
40857  if test "x$path" != "x$new_path"; then
40858    JT_HOME="$new_path"
40859    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
40860$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
40861  fi
40862
40863  # Save the first 10 bytes of this path to the storage, so fixpath can work.
40864  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40865
40866  else
40867    # We're on a posix platform. Hooray! :)
40868    path="$JT_HOME"
40869    has_space=`$ECHO "$path" | $GREP " "`
40870    if test "x$has_space" != x; then
40871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
40872$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
40873      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
40874    fi
40875
40876    # Use eval to expand a potential ~
40877    eval path="$path"
40878    if test ! -f "$path" && test ! -d "$path"; then
40879      as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
40880    fi
40881
40882    JT_HOME="`cd "$path"; $THEPWDCMD -L`"
40883  fi
40884
40885
40886      # jtreg win32 script works for everybody
40887      JTREGEXE="$JT_HOME/win32/bin/jtreg"
40888
40889      if test ! -f "$JTREGEXE"; then
40890        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
40891      fi
40892
40893      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40894$as_echo "$JTREGEXE" >&6; }
40895    else
40896      # try to find jtreg on path
40897
40898
40899
40900  # Publish this variable in the help.
40901
40902
40903  if test "x$JTREGEXE" = x; then
40904    # The variable is not set by user, try to locate tool using the code snippet
40905    for ac_prog in jtreg
40906do
40907  # Extract the first word of "$ac_prog", so it can be a program name with args.
40908set dummy $ac_prog; ac_word=$2
40909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40910$as_echo_n "checking for $ac_word... " >&6; }
40911if ${ac_cv_path_JTREGEXE+:} false; then :
40912  $as_echo_n "(cached) " >&6
40913else
40914  case $JTREGEXE in
40915  [\\/]* | ?:[\\/]*)
40916  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40917  ;;
40918  *)
40919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40920for as_dir in $PATH
40921do
40922  IFS=$as_save_IFS
40923  test -z "$as_dir" && as_dir=.
40924    for ac_exec_ext in '' $ac_executable_extensions; do
40925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40926    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40928    break 2
40929  fi
40930done
40931  done
40932IFS=$as_save_IFS
40933
40934  ;;
40935esac
40936fi
40937JTREGEXE=$ac_cv_path_JTREGEXE
40938if test -n "$JTREGEXE"; then
40939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40940$as_echo "$JTREGEXE" >&6; }
40941else
40942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40943$as_echo "no" >&6; }
40944fi
40945
40946
40947  test -n "$JTREGEXE" && break
40948done
40949
40950  else
40951    # The variable is set, but is it from the command line or the environment?
40952
40953    # Try to remove the string !JTREGEXE! from our list.
40954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
40955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40956      # If it failed, the variable was not from the command line. Ignore it,
40957      # but warn the user (except for BASH, which is always set by the calling BASH).
40958      if test "xJTREGEXE" != xBASH; then
40959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
40960$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
40961      fi
40962      # Try to locate tool using the code snippet
40963      for ac_prog in jtreg
40964do
40965  # Extract the first word of "$ac_prog", so it can be a program name with args.
40966set dummy $ac_prog; ac_word=$2
40967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40968$as_echo_n "checking for $ac_word... " >&6; }
40969if ${ac_cv_path_JTREGEXE+:} false; then :
40970  $as_echo_n "(cached) " >&6
40971else
40972  case $JTREGEXE in
40973  [\\/]* | ?:[\\/]*)
40974  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
40975  ;;
40976  *)
40977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40978for as_dir in $PATH
40979do
40980  IFS=$as_save_IFS
40981  test -z "$as_dir" && as_dir=.
40982    for ac_exec_ext in '' $ac_executable_extensions; do
40983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40984    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
40985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40986    break 2
40987  fi
40988done
40989  done
40990IFS=$as_save_IFS
40991
40992  ;;
40993esac
40994fi
40995JTREGEXE=$ac_cv_path_JTREGEXE
40996if test -n "$JTREGEXE"; then
40997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
40998$as_echo "$JTREGEXE" >&6; }
40999else
41000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41001$as_echo "no" >&6; }
41002fi
41003
41004
41005  test -n "$JTREGEXE" && break
41006done
41007
41008    else
41009      # If it succeeded, then it was overridden by the user. We will use it
41010      # for the tool.
41011
41012      # First remove it from the list of overridden variables, so we can test
41013      # for unknown variables in the end.
41014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41015
41016      # Check if the provided tool contains a complete path.
41017      tool_specified="$JTREGEXE"
41018      tool_basename="${tool_specified##*/}"
41019      if test "x$tool_basename" = "x$tool_specified"; then
41020        # A command without a complete path is provided, search $PATH.
41021        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
41022$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
41023        # Extract the first word of "$tool_basename", so it can be a program name with args.
41024set dummy $tool_basename; ac_word=$2
41025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41026$as_echo_n "checking for $ac_word... " >&6; }
41027if ${ac_cv_path_JTREGEXE+:} false; then :
41028  $as_echo_n "(cached) " >&6
41029else
41030  case $JTREGEXE in
41031  [\\/]* | ?:[\\/]*)
41032  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
41033  ;;
41034  *)
41035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41036for as_dir in $PATH
41037do
41038  IFS=$as_save_IFS
41039  test -z "$as_dir" && as_dir=.
41040    for ac_exec_ext in '' $ac_executable_extensions; do
41041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41042    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
41043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41044    break 2
41045  fi
41046done
41047  done
41048IFS=$as_save_IFS
41049
41050  ;;
41051esac
41052fi
41053JTREGEXE=$ac_cv_path_JTREGEXE
41054if test -n "$JTREGEXE"; then
41055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
41056$as_echo "$JTREGEXE" >&6; }
41057else
41058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41059$as_echo "no" >&6; }
41060fi
41061
41062
41063        if test "x$JTREGEXE" = x; then
41064          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41065        fi
41066      else
41067        # Otherwise we believe it is a complete path. Use it as it is.
41068        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
41069$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
41070        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
41071$as_echo_n "checking for JTREGEXE... " >&6; }
41072        if test ! -x "$tool_specified"; then
41073          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41074$as_echo "not found" >&6; }
41075          as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
41076        fi
41077        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41078$as_echo "$tool_specified" >&6; }
41079      fi
41080    fi
41081  fi
41082
41083
41084
41085  if test "x$JTREGEXE" = x; then
41086    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
41087  fi
41088
41089
41090      JT_HOME="`$DIRNAME $JTREGEXE`"
41091    fi
41092  fi
41093
41094
41095
41096
41097
41098
41099  # Option used to tell the compiler whether to create 32- or 64-bit executables
41100  if test "x$TOOLCHAIN_TYPE" = xxlc; then
41101    COMPILER_TARGET_BITS_FLAG="-q"
41102  else
41103    COMPILER_TARGET_BITS_FLAG="-m"
41104  fi
41105
41106
41107  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
41108  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41109    ARFLAGS="-r"
41110  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41111    ARFLAGS="-X64"
41112  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
41113    # lib.exe is used as AR to create static libraries.
41114    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
41115  else
41116    ARFLAGS=""
41117  fi
41118
41119
41120  ## Setup strip.
41121  # FIXME: should this really be per platform, or should it be per toolchain type?
41122  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
41123  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
41124  if test "x$OPENJDK_TARGET_OS" = xlinux; then
41125    STRIPFLAGS="-g"
41126  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
41127    STRIPFLAGS="-x"
41128  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41129    STRIPFLAGS="-S"
41130  elif test "x$OPENJDK_TARGET_OS" = xaix; then
41131    STRIPFLAGS="-X32_64"
41132  fi
41133
41134  if test "x$OPENJDK_TARGET_OS" != xwindows; then
41135    POST_STRIP_CMD="$STRIP $STRIPFLAGS"
41136  fi
41137
41138
41139  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41140    # FIXME: break out into MCSFLAGS
41141    POST_MCS_CMD="$MCS -d -a \"JDK $FULL_VERSION\""
41142  fi
41143
41144
41145  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41146    CC_OUT_OPTION=-Fo
41147    EXE_OUT_OPTION=-out:
41148    LD_OUT_OPTION=-out:
41149    AR_OUT_OPTION=-out:
41150  else
41151    # The option used to specify the target .o,.a or .so file.
41152    # When compiling, how to specify the to be created object file.
41153    CC_OUT_OPTION='-o$(SPACE)'
41154    # When linking, how to specify the to be created executable.
41155    EXE_OUT_OPTION='-o$(SPACE)'
41156    # When linking, how to specify the to be created dynamically linkable library.
41157    LD_OUT_OPTION='-o$(SPACE)'
41158    # When archiving, how to specify the to be create static archive for object files.
41159    AR_OUT_OPTION='rcs$(SPACE)'
41160  fi
41161
41162
41163
41164
41165
41166  # On Windows, we need to set RC flags.
41167  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41168    RC_FLAGS="-nologo -l 0x409 -r"
41169    if test "x$VARIANT" = xOPT; then
41170      RC_FLAGS="$RC_FLAGS -d NDEBUG"
41171    fi
41172
41173    # The version variables used to create RC_FLAGS may be overridden
41174    # in a custom configure script, or possibly the command line.
41175    # Let those variables be expanded at make time in spec.gmk.
41176    # The \$ are escaped to the shell, and the $(...) variables
41177    # are evaluated by make.
41178    RC_FLAGS="$RC_FLAGS \
41179        -d \"JDK_BUILD_ID=\$(FULL_VERSION)\" \
41180        -d \"JDK_COMPANY=\$(COMPANY_NAME)\" \
41181        -d \"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
41182        -d \"JDK_VER=\$(JDK_MINOR_VERSION).\$(JDK_MICRO_VERSION).\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0).\$(COOKED_BUILD_NUMBER)\" \
41183        -d \"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
41184        -d \"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(JDK_MINOR_VERSION) \$(JDK_UPDATE_META_TAG)\" \
41185        -d \"JDK_FVER=\$(JDK_MINOR_VERSION),\$(JDK_MICRO_VERSION),\$(if \$(JDK_UPDATE_VERSION),\$(JDK_UPDATE_VERSION),0),\$(COOKED_BUILD_NUMBER)\""
41186  fi
41187
41188
41189  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41190    # silence copyright notice and other headers.
41191    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
41192  fi
41193
41194  if test "x$SYSROOT" != "x"; then
41195    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41196      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41197        # Solaris Studio does not have a concept of sysroot. Instead we must
41198        # make sure the default include and lib dirs are appended to each
41199        # compile and link command line.
41200        SYSROOT_CFLAGS="-I$SYSROOT/usr/include"
41201        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
41202            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
41203            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
41204      fi
41205    elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
41206      # Apple only wants -isysroot <path>, but we also need -iframework<path>/System/Library/Frameworks
41207      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\" -iframework\"$SYSROOT/System/Library/Frameworks\""
41208      SYSROOT_LDFLAGS=$SYSROOT_CFLAGS
41209    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
41210      SYSROOT_CFLAGS="--sysroot=\"$SYSROOT\""
41211      SYSROOT_LDFLAGS="--sysroot=\"$SYSROOT\""
41212    elif test "x$TOOLCHAIN_TYPE" = xclang; then
41213      SYSROOT_CFLAGS="-isysroot \"$SYSROOT\""
41214      SYSROOT_LDFLAGS="-isysroot \"$SYSROOT\""
41215    fi
41216    # Propagate the sysroot args to hotspot
41217    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
41218    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
41219    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
41220  fi
41221
41222  # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
41223  # set this here so it doesn't have to be peppered throughout the forest
41224  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41225    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41226    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F\"$SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks\""
41227  fi
41228
41229
41230
41231
41232
41233# FIXME: Currently we must test this after toolchain but before flags. Fix!
41234
41235# Now we can test some aspects on the target using configure macros.
41236
41237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
41238$as_echo_n "checking for ANSI C header files... " >&6; }
41239if ${ac_cv_header_stdc+:} false; then :
41240  $as_echo_n "(cached) " >&6
41241else
41242  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41243/* end confdefs.h.  */
41244#include <stdlib.h>
41245#include <stdarg.h>
41246#include <string.h>
41247#include <float.h>
41248
41249int
41250main ()
41251{
41252
41253  ;
41254  return 0;
41255}
41256_ACEOF
41257if ac_fn_cxx_try_compile "$LINENO"; then :
41258  ac_cv_header_stdc=yes
41259else
41260  ac_cv_header_stdc=no
41261fi
41262rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41263
41264if test $ac_cv_header_stdc = yes; then
41265  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
41266  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41267/* end confdefs.h.  */
41268#include <string.h>
41269
41270_ACEOF
41271if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41272  $EGREP "memchr" >/dev/null 2>&1; then :
41273
41274else
41275  ac_cv_header_stdc=no
41276fi
41277rm -f conftest*
41278
41279fi
41280
41281if test $ac_cv_header_stdc = yes; then
41282  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
41283  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41284/* end confdefs.h.  */
41285#include <stdlib.h>
41286
41287_ACEOF
41288if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
41289  $EGREP "free" >/dev/null 2>&1; then :
41290
41291else
41292  ac_cv_header_stdc=no
41293fi
41294rm -f conftest*
41295
41296fi
41297
41298if test $ac_cv_header_stdc = yes; then
41299  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
41300  if test "$cross_compiling" = yes; then :
41301  :
41302else
41303  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41304/* end confdefs.h.  */
41305#include <ctype.h>
41306#include <stdlib.h>
41307#if ((' ' & 0x0FF) == 0x020)
41308# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
41309# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
41310#else
41311# define ISLOWER(c) \
41312		   (('a' <= (c) && (c) <= 'i') \
41313		     || ('j' <= (c) && (c) <= 'r') \
41314		     || ('s' <= (c) && (c) <= 'z'))
41315# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
41316#endif
41317
41318#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
41319int
41320main ()
41321{
41322  int i;
41323  for (i = 0; i < 256; i++)
41324    if (XOR (islower (i), ISLOWER (i))
41325	|| toupper (i) != TOUPPER (i))
41326      return 2;
41327  return 0;
41328}
41329_ACEOF
41330if ac_fn_cxx_try_run "$LINENO"; then :
41331
41332else
41333  ac_cv_header_stdc=no
41334fi
41335rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41336  conftest.$ac_objext conftest.beam conftest.$ac_ext
41337fi
41338
41339fi
41340fi
41341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
41342$as_echo "$ac_cv_header_stdc" >&6; }
41343if test $ac_cv_header_stdc = yes; then
41344
41345$as_echo "#define STDC_HEADERS 1" >>confdefs.h
41346
41347fi
41348
41349# On IRIX 5.3, sys/types and inttypes.h are conflicting.
41350for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
41351		  inttypes.h stdint.h unistd.h
41352do :
41353  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
41354ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
41355"
41356if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
41357  cat >>confdefs.h <<_ACEOF
41358#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
41359_ACEOF
41360
41361fi
41362
41363done
41364
41365
41366
41367  ###############################################################################
41368  #
41369  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
41370  # (The JVM can use 32 or 64 bit Java pointers but that decision
41371  # is made at runtime.)
41372  #
41373
41374  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
41375    # Always specify -m flag on Solaris
41376    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
41377
41378  # When we add flags to the "official" CFLAGS etc, we need to
41379  # keep track of these additions in ADDED_CFLAGS etc. These
41380  # will later be checked to make sure only controlled additions
41381  # have been made to CFLAGS etc.
41382  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41383  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41384  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41385
41386  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41387  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41388  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41389
41390  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41391  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41392  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41393
41394  elif test "x$COMPILE_TYPE" = xreduced; then
41395    if test "x$OPENJDK_TARGET_OS" != xwindows; then
41396      # Specify -m if running reduced on other Posix platforms
41397
41398  # When we add flags to the "official" CFLAGS etc, we need to
41399  # keep track of these additions in ADDED_CFLAGS etc. These
41400  # will later be checked to make sure only controlled additions
41401  # have been made to CFLAGS etc.
41402  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41403  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41404  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41405
41406  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41407  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41408  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41409
41410  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41411  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41412  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41413
41414    fi
41415  fi
41416
41417  # Make compilation sanity check
41418  for ac_header in stdio.h
41419do :
41420  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
41421if test "x$ac_cv_header_stdio_h" = xyes; then :
41422  cat >>confdefs.h <<_ACEOF
41423#define HAVE_STDIO_H 1
41424_ACEOF
41425
41426else
41427
41428    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
41429$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
41430    if test "x$COMPILE_TYPE" = xreduced; then
41431      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed." >&5
41432$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed." >&6;}
41433    elif test "x$COMPILE_TYPE" = xcross; then
41434      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
41435$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
41436    fi
41437    as_fn_error $? "Cannot continue." "$LINENO" 5
41438
41439fi
41440
41441done
41442
41443
41444  # The cast to long int works around a bug in the HP C Compiler
41445# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41446# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41447# This bug is HP SR number 8606223364.
41448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41449$as_echo_n "checking size of int *... " >&6; }
41450if ${ac_cv_sizeof_int_p+:} false; then :
41451  $as_echo_n "(cached) " >&6
41452else
41453  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41454
41455else
41456  if test "$ac_cv_type_int_p" = yes; then
41457     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41458$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41459as_fn_error 77 "cannot compute sizeof (int *)
41460See \`config.log' for more details" "$LINENO" 5; }
41461   else
41462     ac_cv_sizeof_int_p=0
41463   fi
41464fi
41465
41466fi
41467{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41468$as_echo "$ac_cv_sizeof_int_p" >&6; }
41469
41470
41471
41472cat >>confdefs.h <<_ACEOF
41473#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41474_ACEOF
41475
41476
41477
41478  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
41479  if test "x$ac_cv_sizeof_int_p" = x; then
41480    # The test failed, lets stick to the assumed value.
41481    { $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
41482$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
41483  else
41484    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41485
41486    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41487      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
41488      # Let's try to implicitely set the compilers target architecture and retry the test
41489      { $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
41490$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;}
41491      { $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
41492$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;}
41493
41494  # When we add flags to the "official" CFLAGS etc, we need to
41495  # keep track of these additions in ADDED_CFLAGS etc. These
41496  # will later be checked to make sure only controlled additions
41497  # have been made to CFLAGS etc.
41498  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41499  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41500  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
41501
41502  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
41503  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
41504  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
41505
41506  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
41507  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
41508  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
41509
41510
41511      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
41512      unset ac_cv_sizeof_int_p
41513      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
41514      cat >>confdefs.h <<_ACEOF
41515#undef SIZEOF_INT_P
41516_ACEOF
41517
41518      # The cast to long int works around a bug in the HP C Compiler
41519# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
41520# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
41521# This bug is HP SR number 8606223364.
41522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
41523$as_echo_n "checking size of int *... " >&6; }
41524if ${ac_cv_sizeof_int_p+:} false; then :
41525  $as_echo_n "(cached) " >&6
41526else
41527  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
41528
41529else
41530  if test "$ac_cv_type_int_p" = yes; then
41531     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
41532$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
41533as_fn_error 77 "cannot compute sizeof (int *)
41534See \`config.log' for more details" "$LINENO" 5; }
41535   else
41536     ac_cv_sizeof_int_p=0
41537   fi
41538fi
41539
41540fi
41541{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
41542$as_echo "$ac_cv_sizeof_int_p" >&6; }
41543
41544
41545
41546cat >>confdefs.h <<_ACEOF
41547#define SIZEOF_INT_P $ac_cv_sizeof_int_p
41548_ACEOF
41549
41550
41551
41552      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
41553
41554      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
41555        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
41556      fi
41557    fi
41558  fi
41559
41560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
41561$as_echo_n "checking for target address size... " >&6; }
41562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
41563$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
41564
41565
41566  ###############################################################################
41567  #
41568  # Is the target little of big endian?
41569  #
41570   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
41571$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
41572if ${ac_cv_c_bigendian+:} false; then :
41573  $as_echo_n "(cached) " >&6
41574else
41575  ac_cv_c_bigendian=unknown
41576    # See if we're dealing with a universal compiler.
41577    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41578/* end confdefs.h.  */
41579#ifndef __APPLE_CC__
41580	       not a universal capable compiler
41581	     #endif
41582	     typedef int dummy;
41583
41584_ACEOF
41585if ac_fn_cxx_try_compile "$LINENO"; then :
41586
41587	# Check for potential -arch flags.  It is not universal unless
41588	# there are at least two -arch flags with different values.
41589	ac_arch=
41590	ac_prev=
41591	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
41592	 if test -n "$ac_prev"; then
41593	   case $ac_word in
41594	     i?86 | x86_64 | ppc | ppc64)
41595	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
41596		 ac_arch=$ac_word
41597	       else
41598		 ac_cv_c_bigendian=universal
41599		 break
41600	       fi
41601	       ;;
41602	   esac
41603	   ac_prev=
41604	 elif test "x$ac_word" = "x-arch"; then
41605	   ac_prev=arch
41606	 fi
41607       done
41608fi
41609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41610    if test $ac_cv_c_bigendian = unknown; then
41611      # See if sys/param.h defines the BYTE_ORDER macro.
41612      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41613/* end confdefs.h.  */
41614#include <sys/types.h>
41615	     #include <sys/param.h>
41616
41617int
41618main ()
41619{
41620#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
41621		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
41622		     && LITTLE_ENDIAN)
41623	      bogus endian macros
41624	     #endif
41625
41626  ;
41627  return 0;
41628}
41629_ACEOF
41630if ac_fn_cxx_try_compile "$LINENO"; then :
41631  # It does; now see whether it defined to BIG_ENDIAN or not.
41632	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41633/* end confdefs.h.  */
41634#include <sys/types.h>
41635		#include <sys/param.h>
41636
41637int
41638main ()
41639{
41640#if BYTE_ORDER != BIG_ENDIAN
41641		 not big endian
41642		#endif
41643
41644  ;
41645  return 0;
41646}
41647_ACEOF
41648if ac_fn_cxx_try_compile "$LINENO"; then :
41649  ac_cv_c_bigendian=yes
41650else
41651  ac_cv_c_bigendian=no
41652fi
41653rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41654fi
41655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41656    fi
41657    if test $ac_cv_c_bigendian = unknown; then
41658      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
41659      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41660/* end confdefs.h.  */
41661#include <limits.h>
41662
41663int
41664main ()
41665{
41666#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
41667	      bogus endian macros
41668	     #endif
41669
41670  ;
41671  return 0;
41672}
41673_ACEOF
41674if ac_fn_cxx_try_compile "$LINENO"; then :
41675  # It does; now see whether it defined to _BIG_ENDIAN or not.
41676	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41677/* end confdefs.h.  */
41678#include <limits.h>
41679
41680int
41681main ()
41682{
41683#ifndef _BIG_ENDIAN
41684		 not big endian
41685		#endif
41686
41687  ;
41688  return 0;
41689}
41690_ACEOF
41691if ac_fn_cxx_try_compile "$LINENO"; then :
41692  ac_cv_c_bigendian=yes
41693else
41694  ac_cv_c_bigendian=no
41695fi
41696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41697fi
41698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41699    fi
41700    if test $ac_cv_c_bigendian = unknown; then
41701      # Compile a test program.
41702      if test "$cross_compiling" = yes; then :
41703  # Try to guess by grepping values from an object file.
41704	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41705/* end confdefs.h.  */
41706short int ascii_mm[] =
41707		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
41708		short int ascii_ii[] =
41709		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
41710		int use_ascii (int i) {
41711		  return ascii_mm[i] + ascii_ii[i];
41712		}
41713		short int ebcdic_ii[] =
41714		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
41715		short int ebcdic_mm[] =
41716		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
41717		int use_ebcdic (int i) {
41718		  return ebcdic_mm[i] + ebcdic_ii[i];
41719		}
41720		extern int foo;
41721
41722int
41723main ()
41724{
41725return use_ascii (foo) == use_ebcdic (foo);
41726  ;
41727  return 0;
41728}
41729_ACEOF
41730if ac_fn_cxx_try_compile "$LINENO"; then :
41731  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
41732	      ac_cv_c_bigendian=yes
41733	    fi
41734	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
41735	      if test "$ac_cv_c_bigendian" = unknown; then
41736		ac_cv_c_bigendian=no
41737	      else
41738		# finding both strings is unlikely to happen, but who knows?
41739		ac_cv_c_bigendian=unknown
41740	      fi
41741	    fi
41742fi
41743rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
41744else
41745  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
41746/* end confdefs.h.  */
41747$ac_includes_default
41748int
41749main ()
41750{
41751
41752	     /* Are we little or big endian?  From Harbison&Steele.  */
41753	     union
41754	     {
41755	       long int l;
41756	       char c[sizeof (long int)];
41757	     } u;
41758	     u.l = 1;
41759	     return u.c[sizeof (long int) - 1] == 1;
41760
41761  ;
41762  return 0;
41763}
41764_ACEOF
41765if ac_fn_cxx_try_run "$LINENO"; then :
41766  ac_cv_c_bigendian=no
41767else
41768  ac_cv_c_bigendian=yes
41769fi
41770rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
41771  conftest.$ac_objext conftest.beam conftest.$ac_ext
41772fi
41773
41774    fi
41775fi
41776{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
41777$as_echo "$ac_cv_c_bigendian" >&6; }
41778 case $ac_cv_c_bigendian in #(
41779   yes)
41780     ENDIAN="big";; #(
41781   no)
41782     ENDIAN="little" ;; #(
41783   universal)
41784     ENDIAN="universal_endianness"
41785     ;; #(
41786   *)
41787     ENDIAN="unknown" ;;
41788 esac
41789
41790
41791  if test "x$ENDIAN" = xuniversal_endianness; then
41792    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
41793  fi
41794  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
41795    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
41796  fi
41797
41798
41799# Configure flags for the tools
41800
41801  ###############################################################################
41802  #
41803  # How to compile shared libraries.
41804  #
41805
41806  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41807    PICFLAG="-fPIC"
41808    C_FLAG_REORDER=''
41809    CXX_FLAG_REORDER=''
41810
41811    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41812      # Linking is different on MacOSX
41813      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41814      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41815      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41816      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41817      SET_SHARED_LIBRARY_MAPFILE=''
41818    else
41819      # Default works for linux, might work on other platforms as well.
41820      SHARED_LIBRARY_FLAGS='-shared'
41821      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41822      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41823      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41824      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41825    fi
41826  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41827    PICFLAG=''
41828    C_FLAG_REORDER=''
41829    CXX_FLAG_REORDER=''
41830
41831    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
41832      # Linking is different on MacOSX
41833      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
41834      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker @loader_path/.'
41835      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41836      SET_SHARED_LIBRARY_NAME='-Xlinker -install_name -Xlinker @rpath/$1'
41837      SET_SHARED_LIBRARY_MAPFILE=''
41838    else
41839      # Default works for linux, might work on other platforms as well.
41840      SHARED_LIBRARY_FLAGS='-shared'
41841      SET_EXECUTABLE_ORIGIN='-Xlinker -rpath -Xlinker \$$$$ORIGIN$1'
41842      SET_SHARED_LIBRARY_ORIGIN="-Xlinker -z -Xlinker origin $SET_EXECUTABLE_ORIGIN"
41843      SET_SHARED_LIBRARY_NAME='-Xlinker -soname=$1'
41844      SET_SHARED_LIBRARY_MAPFILE='-Xlinker -version-script=$1'
41845    fi
41846  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41847    PICFLAG="-KPIC"
41848    C_FLAG_REORDER='-xF'
41849    CXX_FLAG_REORDER='-xF'
41850    SHARED_LIBRARY_FLAGS="-G"
41851    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
41852    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
41853    SET_SHARED_LIBRARY_NAME=''
41854    SET_SHARED_LIBRARY_MAPFILE='-M$1'
41855  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41856    PICFLAG="-qpic=large"
41857    C_FLAG_REORDER=''
41858    CXX_FLAG_REORDER=''
41859    SHARED_LIBRARY_FLAGS="-qmkshrobj"
41860    SET_EXECUTABLE_ORIGIN=""
41861    SET_SHARED_LIBRARY_ORIGIN=''
41862    SET_SHARED_LIBRARY_NAME=''
41863    SET_SHARED_LIBRARY_MAPFILE=''
41864  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41865    PICFLAG=""
41866    C_FLAG_REORDER=''
41867    CXX_FLAG_REORDER=''
41868    SHARED_LIBRARY_FLAGS="-LD"
41869    SET_EXECUTABLE_ORIGIN=''
41870    SET_SHARED_LIBRARY_ORIGIN=''
41871    SET_SHARED_LIBRARY_NAME=''
41872    SET_SHARED_LIBRARY_MAPFILE=''
41873  fi
41874
41875
41876
41877
41878
41879
41880
41881
41882
41883  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
41884    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
41885    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
41886    CFLAGS_JDKLIB_EXTRA='-xstrconst'
41887  fi
41888  # The (cross) compiler is now configured, we can now test capabilities
41889  # of the target platform.
41890
41891
41892
41893  ###############################################################################
41894  #
41895  # Setup the opt flags for different compilers
41896  # and different operating systems.
41897  #
41898
41899  # FIXME: this was indirectly the old default, but just inherited.
41900  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
41901  #   C_FLAG_DEPS="-MMD -MF"
41902  # fi
41903
41904  # Generate make dependency files
41905  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41906    C_FLAG_DEPS="-MMD -MF"
41907  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41908    C_FLAG_DEPS="-MMD -MF"
41909  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41910    C_FLAG_DEPS="-xMMD -xMF"
41911  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41912    C_FLAG_DEPS="-qmakedep=gcc -MF"
41913  fi
41914  CXX_FLAG_DEPS="$C_FLAG_DEPS"
41915
41916
41917
41918  # Debug symbols
41919  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41920    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
41921      # reduce from default "-g2" option to save space
41922      CFLAGS_DEBUG_SYMBOLS="-g1"
41923      CXXFLAGS_DEBUG_SYMBOLS="-g1"
41924    else
41925      CFLAGS_DEBUG_SYMBOLS="-g"
41926      CXXFLAGS_DEBUG_SYMBOLS="-g"
41927    fi
41928  elif test "x$TOOLCHAIN_TYPE" = xclang; then
41929    CFLAGS_DEBUG_SYMBOLS="-g"
41930    CXXFLAGS_DEBUG_SYMBOLS="-g"
41931  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41932    CFLAGS_DEBUG_SYMBOLS="-g -xs"
41933    # FIXME: likely a bug, this disables debug symbols rather than enables them
41934    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
41935  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
41936    CFLAGS_DEBUG_SYMBOLS="-g"
41937    CXXFLAGS_DEBUG_SYMBOLS="-g"
41938  fi
41939
41940
41941
41942  # bounds, memory and behavior checking options
41943  if test "x$TOOLCHAIN_TYPE" = xgcc; then
41944    case $DEBUG_LEVEL in
41945    release )
41946      # no adjustment
41947      ;;
41948    fastdebug )
41949      # Add compile time bounds checks.
41950      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41951      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1"
41952      ;;
41953    slowdebug )
41954      # Add runtime bounds checks and symbol info.
41955      CFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
41956      CXXFLAGS_DEBUG_OPTIONS="-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-all --param ssp-buffer-size=1"
41957      if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
41958        CFLAGS_DEBUG_OPTIONS="$CFLAGS_DEBUG_OPTIONS  $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41959        CXXFLAGS_DEBUG_OPTIONS="$CXXFLAGS_DEBUG_OPTIONS $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG"
41960      fi
41961      ;;
41962    esac
41963  fi
41964
41965
41966
41967  # Optimization levels
41968  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
41969    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
41970
41971    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
41972      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
41973      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
41974      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
41975      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
41976      C_O_FLAG_DEBUG="-xregs=no%frameptr"
41977      C_O_FLAG_NONE="-xregs=no%frameptr"
41978      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
41979      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
41980      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
41981      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
41982      CXX_O_FLAG_NONE="-xregs=no%frameptr"
41983      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
41984        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
41985        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
41986      fi
41987    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
41988      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
41989      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41990      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
41991      C_O_FLAG_DEBUG=""
41992      C_O_FLAG_NONE=""
41993      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
41994      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41995      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
41996      C_O_FLAG_DEBUG=""
41997      CXX_O_FLAG_NONE=""
41998    fi
41999  else
42000    # The remaining toolchains share opt flags between CC and CXX;
42001    # setup for C and duplicate afterwards.
42002    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42003      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42004        # On MacOSX we optimize for size, something
42005        # we should do for all platforms?
42006        C_O_FLAG_HIGHEST="-Os"
42007        C_O_FLAG_HI="-Os"
42008        C_O_FLAG_NORM="-Os"
42009      else
42010        C_O_FLAG_HIGHEST="-O3"
42011        C_O_FLAG_HI="-O3"
42012        C_O_FLAG_NORM="-O2"
42013      fi
42014      if test "x$HAS_CFLAG_OPTIMIZE_DEBUG" = "xtrue"; then
42015        C_O_FLAG_DEBUG="$CFLAG_OPTIMIZE_DEBUG_FLAG"
42016      else
42017        C_O_FLAG_DEBUG="-O0"
42018      fi
42019      C_O_FLAG_NONE="-O0"
42020    elif test "x$TOOLCHAIN_TYPE" = xclang; then
42021      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42022        # On MacOSX we optimize for size, something
42023        # we should do for all platforms?
42024        C_O_FLAG_HIGHEST="-Os"
42025        C_O_FLAG_HI="-Os"
42026        C_O_FLAG_NORM="-Os"
42027      else
42028        C_O_FLAG_HIGHEST="-O3"
42029        C_O_FLAG_HI="-O3"
42030        C_O_FLAG_NORM="-O2"
42031      fi
42032      C_O_FLAG_DEBUG="-O0"
42033      C_O_FLAG_NONE="-O0"
42034    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42035      C_O_FLAG_HIGHEST="-O3"
42036      C_O_FLAG_HI="-O3 -qstrict"
42037      C_O_FLAG_NORM="-O2"
42038      C_O_FLAG_DEBUG="-qnoopt"
42039      C_O_FLAG_NONE="-qnoop"
42040    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42041      C_O_FLAG_HIGHEST="-O2"
42042      C_O_FLAG_HI="-O1"
42043      C_O_FLAG_NORM="-O1"
42044      C_O_FLAG_DEBUG="-Od"
42045      C_O_FLAG_NONE="-Od"
42046    fi
42047    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
42048    CXX_O_FLAG_HI="$C_O_FLAG_HI"
42049    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
42050    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
42051    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
42052  fi
42053
42054  # Adjust optimization flags according to debug level.
42055  case $DEBUG_LEVEL in
42056    release )
42057      # no adjustment
42058      ;;
42059    fastdebug )
42060      # Not quite so much optimization
42061      C_O_FLAG_HI="$C_O_FLAG_NORM"
42062      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
42063      ;;
42064    slowdebug )
42065      # Disable optimization
42066      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
42067      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
42068      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
42069      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
42070      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
42071      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
42072      ;;
42073  esac
42074
42075
42076
42077
42078
42079
42080
42081
42082
42083
42084
42085
42086
42087  # Special extras...
42088  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42089    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
42090      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42091      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
42092    fi
42093  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42094    LDFLAGS_JDK="${LDFLAGS_JDK} -q64 -brtl -bnolibpath -liconv -bexpall"
42095    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42096    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -q64 -qfullpath -qsaveopt"
42097  fi
42098
42099  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
42100    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
42101$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
42102  fi
42103
42104  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
42105    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
42106$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
42107  fi
42108
42109  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
42110    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
42111$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
42112  fi
42113
42114
42115# Check whether --with-extra-cflags was given.
42116if test "${with_extra_cflags+set}" = set; then :
42117  withval=$with_extra_cflags;
42118fi
42119
42120
42121
42122# Check whether --with-extra-cxxflags was given.
42123if test "${with_extra_cxxflags+set}" = set; then :
42124  withval=$with_extra_cxxflags;
42125fi
42126
42127
42128
42129# Check whether --with-extra-ldflags was given.
42130if test "${with_extra_ldflags+set}" = set; then :
42131  withval=$with_extra_ldflags;
42132fi
42133
42134
42135  CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
42136  CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
42137  LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
42138
42139  # Hotspot needs these set in their legacy form
42140  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $with_extra_cflags"
42141  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $with_extra_cxxflags"
42142  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $with_extra_ldflags"
42143
42144
42145
42146
42147
42148  ###############################################################################
42149  #
42150  # Now setup the CFLAGS and LDFLAGS for the JDK build.
42151  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
42152  #
42153
42154  # Setup compiler/platform specific flags into
42155  #    CFLAGS_JDK    - C Compiler flags
42156  #    CXXFLAGS_JDK  - C++ Compiler flags
42157  #    COMMON_CCXXFLAGS_JDK - common to C and C++
42158  if test "x$TOOLCHAIN_TYPE" = xgcc; then
42159    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wno-parentheses -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
42160        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
42161    case $OPENJDK_TARGET_CPU_ARCH in
42162      arm )
42163        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42164        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42165        ;;
42166      ppc )
42167        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
42168        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42169        ;;
42170      * )
42171        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
42172        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
42173        ;;
42174    esac
42175  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42176    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
42177    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
42178      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
42179      CFLAGS_JDK="$CFLAGS_JDK -erroff=E_BAD_PRAGMA_PACK_VALUE"
42180    fi
42181
42182    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
42183    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
42184  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
42185    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42186    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
42187  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42188    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Zi -MD -Zc:wchar_t- -W3 -wd4800 \
42189    -D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB -DWIN32_LEAN_AND_MEAN \
42190    -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
42191    -DWIN32 -DIAL"
42192    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
42193      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
42194    else
42195      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
42196    fi
42197  fi
42198
42199  ###############################################################################
42200
42201  # Adjust flags according to debug level.
42202  case $DEBUG_LEVEL in
42203    fastdebug | slowdebug )
42204      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
42205      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
42206      JAVAC_FLAGS="$JAVAC_FLAGS -g"
42207      ;;
42208    release )
42209      ;;
42210    * )
42211      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42212      ;;
42213  esac
42214
42215  # Setup LP64
42216  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $ADD_LP64"
42217
42218  # Set some common defines. These works for all compilers, but assume
42219  # -D is universally accepted.
42220
42221  # Setup endianness
42222  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
42223    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
42224    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
42225    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
42226    #   Note: -Dmacro         is the same as    #define macro 1
42227    #         -Dmacro=        is the same as    #define macro
42228    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42229      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
42230    else
42231      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
42232    fi
42233  else
42234    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
42235    # are defined in the system?
42236    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42237      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
42238    else
42239      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
42240    fi
42241  fi
42242
42243  # Setup target OS define. Use OS target name but in upper case.
42244  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
42245  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
42246
42247  # Setup target CPU
42248  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
42249
42250  # Setup debug/release defines
42251  if test "x$DEBUG_LEVEL" = xrelease; then
42252    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
42253    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42254      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
42255    fi
42256  else
42257    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
42258  fi
42259
42260  # Setup release name
42261  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DRELEASE='\"\$(RELEASE)\"'"
42262
42263
42264  # Set some additional per-OS defines.
42265  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42266    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
42267  elif test "x$OPENJDK_TARGET_OS" = xaix; then
42268    # FIXME: PPC64 should not be here.
42269    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DPPC64"
42270  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
42271    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
42272  fi
42273
42274  # Additional macosx handling
42275  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42276    # Setting these parameters makes it an error to link to macosx APIs that are
42277    # newer than the given OS version and makes the linked binaries compatible
42278    # even if built on a newer version of the OS.
42279    # The expected format is X.Y.Z
42280    MACOSX_VERSION_MIN=10.7.0
42281
42282
42283    # The macro takes the version with no dots, ex: 1070
42284    # Let the flags variables get resolved in make for easier override on make
42285    # command line.
42286    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42287    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
42288  fi
42289
42290  # Setup some hard coded includes
42291  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
42292      -I${JDK_OUTPUTDIR}/include \
42293      -I${JDK_OUTPUTDIR}/include/$OPENJDK_TARGET_OS \
42294      -I${JDK_TOPDIR}/src/share/javavm/export \
42295      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_EXPORT_DIR/javavm/export \
42296      -I${JDK_TOPDIR}/src/share/native/common \
42297      -I${JDK_TOPDIR}/src/$OPENJDK_TARGET_OS_API_DIR/native/common"
42298
42299  # The shared libraries are compiled using the picflag.
42300  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
42301  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA "
42302
42303  # Executable flags
42304  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
42305  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
42306
42307
42308
42309
42310
42311
42312  # Setup LDFLAGS et al.
42313  #
42314
42315  # Now this is odd. The JDK native libraries have to link against libjvm.so
42316  # On 32-bit machines there is normally two distinct libjvm.so:s, client and server.
42317  # Which should we link to? Are we lucky enough that the binary api to the libjvm.so library
42318  # is identical for client and server? Yes. Which is picked at runtime (client or server)?
42319  # Neither, since the chosen libjvm.so has already been loaded by the launcher, all the following
42320  # libraries will link to whatever is in memory. Yuck.
42321  #
42322  # Thus we offer the compiler to find libjvm.so first in server then in client. It works. Ugh.
42323  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42324    LDFLAGS_JDK="$LDFLAGS_JDK -nologo -opt:ref -incremental:no"
42325    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
42326      LDFLAGS_JDK="$LDFLAGS_JDK -safeseh"
42327    fi
42328    # TODO: make -debug optional "--disable-full-debug-symbols"
42329    LDFLAGS_JDK="$LDFLAGS_JDK -debug"
42330  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
42331    # If this is a --hash-style=gnu system, use --hash-style=both, why?
42332    # We have previously set HAS_GNU_HASH if this is the case
42333    if test -n "$HAS_GNU_HASH"; then
42334      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker --hash-style=both"
42335    fi
42336    if test "x$OPENJDK_TARGET_OS" = xlinux; then
42337      # And since we now know that the linker is gnu, then add -z defs, to forbid
42338      # undefined symbols in object files.
42339      LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -z -Xlinker defs"
42340      case $DEBUG_LEVEL in
42341        release )
42342          # tell linker to optimize libraries.
42343          # Should this be supplied to the OSS linker as well?
42344          LDFLAGS_JDK="${LDFLAGS_JDK} -Xlinker -O1"
42345          ;;
42346        slowdebug )
42347          if test "x$HAS_LINKER_NOW" = "xtrue"; then
42348            # do relocations at load
42349            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
42350            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
42351          fi
42352          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42353            # mark relocations read only
42354            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42355            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42356          fi
42357          ;;
42358        fastdebug )
42359          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
42360            # mark relocations read only
42361            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
42362            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
42363          fi
42364          ;;
42365        * )
42366          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42367          ;;
42368        esac
42369    fi
42370  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42371    LDFLAGS_JDK="$LDFLAGS_JDK -z defs -xildoff -ztext"
42372    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK -norunpath -xnolib"
42373  fi
42374
42375  if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
42376    # If undefined behaviour detection is enabled then we need to tell linker.
42377    case $DEBUG_LEVEL in
42378      release | fastdebug )
42379        ;;
42380      slowdebug )
42381        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&5
42382$as_echo "$as_me: WARNING: $HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" >&2;}
42383        if test "x$HAS_CFLAG_DETECT_UNDEFINED_BEHAVIOR" = "xtrue"; then
42384          # enable undefined behaviour checking
42385          LDFLAGS_JDK="$LDFLAGS_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42386          LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK `$ECHO -n $CFLAG_DETECT_UNDEFINED_BEHAVIOR_FLAG | sed -e "s/ *\(^ \+\)/ -Xlinker \1/g"`"
42387        fi
42388        ;;
42389      * )
42390        as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
42391        ;;
42392    esac
42393  fi
42394
42395  # Customize LDFLAGS for executables
42396
42397  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
42398
42399  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42400    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
42401      LDFLAGS_STACK_SIZE=1048576
42402    else
42403      LDFLAGS_STACK_SIZE=327680
42404    fi
42405    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
42406  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
42407    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
42408  fi
42409
42410  # Customize LDFLAGS for libs
42411  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
42412
42413  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
42414    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -dll -libpath:${JDK_OUTPUTDIR}/lib"
42415    LDFLAGS_JDKLIB_SUFFIX=""
42416  else
42417    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB}  ${SHARED_LIBRARY_FLAGS} \
42418        -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}"
42419
42420    # On some platforms (mac) the linker warns about non existing -L dirs.
42421    # Add server first if available. Linking aginst client does not always produce the same results.
42422    # Only add client dir if client is being built. Add minimal (note not minimal1) if only building minimal1.
42423    # Default to server for other variants.
42424    if test "x$JVM_VARIANT_SERVER" = xtrue; then
42425      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42426    elif test "x$JVM_VARIANT_CLIENT" = xtrue; then
42427      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/client"
42428    elif test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
42429      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/minimal"
42430    else
42431      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L${JDK_OUTPUTDIR}/lib${OPENJDK_TARGET_CPU_LIBDIR}/server"
42432    fi
42433
42434    LDFLAGS_JDKLIB_SUFFIX="-ljava -ljvm"
42435    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
42436      LDFLAGS_JDKLIB_SUFFIX="$LDFLAGS_JDKLIB_SUFFIX -lc"
42437    fi
42438  fi
42439
42440
42441
42442
42443
42444
42445
42446
42447  # Some Zero and Shark settings.
42448  # ZERO_ARCHFLAG tells the compiler which mode to build for
42449  case "${OPENJDK_TARGET_CPU}" in
42450    s390)
42451      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
42452      ;;
42453    *)
42454      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42455  esac
42456
42457  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"$ZERO_ARCHFLAG\"" >&5
42458$as_echo_n "checking if compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
42459  supports=yes
42460
42461  saved_cflags="$CFLAGS"
42462  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
42463  ac_ext=c
42464ac_cpp='$CPP $CPPFLAGS'
42465ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42466ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42467ac_compiler_gnu=$ac_cv_c_compiler_gnu
42468
42469  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42470/* end confdefs.h.  */
42471int i;
42472_ACEOF
42473if ac_fn_c_try_compile "$LINENO"; then :
42474
42475else
42476  supports=no
42477fi
42478rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42479  ac_ext=cpp
42480ac_cpp='$CXXCPP $CPPFLAGS'
42481ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42482ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42483ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42484
42485  CFLAGS="$saved_cflags"
42486
42487  saved_cxxflags="$CXXFLAGS"
42488  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
42489  ac_ext=cpp
42490ac_cpp='$CXXCPP $CPPFLAGS'
42491ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42492ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42493ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42494
42495  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42496/* end confdefs.h.  */
42497int i;
42498_ACEOF
42499if ac_fn_cxx_try_compile "$LINENO"; then :
42500
42501else
42502  supports=no
42503fi
42504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42505  ac_ext=cpp
42506ac_cpp='$CXXCPP $CPPFLAGS'
42507ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42508ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42509ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42510
42511  CXXFLAGS="$saved_cxxflags"
42512
42513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42514$as_echo "$supports" >&6; }
42515  if test "x$supports" = "xyes" ; then
42516    :
42517  else
42518    ZERO_ARCHFLAG=""
42519  fi
42520
42521
42522
42523  # Check that the compiler supports -mX (or -qX on AIX) flags
42524  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
42525
42526  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
42527$as_echo_n "checking if compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
42528  supports=yes
42529
42530  saved_cflags="$CFLAGS"
42531  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42532  ac_ext=c
42533ac_cpp='$CPP $CPPFLAGS'
42534ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42535ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42536ac_compiler_gnu=$ac_cv_c_compiler_gnu
42537
42538  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42539/* end confdefs.h.  */
42540int i;
42541_ACEOF
42542if ac_fn_c_try_compile "$LINENO"; then :
42543
42544else
42545  supports=no
42546fi
42547rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42548  ac_ext=cpp
42549ac_cpp='$CXXCPP $CPPFLAGS'
42550ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42551ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42552ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42553
42554  CFLAGS="$saved_cflags"
42555
42556  saved_cxxflags="$CXXFLAGS"
42557  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
42558  ac_ext=cpp
42559ac_cpp='$CXXCPP $CPPFLAGS'
42560ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42561ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42562ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42563
42564  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42565/* end confdefs.h.  */
42566int i;
42567_ACEOF
42568if ac_fn_cxx_try_compile "$LINENO"; then :
42569
42570else
42571  supports=no
42572fi
42573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
42574  ac_ext=cpp
42575ac_cpp='$CXXCPP $CPPFLAGS'
42576ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
42577ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
42578ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
42579
42580  CXXFLAGS="$saved_cxxflags"
42581
42582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
42583$as_echo "$supports" >&6; }
42584  if test "x$supports" = "xyes" ; then
42585    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
42586  else
42587    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
42588  fi
42589
42590
42591
42592  case "${TOOLCHAIN_TYPE}" in
42593    microsoft)
42594      CFLAGS_WARNINGS_ARE_ERRORS="/WX"
42595      ;;
42596    solstudio)
42597      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
42598      ;;
42599    gcc)
42600      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42601      ;;
42602    clang)
42603      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
42604      ;;
42605  esac
42606
42607
42608
42609# Setup debug symbols (need objcopy from the toolchain for that)
42610
42611  #
42612  # ENABLE_DEBUG_SYMBOLS
42613  # This must be done after the toolchain is setup, since we're looking at objcopy.
42614  #
42615  # Check whether --enable-debug-symbols was given.
42616if test "${enable_debug_symbols+set}" = set; then :
42617  enableval=$enable_debug_symbols;
42618fi
42619
42620
42621  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should generate debug symbols" >&5
42622$as_echo_n "checking if we should generate debug symbols... " >&6; }
42623
42624  if test "x$enable_debug_symbols" = "xyes" && test "x$OBJCOPY" = x; then
42625    # explicit enabling of enable-debug-symbols and can't find objcopy
42626    #   this is an error
42627    as_fn_error $? "Unable to find objcopy, cannot enable debug-symbols" "$LINENO" 5
42628  fi
42629
42630  if test "x$enable_debug_symbols" = "xyes"; then
42631    ENABLE_DEBUG_SYMBOLS=true
42632  elif test "x$enable_debug_symbols" = "xno"; then
42633    ENABLE_DEBUG_SYMBOLS=false
42634  else
42635    # Default is on if objcopy is found
42636    if test "x$OBJCOPY" != x; then
42637      ENABLE_DEBUG_SYMBOLS=true
42638    # MacOS X and Windows don't use objcopy but default is on for those OSes
42639    elif test "x$OPENJDK_TARGET_OS" = xmacosx || test "x$OPENJDK_TARGET_OS" = xwindows; then
42640      ENABLE_DEBUG_SYMBOLS=true
42641    else
42642      ENABLE_DEBUG_SYMBOLS=false
42643    fi
42644  fi
42645
42646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_DEBUG_SYMBOLS" >&5
42647$as_echo "$ENABLE_DEBUG_SYMBOLS" >&6; }
42648
42649  #
42650  # ZIP_DEBUGINFO_FILES
42651  #
42652  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should zip debug-info files" >&5
42653$as_echo_n "checking if we should zip debug-info files... " >&6; }
42654  # Check whether --enable-zip-debug-info was given.
42655if test "${enable_zip_debug_info+set}" = set; then :
42656  enableval=$enable_zip_debug_info; enable_zip_debug_info="${enableval}"
42657else
42658  enable_zip_debug_info="yes"
42659fi
42660
42661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_zip_debug_info}" >&5
42662$as_echo "${enable_zip_debug_info}" >&6; }
42663
42664  if test "x${enable_zip_debug_info}" = "xno"; then
42665    ZIP_DEBUGINFO_FILES=false
42666  else
42667    ZIP_DEBUGINFO_FILES=true
42668  fi
42669
42670
42671
42672
42673
42674###############################################################################
42675#
42676# Check dependencies for external and internal libraries.
42677#
42678###############################################################################
42679
42680# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
42681
42682  # When using cygwin or msys, we need a wrapper binary that renames
42683  # /cygdrive/c/ arguments into c:/ arguments and peeks into
42684  # @files and rewrites these too! This wrapper binary is
42685  # called fixpath.
42686  FIXPATH=
42687  if test "x$OPENJDK_BUILD_OS" = xwindows; then
42688    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
42689$as_echo_n "checking if fixpath can be created... " >&6; }
42690    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
42691    FIXPATH_BIN="$OUTPUT_ROOT/fixpath.exe"
42692    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
42693      FIXPATH_SRC=`$CYGPATH -m $FIXPATH_SRC`
42694      FIXPATH_BIN=`$CYGPATH -m $FIXPATH_BIN`
42695      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
42696      FIXPATH="$OUTPUT_ROOT/fixpath.exe -c"
42697    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
42698      FIXPATH_SRC=`cmd //c echo $FIXPATH_SRC`
42699      FIXPATH_BIN=`cmd //c echo $FIXPATH_BIN`
42700
42701      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
42702      # @ was chosen as separator to minimize risk of other tools messing around with it
42703      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" | tr ' ' '\n' | grep '^/./' | sort | uniq`
42704      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
42705
42706      FIXPATH="$OUTPUT_ROOT/fixpath -m$fixpath_argument_list"
42707    fi
42708    rm -f $OUTPUT_ROOT/fixpath*
42709    cd $OUTPUT_ROOT
42710    $CC $FIXPATH_SRC -Fe$FIXPATH_BIN > $OUTPUT_ROOT/fixpath1.log 2>&1
42711    cd $CURDIR
42712
42713    if test ! -x $OUTPUT_ROOT/fixpath.exe; then
42714      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42715$as_echo "no" >&6; }
42716      cat $OUTPUT_ROOT/fixpath1.log
42717      as_fn_error $? "Could not create $OUTPUT_ROOT/fixpath.exe" "$LINENO" 5
42718    fi
42719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42720$as_echo "yes" >&6; }
42721    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
42722$as_echo_n "checking if fixpath.exe works... " >&6; }
42723    cd $OUTPUT_ROOT
42724    $FIXPATH $CC $SRC_ROOT/common/src/fixpath.c -Fe$OUTPUT_ROOT/fixpath2.exe > $OUTPUT_ROOT/fixpath2.log 2>&1
42725    cd $CURDIR
42726    if test ! -x $OUTPUT_ROOT/fixpath2.exe; then
42727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42728$as_echo "no" >&6; }
42729      cat $OUTPUT_ROOT/fixpath2.log
42730      as_fn_error $? "fixpath did not work!" "$LINENO" 5
42731    fi
42732    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
42733$as_echo "yes" >&6; }
42734    rm -f $OUTPUT_ROOT/fixpath?.??? $OUTPUT_ROOT/fixpath.obj
42735  fi
42736
42737
42738
42739
42740
42741
42742  ###############################################################################
42743  #
42744  # OS specific settings that we never will need to probe.
42745  #
42746  if test "x$OPENJDK_TARGET_OS" = xlinux; then
42747    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Linux?" >&5
42748$as_echo_n "checking what is not needed on Linux?... " >&6; }
42749    PULSE_NOT_NEEDED=yes
42750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: pulse" >&5
42751$as_echo "pulse" >&6; }
42752  fi
42753
42754  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
42755    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Solaris?" >&5
42756$as_echo_n "checking what is not needed on Solaris?... " >&6; }
42757    ALSA_NOT_NEEDED=yes
42758    PULSE_NOT_NEEDED=yes
42759    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42760$as_echo "alsa pulse" >&6; }
42761  fi
42762
42763  if test "x$OPENJDK_TARGET_OS" = xaix; then
42764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on AIX?" >&5
42765$as_echo_n "checking what is not needed on AIX?... " >&6; }
42766    ALSA_NOT_NEEDED=yes
42767    PULSE_NOT_NEEDED=yes
42768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse" >&5
42769$as_echo "alsa pulse" >&6; }
42770  fi
42771
42772
42773  if test "x$OPENJDK_TARGET_OS" = xwindows; then
42774    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on Windows?" >&5
42775$as_echo_n "checking what is not needed on Windows?... " >&6; }
42776    CUPS_NOT_NEEDED=yes
42777    ALSA_NOT_NEEDED=yes
42778    PULSE_NOT_NEEDED=yes
42779    X11_NOT_NEEDED=yes
42780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa cups pulse x11" >&5
42781$as_echo "alsa cups pulse x11" >&6; }
42782  fi
42783
42784  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
42785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on MacOSX?" >&5
42786$as_echo_n "checking what is not needed on MacOSX?... " >&6; }
42787    ALSA_NOT_NEEDED=yes
42788    PULSE_NOT_NEEDED=yes
42789    X11_NOT_NEEDED=yes
42790    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa pulse x11" >&5
42791$as_echo "alsa pulse x11" >&6; }
42792  fi
42793
42794  if test "x$OPENJDK_TARGET_OS" = xbsd; then
42795    { $as_echo "$as_me:${as_lineno-$LINENO}: checking what is not needed on bsd?" >&5
42796$as_echo_n "checking what is not needed on bsd?... " >&6; }
42797    ALSA_NOT_NEEDED=yes
42798    { $as_echo "$as_me:${as_lineno-$LINENO}: result: alsa" >&5
42799$as_echo "alsa" >&6; }
42800  fi
42801
42802  if test "x$OPENJDK" = "xfalse"; then
42803    FREETYPE_NOT_NEEDED=yes
42804  fi
42805
42806  if test "x$SUPPORT_HEADFUL" = xno; then
42807    X11_NOT_NEEDED=yes
42808  fi
42809
42810
42811
42812  ###############################################################################
42813  #
42814  # Check for X Windows
42815  #
42816
42817  # Check if the user has specified sysroot, but not --x-includes or --x-libraries.
42818  # Make a simple check for the libraries at the sysroot, and setup --x-includes and
42819  # --x-libraries for the sysroot, if that seems to be correct.
42820  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
42821    if test "x$SYSROOT" != "x"; then
42822      if test "x$x_includes" = xNONE; then
42823        if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
42824          x_includes="$SYSROOT/usr/X11R6/include"
42825        elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
42826          x_includes="$SYSROOT/usr/include"
42827        fi
42828      fi
42829      if test "x$x_libraries" = xNONE; then
42830        if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
42831          x_libraries="$SYSROOT/usr/X11R6/lib"
42832        elif test "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
42833          x_libraries="$SYSROOT/usr/lib64"
42834        elif test -f "$SYSROOT/usr/lib/libX11.so"; then
42835          x_libraries="$SYSROOT/usr/lib"
42836        fi
42837      fi
42838    fi
42839  fi
42840
42841  # Now let autoconf do it's magic
42842  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
42843$as_echo_n "checking for X... " >&6; }
42844
42845
42846# Check whether --with-x was given.
42847if test "${with_x+set}" = set; then :
42848  withval=$with_x;
42849fi
42850
42851# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
42852if test "x$with_x" = xno; then
42853  # The user explicitly disabled X.
42854  have_x=disabled
42855else
42856  case $x_includes,$x_libraries in #(
42857    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
42858    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
42859  $as_echo_n "(cached) " >&6
42860else
42861  # One or both of the vars are not set, and there is no cached value.
42862ac_x_includes=no ac_x_libraries=no
42863rm -f -r conftest.dir
42864if mkdir conftest.dir; then
42865  cd conftest.dir
42866  cat >Imakefile <<'_ACEOF'
42867incroot:
42868	@echo incroot='${INCROOT}'
42869usrlibdir:
42870	@echo usrlibdir='${USRLIBDIR}'
42871libdir:
42872	@echo libdir='${LIBDIR}'
42873_ACEOF
42874  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
42875    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
42876    for ac_var in incroot usrlibdir libdir; do
42877      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
42878    done
42879    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
42880    for ac_extension in a so sl dylib la dll; do
42881      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
42882	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
42883	ac_im_usrlibdir=$ac_im_libdir; break
42884      fi
42885    done
42886    # Screen out bogus values from the imake configuration.  They are
42887    # bogus both because they are the default anyway, and because
42888    # using them would break gcc on systems where it needs fixed includes.
42889    case $ac_im_incroot in
42890	/usr/include) ac_x_includes= ;;
42891	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
42892    esac
42893    case $ac_im_usrlibdir in
42894	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
42895	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
42896    esac
42897  fi
42898  cd ..
42899  rm -f -r conftest.dir
42900fi
42901
42902# Standard set of common directories for X headers.
42903# Check X11 before X11Rn because it is often a symlink to the current release.
42904ac_x_header_dirs='
42905/usr/X11/include
42906/usr/X11R7/include
42907/usr/X11R6/include
42908/usr/X11R5/include
42909/usr/X11R4/include
42910
42911/usr/include/X11
42912/usr/include/X11R7
42913/usr/include/X11R6
42914/usr/include/X11R5
42915/usr/include/X11R4
42916
42917/usr/local/X11/include
42918/usr/local/X11R7/include
42919/usr/local/X11R6/include
42920/usr/local/X11R5/include
42921/usr/local/X11R4/include
42922
42923/usr/local/include/X11
42924/usr/local/include/X11R7
42925/usr/local/include/X11R6
42926/usr/local/include/X11R5
42927/usr/local/include/X11R4
42928
42929/usr/X386/include
42930/usr/x386/include
42931/usr/XFree86/include/X11
42932
42933/usr/include
42934/usr/local/include
42935/usr/unsupported/include
42936/usr/athena/include
42937/usr/local/x11r5/include
42938/usr/lpp/Xamples/include
42939
42940/usr/openwin/include
42941/usr/openwin/share/include'
42942
42943if test "$ac_x_includes" = no; then
42944  # Guess where to find include files, by looking for Xlib.h.
42945  # First, try using that file with no special directory specified.
42946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42947/* end confdefs.h.  */
42948#include <X11/Xlib.h>
42949_ACEOF
42950if ac_fn_cxx_try_cpp "$LINENO"; then :
42951  # We can compile using X headers with no special include directory.
42952ac_x_includes=
42953else
42954  for ac_dir in $ac_x_header_dirs; do
42955  if test -r "$ac_dir/X11/Xlib.h"; then
42956    ac_x_includes=$ac_dir
42957    break
42958  fi
42959done
42960fi
42961rm -f conftest.err conftest.i conftest.$ac_ext
42962fi # $ac_x_includes = no
42963
42964if test "$ac_x_libraries" = no; then
42965  # Check for the libraries.
42966  # See if we find them without any special options.
42967  # Don't add to $LIBS permanently.
42968  ac_save_LIBS=$LIBS
42969  LIBS="-lX11 $LIBS"
42970  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
42971/* end confdefs.h.  */
42972#include <X11/Xlib.h>
42973int
42974main ()
42975{
42976XrmInitialize ()
42977  ;
42978  return 0;
42979}
42980_ACEOF
42981if ac_fn_cxx_try_link "$LINENO"; then :
42982  LIBS=$ac_save_LIBS
42983# We can link X programs with no special library path.
42984ac_x_libraries=
42985else
42986  LIBS=$ac_save_LIBS
42987for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
42988do
42989  # Don't even attempt the hair of trying to link an X program!
42990  for ac_extension in a so sl dylib la dll; do
42991    if test -r "$ac_dir/libX11.$ac_extension"; then
42992      ac_x_libraries=$ac_dir
42993      break 2
42994    fi
42995  done
42996done
42997fi
42998rm -f core conftest.err conftest.$ac_objext \
42999    conftest$ac_exeext conftest.$ac_ext
43000fi # $ac_x_libraries = no
43001
43002case $ac_x_includes,$ac_x_libraries in #(
43003  no,* | *,no | *\'*)
43004    # Didn't find X, or a directory has "'" in its name.
43005    ac_cv_have_x="have_x=no";; #(
43006  *)
43007    # Record where we found X for the cache.
43008    ac_cv_have_x="have_x=yes\
43009	ac_x_includes='$ac_x_includes'\
43010	ac_x_libraries='$ac_x_libraries'"
43011esac
43012fi
43013;; #(
43014    *) have_x=yes;;
43015  esac
43016  eval "$ac_cv_have_x"
43017fi # $with_x != no
43018
43019if test "$have_x" != yes; then
43020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
43021$as_echo "$have_x" >&6; }
43022  no_x=yes
43023else
43024  # If each of the values was on the command line, it overrides each guess.
43025  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
43026  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
43027  # Update the cache value to reflect the command line values.
43028  ac_cv_have_x="have_x=yes\
43029	ac_x_includes='$x_includes'\
43030	ac_x_libraries='$x_libraries'"
43031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
43032$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
43033fi
43034
43035  if test "$no_x" = yes; then
43036  # Not all programs may use this symbol, but it does not hurt to define it.
43037
43038$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
43039
43040  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
43041else
43042  if test -n "$x_includes"; then
43043    X_CFLAGS="$X_CFLAGS -I$x_includes"
43044  fi
43045
43046  # It would also be nice to do this for all -L options, not just this one.
43047  if test -n "$x_libraries"; then
43048    X_LIBS="$X_LIBS -L$x_libraries"
43049    # For Solaris; some versions of Sun CC require a space after -R and
43050    # others require no space.  Words are not sufficient . . . .
43051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
43052$as_echo_n "checking whether -R must be followed by a space... " >&6; }
43053    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
43054    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
43055    ac_cxx_werror_flag=yes
43056    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43057/* end confdefs.h.  */
43058
43059int
43060main ()
43061{
43062
43063  ;
43064  return 0;
43065}
43066_ACEOF
43067if ac_fn_cxx_try_link "$LINENO"; then :
43068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43069$as_echo "no" >&6; }
43070       X_LIBS="$X_LIBS -R$x_libraries"
43071else
43072  LIBS="$ac_xsave_LIBS -R $x_libraries"
43073       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43074/* end confdefs.h.  */
43075
43076int
43077main ()
43078{
43079
43080  ;
43081  return 0;
43082}
43083_ACEOF
43084if ac_fn_cxx_try_link "$LINENO"; then :
43085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
43086$as_echo "yes" >&6; }
43087	  X_LIBS="$X_LIBS -R $x_libraries"
43088else
43089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
43090$as_echo "neither works" >&6; }
43091fi
43092rm -f core conftest.err conftest.$ac_objext \
43093    conftest$ac_exeext conftest.$ac_ext
43094fi
43095rm -f core conftest.err conftest.$ac_objext \
43096    conftest$ac_exeext conftest.$ac_ext
43097    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
43098    LIBS=$ac_xsave_LIBS
43099  fi
43100
43101  # Check for system-dependent libraries X programs must link with.
43102  # Do this before checking for the system-independent R6 libraries
43103  # (-lICE), since we may need -lsocket or whatever for X linking.
43104
43105  if test "$ISC" = yes; then
43106    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
43107  else
43108    # Martyn Johnson says this is needed for Ultrix, if the X
43109    # libraries were built with DECnet support.  And Karl Berry says
43110    # the Alpha needs dnet_stub (dnet does not exist).
43111    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
43112    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43113/* end confdefs.h.  */
43114
43115/* Override any GCC internal prototype to avoid an error.
43116   Use char because int might match the return type of a GCC
43117   builtin and then its argument prototype would still apply.  */
43118#ifdef __cplusplus
43119extern "C"
43120#endif
43121char XOpenDisplay ();
43122int
43123main ()
43124{
43125return XOpenDisplay ();
43126  ;
43127  return 0;
43128}
43129_ACEOF
43130if ac_fn_cxx_try_link "$LINENO"; then :
43131
43132else
43133  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
43134$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
43135if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
43136  $as_echo_n "(cached) " >&6
43137else
43138  ac_check_lib_save_LIBS=$LIBS
43139LIBS="-ldnet  $LIBS"
43140cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43141/* end confdefs.h.  */
43142
43143/* Override any GCC internal prototype to avoid an error.
43144   Use char because int might match the return type of a GCC
43145   builtin and then its argument prototype would still apply.  */
43146#ifdef __cplusplus
43147extern "C"
43148#endif
43149char dnet_ntoa ();
43150int
43151main ()
43152{
43153return dnet_ntoa ();
43154  ;
43155  return 0;
43156}
43157_ACEOF
43158if ac_fn_cxx_try_link "$LINENO"; then :
43159  ac_cv_lib_dnet_dnet_ntoa=yes
43160else
43161  ac_cv_lib_dnet_dnet_ntoa=no
43162fi
43163rm -f core conftest.err conftest.$ac_objext \
43164    conftest$ac_exeext conftest.$ac_ext
43165LIBS=$ac_check_lib_save_LIBS
43166fi
43167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
43168$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
43169if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
43170  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
43171fi
43172
43173    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
43174      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
43175$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
43176if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
43177  $as_echo_n "(cached) " >&6
43178else
43179  ac_check_lib_save_LIBS=$LIBS
43180LIBS="-ldnet_stub  $LIBS"
43181cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43182/* end confdefs.h.  */
43183
43184/* Override any GCC internal prototype to avoid an error.
43185   Use char because int might match the return type of a GCC
43186   builtin and then its argument prototype would still apply.  */
43187#ifdef __cplusplus
43188extern "C"
43189#endif
43190char dnet_ntoa ();
43191int
43192main ()
43193{
43194return dnet_ntoa ();
43195  ;
43196  return 0;
43197}
43198_ACEOF
43199if ac_fn_cxx_try_link "$LINENO"; then :
43200  ac_cv_lib_dnet_stub_dnet_ntoa=yes
43201else
43202  ac_cv_lib_dnet_stub_dnet_ntoa=no
43203fi
43204rm -f core conftest.err conftest.$ac_objext \
43205    conftest$ac_exeext conftest.$ac_ext
43206LIBS=$ac_check_lib_save_LIBS
43207fi
43208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
43209$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
43210if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
43211  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
43212fi
43213
43214    fi
43215fi
43216rm -f core conftest.err conftest.$ac_objext \
43217    conftest$ac_exeext conftest.$ac_ext
43218    LIBS="$ac_xsave_LIBS"
43219
43220    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
43221    # to get the SysV transport functions.
43222    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
43223    # needs -lnsl.
43224    # The nsl library prevents programs from opening the X display
43225    # on Irix 5.2, according to T.E. Dickey.
43226    # The functions gethostbyname, getservbyname, and inet_addr are
43227    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
43228    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
43229if test "x$ac_cv_func_gethostbyname" = xyes; then :
43230
43231fi
43232
43233    if test $ac_cv_func_gethostbyname = no; then
43234      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
43235$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
43236if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
43237  $as_echo_n "(cached) " >&6
43238else
43239  ac_check_lib_save_LIBS=$LIBS
43240LIBS="-lnsl  $LIBS"
43241cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43242/* end confdefs.h.  */
43243
43244/* Override any GCC internal prototype to avoid an error.
43245   Use char because int might match the return type of a GCC
43246   builtin and then its argument prototype would still apply.  */
43247#ifdef __cplusplus
43248extern "C"
43249#endif
43250char gethostbyname ();
43251int
43252main ()
43253{
43254return gethostbyname ();
43255  ;
43256  return 0;
43257}
43258_ACEOF
43259if ac_fn_cxx_try_link "$LINENO"; then :
43260  ac_cv_lib_nsl_gethostbyname=yes
43261else
43262  ac_cv_lib_nsl_gethostbyname=no
43263fi
43264rm -f core conftest.err conftest.$ac_objext \
43265    conftest$ac_exeext conftest.$ac_ext
43266LIBS=$ac_check_lib_save_LIBS
43267fi
43268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
43269$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
43270if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
43271  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
43272fi
43273
43274      if test $ac_cv_lib_nsl_gethostbyname = no; then
43275	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
43276$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
43277if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
43278  $as_echo_n "(cached) " >&6
43279else
43280  ac_check_lib_save_LIBS=$LIBS
43281LIBS="-lbsd  $LIBS"
43282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43283/* end confdefs.h.  */
43284
43285/* Override any GCC internal prototype to avoid an error.
43286   Use char because int might match the return type of a GCC
43287   builtin and then its argument prototype would still apply.  */
43288#ifdef __cplusplus
43289extern "C"
43290#endif
43291char gethostbyname ();
43292int
43293main ()
43294{
43295return gethostbyname ();
43296  ;
43297  return 0;
43298}
43299_ACEOF
43300if ac_fn_cxx_try_link "$LINENO"; then :
43301  ac_cv_lib_bsd_gethostbyname=yes
43302else
43303  ac_cv_lib_bsd_gethostbyname=no
43304fi
43305rm -f core conftest.err conftest.$ac_objext \
43306    conftest$ac_exeext conftest.$ac_ext
43307LIBS=$ac_check_lib_save_LIBS
43308fi
43309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
43310$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
43311if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
43312  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
43313fi
43314
43315      fi
43316    fi
43317
43318    # lieder@skyler.mavd.honeywell.com says without -lsocket,
43319    # socket/setsockopt and other routines are undefined under SCO ODT
43320    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
43321    # on later versions), says Simon Leinen: it contains gethostby*
43322    # variants that don't use the name server (or something).  -lsocket
43323    # must be given before -lnsl if both are needed.  We assume that
43324    # if connect needs -lnsl, so does gethostbyname.
43325    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
43326if test "x$ac_cv_func_connect" = xyes; then :
43327
43328fi
43329
43330    if test $ac_cv_func_connect = no; then
43331      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
43332$as_echo_n "checking for connect in -lsocket... " >&6; }
43333if ${ac_cv_lib_socket_connect+:} false; then :
43334  $as_echo_n "(cached) " >&6
43335else
43336  ac_check_lib_save_LIBS=$LIBS
43337LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
43338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43339/* end confdefs.h.  */
43340
43341/* Override any GCC internal prototype to avoid an error.
43342   Use char because int might match the return type of a GCC
43343   builtin and then its argument prototype would still apply.  */
43344#ifdef __cplusplus
43345extern "C"
43346#endif
43347char connect ();
43348int
43349main ()
43350{
43351return connect ();
43352  ;
43353  return 0;
43354}
43355_ACEOF
43356if ac_fn_cxx_try_link "$LINENO"; then :
43357  ac_cv_lib_socket_connect=yes
43358else
43359  ac_cv_lib_socket_connect=no
43360fi
43361rm -f core conftest.err conftest.$ac_objext \
43362    conftest$ac_exeext conftest.$ac_ext
43363LIBS=$ac_check_lib_save_LIBS
43364fi
43365{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
43366$as_echo "$ac_cv_lib_socket_connect" >&6; }
43367if test "x$ac_cv_lib_socket_connect" = xyes; then :
43368  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
43369fi
43370
43371    fi
43372
43373    # Guillermo Gomez says -lposix is necessary on A/UX.
43374    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
43375if test "x$ac_cv_func_remove" = xyes; then :
43376
43377fi
43378
43379    if test $ac_cv_func_remove = no; then
43380      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
43381$as_echo_n "checking for remove in -lposix... " >&6; }
43382if ${ac_cv_lib_posix_remove+:} false; then :
43383  $as_echo_n "(cached) " >&6
43384else
43385  ac_check_lib_save_LIBS=$LIBS
43386LIBS="-lposix  $LIBS"
43387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43388/* end confdefs.h.  */
43389
43390/* Override any GCC internal prototype to avoid an error.
43391   Use char because int might match the return type of a GCC
43392   builtin and then its argument prototype would still apply.  */
43393#ifdef __cplusplus
43394extern "C"
43395#endif
43396char remove ();
43397int
43398main ()
43399{
43400return remove ();
43401  ;
43402  return 0;
43403}
43404_ACEOF
43405if ac_fn_cxx_try_link "$LINENO"; then :
43406  ac_cv_lib_posix_remove=yes
43407else
43408  ac_cv_lib_posix_remove=no
43409fi
43410rm -f core conftest.err conftest.$ac_objext \
43411    conftest$ac_exeext conftest.$ac_ext
43412LIBS=$ac_check_lib_save_LIBS
43413fi
43414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
43415$as_echo "$ac_cv_lib_posix_remove" >&6; }
43416if test "x$ac_cv_lib_posix_remove" = xyes; then :
43417  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
43418fi
43419
43420    fi
43421
43422    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
43423    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
43424if test "x$ac_cv_func_shmat" = xyes; then :
43425
43426fi
43427
43428    if test $ac_cv_func_shmat = no; then
43429      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
43430$as_echo_n "checking for shmat in -lipc... " >&6; }
43431if ${ac_cv_lib_ipc_shmat+:} false; then :
43432  $as_echo_n "(cached) " >&6
43433else
43434  ac_check_lib_save_LIBS=$LIBS
43435LIBS="-lipc  $LIBS"
43436cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43437/* end confdefs.h.  */
43438
43439/* Override any GCC internal prototype to avoid an error.
43440   Use char because int might match the return type of a GCC
43441   builtin and then its argument prototype would still apply.  */
43442#ifdef __cplusplus
43443extern "C"
43444#endif
43445char shmat ();
43446int
43447main ()
43448{
43449return shmat ();
43450  ;
43451  return 0;
43452}
43453_ACEOF
43454if ac_fn_cxx_try_link "$LINENO"; then :
43455  ac_cv_lib_ipc_shmat=yes
43456else
43457  ac_cv_lib_ipc_shmat=no
43458fi
43459rm -f core conftest.err conftest.$ac_objext \
43460    conftest$ac_exeext conftest.$ac_ext
43461LIBS=$ac_check_lib_save_LIBS
43462fi
43463{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
43464$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
43465if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
43466  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
43467fi
43468
43469    fi
43470  fi
43471
43472  # Check for libraries that X11R6 Xt/Xaw programs need.
43473  ac_save_LDFLAGS=$LDFLAGS
43474  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
43475  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
43476  # check for ICE first), but we must link in the order -lSM -lICE or
43477  # we get undefined symbols.  So assume we have SM if we have ICE.
43478  # These have to be linked with before -lX11, unlike the other
43479  # libraries we check for below, so use a different variable.
43480  # John Interrante, Karl Berry
43481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
43482$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
43483if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
43484  $as_echo_n "(cached) " >&6
43485else
43486  ac_check_lib_save_LIBS=$LIBS
43487LIBS="-lICE $X_EXTRA_LIBS $LIBS"
43488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
43489/* end confdefs.h.  */
43490
43491/* Override any GCC internal prototype to avoid an error.
43492   Use char because int might match the return type of a GCC
43493   builtin and then its argument prototype would still apply.  */
43494#ifdef __cplusplus
43495extern "C"
43496#endif
43497char IceConnectionNumber ();
43498int
43499main ()
43500{
43501return IceConnectionNumber ();
43502  ;
43503  return 0;
43504}
43505_ACEOF
43506if ac_fn_cxx_try_link "$LINENO"; then :
43507  ac_cv_lib_ICE_IceConnectionNumber=yes
43508else
43509  ac_cv_lib_ICE_IceConnectionNumber=no
43510fi
43511rm -f core conftest.err conftest.$ac_objext \
43512    conftest$ac_exeext conftest.$ac_ext
43513LIBS=$ac_check_lib_save_LIBS
43514fi
43515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
43516$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
43517if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
43518  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
43519fi
43520
43521  LDFLAGS=$ac_save_LDFLAGS
43522
43523fi
43524
43525
43526  # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
43527  # this doesn't make sense so we remove it.
43528  if test "x$COMPILE_TYPE" = xcross; then
43529    X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
43530  fi
43531
43532  if test "x$no_x" = xyes && test "x$X11_NOT_NEEDED" != xyes; then
43533
43534  # Print a helpful message on how to acquire the necessary build dependency.
43535  # x11 is the help tag: freetype, cups, pulse, alsa etc
43536  MISSING_DEPENDENCY=x11
43537
43538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43539    cygwin_help $MISSING_DEPENDENCY
43540  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43541    msys_help $MISSING_DEPENDENCY
43542  else
43543    PKGHANDLER_COMMAND=
43544
43545    case $PKGHANDLER in
43546      apt-get)
43547        apt_help     $MISSING_DEPENDENCY ;;
43548      yum)
43549        yum_help     $MISSING_DEPENDENCY ;;
43550      port)
43551        port_help    $MISSING_DEPENDENCY ;;
43552      pkgutil)
43553        pkgutil_help $MISSING_DEPENDENCY ;;
43554      pkgadd)
43555        pkgadd_help  $MISSING_DEPENDENCY ;;
43556    esac
43557
43558    if test "x$PKGHANDLER_COMMAND" != x; then
43559      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43560    fi
43561  fi
43562
43563    as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
43564  fi
43565
43566  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43567    OPENWIN_HOME="/usr/openwin"
43568    X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
43569    X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43570        -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
43571        -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
43572        -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
43573  fi
43574
43575  #
43576  # Weird Sol10 something check...TODO change to try compile
43577  #
43578  if test "x${OPENJDK_TARGET_OS}" = xsolaris; then
43579    if test "`uname -r`" = "5.10"; then
43580      if test "`${EGREP} -c XLinearGradient ${OPENWIN_HOME}/share/include/X11/extensions/Xrender.h`" = "0"; then
43581        X_CFLAGS="${X_CFLAGS} -DSOLARIS10_NO_XRENDER_STRUCTS"
43582      fi
43583    fi
43584  fi
43585
43586  ac_ext=c
43587ac_cpp='$CPP $CPPFLAGS'
43588ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43589ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43590ac_compiler_gnu=$ac_cv_c_compiler_gnu
43591
43592  OLD_CFLAGS="$CFLAGS"
43593  CFLAGS="$CFLAGS $X_CFLAGS"
43594
43595  # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
43596  for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
43597do :
43598  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43599ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
43600        # include <X11/Xlib.h>
43601        # include <X11/Xutil.h>
43602
43603
43604"
43605if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43606  cat >>confdefs.h <<_ACEOF
43607#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43608_ACEOF
43609 X11_A_OK=yes
43610else
43611  X11_A_OK=no; break
43612fi
43613
43614done
43615
43616
43617  CFLAGS="$OLD_CFLAGS"
43618  ac_ext=cpp
43619ac_cpp='$CXXCPP $CPPFLAGS'
43620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
43621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
43622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
43623
43624
43625  if test "x$X11_A_OK" = xno && test "x$X11_NOT_NEEDED" != xyes; then
43626
43627  # Print a helpful message on how to acquire the necessary build dependency.
43628  # x11 is the help tag: freetype, cups, pulse, alsa etc
43629  MISSING_DEPENDENCY=x11
43630
43631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43632    cygwin_help $MISSING_DEPENDENCY
43633  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43634    msys_help $MISSING_DEPENDENCY
43635  else
43636    PKGHANDLER_COMMAND=
43637
43638    case $PKGHANDLER in
43639      apt-get)
43640        apt_help     $MISSING_DEPENDENCY ;;
43641      yum)
43642        yum_help     $MISSING_DEPENDENCY ;;
43643      port)
43644        port_help    $MISSING_DEPENDENCY ;;
43645      pkgutil)
43646        pkgutil_help $MISSING_DEPENDENCY ;;
43647      pkgadd)
43648        pkgadd_help  $MISSING_DEPENDENCY ;;
43649    esac
43650
43651    if test "x$PKGHANDLER_COMMAND" != x; then
43652      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43653    fi
43654  fi
43655
43656    as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
43657  fi
43658
43659
43660
43661
43662
43663
43664  ###############################################################################
43665  #
43666  # The common unix printing system cups is used to print from java.
43667  #
43668
43669# Check whether --with-cups was given.
43670if test "${with_cups+set}" = set; then :
43671  withval=$with_cups;
43672fi
43673
43674
43675# Check whether --with-cups-include was given.
43676if test "${with_cups_include+set}" = set; then :
43677  withval=$with_cups_include;
43678fi
43679
43680
43681  if test "x$CUPS_NOT_NEEDED" = xyes; then
43682    if test "x${with_cups}" != x || test "x${with_cups_include}" != x; then
43683      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups is ignored" >&5
43684$as_echo "$as_me: WARNING: cups not used, so --with-cups is ignored" >&2;}
43685    fi
43686    CUPS_CFLAGS=
43687  else
43688    CUPS_FOUND=no
43689
43690    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
43691      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
43692    fi
43693
43694    if test "x${with_cups}" != x; then
43695      CUPS_CFLAGS="-I${with_cups}/include"
43696      CUPS_FOUND=yes
43697    fi
43698    if test "x${with_cups_include}" != x; then
43699      CUPS_CFLAGS="-I${with_cups_include}"
43700      CUPS_FOUND=yes
43701    fi
43702    if test "x$CUPS_FOUND" = xno; then
43703
43704
43705  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
43706    # Source the builddeps file again, to make sure it uses the latest variables!
43707    . $builddepsfile
43708    # Look for a target and build machine specific resource!
43709    eval resource=\${builddep_cups_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
43710    if test "x$resource" = x; then
43711      # Ok, lets instead look for a target specific resource
43712      eval resource=\${builddep_cups_TARGET_${rewritten_target_var}}
43713    fi
43714    if test "x$resource" = x; then
43715      # Ok, lets instead look for a build specific resource
43716      eval resource=\${builddep_cups_BUILD_${rewritten_build_var}}
43717    fi
43718    if test "x$resource" = x; then
43719      # Ok, lets instead look for a generic resource
43720      # (The cups comes from M4 and not the shell, thus no need for eval here.)
43721      resource=${builddep_cups}
43722    fi
43723    if test "x$resource" != x; then
43724      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for cups" >&5
43725$as_echo "$as_me: Using builddeps $resource for cups" >&6;}
43726      # If the resource in the builddeps.conf file is an existing directory,
43727      # for example /java/linux/cups
43728      if test -d ${resource}; then
43729        depdir=${resource}
43730      else
43731
43732  # cups is for example mymodule
43733  # $resource is for example libs/general/libmymod_1_2_3.zip
43734  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
43735  # $with_builddeps_dir is for example /localhome/builddeps
43736  # depdir is the name of the variable into which we store the depdir, eg MYMOD
43737  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
43738  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
43739  filename=`basename $resource`
43740  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
43741  filebase=${filename%%.*}
43742  extension=${filename#*.}
43743  installdir=$with_builddeps_dir/$filebase
43744  if test ! -f $installdir/$filename.unpacked; then
43745    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&5
43746$as_echo "$as_me: Downloading build dependency cups from $with_builddeps_server/$resource and installing into $installdir" >&6;}
43747    if test ! -d $installdir; then
43748      mkdir -p $installdir
43749    fi
43750    if test ! -d $installdir; then
43751      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
43752    fi
43753    tmpfile=`mktemp $installdir/cups.XXXXXXXXX`
43754    touch $tmpfile
43755    if test ! -f $tmpfile; then
43756      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
43757    fi
43758
43759  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
43760  # $tmpfile is the local file name for the downloaded file.
43761  VALID_TOOL=no
43762  if test "x$BDEPS_FTP" = xwget; then
43763    VALID_TOOL=yes
43764    wget -O $tmpfile $with_builddeps_server/$resource
43765  fi
43766  if test "x$BDEPS_FTP" = xlftp; then
43767    VALID_TOOL=yes
43768    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
43769  fi
43770  if test "x$BDEPS_FTP" = xftp; then
43771    VALID_TOOL=yes
43772    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
43773    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
43774    FTPUSERPWD=${FTPSERVER%%@*}
43775    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
43776      FTPUSER=${userpwd%%:*}
43777      FTPPWD=${userpwd#*@}
43778      FTPSERVER=${FTPSERVER#*@}
43779    else
43780      FTPUSER=ftp
43781      FTPPWD=ftp
43782    fi
43783    # the "pass" command does not work on some
43784    # ftp clients (read ftp.exe) but if it works,
43785    # passive mode is better!
43786    ( \
43787        echo "user $FTPUSER $FTPPWD"        ; \
43788        echo "pass"                         ; \
43789        echo "bin"                          ; \
43790        echo "get $FTPPATH $tmpfile"              ; \
43791    ) | ftp -in $FTPSERVER
43792  fi
43793  if test "x$VALID_TOOL" != xyes; then
43794    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
43795  fi
43796
43797    mv $tmpfile $installdir/$filename
43798    if test ! -s $installdir/$filename; then
43799      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
43800    fi
43801    case "$extension" in
43802      zip)  echo "Unzipping $installdir/$filename..."
43803        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
43804        ;;
43805      tar.gz) echo "Untaring $installdir/$filename..."
43806        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43807        ;;
43808      tgz) echo "Untaring $installdir/$filename..."
43809        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
43810        ;;
43811      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
43812        ;;
43813    esac
43814  fi
43815  if test -f $installdir/$filename.unpacked; then
43816    depdir=$installdir
43817  fi
43818
43819      fi
43820      # Source the builddeps file again, because in the previous command, the depdir
43821      # was updated to point at the current build dependency install directory.
43822      . $builddepsfile
43823      # Now extract variables from the builddeps.conf files.
43824      theroot=${builddep_cups_ROOT}
43825      thecflags=${builddep_cups_CFLAGS}
43826      thelibs=${builddep_cups_LIBS}
43827      if test "x$depdir" = x; then
43828        as_fn_error $? "Could not download build dependency cups" "$LINENO" 5
43829      fi
43830      CUPS=$depdir
43831      if test "x$theroot" != x; then
43832        CUPS="$theroot"
43833      fi
43834      if test "x$thecflags" != x; then
43835        CUPS_CFLAGS="$thecflags"
43836      fi
43837      if test "x$thelibs" != x; then
43838        CUPS_LIBS="$thelibs"
43839      fi
43840      CUPS_FOUND=yes
43841
43842    fi
43843
43844  fi
43845
43846    fi
43847    if test "x$CUPS_FOUND" = xno; then
43848      # Are the cups headers installed in the default /usr/include location?
43849      for ac_header in cups/cups.h cups/ppd.h
43850do :
43851  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
43852ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
43853if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
43854  cat >>confdefs.h <<_ACEOF
43855#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
43856_ACEOF
43857
43858            CUPS_FOUND=yes
43859            CUPS_CFLAGS=
43860            DEFAULT_CUPS=yes
43861
43862
43863fi
43864
43865done
43866
43867    fi
43868    if test "x$CUPS_FOUND" = xno; then
43869      # Getting nervous now? Lets poke around for standard Solaris third-party
43870      # package installation locations.
43871      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
43872$as_echo_n "checking for cups headers... " >&6; }
43873      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
43874        # An SFW package seems to be installed!
43875        CUPS_FOUND=yes
43876        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
43877      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
43878        # A CSW package seems to be installed!
43879        CUPS_FOUND=yes
43880        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
43881      fi
43882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
43883$as_echo "$CUPS_FOUND" >&6; }
43884    fi
43885    if test "x$CUPS_FOUND" = xno; then
43886
43887  # Print a helpful message on how to acquire the necessary build dependency.
43888  # cups is the help tag: freetype, cups, pulse, alsa etc
43889  MISSING_DEPENDENCY=cups
43890
43891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43892    cygwin_help $MISSING_DEPENDENCY
43893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43894    msys_help $MISSING_DEPENDENCY
43895  else
43896    PKGHANDLER_COMMAND=
43897
43898    case $PKGHANDLER in
43899      apt-get)
43900        apt_help     $MISSING_DEPENDENCY ;;
43901      yum)
43902        yum_help     $MISSING_DEPENDENCY ;;
43903      port)
43904        port_help    $MISSING_DEPENDENCY ;;
43905      pkgutil)
43906        pkgutil_help $MISSING_DEPENDENCY ;;
43907      pkgadd)
43908        pkgadd_help  $MISSING_DEPENDENCY ;;
43909    esac
43910
43911    if test "x$PKGHANDLER_COMMAND" != x; then
43912      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
43913    fi
43914  fi
43915
43916      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
43917    fi
43918  fi
43919
43920
43921
43922
43923
43924
43925  ###############################################################################
43926  #
43927  # The ubiquitous freetype library is used to render fonts.
43928  #
43929
43930# Check whether --with-freetype was given.
43931if test "${with_freetype+set}" = set; then :
43932  withval=$with_freetype;
43933fi
43934
43935
43936# Check whether --with-freetype-include was given.
43937if test "${with_freetype_include+set}" = set; then :
43938  withval=$with_freetype_include;
43939fi
43940
43941
43942# Check whether --with-freetype-lib was given.
43943if test "${with_freetype_lib+set}" = set; then :
43944  withval=$with_freetype_lib;
43945fi
43946
43947  # Check whether --enable-freetype-bundling was given.
43948if test "${enable_freetype_bundling+set}" = set; then :
43949  enableval=$enable_freetype_bundling;
43950fi
43951
43952
43953  FREETYPE_CFLAGS=
43954  FREETYPE_LIBS=
43955  FREETYPE_BUNDLE_LIB_PATH=
43956
43957  if test "x$FREETYPE_NOT_NEEDED" = xyes; then
43958    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43959      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype is ignored" >&5
43960$as_echo "$as_me: WARNING: freetype not used, so --with-freetype is ignored" >&2;}
43961    fi
43962    if test "x$enable_freetype_bundling" != x; then
43963      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
43964$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
43965    fi
43966  else
43967    # freetype is needed to build; go get it!
43968
43969    BUNDLE_FREETYPE="$enable_freetype_bundling"
43970
43971    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
43972      # User has specified settings
43973
43974      if test "x$BUNDLE_FREETYPE" = x; then
43975        # If not specified, default is to bundle freetype
43976        BUNDLE_FREETYPE=yes
43977      fi
43978
43979      if test "x$with_freetype" != x; then
43980        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
43981        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
43982      fi
43983
43984      # Allow --with-freetype-lib and --with-freetype-include to override
43985      if test "x$with_freetype_include" != x; then
43986        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
43987      fi
43988      if test "x$with_freetype_lib" != x; then
43989        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
43990      fi
43991
43992      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
43993        # Okay, we got it. Check that it works.
43994
43995  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
43996  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
43997  METHOD="--with-freetype"
43998
43999  # First check if the files exists.
44000  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44001    # We found an arbitrary include file. That's a good sign.
44002    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44003$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44004    FOUND_FREETYPE=yes
44005
44006    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44007    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44008      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44009$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44010      FOUND_FREETYPE=no
44011    else
44012      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44013        # On Windows, we will need both .lib and .dll file.
44014        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44015          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44016$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44017          FOUND_FREETYPE=no
44018        fi
44019      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44020          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44021        # Found lib in isa dir, use that instead.
44022        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44023      fi
44024    fi
44025  fi
44026
44027  if test "x$FOUND_FREETYPE" = xyes; then
44028
44029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44030
44031  # Input might be given as Windows format, start by converting to
44032  # unix format.
44033  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44034  new_path=`$CYGPATH -u "$path"`
44035
44036  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44037  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44038  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44039  # "foo.exe" is OK but "foo" is an error.
44040  #
44041  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44042  # It is also a way to make sure we got the proper file name for the real test later on.
44043  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44044  if test "x$test_shortpath" = x; then
44045    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44046$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44047    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44048  fi
44049
44050  # Call helper function which possibly converts this using DOS-style short mode.
44051  # If so, the updated path is stored in $new_path.
44052
44053  input_path="$new_path"
44054  # Check if we need to convert this using DOS-style short mode. If the path
44055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44056  # take no chances and rewrite it.
44057  # Note: m4 eats our [], so we need to use [ and ] instead.
44058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44059  if test "x$has_forbidden_chars" != x; then
44060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44061    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44062    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44063    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44064      # Going to short mode and back again did indeed matter. Since short mode is
44065      # case insensitive, let's make it lowercase to improve readability.
44066      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44067      # Now convert it back to Unix-stile (cygpath)
44068      input_path=`$CYGPATH -u "$shortmode_path"`
44069      new_path="$input_path"
44070    fi
44071  fi
44072
44073  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44074  if test "x$test_cygdrive_prefix" = x; then
44075    # As a simple fix, exclude /usr/bin since it's not a real path.
44076    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44077      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44078      # a path prefixed by /cygdrive for fixpath to work.
44079      new_path="$CYGWIN_ROOT_PATH$input_path"
44080    fi
44081  fi
44082
44083
44084  if test "x$path" != "x$new_path"; then
44085    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44086    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44087$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44088  fi
44089
44090  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44091
44092  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44093  has_colon=`$ECHO $path | $GREP ^.:`
44094  new_path="$path"
44095  if test "x$has_colon" = x; then
44096    # Not in mixed or Windows style, start by that.
44097    new_path=`cmd //c echo $path`
44098  fi
44099
44100
44101  input_path="$new_path"
44102  # Check if we need to convert this using DOS-style short mode. If the path
44103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44104  # take no chances and rewrite it.
44105  # Note: m4 eats our [], so we need to use [ and ] instead.
44106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44107  if test "x$has_forbidden_chars" != x; then
44108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44109    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44110  fi
44111
44112
44113  windows_path="$new_path"
44114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44115    unix_path=`$CYGPATH -u "$windows_path"`
44116    new_path="$unix_path"
44117  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44118    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44119    new_path="$unix_path"
44120  fi
44121
44122  if test "x$path" != "x$new_path"; then
44123    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44125$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44126  fi
44127
44128  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44129  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44130
44131  else
44132    # We're on a posix platform. Hooray! :)
44133    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44134    has_space=`$ECHO "$path" | $GREP " "`
44135    if test "x$has_space" != x; then
44136      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44137$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44138      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44139    fi
44140
44141    # Use eval to expand a potential ~
44142    eval path="$path"
44143    if test ! -f "$path" && test ! -d "$path"; then
44144      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44145    fi
44146
44147    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44148  fi
44149
44150
44151  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44152
44153  # Input might be given as Windows format, start by converting to
44154  # unix format.
44155  path="$POTENTIAL_FREETYPE_LIB_PATH"
44156  new_path=`$CYGPATH -u "$path"`
44157
44158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44161  # "foo.exe" is OK but "foo" is an error.
44162  #
44163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44164  # It is also a way to make sure we got the proper file name for the real test later on.
44165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44166  if test "x$test_shortpath" = x; then
44167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44170  fi
44171
44172  # Call helper function which possibly converts this using DOS-style short mode.
44173  # If so, the updated path is stored in $new_path.
44174
44175  input_path="$new_path"
44176  # Check if we need to convert this using DOS-style short mode. If the path
44177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44178  # take no chances and rewrite it.
44179  # Note: m4 eats our [], so we need to use [ and ] instead.
44180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44181  if test "x$has_forbidden_chars" != x; then
44182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44186      # Going to short mode and back again did indeed matter. Since short mode is
44187      # case insensitive, let's make it lowercase to improve readability.
44188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44189      # Now convert it back to Unix-stile (cygpath)
44190      input_path=`$CYGPATH -u "$shortmode_path"`
44191      new_path="$input_path"
44192    fi
44193  fi
44194
44195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44196  if test "x$test_cygdrive_prefix" = x; then
44197    # As a simple fix, exclude /usr/bin since it's not a real path.
44198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44200      # a path prefixed by /cygdrive for fixpath to work.
44201      new_path="$CYGWIN_ROOT_PATH$input_path"
44202    fi
44203  fi
44204
44205
44206  if test "x$path" != "x$new_path"; then
44207    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44210  fi
44211
44212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44213
44214  path="$POTENTIAL_FREETYPE_LIB_PATH"
44215  has_colon=`$ECHO $path | $GREP ^.:`
44216  new_path="$path"
44217  if test "x$has_colon" = x; then
44218    # Not in mixed or Windows style, start by that.
44219    new_path=`cmd //c echo $path`
44220  fi
44221
44222
44223  input_path="$new_path"
44224  # Check if we need to convert this using DOS-style short mode. If the path
44225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44226  # take no chances and rewrite it.
44227  # Note: m4 eats our [], so we need to use [ and ] instead.
44228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44229  if test "x$has_forbidden_chars" != x; then
44230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44232  fi
44233
44234
44235  windows_path="$new_path"
44236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44237    unix_path=`$CYGPATH -u "$windows_path"`
44238    new_path="$unix_path"
44239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44241    new_path="$unix_path"
44242  fi
44243
44244  if test "x$path" != "x$new_path"; then
44245    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44248  fi
44249
44250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44252
44253  else
44254    # We're on a posix platform. Hooray! :)
44255    path="$POTENTIAL_FREETYPE_LIB_PATH"
44256    has_space=`$ECHO "$path" | $GREP " "`
44257    if test "x$has_space" != x; then
44258      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44260      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44261    fi
44262
44263    # Use eval to expand a potential ~
44264    eval path="$path"
44265    if test ! -f "$path" && test ! -d "$path"; then
44266      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44267    fi
44268
44269    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44270  fi
44271
44272
44273    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44274    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44275$as_echo_n "checking for freetype includes... " >&6; }
44276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44277$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44278    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44279    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44280$as_echo_n "checking for freetype libraries... " >&6; }
44281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44282$as_echo "$FREETYPE_LIB_PATH" >&6; }
44283  fi
44284
44285        if test "x$FOUND_FREETYPE" != xyes; then
44286          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
44287        fi
44288      else
44289        # User specified only one of lib or include. This is an error.
44290        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
44291          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
44292$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
44293          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44294        else
44295          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
44296$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
44297          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
44298        fi
44299      fi
44300    else
44301      # User did not specify settings, but we need freetype. Try to locate it.
44302
44303      if test "x$BUNDLE_FREETYPE" = x; then
44304        # If not specified, default is to bundle freetype only on windows
44305        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44306          BUNDLE_FREETYPE=yes
44307        else
44308          BUNDLE_FREETYPE=no
44309        fi
44310      fi
44311
44312      if test "x$FOUND_FREETYPE" != xyes; then
44313        # Check builddeps
44314
44315
44316  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
44317    # Source the builddeps file again, to make sure it uses the latest variables!
44318    . $builddepsfile
44319    # Look for a target and build machine specific resource!
44320    eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
44321    if test "x$resource" = x; then
44322      # Ok, lets instead look for a target specific resource
44323      eval resource=\${builddep_freetype2_TARGET_${rewritten_target_var}}
44324    fi
44325    if test "x$resource" = x; then
44326      # Ok, lets instead look for a build specific resource
44327      eval resource=\${builddep_freetype2_BUILD_${rewritten_build_var}}
44328    fi
44329    if test "x$resource" = x; then
44330      # Ok, lets instead look for a generic resource
44331      # (The freetype2 comes from M4 and not the shell, thus no need for eval here.)
44332      resource=${builddep_freetype2}
44333    fi
44334    if test "x$resource" != x; then
44335      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for freetype2" >&5
44336$as_echo "$as_me: Using builddeps $resource for freetype2" >&6;}
44337      # If the resource in the builddeps.conf file is an existing directory,
44338      # for example /java/linux/cups
44339      if test -d ${resource}; then
44340        depdir=${resource}
44341      else
44342
44343  # freetype2 is for example mymodule
44344  # $resource is for example libs/general/libmymod_1_2_3.zip
44345  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
44346  # $with_builddeps_dir is for example /localhome/builddeps
44347  # depdir is the name of the variable into which we store the depdir, eg MYMOD
44348  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
44349  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
44350  filename=`basename $resource`
44351  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
44352  filebase=${filename%%.*}
44353  extension=${filename#*.}
44354  installdir=$with_builddeps_dir/$filebase
44355  if test ! -f $installdir/$filename.unpacked; then
44356    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&5
44357$as_echo "$as_me: Downloading build dependency freetype2 from $with_builddeps_server/$resource and installing into $installdir" >&6;}
44358    if test ! -d $installdir; then
44359      mkdir -p $installdir
44360    fi
44361    if test ! -d $installdir; then
44362      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
44363    fi
44364    tmpfile=`mktemp $installdir/freetype2.XXXXXXXXX`
44365    touch $tmpfile
44366    if test ! -f $tmpfile; then
44367      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
44368    fi
44369
44370  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
44371  # $tmpfile is the local file name for the downloaded file.
44372  VALID_TOOL=no
44373  if test "x$BDEPS_FTP" = xwget; then
44374    VALID_TOOL=yes
44375    wget -O $tmpfile $with_builddeps_server/$resource
44376  fi
44377  if test "x$BDEPS_FTP" = xlftp; then
44378    VALID_TOOL=yes
44379    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
44380  fi
44381  if test "x$BDEPS_FTP" = xftp; then
44382    VALID_TOOL=yes
44383    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
44384    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
44385    FTPUSERPWD=${FTPSERVER%%@*}
44386    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
44387      FTPUSER=${userpwd%%:*}
44388      FTPPWD=${userpwd#*@}
44389      FTPSERVER=${FTPSERVER#*@}
44390    else
44391      FTPUSER=ftp
44392      FTPPWD=ftp
44393    fi
44394    # the "pass" command does not work on some
44395    # ftp clients (read ftp.exe) but if it works,
44396    # passive mode is better!
44397    ( \
44398        echo "user $FTPUSER $FTPPWD"        ; \
44399        echo "pass"                         ; \
44400        echo "bin"                          ; \
44401        echo "get $FTPPATH $tmpfile"              ; \
44402    ) | ftp -in $FTPSERVER
44403  fi
44404  if test "x$VALID_TOOL" != xyes; then
44405    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
44406  fi
44407
44408    mv $tmpfile $installdir/$filename
44409    if test ! -s $installdir/$filename; then
44410      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
44411    fi
44412    case "$extension" in
44413      zip)  echo "Unzipping $installdir/$filename..."
44414        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
44415        ;;
44416      tar.gz) echo "Untaring $installdir/$filename..."
44417        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44418        ;;
44419      tgz) echo "Untaring $installdir/$filename..."
44420        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
44421        ;;
44422      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
44423        ;;
44424    esac
44425  fi
44426  if test -f $installdir/$filename.unpacked; then
44427    depdir=$installdir
44428  fi
44429
44430      fi
44431      # Source the builddeps file again, because in the previous command, the depdir
44432      # was updated to point at the current build dependency install directory.
44433      . $builddepsfile
44434      # Now extract variables from the builddeps.conf files.
44435      theroot=${builddep_freetype2_ROOT}
44436      thecflags=${builddep_freetype2_CFLAGS}
44437      thelibs=${builddep_freetype2_LIBS}
44438      if test "x$depdir" = x; then
44439        as_fn_error $? "Could not download build dependency freetype2" "$LINENO" 5
44440      fi
44441      FREETYPE=$depdir
44442      if test "x$theroot" != x; then
44443        FREETYPE="$theroot"
44444      fi
44445      if test "x$thecflags" != x; then
44446        FREETYPE_CFLAGS="$thecflags"
44447      fi
44448      if test "x$thelibs" != x; then
44449        FREETYPE_LIBS="$thelibs"
44450      fi
44451      FOUND_FREETYPE=yes
44452      else FOUND_FREETYPE=no
44453
44454    fi
44455    else FOUND_FREETYPE=no
44456
44457  fi
44458
44459        # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44460        if test "x$FOUND_FREETYPE" = xyes; then
44461          if test "x$BUNDLE_FREETYPE" = xyes; then
44462            { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using builddeps, but ignoring since we can not bundle that" >&5
44463$as_echo "$as_me: Found freetype using builddeps, but ignoring since we can not bundle that" >&6;}
44464            FOUND_FREETYPE=no
44465          else
44466            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44467$as_echo_n "checking for freetype... " >&6; }
44468            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using builddeps)" >&5
44469$as_echo "yes (using builddeps)" >&6; }
44470          fi
44471        fi
44472      fi
44473
44474      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
44475      if test "x$SYSROOT" = x; then
44476        if test "x$FOUND_FREETYPE" != xyes; then
44477          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
44478          if test "x$PKG_CONFIG" != x; then
44479
44480pkg_failed=no
44481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
44482$as_echo_n "checking for FREETYPE... " >&6; }
44483
44484if test -n "$FREETYPE_CFLAGS"; then
44485    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
44486 elif test -n "$PKG_CONFIG"; then
44487    if test -n "$PKG_CONFIG" && \
44488    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44489  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44490  ac_status=$?
44491  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44492  test $ac_status = 0; }; then
44493  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
44494else
44495  pkg_failed=yes
44496fi
44497 else
44498    pkg_failed=untried
44499fi
44500if test -n "$FREETYPE_LIBS"; then
44501    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
44502 elif test -n "$PKG_CONFIG"; then
44503    if test -n "$PKG_CONFIG" && \
44504    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
44505  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
44506  ac_status=$?
44507  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
44508  test $ac_status = 0; }; then
44509  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
44510else
44511  pkg_failed=yes
44512fi
44513 else
44514    pkg_failed=untried
44515fi
44516
44517
44518
44519if test $pkg_failed = yes; then
44520
44521if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
44522        _pkg_short_errors_supported=yes
44523else
44524        _pkg_short_errors_supported=no
44525fi
44526        if test $_pkg_short_errors_supported = yes; then
44527	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
44528        else
44529	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
44530        fi
44531	# Put the nasty error message in config.log where it belongs
44532	echo "$FREETYPE_PKG_ERRORS" >&5
44533
44534	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44535$as_echo "no" >&6; }
44536                FOUND_FREETYPE=no
44537elif test $pkg_failed = untried; then
44538	FOUND_FREETYPE=no
44539else
44540	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
44541	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
44542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
44543$as_echo "yes" >&6; }
44544	FOUND_FREETYPE=yes
44545fi
44546            if test "x$FOUND_FREETYPE" = xyes; then
44547              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
44548              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
44549              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
44550              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
44551                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
44552              fi
44553              # BDEPS_CHECK_MODULE will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
44554              if test "x$BUNDLE_FREETYPE" = xyes; then
44555                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
44556$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
44557                FOUND_FREETYPE=no
44558              else
44559                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
44560$as_echo_n "checking for freetype... " >&6; }
44561                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
44562$as_echo "yes (using pkg-config)" >&6; }
44563              fi
44564            fi
44565          fi
44566        fi
44567      fi
44568
44569      if test "x$FOUND_FREETYPE" != xyes; then
44570        # Check in well-known locations
44571        if test "x$OPENJDK_TARGET_OS" = xwindows; then
44572          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
44573
44574  windows_path="$FREETYPE_BASE_DIR"
44575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44576    unix_path=`$CYGPATH -u "$windows_path"`
44577    FREETYPE_BASE_DIR="$unix_path"
44578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44580    FREETYPE_BASE_DIR="$unix_path"
44581  fi
44582
44583
44584  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44585  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44586  METHOD="well-known location"
44587
44588  # First check if the files exists.
44589  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44590    # We found an arbitrary include file. That's a good sign.
44591    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44592$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44593    FOUND_FREETYPE=yes
44594
44595    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44596    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44597      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44598$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44599      FOUND_FREETYPE=no
44600    else
44601      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44602        # On Windows, we will need both .lib and .dll file.
44603        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44604          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44605$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44606          FOUND_FREETYPE=no
44607        fi
44608      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44610        # Found lib in isa dir, use that instead.
44611        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44612      fi
44613    fi
44614  fi
44615
44616  if test "x$FOUND_FREETYPE" = xyes; then
44617
44618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44619
44620  # Input might be given as Windows format, start by converting to
44621  # unix format.
44622  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44623  new_path=`$CYGPATH -u "$path"`
44624
44625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44628  # "foo.exe" is OK but "foo" is an error.
44629  #
44630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44631  # It is also a way to make sure we got the proper file name for the real test later on.
44632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44633  if test "x$test_shortpath" = x; then
44634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44635$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44636    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44637  fi
44638
44639  # Call helper function which possibly converts this using DOS-style short mode.
44640  # If so, the updated path is stored in $new_path.
44641
44642  input_path="$new_path"
44643  # Check if we need to convert this using DOS-style short mode. If the path
44644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44645  # take no chances and rewrite it.
44646  # Note: m4 eats our [], so we need to use [ and ] instead.
44647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44648  if test "x$has_forbidden_chars" != x; then
44649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44653      # Going to short mode and back again did indeed matter. Since short mode is
44654      # case insensitive, let's make it lowercase to improve readability.
44655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44656      # Now convert it back to Unix-stile (cygpath)
44657      input_path=`$CYGPATH -u "$shortmode_path"`
44658      new_path="$input_path"
44659    fi
44660  fi
44661
44662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44663  if test "x$test_cygdrive_prefix" = x; then
44664    # As a simple fix, exclude /usr/bin since it's not a real path.
44665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44667      # a path prefixed by /cygdrive for fixpath to work.
44668      new_path="$CYGWIN_ROOT_PATH$input_path"
44669    fi
44670  fi
44671
44672
44673  if test "x$path" != "x$new_path"; then
44674    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44676$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44677  fi
44678
44679  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44680
44681  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44682  has_colon=`$ECHO $path | $GREP ^.:`
44683  new_path="$path"
44684  if test "x$has_colon" = x; then
44685    # Not in mixed or Windows style, start by that.
44686    new_path=`cmd //c echo $path`
44687  fi
44688
44689
44690  input_path="$new_path"
44691  # Check if we need to convert this using DOS-style short mode. If the path
44692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44693  # take no chances and rewrite it.
44694  # Note: m4 eats our [], so we need to use [ and ] instead.
44695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44696  if test "x$has_forbidden_chars" != x; then
44697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44699  fi
44700
44701
44702  windows_path="$new_path"
44703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44704    unix_path=`$CYGPATH -u "$windows_path"`
44705    new_path="$unix_path"
44706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44708    new_path="$unix_path"
44709  fi
44710
44711  if test "x$path" != "x$new_path"; then
44712    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44714$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44715  fi
44716
44717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44719
44720  else
44721    # We're on a posix platform. Hooray! :)
44722    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44723    has_space=`$ECHO "$path" | $GREP " "`
44724    if test "x$has_space" != x; then
44725      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44726$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44727      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44728    fi
44729
44730    # Use eval to expand a potential ~
44731    eval path="$path"
44732    if test ! -f "$path" && test ! -d "$path"; then
44733      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44734    fi
44735
44736    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
44737  fi
44738
44739
44740  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44741
44742  # Input might be given as Windows format, start by converting to
44743  # unix format.
44744  path="$POTENTIAL_FREETYPE_LIB_PATH"
44745  new_path=`$CYGPATH -u "$path"`
44746
44747  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44748  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44749  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44750  # "foo.exe" is OK but "foo" is an error.
44751  #
44752  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44753  # It is also a way to make sure we got the proper file name for the real test later on.
44754  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44755  if test "x$test_shortpath" = x; then
44756    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44757$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44758    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
44759  fi
44760
44761  # Call helper function which possibly converts this using DOS-style short mode.
44762  # If so, the updated path is stored in $new_path.
44763
44764  input_path="$new_path"
44765  # Check if we need to convert this using DOS-style short mode. If the path
44766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44767  # take no chances and rewrite it.
44768  # Note: m4 eats our [], so we need to use [ and ] instead.
44769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44770  if test "x$has_forbidden_chars" != x; then
44771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44772    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44773    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44774    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44775      # Going to short mode and back again did indeed matter. Since short mode is
44776      # case insensitive, let's make it lowercase to improve readability.
44777      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44778      # Now convert it back to Unix-stile (cygpath)
44779      input_path=`$CYGPATH -u "$shortmode_path"`
44780      new_path="$input_path"
44781    fi
44782  fi
44783
44784  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44785  if test "x$test_cygdrive_prefix" = x; then
44786    # As a simple fix, exclude /usr/bin since it's not a real path.
44787    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44788      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44789      # a path prefixed by /cygdrive for fixpath to work.
44790      new_path="$CYGWIN_ROOT_PATH$input_path"
44791    fi
44792  fi
44793
44794
44795  if test "x$path" != "x$new_path"; then
44796    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44797    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44798$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44799  fi
44800
44801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44802
44803  path="$POTENTIAL_FREETYPE_LIB_PATH"
44804  has_colon=`$ECHO $path | $GREP ^.:`
44805  new_path="$path"
44806  if test "x$has_colon" = x; then
44807    # Not in mixed or Windows style, start by that.
44808    new_path=`cmd //c echo $path`
44809  fi
44810
44811
44812  input_path="$new_path"
44813  # Check if we need to convert this using DOS-style short mode. If the path
44814  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44815  # take no chances and rewrite it.
44816  # Note: m4 eats our [], so we need to use [ and ] instead.
44817  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44818  if test "x$has_forbidden_chars" != x; then
44819    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44820    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44821  fi
44822
44823
44824  windows_path="$new_path"
44825  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44826    unix_path=`$CYGPATH -u "$windows_path"`
44827    new_path="$unix_path"
44828  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44829    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44830    new_path="$unix_path"
44831  fi
44832
44833  if test "x$path" != "x$new_path"; then
44834    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
44835    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
44836$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
44837  fi
44838
44839  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44840  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44841
44842  else
44843    # We're on a posix platform. Hooray! :)
44844    path="$POTENTIAL_FREETYPE_LIB_PATH"
44845    has_space=`$ECHO "$path" | $GREP " "`
44846    if test "x$has_space" != x; then
44847      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
44848$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
44849      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44850    fi
44851
44852    # Use eval to expand a potential ~
44853    eval path="$path"
44854    if test ! -f "$path" && test ! -d "$path"; then
44855      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
44856    fi
44857
44858    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
44859  fi
44860
44861
44862    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44863    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
44864$as_echo_n "checking for freetype includes... " >&6; }
44865    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
44866$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
44867    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
44868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
44869$as_echo_n "checking for freetype libraries... " >&6; }
44870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
44871$as_echo "$FREETYPE_LIB_PATH" >&6; }
44872  fi
44873
44874          if test "x$FOUND_FREETYPE" != xyes; then
44875            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
44876
44877  windows_path="$FREETYPE_BASE_DIR"
44878  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44879    unix_path=`$CYGPATH -u "$windows_path"`
44880    FREETYPE_BASE_DIR="$unix_path"
44881  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44882    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44883    FREETYPE_BASE_DIR="$unix_path"
44884  fi
44885
44886
44887  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
44888  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
44889  METHOD="well-known location"
44890
44891  # First check if the files exists.
44892  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
44893    # We found an arbitrary include file. That's a good sign.
44894    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
44895$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
44896    FOUND_FREETYPE=yes
44897
44898    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
44899    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
44900      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
44901$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
44902      FOUND_FREETYPE=no
44903    else
44904      if test "x$OPENJDK_TARGET_OS" = xwindows; then
44905        # On Windows, we will need both .lib and .dll file.
44906        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
44907          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
44908$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
44909          FOUND_FREETYPE=no
44910        fi
44911      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
44912          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
44913        # Found lib in isa dir, use that instead.
44914        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
44915      fi
44916    fi
44917  fi
44918
44919  if test "x$FOUND_FREETYPE" = xyes; then
44920
44921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44922
44923  # Input might be given as Windows format, start by converting to
44924  # unix format.
44925  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44926  new_path=`$CYGPATH -u "$path"`
44927
44928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44931  # "foo.exe" is OK but "foo" is an error.
44932  #
44933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44934  # It is also a way to make sure we got the proper file name for the real test later on.
44935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44936  if test "x$test_shortpath" = x; then
44937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
44938$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
44939    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
44940  fi
44941
44942  # Call helper function which possibly converts this using DOS-style short mode.
44943  # If so, the updated path is stored in $new_path.
44944
44945  input_path="$new_path"
44946  # Check if we need to convert this using DOS-style short mode. If the path
44947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44948  # take no chances and rewrite it.
44949  # Note: m4 eats our [], so we need to use [ and ] instead.
44950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44951  if test "x$has_forbidden_chars" != x; then
44952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44956      # Going to short mode and back again did indeed matter. Since short mode is
44957      # case insensitive, let's make it lowercase to improve readability.
44958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44959      # Now convert it back to Unix-stile (cygpath)
44960      input_path=`$CYGPATH -u "$shortmode_path"`
44961      new_path="$input_path"
44962    fi
44963  fi
44964
44965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44966  if test "x$test_cygdrive_prefix" = x; then
44967    # As a simple fix, exclude /usr/bin since it's not a real path.
44968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44970      # a path prefixed by /cygdrive for fixpath to work.
44971      new_path="$CYGWIN_ROOT_PATH$input_path"
44972    fi
44973  fi
44974
44975
44976  if test "x$path" != "x$new_path"; then
44977    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
44978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
44979$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
44980  fi
44981
44982  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44983
44984  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
44985  has_colon=`$ECHO $path | $GREP ^.:`
44986  new_path="$path"
44987  if test "x$has_colon" = x; then
44988    # Not in mixed or Windows style, start by that.
44989    new_path=`cmd //c echo $path`
44990  fi
44991
44992
44993  input_path="$new_path"
44994  # Check if we need to convert this using DOS-style short mode. If the path
44995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44996  # take no chances and rewrite it.
44997  # Note: m4 eats our [], so we need to use [ and ] instead.
44998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44999  if test "x$has_forbidden_chars" != x; then
45000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45002  fi
45003
45004
45005  windows_path="$new_path"
45006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45007    unix_path=`$CYGPATH -u "$windows_path"`
45008    new_path="$unix_path"
45009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45011    new_path="$unix_path"
45012  fi
45013
45014  if test "x$path" != "x$new_path"; then
45015    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45017$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45018  fi
45019
45020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45022
45023  else
45024    # We're on a posix platform. Hooray! :)
45025    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45026    has_space=`$ECHO "$path" | $GREP " "`
45027    if test "x$has_space" != x; then
45028      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45029$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45030      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45031    fi
45032
45033    # Use eval to expand a potential ~
45034    eval path="$path"
45035    if test ! -f "$path" && test ! -d "$path"; then
45036      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45037    fi
45038
45039    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45040  fi
45041
45042
45043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45044
45045  # Input might be given as Windows format, start by converting to
45046  # unix format.
45047  path="$POTENTIAL_FREETYPE_LIB_PATH"
45048  new_path=`$CYGPATH -u "$path"`
45049
45050  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45051  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45052  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45053  # "foo.exe" is OK but "foo" is an error.
45054  #
45055  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45056  # It is also a way to make sure we got the proper file name for the real test later on.
45057  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45058  if test "x$test_shortpath" = x; then
45059    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45060$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45061    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45062  fi
45063
45064  # Call helper function which possibly converts this using DOS-style short mode.
45065  # If so, the updated path is stored in $new_path.
45066
45067  input_path="$new_path"
45068  # Check if we need to convert this using DOS-style short mode. If the path
45069  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45070  # take no chances and rewrite it.
45071  # Note: m4 eats our [], so we need to use [ and ] instead.
45072  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45073  if test "x$has_forbidden_chars" != x; then
45074    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45075    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45076    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45077    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45078      # Going to short mode and back again did indeed matter. Since short mode is
45079      # case insensitive, let's make it lowercase to improve readability.
45080      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45081      # Now convert it back to Unix-stile (cygpath)
45082      input_path=`$CYGPATH -u "$shortmode_path"`
45083      new_path="$input_path"
45084    fi
45085  fi
45086
45087  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45088  if test "x$test_cygdrive_prefix" = x; then
45089    # As a simple fix, exclude /usr/bin since it's not a real path.
45090    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45091      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45092      # a path prefixed by /cygdrive for fixpath to work.
45093      new_path="$CYGWIN_ROOT_PATH$input_path"
45094    fi
45095  fi
45096
45097
45098  if test "x$path" != "x$new_path"; then
45099    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45100    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45101$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45102  fi
45103
45104  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45105
45106  path="$POTENTIAL_FREETYPE_LIB_PATH"
45107  has_colon=`$ECHO $path | $GREP ^.:`
45108  new_path="$path"
45109  if test "x$has_colon" = x; then
45110    # Not in mixed or Windows style, start by that.
45111    new_path=`cmd //c echo $path`
45112  fi
45113
45114
45115  input_path="$new_path"
45116  # Check if we need to convert this using DOS-style short mode. If the path
45117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45118  # take no chances and rewrite it.
45119  # Note: m4 eats our [], so we need to use [ and ] instead.
45120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45121  if test "x$has_forbidden_chars" != x; then
45122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45124  fi
45125
45126
45127  windows_path="$new_path"
45128  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45129    unix_path=`$CYGPATH -u "$windows_path"`
45130    new_path="$unix_path"
45131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45132    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45133    new_path="$unix_path"
45134  fi
45135
45136  if test "x$path" != "x$new_path"; then
45137    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45138    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45139$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45140  fi
45141
45142  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45143  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45144
45145  else
45146    # We're on a posix platform. Hooray! :)
45147    path="$POTENTIAL_FREETYPE_LIB_PATH"
45148    has_space=`$ECHO "$path" | $GREP " "`
45149    if test "x$has_space" != x; then
45150      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45151$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45152      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45153    fi
45154
45155    # Use eval to expand a potential ~
45156    eval path="$path"
45157    if test ! -f "$path" && test ! -d "$path"; then
45158      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45159    fi
45160
45161    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45162  fi
45163
45164
45165    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45166    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45167$as_echo_n "checking for freetype includes... " >&6; }
45168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45169$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45170    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45171    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45172$as_echo_n "checking for freetype libraries... " >&6; }
45173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45174$as_echo "$FREETYPE_LIB_PATH" >&6; }
45175  fi
45176
45177          fi
45178        else
45179          FREETYPE_BASE_DIR="$SYSROOT/usr"
45180
45181  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45182  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45183  METHOD="well-known location"
45184
45185  # First check if the files exists.
45186  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45187    # We found an arbitrary include file. That's a good sign.
45188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45189$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45190    FOUND_FREETYPE=yes
45191
45192    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45193    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45194      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45195$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45196      FOUND_FREETYPE=no
45197    else
45198      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45199        # On Windows, we will need both .lib and .dll file.
45200        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45201          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45202$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45203          FOUND_FREETYPE=no
45204        fi
45205      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45206          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45207        # Found lib in isa dir, use that instead.
45208        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45209      fi
45210    fi
45211  fi
45212
45213  if test "x$FOUND_FREETYPE" = xyes; then
45214
45215  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45216
45217  # Input might be given as Windows format, start by converting to
45218  # unix format.
45219  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45220  new_path=`$CYGPATH -u "$path"`
45221
45222  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45223  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45224  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45225  # "foo.exe" is OK but "foo" is an error.
45226  #
45227  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45228  # It is also a way to make sure we got the proper file name for the real test later on.
45229  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45230  if test "x$test_shortpath" = x; then
45231    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45232$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45233    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45234  fi
45235
45236  # Call helper function which possibly converts this using DOS-style short mode.
45237  # If so, the updated path is stored in $new_path.
45238
45239  input_path="$new_path"
45240  # Check if we need to convert this using DOS-style short mode. If the path
45241  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45242  # take no chances and rewrite it.
45243  # Note: m4 eats our [], so we need to use [ and ] instead.
45244  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45245  if test "x$has_forbidden_chars" != x; then
45246    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45247    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45248    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45249    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45250      # Going to short mode and back again did indeed matter. Since short mode is
45251      # case insensitive, let's make it lowercase to improve readability.
45252      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45253      # Now convert it back to Unix-stile (cygpath)
45254      input_path=`$CYGPATH -u "$shortmode_path"`
45255      new_path="$input_path"
45256    fi
45257  fi
45258
45259  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45260  if test "x$test_cygdrive_prefix" = x; then
45261    # As a simple fix, exclude /usr/bin since it's not a real path.
45262    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45263      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45264      # a path prefixed by /cygdrive for fixpath to work.
45265      new_path="$CYGWIN_ROOT_PATH$input_path"
45266    fi
45267  fi
45268
45269
45270  if test "x$path" != "x$new_path"; then
45271    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45272    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45273$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45274  fi
45275
45276  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45277
45278  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45279  has_colon=`$ECHO $path | $GREP ^.:`
45280  new_path="$path"
45281  if test "x$has_colon" = x; then
45282    # Not in mixed or Windows style, start by that.
45283    new_path=`cmd //c echo $path`
45284  fi
45285
45286
45287  input_path="$new_path"
45288  # Check if we need to convert this using DOS-style short mode. If the path
45289  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45290  # take no chances and rewrite it.
45291  # Note: m4 eats our [], so we need to use [ and ] instead.
45292  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45293  if test "x$has_forbidden_chars" != x; then
45294    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45295    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45296  fi
45297
45298
45299  windows_path="$new_path"
45300  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45301    unix_path=`$CYGPATH -u "$windows_path"`
45302    new_path="$unix_path"
45303  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45304    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45305    new_path="$unix_path"
45306  fi
45307
45308  if test "x$path" != "x$new_path"; then
45309    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45310    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45311$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45312  fi
45313
45314  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45315  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45316
45317  else
45318    # We're on a posix platform. Hooray! :)
45319    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45320    has_space=`$ECHO "$path" | $GREP " "`
45321    if test "x$has_space" != x; then
45322      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45323$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45324      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45325    fi
45326
45327    # Use eval to expand a potential ~
45328    eval path="$path"
45329    if test ! -f "$path" && test ! -d "$path"; then
45330      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45331    fi
45332
45333    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45334  fi
45335
45336
45337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45338
45339  # Input might be given as Windows format, start by converting to
45340  # unix format.
45341  path="$POTENTIAL_FREETYPE_LIB_PATH"
45342  new_path=`$CYGPATH -u "$path"`
45343
45344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45347  # "foo.exe" is OK but "foo" is an error.
45348  #
45349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45350  # It is also a way to make sure we got the proper file name for the real test later on.
45351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45352  if test "x$test_shortpath" = x; then
45353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45354$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45355    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45356  fi
45357
45358  # Call helper function which possibly converts this using DOS-style short mode.
45359  # If so, the updated path is stored in $new_path.
45360
45361  input_path="$new_path"
45362  # Check if we need to convert this using DOS-style short mode. If the path
45363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45364  # take no chances and rewrite it.
45365  # Note: m4 eats our [], so we need to use [ and ] instead.
45366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45367  if test "x$has_forbidden_chars" != x; then
45368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45372      # Going to short mode and back again did indeed matter. Since short mode is
45373      # case insensitive, let's make it lowercase to improve readability.
45374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45375      # Now convert it back to Unix-stile (cygpath)
45376      input_path=`$CYGPATH -u "$shortmode_path"`
45377      new_path="$input_path"
45378    fi
45379  fi
45380
45381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45382  if test "x$test_cygdrive_prefix" = x; then
45383    # As a simple fix, exclude /usr/bin since it's not a real path.
45384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45386      # a path prefixed by /cygdrive for fixpath to work.
45387      new_path="$CYGWIN_ROOT_PATH$input_path"
45388    fi
45389  fi
45390
45391
45392  if test "x$path" != "x$new_path"; then
45393    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45395$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45396  fi
45397
45398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45399
45400  path="$POTENTIAL_FREETYPE_LIB_PATH"
45401  has_colon=`$ECHO $path | $GREP ^.:`
45402  new_path="$path"
45403  if test "x$has_colon" = x; then
45404    # Not in mixed or Windows style, start by that.
45405    new_path=`cmd //c echo $path`
45406  fi
45407
45408
45409  input_path="$new_path"
45410  # Check if we need to convert this using DOS-style short mode. If the path
45411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45412  # take no chances and rewrite it.
45413  # Note: m4 eats our [], so we need to use [ and ] instead.
45414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45415  if test "x$has_forbidden_chars" != x; then
45416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45418  fi
45419
45420
45421  windows_path="$new_path"
45422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45423    unix_path=`$CYGPATH -u "$windows_path"`
45424    new_path="$unix_path"
45425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45427    new_path="$unix_path"
45428  fi
45429
45430  if test "x$path" != "x$new_path"; then
45431    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45433$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45434  fi
45435
45436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45438
45439  else
45440    # We're on a posix platform. Hooray! :)
45441    path="$POTENTIAL_FREETYPE_LIB_PATH"
45442    has_space=`$ECHO "$path" | $GREP " "`
45443    if test "x$has_space" != x; then
45444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45445$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45446      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45447    fi
45448
45449    # Use eval to expand a potential ~
45450    eval path="$path"
45451    if test ! -f "$path" && test ! -d "$path"; then
45452      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45453    fi
45454
45455    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45456  fi
45457
45458
45459    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45460    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45461$as_echo_n "checking for freetype includes... " >&6; }
45462    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45463$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45464    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45466$as_echo_n "checking for freetype libraries... " >&6; }
45467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45468$as_echo "$FREETYPE_LIB_PATH" >&6; }
45469  fi
45470
45471
45472          if test "x$FOUND_FREETYPE" != xyes; then
45473            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
45474
45475  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45476  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45477  METHOD="well-known location"
45478
45479  # First check if the files exists.
45480  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45481    # We found an arbitrary include file. That's a good sign.
45482    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45483$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45484    FOUND_FREETYPE=yes
45485
45486    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45487    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45488      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45489$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45490      FOUND_FREETYPE=no
45491    else
45492      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45493        # On Windows, we will need both .lib and .dll file.
45494        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45495          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45496$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45497          FOUND_FREETYPE=no
45498        fi
45499      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45501        # Found lib in isa dir, use that instead.
45502        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45503      fi
45504    fi
45505  fi
45506
45507  if test "x$FOUND_FREETYPE" = xyes; then
45508
45509  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45510
45511  # Input might be given as Windows format, start by converting to
45512  # unix format.
45513  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45514  new_path=`$CYGPATH -u "$path"`
45515
45516  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45517  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45518  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45519  # "foo.exe" is OK but "foo" is an error.
45520  #
45521  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45522  # It is also a way to make sure we got the proper file name for the real test later on.
45523  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45524  if test "x$test_shortpath" = x; then
45525    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45526$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45527    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45528  fi
45529
45530  # Call helper function which possibly converts this using DOS-style short mode.
45531  # If so, the updated path is stored in $new_path.
45532
45533  input_path="$new_path"
45534  # Check if we need to convert this using DOS-style short mode. If the path
45535  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45536  # take no chances and rewrite it.
45537  # Note: m4 eats our [], so we need to use [ and ] instead.
45538  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45539  if test "x$has_forbidden_chars" != x; then
45540    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45541    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45542    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45543    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45544      # Going to short mode and back again did indeed matter. Since short mode is
45545      # case insensitive, let's make it lowercase to improve readability.
45546      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45547      # Now convert it back to Unix-stile (cygpath)
45548      input_path=`$CYGPATH -u "$shortmode_path"`
45549      new_path="$input_path"
45550    fi
45551  fi
45552
45553  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45554  if test "x$test_cygdrive_prefix" = x; then
45555    # As a simple fix, exclude /usr/bin since it's not a real path.
45556    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45557      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45558      # a path prefixed by /cygdrive for fixpath to work.
45559      new_path="$CYGWIN_ROOT_PATH$input_path"
45560    fi
45561  fi
45562
45563
45564  if test "x$path" != "x$new_path"; then
45565    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45566    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45567$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45568  fi
45569
45570  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45571
45572  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45573  has_colon=`$ECHO $path | $GREP ^.:`
45574  new_path="$path"
45575  if test "x$has_colon" = x; then
45576    # Not in mixed or Windows style, start by that.
45577    new_path=`cmd //c echo $path`
45578  fi
45579
45580
45581  input_path="$new_path"
45582  # Check if we need to convert this using DOS-style short mode. If the path
45583  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45584  # take no chances and rewrite it.
45585  # Note: m4 eats our [], so we need to use [ and ] instead.
45586  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45587  if test "x$has_forbidden_chars" != x; then
45588    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45589    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45590  fi
45591
45592
45593  windows_path="$new_path"
45594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45595    unix_path=`$CYGPATH -u "$windows_path"`
45596    new_path="$unix_path"
45597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45598    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45599    new_path="$unix_path"
45600  fi
45601
45602  if test "x$path" != "x$new_path"; then
45603    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45604    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45605$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45606  fi
45607
45608  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45609  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45610
45611  else
45612    # We're on a posix platform. Hooray! :)
45613    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45614    has_space=`$ECHO "$path" | $GREP " "`
45615    if test "x$has_space" != x; then
45616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45617$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45618      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45619    fi
45620
45621    # Use eval to expand a potential ~
45622    eval path="$path"
45623    if test ! -f "$path" && test ! -d "$path"; then
45624      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45625    fi
45626
45627    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45628  fi
45629
45630
45631  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45632
45633  # Input might be given as Windows format, start by converting to
45634  # unix format.
45635  path="$POTENTIAL_FREETYPE_LIB_PATH"
45636  new_path=`$CYGPATH -u "$path"`
45637
45638  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45639  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45640  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45641  # "foo.exe" is OK but "foo" is an error.
45642  #
45643  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45644  # It is also a way to make sure we got the proper file name for the real test later on.
45645  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45646  if test "x$test_shortpath" = x; then
45647    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45648$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45649    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45650  fi
45651
45652  # Call helper function which possibly converts this using DOS-style short mode.
45653  # If so, the updated path is stored in $new_path.
45654
45655  input_path="$new_path"
45656  # Check if we need to convert this using DOS-style short mode. If the path
45657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45658  # take no chances and rewrite it.
45659  # Note: m4 eats our [], so we need to use [ and ] instead.
45660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45661  if test "x$has_forbidden_chars" != x; then
45662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45666      # Going to short mode and back again did indeed matter. Since short mode is
45667      # case insensitive, let's make it lowercase to improve readability.
45668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45669      # Now convert it back to Unix-stile (cygpath)
45670      input_path=`$CYGPATH -u "$shortmode_path"`
45671      new_path="$input_path"
45672    fi
45673  fi
45674
45675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45676  if test "x$test_cygdrive_prefix" = x; then
45677    # As a simple fix, exclude /usr/bin since it's not a real path.
45678    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45680      # a path prefixed by /cygdrive for fixpath to work.
45681      new_path="$CYGWIN_ROOT_PATH$input_path"
45682    fi
45683  fi
45684
45685
45686  if test "x$path" != "x$new_path"; then
45687    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45688    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45689$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45690  fi
45691
45692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45693
45694  path="$POTENTIAL_FREETYPE_LIB_PATH"
45695  has_colon=`$ECHO $path | $GREP ^.:`
45696  new_path="$path"
45697  if test "x$has_colon" = x; then
45698    # Not in mixed or Windows style, start by that.
45699    new_path=`cmd //c echo $path`
45700  fi
45701
45702
45703  input_path="$new_path"
45704  # Check if we need to convert this using DOS-style short mode. If the path
45705  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45706  # take no chances and rewrite it.
45707  # Note: m4 eats our [], so we need to use [ and ] instead.
45708  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45709  if test "x$has_forbidden_chars" != x; then
45710    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45711    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45712  fi
45713
45714
45715  windows_path="$new_path"
45716  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45717    unix_path=`$CYGPATH -u "$windows_path"`
45718    new_path="$unix_path"
45719  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45720    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45721    new_path="$unix_path"
45722  fi
45723
45724  if test "x$path" != "x$new_path"; then
45725    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45726    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45727$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45728  fi
45729
45730  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45731  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45732
45733  else
45734    # We're on a posix platform. Hooray! :)
45735    path="$POTENTIAL_FREETYPE_LIB_PATH"
45736    has_space=`$ECHO "$path" | $GREP " "`
45737    if test "x$has_space" != x; then
45738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45739$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45740      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45741    fi
45742
45743    # Use eval to expand a potential ~
45744    eval path="$path"
45745    if test ! -f "$path" && test ! -d "$path"; then
45746      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45747    fi
45748
45749    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
45750  fi
45751
45752
45753    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45754    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
45755$as_echo_n "checking for freetype includes... " >&6; }
45756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
45757$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
45758    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
45759    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
45760$as_echo_n "checking for freetype libraries... " >&6; }
45761    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
45762$as_echo "$FREETYPE_LIB_PATH" >&6; }
45763  fi
45764
45765          fi
45766
45767          if test "x$FOUND_FREETYPE" != xyes; then
45768            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
45769
45770  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
45771  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
45772  METHOD="well-known location"
45773
45774  # First check if the files exists.
45775  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
45776    # We found an arbitrary include file. That's a good sign.
45777    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
45778$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
45779    FOUND_FREETYPE=yes
45780
45781    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
45782    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
45783      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
45784$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
45785      FOUND_FREETYPE=no
45786    else
45787      if test "x$OPENJDK_TARGET_OS" = xwindows; then
45788        # On Windows, we will need both .lib and .dll file.
45789        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
45790          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
45791$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
45792          FOUND_FREETYPE=no
45793        fi
45794      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
45795          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
45796        # Found lib in isa dir, use that instead.
45797        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
45798      fi
45799    fi
45800  fi
45801
45802  if test "x$FOUND_FREETYPE" = xyes; then
45803
45804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45805
45806  # Input might be given as Windows format, start by converting to
45807  # unix format.
45808  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45809  new_path=`$CYGPATH -u "$path"`
45810
45811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45814  # "foo.exe" is OK but "foo" is an error.
45815  #
45816  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45817  # It is also a way to make sure we got the proper file name for the real test later on.
45818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45819  if test "x$test_shortpath" = x; then
45820    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45821$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45822    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
45823  fi
45824
45825  # Call helper function which possibly converts this using DOS-style short mode.
45826  # If so, the updated path is stored in $new_path.
45827
45828  input_path="$new_path"
45829  # Check if we need to convert this using DOS-style short mode. If the path
45830  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45831  # take no chances and rewrite it.
45832  # Note: m4 eats our [], so we need to use [ and ] instead.
45833  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45834  if test "x$has_forbidden_chars" != x; then
45835    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45836    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45837    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45838    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45839      # Going to short mode and back again did indeed matter. Since short mode is
45840      # case insensitive, let's make it lowercase to improve readability.
45841      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45842      # Now convert it back to Unix-stile (cygpath)
45843      input_path=`$CYGPATH -u "$shortmode_path"`
45844      new_path="$input_path"
45845    fi
45846  fi
45847
45848  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45849  if test "x$test_cygdrive_prefix" = x; then
45850    # As a simple fix, exclude /usr/bin since it's not a real path.
45851    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45852      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45853      # a path prefixed by /cygdrive for fixpath to work.
45854      new_path="$CYGWIN_ROOT_PATH$input_path"
45855    fi
45856  fi
45857
45858
45859  if test "x$path" != "x$new_path"; then
45860    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45861    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45862$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45863  fi
45864
45865  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45866
45867  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45868  has_colon=`$ECHO $path | $GREP ^.:`
45869  new_path="$path"
45870  if test "x$has_colon" = x; then
45871    # Not in mixed or Windows style, start by that.
45872    new_path=`cmd //c echo $path`
45873  fi
45874
45875
45876  input_path="$new_path"
45877  # Check if we need to convert this using DOS-style short mode. If the path
45878  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45879  # take no chances and rewrite it.
45880  # Note: m4 eats our [], so we need to use [ and ] instead.
45881  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45882  if test "x$has_forbidden_chars" != x; then
45883    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45884    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45885  fi
45886
45887
45888  windows_path="$new_path"
45889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45890    unix_path=`$CYGPATH -u "$windows_path"`
45891    new_path="$unix_path"
45892  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45893    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45894    new_path="$unix_path"
45895  fi
45896
45897  if test "x$path" != "x$new_path"; then
45898    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
45899    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
45900$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
45901  fi
45902
45903  # Save the first 10 bytes of this path to the storage, so fixpath can work.
45904  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45905
45906  else
45907    # We're on a posix platform. Hooray! :)
45908    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
45909    has_space=`$ECHO "$path" | $GREP " "`
45910    if test "x$has_space" != x; then
45911      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
45912$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
45913      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
45914    fi
45915
45916    # Use eval to expand a potential ~
45917    eval path="$path"
45918    if test ! -f "$path" && test ! -d "$path"; then
45919      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
45920    fi
45921
45922    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
45923  fi
45924
45925
45926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45927
45928  # Input might be given as Windows format, start by converting to
45929  # unix format.
45930  path="$POTENTIAL_FREETYPE_LIB_PATH"
45931  new_path=`$CYGPATH -u "$path"`
45932
45933  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45934  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45935  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45936  # "foo.exe" is OK but "foo" is an error.
45937  #
45938  # This test is therefore slightly more accurate than "test -f" to check for file precense.
45939  # It is also a way to make sure we got the proper file name for the real test later on.
45940  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45941  if test "x$test_shortpath" = x; then
45942    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
45943$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
45944    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
45945  fi
45946
45947  # Call helper function which possibly converts this using DOS-style short mode.
45948  # If so, the updated path is stored in $new_path.
45949
45950  input_path="$new_path"
45951  # Check if we need to convert this using DOS-style short mode. If the path
45952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45953  # take no chances and rewrite it.
45954  # Note: m4 eats our [], so we need to use [ and ] instead.
45955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45956  if test "x$has_forbidden_chars" != x; then
45957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45958    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45959    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45960    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45961      # Going to short mode and back again did indeed matter. Since short mode is
45962      # case insensitive, let's make it lowercase to improve readability.
45963      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45964      # Now convert it back to Unix-stile (cygpath)
45965      input_path=`$CYGPATH -u "$shortmode_path"`
45966      new_path="$input_path"
45967    fi
45968  fi
45969
45970  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45971  if test "x$test_cygdrive_prefix" = x; then
45972    # As a simple fix, exclude /usr/bin since it's not a real path.
45973    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
45974      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45975      # a path prefixed by /cygdrive for fixpath to work.
45976      new_path="$CYGWIN_ROOT_PATH$input_path"
45977    fi
45978  fi
45979
45980
45981  if test "x$path" != "x$new_path"; then
45982    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
45983    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
45984$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
45985  fi
45986
45987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45988
45989  path="$POTENTIAL_FREETYPE_LIB_PATH"
45990  has_colon=`$ECHO $path | $GREP ^.:`
45991  new_path="$path"
45992  if test "x$has_colon" = x; then
45993    # Not in mixed or Windows style, start by that.
45994    new_path=`cmd //c echo $path`
45995  fi
45996
45997
45998  input_path="$new_path"
45999  # Check if we need to convert this using DOS-style short mode. If the path
46000  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46001  # take no chances and rewrite it.
46002  # Note: m4 eats our [], so we need to use [ and ] instead.
46003  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46004  if test "x$has_forbidden_chars" != x; then
46005    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46006    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46007  fi
46008
46009
46010  windows_path="$new_path"
46011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46012    unix_path=`$CYGPATH -u "$windows_path"`
46013    new_path="$unix_path"
46014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46016    new_path="$unix_path"
46017  fi
46018
46019  if test "x$path" != "x$new_path"; then
46020    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46021    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46022$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46023  fi
46024
46025  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46026  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46027
46028  else
46029    # We're on a posix platform. Hooray! :)
46030    path="$POTENTIAL_FREETYPE_LIB_PATH"
46031    has_space=`$ECHO "$path" | $GREP " "`
46032    if test "x$has_space" != x; then
46033      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46034$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46035      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46036    fi
46037
46038    # Use eval to expand a potential ~
46039    eval path="$path"
46040    if test ! -f "$path" && test ! -d "$path"; then
46041      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46042    fi
46043
46044    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46045  fi
46046
46047
46048    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46049    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46050$as_echo_n "checking for freetype includes... " >&6; }
46051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46052$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46053    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46054    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46055$as_echo_n "checking for freetype libraries... " >&6; }
46056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46057$as_echo "$FREETYPE_LIB_PATH" >&6; }
46058  fi
46059
46060          fi
46061
46062          if test "x$FOUND_FREETYPE" != xyes; then
46063            FREETYPE_BASE_DIR="$SYSROOT/usr"
46064            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
46065
46066  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46067  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
46068  METHOD="well-known location"
46069
46070  # First check if the files exists.
46071  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46072    # We found an arbitrary include file. That's a good sign.
46073    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46074$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46075    FOUND_FREETYPE=yes
46076
46077    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46078    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46079      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46080$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46081      FOUND_FREETYPE=no
46082    else
46083      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46084        # On Windows, we will need both .lib and .dll file.
46085        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46086          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46087$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46088          FOUND_FREETYPE=no
46089        fi
46090      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46091          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46092        # Found lib in isa dir, use that instead.
46093        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46094      fi
46095    fi
46096  fi
46097
46098  if test "x$FOUND_FREETYPE" = xyes; then
46099
46100  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46101
46102  # Input might be given as Windows format, start by converting to
46103  # unix format.
46104  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46105  new_path=`$CYGPATH -u "$path"`
46106
46107  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46108  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46109  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46110  # "foo.exe" is OK but "foo" is an error.
46111  #
46112  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46113  # It is also a way to make sure we got the proper file name for the real test later on.
46114  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46115  if test "x$test_shortpath" = x; then
46116    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46118    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46119  fi
46120
46121  # Call helper function which possibly converts this using DOS-style short mode.
46122  # If so, the updated path is stored in $new_path.
46123
46124  input_path="$new_path"
46125  # Check if we need to convert this using DOS-style short mode. If the path
46126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46127  # take no chances and rewrite it.
46128  # Note: m4 eats our [], so we need to use [ and ] instead.
46129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46130  if test "x$has_forbidden_chars" != x; then
46131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46132    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46133    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46134    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46135      # Going to short mode and back again did indeed matter. Since short mode is
46136      # case insensitive, let's make it lowercase to improve readability.
46137      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46138      # Now convert it back to Unix-stile (cygpath)
46139      input_path=`$CYGPATH -u "$shortmode_path"`
46140      new_path="$input_path"
46141    fi
46142  fi
46143
46144  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46145  if test "x$test_cygdrive_prefix" = x; then
46146    # As a simple fix, exclude /usr/bin since it's not a real path.
46147    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46148      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46149      # a path prefixed by /cygdrive for fixpath to work.
46150      new_path="$CYGWIN_ROOT_PATH$input_path"
46151    fi
46152  fi
46153
46154
46155  if test "x$path" != "x$new_path"; then
46156    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46157    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46158$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46159  fi
46160
46161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46162
46163  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46164  has_colon=`$ECHO $path | $GREP ^.:`
46165  new_path="$path"
46166  if test "x$has_colon" = x; then
46167    # Not in mixed or Windows style, start by that.
46168    new_path=`cmd //c echo $path`
46169  fi
46170
46171
46172  input_path="$new_path"
46173  # Check if we need to convert this using DOS-style short mode. If the path
46174  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46175  # take no chances and rewrite it.
46176  # Note: m4 eats our [], so we need to use [ and ] instead.
46177  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46178  if test "x$has_forbidden_chars" != x; then
46179    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46180    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46181  fi
46182
46183
46184  windows_path="$new_path"
46185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46186    unix_path=`$CYGPATH -u "$windows_path"`
46187    new_path="$unix_path"
46188  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46189    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46190    new_path="$unix_path"
46191  fi
46192
46193  if test "x$path" != "x$new_path"; then
46194    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46195    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46196$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46197  fi
46198
46199  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46200  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46201
46202  else
46203    # We're on a posix platform. Hooray! :)
46204    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46205    has_space=`$ECHO "$path" | $GREP " "`
46206    if test "x$has_space" != x; then
46207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46208$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46209      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46210    fi
46211
46212    # Use eval to expand a potential ~
46213    eval path="$path"
46214    if test ! -f "$path" && test ! -d "$path"; then
46215      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46216    fi
46217
46218    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46219  fi
46220
46221
46222  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46223
46224  # Input might be given as Windows format, start by converting to
46225  # unix format.
46226  path="$POTENTIAL_FREETYPE_LIB_PATH"
46227  new_path=`$CYGPATH -u "$path"`
46228
46229  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46230  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46231  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46232  # "foo.exe" is OK but "foo" is an error.
46233  #
46234  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46235  # It is also a way to make sure we got the proper file name for the real test later on.
46236  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46237  if test "x$test_shortpath" = x; then
46238    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46239$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46240    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46241  fi
46242
46243  # Call helper function which possibly converts this using DOS-style short mode.
46244  # If so, the updated path is stored in $new_path.
46245
46246  input_path="$new_path"
46247  # Check if we need to convert this using DOS-style short mode. If the path
46248  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46249  # take no chances and rewrite it.
46250  # Note: m4 eats our [], so we need to use [ and ] instead.
46251  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46252  if test "x$has_forbidden_chars" != x; then
46253    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46254    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46255    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46256    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46257      # Going to short mode and back again did indeed matter. Since short mode is
46258      # case insensitive, let's make it lowercase to improve readability.
46259      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46260      # Now convert it back to Unix-stile (cygpath)
46261      input_path=`$CYGPATH -u "$shortmode_path"`
46262      new_path="$input_path"
46263    fi
46264  fi
46265
46266  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46267  if test "x$test_cygdrive_prefix" = x; then
46268    # As a simple fix, exclude /usr/bin since it's not a real path.
46269    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46270      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46271      # a path prefixed by /cygdrive for fixpath to work.
46272      new_path="$CYGWIN_ROOT_PATH$input_path"
46273    fi
46274  fi
46275
46276
46277  if test "x$path" != "x$new_path"; then
46278    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46281  fi
46282
46283  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46284
46285  path="$POTENTIAL_FREETYPE_LIB_PATH"
46286  has_colon=`$ECHO $path | $GREP ^.:`
46287  new_path="$path"
46288  if test "x$has_colon" = x; then
46289    # Not in mixed or Windows style, start by that.
46290    new_path=`cmd //c echo $path`
46291  fi
46292
46293
46294  input_path="$new_path"
46295  # Check if we need to convert this using DOS-style short mode. If the path
46296  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46297  # take no chances and rewrite it.
46298  # Note: m4 eats our [], so we need to use [ and ] instead.
46299  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46300  if test "x$has_forbidden_chars" != x; then
46301    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46302    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46303  fi
46304
46305
46306  windows_path="$new_path"
46307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46308    unix_path=`$CYGPATH -u "$windows_path"`
46309    new_path="$unix_path"
46310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46312    new_path="$unix_path"
46313  fi
46314
46315  if test "x$path" != "x$new_path"; then
46316    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46318$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46319  fi
46320
46321  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46322  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46323
46324  else
46325    # We're on a posix platform. Hooray! :)
46326    path="$POTENTIAL_FREETYPE_LIB_PATH"
46327    has_space=`$ECHO "$path" | $GREP " "`
46328    if test "x$has_space" != x; then
46329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46330$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46331      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46332    fi
46333
46334    # Use eval to expand a potential ~
46335    eval path="$path"
46336    if test ! -f "$path" && test ! -d "$path"; then
46337      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46338    fi
46339
46340    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46341  fi
46342
46343
46344    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46345    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46346$as_echo_n "checking for freetype includes... " >&6; }
46347    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46348$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46349    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46350    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46351$as_echo_n "checking for freetype libraries... " >&6; }
46352    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46353$as_echo "$FREETYPE_LIB_PATH" >&6; }
46354  fi
46355
46356            else
46357
46358  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46359  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
46360  METHOD="well-known location"
46361
46362  # First check if the files exists.
46363  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46364    # We found an arbitrary include file. That's a good sign.
46365    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46366$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46367    FOUND_FREETYPE=yes
46368
46369    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46370    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46371      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46372$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46373      FOUND_FREETYPE=no
46374    else
46375      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46376        # On Windows, we will need both .lib and .dll file.
46377        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46378          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46379$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46380          FOUND_FREETYPE=no
46381        fi
46382      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46383          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46384        # Found lib in isa dir, use that instead.
46385        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46386      fi
46387    fi
46388  fi
46389
46390  if test "x$FOUND_FREETYPE" = xyes; then
46391
46392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46393
46394  # Input might be given as Windows format, start by converting to
46395  # unix format.
46396  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46397  new_path=`$CYGPATH -u "$path"`
46398
46399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46402  # "foo.exe" is OK but "foo" is an error.
46403  #
46404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46405  # It is also a way to make sure we got the proper file name for the real test later on.
46406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46407  if test "x$test_shortpath" = x; then
46408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46409$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46410    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46411  fi
46412
46413  # Call helper function which possibly converts this using DOS-style short mode.
46414  # If so, the updated path is stored in $new_path.
46415
46416  input_path="$new_path"
46417  # Check if we need to convert this using DOS-style short mode. If the path
46418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46419  # take no chances and rewrite it.
46420  # Note: m4 eats our [], so we need to use [ and ] instead.
46421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46422  if test "x$has_forbidden_chars" != x; then
46423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46427      # Going to short mode and back again did indeed matter. Since short mode is
46428      # case insensitive, let's make it lowercase to improve readability.
46429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46430      # Now convert it back to Unix-stile (cygpath)
46431      input_path=`$CYGPATH -u "$shortmode_path"`
46432      new_path="$input_path"
46433    fi
46434  fi
46435
46436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46437  if test "x$test_cygdrive_prefix" = x; then
46438    # As a simple fix, exclude /usr/bin since it's not a real path.
46439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46441      # a path prefixed by /cygdrive for fixpath to work.
46442      new_path="$CYGWIN_ROOT_PATH$input_path"
46443    fi
46444  fi
46445
46446
46447  if test "x$path" != "x$new_path"; then
46448    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46450$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46451  fi
46452
46453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46454
46455  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46456  has_colon=`$ECHO $path | $GREP ^.:`
46457  new_path="$path"
46458  if test "x$has_colon" = x; then
46459    # Not in mixed or Windows style, start by that.
46460    new_path=`cmd //c echo $path`
46461  fi
46462
46463
46464  input_path="$new_path"
46465  # Check if we need to convert this using DOS-style short mode. If the path
46466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46467  # take no chances and rewrite it.
46468  # Note: m4 eats our [], so we need to use [ and ] instead.
46469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46470  if test "x$has_forbidden_chars" != x; then
46471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46473  fi
46474
46475
46476  windows_path="$new_path"
46477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46478    unix_path=`$CYGPATH -u "$windows_path"`
46479    new_path="$unix_path"
46480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46482    new_path="$unix_path"
46483  fi
46484
46485  if test "x$path" != "x$new_path"; then
46486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46489  fi
46490
46491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46493
46494  else
46495    # We're on a posix platform. Hooray! :)
46496    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46497    has_space=`$ECHO "$path" | $GREP " "`
46498    if test "x$has_space" != x; then
46499      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46500$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46501      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46502    fi
46503
46504    # Use eval to expand a potential ~
46505    eval path="$path"
46506    if test ! -f "$path" && test ! -d "$path"; then
46507      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46508    fi
46509
46510    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46511  fi
46512
46513
46514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46515
46516  # Input might be given as Windows format, start by converting to
46517  # unix format.
46518  path="$POTENTIAL_FREETYPE_LIB_PATH"
46519  new_path=`$CYGPATH -u "$path"`
46520
46521  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46522  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46523  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46524  # "foo.exe" is OK but "foo" is an error.
46525  #
46526  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46527  # It is also a way to make sure we got the proper file name for the real test later on.
46528  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46529  if test "x$test_shortpath" = x; then
46530    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46531$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46532    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46533  fi
46534
46535  # Call helper function which possibly converts this using DOS-style short mode.
46536  # If so, the updated path is stored in $new_path.
46537
46538  input_path="$new_path"
46539  # Check if we need to convert this using DOS-style short mode. If the path
46540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46541  # take no chances and rewrite it.
46542  # Note: m4 eats our [], so we need to use [ and ] instead.
46543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46544  if test "x$has_forbidden_chars" != x; then
46545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46546    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46547    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46548    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46549      # Going to short mode and back again did indeed matter. Since short mode is
46550      # case insensitive, let's make it lowercase to improve readability.
46551      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46552      # Now convert it back to Unix-stile (cygpath)
46553      input_path=`$CYGPATH -u "$shortmode_path"`
46554      new_path="$input_path"
46555    fi
46556  fi
46557
46558  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46559  if test "x$test_cygdrive_prefix" = x; then
46560    # As a simple fix, exclude /usr/bin since it's not a real path.
46561    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46562      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46563      # a path prefixed by /cygdrive for fixpath to work.
46564      new_path="$CYGWIN_ROOT_PATH$input_path"
46565    fi
46566  fi
46567
46568
46569  if test "x$path" != "x$new_path"; then
46570    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46571    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46572$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46573  fi
46574
46575  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46576
46577  path="$POTENTIAL_FREETYPE_LIB_PATH"
46578  has_colon=`$ECHO $path | $GREP ^.:`
46579  new_path="$path"
46580  if test "x$has_colon" = x; then
46581    # Not in mixed or Windows style, start by that.
46582    new_path=`cmd //c echo $path`
46583  fi
46584
46585
46586  input_path="$new_path"
46587  # Check if we need to convert this using DOS-style short mode. If the path
46588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46589  # take no chances and rewrite it.
46590  # Note: m4 eats our [], so we need to use [ and ] instead.
46591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46592  if test "x$has_forbidden_chars" != x; then
46593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46594    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46595  fi
46596
46597
46598  windows_path="$new_path"
46599  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46600    unix_path=`$CYGPATH -u "$windows_path"`
46601    new_path="$unix_path"
46602  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46603    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46604    new_path="$unix_path"
46605  fi
46606
46607  if test "x$path" != "x$new_path"; then
46608    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46609    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46610$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46611  fi
46612
46613  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46614  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46615
46616  else
46617    # We're on a posix platform. Hooray! :)
46618    path="$POTENTIAL_FREETYPE_LIB_PATH"
46619    has_space=`$ECHO "$path" | $GREP " "`
46620    if test "x$has_space" != x; then
46621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46622$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46623      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46624    fi
46625
46626    # Use eval to expand a potential ~
46627    eval path="$path"
46628    if test ! -f "$path" && test ! -d "$path"; then
46629      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46630    fi
46631
46632    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46633  fi
46634
46635
46636    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46638$as_echo_n "checking for freetype includes... " >&6; }
46639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46640$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46641    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46642    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46643$as_echo_n "checking for freetype libraries... " >&6; }
46644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46645$as_echo "$FREETYPE_LIB_PATH" >&6; }
46646  fi
46647
46648              if test "x$FOUND_FREETYPE" != xyes; then
46649
46650  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
46651  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
46652  METHOD="well-known location"
46653
46654  # First check if the files exists.
46655  if test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
46656    # We found an arbitrary include file. That's a good sign.
46657    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
46658$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
46659    FOUND_FREETYPE=yes
46660
46661    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}freetype${SHARED_LIBRARY_SUFFIX}"
46662    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
46663      { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
46664$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
46665      FOUND_FREETYPE=no
46666    else
46667      if test "x$OPENJDK_TARGET_OS" = xwindows; then
46668        # On Windows, we will need both .lib and .dll file.
46669        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/freetype.lib"; then
46670          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&5
46671$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/freetype.lib. Ignoring location." >&6;}
46672          FOUND_FREETYPE=no
46673        fi
46674      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
46675          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
46676        # Found lib in isa dir, use that instead.
46677        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
46678      fi
46679    fi
46680  fi
46681
46682  if test "x$FOUND_FREETYPE" = xyes; then
46683
46684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46685
46686  # Input might be given as Windows format, start by converting to
46687  # unix format.
46688  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46689  new_path=`$CYGPATH -u "$path"`
46690
46691  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46692  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46693  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46694  # "foo.exe" is OK but "foo" is an error.
46695  #
46696  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46697  # It is also a way to make sure we got the proper file name for the real test later on.
46698  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46699  if test "x$test_shortpath" = x; then
46700    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46701$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46702    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
46703  fi
46704
46705  # Call helper function which possibly converts this using DOS-style short mode.
46706  # If so, the updated path is stored in $new_path.
46707
46708  input_path="$new_path"
46709  # Check if we need to convert this using DOS-style short mode. If the path
46710  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46711  # take no chances and rewrite it.
46712  # Note: m4 eats our [], so we need to use [ and ] instead.
46713  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46714  if test "x$has_forbidden_chars" != x; then
46715    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46716    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46717    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46718    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46719      # Going to short mode and back again did indeed matter. Since short mode is
46720      # case insensitive, let's make it lowercase to improve readability.
46721      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46722      # Now convert it back to Unix-stile (cygpath)
46723      input_path=`$CYGPATH -u "$shortmode_path"`
46724      new_path="$input_path"
46725    fi
46726  fi
46727
46728  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46729  if test "x$test_cygdrive_prefix" = x; then
46730    # As a simple fix, exclude /usr/bin since it's not a real path.
46731    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46732      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46733      # a path prefixed by /cygdrive for fixpath to work.
46734      new_path="$CYGWIN_ROOT_PATH$input_path"
46735    fi
46736  fi
46737
46738
46739  if test "x$path" != "x$new_path"; then
46740    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46742$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46743  fi
46744
46745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46746
46747  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46748  has_colon=`$ECHO $path | $GREP ^.:`
46749  new_path="$path"
46750  if test "x$has_colon" = x; then
46751    # Not in mixed or Windows style, start by that.
46752    new_path=`cmd //c echo $path`
46753  fi
46754
46755
46756  input_path="$new_path"
46757  # Check if we need to convert this using DOS-style short mode. If the path
46758  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46759  # take no chances and rewrite it.
46760  # Note: m4 eats our [], so we need to use [ and ] instead.
46761  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46762  if test "x$has_forbidden_chars" != x; then
46763    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46764    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46765  fi
46766
46767
46768  windows_path="$new_path"
46769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46770    unix_path=`$CYGPATH -u "$windows_path"`
46771    new_path="$unix_path"
46772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46774    new_path="$unix_path"
46775  fi
46776
46777  if test "x$path" != "x$new_path"; then
46778    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
46779    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
46780$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
46781  fi
46782
46783  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46784  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46785
46786  else
46787    # We're on a posix platform. Hooray! :)
46788    path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46789    has_space=`$ECHO "$path" | $GREP " "`
46790    if test "x$has_space" != x; then
46791      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
46792$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
46793      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46794    fi
46795
46796    # Use eval to expand a potential ~
46797    eval path="$path"
46798    if test ! -f "$path" && test ! -d "$path"; then
46799      as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46800    fi
46801
46802    POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
46803  fi
46804
46805
46806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46807
46808  # Input might be given as Windows format, start by converting to
46809  # unix format.
46810  path="$POTENTIAL_FREETYPE_LIB_PATH"
46811  new_path=`$CYGPATH -u "$path"`
46812
46813  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46814  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46815  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46816  # "foo.exe" is OK but "foo" is an error.
46817  #
46818  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46819  # It is also a way to make sure we got the proper file name for the real test later on.
46820  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46821  if test "x$test_shortpath" = x; then
46822    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46823$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46824    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
46825  fi
46826
46827  # Call helper function which possibly converts this using DOS-style short mode.
46828  # If so, the updated path is stored in $new_path.
46829
46830  input_path="$new_path"
46831  # Check if we need to convert this using DOS-style short mode. If the path
46832  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46833  # take no chances and rewrite it.
46834  # Note: m4 eats our [], so we need to use [ and ] instead.
46835  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46836  if test "x$has_forbidden_chars" != x; then
46837    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46838    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46839    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46840    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46841      # Going to short mode and back again did indeed matter. Since short mode is
46842      # case insensitive, let's make it lowercase to improve readability.
46843      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46844      # Now convert it back to Unix-stile (cygpath)
46845      input_path=`$CYGPATH -u "$shortmode_path"`
46846      new_path="$input_path"
46847    fi
46848  fi
46849
46850  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46851  if test "x$test_cygdrive_prefix" = x; then
46852    # As a simple fix, exclude /usr/bin since it's not a real path.
46853    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
46854      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46855      # a path prefixed by /cygdrive for fixpath to work.
46856      new_path="$CYGWIN_ROOT_PATH$input_path"
46857    fi
46858  fi
46859
46860
46861  if test "x$path" != "x$new_path"; then
46862    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46863    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46864$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46865  fi
46866
46867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46868
46869  path="$POTENTIAL_FREETYPE_LIB_PATH"
46870  has_colon=`$ECHO $path | $GREP ^.:`
46871  new_path="$path"
46872  if test "x$has_colon" = x; then
46873    # Not in mixed or Windows style, start by that.
46874    new_path=`cmd //c echo $path`
46875  fi
46876
46877
46878  input_path="$new_path"
46879  # Check if we need to convert this using DOS-style short mode. If the path
46880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46881  # take no chances and rewrite it.
46882  # Note: m4 eats our [], so we need to use [ and ] instead.
46883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46884  if test "x$has_forbidden_chars" != x; then
46885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46887  fi
46888
46889
46890  windows_path="$new_path"
46891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46892    unix_path=`$CYGPATH -u "$windows_path"`
46893    new_path="$unix_path"
46894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46896    new_path="$unix_path"
46897  fi
46898
46899  if test "x$path" != "x$new_path"; then
46900    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
46901    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
46902$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
46903  fi
46904
46905  # Save the first 10 bytes of this path to the storage, so fixpath can work.
46906  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46907
46908  else
46909    # We're on a posix platform. Hooray! :)
46910    path="$POTENTIAL_FREETYPE_LIB_PATH"
46911    has_space=`$ECHO "$path" | $GREP " "`
46912    if test "x$has_space" != x; then
46913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
46914$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
46915      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
46916    fi
46917
46918    # Use eval to expand a potential ~
46919    eval path="$path"
46920    if test ! -f "$path" && test ! -d "$path"; then
46921      as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
46922    fi
46923
46924    POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
46925  fi
46926
46927
46928    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
46929    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
46930$as_echo_n "checking for freetype includes... " >&6; }
46931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
46932$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
46933    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
46934    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
46935$as_echo_n "checking for freetype libraries... " >&6; }
46936    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
46937$as_echo "$FREETYPE_LIB_PATH" >&6; }
46938  fi
46939
46940              fi
46941            fi
46942          fi
46943        fi
46944      fi # end check in well-known locations
46945
46946      if test "x$FOUND_FREETYPE" != xyes; then
46947
46948  # Print a helpful message on how to acquire the necessary build dependency.
46949  # freetype is the help tag: freetype, cups, pulse, alsa etc
46950  MISSING_DEPENDENCY=freetype
46951
46952  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46953    cygwin_help $MISSING_DEPENDENCY
46954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46955    msys_help $MISSING_DEPENDENCY
46956  else
46957    PKGHANDLER_COMMAND=
46958
46959    case $PKGHANDLER in
46960      apt-get)
46961        apt_help     $MISSING_DEPENDENCY ;;
46962      yum)
46963        yum_help     $MISSING_DEPENDENCY ;;
46964      port)
46965        port_help    $MISSING_DEPENDENCY ;;
46966      pkgutil)
46967        pkgutil_help $MISSING_DEPENDENCY ;;
46968      pkgadd)
46969        pkgadd_help  $MISSING_DEPENDENCY ;;
46970    esac
46971
46972    if test "x$PKGHANDLER_COMMAND" != x; then
46973      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
46974    fi
46975  fi
46976
46977        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
46978      fi
46979    fi # end user specified settings
46980
46981    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
46982    if test "x$FREETYPE_CFLAGS" = x; then
46983
46984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46985
46986  # Input might be given as Windows format, start by converting to
46987  # unix format.
46988  path="$FREETYPE_INCLUDE_PATH"
46989  new_path=`$CYGPATH -u "$path"`
46990
46991  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46992  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46993  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46994  # "foo.exe" is OK but "foo" is an error.
46995  #
46996  # This test is therefore slightly more accurate than "test -f" to check for file precense.
46997  # It is also a way to make sure we got the proper file name for the real test later on.
46998  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46999  if test "x$test_shortpath" = x; then
47000    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47001$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47002    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
47003  fi
47004
47005  # Call helper function which possibly converts this using DOS-style short mode.
47006  # If so, the updated path is stored in $new_path.
47007
47008  input_path="$new_path"
47009  # Check if we need to convert this using DOS-style short mode. If the path
47010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47011  # take no chances and rewrite it.
47012  # Note: m4 eats our [], so we need to use [ and ] instead.
47013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47014  if test "x$has_forbidden_chars" != x; then
47015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47016    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47017    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47018    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47019      # Going to short mode and back again did indeed matter. Since short mode is
47020      # case insensitive, let's make it lowercase to improve readability.
47021      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47022      # Now convert it back to Unix-stile (cygpath)
47023      input_path=`$CYGPATH -u "$shortmode_path"`
47024      new_path="$input_path"
47025    fi
47026  fi
47027
47028  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47029  if test "x$test_cygdrive_prefix" = x; then
47030    # As a simple fix, exclude /usr/bin since it's not a real path.
47031    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47032      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47033      # a path prefixed by /cygdrive for fixpath to work.
47034      new_path="$CYGWIN_ROOT_PATH$input_path"
47035    fi
47036  fi
47037
47038
47039  if test "x$path" != "x$new_path"; then
47040    FREETYPE_INCLUDE_PATH="$new_path"
47041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47042$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47043  fi
47044
47045  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47046
47047  path="$FREETYPE_INCLUDE_PATH"
47048  has_colon=`$ECHO $path | $GREP ^.:`
47049  new_path="$path"
47050  if test "x$has_colon" = x; then
47051    # Not in mixed or Windows style, start by that.
47052    new_path=`cmd //c echo $path`
47053  fi
47054
47055
47056  input_path="$new_path"
47057  # Check if we need to convert this using DOS-style short mode. If the path
47058  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47059  # take no chances and rewrite it.
47060  # Note: m4 eats our [], so we need to use [ and ] instead.
47061  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47062  if test "x$has_forbidden_chars" != x; then
47063    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47064    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47065  fi
47066
47067
47068  windows_path="$new_path"
47069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47070    unix_path=`$CYGPATH -u "$windows_path"`
47071    new_path="$unix_path"
47072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47074    new_path="$unix_path"
47075  fi
47076
47077  if test "x$path" != "x$new_path"; then
47078    FREETYPE_INCLUDE_PATH="$new_path"
47079    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
47080$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
47081  fi
47082
47083  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47084  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47085
47086  else
47087    # We're on a posix platform. Hooray! :)
47088    path="$FREETYPE_INCLUDE_PATH"
47089    has_space=`$ECHO "$path" | $GREP " "`
47090    if test "x$has_space" != x; then
47091      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
47092$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
47093      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47094    fi
47095
47096    # Use eval to expand a potential ~
47097    eval path="$path"
47098    if test ! -f "$path" && test ! -d "$path"; then
47099      as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47100    fi
47101
47102    FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
47103  fi
47104
47105      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
47106        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
47107      else
47108        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
47109      fi
47110    fi
47111
47112    if test "x$FREETYPE_LIBS" = x; then
47113
47114  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47115
47116  # Input might be given as Windows format, start by converting to
47117  # unix format.
47118  path="$FREETYPE_LIB_PATH"
47119  new_path=`$CYGPATH -u "$path"`
47120
47121  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47122  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47123  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47124  # "foo.exe" is OK but "foo" is an error.
47125  #
47126  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47127  # It is also a way to make sure we got the proper file name for the real test later on.
47128  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47129  if test "x$test_shortpath" = x; then
47130    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47131$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47132    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
47133  fi
47134
47135  # Call helper function which possibly converts this using DOS-style short mode.
47136  # If so, the updated path is stored in $new_path.
47137
47138  input_path="$new_path"
47139  # Check if we need to convert this using DOS-style short mode. If the path
47140  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47141  # take no chances and rewrite it.
47142  # Note: m4 eats our [], so we need to use [ and ] instead.
47143  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47144  if test "x$has_forbidden_chars" != x; then
47145    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47146    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47147    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47148    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47149      # Going to short mode and back again did indeed matter. Since short mode is
47150      # case insensitive, let's make it lowercase to improve readability.
47151      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47152      # Now convert it back to Unix-stile (cygpath)
47153      input_path=`$CYGPATH -u "$shortmode_path"`
47154      new_path="$input_path"
47155    fi
47156  fi
47157
47158  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47159  if test "x$test_cygdrive_prefix" = x; then
47160    # As a simple fix, exclude /usr/bin since it's not a real path.
47161    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47162      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47163      # a path prefixed by /cygdrive for fixpath to work.
47164      new_path="$CYGWIN_ROOT_PATH$input_path"
47165    fi
47166  fi
47167
47168
47169  if test "x$path" != "x$new_path"; then
47170    FREETYPE_LIB_PATH="$new_path"
47171    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47172$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47173  fi
47174
47175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47176
47177  path="$FREETYPE_LIB_PATH"
47178  has_colon=`$ECHO $path | $GREP ^.:`
47179  new_path="$path"
47180  if test "x$has_colon" = x; then
47181    # Not in mixed or Windows style, start by that.
47182    new_path=`cmd //c echo $path`
47183  fi
47184
47185
47186  input_path="$new_path"
47187  # Check if we need to convert this using DOS-style short mode. If the path
47188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47189  # take no chances and rewrite it.
47190  # Note: m4 eats our [], so we need to use [ and ] instead.
47191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47192  if test "x$has_forbidden_chars" != x; then
47193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47194    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47195  fi
47196
47197
47198  windows_path="$new_path"
47199  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47200    unix_path=`$CYGPATH -u "$windows_path"`
47201    new_path="$unix_path"
47202  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47203    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47204    new_path="$unix_path"
47205  fi
47206
47207  if test "x$path" != "x$new_path"; then
47208    FREETYPE_LIB_PATH="$new_path"
47209    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
47210$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
47211  fi
47212
47213  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47214  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47215
47216  else
47217    # We're on a posix platform. Hooray! :)
47218    path="$FREETYPE_LIB_PATH"
47219    has_space=`$ECHO "$path" | $GREP " "`
47220    if test "x$has_space" != x; then
47221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
47222$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
47223      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47224    fi
47225
47226    # Use eval to expand a potential ~
47227    eval path="$path"
47228    if test ! -f "$path" && test ! -d "$path"; then
47229      as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
47230    fi
47231
47232    FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
47233  fi
47234
47235      if test "x$OPENJDK_TARGET_OS" = xwindows; then
47236        FREETYPE_LIBS="$FREETYPE_LIB_PATH/freetype.lib"
47237      else
47238        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -lfreetype"
47239      fi
47240    fi
47241
47242    # Try to compile it
47243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
47244$as_echo_n "checking if we can compile and link with freetype... " >&6; }
47245    ac_ext=cpp
47246ac_cpp='$CXXCPP $CPPFLAGS'
47247ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47248ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47249ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47250
47251    PREV_CXXCFLAGS="$CXXFLAGS"
47252    PREV_LIBS="$LIBS"
47253    PREV_CXX="$CXX"
47254    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
47255    LIBS="$LIBS $FREETYPE_LIBS"
47256    CXX="$FIXPATH $CXX"
47257    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47258/* end confdefs.h.  */
47259
47260          #include<ft2build.h>
47261          #include FT_FREETYPE_H
47262          int main () {
47263            FT_Init_FreeType(NULL);
47264            return 0;
47265          }
47266
47267_ACEOF
47268if ac_fn_cxx_try_link "$LINENO"; then :
47269
47270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47271$as_echo "yes" >&6; }
47272
47273else
47274
47275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47276$as_echo "no" >&6; }
47277          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
47278$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
47279          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
47280$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
47281
47282
47283  # Print a helpful message on how to acquire the necessary build dependency.
47284  # freetype is the help tag: freetype, cups, pulse, alsa etc
47285  MISSING_DEPENDENCY=freetype
47286
47287  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47288    cygwin_help $MISSING_DEPENDENCY
47289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47290    msys_help $MISSING_DEPENDENCY
47291  else
47292    PKGHANDLER_COMMAND=
47293
47294    case $PKGHANDLER in
47295      apt-get)
47296        apt_help     $MISSING_DEPENDENCY ;;
47297      yum)
47298        yum_help     $MISSING_DEPENDENCY ;;
47299      port)
47300        port_help    $MISSING_DEPENDENCY ;;
47301      pkgutil)
47302        pkgutil_help $MISSING_DEPENDENCY ;;
47303      pkgadd)
47304        pkgadd_help  $MISSING_DEPENDENCY ;;
47305    esac
47306
47307    if test "x$PKGHANDLER_COMMAND" != x; then
47308      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47309    fi
47310  fi
47311
47312
47313          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
47314
47315
47316fi
47317rm -f core conftest.err conftest.$ac_objext \
47318    conftest$ac_exeext conftest.$ac_ext
47319    CXXCFLAGS="$PREV_CXXFLAGS"
47320    LIBS="$PREV_LIBS"
47321    CXX="$PREV_CXX"
47322    ac_ext=cpp
47323ac_cpp='$CXXCPP $CPPFLAGS'
47324ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47325ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47326ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47327
47328
47329    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
47330$as_echo_n "checking if we should bundle freetype... " >&6; }
47331    if test "x$BUNDLE_FREETYPE" = xyes; then
47332      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
47333    fi
47334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
47335$as_echo "$BUNDLE_FREETYPE" >&6; }
47336
47337  fi # end freetype needed
47338
47339
47340
47341
47342
47343
47344
47345  ###############################################################################
47346  #
47347  # Check for alsa headers and libraries. Used on Linux/GNU systems.
47348  #
47349
47350# Check whether --with-alsa was given.
47351if test "${with_alsa+set}" = set; then :
47352  withval=$with_alsa;
47353fi
47354
47355
47356# Check whether --with-alsa-include was given.
47357if test "${with_alsa_include+set}" = set; then :
47358  withval=$with_alsa_include;
47359fi
47360
47361
47362# Check whether --with-alsa-lib was given.
47363if test "${with_alsa_lib+set}" = set; then :
47364  withval=$with_alsa_lib;
47365fi
47366
47367
47368  if test "x$ALSA_NOT_NEEDED" = xyes; then
47369    if test "x${with_alsa}" != x || test "x${with_alsa_include}" != x || test "x${with_alsa_lib}" != x; then
47370      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa is ignored" >&5
47371$as_echo "$as_me: WARNING: alsa not used, so --with-alsa is ignored" >&2;}
47372    fi
47373    ALSA_CFLAGS=
47374    ALSA_LIBS=
47375  else
47376    ALSA_FOUND=no
47377
47378    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
47379      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
47380    fi
47381
47382    if test "x${with_alsa}" != x; then
47383      ALSA_LIBS="-L${with_alsa}/lib -lasound"
47384      ALSA_CFLAGS="-I${with_alsa}/include"
47385      ALSA_FOUND=yes
47386    fi
47387    if test "x${with_alsa_include}" != x; then
47388      ALSA_CFLAGS="-I${with_alsa_include}"
47389      ALSA_FOUND=yes
47390    fi
47391    if test "x${with_alsa_lib}" != x; then
47392      ALSA_LIBS="-L${with_alsa_lib} -lasound"
47393      ALSA_FOUND=yes
47394    fi
47395    if test "x$ALSA_FOUND" = xno; then
47396
47397
47398  if test "x$with_builddeps_server" != x || test "x$with_builddeps_conf" != x; then
47399    # Source the builddeps file again, to make sure it uses the latest variables!
47400    . $builddepsfile
47401    # Look for a target and build machine specific resource!
47402    eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}_TARGET_${rewritten_target_var}}
47403    if test "x$resource" = x; then
47404      # Ok, lets instead look for a target specific resource
47405      eval resource=\${builddep_alsa_TARGET_${rewritten_target_var}}
47406    fi
47407    if test "x$resource" = x; then
47408      # Ok, lets instead look for a build specific resource
47409      eval resource=\${builddep_alsa_BUILD_${rewritten_build_var}}
47410    fi
47411    if test "x$resource" = x; then
47412      # Ok, lets instead look for a generic resource
47413      # (The alsa comes from M4 and not the shell, thus no need for eval here.)
47414      resource=${builddep_alsa}
47415    fi
47416    if test "x$resource" != x; then
47417      { $as_echo "$as_me:${as_lineno-$LINENO}: Using builddeps $resource for alsa" >&5
47418$as_echo "$as_me: Using builddeps $resource for alsa" >&6;}
47419      # If the resource in the builddeps.conf file is an existing directory,
47420      # for example /java/linux/cups
47421      if test -d ${resource}; then
47422        depdir=${resource}
47423      else
47424
47425  # alsa is for example mymodule
47426  # $resource is for example libs/general/libmymod_1_2_3.zip
47427  # $with_builddeps_server is for example ftp://mybuilddeps.myserver.com/builddeps
47428  # $with_builddeps_dir is for example /localhome/builddeps
47429  # depdir is the name of the variable into which we store the depdir, eg MYMOD
47430  # Will download ftp://mybuilddeps.myserver.com/builddeps/libs/general/libmymod_1_2_3.zip and
47431  # unzip into the directory: /localhome/builddeps/libmymod_1_2_3
47432  filename=`basename $resource`
47433  filebase=`echo $filename | sed 's/\.[^\.]*$//'`
47434  filebase=${filename%%.*}
47435  extension=${filename#*.}
47436  installdir=$with_builddeps_dir/$filebase
47437  if test ! -f $installdir/$filename.unpacked; then
47438    { $as_echo "$as_me:${as_lineno-$LINENO}: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&5
47439$as_echo "$as_me: Downloading build dependency alsa from $with_builddeps_server/$resource and installing into $installdir" >&6;}
47440    if test ! -d $installdir; then
47441      mkdir -p $installdir
47442    fi
47443    if test ! -d $installdir; then
47444      as_fn_error $? "Could not create directory $installdir" "$LINENO" 5
47445    fi
47446    tmpfile=`mktemp $installdir/alsa.XXXXXXXXX`
47447    touch $tmpfile
47448    if test ! -f $tmpfile; then
47449      as_fn_error $? "Could not create files in directory $installdir" "$LINENO" 5
47450    fi
47451
47452  # $with_builddeps_server/$resource  is the ftp://abuilddeps.server.com/libs/cups.zip
47453  # $tmpfile is the local file name for the downloaded file.
47454  VALID_TOOL=no
47455  if test "x$BDEPS_FTP" = xwget; then
47456    VALID_TOOL=yes
47457    wget -O $tmpfile $with_builddeps_server/$resource
47458  fi
47459  if test "x$BDEPS_FTP" = xlftp; then
47460    VALID_TOOL=yes
47461    lftp -c "get $with_builddeps_server/$resource  -o $tmpfile"
47462  fi
47463  if test "x$BDEPS_FTP" = xftp; then
47464    VALID_TOOL=yes
47465    FTPSERVER=`echo $with_builddeps_server/$resource  | cut -f 3 -d '/'`
47466    FTPPATH=`echo $with_builddeps_server/$resource  | cut -f 4- -d '/'`
47467    FTPUSERPWD=${FTPSERVER%%@*}
47468    if test "x$FTPSERVER" != "x$FTPUSERPWD"; then
47469      FTPUSER=${userpwd%%:*}
47470      FTPPWD=${userpwd#*@}
47471      FTPSERVER=${FTPSERVER#*@}
47472    else
47473      FTPUSER=ftp
47474      FTPPWD=ftp
47475    fi
47476    # the "pass" command does not work on some
47477    # ftp clients (read ftp.exe) but if it works,
47478    # passive mode is better!
47479    ( \
47480        echo "user $FTPUSER $FTPPWD"        ; \
47481        echo "pass"                         ; \
47482        echo "bin"                          ; \
47483        echo "get $FTPPATH $tmpfile"              ; \
47484    ) | ftp -in $FTPSERVER
47485  fi
47486  if test "x$VALID_TOOL" != xyes; then
47487    as_fn_error $? "I do not know how to use the tool: $BDEPS_FTP" "$LINENO" 5
47488  fi
47489
47490    mv $tmpfile $installdir/$filename
47491    if test ! -s $installdir/$filename; then
47492      as_fn_error $? "Could not download $with_builddeps_server/$resource" "$LINENO" 5
47493    fi
47494    case "$extension" in
47495      zip)  echo "Unzipping $installdir/$filename..."
47496        (cd $installdir ; rm -f $installdir/$filename.unpacked ; $BDEPS_UNZIP $installdir/$filename > /dev/null && touch $installdir/$filename.unpacked)
47497        ;;
47498      tar.gz) echo "Untaring $installdir/$filename..."
47499        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47500        ;;
47501      tgz) echo "Untaring $installdir/$filename..."
47502        (cd $installdir ; rm -f $installdir/$filename.unpacked ; tar xzf $installdir/$filename && touch $installdir/$filename.unpacked)
47503        ;;
47504      *) as_fn_error $? "Cannot handle build depency archive with extension $extension" "$LINENO" 5
47505        ;;
47506    esac
47507  fi
47508  if test -f $installdir/$filename.unpacked; then
47509    depdir=$installdir
47510  fi
47511
47512      fi
47513      # Source the builddeps file again, because in the previous command, the depdir
47514      # was updated to point at the current build dependency install directory.
47515      . $builddepsfile
47516      # Now extract variables from the builddeps.conf files.
47517      theroot=${builddep_alsa_ROOT}
47518      thecflags=${builddep_alsa_CFLAGS}
47519      thelibs=${builddep_alsa_LIBS}
47520      if test "x$depdir" = x; then
47521        as_fn_error $? "Could not download build dependency alsa" "$LINENO" 5
47522      fi
47523      ALSA=$depdir
47524      if test "x$theroot" != x; then
47525        ALSA="$theroot"
47526      fi
47527      if test "x$thecflags" != x; then
47528        ALSA_CFLAGS="$thecflags"
47529      fi
47530      if test "x$thelibs" != x; then
47531        ALSA_LIBS="$thelibs"
47532      fi
47533      ALSA_FOUND=yes
47534      else ALSA_FOUND=no
47535
47536    fi
47537    else ALSA_FOUND=no
47538
47539  fi
47540
47541    fi
47542    # Do not try pkg-config if we have a sysroot set.
47543    if test "x$SYSROOT" = x; then
47544      if test "x$ALSA_FOUND" = xno; then
47545
47546pkg_failed=no
47547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
47548$as_echo_n "checking for ALSA... " >&6; }
47549
47550if test -n "$ALSA_CFLAGS"; then
47551    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
47552 elif test -n "$PKG_CONFIG"; then
47553    if test -n "$PKG_CONFIG" && \
47554    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47555  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47556  ac_status=$?
47557  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47558  test $ac_status = 0; }; then
47559  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
47560else
47561  pkg_failed=yes
47562fi
47563 else
47564    pkg_failed=untried
47565fi
47566if test -n "$ALSA_LIBS"; then
47567    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
47568 elif test -n "$PKG_CONFIG"; then
47569    if test -n "$PKG_CONFIG" && \
47570    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
47571  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
47572  ac_status=$?
47573  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47574  test $ac_status = 0; }; then
47575  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
47576else
47577  pkg_failed=yes
47578fi
47579 else
47580    pkg_failed=untried
47581fi
47582
47583
47584
47585if test $pkg_failed = yes; then
47586
47587if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47588        _pkg_short_errors_supported=yes
47589else
47590        _pkg_short_errors_supported=no
47591fi
47592        if test $_pkg_short_errors_supported = yes; then
47593	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
47594        else
47595	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
47596        fi
47597	# Put the nasty error message in config.log where it belongs
47598	echo "$ALSA_PKG_ERRORS" >&5
47599
47600	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47601$as_echo "no" >&6; }
47602                ALSA_FOUND=no
47603elif test $pkg_failed = untried; then
47604	ALSA_FOUND=no
47605else
47606	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
47607	ALSA_LIBS=$pkg_cv_ALSA_LIBS
47608        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47609$as_echo "yes" >&6; }
47610	ALSA_FOUND=yes
47611fi
47612      fi
47613    fi
47614    if test "x$ALSA_FOUND" = xno; then
47615      for ac_header in alsa/asoundlib.h
47616do :
47617  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
47618if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
47619  cat >>confdefs.h <<_ACEOF
47620#define HAVE_ALSA_ASOUNDLIB_H 1
47621_ACEOF
47622
47623            ALSA_FOUND=yes
47624            ALSA_CFLAGS=-Iignoreme
47625            ALSA_LIBS=-lasound
47626            DEFAULT_ALSA=yes
47627
47628else
47629  ALSA_FOUND=no
47630fi
47631
47632done
47633
47634    fi
47635    if test "x$ALSA_FOUND" = xno; then
47636
47637  # Print a helpful message on how to acquire the necessary build dependency.
47638  # alsa is the help tag: freetype, cups, pulse, alsa etc
47639  MISSING_DEPENDENCY=alsa
47640
47641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47642    cygwin_help $MISSING_DEPENDENCY
47643  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47644    msys_help $MISSING_DEPENDENCY
47645  else
47646    PKGHANDLER_COMMAND=
47647
47648    case $PKGHANDLER in
47649      apt-get)
47650        apt_help     $MISSING_DEPENDENCY ;;
47651      yum)
47652        yum_help     $MISSING_DEPENDENCY ;;
47653      port)
47654        port_help    $MISSING_DEPENDENCY ;;
47655      pkgutil)
47656        pkgutil_help $MISSING_DEPENDENCY ;;
47657      pkgadd)
47658        pkgadd_help  $MISSING_DEPENDENCY ;;
47659    esac
47660
47661    if test "x$PKGHANDLER_COMMAND" != x; then
47662      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
47663    fi
47664  fi
47665
47666      as_fn_error $? "Could not find alsa! $HELP_MSG " "$LINENO" 5
47667    fi
47668  fi
47669
47670
47671
47672
47673
47674
47675  ###############################################################################
47676  #
47677  # Check for the jpeg library
47678  #
47679
47680
47681# Check whether --with-libjpeg was given.
47682if test "${with_libjpeg+set}" = set; then :
47683  withval=$with_libjpeg;
47684fi
47685
47686
47687  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
47688$as_echo_n "checking for which libjpeg to use... " >&6; }
47689
47690  # default is bundled
47691  DEFAULT_LIBJPEG=bundled
47692
47693  #
47694  # if user didn't specify, use DEFAULT_LIBJPEG
47695  #
47696  if test "x${with_libjpeg}" = "x"; then
47697    with_libjpeg=${DEFAULT_LIBJPEG}
47698  fi
47699
47700  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
47701$as_echo "${with_libjpeg}" >&6; }
47702
47703  if test "x${with_libjpeg}" = "xbundled"; then
47704    USE_EXTERNAL_LIBJPEG=false
47705  elif test "x${with_libjpeg}" = "xsystem"; then
47706    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
47707if test "x$ac_cv_header_jpeglib_h" = xyes; then :
47708
47709else
47710   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
47711fi
47712
47713
47714    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
47715$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
47716if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
47717  $as_echo_n "(cached) " >&6
47718else
47719  ac_check_lib_save_LIBS=$LIBS
47720LIBS="-ljpeg  $LIBS"
47721cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47722/* end confdefs.h.  */
47723
47724/* Override any GCC internal prototype to avoid an error.
47725   Use char because int might match the return type of a GCC
47726   builtin and then its argument prototype would still apply.  */
47727#ifdef __cplusplus
47728extern "C"
47729#endif
47730char jpeg_CreateDecompress ();
47731int
47732main ()
47733{
47734return jpeg_CreateDecompress ();
47735  ;
47736  return 0;
47737}
47738_ACEOF
47739if ac_fn_cxx_try_link "$LINENO"; then :
47740  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
47741else
47742  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
47743fi
47744rm -f core conftest.err conftest.$ac_objext \
47745    conftest$ac_exeext conftest.$ac_ext
47746LIBS=$ac_check_lib_save_LIBS
47747fi
47748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
47749$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
47750if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
47751  cat >>confdefs.h <<_ACEOF
47752#define HAVE_LIBJPEG 1
47753_ACEOF
47754
47755  LIBS="-ljpeg $LIBS"
47756
47757else
47758   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
47759fi
47760
47761
47762    USE_EXTERNAL_LIBJPEG=true
47763  else
47764    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
47765  fi
47766
47767
47768
47769  ###############################################################################
47770  #
47771  # Check for the gif library
47772  #
47773
47774
47775# Check whether --with-giflib was given.
47776if test "${with_giflib+set}" = set; then :
47777  withval=$with_giflib;
47778fi
47779
47780
47781
47782  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
47783$as_echo_n "checking for which giflib to use... " >&6; }
47784
47785  # default is bundled
47786  DEFAULT_GIFLIB=bundled
47787
47788  #
47789  # if user didn't specify, use DEFAULT_GIFLIB
47790  #
47791  if test "x${with_giflib}" = "x"; then
47792    with_giflib=${DEFAULT_GIFLIB}
47793  fi
47794
47795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
47796$as_echo "${with_giflib}" >&6; }
47797
47798  if test "x${with_giflib}" = "xbundled"; then
47799    USE_EXTERNAL_LIBGIF=false
47800  elif test "x${with_giflib}" = "xsystem"; then
47801    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
47802if test "x$ac_cv_header_gif_lib_h" = xyes; then :
47803
47804else
47805   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
47806fi
47807
47808
47809    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
47810$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
47811if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
47812  $as_echo_n "(cached) " >&6
47813else
47814  ac_check_lib_save_LIBS=$LIBS
47815LIBS="-lgif  $LIBS"
47816cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47817/* end confdefs.h.  */
47818
47819/* Override any GCC internal prototype to avoid an error.
47820   Use char because int might match the return type of a GCC
47821   builtin and then its argument prototype would still apply.  */
47822#ifdef __cplusplus
47823extern "C"
47824#endif
47825char DGifGetCode ();
47826int
47827main ()
47828{
47829return DGifGetCode ();
47830  ;
47831  return 0;
47832}
47833_ACEOF
47834if ac_fn_cxx_try_link "$LINENO"; then :
47835  ac_cv_lib_gif_DGifGetCode=yes
47836else
47837  ac_cv_lib_gif_DGifGetCode=no
47838fi
47839rm -f core conftest.err conftest.$ac_objext \
47840    conftest$ac_exeext conftest.$ac_ext
47841LIBS=$ac_check_lib_save_LIBS
47842fi
47843{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
47844$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
47845if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
47846  cat >>confdefs.h <<_ACEOF
47847#define HAVE_LIBGIF 1
47848_ACEOF
47849
47850  LIBS="-lgif $LIBS"
47851
47852else
47853   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
47854fi
47855
47856
47857    USE_EXTERNAL_LIBGIF=true
47858  else
47859    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
47860  fi
47861
47862
47863  ###############################################################################
47864  #
47865  # Check for the lcms2 library
47866  #
47867
47868
47869# Check whether --with-lcms was given.
47870if test "${with_lcms+set}" = set; then :
47871  withval=$with_lcms;
47872fi
47873
47874
47875  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
47876$as_echo_n "checking for which lcms to use... " >&6; }
47877
47878  DEFAULT_LCMS=bundled
47879
47880  #
47881  # If user didn't specify, use DEFAULT_LCMS
47882  #
47883  if test "x${with_lcms}" = "x"; then
47884      with_lcms=${DEFAULT_LCMS}
47885  fi
47886
47887  if test "x${with_lcms}" = "xbundled"; then
47888    USE_EXTERNAL_LCMS=false
47889    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
47890$as_echo "bundled" >&6; }
47891  elif test "x${with_lcms}" = "xsystem"; then
47892    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
47893$as_echo "system" >&6; }
47894
47895pkg_failed=no
47896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
47897$as_echo_n "checking for LCMS... " >&6; }
47898
47899if test -n "$LCMS_CFLAGS"; then
47900    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
47901 elif test -n "$PKG_CONFIG"; then
47902    if test -n "$PKG_CONFIG" && \
47903    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47904  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47905  ac_status=$?
47906  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47907  test $ac_status = 0; }; then
47908  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
47909else
47910  pkg_failed=yes
47911fi
47912 else
47913    pkg_failed=untried
47914fi
47915if test -n "$LCMS_LIBS"; then
47916    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
47917 elif test -n "$PKG_CONFIG"; then
47918    if test -n "$PKG_CONFIG" && \
47919    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
47920  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
47921  ac_status=$?
47922  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
47923  test $ac_status = 0; }; then
47924  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
47925else
47926  pkg_failed=yes
47927fi
47928 else
47929    pkg_failed=untried
47930fi
47931
47932
47933
47934if test $pkg_failed = yes; then
47935
47936if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
47937        _pkg_short_errors_supported=yes
47938else
47939        _pkg_short_errors_supported=no
47940fi
47941        if test $_pkg_short_errors_supported = yes; then
47942	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
47943        else
47944	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
47945        fi
47946	# Put the nasty error message in config.log where it belongs
47947	echo "$LCMS_PKG_ERRORS" >&5
47948
47949	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47950$as_echo "no" >&6; }
47951                LCMS_FOUND=no
47952elif test $pkg_failed = untried; then
47953	LCMS_FOUND=no
47954else
47955	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
47956	LCMS_LIBS=$pkg_cv_LCMS_LIBS
47957        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47958$as_echo "yes" >&6; }
47959	LCMS_FOUND=yes
47960fi
47961    if test "x${LCMS_FOUND}" = "xyes"; then
47962      USE_EXTERNAL_LCMS=true
47963    else
47964      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
47965    fi
47966  else
47967    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
47968  fi
47969
47970
47971
47972  ###############################################################################
47973  #
47974  # Check for the png library
47975  #
47976
47977
47978# Check whether --with-libpng was given.
47979if test "${with_libpng+set}" = set; then :
47980  withval=$with_libpng;
47981fi
47982
47983
47984
47985  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
47986$as_echo_n "checking for which libpng to use... " >&6; }
47987
47988  # default is bundled
47989  DEFAULT_LIBPNG=bundled
47990
47991  #
47992  # if user didn't specify, use DEFAULT_LIBPNG
47993  #
47994  if test "x${with_libpng}" = "x"; then
47995      with_libpng=${DEFAULT_LIBPNG}
47996  fi
47997
47998  if test "x${with_libpng}" = "xbundled"; then
47999      USE_EXTERNAL_LIBPNG=false
48000      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48001$as_echo "bundled" >&6; }
48002  elif test "x${with_libpng}" = "xsystem"; then
48003
48004pkg_failed=no
48005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
48006$as_echo_n "checking for PNG... " >&6; }
48007
48008if test -n "$PNG_CFLAGS"; then
48009    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
48010 elif test -n "$PKG_CONFIG"; then
48011    if test -n "$PKG_CONFIG" && \
48012    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48013  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48014  ac_status=$?
48015  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48016  test $ac_status = 0; }; then
48017  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
48018else
48019  pkg_failed=yes
48020fi
48021 else
48022    pkg_failed=untried
48023fi
48024if test -n "$PNG_LIBS"; then
48025    pkg_cv_PNG_LIBS="$PNG_LIBS"
48026 elif test -n "$PKG_CONFIG"; then
48027    if test -n "$PKG_CONFIG" && \
48028    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
48029  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
48030  ac_status=$?
48031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48032  test $ac_status = 0; }; then
48033  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
48034else
48035  pkg_failed=yes
48036fi
48037 else
48038    pkg_failed=untried
48039fi
48040
48041
48042
48043if test $pkg_failed = yes; then
48044
48045if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48046        _pkg_short_errors_supported=yes
48047else
48048        _pkg_short_errors_supported=no
48049fi
48050        if test $_pkg_short_errors_supported = yes; then
48051	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
48052        else
48053	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
48054        fi
48055	# Put the nasty error message in config.log where it belongs
48056	echo "$PNG_PKG_ERRORS" >&5
48057
48058	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48059$as_echo "no" >&6; }
48060                 LIBPNG_FOUND=no
48061elif test $pkg_failed = untried; then
48062	 LIBPNG_FOUND=no
48063else
48064	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
48065	PNG_LIBS=$pkg_cv_PNG_LIBS
48066        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48067$as_echo "yes" >&6; }
48068	 LIBPNG_FOUND=yes
48069fi
48070      if test "x${LIBPNG_FOUND}" = "xyes"; then
48071          USE_EXTERNAL_LIBPNG=true
48072          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48073$as_echo "system" >&6; }
48074      else
48075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48076$as_echo "system not found" >&6; }
48077          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
48078      fi
48079  else
48080      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
48081  fi
48082
48083
48084  ###############################################################################
48085  #
48086  # Check for the zlib library
48087  #
48088
48089
48090# Check whether --with-zlib was given.
48091if test "${with_zlib+set}" = set; then :
48092  withval=$with_zlib;
48093fi
48094
48095
48096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
48097$as_echo_n "checking for compress in -lz... " >&6; }
48098if ${ac_cv_lib_z_compress+:} false; then :
48099  $as_echo_n "(cached) " >&6
48100else
48101  ac_check_lib_save_LIBS=$LIBS
48102LIBS="-lz  $LIBS"
48103cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48104/* end confdefs.h.  */
48105
48106/* Override any GCC internal prototype to avoid an error.
48107   Use char because int might match the return type of a GCC
48108   builtin and then its argument prototype would still apply.  */
48109#ifdef __cplusplus
48110extern "C"
48111#endif
48112char compress ();
48113int
48114main ()
48115{
48116return compress ();
48117  ;
48118  return 0;
48119}
48120_ACEOF
48121if ac_fn_cxx_try_link "$LINENO"; then :
48122  ac_cv_lib_z_compress=yes
48123else
48124  ac_cv_lib_z_compress=no
48125fi
48126rm -f core conftest.err conftest.$ac_objext \
48127    conftest$ac_exeext conftest.$ac_ext
48128LIBS=$ac_check_lib_save_LIBS
48129fi
48130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
48131$as_echo "$ac_cv_lib_z_compress" >&6; }
48132if test "x$ac_cv_lib_z_compress" = xyes; then :
48133   ZLIB_FOUND=yes
48134else
48135   ZLIB_FOUND=no
48136fi
48137
48138
48139  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
48140$as_echo_n "checking for which zlib to use... " >&6; }
48141
48142  DEFAULT_ZLIB=bundled
48143  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48144    #
48145    # On macosx default is system...on others default is
48146    #
48147    DEFAULT_ZLIB=system
48148  fi
48149
48150  if test "x${ZLIB_FOUND}" != "xyes"; then
48151    #
48152    # If we don't find any system...set default to bundled
48153    #
48154    DEFAULT_ZLIB=bundled
48155  fi
48156
48157  #
48158  # If user didn't specify, use DEFAULT_ZLIB
48159  #
48160  if test "x${with_zlib}" = "x"; then
48161    with_zlib=${DEFAULT_ZLIB}
48162  fi
48163
48164  if test "x${with_zlib}" = "xbundled"; then
48165    USE_EXTERNAL_LIBZ=false
48166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
48167$as_echo "bundled" >&6; }
48168  elif test "x${with_zlib}" = "xsystem"; then
48169    if test "x${ZLIB_FOUND}" = "xyes"; then
48170      USE_EXTERNAL_LIBZ=true
48171      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
48172$as_echo "system" >&6; }
48173    else
48174      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
48175$as_echo "system not found" >&6; }
48176      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
48177    fi
48178  else
48179    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
48180  fi
48181
48182
48183
48184  ###############################################################################
48185  LIBZIP_CAN_USE_MMAP=true
48186
48187
48188
48189  ###############################################################################
48190  #
48191  # Check if altzone exists in time.h
48192  #
48193
48194  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48195/* end confdefs.h.  */
48196#include <time.h>
48197int
48198main ()
48199{
48200return (int)altzone;
48201  ;
48202  return 0;
48203}
48204_ACEOF
48205if ac_fn_cxx_try_link "$LINENO"; then :
48206  has_altzone=yes
48207else
48208  has_altzone=no
48209fi
48210rm -f core conftest.err conftest.$ac_objext \
48211    conftest$ac_exeext conftest.$ac_ext
48212  if test "x$has_altzone" = xyes; then
48213
48214$as_echo "#define HAVE_ALTZONE 1" >>confdefs.h
48215
48216  fi
48217
48218  ###############################################################################
48219  #
48220  # Check the maths library
48221  #
48222
48223  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
48224$as_echo_n "checking for cos in -lm... " >&6; }
48225if ${ac_cv_lib_m_cos+:} false; then :
48226  $as_echo_n "(cached) " >&6
48227else
48228  ac_check_lib_save_LIBS=$LIBS
48229LIBS="-lm  $LIBS"
48230cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48231/* end confdefs.h.  */
48232
48233/* Override any GCC internal prototype to avoid an error.
48234   Use char because int might match the return type of a GCC
48235   builtin and then its argument prototype would still apply.  */
48236#ifdef __cplusplus
48237extern "C"
48238#endif
48239char cos ();
48240int
48241main ()
48242{
48243return cos ();
48244  ;
48245  return 0;
48246}
48247_ACEOF
48248if ac_fn_cxx_try_link "$LINENO"; then :
48249  ac_cv_lib_m_cos=yes
48250else
48251  ac_cv_lib_m_cos=no
48252fi
48253rm -f core conftest.err conftest.$ac_objext \
48254    conftest$ac_exeext conftest.$ac_ext
48255LIBS=$ac_check_lib_save_LIBS
48256fi
48257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
48258$as_echo "$ac_cv_lib_m_cos" >&6; }
48259if test "x$ac_cv_lib_m_cos" = xyes; then :
48260  cat >>confdefs.h <<_ACEOF
48261#define HAVE_LIBM 1
48262_ACEOF
48263
48264  LIBS="-lm $LIBS"
48265
48266else
48267
48268        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
48269$as_echo "$as_me: Maths library was not found" >&6;}
48270
48271
48272fi
48273
48274
48275
48276  ###############################################################################
48277  #
48278  # Check for libdl.so
48279
48280  save_LIBS="$LIBS"
48281  LIBS=""
48282  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
48283$as_echo_n "checking for dlopen in -ldl... " >&6; }
48284if ${ac_cv_lib_dl_dlopen+:} false; then :
48285  $as_echo_n "(cached) " >&6
48286else
48287  ac_check_lib_save_LIBS=$LIBS
48288LIBS="-ldl  $LIBS"
48289cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48290/* end confdefs.h.  */
48291
48292/* Override any GCC internal prototype to avoid an error.
48293   Use char because int might match the return type of a GCC
48294   builtin and then its argument prototype would still apply.  */
48295#ifdef __cplusplus
48296extern "C"
48297#endif
48298char dlopen ();
48299int
48300main ()
48301{
48302return dlopen ();
48303  ;
48304  return 0;
48305}
48306_ACEOF
48307if ac_fn_cxx_try_link "$LINENO"; then :
48308  ac_cv_lib_dl_dlopen=yes
48309else
48310  ac_cv_lib_dl_dlopen=no
48311fi
48312rm -f core conftest.err conftest.$ac_objext \
48313    conftest$ac_exeext conftest.$ac_ext
48314LIBS=$ac_check_lib_save_LIBS
48315fi
48316{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
48317$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
48318if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
48319  cat >>confdefs.h <<_ACEOF
48320#define HAVE_LIBDL 1
48321_ACEOF
48322
48323  LIBS="-ldl $LIBS"
48324
48325fi
48326
48327  LIBDL="$LIBS"
48328
48329  LIBS="$save_LIBS"
48330
48331
48332  ###############################################################################
48333  #
48334  # statically link libstdc++ before C++ ABI is stablized on Linux unless
48335  # dynamic build is configured on command line.
48336  #
48337
48338# Check whether --with-stdc++lib was given.
48339if test "${with_stdc__lib+set}" = set; then :
48340  withval=$with_stdc__lib;
48341        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
48342                && test "x$with_stdc__lib" != xdefault; then
48343          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
48344        fi
48345
48346else
48347  with_stdc__lib=default
48348
48349fi
48350
48351
48352  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48353    # Test if -lstdc++ works.
48354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
48355$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
48356    ac_ext=cpp
48357ac_cpp='$CXXCPP $CPPFLAGS'
48358ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48359ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48360ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48361
48362    OLD_CXXFLAGS="$CXXFLAGS"
48363    CXXFLAGS="$CXXFLAGS -lstdc++"
48364    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48365/* end confdefs.h.  */
48366
48367int
48368main ()
48369{
48370return 0;
48371  ;
48372  return 0;
48373}
48374_ACEOF
48375if ac_fn_cxx_try_link "$LINENO"; then :
48376  has_dynamic_libstdcxx=yes
48377else
48378  has_dynamic_libstdcxx=no
48379fi
48380rm -f core conftest.err conftest.$ac_objext \
48381    conftest$ac_exeext conftest.$ac_ext
48382    CXXFLAGS="$OLD_CXXFLAGS"
48383    ac_ext=cpp
48384ac_cpp='$CXXCPP $CPPFLAGS'
48385ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48386ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48387ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48388
48389    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
48390$as_echo "$has_dynamic_libstdcxx" >&6; }
48391
48392    # Test if stdc++ can be linked statically.
48393    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
48394$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
48395    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
48396    ac_ext=cpp
48397ac_cpp='$CXXCPP $CPPFLAGS'
48398ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48399ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48400ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48401
48402    OLD_LIBS="$LIBS"
48403    OLD_CXX="$CXX"
48404    LIBS="$STATIC_STDCXX_FLAGS"
48405    CXX="$CC"
48406    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48407/* end confdefs.h.  */
48408
48409int
48410main ()
48411{
48412return 0;
48413  ;
48414  return 0;
48415}
48416_ACEOF
48417if ac_fn_cxx_try_link "$LINENO"; then :
48418  has_static_libstdcxx=yes
48419else
48420  has_static_libstdcxx=no
48421fi
48422rm -f core conftest.err conftest.$ac_objext \
48423    conftest$ac_exeext conftest.$ac_ext
48424    LIBS="$OLD_LIBS"
48425    CXX="$OLD_CXX"
48426    ac_ext=cpp
48427ac_cpp='$CXXCPP $CPPFLAGS'
48428ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48429ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48430ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48431
48432    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
48433$as_echo "$has_static_libstdcxx" >&6; }
48434
48435    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
48436      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
48437    fi
48438
48439    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
48440      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
48441    fi
48442
48443    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
48444      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
48445    fi
48446
48447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
48448$as_echo_n "checking how to link with libstdc++... " >&6; }
48449    # If dynamic was requested, it's available since it would fail above otherwise.
48450    # If dynamic wasn't requested, go with static unless it isn't available.
48451    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48452      LIBCXX="$LIBCXX -lstdc++"
48453      LDCXX="$CXX"
48454      STATIC_CXX_SETTING="STATIC_CXX=false"
48455      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
48456$as_echo "dynamic" >&6; }
48457    else
48458      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
48459      LDCXX="$CC"
48460      STATIC_CXX_SETTING="STATIC_CXX=true"
48461      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
48462$as_echo "static" >&6; }
48463    fi
48464  fi
48465
48466
48467  if test "x$JVM_VARIANT_ZERO" = xtrue || test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48468    # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
48469
48470pkg_failed=no
48471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
48472$as_echo_n "checking for LIBFFI... " >&6; }
48473
48474if test -n "$LIBFFI_CFLAGS"; then
48475    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
48476 elif test -n "$PKG_CONFIG"; then
48477    if test -n "$PKG_CONFIG" && \
48478    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48479  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48480  ac_status=$?
48481  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48482  test $ac_status = 0; }; then
48483  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
48484else
48485  pkg_failed=yes
48486fi
48487 else
48488    pkg_failed=untried
48489fi
48490if test -n "$LIBFFI_LIBS"; then
48491    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
48492 elif test -n "$PKG_CONFIG"; then
48493    if test -n "$PKG_CONFIG" && \
48494    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
48495  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
48496  ac_status=$?
48497  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
48498  test $ac_status = 0; }; then
48499  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
48500else
48501  pkg_failed=yes
48502fi
48503 else
48504    pkg_failed=untried
48505fi
48506
48507
48508
48509if test $pkg_failed = yes; then
48510
48511if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
48512        _pkg_short_errors_supported=yes
48513else
48514        _pkg_short_errors_supported=no
48515fi
48516        if test $_pkg_short_errors_supported = yes; then
48517	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
48518        else
48519	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
48520        fi
48521	# Put the nasty error message in config.log where it belongs
48522	echo "$LIBFFI_PKG_ERRORS" >&5
48523
48524	as_fn_error $? "Package requirements (libffi) were not met:
48525
48526$LIBFFI_PKG_ERRORS
48527
48528Consider adjusting the PKG_CONFIG_PATH environment variable if you
48529installed software in a non-standard prefix.
48530
48531Alternatively, you may set the environment variables LIBFFI_CFLAGS
48532and LIBFFI_LIBS to avoid the need to call pkg-config.
48533See the pkg-config man page for more details.
48534" "$LINENO" 5
48535elif test $pkg_failed = untried; then
48536	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48537$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48538as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
48539is in your PATH or set the PKG_CONFIG environment variable to the full
48540path to pkg-config.
48541
48542Alternatively, you may set the environment variables LIBFFI_CFLAGS
48543and LIBFFI_LIBS to avoid the need to call pkg-config.
48544See the pkg-config man page for more details.
48545
48546To get pkg-config, see <http://pkg-config.freedesktop.org/>.
48547See \`config.log' for more details" "$LINENO" 5; }
48548else
48549	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
48550	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
48551        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48552$as_echo "yes" >&6; }
48553	:
48554fi
48555
48556  fi
48557
48558  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
48559    # Extract the first word of "llvm-config", so it can be a program name with args.
48560set dummy llvm-config; ac_word=$2
48561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48562$as_echo_n "checking for $ac_word... " >&6; }
48563if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
48564  $as_echo_n "(cached) " >&6
48565else
48566  if test -n "$LLVM_CONFIG"; then
48567  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
48568else
48569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48570for as_dir in $PATH
48571do
48572  IFS=$as_save_IFS
48573  test -z "$as_dir" && as_dir=.
48574    for ac_exec_ext in '' $ac_executable_extensions; do
48575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48576    ac_cv_prog_LLVM_CONFIG="llvm-config"
48577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48578    break 2
48579  fi
48580done
48581  done
48582IFS=$as_save_IFS
48583
48584fi
48585fi
48586LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
48587if test -n "$LLVM_CONFIG"; then
48588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
48589$as_echo "$LLVM_CONFIG" >&6; }
48590else
48591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48592$as_echo "no" >&6; }
48593fi
48594
48595
48596
48597    if test "x$LLVM_CONFIG" != xllvm-config; then
48598      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
48599    fi
48600
48601    llvm_components="jit mcjit engine nativecodegen native"
48602    unset LLVM_CFLAGS
48603    for flag in $("$LLVM_CONFIG" --cxxflags); do
48604      if echo "${flag}" | grep -q '^-[ID]'; then
48605        if test "${flag}" != "-D_DEBUG" ; then
48606          if test "${LLVM_CFLAGS}" != "" ; then
48607            LLVM_CFLAGS="${LLVM_CFLAGS} "
48608          fi
48609          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
48610        fi
48611      fi
48612    done
48613    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
48614    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
48615
48616    unset LLVM_LDFLAGS
48617    for flag in $("${LLVM_CONFIG}" --ldflags); do
48618      if echo "${flag}" | grep -q '^-L'; then
48619        if test "${LLVM_LDFLAGS}" != ""; then
48620          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
48621        fi
48622        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
48623      fi
48624    done
48625
48626    unset LLVM_LIBS
48627    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
48628      if echo "${flag}" | grep -q '^-l'; then
48629        if test "${LLVM_LIBS}" != ""; then
48630          LLVM_LIBS="${LLVM_LIBS} "
48631        fi
48632        LLVM_LIBS="${LLVM_LIBS}${flag}"
48633      fi
48634    done
48635
48636
48637
48638
48639  fi
48640
48641  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
48642  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
48643    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
48644  fi
48645
48646  # TODO better (platform agnostic) test
48647  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
48648    LIBCXX="-lstdc++"
48649  fi
48650
48651
48652
48653
48654  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
48655
48656
48657# Check whether --with-msvcr-dll was given.
48658if test "${with_msvcr_dll+set}" = set; then :
48659  withval=$with_msvcr_dll;
48660fi
48661
48662
48663  if test "x$with_msvcr_dll" != x; then
48664    # If given explicitely by user, do not probe. If not present, fail directly.
48665
48666  POSSIBLE_MSVCR_DLL="$with_msvcr_dll"
48667  METHOD="--with-msvcr-dll"
48668  if test -e "$POSSIBLE_MSVCR_DLL"; then
48669    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48670$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48671
48672    # Need to check if the found msvcr is correct architecture
48673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48674$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48675    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48676    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48677      CORRECT_MSVCR_ARCH=386
48678    else
48679      CORRECT_MSVCR_ARCH=x86-64
48680    fi
48681    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48682      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48683$as_echo "ok" >&6; }
48684      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48685      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48686$as_echo_n "checking for msvcr100.dll... " >&6; }
48687      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48688$as_echo "$MSVCR_DLL" >&6; }
48689    else
48690      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48691$as_echo "incorrect, ignoring" >&6; }
48692      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48693$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48694    fi
48695  fi
48696
48697    if test "x$MSVCR_DLL" = x; then
48698      as_fn_error $? "Could not find a proper msvcr100.dll as specified by --with-msvcr-dll" "$LINENO" 5
48699    fi
48700  fi
48701
48702  if test "x$MSVCR_DLL" = x; then
48703    # Probe: Using well-known location from Visual Studio 10.0
48704    if test "x$VCINSTALLDIR" != x; then
48705      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
48706
48707  windows_path="$CYGWIN_VC_INSTALL_DIR"
48708  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48709    unix_path=`$CYGPATH -u "$windows_path"`
48710    CYGWIN_VC_INSTALL_DIR="$unix_path"
48711  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48712    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48713    CYGWIN_VC_INSTALL_DIR="$unix_path"
48714  fi
48715
48716      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48717        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC100.CRT/msvcr100.dll"
48718      else
48719        POSSIBLE_MSVCR_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC100.CRT/msvcr100.dll"
48720      fi
48721
48722  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48723  METHOD="well-known location in VCINSTALLDIR"
48724  if test -e "$POSSIBLE_MSVCR_DLL"; then
48725    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48726$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48727
48728    # Need to check if the found msvcr is correct architecture
48729    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48730$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48731    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48732    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48733      CORRECT_MSVCR_ARCH=386
48734    else
48735      CORRECT_MSVCR_ARCH=x86-64
48736    fi
48737    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48738      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48739$as_echo "ok" >&6; }
48740      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48741      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48742$as_echo_n "checking for msvcr100.dll... " >&6; }
48743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48744$as_echo "$MSVCR_DLL" >&6; }
48745    else
48746      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48747$as_echo "incorrect, ignoring" >&6; }
48748      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48749$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48750    fi
48751  fi
48752
48753    fi
48754  fi
48755
48756  if test "x$MSVCR_DLL" = x; then
48757    # Probe: Check in the Boot JDK directory.
48758    POSSIBLE_MSVCR_DLL="$BOOT_JDK/bin/msvcr100.dll"
48759
48760  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48761  METHOD="well-known location in Boot JDK"
48762  if test -e "$POSSIBLE_MSVCR_DLL"; then
48763    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48764$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48765
48766    # Need to check if the found msvcr is correct architecture
48767    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48768$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48769    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48770    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48771      CORRECT_MSVCR_ARCH=386
48772    else
48773      CORRECT_MSVCR_ARCH=x86-64
48774    fi
48775    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48776      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48777$as_echo "ok" >&6; }
48778      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48779      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48780$as_echo_n "checking for msvcr100.dll... " >&6; }
48781      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48782$as_echo "$MSVCR_DLL" >&6; }
48783    else
48784      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48785$as_echo "incorrect, ignoring" >&6; }
48786      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48787$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48788    fi
48789  fi
48790
48791  fi
48792
48793  if test "x$MSVCR_DLL" = x; then
48794    # Probe: Look in the Windows system32 directory
48795    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
48796
48797  windows_path="$CYGWIN_SYSTEMROOT"
48798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48799    unix_path=`$CYGPATH -u "$windows_path"`
48800    CYGWIN_SYSTEMROOT="$unix_path"
48801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48802    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48803    CYGWIN_SYSTEMROOT="$unix_path"
48804  fi
48805
48806    POSSIBLE_MSVCR_DLL="$CYGWIN_SYSTEMROOT/system32/msvcr100.dll"
48807
48808  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48809  METHOD="well-known location in SYSTEMROOT"
48810  if test -e "$POSSIBLE_MSVCR_DLL"; then
48811    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48812$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48813
48814    # Need to check if the found msvcr is correct architecture
48815    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48816$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48817    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48818    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48819      CORRECT_MSVCR_ARCH=386
48820    else
48821      CORRECT_MSVCR_ARCH=x86-64
48822    fi
48823    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48825$as_echo "ok" >&6; }
48826      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48827      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48828$as_echo_n "checking for msvcr100.dll... " >&6; }
48829      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48830$as_echo "$MSVCR_DLL" >&6; }
48831    else
48832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48833$as_echo "incorrect, ignoring" >&6; }
48834      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48835$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48836    fi
48837  fi
48838
48839  fi
48840
48841  if test "x$MSVCR_DLL" = x; then
48842    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
48843    if test "x$VS100COMNTOOLS" != x; then
48844      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
48845
48846  windows_path="$CYGWIN_VS_TOOLS_DIR"
48847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48848    unix_path=`$CYGPATH -u "$windows_path"`
48849    CYGWIN_VS_TOOLS_DIR="$unix_path"
48850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48852    CYGWIN_VS_TOOLS_DIR="$unix_path"
48853  fi
48854
48855      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48856        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x64/ | $HEAD --lines 1`
48857      else
48858        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name msvcr100.dll | $GREP -i /x86/ | $HEAD --lines 1`
48859      fi
48860
48861  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48862  METHOD="search of VS100COMNTOOLS"
48863  if test -e "$POSSIBLE_MSVCR_DLL"; then
48864    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48865$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48866
48867    # Need to check if the found msvcr is correct architecture
48868    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48869$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48870    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48871    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48872      CORRECT_MSVCR_ARCH=386
48873    else
48874      CORRECT_MSVCR_ARCH=x86-64
48875    fi
48876    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48878$as_echo "ok" >&6; }
48879      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48881$as_echo_n "checking for msvcr100.dll... " >&6; }
48882      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48883$as_echo "$MSVCR_DLL" >&6; }
48884    else
48885      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48886$as_echo "incorrect, ignoring" >&6; }
48887      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48888$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48889    fi
48890  fi
48891
48892    fi
48893  fi
48894
48895  if test "x$MSVCR_DLL" = x; then
48896    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
48897    # (This was the original behaviour; kept since it might turn up something)
48898    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
48899      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
48900        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x64 | $HEAD --lines 1`
48901      else
48902        POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
48903        if test "x$POSSIBLE_MSVCR_DLL" = x; then
48904          # We're grasping at straws now...
48905          POSSIBLE_MSVCR_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name msvcr100.dll | $HEAD --lines 1`
48906        fi
48907      fi
48908
48909
48910  POSSIBLE_MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48911  METHOD="search of VCINSTALLDIR"
48912  if test -e "$POSSIBLE_MSVCR_DLL"; then
48913    { $as_echo "$as_me:${as_lineno-$LINENO}: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&5
48914$as_echo "$as_me: Found msvcr100.dll at $POSSIBLE_MSVCR_DLL using $METHOD" >&6;}
48915
48916    # Need to check if the found msvcr is correct architecture
48917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found msvcr100.dll architecture" >&5
48918$as_echo_n "checking found msvcr100.dll architecture... " >&6; }
48919    MSVCR_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVCR_DLL"`
48920    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
48921      CORRECT_MSVCR_ARCH=386
48922    else
48923      CORRECT_MSVCR_ARCH=x86-64
48924    fi
48925    if $ECHO "$MSVCR_DLL_FILETYPE" | $GREP $CORRECT_MSVCR_ARCH 2>&1 > /dev/null; then
48926      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
48927$as_echo "ok" >&6; }
48928      MSVCR_DLL="$POSSIBLE_MSVCR_DLL"
48929      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48930$as_echo_n "checking for msvcr100.dll... " >&6; }
48931      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVCR_DLL" >&5
48932$as_echo "$MSVCR_DLL" >&6; }
48933    else
48934      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
48935$as_echo "incorrect, ignoring" >&6; }
48936      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&5
48937$as_echo "$as_me: The file type of the located msvcr100.dll is $MSVCR_DLL_FILETYPE" >&6;}
48938    fi
48939  fi
48940
48941    fi
48942  fi
48943
48944  if test "x$MSVCR_DLL" = x; then
48945    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msvcr100.dll" >&5
48946$as_echo_n "checking for msvcr100.dll... " >&6; }
48947    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48948$as_echo "no" >&6; }
48949    as_fn_error $? "Could not find msvcr100.dll. Please specify using --with-msvcr-dll." "$LINENO" 5
48950  fi
48951
48952
48953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48954
48955  # Input might be given as Windows format, start by converting to
48956  # unix format.
48957  path="$MSVCR_DLL"
48958  new_path=`$CYGPATH -u "$path"`
48959
48960  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48961  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48962  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48963  # "foo.exe" is OK but "foo" is an error.
48964  #
48965  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48966  # It is also a way to make sure we got the proper file name for the real test later on.
48967  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48968  if test "x$test_shortpath" = x; then
48969    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
48970$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
48971    as_fn_error $? "Cannot locate the the path of MSVCR_DLL" "$LINENO" 5
48972  fi
48973
48974  # Call helper function which possibly converts this using DOS-style short mode.
48975  # If so, the updated path is stored in $new_path.
48976
48977  input_path="$new_path"
48978  # Check if we need to convert this using DOS-style short mode. If the path
48979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48980  # take no chances and rewrite it.
48981  # Note: m4 eats our [], so we need to use [ and ] instead.
48982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48983  if test "x$has_forbidden_chars" != x; then
48984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48985    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48986    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48987    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48988      # Going to short mode and back again did indeed matter. Since short mode is
48989      # case insensitive, let's make it lowercase to improve readability.
48990      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48991      # Now convert it back to Unix-stile (cygpath)
48992      input_path=`$CYGPATH -u "$shortmode_path"`
48993      new_path="$input_path"
48994    fi
48995  fi
48996
48997  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48998  if test "x$test_cygdrive_prefix" = x; then
48999    # As a simple fix, exclude /usr/bin since it's not a real path.
49000    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
49001      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
49002      # a path prefixed by /cygdrive for fixpath to work.
49003      new_path="$CYGWIN_ROOT_PATH$input_path"
49004    fi
49005  fi
49006
49007
49008  if test "x$path" != "x$new_path"; then
49009    MSVCR_DLL="$new_path"
49010    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49011$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49012  fi
49013
49014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49015
49016  path="$MSVCR_DLL"
49017  has_colon=`$ECHO $path | $GREP ^.:`
49018  new_path="$path"
49019  if test "x$has_colon" = x; then
49020    # Not in mixed or Windows style, start by that.
49021    new_path=`cmd //c echo $path`
49022  fi
49023
49024
49025  input_path="$new_path"
49026  # Check if we need to convert this using DOS-style short mode. If the path
49027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
49028  # take no chances and rewrite it.
49029  # Note: m4 eats our [], so we need to use [ and ] instead.
49030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
49031  if test "x$has_forbidden_chars" != x; then
49032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
49033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
49034  fi
49035
49036
49037  windows_path="$new_path"
49038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49039    unix_path=`$CYGPATH -u "$windows_path"`
49040    new_path="$unix_path"
49041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
49043    new_path="$unix_path"
49044  fi
49045
49046  if test "x$path" != "x$new_path"; then
49047    MSVCR_DLL="$new_path"
49048    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVCR_DLL to \"$new_path\"" >&5
49049$as_echo "$as_me: Rewriting MSVCR_DLL to \"$new_path\"" >&6;}
49050  fi
49051
49052  # Save the first 10 bytes of this path to the storage, so fixpath can work.
49053  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
49054
49055  else
49056    # We're on a posix platform. Hooray! :)
49057    path="$MSVCR_DLL"
49058    has_space=`$ECHO "$path" | $GREP " "`
49059    if test "x$has_space" != x; then
49060      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&5
49061$as_echo "$as_me: The path of MSVCR_DLL, which resolves as \"$path\", is invalid." >&6;}
49062      as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
49063    fi
49064
49065    # Use eval to expand a potential ~
49066    eval path="$path"
49067    if test ! -f "$path" && test ! -d "$path"; then
49068      as_fn_error $? "The path of MSVCR_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
49069    fi
49070
49071    MSVCR_DLL="`cd "$path"; $THEPWDCMD -L`"
49072  fi
49073
49074
49075
49076
49077# Check whether --with-dxsdk was given.
49078if test "${with_dxsdk+set}" = set; then :
49079  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
49080$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
49081fi
49082
49083
49084
49085
49086# Check whether --with-dxsdk-lib was given.
49087if test "${with_dxsdk_lib+set}" = set; then :
49088  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
49089$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
49090fi
49091
49092
49093
49094
49095# Check whether --with-dxsdk-include was given.
49096if test "${with_dxsdk_include+set}" = set; then :
49097  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
49098$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
49099fi
49100
49101
49102  fi
49103
49104
49105
49106###############################################################################
49107#
49108# We need to do some final tweaking, when everything else is done.
49109#
49110###############################################################################
49111
49112
49113  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
49114
49115
49116  # The name of the Service Agent jar.
49117  SALIB_NAME="${LIBRARY_PREFIX}saproc${SHARED_LIBRARY_SUFFIX}"
49118  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
49119    SALIB_NAME="${LIBRARY_PREFIX}sawindbg${SHARED_LIBRARY_SUFFIX}"
49120  fi
49121
49122
49123
49124    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
49125$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
49126
49127    if test -d "${SRC_ROOT}/jdk/src/share/native/sun/security/ec/impl"; then
49128      ENABLE_INTREE_EC=yes
49129      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49130$as_echo "yes" >&6; }
49131    else
49132      ENABLE_INTREE_EC=no
49133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49134$as_echo "no" >&6; }
49135    fi
49136
49137
49138
49139
49140###############################################################################
49141#
49142# Configure parts of the build that only affect the build performance,
49143# not the result.
49144#
49145###############################################################################
49146
49147
49148  # How many cores do we have on this build system?
49149
49150# Check whether --with-num-cores was given.
49151if test "${with_num_cores+set}" = set; then :
49152  withval=$with_num_cores;
49153fi
49154
49155  if test "x$with_num_cores" = x; then
49156    # The number of cores were not specified, try to probe them.
49157
49158  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
49159$as_echo_n "checking for number of cores... " >&6; }
49160  NUM_CORES=1
49161  FOUND_CORES=no
49162
49163  if test -f /proc/cpuinfo; then
49164    # Looks like a Linux (or cygwin) system
49165    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
49166    FOUND_CORES=yes
49167  elif test -x /usr/sbin/psrinfo; then
49168    # Looks like a Solaris system
49169    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
49170    FOUND_CORES=yes
49171  elif test -x /usr/sbin/system_profiler; then
49172    # Looks like a MacOSX system
49173    NUM_CORES=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Cores' | awk  '{print $5}'`
49174    FOUND_CORES=yes
49175  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
49176    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
49177    FOUND_CORES=yes
49178  elif test -n "$NUMBER_OF_PROCESSORS"; then
49179    # On windows, look in the env
49180    NUM_CORES=$NUMBER_OF_PROCESSORS
49181    FOUND_CORES=yes
49182  fi
49183
49184  if test "x$FOUND_CORES" = xyes; then
49185    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
49186$as_echo "$NUM_CORES" >&6; }
49187  else
49188    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
49189$as_echo "could not detect number of cores, defaulting to 1" >&6; }
49190    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
49191$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
49192  fi
49193
49194  else
49195    NUM_CORES=$with_num_cores
49196  fi
49197
49198
49199
49200  # How much memory do we have on this build system?
49201
49202# Check whether --with-memory-size was given.
49203if test "${with_memory_size+set}" = set; then :
49204  withval=$with_memory_size;
49205fi
49206
49207  if test "x$with_memory_size" = x; then
49208    # The memory size was not specified, try to probe it.
49209
49210  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
49211$as_echo_n "checking for memory size... " >&6; }
49212  # Default to 1024 MB
49213  MEMORY_SIZE=1024
49214  FOUND_MEM=no
49215
49216  if test -f /proc/meminfo; then
49217    # Looks like a Linux (or cygwin) system
49218    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
49219    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
49220    FOUND_MEM=yes
49221  elif test -x /usr/sbin/prtconf; then
49222    # Looks like a Solaris or AIX system
49223    MEMORY_SIZE=`/usr/sbin/prtconf | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
49224    FOUND_MEM=yes
49225  elif test -x /usr/sbin/system_profiler; then
49226    # Looks like a MacOSX system
49227    MEMORY_SIZE=`/usr/sbin/system_profiler -detailLevel full SPHardwareDataType | grep 'Memory' | awk  '{print $2}'`
49228    MEMORY_SIZE=`expr $MEMORY_SIZE \* 1024`
49229    FOUND_MEM=yes
49230  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
49231    # Windows, but without cygwin
49232    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
49233    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
49234    FOUND_MEM=yes
49235  fi
49236
49237  if test "x$FOUND_MEM" = xyes; then
49238    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
49239$as_echo "$MEMORY_SIZE MB" >&6; }
49240  else
49241    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
49242$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
49243    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
49244$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
49245  fi
49246
49247  else
49248    MEMORY_SIZE=$with_memory_size
49249  fi
49250
49251
49252
49253  # Provide a decent default number of parallel jobs for make depending on
49254  # number of cores, amount of memory and machine architecture.
49255
49256# Check whether --with-jobs was given.
49257if test "${with_jobs+set}" = set; then :
49258  withval=$with_jobs;
49259fi
49260
49261  if test "x$with_jobs" = x; then
49262    # Number of jobs was not specified, calculate.
49263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
49264$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
49265    # Approximate memory in GB, rounding up a bit.
49266    memory_gb=`expr $MEMORY_SIZE / 1100`
49267    # Pick the lowest of memory in gb and number of cores.
49268    if test "$memory_gb" -lt "$NUM_CORES"; then
49269      JOBS="$memory_gb"
49270    else
49271      JOBS="$NUM_CORES"
49272      # On bigger machines, leave some room for other processes to run
49273      if test "$JOBS" -gt "4"; then
49274        JOBS=`expr $JOBS '*' 90 / 100`
49275      fi
49276    fi
49277    # Cap number of jobs to 16
49278    if test "$JOBS" -gt "16"; then
49279      JOBS=16
49280    fi
49281    if test "$JOBS" -eq "0"; then
49282      JOBS=1
49283    fi
49284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
49285$as_echo "$JOBS" >&6; }
49286  else
49287    JOBS=$with_jobs
49288  fi
49289
49290
49291
49292# Setup smart javac (after cores and memory have been setup)
49293
49294
49295# Check whether --with-sjavac-server-java was given.
49296if test "${with_sjavac_server_java+set}" = set; then :
49297  withval=$with_sjavac_server_java;
49298fi
49299
49300
49301  if test "x$with_sjavac_server_java" != x; then
49302    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
49303    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
49304    if test "x$FOUND_VERSION" = x; then
49305      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
49306    fi
49307  else
49308    SJAVAC_SERVER_JAVA=""
49309    # Hotspot specific options.
49310
49311  $ECHO "Check if jvm arg is ok: -verbosegc" >&5
49312  $ECHO "Command: $JAVA -verbosegc -version" >&5
49313  OUTPUT=`$JAVA -verbosegc -version 2>&1`
49314  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49315  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49316  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49317    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -verbosegc"
49318    JVM_ARG_OK=true
49319  else
49320    $ECHO "Arg failed:" >&5
49321    $ECHO "$OUTPUT" >&5
49322    JVM_ARG_OK=false
49323  fi
49324
49325    # JRockit specific options.
49326
49327  $ECHO "Check if jvm arg is ok: -Xverbose:gc" >&5
49328  $ECHO "Command: $JAVA -Xverbose:gc -version" >&5
49329  OUTPUT=`$JAVA -Xverbose:gc -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 -Xverbose:gc"
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    SJAVAC_SERVER_JAVA="$JAVA $SJAVAC_SERVER_JAVA"
49342  fi
49343
49344
49345  if test "$MEMORY_SIZE" -gt "2500"; then
49346
49347  $ECHO "Check if jvm arg is ok: -d64" >&5
49348  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
49349  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
49350  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49351  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49352  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49353    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -d64"
49354    JVM_ARG_OK=true
49355  else
49356    $ECHO "Arg failed:" >&5
49357    $ECHO "$OUTPUT" >&5
49358    JVM_ARG_OK=false
49359  fi
49360
49361    if test "$JVM_ARG_OK" = true; then
49362      JVM_64BIT=true
49363      JVM_ARG_OK=false
49364    fi
49365  fi
49366
49367  if test "$JVM_64BIT" = true; then
49368    if test "$MEMORY_SIZE" -gt "17000"; then
49369
49370  $ECHO "Check if jvm arg is ok: -Xms10G -Xmx10G" >&5
49371  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version" >&5
49372  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G -version 2>&1`
49373  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49374  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49375  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49376    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms10G -Xmx10G"
49377    JVM_ARG_OK=true
49378  else
49379    $ECHO "Arg failed:" >&5
49380    $ECHO "$OUTPUT" >&5
49381    JVM_ARG_OK=false
49382  fi
49383
49384    fi
49385    if test "$MEMORY_SIZE" -gt "10000" && test "$JVM_ARG_OK" = false; then
49386
49387  $ECHO "Check if jvm arg is ok: -Xms6G -Xmx6G" >&5
49388  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version" >&5
49389  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G -version 2>&1`
49390  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49391  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49392  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49393    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms6G -Xmx6G"
49394    JVM_ARG_OK=true
49395  else
49396    $ECHO "Arg failed:" >&5
49397    $ECHO "$OUTPUT" >&5
49398    JVM_ARG_OK=false
49399  fi
49400
49401    fi
49402    if test "$MEMORY_SIZE" -gt "5000" && test "$JVM_ARG_OK" = false; then
49403
49404  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx3G" >&5
49405  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version" >&5
49406  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G -version 2>&1`
49407  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49408  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49409  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49410    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx3G"
49411    JVM_ARG_OK=true
49412  else
49413    $ECHO "Arg failed:" >&5
49414    $ECHO "$OUTPUT" >&5
49415    JVM_ARG_OK=false
49416  fi
49417
49418    fi
49419    if test "$MEMORY_SIZE" -gt "3800" && test "$JVM_ARG_OK" = false; then
49420
49421  $ECHO "Check if jvm arg is ok: -Xms1G -Xmx2500M" >&5
49422  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version" >&5
49423  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M -version 2>&1`
49424  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49425  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49426  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49427    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1G -Xmx2500M"
49428    JVM_ARG_OK=true
49429  else
49430    $ECHO "Arg failed:" >&5
49431    $ECHO "$OUTPUT" >&5
49432    JVM_ARG_OK=false
49433  fi
49434
49435    fi
49436  fi
49437  if test "$MEMORY_SIZE" -gt "2500" && test "$JVM_ARG_OK" = false; then
49438
49439  $ECHO "Check if jvm arg is ok: -Xms1000M -Xmx1500M" >&5
49440  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version" >&5
49441  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M -version 2>&1`
49442  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49443  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49444  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49445    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms1000M -Xmx1500M"
49446    JVM_ARG_OK=true
49447  else
49448    $ECHO "Arg failed:" >&5
49449    $ECHO "$OUTPUT" >&5
49450    JVM_ARG_OK=false
49451  fi
49452
49453  fi
49454  if test "$MEMORY_SIZE" -gt "1000" && test "$JVM_ARG_OK" = false; then
49455
49456  $ECHO "Check if jvm arg is ok: -Xms400M -Xmx1100M" >&5
49457  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version" >&5
49458  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M -version 2>&1`
49459  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49460  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49461  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49462    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms400M -Xmx1100M"
49463    JVM_ARG_OK=true
49464  else
49465    $ECHO "Arg failed:" >&5
49466    $ECHO "$OUTPUT" >&5
49467    JVM_ARG_OK=false
49468  fi
49469
49470  fi
49471  if test "$JVM_ARG_OK" = false; then
49472
49473  $ECHO "Check if jvm arg is ok: -Xms256M -Xmx512M" >&5
49474  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version" >&5
49475  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M -version 2>&1`
49476  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
49477  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
49478  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
49479    SJAVAC_SERVER_JAVA="$SJAVAC_SERVER_JAVA -Xms256M -Xmx512M"
49480    JVM_ARG_OK=true
49481  else
49482    $ECHO "Arg failed:" >&5
49483    $ECHO "$OUTPUT" >&5
49484    JVM_ARG_OK=false
49485  fi
49486
49487  fi
49488
49489  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
49490$as_echo_n "checking whether to use sjavac... " >&6; }
49491  # Check whether --enable-sjavac was given.
49492if test "${enable_sjavac+set}" = set; then :
49493  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
49494else
49495  ENABLE_SJAVAC='no'
49496fi
49497
49498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
49499$as_echo "$ENABLE_SJAVAC" >&6; }
49500
49501
49502  if test "x$ENABLE_SJAVAC" = xyes; then
49503    SJAVAC_SERVER_DIR="$OUTPUT_ROOT/javacservers"
49504  else
49505    SJAVAC_SERVER_DIR=
49506  fi
49507
49508
49509
49510# Can the C/C++ compiler use precompiled headers?
49511
49512
49513  ###############################################################################
49514  #
49515  # Can the C/C++ compiler use precompiled headers?
49516  #
49517  # Check whether --enable-precompiled-headers was given.
49518if test "${enable_precompiled_headers+set}" = set; then :
49519  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
49520else
49521  ENABLE_PRECOMPH=yes
49522fi
49523
49524
49525  USE_PRECOMPILED_HEADER=1
49526  if test "x$ENABLE_PRECOMPH" = xno; then
49527    USE_PRECOMPILED_HEADER=0
49528  fi
49529
49530  if test "x$ENABLE_PRECOMPH" = xyes; then
49531    # Check that the compiler actually supports precomp headers.
49532    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49533      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
49534$as_echo_n "checking that precompiled headers work... " >&6; }
49535      echo "int alfa();" > conftest.h
49536      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
49537      if test ! -f conftest.hpp.gch; then
49538        USE_PRECOMPILED_HEADER=0
49539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49540$as_echo "no" >&6; }
49541      else
49542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49543$as_echo "yes" >&6; }
49544      fi
49545      rm -f conftest.h conftest.hpp.gch
49546    fi
49547  fi
49548
49549
49550
49551
49552# Setup use of ccache, if available
49553
49554  # Check whether --enable-ccache was given.
49555if test "${enable_ccache+set}" = set; then :
49556  enableval=$enable_ccache;
49557fi
49558
49559
49560  CCACHE=
49561  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
49562$as_echo_n "checking is ccache enabled... " >&6; }
49563  ENABLE_CCACHE=$enable_ccache
49564  if test "x$enable_ccache" = xyes; then
49565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49566$as_echo "yes" >&6; }
49567    OLD_PATH="$PATH"
49568    if test "x$TOOLCHAIN_PATH" != x; then
49569      PATH=$TOOLCHAIN_PATH:$PATH
49570    fi
49571
49572
49573
49574  # Publish this variable in the help.
49575
49576
49577  if test "x$CCACHE" = x; then
49578    # The variable is not set by user, try to locate tool using the code snippet
49579    for ac_prog in ccache
49580do
49581  # Extract the first word of "$ac_prog", so it can be a program name with args.
49582set dummy $ac_prog; ac_word=$2
49583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49584$as_echo_n "checking for $ac_word... " >&6; }
49585if ${ac_cv_path_CCACHE+:} false; then :
49586  $as_echo_n "(cached) " >&6
49587else
49588  case $CCACHE in
49589  [\\/]* | ?:[\\/]*)
49590  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49591  ;;
49592  *)
49593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49594for as_dir in $PATH
49595do
49596  IFS=$as_save_IFS
49597  test -z "$as_dir" && as_dir=.
49598    for ac_exec_ext in '' $ac_executable_extensions; do
49599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49600    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49602    break 2
49603  fi
49604done
49605  done
49606IFS=$as_save_IFS
49607
49608  ;;
49609esac
49610fi
49611CCACHE=$ac_cv_path_CCACHE
49612if test -n "$CCACHE"; then
49613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49614$as_echo "$CCACHE" >&6; }
49615else
49616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49617$as_echo "no" >&6; }
49618fi
49619
49620
49621  test -n "$CCACHE" && break
49622done
49623
49624  else
49625    # The variable is set, but is it from the command line or the environment?
49626
49627    # Try to remove the string !CCACHE! from our list.
49628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
49629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
49630      # If it failed, the variable was not from the command line. Ignore it,
49631      # but warn the user (except for BASH, which is always set by the calling BASH).
49632      if test "xCCACHE" != xBASH; then
49633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
49634$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
49635      fi
49636      # Try to locate tool using the code snippet
49637      for ac_prog in ccache
49638do
49639  # Extract the first word of "$ac_prog", so it can be a program name with args.
49640set dummy $ac_prog; ac_word=$2
49641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49642$as_echo_n "checking for $ac_word... " >&6; }
49643if ${ac_cv_path_CCACHE+:} false; then :
49644  $as_echo_n "(cached) " >&6
49645else
49646  case $CCACHE in
49647  [\\/]* | ?:[\\/]*)
49648  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49649  ;;
49650  *)
49651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49652for as_dir in $PATH
49653do
49654  IFS=$as_save_IFS
49655  test -z "$as_dir" && as_dir=.
49656    for ac_exec_ext in '' $ac_executable_extensions; do
49657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49658    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49660    break 2
49661  fi
49662done
49663  done
49664IFS=$as_save_IFS
49665
49666  ;;
49667esac
49668fi
49669CCACHE=$ac_cv_path_CCACHE
49670if test -n "$CCACHE"; then
49671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49672$as_echo "$CCACHE" >&6; }
49673else
49674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49675$as_echo "no" >&6; }
49676fi
49677
49678
49679  test -n "$CCACHE" && break
49680done
49681
49682    else
49683      # If it succeeded, then it was overridden by the user. We will use it
49684      # for the tool.
49685
49686      # First remove it from the list of overridden variables, so we can test
49687      # for unknown variables in the end.
49688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
49689
49690      # Check if the provided tool contains a complete path.
49691      tool_specified="$CCACHE"
49692      tool_basename="${tool_specified##*/}"
49693      if test "x$tool_basename" = "x$tool_specified"; then
49694        # A command without a complete path is provided, search $PATH.
49695        { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
49696$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
49697        # Extract the first word of "$tool_basename", so it can be a program name with args.
49698set dummy $tool_basename; ac_word=$2
49699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
49700$as_echo_n "checking for $ac_word... " >&6; }
49701if ${ac_cv_path_CCACHE+:} false; then :
49702  $as_echo_n "(cached) " >&6
49703else
49704  case $CCACHE in
49705  [\\/]* | ?:[\\/]*)
49706  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
49707  ;;
49708  *)
49709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
49710for as_dir in $PATH
49711do
49712  IFS=$as_save_IFS
49713  test -z "$as_dir" && as_dir=.
49714    for ac_exec_ext in '' $ac_executable_extensions; do
49715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
49716    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
49717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
49718    break 2
49719  fi
49720done
49721  done
49722IFS=$as_save_IFS
49723
49724  ;;
49725esac
49726fi
49727CCACHE=$ac_cv_path_CCACHE
49728if test -n "$CCACHE"; then
49729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
49730$as_echo "$CCACHE" >&6; }
49731else
49732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49733$as_echo "no" >&6; }
49734fi
49735
49736
49737        if test "x$CCACHE" = x; then
49738          as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
49739        fi
49740      else
49741        # Otherwise we believe it is a complete path. Use it as it is.
49742        { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
49743$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
49744        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
49745$as_echo_n "checking for CCACHE... " >&6; }
49746        if test ! -x "$tool_specified"; then
49747          { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
49748$as_echo "not found" >&6; }
49749          as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
49750        fi
49751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
49752$as_echo "$tool_specified" >&6; }
49753      fi
49754    fi
49755  fi
49756
49757
49758
49759  if test "x$CCACHE" = x; then
49760    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
49761  fi
49762
49763
49764    CCACHE_STATUS="enabled"
49765    PATH="$OLD_PATH"
49766  elif test "x$enable_ccache" = xno; then
49767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
49768$as_echo "no, explicitly disabled" >&6; }
49769  elif test "x$enable_ccache" = x; then
49770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
49771$as_echo "no" >&6; }
49772  else
49773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
49774$as_echo "unknown" >&6; }
49775    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
49776  fi
49777
49778
49779
49780# Check whether --with-ccache-dir was given.
49781if test "${with_ccache_dir+set}" = set; then :
49782  withval=$with_ccache_dir;
49783fi
49784
49785
49786  if test "x$with_ccache_dir" != x; then
49787    # When using a non home ccache directory, assume the use is to share ccache files
49788    # with other users. Thus change the umask.
49789    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
49790    if test "x$CCACHE" = x; then
49791      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
49792$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
49793    fi
49794  fi
49795
49796  if test "x$CCACHE" != x; then
49797
49798  if test "x$CCACHE" != x; then
49799    # Only use ccache if it is 3.1.4 or later, which supports
49800    # precompiled headers.
49801    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if ccache supports precompiled headers" >&5
49802$as_echo_n "checking if ccache supports precompiled headers... " >&6; }
49803    HAS_GOOD_CCACHE=`($CCACHE --version | head -n 1 | grep -E 3.1.[456789]) 2> /dev/null`
49804    if test "x$HAS_GOOD_CCACHE" = x; then
49805      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccache" >&5
49806$as_echo "no, disabling ccache" >&6; }
49807      CCACHE=
49808      CCACHE_STATUS="disabled"
49809    else
49810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49811$as_echo "yes" >&6; }
49812      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
49813$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
49814      PUSHED_FLAGS="$CXXFLAGS"
49815      CXXFLAGS="-fpch-preprocess $CXXFLAGS"
49816      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49817/* end confdefs.h.  */
49818
49819int
49820main ()
49821{
49822
49823  ;
49824  return 0;
49825}
49826_ACEOF
49827if ac_fn_cxx_try_compile "$LINENO"; then :
49828  CC_KNOWS_CCACHE_TRICK=yes
49829else
49830  CC_KNOWS_CCACHE_TRICK=no
49831fi
49832rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49833      CXXFLAGS="$PUSHED_FLAGS"
49834      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
49835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
49836$as_echo "yes" >&6; }
49837      else
49838        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, disabling ccaching of precompiled headers" >&5
49839$as_echo "no, disabling ccaching of precompiled headers" >&6; }
49840        CCACHE=
49841        CCACHE_STATUS="disabled"
49842      fi
49843    fi
49844  fi
49845
49846  if test "x$CCACHE" != x; then
49847    CCACHE_SLOPPINESS=time_macros
49848    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS $CCACHE"
49849    CCACHE_FLAGS=-fpch-preprocess
49850
49851    if test "x$SET_CCACHE_DIR" != x; then
49852      mkdir -p $CCACHE_DIR > /dev/null 2>&1
49853      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
49854    fi
49855  fi
49856
49857  fi
49858
49859
49860###############################################################################
49861#
49862# And now the finish...
49863#
49864###############################################################################
49865
49866# Check for some common pitfalls
49867
49868  if test x"$OPENJDK_BUILD_OS" = xwindows; then
49869    file_to_test="$SRC_ROOT/LICENSE"
49870    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
49871      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
49872    fi
49873  fi
49874
49875
49876  # Did user specify any unknown variables?
49877
49878  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
49879    # Replace the separating ! with spaces before presenting for end user.
49880    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
49881    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
49882$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
49883  fi
49884
49885
49886  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
49887$as_echo_n "checking if build directory is on local disk... " >&6; }
49888
49889  # df -l lists only local disks; if the given directory is not found then
49890  # a non-zero exit code is given
49891  if test "x$DF" = x; then
49892    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49893      # msys does not have df; use Windows "net use" instead.
49894      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
49895      if test "x$IS_NETWORK_DISK" = x; then
49896        OUTPUT_DIR_IS_LOCAL="yes"
49897      else
49898        OUTPUT_DIR_IS_LOCAL="no"
49899      fi
49900    else
49901      # No df here, say it's local
49902      OUTPUT_DIR_IS_LOCAL="yes"
49903    fi
49904  else
49905    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
49906      OUTPUT_DIR_IS_LOCAL="yes"
49907    else
49908      OUTPUT_DIR_IS_LOCAL="no"
49909    fi
49910  fi
49911
49912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
49913$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
49914
49915
49916
49917  # Check if the user has any old-style ALT_ variables set.
49918  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
49919
49920  # Before generating output files, test if they exist. If they do, this is a reconfigure.
49921  # Since we can't properly handle the dependencies for this, warn the user about the situation
49922  if test -e $OUTPUT_ROOT/spec.gmk; then
49923    IS_RECONFIGURE=yes
49924  else
49925    IS_RECONFIGURE=no
49926  fi
49927
49928
49929# At the end, call the custom hook. (Dummy macro if no custom sources available)
49930
49931
49932# We're messing a bit with internal autoconf variables to put the config.status
49933# in the output directory instead of the current directory.
49934CONFIG_STATUS="$OUTPUT_ROOT/config.status"
49935
49936# Create the actual output files. Now the main work of configure is done.
49937cat >confcache <<\_ACEOF
49938# This file is a shell script that caches the results of configure
49939# tests run on this system so they can be shared between configure
49940# scripts and configure runs, see configure's option --config-cache.
49941# It is not useful on other systems.  If it contains results you don't
49942# want to keep, you may remove or edit it.
49943#
49944# config.status only pays attention to the cache file if you give it
49945# the --recheck option to rerun configure.
49946#
49947# `ac_cv_env_foo' variables (set or unset) will be overridden when
49948# loading this file, other *unset* `ac_cv_foo' will be assigned the
49949# following values.
49950
49951_ACEOF
49952
49953# The following way of writing the cache mishandles newlines in values,
49954# but we know of no workaround that is simple, portable, and efficient.
49955# So, we kill variables containing newlines.
49956# Ultrix sh set writes to stderr and can't be redirected directly,
49957# and sets the high bit in the cache file unless we assign to the vars.
49958(
49959  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
49960    eval ac_val=\$$ac_var
49961    case $ac_val in #(
49962    *${as_nl}*)
49963      case $ac_var in #(
49964      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
49965$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
49966      esac
49967      case $ac_var in #(
49968      _ | IFS | as_nl) ;; #(
49969      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
49970      *) { eval $ac_var=; unset $ac_var;} ;;
49971      esac ;;
49972    esac
49973  done
49974
49975  (set) 2>&1 |
49976    case $as_nl`(ac_space=' '; set) 2>&1` in #(
49977    *${as_nl}ac_space=\ *)
49978      # `set' does not quote correctly, so add quotes: double-quote
49979      # substitution turns \\\\ into \\, and sed turns \\ into \.
49980      sed -n \
49981	"s/'/'\\\\''/g;
49982	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49983      ;; #(
49984    *)
49985      # `set' quotes correctly as required by POSIX, so do not add quotes.
49986      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
49987      ;;
49988    esac |
49989    sort
49990) |
49991  sed '
49992     /^ac_cv_env_/b end
49993     t clear
49994     :clear
49995     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49996     t end
49997     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49998     :end' >>confcache
49999if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
50000  if test -w "$cache_file"; then
50001    if test "x$cache_file" != "x/dev/null"; then
50002      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
50003$as_echo "$as_me: updating cache $cache_file" >&6;}
50004      if test ! -f "$cache_file" || test -h "$cache_file"; then
50005	cat confcache >"$cache_file"
50006      else
50007        case $cache_file in #(
50008        */* | ?:*)
50009	  mv -f confcache "$cache_file"$$ &&
50010	  mv -f "$cache_file"$$ "$cache_file" ;; #(
50011        *)
50012	  mv -f confcache "$cache_file" ;;
50013	esac
50014      fi
50015    fi
50016  else
50017    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
50018$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
50019  fi
50020fi
50021rm -f confcache
50022
50023test "x$prefix" = xNONE && prefix=$ac_default_prefix
50024# Let make expand exec_prefix.
50025test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
50026
50027DEFS=-DHAVE_CONFIG_H
50028
50029ac_libobjs=
50030ac_ltlibobjs=
50031U=
50032for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
50033  # 1. Remove the extension, and $U if already installed.
50034  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
50035  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
50036  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
50037  #    will be set to the directory where LIBOBJS objects are built.
50038  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
50039  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
50040done
50041LIBOBJS=$ac_libobjs
50042
50043LTLIBOBJS=$ac_ltlibobjs
50044
50045
50046
50047: "${CONFIG_STATUS=./config.status}"
50048ac_write_fail=0
50049ac_clean_files_save=$ac_clean_files
50050ac_clean_files="$ac_clean_files $CONFIG_STATUS"
50051{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
50052$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
50053as_write_fail=0
50054cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
50055#! $SHELL
50056# Generated by $as_me.
50057# Run this file to recreate the current configuration.
50058# Compiler output produced by configure, useful for debugging
50059# configure, is in config.log if it exists.
50060
50061debug=false
50062ac_cs_recheck=false
50063ac_cs_silent=false
50064
50065SHELL=\${CONFIG_SHELL-$SHELL}
50066export SHELL
50067_ASEOF
50068cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
50069## -------------------- ##
50070## M4sh Initialization. ##
50071## -------------------- ##
50072
50073# Be more Bourne compatible
50074DUALCASE=1; export DUALCASE # for MKS sh
50075if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
50076  emulate sh
50077  NULLCMD=:
50078  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
50079  # is contrary to our usage.  Disable this feature.
50080  alias -g '${1+"$@"}'='"$@"'
50081  setopt NO_GLOB_SUBST
50082else
50083  case `(set -o) 2>/dev/null` in #(
50084  *posix*) :
50085    set -o posix ;; #(
50086  *) :
50087     ;;
50088esac
50089fi
50090
50091
50092as_nl='
50093'
50094export as_nl
50095# Printing a long string crashes Solaris 7 /usr/bin/printf.
50096as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
50097as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
50098as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
50099# Prefer a ksh shell builtin over an external printf program on Solaris,
50100# but without wasting forks for bash or zsh.
50101if test -z "$BASH_VERSION$ZSH_VERSION" \
50102    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50103  as_echo='print -r --'
50104  as_echo_n='print -rn --'
50105elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
50106  as_echo='printf %s\n'
50107  as_echo_n='printf %s'
50108else
50109  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
50110    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
50111    as_echo_n='/usr/ucb/echo -n'
50112  else
50113    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
50114    as_echo_n_body='eval
50115      arg=$1;
50116      case $arg in #(
50117      *"$as_nl"*)
50118	expr "X$arg" : "X\\(.*\\)$as_nl";
50119	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
50120      esac;
50121      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
50122    '
50123    export as_echo_n_body
50124    as_echo_n='sh -c $as_echo_n_body as_echo'
50125  fi
50126  export as_echo_body
50127  as_echo='sh -c $as_echo_body as_echo'
50128fi
50129
50130# The user is always right.
50131if test "${PATH_SEPARATOR+set}" != set; then
50132  PATH_SEPARATOR=:
50133  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
50134    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
50135      PATH_SEPARATOR=';'
50136  }
50137fi
50138
50139
50140# IFS
50141# We need space, tab and new line, in precisely that order.  Quoting is
50142# there to prevent editors from complaining about space-tab.
50143# (If _AS_PATH_WALK were called with IFS unset, it would disable word
50144# splitting by setting IFS to empty value.)
50145IFS=" ""	$as_nl"
50146
50147# Find who we are.  Look in the path if we contain no directory separator.
50148as_myself=
50149case $0 in #((
50150  *[\\/]* ) as_myself=$0 ;;
50151  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
50152for as_dir in $PATH
50153do
50154  IFS=$as_save_IFS
50155  test -z "$as_dir" && as_dir=.
50156    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
50157  done
50158IFS=$as_save_IFS
50159
50160     ;;
50161esac
50162# We did not find ourselves, most probably we were run as `sh COMMAND'
50163# in which case we are not to be found in the path.
50164if test "x$as_myself" = x; then
50165  as_myself=$0
50166fi
50167if test ! -f "$as_myself"; then
50168  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
50169  exit 1
50170fi
50171
50172# Unset variables that we do not need and which cause bugs (e.g. in
50173# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
50174# suppresses any "Segmentation fault" message there.  '((' could
50175# trigger a bug in pdksh 5.2.14.
50176for as_var in BASH_ENV ENV MAIL MAILPATH
50177do eval test x\${$as_var+set} = xset \
50178  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
50179done
50180PS1='$ '
50181PS2='> '
50182PS4='+ '
50183
50184# NLS nuisances.
50185LC_ALL=C
50186export LC_ALL
50187LANGUAGE=C
50188export LANGUAGE
50189
50190# CDPATH.
50191(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
50192
50193
50194# as_fn_error STATUS ERROR [LINENO LOG_FD]
50195# ----------------------------------------
50196# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
50197# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
50198# script with STATUS, using 1 if that was 0.
50199as_fn_error ()
50200{
50201  as_status=$1; test $as_status -eq 0 && as_status=1
50202  if test "$4"; then
50203    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
50204    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
50205  fi
50206  $as_echo "$as_me: error: $2" >&2
50207  as_fn_exit $as_status
50208} # as_fn_error
50209
50210
50211# as_fn_set_status STATUS
50212# -----------------------
50213# Set $? to STATUS, without forking.
50214as_fn_set_status ()
50215{
50216  return $1
50217} # as_fn_set_status
50218
50219# as_fn_exit STATUS
50220# -----------------
50221# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
50222as_fn_exit ()
50223{
50224  set +e
50225  as_fn_set_status $1
50226  exit $1
50227} # as_fn_exit
50228
50229# as_fn_unset VAR
50230# ---------------
50231# Portably unset VAR.
50232as_fn_unset ()
50233{
50234  { eval $1=; unset $1;}
50235}
50236as_unset=as_fn_unset
50237# as_fn_append VAR VALUE
50238# ----------------------
50239# Append the text in VALUE to the end of the definition contained in VAR. Take
50240# advantage of any shell optimizations that allow amortized linear growth over
50241# repeated appends, instead of the typical quadratic growth present in naive
50242# implementations.
50243if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
50244  eval 'as_fn_append ()
50245  {
50246    eval $1+=\$2
50247  }'
50248else
50249  as_fn_append ()
50250  {
50251    eval $1=\$$1\$2
50252  }
50253fi # as_fn_append
50254
50255# as_fn_arith ARG...
50256# ------------------
50257# Perform arithmetic evaluation on the ARGs, and store the result in the
50258# global $as_val. Take advantage of shells that can avoid forks. The arguments
50259# must be portable across $(()) and expr.
50260if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
50261  eval 'as_fn_arith ()
50262  {
50263    as_val=$(( $* ))
50264  }'
50265else
50266  as_fn_arith ()
50267  {
50268    as_val=`expr "$@" || test $? -eq 1`
50269  }
50270fi # as_fn_arith
50271
50272
50273if expr a : '\(a\)' >/dev/null 2>&1 &&
50274   test "X`expr 00001 : '.*\(...\)'`" = X001; then
50275  as_expr=expr
50276else
50277  as_expr=false
50278fi
50279
50280if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
50281  as_basename=basename
50282else
50283  as_basename=false
50284fi
50285
50286if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
50287  as_dirname=dirname
50288else
50289  as_dirname=false
50290fi
50291
50292as_me=`$as_basename -- "$0" ||
50293$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
50294	 X"$0" : 'X\(//\)$' \| \
50295	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
50296$as_echo X/"$0" |
50297    sed '/^.*\/\([^/][^/]*\)\/*$/{
50298	    s//\1/
50299	    q
50300	  }
50301	  /^X\/\(\/\/\)$/{
50302	    s//\1/
50303	    q
50304	  }
50305	  /^X\/\(\/\).*/{
50306	    s//\1/
50307	    q
50308	  }
50309	  s/.*/./; q'`
50310
50311# Avoid depending upon Character Ranges.
50312as_cr_letters='abcdefghijklmnopqrstuvwxyz'
50313as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
50314as_cr_Letters=$as_cr_letters$as_cr_LETTERS
50315as_cr_digits='0123456789'
50316as_cr_alnum=$as_cr_Letters$as_cr_digits
50317
50318ECHO_C= ECHO_N= ECHO_T=
50319case `echo -n x` in #(((((
50320-n*)
50321  case `echo 'xy\c'` in
50322  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
50323  xy)  ECHO_C='\c';;
50324  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
50325       ECHO_T='	';;
50326  esac;;
50327*)
50328  ECHO_N='-n';;
50329esac
50330
50331rm -f conf$$ conf$$.exe conf$$.file
50332if test -d conf$$.dir; then
50333  rm -f conf$$.dir/conf$$.file
50334else
50335  rm -f conf$$.dir
50336  mkdir conf$$.dir 2>/dev/null
50337fi
50338if (echo >conf$$.file) 2>/dev/null; then
50339  if ln -s conf$$.file conf$$ 2>/dev/null; then
50340    as_ln_s='ln -s'
50341    # ... but there are two gotchas:
50342    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
50343    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
50344    # In both cases, we have to default to `cp -pR'.
50345    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
50346      as_ln_s='cp -pR'
50347  elif ln conf$$.file conf$$ 2>/dev/null; then
50348    as_ln_s=ln
50349  else
50350    as_ln_s='cp -pR'
50351  fi
50352else
50353  as_ln_s='cp -pR'
50354fi
50355rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
50356rmdir conf$$.dir 2>/dev/null
50357
50358
50359# as_fn_mkdir_p
50360# -------------
50361# Create "$as_dir" as a directory, including parents if necessary.
50362as_fn_mkdir_p ()
50363{
50364
50365  case $as_dir in #(
50366  -*) as_dir=./$as_dir;;
50367  esac
50368  test -d "$as_dir" || eval $as_mkdir_p || {
50369    as_dirs=
50370    while :; do
50371      case $as_dir in #(
50372      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
50373      *) as_qdir=$as_dir;;
50374      esac
50375      as_dirs="'$as_qdir' $as_dirs"
50376      as_dir=`$as_dirname -- "$as_dir" ||
50377$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50378	 X"$as_dir" : 'X\(//\)[^/]' \| \
50379	 X"$as_dir" : 'X\(//\)$' \| \
50380	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
50381$as_echo X"$as_dir" |
50382    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
50383	    s//\1/
50384	    q
50385	  }
50386	  /^X\(\/\/\)[^/].*/{
50387	    s//\1/
50388	    q
50389	  }
50390	  /^X\(\/\/\)$/{
50391	    s//\1/
50392	    q
50393	  }
50394	  /^X\(\/\).*/{
50395	    s//\1/
50396	    q
50397	  }
50398	  s/.*/./; q'`
50399      test -d "$as_dir" && break
50400    done
50401    test -z "$as_dirs" || eval "mkdir $as_dirs"
50402  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
50403
50404
50405} # as_fn_mkdir_p
50406if mkdir -p . 2>/dev/null; then
50407  as_mkdir_p='mkdir -p "$as_dir"'
50408else
50409  test -d ./-p && rmdir ./-p
50410  as_mkdir_p=false
50411fi
50412
50413
50414# as_fn_executable_p FILE
50415# -----------------------
50416# Test if FILE is an executable regular file.
50417as_fn_executable_p ()
50418{
50419  test -f "$1" && test -x "$1"
50420} # as_fn_executable_p
50421as_test_x='test -x'
50422as_executable_p=as_fn_executable_p
50423
50424# Sed expression to map a string onto a valid CPP name.
50425as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
50426
50427# Sed expression to map a string onto a valid variable name.
50428as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
50429
50430
50431exec 6>&1
50432## ----------------------------------- ##
50433## Main body of $CONFIG_STATUS script. ##
50434## ----------------------------------- ##
50435_ASEOF
50436test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
50437
50438cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50439# Save the log message, to keep $0 and so on meaningful, and to
50440# report actual input values of CONFIG_FILES etc. instead of their
50441# values after options handling.
50442ac_log="
50443This file was extended by OpenJDK $as_me jdk9, which was
50444generated by GNU Autoconf 2.69.  Invocation command line was
50445
50446  CONFIG_FILES    = $CONFIG_FILES
50447  CONFIG_HEADERS  = $CONFIG_HEADERS
50448  CONFIG_LINKS    = $CONFIG_LINKS
50449  CONFIG_COMMANDS = $CONFIG_COMMANDS
50450  $ $0 $@
50451
50452on `(hostname || uname -n) 2>/dev/null | sed 1q`
50453"
50454
50455_ACEOF
50456
50457case $ac_config_files in *"
50458"*) set x $ac_config_files; shift; ac_config_files=$*;;
50459esac
50460
50461case $ac_config_headers in *"
50462"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
50463esac
50464
50465
50466cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50467# Files that config.status was made for.
50468config_files="$ac_config_files"
50469config_headers="$ac_config_headers"
50470
50471_ACEOF
50472
50473cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50474ac_cs_usage="\
50475\`$as_me' instantiates files and other configuration actions
50476from templates according to the current configuration.  Unless the files
50477and actions are specified as TAGs, all are instantiated by default.
50478
50479Usage: $0 [OPTION]... [TAG]...
50480
50481  -h, --help       print this help, then exit
50482  -V, --version    print version number and configuration settings, then exit
50483      --config     print configuration, then exit
50484  -q, --quiet, --silent
50485                   do not print progress messages
50486  -d, --debug      don't remove temporary files
50487      --recheck    update $as_me by reconfiguring in the same conditions
50488      --file=FILE[:TEMPLATE]
50489                   instantiate the configuration file FILE
50490      --header=FILE[:TEMPLATE]
50491                   instantiate the configuration header FILE
50492
50493Configuration files:
50494$config_files
50495
50496Configuration headers:
50497$config_headers
50498
50499Report bugs to <build-dev@openjdk.java.net>.
50500OpenJDK home page: <http://openjdk.java.net>."
50501
50502_ACEOF
50503cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50504ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
50505ac_cs_version="\\
50506OpenJDK config.status jdk9
50507configured by $0, generated by GNU Autoconf 2.69,
50508  with options \\"\$ac_cs_config\\"
50509
50510Copyright (C) 2012 Free Software Foundation, Inc.
50511This config.status script is free software; the Free Software Foundation
50512gives unlimited permission to copy, distribute and modify it."
50513
50514ac_pwd='$ac_pwd'
50515srcdir='$srcdir'
50516AWK='$AWK'
50517test -n "\$AWK" || AWK=awk
50518_ACEOF
50519
50520cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50521# The default lists apply if the user does not specify any file.
50522ac_need_defaults=:
50523while test $# != 0
50524do
50525  case $1 in
50526  --*=?*)
50527    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50528    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
50529    ac_shift=:
50530    ;;
50531  --*=)
50532    ac_option=`expr "X$1" : 'X\([^=]*\)='`
50533    ac_optarg=
50534    ac_shift=:
50535    ;;
50536  *)
50537    ac_option=$1
50538    ac_optarg=$2
50539    ac_shift=shift
50540    ;;
50541  esac
50542
50543  case $ac_option in
50544  # Handling of the options.
50545  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
50546    ac_cs_recheck=: ;;
50547  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
50548    $as_echo "$ac_cs_version"; exit ;;
50549  --config | --confi | --conf | --con | --co | --c )
50550    $as_echo "$ac_cs_config"; exit ;;
50551  --debug | --debu | --deb | --de | --d | -d )
50552    debug=: ;;
50553  --file | --fil | --fi | --f )
50554    $ac_shift
50555    case $ac_optarg in
50556    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50557    '') as_fn_error $? "missing file argument" ;;
50558    esac
50559    as_fn_append CONFIG_FILES " '$ac_optarg'"
50560    ac_need_defaults=false;;
50561  --header | --heade | --head | --hea )
50562    $ac_shift
50563    case $ac_optarg in
50564    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
50565    esac
50566    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
50567    ac_need_defaults=false;;
50568  --he | --h)
50569    # Conflict between --help and --header
50570    as_fn_error $? "ambiguous option: \`$1'
50571Try \`$0 --help' for more information.";;
50572  --help | --hel | -h )
50573    $as_echo "$ac_cs_usage"; exit ;;
50574  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
50575  | -silent | --silent | --silen | --sile | --sil | --si | --s)
50576    ac_cs_silent=: ;;
50577
50578  # This is an error.
50579  -*) as_fn_error $? "unrecognized option: \`$1'
50580Try \`$0 --help' for more information." ;;
50581
50582  *) as_fn_append ac_config_targets " $1"
50583     ac_need_defaults=false ;;
50584
50585  esac
50586  shift
50587done
50588
50589ac_configure_extra_args=
50590
50591if $ac_cs_silent; then
50592  exec 6>/dev/null
50593  ac_configure_extra_args="$ac_configure_extra_args --silent"
50594fi
50595
50596_ACEOF
50597cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50598if \$ac_cs_recheck; then
50599  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
50600  shift
50601  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
50602  CONFIG_SHELL='$SHELL'
50603  export CONFIG_SHELL
50604  exec "\$@"
50605fi
50606
50607_ACEOF
50608cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50609exec 5>>config.log
50610{
50611  echo
50612  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
50613## Running $as_me. ##
50614_ASBOX
50615  $as_echo "$ac_log"
50616} >&5
50617
50618_ACEOF
50619cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50620_ACEOF
50621
50622cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50623
50624# Handling of arguments.
50625for ac_config_target in $ac_config_targets
50626do
50627  case $ac_config_target in
50628    "$OUTPUT_ROOT/config.h") CONFIG_HEADERS="$CONFIG_HEADERS $OUTPUT_ROOT/config.h:$AUTOCONF_DIR/config.h.in" ;;
50629    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
50630    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
50631    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
50632    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
50633    "$OUTPUT_ROOT/spec.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.sh:$AUTOCONF_DIR/spec.sh.in" ;;
50634    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
50635
50636  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
50637  esac
50638done
50639
50640
50641# If the user did not use the arguments to specify the items to instantiate,
50642# then the envvar interface is used.  Set only those that are not.
50643# We use the long form for the default assignment because of an extremely
50644# bizarre bug on SunOS 4.1.3.
50645if $ac_need_defaults; then
50646  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
50647  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
50648fi
50649
50650# Have a temporary directory for convenience.  Make it in the build tree
50651# simply because there is no reason against having it here, and in addition,
50652# creating and moving files from /tmp can sometimes cause problems.
50653# Hook for its removal unless debugging.
50654# Note that there is a small window in which the directory will not be cleaned:
50655# after its creation but before its name has been assigned to `$tmp'.
50656$debug ||
50657{
50658  tmp= ac_tmp=
50659  trap 'exit_status=$?
50660  : "${ac_tmp:=$tmp}"
50661  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
50662' 0
50663  trap 'as_fn_exit 1' 1 2 13 15
50664}
50665# Create a (secure) tmp directory for tmp files.
50666
50667{
50668  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
50669  test -d "$tmp"
50670}  ||
50671{
50672  tmp=./conf$$-$RANDOM
50673  (umask 077 && mkdir "$tmp")
50674} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
50675ac_tmp=$tmp
50676
50677# Set up the scripts for CONFIG_FILES section.
50678# No need to generate them if there are no CONFIG_FILES.
50679# This happens for instance with `./config.status config.h'.
50680if test -n "$CONFIG_FILES"; then
50681
50682
50683ac_cr=`echo X | tr X '\015'`
50684# On cygwin, bash can eat \r inside `` if the user requested igncr.
50685# But we know of no other shell where ac_cr would be empty at this
50686# point, so we can use a bashism as a fallback.
50687if test "x$ac_cr" = x; then
50688  eval ac_cr=\$\'\\r\'
50689fi
50690ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
50691if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
50692  ac_cs_awk_cr='\\r'
50693else
50694  ac_cs_awk_cr=$ac_cr
50695fi
50696
50697echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
50698_ACEOF
50699
50700
50701{
50702  echo "cat >conf$$subs.awk <<_ACEOF" &&
50703  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
50704  echo "_ACEOF"
50705} >conf$$subs.sh ||
50706  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50707ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
50708ac_delim='%!_!# '
50709for ac_last_try in false false false false false :; do
50710  . ./conf$$subs.sh ||
50711    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50712
50713  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
50714  if test $ac_delim_n = $ac_delim_num; then
50715    break
50716  elif $ac_last_try; then
50717    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
50718  else
50719    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50720  fi
50721done
50722rm -f conf$$subs.sh
50723
50724cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50725cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
50726_ACEOF
50727sed -n '
50728h
50729s/^/S["/; s/!.*/"]=/
50730p
50731g
50732s/^[^!]*!//
50733:repl
50734t repl
50735s/'"$ac_delim"'$//
50736t delim
50737:nl
50738h
50739s/\(.\{148\}\)..*/\1/
50740t more1
50741s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
50742p
50743n
50744b repl
50745:more1
50746s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50747p
50748g
50749s/.\{148\}//
50750t nl
50751:delim
50752h
50753s/\(.\{148\}\)..*/\1/
50754t more2
50755s/["\\]/\\&/g; s/^/"/; s/$/"/
50756p
50757b
50758:more2
50759s/["\\]/\\&/g; s/^/"/; s/$/"\\/
50760p
50761g
50762s/.\{148\}//
50763t delim
50764' <conf$$subs.awk | sed '
50765/^[^""]/{
50766  N
50767  s/\n//
50768}
50769' >>$CONFIG_STATUS || ac_write_fail=1
50770rm -f conf$$subs.awk
50771cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50772_ACAWK
50773cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
50774  for (key in S) S_is_set[key] = 1
50775  FS = ""
50776
50777}
50778{
50779  line = $ 0
50780  nfields = split(line, field, "@")
50781  substed = 0
50782  len = length(field[1])
50783  for (i = 2; i < nfields; i++) {
50784    key = field[i]
50785    keylen = length(key)
50786    if (S_is_set[key]) {
50787      value = S[key]
50788      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
50789      len += length(value) + length(field[++i])
50790      substed = 1
50791    } else
50792      len += 1 + keylen
50793  }
50794
50795  print line
50796}
50797
50798_ACAWK
50799_ACEOF
50800cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50801if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
50802  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
50803else
50804  cat
50805fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
50806  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
50807_ACEOF
50808
50809# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
50810# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
50811# trailing colons and then remove the whole line if VPATH becomes empty
50812# (actually we leave an empty line to preserve line numbers).
50813if test "x$srcdir" = x.; then
50814  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
50815h
50816s///
50817s/^/:/
50818s/[	 ]*$/:/
50819s/:\$(srcdir):/:/g
50820s/:\${srcdir}:/:/g
50821s/:@srcdir@:/:/g
50822s/^:*//
50823s/:*$//
50824x
50825s/\(=[	 ]*\).*/\1/
50826G
50827s/\n//
50828s/^[^=]*=[	 ]*$//
50829}'
50830fi
50831
50832cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50833fi # test -n "$CONFIG_FILES"
50834
50835# Set up the scripts for CONFIG_HEADERS section.
50836# No need to generate them if there are no CONFIG_HEADERS.
50837# This happens for instance with `./config.status Makefile'.
50838if test -n "$CONFIG_HEADERS"; then
50839cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
50840BEGIN {
50841_ACEOF
50842
50843# Transform confdefs.h into an awk script `defines.awk', embedded as
50844# here-document in config.status, that substitutes the proper values into
50845# config.h.in to produce config.h.
50846
50847# Create a delimiter string that does not exist in confdefs.h, to ease
50848# handling of long lines.
50849ac_delim='%!_!# '
50850for ac_last_try in false false :; do
50851  ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
50852  if test -z "$ac_tt"; then
50853    break
50854  elif $ac_last_try; then
50855    as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
50856  else
50857    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
50858  fi
50859done
50860
50861# For the awk script, D is an array of macro values keyed by name,
50862# likewise P contains macro parameters if any.  Preserve backslash
50863# newline sequences.
50864
50865ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
50866sed -n '
50867s/.\{148\}/&'"$ac_delim"'/g
50868t rset
50869:rset
50870s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
50871t def
50872d
50873:def
50874s/\\$//
50875t bsnl
50876s/["\\]/\\&/g
50877s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50878D["\1"]=" \3"/p
50879s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
50880d
50881:bsnl
50882s/["\\]/\\&/g
50883s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
50884D["\1"]=" \3\\\\\\n"\\/p
50885t cont
50886s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
50887t cont
50888d
50889:cont
50890n
50891s/.\{148\}/&'"$ac_delim"'/g
50892t clear
50893:clear
50894s/\\$//
50895t bsnlc
50896s/["\\]/\\&/g; s/^/"/; s/$/"/p
50897d
50898:bsnlc
50899s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
50900b cont
50901' <confdefs.h | sed '
50902s/'"$ac_delim"'/"\\\
50903"/g' >>$CONFIG_STATUS || ac_write_fail=1
50904
50905cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
50906  for (key in D) D_is_set[key] = 1
50907  FS = ""
50908}
50909/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
50910  line = \$ 0
50911  split(line, arg, " ")
50912  if (arg[1] == "#") {
50913    defundef = arg[2]
50914    mac1 = arg[3]
50915  } else {
50916    defundef = substr(arg[1], 2)
50917    mac1 = arg[2]
50918  }
50919  split(mac1, mac2, "(") #)
50920  macro = mac2[1]
50921  prefix = substr(line, 1, index(line, defundef) - 1)
50922  if (D_is_set[macro]) {
50923    # Preserve the white space surrounding the "#".
50924    print prefix "define", macro P[macro] D[macro]
50925    next
50926  } else {
50927    # Replace #undef with comments.  This is necessary, for example,
50928    # in the case of _POSIX_SOURCE, which is predefined and required
50929    # on some systems where configure will not decide to define it.
50930    if (defundef == "undef") {
50931      print "/*", prefix defundef, macro, "*/"
50932      next
50933    }
50934  }
50935}
50936{ print }
50937_ACAWK
50938_ACEOF
50939cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
50940  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
50941fi # test -n "$CONFIG_HEADERS"
50942
50943
50944eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
50945shift
50946for ac_tag
50947do
50948  case $ac_tag in
50949  :[FHLC]) ac_mode=$ac_tag; continue;;
50950  esac
50951  case $ac_mode$ac_tag in
50952  :[FHL]*:*);;
50953  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
50954  :[FH]-) ac_tag=-:-;;
50955  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
50956  esac
50957  ac_save_IFS=$IFS
50958  IFS=:
50959  set x $ac_tag
50960  IFS=$ac_save_IFS
50961  shift
50962  ac_file=$1
50963  shift
50964
50965  case $ac_mode in
50966  :L) ac_source=$1;;
50967  :[FH])
50968    ac_file_inputs=
50969    for ac_f
50970    do
50971      case $ac_f in
50972      -) ac_f="$ac_tmp/stdin";;
50973      *) # Look for the file first in the build tree, then in the source tree
50974	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
50975	 # because $ac_f cannot contain `:'.
50976	 test -f "$ac_f" ||
50977	   case $ac_f in
50978	   [\\/$]*) false;;
50979	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
50980	   esac ||
50981	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
50982      esac
50983      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
50984      as_fn_append ac_file_inputs " '$ac_f'"
50985    done
50986
50987    # Let's still pretend it is `configure' which instantiates (i.e., don't
50988    # use $as_me), people would be surprised to read:
50989    #    /* config.h.  Generated by config.status.  */
50990    configure_input='Generated from '`
50991	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
50992	`' by configure.'
50993    if test x"$ac_file" != x-; then
50994      configure_input="$ac_file.  $configure_input"
50995      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
50996$as_echo "$as_me: creating $ac_file" >&6;}
50997    fi
50998    # Neutralize special characters interpreted by sed in replacement strings.
50999    case $configure_input in #(
51000    *\&* | *\|* | *\\* )
51001       ac_sed_conf_input=`$as_echo "$configure_input" |
51002       sed 's/[\\\\&|]/\\\\&/g'`;; #(
51003    *) ac_sed_conf_input=$configure_input;;
51004    esac
51005
51006    case $ac_tag in
51007    *:-:* | *:-) cat >"$ac_tmp/stdin" \
51008      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
51009    esac
51010    ;;
51011  esac
51012
51013  ac_dir=`$as_dirname -- "$ac_file" ||
51014$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
51015	 X"$ac_file" : 'X\(//\)[^/]' \| \
51016	 X"$ac_file" : 'X\(//\)$' \| \
51017	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
51018$as_echo X"$ac_file" |
51019    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
51020	    s//\1/
51021	    q
51022	  }
51023	  /^X\(\/\/\)[^/].*/{
51024	    s//\1/
51025	    q
51026	  }
51027	  /^X\(\/\/\)$/{
51028	    s//\1/
51029	    q
51030	  }
51031	  /^X\(\/\).*/{
51032	    s//\1/
51033	    q
51034	  }
51035	  s/.*/./; q'`
51036  as_dir="$ac_dir"; as_fn_mkdir_p
51037  ac_builddir=.
51038
51039case "$ac_dir" in
51040.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
51041*)
51042  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
51043  # A ".." for each directory in $ac_dir_suffix.
51044  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
51045  case $ac_top_builddir_sub in
51046  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
51047  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
51048  esac ;;
51049esac
51050ac_abs_top_builddir=$ac_pwd
51051ac_abs_builddir=$ac_pwd$ac_dir_suffix
51052# for backward compatibility:
51053ac_top_builddir=$ac_top_build_prefix
51054
51055case $srcdir in
51056  .)  # We are building in place.
51057    ac_srcdir=.
51058    ac_top_srcdir=$ac_top_builddir_sub
51059    ac_abs_top_srcdir=$ac_pwd ;;
51060  [\\/]* | ?:[\\/]* )  # Absolute name.
51061    ac_srcdir=$srcdir$ac_dir_suffix;
51062    ac_top_srcdir=$srcdir
51063    ac_abs_top_srcdir=$srcdir ;;
51064  *) # Relative name.
51065    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
51066    ac_top_srcdir=$ac_top_build_prefix$srcdir
51067    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
51068esac
51069ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
51070
51071
51072  case $ac_mode in
51073  :F)
51074  #
51075  # CONFIG_FILE
51076  #
51077
51078_ACEOF
51079
51080cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51081# If the template does not know about datarootdir, expand it.
51082# FIXME: This hack should be removed a few years after 2.60.
51083ac_datarootdir_hack=; ac_datarootdir_seen=
51084ac_sed_dataroot='
51085/datarootdir/ {
51086  p
51087  q
51088}
51089/@datadir@/p
51090/@docdir@/p
51091/@infodir@/p
51092/@localedir@/p
51093/@mandir@/p'
51094case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
51095*datarootdir*) ac_datarootdir_seen=yes;;
51096*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
51097  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
51098$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
51099_ACEOF
51100cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51101  ac_datarootdir_hack='
51102  s&@datadir@&$datadir&g
51103  s&@docdir@&$docdir&g
51104  s&@infodir@&$infodir&g
51105  s&@localedir@&$localedir&g
51106  s&@mandir@&$mandir&g
51107  s&\\\${datarootdir}&$datarootdir&g' ;;
51108esac
51109_ACEOF
51110
51111# Neutralize VPATH when `$srcdir' = `.'.
51112# Shell code in configure.ac might set extrasub.
51113# FIXME: do we really want to maintain this feature?
51114cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
51115ac_sed_extra="$ac_vpsub
51116$extrasub
51117_ACEOF
51118cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
51119:t
51120/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
51121s|@configure_input@|$ac_sed_conf_input|;t t
51122s&@top_builddir@&$ac_top_builddir_sub&;t t
51123s&@top_build_prefix@&$ac_top_build_prefix&;t t
51124s&@srcdir@&$ac_srcdir&;t t
51125s&@abs_srcdir@&$ac_abs_srcdir&;t t
51126s&@top_srcdir@&$ac_top_srcdir&;t t
51127s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
51128s&@builddir@&$ac_builddir&;t t
51129s&@abs_builddir@&$ac_abs_builddir&;t t
51130s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
51131$ac_datarootdir_hack
51132"
51133eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
51134  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51135
51136test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
51137  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
51138  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
51139      "$ac_tmp/out"`; test -z "$ac_out"; } &&
51140  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51141which seems to be undefined.  Please make sure it is defined" >&5
51142$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
51143which seems to be undefined.  Please make sure it is defined" >&2;}
51144
51145  rm -f "$ac_tmp/stdin"
51146  case $ac_file in
51147  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
51148  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
51149  esac \
51150  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51151 ;;
51152  :H)
51153  #
51154  # CONFIG_HEADER
51155  #
51156  if test x"$ac_file" != x-; then
51157    {
51158      $as_echo "/* $configure_input  */" \
51159      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
51160    } >"$ac_tmp/config.h" \
51161      || as_fn_error $? "could not create $ac_file" "$LINENO" 5
51162    if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
51163      { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
51164$as_echo "$as_me: $ac_file is unchanged" >&6;}
51165    else
51166      rm -f "$ac_file"
51167      mv "$ac_tmp/config.h" "$ac_file" \
51168	|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
51169    fi
51170  else
51171    $as_echo "/* $configure_input  */" \
51172      && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
51173      || as_fn_error $? "could not create -" "$LINENO" 5
51174  fi
51175 ;;
51176
51177
51178  esac
51179
51180done # for ac_tag
51181
51182
51183as_fn_exit 0
51184_ACEOF
51185ac_clean_files=$ac_clean_files_save
51186
51187test $ac_write_fail = 0 ||
51188  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
51189
51190
51191# configure is writing to config.log, and then calls config.status.
51192# config.status does its own redirection, appending to config.log.
51193# Unfortunately, on DOS this fails, as config.log is still kept open
51194# by configure, so config.status won't be able to write to it; its
51195# output is simply discarded.  So we exec the FD to /dev/null,
51196# effectively closing config.log, so it can be properly (re)opened and
51197# appended to by config.status.  When coming back to configure, we
51198# need to make the FD available again.
51199if test "$no_create" != yes; then
51200  ac_cs_success=:
51201  ac_config_status_args=
51202  test "$silent" = yes &&
51203    ac_config_status_args="$ac_config_status_args --quiet"
51204  exec 5>/dev/null
51205  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
51206  exec 5>>config.log
51207  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
51208  # would make configure fail if this is the last instruction.
51209  $ac_cs_success || as_fn_exit 1
51210fi
51211if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
51212  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
51213$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
51214fi
51215
51216
51217# Try to move the config.log file to the output directory.
51218if test -e ./config.log; then
51219  $MV -f ./config.log "$OUTPUT_ROOT/config.log" 2> /dev/null
51220fi
51221
51222# Make the compare script executable
51223$CHMOD +x $OUTPUT_ROOT/compare.sh
51224
51225# Finally output some useful information to the user
51226
51227  # Finally output some useful information to the user
51228
51229  printf "\n"
51230  printf "====================================================\n"
51231  if test "x$no_create" != "xyes"; then
51232    if test "x$IS_RECONFIGURE" != "xyes"; then
51233      printf "A new configuration has been successfully created in\n %s\n" "$OUTPUT_ROOT"
51234    else
51235      printf "The existing configuration has been successfully updated in\n %s\n" "$OUTPUT_ROOT"
51236    fi
51237  else
51238    if test "x$IS_RECONFIGURE" != "xyes"; then
51239      printf "A configuration has been successfully checked but not created\n"
51240    else
51241      printf "The existing configuration has been successfully checked in\n %s\n" "$OUTPUT_ROOT"
51242    fi
51243  fi
51244  if test "x$CONFIGURE_COMMAND_LINE" != x; then
51245    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
51246  else
51247    printf "using default settings.\n"
51248  fi
51249
51250  printf "\n"
51251  printf "Configuration summary:\n"
51252  printf "* Debug level:    $DEBUG_LEVEL\n"
51253  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
51254  printf "* JDK variant:    $JDK_VARIANT\n"
51255  printf "* JVM variants:   $with_jvm_variants\n"
51256  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
51257
51258  printf "\n"
51259  printf "Tools summary:\n"
51260  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
51261    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
51262  fi
51263  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
51264  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
51265  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
51266  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
51267
51268  printf "\n"
51269  printf "Build performance summary:\n"
51270  printf "* Cores to use:   $JOBS\n"
51271  printf "* Memory limit:   $MEMORY_SIZE MB\n"
51272  if test "x$CCACHE_STATUS" != "x"; then
51273    printf "* ccache status:  $CCACHE_STATUS\n"
51274  fi
51275  printf "\n"
51276
51277  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xyes"; then
51278    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
51279    printf "will result in longer build times.\n"
51280    printf "\n"
51281  fi
51282
51283  if test "x$FOUND_ALT_VARIABLES" != "x"; then
51284    printf "WARNING: You have old-style ALT_ environment variables set.\n"
51285    printf "These are not respected, and will be ignored. It is recommended\n"
51286    printf "that you clean your environment. The following variables are set:\n"
51287    printf "$FOUND_ALT_VARIABLES\n"
51288    printf "\n"
51289  fi
51290
51291  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
51292    printf "WARNING: Your build output directory is not on a local disk.\n"
51293    printf "This will severely degrade build performance!\n"
51294    printf "It is recommended that you create an output directory on a local disk,\n"
51295    printf "and run the configure script again from that directory.\n"
51296    printf "\n"
51297  fi
51298
51299  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
51300    printf "WARNING: The result of this configuration has overridden an older\n"
51301    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
51302    printf "proper build. Failure to do so might result in strange build problems.\n"
51303    printf "\n"
51304  fi
51305
51306  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
51307    printf "WARNING: The result of this configuration was not saved.\n"
51308    printf "You should run without '--no-create | -n' to create the configuration.\n"
51309    printf "\n"
51310  fi
51311
51312